diff --git a/common/azure-test-watcher/README.md b/common/azure-test-watcher/README.md deleted file mode 100644 index 9c783341d4af..000000000000 --- a/common/azure-test-watcher/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Azure Test Watcher client library for Java - -Azure Test Watcher client library adds an implementations of JUnit 5's before and after test extensions and creates an SPI that will be loaded during the test run - -## Getting started - -### Prerequisites - -- Java Development Kit (JDK) with version 8 or above - -### Adding the package to your product - -[//]: # ({x-version-update-start;com.azure:azure-test-watcher;current}) -```xml - - com.azure - azure-test-watcher - 1.0.0-beta.1 - -``` -[//]: # ({x-version-update-end}) - -## Key concepts - - -## Examples - -## Troubleshooting - -## Next steps - -## Contributing - -If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft -Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). - -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fcommon%2Fazure-test-watcher%2FREADME.png) diff --git a/common/azure-test-watcher/pom.xml b/common/azure-test-watcher/pom.xml deleted file mode 100644 index 3210abbfa5a4..000000000000 --- a/common/azure-test-watcher/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - 4.0.0 - - com.azure - azure-test-watcher - 1.0.0-beta.1 - - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../sdk/parents/azure-client-sdk-parent - - - - UTF-8 - - https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java - - 1.8 - 1.8 - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M3 - - - - - com.azure:* - - - org.junit.jupiter:junit-jupiter:[5.6.2] - org.junit.jupiter:junit-jupiter-api:[5.6.2] - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - ${packageOutputDirectory} - - - - default-jar - test - - jar - - - - - - - - - - org.junit.jupiter - junit-jupiter - 5.6.2 - - - org.junit.jupiter - junit-jupiter-api - 5.6.2 - - - diff --git a/common/azure-test-watcher/src/main/java/com/azure/testing/package-info.java b/common/azure-test-watcher/src/main/java/com/azure/testing/package-info.java deleted file mode 100644 index 295ed604e670..000000000000 --- a/common/azure-test-watcher/src/main/java/com/azure/testing/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -/** - * Package containing JUnit 5 testing extensions. - */ -package com.azure.testing; diff --git a/common/azure-test-watcher/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension b/common/azure-test-watcher/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension deleted file mode 100644 index 3fa30aa817c7..000000000000 --- a/common/azure-test-watcher/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension +++ /dev/null @@ -1 +0,0 @@ -com.azure.testing.AzureTestWatcher diff --git a/common/perf-test-core/CHANGELOG.md b/common/perf-test-core/CHANGELOG.md new file mode 100644 index 000000000000..4144f75694a0 --- /dev/null +++ b/common/perf-test-core/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index e423fcddfc81..b50e70eefdf7 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -124,6 +124,7 @@ known_content_issues: - ['sdk/cosmos/azure-cosmos-benchmark/README.md', '#3113'] - ['sdk/cosmos/azure-cosmos-examples/README.md', '#3113'] - ['sdk/cosmos/azure-cosmos/README.md', '#3113'] + - ['sdk/cosmos/azure-cosmos-encryption/README.md', '#3113'] - ['sdk/e2e/README.md', '#3113'] - ['sdk/eventgrid/microsoft-azure-eventgrid/README.md', '#3113'] - ['sdk/eventhubs/microsoft-azure-eventhubs-eph/README.md', '#3113'] @@ -131,6 +132,7 @@ known_content_issues: - ['sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md', '#3113'] - ['sdk/keyvault/README.md', '#3113'] - ['sdk/loganalytics/microsoft-azure-loganalytics/README.md', '#3113'] + - ['sdk/parents/azure-client-sdk-parent/README.md', '#3113'] - ['sdk/search/azure-search-documents/swagger/readme.md', '#3113'] - ['sdk/search/azure-search-documents/src/test/README.md', '#3113'] - ['sdk/search/open-api/readme.md', '#3113'] diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml index ae6c3fffe457..73c16b4b3ee0 100755 --- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml +++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml @@ -101,9 +101,6 @@ - - @@ -126,7 +123,7 @@ @@ -430,6 +427,7 @@ + + + + + + + + + + + + + + + diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index f536c098907f..58d947c2379f 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -790,6 +790,25 @@ + + + + + + + + + + + + + + + + + + + @@ -1452,6 +1471,12 @@ + + + + + + @@ -1647,6 +1672,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -1654,6 +1701,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -1817,6 +1885,12 @@ + + + + + + @@ -1982,7 +2056,7 @@ - + @@ -2003,6 +2077,13 @@ RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"/> + + + + + + + diff --git a/eng/common/TestResources/deploy-test-resources.yml b/eng/common/TestResources/deploy-test-resources.yml index b580d73f1406..b875a806b143 100644 --- a/eng/common/TestResources/deploy-test-resources.yml +++ b/eng/common/TestResources/deploy-test-resources.yml @@ -13,7 +13,7 @@ parameters: # "TestApplicationId": "", # "TestApplicationSecret": "", # "ProvisionerApplicationId": "", -# "ProvisoinerApplicationSecret": "", +# "ProvisionerApplicationSecret": "", # "Environment": "AzureCloud | AzureGov | AzureChina | " # } diff --git a/eng/common/pipelines/templates/steps/create-pull-request.yml b/eng/common/pipelines/templates/steps/create-pull-request.yml index 790de92bcbe5..10af61de1100 100644 --- a/eng/common/pipelines/templates/steps/create-pull-request.yml +++ b/eng/common/pipelines/templates/steps/create-pull-request.yml @@ -12,6 +12,8 @@ parameters: WorkingDirectory: $(System.DefaultWorkingDirectory) PRTitle: not-specified ScriptDirectory: eng/common/scripts + GHReviewersVariable: '' + GHTeamReviewersVariable: '' steps: @@ -63,3 +65,18 @@ steps: -PRBranch "${{ parameters.PRBranchName }}" -AuthToken "$(azuresdk-github-pat)" -PRTitle "${{ parameters.PRTitle }}" + +- task: PowerShell@2 + displayName: Tag a Reviewer on PR + condition: and(succeeded(), eq(variables['HasChanges'], 'true')) + inputs: + pwsh: true + workingDirectory: ${{ parameters.WorkingDirectory }} + filePath: ${{ parameters.ScriptDirectory }}/add-pullrequest-reviewers.ps1 + arguments: > + -RepoOwner "${{ parameters.RepoOwner }}" + -RepoName "${{ parameters.RepoName }}" + -AuthToken "$(azuresdk-github-pat)" + -GitHubUsers "$(${{ parameters.GHReviewersVariable }})" + -GitHubTeams "$(${{ parameters.GHTeamReviewersVariable }})" + -PRNumber "$(Submitted.PullRequest.Number)" diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 6ff9f84ff3ee..a9ff8c4e17b4 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -12,6 +12,8 @@ parameters: ArtifactName: '' Language: '' DocRepoDestinationPath: '' #usually docs-ref-services/ + GHReviewersVariable: '' + GHTeamReviewersVariable: '' # externally set, as eng-common does not have the identity-resolver. Run as pre-step steps: - pwsh: | @@ -56,3 +58,5 @@ steps: BaseBranchName: smoke-test WorkingDirectory: ${{ parameters.WorkingDirectory }}/repo ScriptDirectory: ${{ parameters.WorkingDirectory }}/${{ parameters.ScriptDirectory }} + GHReviewersVariable: ${{ parameters.GHReviewersVariable }} + GHTeamReviewersVariable: ${{ parameters.GHTeamReviewersVariable }} diff --git a/eng/common/pipelines/templates/steps/get-pr-owners.yml b/eng/common/pipelines/templates/steps/get-pr-owners.yml new file mode 100644 index 000000000000..a80d5b83b2de --- /dev/null +++ b/eng/common/pipelines/templates/steps/get-pr-owners.yml @@ -0,0 +1,46 @@ +parameters: + TargetVariable: '' + ServiceDirectory: '' + +steps: + - pwsh: | + git clone https://github.com/Azure/azure-sdk-tools.git $(Build.SourcesDirectory)/tools_repo + cd $(Build.SourcesDirectory)/tools_repo + git checkout 564ad63ae72d18422533fa1da9d396e7703c1cb5 + displayName: Setup Identity Resolver + + - pwsh: | + $result = dotnet run -v q -- ` + --aad-app-id-var APP_ID ` + --aad-app-secret-var APP_SECRET ` + --aad-tenant-var AAD_TENANT ` + --kusto-url-var KUSTO_URL ` + --kusto-database-var KUSTO_DB ` + --kusto-table-var KUSTO_TABLE ` + --identity "$(Build.QueuedBy)" + $resolvedIdentity = $result[-1] | ConvertFrom-Json + + Write-Host $resolvedIdentity + + Write-Output "##vso[task.setvariable variable=${{ parameters.TargetVariable }}]$($resolvedIdentity.GithubUserName)" + displayName: 'Resolving Queuing User' + workingDirectory: $(Build.SourcesDirectory)/tools_repo/tools/notification-configuration/identity-resolver + env: + APP_ID: $(notification-aad-app-id) + APP_SECRET: $(notification-aad-secret) + AAD_TENANT: $(notification-aad-tenant) + KUSTO_URL: $(notification-kusto-url) + KUSTO_DB: $(notification-kusto-db) + KUSTO_TABLE: $(notification-kusto-table) + + - pwsh: | + Remove-Item -Force -Recurse $(Build.SourcesDirectory)/tools_repo + displayName: Clean Up Cloned Tools Repo + + - pwsh: | + $originalValue = "$(${{ parameters.TargetVariable }})" + $result = $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1 -TargetDirectory /sdk/${{ parameters.ServiceDirectory }}/ -RootDirectory $(Build.SourcesDirectory) + if ($result) { + Write-Output "##vso[task.setvariable variable=${{ parameters.TargetVariable }}]$originalValue,$result" + } + displayName: Add CodeOwners if Present \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index 1a99350f0161..a3d385becefc 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -1,5 +1,7 @@ parameters: Directory: 'not-specified' + IgnoreLinksFile: "$(Build.SourcesDirectory)/eng/ignore-links.txt" + steps: - task: PowerShell@2 @@ -9,4 +11,4 @@ steps: workingDirectory: $(Build.SourcesDirectory)/${{ parameters.Directory }} filePath: eng/common/scripts/Verify-Links.ps1 arguments: > - -urls $(dir -r -i *.md) -rootUrl "file://$(Build.SourcesDirectory)/${{ parameters.Directory }}" + -urls $(dir -r -i *.md) -rootUrl "file://$(Build.SourcesDirectory)/${{ parameters.Directory }}" -recursive:$false -ignoreLinksFile ${{ parameters.IgnoreLinksFile }} diff --git a/eng/common/scripts/Submit-PullRequest.ps1 b/eng/common/scripts/Submit-PullRequest.ps1 index ef2a6f545061..5edabc599a99 100644 --- a/eng/common/scripts/Submit-PullRequest.ps1 +++ b/eng/common/scripts/Submit-PullRequest.ps1 @@ -58,6 +58,9 @@ $resp | Write-Verbose if ($resp.Count -gt 0) { Write-Host -f green "Pull request already exists $($resp[0].html_url)" + + # setting variable to reference the pull request by number + Write-Host "##vso[task.setvariable variable=Submitted.PullRequest.Number]$($resp[0].number)" } else { $data = @{ @@ -80,4 +83,7 @@ else { $resp | Write-Verbose Write-Host -f green "Pull request created https://github.com/$RepoOwner/$RepoName/pull/$($resp.number)" + + # setting variable to reference the pull request by number + Write-Host "##vso[task.setvariable variable=Submitted.PullRequest.Number]$($resp.number)" } diff --git a/eng/common/scripts/Verify-ChangeLog.ps1 b/eng/common/scripts/Verify-ChangeLog.ps1 index c9ad4d295644..26218d988df2 100644 --- a/eng/common/scripts/Verify-ChangeLog.ps1 +++ b/eng/common/scripts/Verify-ChangeLog.ps1 @@ -1,14 +1,14 @@ # Wrapper Script for ChangeLog Verification param ( - [String]$ChangeLogLocation, - [String]$VersionString, - [string]$PackageName, - [string]$ServiceName, - [string]$RepoRoot, - [ValidateSet("net","java","js","python")] - [string]$Language, - [string]$RepoName, - [boolean]$ForRelease=$False + [String]$ChangeLogLocation, + [String]$VersionString, + [string]$PackageName, + [string]$ServiceName, + [string]$RepoRoot, + [ValidateSet("net", "java", "js", "python")] + [string]$Language, + [string]$RepoName, + [boolean]$ForRelease = $False ) $ProgressPreference = "SilentlyContinue" @@ -16,23 +16,32 @@ $ProgressPreference = "SilentlyContinue" Import-Module (Join-Path $PSScriptRoot modules ChangeLog-Operations.psm1) $validChangeLog = $false -if ($ChangeLogLocation -and $VersionString) +if ($ChangeLogLocation -and $VersionString) { $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $ChangeLogLocation -VersionString $VersionString -ForRelease $ForRelease } -else +else { Import-Module (Join-Path $PSScriptRoot modules Package-Properties.psm1) if ([System.String]::IsNullOrEmpty($Language)) { - $Language = $RepoName.Substring($RepoName.LastIndexOf('-') + 1) + if ($RepoName -match "azure-sdk-for-(?[^-]+)") + { + $Language = $matches["lang"] + } + else + { + Write-Error "Failed to set Language automatically. Please pass the appropriate Language as a parameter." + exit 1 + } } $PackageProp = Get-PkgProperties -PackageName $PackageName -ServiceName $ServiceName -Language $Language -RepoRoot $RepoRoot $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.pkgChangeLogPath -VersionString $PackageProp.pkgVersion -ForRelease $ForRelease } -if (!$validChangeLog) { +if (!$validChangeLog) +{ exit 1 } diff --git a/eng/common/scripts/add-pullrequest-reviewers.ps1 b/eng/common/scripts/add-pullrequest-reviewers.ps1 new file mode 100644 index 000000000000..00460ce701f0 --- /dev/null +++ b/eng/common/scripts/add-pullrequest-reviewers.ps1 @@ -0,0 +1,79 @@ +param( + [Parameter(Mandatory = $true)] + $RepoOwner, + + [Parameter(Mandatory = $true)] + $RepoName, + + [Parameter(Mandatory = $false)] + $GitHubUsers = "", + + [Parameter(Mandatory = $false)] + $GitHubTeams = "", + + [Parameter(Mandatory = $true)] + $PRNumber, + + [Parameter(Mandatory = $true)] + $AuthToken +) + +# at least one of these needs to be populated +if (-not $GitHubUsers -and -not $GitHubTeams) { + Write-Host "No user provided for addition, exiting." + exit 0 +} + +$userAdditions = @($GitHubUsers.Split(",") | % { $_.Trim() } | ? { return $_ }) +$teamAdditions = @($GitHubTeams.Split(",") | % { $_.Trim() } | ? { return $_ }) + +$headers = @{ + Authorization = "bearer $AuthToken" +} +$uri = "https://api.github.com/repos/$RepoOwner/$RepoName/pulls/$PRNumber/requested_reviewers" + +try { + $resp = Invoke-RestMethod -Headers $headers $uri -MaximumRetryCount 3 +} +catch { + Write-Error "Invoke-RestMethod [$uri] failed with exception:`n$_" + exit 1 +} + +# the response object takes this form: https://developer.github.com/v3/pulls/review_requests/#response-1 +# before we can push a new reviewer, we need to pull the simple Ids out of the complex objects that came back in the response +$userReviewers = @($resp.users | % { return $_.login }) +$teamReviewers = @($resp.teams | % { return $_.slug }) + +if (!$usersReviewers) { $modifiedUserReviewers = @() } else { $modifiedUserReviewers = $usersReviewers.Clone() } +$modifiedUserReviewers += ($modifiedUserReviewers | ? { !$usersReviews.Contains($_) }) + +if ($teamReviewers) { $modifiedTeamReviewers = @() } else { $modifiedTeamReviewers = $teamReviewers.Clone() } +$modifiedTeamReviewers += ($modifiedUserReviewers | ? { !$teamReviewers.Contains($_) }) + +$detectedUserDiffs = Compare-Object -ReferenceObject $userReviewers -DifferenceObject $modifiedUserReviewers +$detectedTeamDiffs = Compare-Object -ReferenceObject $teamReviewers -DifferenceObject $modifiedTeamReviewers + +# Compare-Object returns values when there is a difference between the comparied objects. +# we only want to run the update if there IS a difference. +if ($detectedUserDiffs -or $detectedTeamDiffs) { + $postResp = @{} + + if ($modifiedUserReviewers) { $postResp["reviewers"] = $modifiedUserReviewers } + if ($modifiedTeamReviewers) { $postResp["team_reviewers"] = $modifiedTeamReviewers } + + $postResp = $postResp | ConvertTo-Json + + try { + $resp = Invoke-RestMethod -Method Post -Headers $headers -Body $postResp -Uri $uri -MaximumRetryCount 3 + $resp | Write-Verbose + } + catch { + Write-Error "Unable to update PR reviewers. `n$_" + } +} +else { + $results = $GitHubUsers + $GitHubTeams + Write-Host "Reviewers $results already added. Exiting." + exit(0) +} diff --git a/eng/common/scripts/get-codeowners.ps1 b/eng/common/scripts/get-codeowners.ps1 new file mode 100644 index 000000000000..edbae4cb18c6 --- /dev/null +++ b/eng/common/scripts/get-codeowners.ps1 @@ -0,0 +1,40 @@ +param ( + $TargetDirectory, # should be in relative form from root of repo. EG: sdk/servicebus + $RootDirectory # ideally $(Build.SourcesDirectory) +) + +$codeOwnersLocation = Join-Path $RootDirectory -ChildPath ".github/CODEOWNERS" + +if (!(Test-Path $codeOwnersLocation)) { + Write-Host "Unable to find CODEOWNERS file in target directory $RootDirectory" + exit 1 +} + +$codeOwnersContent = Get-Content $codeOwnersLocation + +$ownedFolders = @{} + +foreach ($contentLine in $codeOwnersContent) { + if (-not $contentLine.StartsWith("#") -and $contentLine){ + $splitLine = $contentLine -split "\s+" + + # CODEOWNERS file can also have labels present after the owner aliases + # gh aliases start with @ in codeowners. don't pass on to API calls + $ownedFolders[$splitLine[0].ToLower()] = ($splitLine[1..$($splitLine.Length)] ` + | ? { $_.StartsWith("@") } ` + | % { return $_.substring(1) }) -join "," + } +} + +$results = $ownedFolders[$TargetDirectory.ToLower()] + +if ($results) { + Write-Host "Discovered code owners for path $TargetDirectory are $results." + return $results +} +else { + Write-Host "Unable to match path $TargetDirectory in CODEOWNERS file located at $codeOwnersLocation." + Write-Host $ownedFolders | ConvertTo-Json + return "" +} + diff --git a/eng/common/scripts/modules/Package-Properties.psm1 b/eng/common/scripts/modules/Package-Properties.psm1 index fa6920bec349..b0572a71d449 100644 --- a/eng/common/scripts/modules/Package-Properties.psm1 +++ b/eng/common/scripts/modules/Package-Properties.psm1 @@ -64,9 +64,6 @@ class PackageProps } } -$ProgressPreference = "SilentlyContinue" -Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser - function Extract-PkgProps ($pkgPath, $serviceName, $pkgName, $lang) { if ($lang -eq "net") @@ -258,6 +255,9 @@ function Operate-OnPackages ($activePkgList, $serviceName, $language, $repoRoot, function Get-PkgListFromYml ($ciYmlPath) { + $ProgressPreference = "SilentlyContinue" + Register-PSRepository -Default -ErrorAction:SilentlyContinue + Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser $ciYmlContent = Get-Content $ciYmlPath -Raw $ciYmlObj = ConvertFrom-Yaml $ciYmlContent -Ordered if ($ciYmlObj.Contains("stages")) diff --git a/eng/jacoco-test-coverage/CHANGELOG.md b/eng/jacoco-test-coverage/CHANGELOG.md new file mode 100644 index 000000000000..04a5fd6d8dc5 --- /dev/null +++ b/eng/jacoco-test-coverage/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0-SNAPSHOT (Unreleased) diff --git a/eng/jacoco-test-coverage/README.md b/eng/jacoco-test-coverage/README.md new file mode 100644 index 000000000000..56ddda8e4e3d --- /dev/null +++ b/eng/jacoco-test-coverage/README.md @@ -0,0 +1,2 @@ +# Microsoft Azure Client Library - Test coverage +Nothing exciting to see here, this just aggregates the modules for reporting purposes. \ No newline at end of file diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 63e664f3d819..34e1d037837d 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -84,22 +84,17 @@ com.azure azure-core-serializer-avro-apache - 1.0.0-beta.1 - - - com.azure - azure-core-serializer-avro-jackson - 1.0.0-beta.1 + 1.0.0-beta.2 com.azure azure-core-serializer-json-gson - 1.0.0-beta.2 + 1.0.0-beta.3 com.azure azure-core-serializer-json-jackson - 1.0.0-beta.2 + 1.0.0-beta.3 com.azure @@ -109,7 +104,12 @@ com.azure azure-cosmos - 4.2.0-beta.1 + 4.3.0-beta.1 + + + com.azure + azure-cosmos-encryption + 1.0.0-beta.1 com.azure @@ -154,22 +154,22 @@ com.azure azure-search-documents - 11.0.0 + 11.1.0-beta.1 com.azure azure-security-keyvault-certificates - 4.1.0-beta.4 + 4.1.0-beta.5 com.azure azure-security-keyvault-keys - 4.2.0-beta.5 + 4.2.0-beta.6 com.azure azure-security-keyvault-secrets - 4.2.0-beta.4 + 4.2.0-beta.5 com.azure @@ -196,12 +196,11 @@ azure-storage-blob-cryptography 12.8.0-beta.2 - - - - - - + + com.azure + azure-storage-blob-nio + 12.0.0-beta.2 + com.azure azure-storage-file-share @@ -225,7 +224,7 @@ com.azure azure-sdk-template - 1.0.4-beta.20 + 1.1.0-beta.1 @@ -278,6 +277,11 @@ azure-spring-data-cosmos 3.0.0-beta.1 + + com.azure + azure-spring-data-gremlin + 2.3.1-beta.1 + @@ -316,7 +320,8 @@ - com.azure:* + com.microsoft.azure:* diff --git a/eng/mgmt/api-specs.json b/eng/mgmt/api-specs.json index a6ef3826a792..51ef79435284 100644 --- a/eng/mgmt/api-specs.json +++ b/eng/mgmt/api-specs.json @@ -42,10 +42,6 @@ "source": "specification/vmware/resource-manager/readme.md", "args": "--multiapi --fluent" }, - "azure-kusto/resource-manager": { - "source": "specification/azure-kusto/resource-manager/readme.md", - "args": "--multiapi --fluent" - }, "azurestack/resource-manager": { "source": "specification/azurestack/resource-manager/readme.md", "args": "--multiapi --fluent" @@ -176,6 +172,10 @@ "source": "specification/kubernetesconfiguration/resource-manager/readme.md", "args": "--multiapi --fluent" }, + "kusto/resource-manager": { + "source": "specification/azure-kusto/resource-manager/readme.md", + "args": "--multiapi --fluent" + }, "loganalytics/data-plane": { "source": "specification/operationalinsights/data-plane/readme.md", "args": "--payload-flattening-threshold=1 --override-client-name=LogAnalyticsDataClient" diff --git a/eng/mgmt/gulpfile.js b/eng/mgmt/gulpfile.js index e9df7cf41079..d2fb27467da4 100644 --- a/eng/mgmt/gulpfile.js +++ b/eng/mgmt/gulpfile.js @@ -16,7 +16,7 @@ const xmlparser = require('fast-xml-parser'); const mappings = require('./api-specs.json'); const defaultSpecRoot = "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master"; -gulp.task('default', function() { +async function defaultInfo() { console.log("Usage: gulp codegen " + "[--spec-root ] " + "[--projects ] " + @@ -53,7 +53,7 @@ gulp.task('default', function() { console.log("--autorest-args"); console.log("\tPasses additional argument to AutoRest generator"); -}); +} const maxParallelism = parseInt(args['parallel'], 10) || os.cpus().length; var specRoot = args['spec-root'] || defaultSpecRoot; @@ -72,18 +72,18 @@ var autoRestArgs = args['autorest-args'] || ''; var autoRestExe; const mgmtPomFilename = 'pom.mgmt.xml' -gulp.task('codegen', function(cb) { +async function generate(cb) { if (autoRestVersion.match(/[0-9]+\.[0-9]+\.[0-9]+.*/) || autoRestVersion == 'preview' || autoRestVersion == 'latest') { autoRestExe = 'autorest --version=' + autoRestVersion; - handleInput(projects, cb); + await handleInput(projects, cb); } else { autoRestExe = "node " + path.join(autoRestVersion, "src/autorest-core/dist/app.js"); - handleInput(projects, cb); + await handleInput(projects, cb); } -}); +} -var handleInput = function(projects, cb) { +async function handleInput(projects, cb) { console.info(`Generating up to ${maxParallelism} projects in parallel..`); if (projects === undefined) { const actions = Object.keys(mappings).map(proj => { @@ -105,7 +105,7 @@ var handleInput = function(projects, cb) { } } -var codegen = async function(project, cb) { +async function codegen(project, cb) { if (!args['preserve']) { deleteMgmtFolders(project); } @@ -188,7 +188,7 @@ var deleteMgmtFolders = function(project) { }); } -var deleteFolderRecursive = function(folder) { +function deleteFolderRecursive(folder) { var header = "Code generated by Microsoft (R) AutoRest Code Generator"; if(fs.existsSync(folder)) { fs.readdirSync(folder).forEach(function(file, index) { @@ -205,7 +205,7 @@ var deleteFolderRecursive = function(folder) { } }; -var changePom = function(project) { +function changePom(project) { var modules = [] project = project.split('/')[0] @@ -253,17 +253,29 @@ var changePom = function(project) { }); } -gulp.task('java:build', shell.task('mvn package javadoc:aggregate -DskipTests=true -q')); -gulp.task('java:stage', ['java:build'], function(){ +async function prepareBuild() { + return shell.task('mvn package javadoc:aggregate -DskipTests -q'); +} + +async function prepareStage() { return gulp.src('./target/site/apidocs/**/*').pipe(gulp.dest('./dist')); -}); +} -/// Top level build entry point -gulp.task('stage', ['java:stage']); -gulp.task('publish', ['stage'], function(){ +async function preparePublish() { var options = {}; if(process.env.GH_TOKEN){ options.remoteUrl = 'https://' + process.env.GH_TOKEN + '@github.com/azure/azure-libraries-for-java.git' } return gulp.src('./dist/**/*').pipe(gulpif(!argv.dryrun, ghPages(options))); -}); +} + +const build = prepareBuild; +const stage = gulp.series(build, prepareStage); +const publish = gulp.series(stage, preparePublish); + +//exports task +exports.default = defaultInfo; +exports.codegen = generate; +exports.build = build; +exports.stage = stage; +exports.publish = publish; diff --git a/eng/mgmt/package.json b/eng/mgmt/package.json index 18046c01f32d..a15517dacd60 100644 --- a/eng/mgmt/package.json +++ b/eng/mgmt/package.json @@ -19,15 +19,12 @@ "colors": "1.1.2", "execa": "^0.8.0", "fast-xml-parser": "3.15.0", - "gulp": "^3.9.1", - "gulp-exec": "2.1.2", + "gulp": "^4.0.2", + "gulp-exec": "4.0.0", "gulp-gh-pages": "^0.5.4", - "gulp-if": "^2.0.0", - "gulp-shell": "^0.5.1", + "gulp-if": "^3.0.0", + "gulp-shell": "^0.8.0", "p-all": "^1.0.0", "yargs": "3.31.0" - }, - "dependencies": { - "node": "^10.15.3" } } diff --git a/eng/pipelines/scripts/generate_overview_from_readme.py b/eng/pipelines/scripts/generate_overview_from_readme.py index 6b606a98777c..7fcbe35a7fbf 100644 --- a/eng/pipelines/scripts/generate_overview_from_readme.py +++ b/eng/pipelines/scripts/generate_overview_from_readme.py @@ -41,7 +41,7 @@ def generate_overview(readme_file, version): # markdown2.markdown will create html from the readme.md file. The fenced-code-blocks # extras being passed into the markdown call is necessary to deal with the embedded # code blocks within the readme so they'll displaye correctly in the html - html_readme_content = markdown2.markdown(re.sub(pattern='^(\s*)@', repl='\g<1>{@literal @}', string=readme_content, flags=re.MULTILINE), extras=["fenced-code-blocks"]) + html_readme_content = markdown2.markdown(re.sub(pattern='@', repl='{@literal @}', string=readme_content, flags=re.MULTILINE), extras=["fenced-code-blocks"]) # Due to javadoc's iFrames the links need to target new tabs otherwise hilarity ensues soup = BeautifulSoup(html_readme_content, "html.parser") diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 23e1e2c3d394..ef828b3ab10b 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -107,8 +107,8 @@ jobs: displayName: 'Build and Package , JDK Version: $(JavaBuildVersion)' inputs: mavenPomFile: pom.xml - goals: 'package' - options: '$(DefaultOptions) "-DpackageOutputDirectory=$(Build.ArtifactStagingDirectory)" -DskipTests -Dinject-codesnippets -Dgenerate-overview -pl $(ProjectList) -am' # We include template-module so we ensure it always builds in CI + goals: 'deploy' + options: '$(DefaultOptions) -DskipTests -Dinject-codesnippets -Dgenerate-overview -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drevapi.skip=true -pl $(ProjectList) -am -DaltDeploymentRepository=id::default::file://$(Build.ArtifactStagingDirectory)' # We include template-module so we ensure it always builds in CI mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(JavaBuildVersion) diff --git a/eng/pipelines/templates/stages/cosmos-sdk-client.yml b/eng/pipelines/templates/stages/cosmos-sdk-client.yml index d31b37c199e8..072ae5cfcc42 100644 --- a/eng/pipelines/templates/stages/cosmos-sdk-client.yml +++ b/eng/pipelines/templates/stages/cosmos-sdk-client.yml @@ -81,6 +81,9 @@ stages: ServiceDirectory: cosmos Artifacts: ${{ parameters.Artifacts }} AdditionalModules: ${{ parameters.AdditionalModules }} + ACCOUNT_HOST: 'https://localhost:8081/' + ACCOUNT_KEY: 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==' + SECONDARY_ACCOUNT_KEY: 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==' # Increased timeout to 90 because of cosmos emulator taking 25-30 mins to download emulator # Issue filed to improve download speed: https://github.com/Azure/azure-sdk-for-java/issues/12970 TimeoutInMinutes: 90 @@ -106,7 +109,15 @@ stages: JavaTestVersion: '1.8' ProfileFlag: '-P integration-test-emulator' DisplayName: 'Spring Emulator only Integration Tests' - AdditionalArgs: '-DargLine="-DACCOUNT_HOST=https://localhost:8081/ -DACCOUNT_KEY=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== -DSECONDARY_ACCOUNT_KEY=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="' + AdditionalArgs: '-DargLine="-DACCOUNT_HOST=https://localhost:8081/ -DACCOUNT_KEY=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== -DSECONDARY_ACCOUNT_KEY=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== -DNEW_ACCOUNT_HOST=https://localhost:8081/ -DNEW_ACCOUNT_KEY=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== -DNEW_SECONDARY_ACCOUNT_KEY=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="' + Encryption_Integration_Tests_Java8: + OSVmImage: 'windows-2019' + JavaTestVersion: '1.8' + ProfileFlag: '-Pencryption-integration' + DisplayName: 'Encryption Emulator only Integration Tests' + PROTOCOLS: '["Tcp"]' + DESIRED_CONSISTENCIES: '["Session"]' + AdditionalArgs: '-DargLine="-DACCOUNT_HOST=https://localhost:8081/"' TestStepMavenInputs: goals: 'verify' @@ -115,37 +126,9 @@ stages: jdkVersionOption: $(JavaTestVersion) PreRunSteps: - - powershell: | - Write-Host "Downloading Cosmos Emulator - $(EmulatorMsiUrl)" - Invoke-WebRequest "$(EmulatorMsiUrl)" -OutFile "$env:temp\azure-cosmosdb-emulator.msi" - Write-Host "Finished Downloading Cosmos Emulator - $env:temp\azure-cosmosdb-emulator.msi" - dir "$env:temp" - displayName: 'Download Public Cosmos DB Emulator' - - - script: | - choco install lessmsi - choco upgrade lessmsi - mkdir "%TEMP%\Azure Cosmos DB Emulator" - lessmsi x "%TEMP%\azure-cosmosdb-emulator.msi" "%TEMP%\Azure Cosmos DB Emulator\" - displayName: 'Install Public Cosmos DB Emulator' - - - powershell: | - Write-Host "Starting Comsos DB Emulator" - Start-Process "$env:Temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" "/NoExplorer /NoUI /DisableRateLimiting /PartitionCount=100 /Consistency=Strong" -Verb RunAs - displayName: 'Run Public Cosmos DB Emulator' - - - powershell: | - Import-Module "$env:Temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" - - Do { - sleep 5 - $cosmosStatus = Get-CosmosDbEmulatorStatus - Write-Host "Cosmos Status: $cosmosStatus" - } While ($cosmosStatus -ne 'Running') - - Write-Host "Done" - displayName: 'Check Public Cosmos DB Emulator Status' - + - template: ../steps/cosmos-emulator.yml + parameters: + StartParameters: '-PartitionCount 100 -Consistency Strong -Timeout 600' - powershell: | $Key = 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==' $password = ConvertTo-SecureString -String $Key -Force -AsPlainText diff --git a/eng/pipelines/templates/steps/cosmos-emulator.yml b/eng/pipelines/templates/steps/cosmos-emulator.yml new file mode 100644 index 000000000000..564f3e429bd7 --- /dev/null +++ b/eng/pipelines/templates/steps/cosmos-emulator.yml @@ -0,0 +1,16 @@ +parameters: + EmulatorMsiUrl: "https://aka.ms/cosmosdb-emulator" + StartParameters: '' + +steps: + - powershell: | + $targetDir = $env:temp + Write-Host "Downloading and extracting Cosmos DB Emulator - ${{ parameters.EmulatorMsiUrl }}" + Write-Host "Target Dir: $targetDir" + msiexec /a ${{ parameters.EmulatorMsiUrl }} TARGETDIR=$targetDir /qn | wait-process + displayName: Download and Extract Public Cosmos DB Emulator + - powershell: | + Write-Host "Launching Cosmos DB Emulator" + Import-Module "$env:temp\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" + Start-CosmosDbEmulator -NoUI ${{ parameters.StartParameters }} + displayName: Start Cosmos DB Emulator \ No newline at end of file diff --git a/eng/pipelines/templates/steps/stage-artifacts.yml b/eng/pipelines/templates/steps/stage-artifacts.yml index 61929573655f..103544b09ddf 100644 --- a/eng/pipelines/templates/steps/stage-artifacts.yml +++ b/eng/pipelines/templates/steps/stage-artifacts.yml @@ -2,9 +2,14 @@ parameters: SourceFolder: '' # ArtifactName (aka "packages") TargetFolder: '' # artifact.safename (azuretemplate) PackageName: '' # artifact.name (azure-template) - + steps: - pwsh: | New-Item -Force -Type Directory -Name ${{parameters.TargetFolder}} -Path $(Pipeline.Workspace) - Copy-Item $(Pipeline.Workspace)/${{parameters.SourceFolder}}/${{parameters.PackageName}}-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{parameters.TargetFolder}} - displayName: Stage artifacts \ No newline at end of file + $items = Get-ChildItem -Recurse -Path $(Pipeline.Workspace)/${{parameters.SourceFolder}} + Write-Host "Found $($items.Count) total items in source folder" + $filteredItems = $items | Where-Object -FilterScript { $_.Name -like "${{parameters.PackageName}}-[0-9]*.[0-9]*.[0-9]*" } + Write-Host "Found $($filteredItems.Count) items which match filter criteria" + $filteredItems | Copy-Item -Destination $(Pipeline.Workspace)/${{parameters.TargetFolder}} + Get-ChildItem $(Pipeline.Workspace)/${{parameters.TargetFolder}} + displayName: Stage artifacts diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index 611421186b18..b8af26ebb576 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -1,12 +1,11 @@ variables: - DocWardenVersion: '0.5.0' + DocWardenVersion: '0.7.1' WagonOptions: '-Dmaven.wagon.rto=300000 -Dmaven.wagon.http.retryHandler.count=3' DefaultOptions: '--batch-mode --fail-at-end --settings eng/settings.xml $(WagonOptions)' LoggingOptions: '-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' MemoryOptions: '-Xmx3072m' #Agent.Source.Git.ShallowFetchDepth: 1 skipComponentGovernanceDetection: true - EmulatorMsiUrl: 'https://aka.ms/cosmosdb-emulator' AdditionalOptions: '' # format !:, !:,... no trailing comma is necessary PLSkipOptions: '' diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index a5c246e6e503..78b1791f1b19 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -25,8 +25,8 @@ com.microsoft.azure:azure-servicebus-jms;0.0.2 com.microsoft.azure:qpid-proton-j-extensions;1.2.3 com.microsoft.rest:client-runtime;1.7.4 com.microsoft.rest.v2:client-runtime;2.1.1 -com.microsoft.spring.data.gremlin:spring-data-gremlin;2.2.3 com.microsoft.azure:spring-data-cosmosdb;2.3.0 +com.microsoft.spring.data.gremlin:spring-data-gremlin;2.3.0 com.squareup.okhttp3:okhttp;4.2.2 commons-codec:commons-codec;1.13 io.micrometer:micrometer-core;1.2.0 @@ -52,11 +52,13 @@ net.minidev:json-smart;2.3 org.apache.ant:ant;1.9.4 org.apache.avro:avro;1.9.2 org.apache.avro:avro-maven-plugin;1.9.2 +org.apache.commons:commons-lang3;3.8.1 org.apache.httpcomponents:httpclient;4.3.6 org.apache.logging.log4j:log4j-api;2.11.1 org.apache.logging.log4j:log4j-core;2.11.1 org.apache.logging.log4j:log4j-slf4j-impl;2.13.0 org.apache.qpid:proton-j;0.33.4 +org.apache.tinkerpop:gremlin-driver;3.2.4 org.asynchttpclient:async-http-client;2.10.5 org.codehaus.groovy:groovy-eclipse-batch;2.5.8-01 org.codehaus.groovy:groovy-eclipse-compiler;3.4.0-01 @@ -82,19 +84,20 @@ org.springframework.boot:spring-boot-starter-web;2.3.0.RELEASE org.springframework.boot:spring-boot-starter;2.3.0.RELEASE org.springframework.boot:spring-boot;2.3.0.RELEASE org.springframework.boot:spring-boot-starter-parent;2.3.0.RELEASE +org.springframework.data:spring-data-commons;2.3.0.RELEASE org.springframework.security:spring-security-config;5.3.2.RELEASE org.springframework.security:spring-security-core;5.3.2.RELEASE org.springframework.security:spring-security-web;5.3.2.RELEASE org.springframework.security:spring-security-oauth2-client;5.3.2.RELEASE org.springframework.security:spring-security-oauth2-core;5.3.2.RELEASE org.springframework.security:spring-security-oauth2-jose;5.3.2.RELEASE -org.springframework:spring-web;5.2.6.RELEASE -org.springframework:spring-jms;5.2.6.RELEASE -org.springframework.data:spring-data-commons;2.3.0.RELEASE org.springframework:spring-beans;5.2.6.RELEASE +org.springframework:spring-context;5.2.6.RELEASE org.springframework:spring-core;5.2.6.RELEASE org.springframework:spring-expression;5.2.6.RELEASE +org.springframework:spring-jms;5.2.6.RELEASE org.springframework:spring-tx;5.2.6.RELEASE +org.springframework:spring-web;5.2.6.RELEASE pl.pragmatists:JUnitParams;1.1.1 ## Test dependency versions @@ -112,8 +115,8 @@ com.microsoft.azure:azure-mgmt-resources;1.3.0 com.microsoft.azure:azure-mgmt-search;1.24.1 com.microsoft.azure:azure-mgmt-storage;1.3.0 com.microsoft.azure:azure-storage;8.0.0 -com.microsoft.azure:msal4j;1.3.0 -com.microsoft.azure:msal4j-persistence-extension;0.1 +com.microsoft.azure:msal4j;1.6.1 +com.microsoft.azure:msal4j-persistence-extension;0.2.0 com.sun.activation:jakarta.activation;1.2.1 io.opentelemetry:opentelemetry-api;0.2.4 io.opentelemetry:opentelemetry-sdk;0.2.4 @@ -152,7 +155,6 @@ org.junit.platform:junit-platform-testkit;1.6.2 org.junit.vintage:junit-vintage-engine;5.6.2 org.openjdk.jmh:jmh-core;1.22 org.openjdk.jmh:jmh-generator-annprocess;1.22 -org.springframework:spring-context;5.2.6.RELEASE org.spockframework:spock-core;1.3-groovy-2.5 org.testng:testng;6.14.3 uk.org.lidalia:slf4j-test;1.2.0 @@ -174,7 +176,6 @@ net.java.dev.jna:jna-platform;5.4.0 net.jonathangiles.tools:dependencyChecker-maven-plugin;1.0.4 net.jonathangiles.tools:whitelistgenerator-maven-plugin;1.0.1 org.apache.commons:commons-collections4;4.2 -org.apache.commons:commons-lang3;3.8.1 org.apache.commons:commons-text;1.6 org.apache.maven.plugins:maven-antrun-plugin;1.8 org.apache.maven.plugins:maven-assembly-plugin;3.2.0 diff --git a/eng/versioning/pom_file_version_scanner.ps1 b/eng/versioning/pom_file_version_scanner.ps1 index abd51df74541..5586664d8d58 100644 --- a/eng/versioning/pom_file_version_scanner.ps1 +++ b/eng/versioning/pom_file_version_scanner.ps1 @@ -32,6 +32,13 @@ # Since we're skipping Management for the moment, only look for files with certain parents. These # limitations will vanish once Management track is updated. $ValidParents = ("azure-sdk-parent", "azure-client-sdk-parent", "azure-data-sdk-parent", "azure-cosmos-parent") + +# SpringSampleParents is necessary for the spring samples which have to build using the spring-boot-starter-parent BOM. +# The problem with this is, it's a BOM file and the spring dependencies are pulled in through that which means any +# dependencies may or may not have versions. Unfortunately, there are still version tags azure sdk client libraries +# which means these files have to be "sort of" scanned. +$SpringSampleParents = ("spring-boot-starter-parent") + $Path = Resolve-Path ($PSScriptRoot + "/../../") # Not all POM files have a parent entry @@ -248,6 +255,107 @@ function Confirm-Node-Is-Part-Of-Configuration { return $false } +# Spring samples will pull in most dependencies through use of the spring bom. Any dependency that is an +# an azure sdk client dependency needs to be verified and must have a groupId, artifactId, version and version tag. +# Similarly, any dependency with a version needs to have a version tag. Dependencies without a version tag are +# ignored as those are assumed to be coming from the BOM. +function Assert-Spring-Sample-Version-Tags { + param( + [hashtable]$libHash, + [hashtable]$extDepHash, + [xml]$xmlPomFile + ) + Write-Host "processing Spring Sample pomFile=$($pomFile)" + $xmlNsManagerSpring = New-Object -TypeName "Xml.XmlNamespaceManager" -ArgumentList $xmlPomFile.NameTable + $xmlNsManagerSpring.AddNamespace("ns", $xmlPomFile.DocumentElement.NamespaceURI) + + if (-not $xmlPomFile.project.parent.groupId) + { + $script:FoundError = $true + Write-Error-With-Color "Error: parent/groupId is missing." + } + + $versionNode = $xmlPomFile.SelectSingleNode("/ns:project/ns:parent/ns:version", $xmlNsManagerSpring) + if (-not $versionNode) + { + $script:FoundError = $true + Write-Error-With-Color "Error: parent/version is missing." + Write-Error-With-ColorWrite-Error-With-Color "Error: Missing project/version update tag. The tag should be " + } else { + $retVal = Test-Dependency-Tag-And-Version $libHash $extDepHash $versionNode.InnerText.Trim() $versionNode.NextSibling.Value + if ($retVal) + { + $script:FoundError = $true + Write-Error-With-Color "$($retVal)" + } + } + + # Loop through the dependencies. If any dependency is in the libHash (aka, the libraries we build) + # then it needs to have a version element and update tag. + foreach($dependencyNode in $xmlPomFile.GetElementsByTagName("dependency")) + { + $artifactId = $dependencyNode.artifactId + $groupId = $dependencyNode.groupId + # If the artifactId and groupId are both empty then check to see if this + # is part of a configuration entry. If so then just continue. + if (!$artifactId -and !$groupId) + { + $isPartOfConfig = Confirm-Node-Is-Part-Of-Configuration $dependencyNode + if (!$isPartOfConfig) + { + $script:FoundError = $true + # Because this particular case is harder to track down, print the OuterXML which is effectively the entire tag + Write-Error-With-Color "Error: dependency is missing version element and/or artifactId and groupId elements dependencyNode=$($dependencyNode.OuterXml)" + } + continue + } + $hashKey = "$($groupId):$($artifactId)" + $versionNode = $dependencyNode.GetElementsByTagName("version")[0] + # If this is something we build and release, it better have a version and a version tag + if ($libHash.ContainsKey($hashKey)) + { + if (-not $versionNode) + { + $script:FoundError = $true + Write-Error-With-Color "Error: dependency is missing version element and tag groupId=$($groupId), artifactId=$($artifactId) should be " + } else { + # verify the version tag and version are correct + if ($versionNode.NextSibling -and $versionNode.NextSibling.NodeType -eq "Comment") + { + $retVal = Test-Dependency-Tag-And-Version $libHash $extDepHash $versionNode.InnerText.Trim() $versionNode.NextSibling.Value + if ($retVal) + { + $script:FoundError = $true + Write-Error-With-Color "$($retVal)" + } + } else { + $script:FoundError = $true + Write-Error-With-Color "Error: dependency is missing version tag groupId=$($groupId), artifactId=$($artifactId) tag should be " + } + } + } else { + # else, if there's a version tag verify it, otherwise just skip it since the version should be coming + # from the bom + if ($versionNode) + { + if ($versionNode.NextSibling -and $versionNode.NextSibling.NodeType -eq "Comment") + { + $retVal = Test-Dependency-Tag-And-Version $libHash $extDepHash $versionNode.InnerText.Trim() $versionNode.NextSibling.Value + if ($retVal) + { + $script:FoundError = $true + Write-Error-With-Color "$($retVal)" + } + # If there's no version tag then error, if there's a version then it must be tagged + } else { + $script:FoundError = $true + Write-Error-With-Color "Error: dependency is missing version tag groupId=$($groupId), artifactId=$($artifactId) tag should be " + } + } + } + } +} + # Create one dependency hashtable for libraries we build (the groupIds will make the entries unique) and # one hash for external dependencies $libHash = @{} @@ -279,6 +387,10 @@ Get-ChildItem -Path $Path -Filter pom*.xml -Recurse -File | ForEach-Object { $xmlPomFile.Load($pomFile) if ($ValidParents -notcontains $xmlPomFile.project.parent.artifactId) { + if ($SpringSampleParents -contains $xmlPomFile.project.parent.artifactId) + { + Assert-Spring-Sample-Version-Tags $libHash $extDepHash $xmlPomFile + } # This may look odd but ForEach-Object is a cmdlet which means that "continue" # exits the loop altogether and "return" behaves like continue for a particular # loop @@ -613,4 +725,3 @@ if ($script:FoundError) Write-Error-With-Color "This script can be run locally from the root of the repo. .\eng\versioning\pom_file_version_scanner.ps1" exit(1) } - diff --git a/eng/versioning/set_versions.py b/eng/versioning/set_versions.py index bc16045bd0a5..98101336fcd4 100644 --- a/eng/versioning/set_versions.py +++ b/eng/versioning/set_versions.py @@ -21,13 +21,13 @@ # Use case: increment the version of a given artifact in the approprate version_[client|data|management].txt file # # python eng/versioning/set_versions.py --bt [client|data|management] --increment-version --artifact-id -# For example: To update increment the version of azure-core +# For example: To increment the version of azure-core # python eng/versioning/set_versions.py --bt client --iv --ar azure-core # # Use case: verify the version of a given artifact in the approprate version_[client|data|management].txt file # # python eng/versioning/set_versions.py --bt [client|data|management] --verify-version --artifact-id -# For example: To update increment the version of azure-core +# For example: To verify the version of azure-core # python eng/versioning/set_versions.py --bt client --vv --ar azure-core # # The script must be run at the root of azure-sdk-for-java. @@ -210,6 +210,9 @@ def prep_version_file_for_source_testing(build_type): print('version_file=' + version_file) file_changed = False + # The version map is needed to get the 'current' version of any beta dependencies + # in order to update the beta_ version in the From Source runs + version_map = {} newlines = [] with open(version_file, encoding='utf-8') as f: for raw_line in f: @@ -221,6 +224,21 @@ def prep_version_file_for_source_testing(build_type): if hasattr(module, 'current') and not module.current == module.dependency: module.dependency = module.current file_changed = True + # In order to ensure that the From Source runs are effectively testing everything + # together using the latest source built libraries, ensure that the beta_ dependency's + # version is set + elif module.name.startswith('beta_'): + tempName = module.name[len('beta_'):] + if tempName in version_map: + # beta_ tags only have a dependency version, set that to + # the current version of the non-beta dependency + module.dependency = version_map[tempName].current + file_changed = True + else: + # if the beta_ dependency doesn't have a non-beta entry in the version file then this is an error + raise ValueError('prep_version_file_for_source_testing: beta library ({}) does not have a non-beta entry {} in version file {}'.format(module.name, tempName, version_file)) + + version_map[module.name] = module newlines.append(module.string_for_version_file()) with open(version_file, 'w', encoding='utf-8') as f: @@ -280,8 +298,21 @@ def increment_library_version(build_type, artifact_id, group_id): # The dependency version only needs to be updated it if is different from the current version. # This would be the case where a library hasn't been released yet and has been released (either GA or preview) if (module.dependency != module.current): - print('library_to_update {}, previous dependency version={}, new dependency version={}'.format(library_to_update, module.dependency, module.current)) - module.dependency = module.current + vDepMatch = version_regex_named.match(module.dependency) + # If the dependency version is a beta then just set it to whatever the current + # version is + if (vDepMatch.group('prerelease') is not None): + print('library_to_update {}, previous dependency version={}, new dependency version={}'.format(library_to_update, module.dependency, module.current)) + module.dependency = module.current + # else, the dependency version isn't a pre-release version + else: + # if the dependency version isn't a beta and the current version is, don't + # update the dependency version + if (vmatch.group('prerelease') is not None): + print('library_to_update {}, has a GA dependency version {} and a beta current version {}. The dependency version will be kept at the GA version. '.format(library_to_update, module.dependency, module.current)) + else: + print('library_to_update {}, has both GA dependency {} and current {} versions. The dependency will be updated to {}. '.format(library_to_update, module.dependency, module.current, module.current)) + module.dependency = module.current print('library_to_update {}, previous current version={}, new current version={}'.format(library_to_update, module.current, new_version)) module.current = new_version newlines.append(module.string_for_version_file()) diff --git a/eng/versioning/update_versions.py b/eng/versioning/update_versions.py index 151428404427..4366dbf3fdd9 100644 --- a/eng/versioning/update_versions.py +++ b/eng/versioning/update_versions.py @@ -185,8 +185,20 @@ def load_version_map_from_file(the_file, version_map): if not stripped_line or stripped_line.startswith('#'): continue module = CodeModule(stripped_line) + # verify no duplicate entries if (module.name in version_map): raise ValueError('Version file: {0} contains a duplicate entry: {1}'.format(the_file, module.name)) + # verify that if the module is beta_ or unreleased_ that there's a matching non-beta_ or non-unreleased_ entry + if (module.name.startswith('beta_') or module.name.startswith('unreleased_')): + tempName = module.name + if tempName.startswith('beta_'): + tempName = module.name[len('beta_'):] + else: + tempName = module.name[len('unreleased_'):] + # if there isn't a non beta or unreleased entry then raise an issue + if tempName not in version_map: + raise ValueError('Version file: {0} does not contain a non-beta or non-unreleased entry for beta_/unreleased_ library: {1}'.format(the_file, module.name)) + version_map[module.name] = module def display_version_info(version_map): diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 13c31e20514b..e3439630151f 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -6,42 +6,43 @@ com.azure:azure-sdk-parent;1.6.0;1.6.0 com.azure:azure-client-sdk-parent;1.7.0;1.7.0 com.azure:azure-ai-formrecognizer;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-ai-textanalytics;1.0.1;1.1.0-beta.1 -com.azure:azure-core;1.7.0-beta.1;1.7.0-beta.2 +com.azure:azure-core;1.6.0;1.7.0-beta.2 com.azure:azure-core-amqp;1.3.0;1.4.0-beta.1 com.azure:azure-core-experimental;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-core-http-netty;1.5.3;1.6.0-beta.1 com.azure:azure-core-http-okhttp;1.2.4;1.3.0-beta.1 com.azure:azure-core-management;1.0.0-beta.2;1.0.0-beta.3 -com.azure:azure-core-serializer-avro-apache;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-core-serializer-avro-jackson;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-core-serializer-json-gson;1.0.0-beta.1;1.0.0-beta.2 -com.azure:azure-core-serializer-json-jackson;1.0.0-beta.1;1.0.0-beta.2 +com.azure:azure-core-serializer-avro-apache;1.0.0-beta.1;1.0.0-beta.2 +com.azure:azure-core-serializer-avro-jackson;1.0.0-beta.1;1.0.0-beta.2 +com.azure:azure-core-serializer-json-gson;1.0.0-beta.2;1.0.0-beta.3 +com.azure:azure-core-serializer-json-jackson;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-core-test;1.3.1;1.4.0-beta.1 com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.5;1.0.0-beta.6 -com.azure:azure-cosmos;4.1.0;4.2.0-beta.1 +com.azure:azure-cosmos;4.2.0;4.3.0-beta.1 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 +com.azure:azure-cosmos-encryption;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-appconfiguration;1.1.3;1.2.0-beta.1 com.azure:azure-data-schemaregistry;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-data-schemaregistry-avro;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-data-tables;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-identity;1.1.0-beta.6;1.1.0-beta.7 +com.azure:azure-identity;1.0.9;1.1.0-beta.7 com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-messaging-eventhubs;5.1.2;5.2.0-beta.1 com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.1.2;1.2.0-beta.1 com.azure:azure-messaging-servicebus;7.0.0-beta.3;7.0.0-beta.4 -com.azure:azure-search-documents;1.0.0-beta.4;11.0.0 -com.azure:azure-security-keyvault-certificates;4.0.4;4.1.0-beta.4 -com.azure:azure-security-keyvault-keys;4.1.4;4.2.0-beta.5 -com.azure:azure-security-keyvault-secrets;4.1.4;4.2.0-beta.4 -com.azure:azure-sdk-template;1.0.4-beta.19;1.0.4-beta.20 +com.azure:azure-search-documents;11.0.0;11.1.0-beta.1 +com.azure:azure-security-keyvault-certificates;4.0.4;4.1.0-beta.5 +com.azure:azure-security-keyvault-keys;4.1.4;4.2.0-beta.6 +com.azure:azure-security-keyvault-secrets;4.1.4;4.2.0-beta.5 +com.azure:azure-sdk-template;1.0.5;1.1.0-beta.1 com.azure:azure-spring-data-cosmos;3.0.0-beta.1;3.0.0-beta.1 com.azure:azure-storage-blob;12.8.0-beta.1;12.8.0-beta.2 com.azure:azure-storage-blob-batch;12.6.0-beta.1;12.6.0-beta.2 com.azure:azure-storage-blob-changefeed;12.0.0-beta.1;12.0.0-beta.2 com.azure:azure-storage-blob-cryptography;12.8.0-beta.1;12.8.0-beta.2 -com.azure:azure-storage-blob-nio;12.0.0-beta.1;12.0.0-beta.1 +com.azure:azure-storage-blob-nio;12.0.0-beta.1;12.0.0-beta.2 com.azure:azure-storage-common;12.8.0-beta.1;12.8.0-beta.2 com.azure:azure-storage-file-share;12.6.0-beta.1;12.6.0-beta.2 com.azure:azure-storage-file-datalake;12.2.0-beta.1;12.2.0-beta.2 @@ -49,11 +50,11 @@ com.azure:azure-storage-internal-avro;12.0.0-beta.1;12.0.0-beta.2 com.azure:azure-storage-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-storage-queue;12.6.0-beta.1;12.6.0-beta.2 com.azure:perf-test-core;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-test-watcher;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-spring-boot-test-aad;1.0.0;1.0.0 com.azure:azure-spring-boot-test-core;1.0.0;1.0.0 com.azure:azure-spring-boot-test-cosmosdb;1.0.0;1.0.0 com.azure:azure-spring-boot-test-keyvault;1.0.0;1.0.0 +com.azure:azure-spring-data-gremlin;2.3.1-beta.1;2.3.1-beta.1 com.microsoft.azure:azure-spring-boot;2.3.2;2.3.3-beta.1 com.microsoft.azure:azure-spring-boot-starter;2.3.2;2.3.3-beta.1 com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.2;2.3.3-beta.1 @@ -63,14 +64,15 @@ com.microsoft.azure:azure-data-gremlin-spring-boot-starter;2.3.2;2.3.3-beta.1 com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter;2.3.2;2.3.3-beta.1 com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.3.2;2.3.3-beta.1 com.microsoft.azure:azure-spring-boot-metrics-starter;2.3.2;2.3.3-beta.1 -com.microsoft.azure:spring-data-cosmosdb;3.0.0-beta.1;3.0.0-beta.1 # Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current # version. Unreleased dependencies are only valid for dependency versions. # Format; # unreleased_:;dependency-version # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. +unreleased_com.azure:azure-core-test;1.4.0-beta.1 unreleased_com.azure:azure-messaging-servicebus;7.0.0-beta.4 +unreleased_com.azure:azure-security-keyvault-keys;4.2.0-beta.6 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/pom.xml b/pom.xml index 807e0f82055c..677664e21ce6 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,6 @@ pom 1.0.0 - common/azure-test-watcher common/perf-test-core eng/jacoco-test-coverage eng/code-quality-reports diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 07996cee3cbe..a9546ce50572 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml @@ -90,7 +90,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/appplatform/mgmt/pom.xml b/sdk/appplatform/mgmt/pom.xml index 6b323b92c0cf..ee5e35f90eea 100644 --- a/sdk/appplatform/mgmt/pom.xml +++ b/sdk/appplatform/mgmt/pom.xml @@ -81,6 +81,30 @@ azure-identity test + + com.azure + azure-security-keyvault-certificates + 4.0.4 + test + + + com.azure.resourcemanager + azure-resourcemanager-keyvault + 2.0.0-SNAPSHOT + test + + + com.azure.resourcemanager + azure-resourcemanager-dns + 2.0.0-SNAPSHOT + test + + + com.azure.resourcemanager + azure-resourcemanager-appservice + 2.0.0-SNAPSHOT + test + diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/CustomDomainsClient.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/CustomDomainsClient.java index bf62bebbb1a7..e48fbb512d92 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/CustomDomainsClient.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/CustomDomainsClient.java @@ -33,9 +33,9 @@ import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceCollectionInner; import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceInner; -import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainValidateResultInner; import com.azure.resourcemanager.appplatform.models.CustomDomainProperties; import com.azure.resourcemanager.appplatform.models.CustomDomainValidatePayload; +import com.azure.resourcemanager.appplatform.models.CustomDomainValidateResult; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in CustomDomains. */ @@ -153,7 +153,7 @@ Mono> list( + "/{serviceName}/apps/{appName}/domains/validate") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validate( + Mono> validate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -1273,7 +1273,7 @@ public PagedIterable list( * @return validation result for custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> validateWithResponseAsync( + public Mono> validateWithResponseAsync( String resourceGroupName, String serviceName, String appName, String name) { if (this.client.getEndpoint() == null) { return Mono @@ -1333,7 +1333,7 @@ public Mono> validateWithResponseAsync * @return validation result for custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> validateWithResponseAsync( + public Mono> validateWithResponseAsync( String resourceGroupName, String serviceName, String appName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1388,11 +1388,11 @@ public Mono> validateWithResponseAsync * @return validation result for custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono validateAsync( + public Mono validateAsync( String resourceGroupName, String serviceName, String appName, String name) { return validateWithResponseAsync(resourceGroupName, serviceName, appName, name) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -1416,11 +1416,11 @@ public Mono validateAsync( * @return validation result for custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono validateAsync( + public Mono validateAsync( String resourceGroupName, String serviceName, String appName, String name, Context context) { return validateWithResponseAsync(resourceGroupName, serviceName, appName, name, context) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -1443,7 +1443,7 @@ public Mono validateAsync( * @return validation result for custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomDomainValidateResultInner validate( + public CustomDomainValidateResult validate( String resourceGroupName, String serviceName, String appName, String name) { return validateAsync(resourceGroupName, serviceName, appName, name).block(); } @@ -1463,7 +1463,7 @@ public CustomDomainValidateResultInner validate( * @return validation result for custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomDomainValidateResultInner validate( + public CustomDomainValidateResult validate( String resourceGroupName, String serviceName, String appName, String name, Context context) { return validateAsync(resourceGroupName, serviceName, appName, name, context).block(); } diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java index 9f9648f56e3f..95dcac0cfde6 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java @@ -34,9 +34,9 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appplatform.AppPlatformManagementClient; -import com.azure.resourcemanager.appplatform.fluent.inner.NameAvailabilityInner; import com.azure.resourcemanager.appplatform.fluent.inner.ServiceResourceInner; import com.azure.resourcemanager.appplatform.fluent.inner.ServiceResourceListInner; +import com.azure.resourcemanager.appplatform.models.NameAvailability; import com.azure.resourcemanager.appplatform.models.NameAvailabilityParameters; import com.azure.resourcemanager.appplatform.models.RegenerateTestKeyRequestPayload; import com.azure.resourcemanager.appplatform.models.TestKeyType; @@ -199,7 +199,7 @@ Mono> enableTestEndpoint( + "/checkNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( + Mono> checkNameAvailability( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -1856,7 +1856,7 @@ public TestKeys enableTestEndpoint(String resourceGroupName, String serviceName, * @return name availability result payload. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkNameAvailabilityWithResponseAsync( + public Mono> checkNameAvailabilityWithResponseAsync( String location, NameAvailabilityParameters availabilityParameters) { if (this.client.getEndpoint() == null) { return Mono @@ -1906,7 +1906,7 @@ public Mono> checkNameAvailabilityWithResponseAs * @return name availability result payload. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkNameAvailabilityWithResponseAsync( + public Mono> checkNameAvailabilityWithResponseAsync( String location, NameAvailabilityParameters availabilityParameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1951,11 +1951,11 @@ public Mono> checkNameAvailabilityWithResponseAs * @return name availability result payload. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkNameAvailabilityAsync( + public Mono checkNameAvailabilityAsync( String location, NameAvailabilityParameters availabilityParameters) { return checkNameAvailabilityWithResponseAsync(location, availabilityParameters) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -1976,11 +1976,11 @@ public Mono checkNameAvailabilityAsync( * @return name availability result payload. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkNameAvailabilityAsync( + public Mono checkNameAvailabilityAsync( String location, NameAvailabilityParameters availabilityParameters, Context context) { return checkNameAvailabilityWithResponseAsync(location, availabilityParameters, context) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -2000,8 +2000,7 @@ public Mono checkNameAvailabilityAsync( * @return name availability result payload. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityInner checkNameAvailability( - String location, NameAvailabilityParameters availabilityParameters) { + public NameAvailability checkNameAvailability(String location, NameAvailabilityParameters availabilityParameters) { return checkNameAvailabilityAsync(location, availabilityParameters).block(); } @@ -2017,7 +2016,7 @@ public NameAvailabilityInner checkNameAvailability( * @return name availability result payload. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityInner checkNameAvailability( + public NameAvailability checkNameAvailability( String location, NameAvailabilityParameters availabilityParameters, Context context) { return checkNameAvailabilityAsync(location, availabilityParameters, context).block(); } diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/inner/CustomDomainValidateResultInner.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/inner/CustomDomainValidateResultInner.java deleted file mode 100644 index 321c7b235452..000000000000 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/inner/CustomDomainValidateResultInner.java +++ /dev/null @@ -1,76 +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.resourcemanager.appplatform.fluent.inner; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The CustomDomainValidateResult model. */ -@Fluent -public final class CustomDomainValidateResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomDomainValidateResultInner.class); - - /* - * Indicates if domain name is valid. - */ - @JsonProperty(value = "isValid") - private Boolean isValid; - - /* - * Message of why domain name is invalid. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the isValid property: Indicates if domain name is valid. - * - * @return the isValid value. - */ - public Boolean isValid() { - return this.isValid; - } - - /** - * Set the isValid property: Indicates if domain name is valid. - * - * @param isValid the isValid value to set. - * @return the CustomDomainValidateResultInner object itself. - */ - public CustomDomainValidateResultInner withIsValid(Boolean isValid) { - this.isValid = isValid; - return this; - } - - /** - * Get the message property: Message of why domain name is invalid. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Message of why domain name is invalid. - * - * @param message the message value to set. - * @return the CustomDomainValidateResultInner object itself. - */ - public CustomDomainValidateResultInner withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/inner/NameAvailabilityInner.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/inner/NameAvailabilityInner.java deleted file mode 100644 index 72d4dd61764f..000000000000 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/fluent/inner/NameAvailabilityInner.java +++ /dev/null @@ -1,102 +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.resourcemanager.appplatform.fluent.inner; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The NameAvailability model. */ -@Fluent -public final class NameAvailabilityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityInner.class); - - /* - * Indicates whether the name is available - */ - @JsonProperty(value = "nameAvailable") - private Boolean nameAvailable; - - /* - * Reason why the name is not available - */ - @JsonProperty(value = "reason") - private String reason; - - /* - * Message why the name is not available - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the nameAvailable property: Indicates whether the name is available. - * - * @return the nameAvailable value. - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable property: Indicates whether the name is available. - * - * @param nameAvailable the nameAvailable value to set. - * @return the NameAvailabilityInner object itself. - */ - public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - - /** - * Get the reason property: Reason why the name is not available. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Set the reason property: Reason why the name is not available. - * - * @param reason the reason value to set. - * @return the NameAvailabilityInner object itself. - */ - public NameAvailabilityInner withReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Get the message property: Message why the name is not available. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Message why the name is not available. - * - * @param message the message value to set. - * @return the NameAvailabilityInner object itself. - */ - public NameAvailabilityInner withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentImpl.java index d985f51f1d5c..daa581e306cd 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentImpl.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDeploymentImpl.java @@ -99,6 +99,42 @@ public List instances() { return inner().properties().instances(); } + @Override + public void start() { + startAsync().block(); + } + + @Override + public Mono startAsync() { + return manager().inner().getDeployments().startAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() + ); + } + + @Override + public void stop() { + stopAsync().block(); + } + + @Override + public Mono stopAsync() { + return manager().inner().getDeployments().stopAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() + ); + } + + @Override + public void restart() { + restartAsync().block(); + } + + @Override + public Mono restartAsync() { + return manager().inner().getDeployments().restartAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() + ); + } + @Override public String getLogFileUrl() { return getLogFileUrlAsync().block(); diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainImpl.java new file mode 100644 index 000000000000..60deaa85e234 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.implementation; + +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceInner; +import com.azure.resourcemanager.appplatform.models.CustomDomainProperties; +import com.azure.resourcemanager.appplatform.models.SpringApp; +import com.azure.resourcemanager.appplatform.models.SpringAppDomain; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; +import reactor.core.publisher.Mono; + +public class SpringAppDomainImpl + extends ExternalChildResourceImpl + implements SpringAppDomain { + SpringAppDomainImpl(String name, SpringAppImpl parent, CustomDomainResourceInner innerObject) { + super(name, parent, innerObject); + } + + @Override + public Mono createResourceAsync() { + return manager().inner().getCustomDomains().createOrUpdateAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name(), properties() + ) + .map(inner -> { + setInner(inner); + return this; + }); + } + + @Override + public Mono updateResourceAsync() { + return createResourceAsync(); + } + + @Override + public Mono deleteResourceAsync() { + return manager().inner().getBindings().deleteAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() + ); + } + + @Override + protected Mono getInnerAsync() { + return manager().inner().getCustomDomains().getAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() + ); + } + + @Override + public String id() { + return inner().id(); + } + + @Override + public CustomDomainProperties properties() { + return inner().properties(); + } + + private AppPlatformManager manager() { + return parent().manager(); + } +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainsImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainsImpl.java new file mode 100644 index 000000000000..5b4f1a6b4939 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainsImpl.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.CustomDomainsClient; +import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceInner; +import com.azure.resourcemanager.appplatform.models.CustomDomainProperties; +import com.azure.resourcemanager.appplatform.models.CustomDomainValidateResult; +import com.azure.resourcemanager.appplatform.models.SpringApp; +import com.azure.resourcemanager.appplatform.models.SpringAppDomain; +import com.azure.resourcemanager.appplatform.models.SpringAppDomains; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ExternalChildResourcesNonCachedImpl; +import reactor.core.publisher.Mono; + +public class SpringAppDomainsImpl + extends ExternalChildResourcesNonCachedImpl< + SpringAppDomainImpl, SpringAppDomain, CustomDomainResourceInner, SpringAppImpl, SpringApp> + implements SpringAppDomains { + SpringAppDomainsImpl(SpringAppImpl parent) { + super(parent, parent.taskGroup(), "SpringAppDomain"); + } + + @Override + public SpringAppDomain getById(String id) { + return getByIdAsync(id).block(); + } + + @Override + public Mono getByIdAsync(String id) { + return getByNameAsync(ResourceUtils.nameFromResourceId(id)); + } + + @Override + public SpringAppDomain getByName(String name) { + return getByNameAsync(name).block(); + } + + @Override + public Mono getByNameAsync(String name) { + return inner().getAsync(parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name) + .map(this::wrapModel); + } + + SpringAppDomainImpl wrapModel(CustomDomainResourceInner inner) { + return inner == null ? null : new SpringAppDomainImpl(inner.name(), parent(), inner); + } + + @Override + public AppPlatformManager manager() { + return parent().manager(); + } + + @Override + public SpringAppImpl parent() { + return getParent(); + } + + @Override + public void deleteById(String id) { + deleteByIdAsync(id).block(); + } + + @Override + public Mono deleteByIdAsync(String id) { + return deleteByNameAsync(ResourceUtils.nameFromResourceId(id)); + } + + @Override + public void deleteByName(String name) { + deleteByNameAsync(name).block(); + } + + @Override + public Mono deleteByNameAsync(String name) { + return inner().deleteAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name); + } + + @Override + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + @Override + public PagedFlux listAsync() { + return inner().listAsync(parent().parent().resourceGroupName(), parent().parent().name(), parent().name()) + .mapPage(this::wrapModel); + } + + @Override + public CustomDomainsClient inner() { + return manager().inner().getCustomDomains(); + } + + @Override + public CustomDomainValidateResult validate(String domain) { + return validateAsync(domain).block(); + } + + @Override + public Mono validateAsync(String domain) { + return inner().validateAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), domain); + } + + Mono createOrUpdateAsync(String name, CustomDomainProperties properties) { + return inner().createOrUpdateAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name, properties + ).map(this::wrapModel); + } +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppImpl.java index 6d811a0eb8d4..f49c7a3c155e 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppImpl.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppImpl.java @@ -6,17 +6,22 @@ import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.inner.AppResourceInner; import com.azure.resourcemanager.appplatform.models.AppResourceProperties; +import com.azure.resourcemanager.appplatform.models.BindingResourceProperties; +import com.azure.resourcemanager.appplatform.models.CustomDomainProperties; import com.azure.resourcemanager.appplatform.models.ManagedIdentityProperties; import com.azure.resourcemanager.appplatform.models.PersistentDisk; import com.azure.resourcemanager.appplatform.models.ResourceUploadDefinition; import com.azure.resourcemanager.appplatform.models.SpringApp; import com.azure.resourcemanager.appplatform.models.SpringAppDeployment; import com.azure.resourcemanager.appplatform.models.SpringAppDeployments; +import com.azure.resourcemanager.appplatform.models.SpringAppDomains; +import com.azure.resourcemanager.appplatform.models.SpringAppServiceBindings; import com.azure.resourcemanager.appplatform.models.SpringService; import com.azure.resourcemanager.appplatform.models.TemporaryDisk; import com.azure.resourcemanager.appplatform.models.UserSourceType; import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Indexable; import reactor.core.publisher.Mono; import java.io.File; @@ -26,6 +31,9 @@ public class SpringAppImpl extends ExternalChildResourceImpl implements SpringApp, SpringApp.Definition, SpringApp.Update { private Creatable springAppDeploymentToCreate = null; + private final SpringAppDeploymentsImpl deployments = new SpringAppDeploymentsImpl(this); + private final SpringAppServiceBindingsImpl serviceBindings = new SpringAppServiceBindingsImpl(this); + private final SpringAppDomainsImpl domains = new SpringAppDomainsImpl(this); SpringAppImpl(String name, SpringServiceImpl parent, AppResourceInner innerObject) { super(name, parent, innerObject); @@ -55,6 +63,14 @@ public String url() { return inner().properties().url(); } + @Override + public String fqdn() { + if (inner().properties() == null) { + return null; + } + return inner().properties().fqdn(); + } + @Override public TemporaryDisk temporaryDisk() { if (inner().properties() == null) { @@ -94,7 +110,17 @@ public String activeDeployment() { @Override public SpringAppDeployments deployments() { - return new SpringAppDeploymentsImpl(this); + return deployments; + } + + @Override + public SpringAppServiceBindings serviceBindings() { + return serviceBindings; + } + + @Override + public SpringAppDomains customDomains() { + return domains; } @Override @@ -115,14 +141,14 @@ private void ensureProperty() { } @Override - public SpringAppImpl withPublicEndpoint() { + public SpringAppImpl withDefaultPublicEndpoint() { ensureProperty(); inner().properties().withPublicProperty(true); return this; } @Override - public SpringAppImpl withoutPublicEndpoint() { + public SpringAppImpl withoutDefaultPublicEndpoint() { ensureProperty(); inner().properties().withPublicProperty(false); return this; @@ -130,15 +156,27 @@ public SpringAppImpl withoutPublicEndpoint() { @Override public SpringAppImpl withCustomDomain(String domain) { - ensureProperty(); - inner().properties().withFqdn(domain); + this.addPostRunDependent( + context -> domains.createOrUpdateAsync(domain, new CustomDomainProperties()) + .cast(Indexable.class) + ); return this; } @Override - public SpringAppImpl withoutCustomDomain() { - ensureProperty(); - inner().properties().withFqdn(null); + public SpringAppImpl withCustomDomain(String domain, String certThumbprint) { + this.addPostRunDependent( + context -> domains.createOrUpdateAsync(domain, new CustomDomainProperties().withThumbprint(certThumbprint)) + .cast(Indexable.class) + ); + return this; + } + + @Override + public Update withoutCustomDomain(String domain) { + this.addPostRunDependent( + context -> domains.deleteByNameAsync(domain).then(context.voidMono()) + ); return this; } @@ -279,4 +317,20 @@ public SpringAppImpl update() { public AppPlatformManager manager() { return parent().manager(); } + + @Override + public SpringAppImpl withServiceBinding(String name, BindingResourceProperties bindingProperties) { + this.addPostRunDependent( + context -> serviceBindings.createOrUpdateAsync(name, bindingProperties).cast(Indexable.class) + ); + return this; + } + + @Override + public SpringAppImpl withoutServiceBinding(String name) { + this.addPostRunDependent( + context -> serviceBindings.deleteByNameAsync(name).then(context.voidMono()) + ); + return this; + } } diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppServiceBindingImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppServiceBindingImpl.java new file mode 100644 index 000000000000..3399f6f95cb6 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppServiceBindingImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.implementation; + +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.inner.BindingResourceInner; +import com.azure.resourcemanager.appplatform.models.BindingResourceProperties; +import com.azure.resourcemanager.appplatform.models.SpringApp; +import com.azure.resourcemanager.appplatform.models.SpringAppServiceBinding; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; +import reactor.core.publisher.Mono; + +public class SpringAppServiceBindingImpl + extends ExternalChildResourceImpl + implements SpringAppServiceBinding { + SpringAppServiceBindingImpl(String name, SpringAppImpl parent, BindingResourceInner innerObject) { + super(name, parent, innerObject); + } + + @Override + public Mono createResourceAsync() { + return manager().inner().getBindings().createOrUpdateAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name(), properties() + ) + .map(inner -> { + setInner(inner); + return this; + }); + } + + @Override + public Mono updateResourceAsync() { + return createResourceAsync(); + } + + @Override + public Mono deleteResourceAsync() { + return manager().inner().getBindings().deleteAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() + ); + } + + @Override + protected Mono getInnerAsync() { + return manager().inner().getBindings().getAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() + ); + } + + @Override + public String id() { + return inner().id(); + } + + @Override + public BindingResourceProperties properties() { + return inner().properties(); + } + + private AppPlatformManager manager() { + return parent().manager(); + } +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppServiceBindingsImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppServiceBindingsImpl.java new file mode 100644 index 000000000000..07326ae08fa0 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppServiceBindingsImpl.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.BindingsClient; +import com.azure.resourcemanager.appplatform.fluent.inner.BindingResourceInner; +import com.azure.resourcemanager.appplatform.models.BindingResourceProperties; +import com.azure.resourcemanager.appplatform.models.SpringApp; +import com.azure.resourcemanager.appplatform.models.SpringAppServiceBinding; +import com.azure.resourcemanager.appplatform.models.SpringAppServiceBindings; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ExternalChildResourcesNonCachedImpl; +import reactor.core.publisher.Mono; + +public class SpringAppServiceBindingsImpl + extends ExternalChildResourcesNonCachedImpl< + SpringAppServiceBindingImpl, SpringAppServiceBinding, BindingResourceInner, SpringAppImpl, SpringApp> + implements SpringAppServiceBindings { + SpringAppServiceBindingsImpl(SpringAppImpl parent) { + super(parent, parent.taskGroup(), "SpringAppServiceBinding"); + } + + @Override + public SpringAppServiceBinding getById(String id) { + return getByIdAsync(id).block(); + } + + @Override + public Mono getByIdAsync(String id) { + return getByNameAsync(ResourceUtils.nameFromResourceId(id)); + } + + @Override + public SpringAppServiceBinding getByName(String name) { + return getByNameAsync(name).block(); + } + + @Override + public Mono getByNameAsync(String name) { + return inner().getAsync(parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name) + .map(this::wrapModel); + } + + SpringAppServiceBindingImpl wrapModel(BindingResourceInner inner) { + return inner == null ? null : new SpringAppServiceBindingImpl(inner.name(), parent(), inner); + } + + @Override + public AppPlatformManager manager() { + return parent().manager(); + } + + @Override + public SpringAppImpl parent() { + return getParent(); + } + + @Override + public void deleteById(String id) { + deleteByIdAsync(id).block(); + } + + @Override + public Mono deleteByIdAsync(String id) { + return deleteByNameAsync(ResourceUtils.nameFromResourceId(id)); + } + + @Override + public void deleteByName(String name) { + deleteByNameAsync(name).block(); + } + + @Override + public Mono deleteByNameAsync(String name) { + return inner().deleteAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name); + } + + @Override + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + @Override + public PagedFlux listAsync() { + return inner().listAsync(parent().parent().resourceGroupName(), parent().parent().name(), parent().name()) + .mapPage(this::wrapModel); + } + + @Override + public BindingsClient inner() { + return manager().inner().getBindings(); + } + + Mono createOrUpdateAsync(String name, BindingResourceProperties properties) { + return inner().createOrUpdateAsync( + parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name, properties + ).map(this::wrapModel); + } +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificateImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificateImpl.java new file mode 100644 index 000000000000..d517c28cc2c3 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificateImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.implementation; + +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.inner.CertificateResourceInner; +import com.azure.resourcemanager.appplatform.models.CertificateProperties; +import com.azure.resourcemanager.appplatform.models.SpringService; +import com.azure.resourcemanager.appplatform.models.SpringServiceCertificate; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; +import reactor.core.publisher.Mono; + +public class SpringServiceCertificateImpl + extends ExternalChildResourceImpl< + SpringServiceCertificate, CertificateResourceInner, SpringServiceImpl, SpringService> + implements SpringServiceCertificate { + SpringServiceCertificateImpl(String name, SpringServiceImpl parent, + CertificateResourceInner innerObject) { + super(name, parent, innerObject); + } + + @Override + public Mono createResourceAsync() { + return manager().inner().getCertificates().createOrUpdateAsync( + parent().resourceGroupName(), parent().name(), name(), inner().properties()) + .map(inner -> { + setInner(inner); + return this; + }); + } + + @Override + public Mono updateResourceAsync() { + return createResourceAsync(); + } + + @Override + public Mono deleteResourceAsync() { + return manager().inner().getCertificates().deleteAsync(parent().resourceGroupName(), parent().name(), name()); + } + + @Override + protected Mono getInnerAsync() { + return manager().inner().getCertificates().getAsync(parent().resourceGroupName(), parent().name(), name()); + } + + @Override + public CertificateProperties properties() { + return inner().properties(); + } + + @Override + public String id() { + return inner().id(); + } + + public AppPlatformManager manager() { + return parent().manager(); + } +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificatesImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificatesImpl.java new file mode 100644 index 000000000000..a9bc99498871 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceCertificatesImpl.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.CertificatesClient; +import com.azure.resourcemanager.appplatform.fluent.inner.CertificateResourceInner; +import com.azure.resourcemanager.appplatform.models.CertificateProperties; +import com.azure.resourcemanager.appplatform.models.SpringService; +import com.azure.resourcemanager.appplatform.models.SpringServiceCertificate; +import com.azure.resourcemanager.appplatform.models.SpringServiceCertificates; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ExternalChildResourcesNonCachedImpl; +import reactor.core.publisher.Mono; + +public class SpringServiceCertificatesImpl + extends ExternalChildResourcesNonCachedImpl< + SpringServiceCertificateImpl, SpringServiceCertificate, CertificateResourceInner, SpringServiceImpl, SpringService> + implements SpringServiceCertificates { + SpringServiceCertificatesImpl(SpringServiceImpl parent) { + super(parent, parent.taskGroup(), "SpringServiceCertificate"); + } + + @Override + public SpringServiceCertificate getById(String id) { + return getByIdAsync(id).block(); + } + + @Override + public Mono getByIdAsync(String id) { + return getByNameAsync(ResourceUtils.nameFromResourceId(id)); + } + + @Override + public SpringServiceCertificate getByName(String name) { + return getByNameAsync(name).block(); + } + + @Override + public Mono getByNameAsync(String name) { + return inner().getAsync(parent().resourceGroupName(), parent().name(), name) + .map(this::wrapModel); + } + + SpringServiceCertificateImpl wrapModel(CertificateResourceInner inner) { + return inner == null ? null : new SpringServiceCertificateImpl(inner.name(), parent(), inner); + } + + @Override + public AppPlatformManager manager() { + return parent().manager(); + } + + @Override + public SpringServiceImpl parent() { + return getParent(); + } + + @Override + public void deleteById(String id) { + deleteByIdAsync(id).block(); + } + + @Override + public Mono deleteByIdAsync(String id) { + return deleteByNameAsync(ResourceUtils.nameFromResourceId(id)); + } + + @Override + public void deleteByName(String name) { + deleteByNameAsync(name).block(); + } + + @Override + public Mono deleteByNameAsync(String name) { + return inner().deleteAsync(parent().resourceGroupName(), parent().name(), name); + } + + @Override + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + @Override + public PagedFlux listAsync() { + return inner().listAsync(parent().resourceGroupName(), parent().name()).mapPage(this::wrapModel); + } + + @Override + public CertificatesClient inner() { + return manager().inner().getCertificates(); + } + + Mono createOrUpdateAsync(String name, CertificateProperties properties) { + return inner().createOrUpdateAsync( + parent().resourceGroupName(), parent().name(), name, properties + ).map(this::wrapModel); + } +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceImpl.java index 5ac8e890fab1..0ab6f0dbc90e 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceImpl.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServiceImpl.java @@ -5,6 +5,7 @@ import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.inner.ServiceResourceInner; +import com.azure.resourcemanager.appplatform.models.CertificateProperties; import com.azure.resourcemanager.appplatform.models.ClusterResourceProperties; import com.azure.resourcemanager.appplatform.models.ConfigServerGitProperty; import com.azure.resourcemanager.appplatform.models.ConfigServerProperties; @@ -12,15 +13,19 @@ import com.azure.resourcemanager.appplatform.models.Sku; import com.azure.resourcemanager.appplatform.models.SpringApps; import com.azure.resourcemanager.appplatform.models.SpringService; +import com.azure.resourcemanager.appplatform.models.SpringServiceCertificates; import com.azure.resourcemanager.appplatform.models.TestKeyType; import com.azure.resourcemanager.appplatform.models.TestKeys; import com.azure.resourcemanager.appplatform.models.TraceProperties; import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.GroupableResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.model.Indexable; import reactor.core.publisher.Mono; public class SpringServiceImpl extends GroupableResourceImpl implements SpringService, SpringService.Definition, SpringService.Update { + private final SpringServiceCertificatesImpl certificates = new SpringServiceCertificatesImpl(this); + private final SpringAppsImpl apps = new SpringAppsImpl(this); SpringServiceImpl(String name, ServiceResourceInner innerObject, AppPlatformManager manager) { super(name, innerObject, manager); @@ -42,7 +47,12 @@ public ConfigServerProperties serverProperties() { @Override public SpringApps apps() { - return new SpringAppsImpl(this); + return apps; + } + + @Override + public SpringServiceCertificates certificates() { + return certificates; } @Override @@ -183,4 +193,39 @@ public Mono createResourceAsync() { protected Mono getInnerAsync() { return manager().inner().getServices().getByResourceGroupAsync(resourceGroupName(), name()); } + + @Override + public SpringServiceImpl withCertificate(String name, String keyVaultUri, String certNameInKeyVault) { + this.addPostRunDependent( + context -> certificates.createOrUpdateAsync( + name, + new CertificateProperties().withVaultUri(keyVaultUri).withKeyVaultCertName(certNameInKeyVault) + ).cast(Indexable.class) + ); + return this; + } + + @Override + public SpringServiceImpl withCertificate(String name, String keyVaultUri, + String certNameInKeyVault, String certVersion) { + this.addPostRunDependent( + context -> certificates.createOrUpdateAsync( + name, + new CertificateProperties() + .withVaultUri(keyVaultUri) + .withKeyVaultCertName(certNameInKeyVault) + .withCertVersion(certVersion) + ).cast(Indexable.class) + ); + return this; + } + + @Override + public SpringServiceImpl withoutCertificate(String name) { + this.addPostRunDependent( + context -> certificates.deleteByNameAsync(name) + .then(context.voidMono()) + ); + return this; + } } diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServicesImpl.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServicesImpl.java index d48cd6be55a3..b94599001a47 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServicesImpl.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/implementation/SpringServicesImpl.java @@ -8,9 +8,12 @@ import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.ServicesClient; import com.azure.resourcemanager.appplatform.fluent.inner.ServiceResourceInner; +import com.azure.resourcemanager.appplatform.models.NameAvailability; +import com.azure.resourcemanager.appplatform.models.NameAvailabilityParameters; import com.azure.resourcemanager.appplatform.models.ResourceSku; import com.azure.resourcemanager.appplatform.models.SpringService; import com.azure.resourcemanager.appplatform.models.SpringServices; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; import reactor.core.publisher.Mono; @@ -18,6 +21,7 @@ public class SpringServicesImpl extends GroupableResourcesImpl< SpringService, SpringServiceImpl, ServiceResourceInner, ServicesClient, AppPlatformManager> implements SpringServices { + private static final String SPRING_TYPE = "Microsoft.AppPlatform/Spring"; public SpringServicesImpl(AppPlatformManager manager) { super(manager.inner().getServices(), manager); } @@ -42,6 +46,17 @@ protected SpringServiceImpl wrapModel(ServiceResourceInner inner) { return inner == null ? null : new SpringServiceImpl(inner.name(), inner, manager()); } + @Override + public NameAvailability checkNameAvailability(String name, Region region) { + return checkNameAvailabilityAsync(name, region).block(); + } + + @Override + public Mono checkNameAvailabilityAsync(String name, Region region) { + return inner().checkNameAvailabilityAsync( + region.toString(), new NameAvailabilityParameters().withName(name).withType(SPRING_TYPE)); + } + @Override public PagedIterable listSkus() { return new PagedIterable<>(listSkusAsync()); diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/CustomDomainValidateResult.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/CustomDomainValidateResult.java new file mode 100644 index 000000000000..923294d444fd --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/CustomDomainValidateResult.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appplatform.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CustomDomainValidateResult model. */ +@Fluent +public final class CustomDomainValidateResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomDomainValidateResult.class); + + /* + * Indicates if domain name is valid. + */ + @JsonProperty(value = "isValid") + private Boolean isValid; + + /* + * Message of why domain name is invalid. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the isValid property: Indicates if domain name is valid. + * + * @return the isValid value. + */ + public Boolean isValid() { + return this.isValid; + } + + /** + * Set the isValid property: Indicates if domain name is valid. + * + * @param isValid the isValid value to set. + * @return the CustomDomainValidateResult object itself. + */ + public CustomDomainValidateResult withIsValid(Boolean isValid) { + this.isValid = isValid; + return this; + } + + /** + * Get the message property: Message of why domain name is invalid. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Message of why domain name is invalid. + * + * @param message the message value to set. + * @return the CustomDomainValidateResult object itself. + */ + public CustomDomainValidateResult withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/NameAvailability.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/NameAvailability.java new file mode 100644 index 000000000000..08beee0eebb4 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/NameAvailability.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appplatform.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The NameAvailability model. */ +@Fluent +public final class NameAvailability { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailability.class); + + /* + * Indicates whether the name is available + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /* + * Reason why the name is not available + */ + @JsonProperty(value = "reason") + private String reason; + + /* + * Message why the name is not available + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the nameAvailable property: Indicates whether the name is available. + * + * @return the nameAvailable value. + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set the nameAvailable property: Indicates whether the name is available. + * + * @param nameAvailable the nameAvailable value to set. + * @return the NameAvailability object itself. + */ + public NameAvailability withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason property: Reason why the name is not available. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Set the reason property: Reason why the name is not available. + * + * @param reason the reason value to set. + * @return the NameAvailability object itself. + */ + public NameAvailability withReason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get the message property: Message why the name is not available. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Message why the name is not available. + * + * @param message the message value to set. + * @return the NameAvailability object itself. + */ + public NameAvailability withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java index a796973d671f..45a5ad4c96c8 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringApp.java @@ -32,6 +32,9 @@ public interface SpringApp /** @return the url of the app */ String url(); + /** @return the fully qualified domain name (FQDN) of the app */ + String fqdn(); + /** @return the temporary disk of the app */ TemporaryDisk temporaryDisk(); @@ -50,6 +53,12 @@ public interface SpringApp /** @return the entry point of the spring app deployment */ SpringAppDeployments deployments(); + /** @return the entry point of the spring app service binding */ + SpringAppServiceBindings serviceBindings(); + + /** @return the entry point of the spring app custom domain */ + SpringAppDomains customDomains(); + /** @return the blob url to upload deployment */ Mono getResourceUploadUrlAsync(); @@ -68,10 +77,10 @@ interface Blank extends WithCreate { } /** The stage of a spring app definition allowing to specify the endpoint. */ interface WithEndpoint { /** - * Enables the public endpoint for the spring app. + * Enables the default public endpoint for the spring app. * @return the next stage of spring app definition */ - WithCreate withPublicEndpoint(); + WithCreate withDefaultPublicEndpoint(); /** * Specifies the custom domain for the spring app. @@ -80,6 +89,14 @@ interface WithEndpoint { */ WithCreate withCustomDomain(String domain); + /** + * Specifies the custom domain for the spring app. + * @param domain the domain name + * @param certThumbprint the thumbprint of certificate for https + * @return the next stage of spring app update + */ + WithCreate withCustomDomain(String domain, String certThumbprint); + /** * Enables https only for the spring app. * @return the next stage of spring app definition @@ -129,6 +146,24 @@ interface WithDeployment { WithCreate deploySource(String name, File sourceCodeFolder, String targetModule); } + /** The stage of a spring app update allowing to specify the service binding. */ + interface WithServiceBinding { + /** + * Specifies a service binding for the spring app. + * @param name the service binding name + * @param bindingProperties the property for the service binding + * @return the next stage of spring app update + */ + WithCreate withServiceBinding(String name, BindingResourceProperties bindingProperties); + + /** + * Removes a service binding for the spring app. + * @param name the service binding name + * @return the next stage of spring app update + */ + WithCreate withoutServiceBinding(String name); + } + /** * The stage of the definition which contains all the minimum required inputs for the resource to be created, * but also allows for any other optional settings to be specified. @@ -137,7 +172,8 @@ interface WithCreate extends Creatable, DefinitionStages.WithEndpoint, DefinitionStages.WithDisk, - DefinitionStages.WithDeployment { } + DefinitionStages.WithDeployment, + DefinitionStages.WithServiceBinding { } } /** The template for an update operation, containing all the settings that can be modified. */ @@ -145,23 +181,24 @@ interface Update extends Appliable, UpdateStages.WithEndpoint, UpdateStages.WithDisk, - UpdateStages.WithDeployment { } + UpdateStages.WithDeployment, + UpdateStages.WithServiceBinding { } /** Grouping of spring app update stages. */ interface UpdateStages { /** The stage of a spring app update allowing to specify the endpoint. */ interface WithEndpoint { /** - * Enables the public endpoint for the spring app. + * Enables the default public endpoint for the spring app. * @return the next stage of spring app update */ - Update withPublicEndpoint(); + Update withDefaultPublicEndpoint(); /** - * Disables the public endpoint for the spring app. + * Disables the default public endpoint for the spring app. * @return the next stage of spring app update */ - Update withoutPublicEndpoint(); + Update withoutDefaultPublicEndpoint(); /** * Specifies the custom domain for the spring app. @@ -170,11 +207,20 @@ interface WithEndpoint { */ Update withCustomDomain(String domain); + /** + * Specifies the custom domain for the spring app. + * @param domain the domain name + * @param certThumbprint the thumbprint of certificate for https + * @return the next stage of spring app update + */ + Update withCustomDomain(String domain, String certThumbprint); + /** * Removes the custom domain for the spring app. + * @param domain the domain name * @return the next stage of spring app update */ - Update withoutCustomDomain(); + Update withoutCustomDomain(String domain); /** * Enables https only for the spring app. @@ -220,7 +266,6 @@ interface WithDisk { Update withoutPersistentDisk(); } - /** * The stage of a spring app update allowing to specify an simple active deployment. * for more operations, use {@link #deployments()} @@ -257,5 +302,23 @@ interface WithDeployment { */ Update withoutDeployment(String name); } + + /** The stage of a spring app update allowing to specify the service binding. */ + interface WithServiceBinding { + /** + * Specifies a service binding for the spring app. + * @param name the service binding name + * @param bindingProperties the property for the service binding + * @return the next stage of spring app update + */ + Update withServiceBinding(String name, BindingResourceProperties bindingProperties); + + /** + * Removes a service binding for the spring app. + * @param name the service binding name + * @return the next stage of spring app update + */ + Update withoutServiceBinding(String name); + } } } diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java index 1c4f1d368803..f104f2fa0e11 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDeployment.java @@ -17,7 +17,7 @@ import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of an Azure deployment Deployment request. */ +/** An immutable client-side representation of an Azure Spring App Deployment. */ @Fluent @Beta public interface SpringAppDeployment @@ -42,6 +42,33 @@ public interface SpringAppDeployment /** @return all the instances of the deployment */ List instances(); + /** Starts the deployment. */ + void start(); + + /** + * Starts the deployment. + * @return null + */ + Mono startAsync(); + + /** Stops the deployment. */ + void stop(); + + /** + * Stops the deployment. + * @return null + */ + Mono stopAsync(); + + /** Restarts the deployment. */ + void restart(); + + /** + * Restarts the deployment. + * @return null + */ + Mono restartAsync(); + /** @return the log file url of the deployment */ String getLogFileUrl(); @@ -288,7 +315,7 @@ interface WithSettings { * @return the next stage of deployment update */ Update withoutEnvironment(String key); - + /** * Specifies the version of the deployment. * @param versionName the version name of the deployment diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomain.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomain.java new file mode 100644 index 000000000000..2464ad0f9b3a --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomain.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.models; + +import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; + +/** An immutable client-side representation of an Azure Spring App Custom Domain. */ +public interface SpringAppDomain + extends ExternalChildResource, + HasInner { + /** @return the properties of the spring app custom domain */ + CustomDomainProperties properties(); +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomains.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomains.java new file mode 100644 index 000000000000..be102f967284 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppDomains.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.annotation.Beta; +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.CustomDomainsClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasParent; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingByName; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import reactor.core.publisher.Mono; + +/** Entry point for Spring App Custom Domains API. */ +@Fluent +@Beta +public interface SpringAppDomains + extends HasManager, + HasInner, + HasParent, + SupportsGettingById, + SupportsGettingByName, + SupportsListing, + SupportsDeletingById, + SupportsDeletingByName { + /** + * Checks the domain is validate for the app or not. + * + * @param domain the domain name + * @return the domain is validate for the parent app or not + */ + CustomDomainValidateResult validate(String domain); + + /** + * Checks the domain is validate for the app or not. + * + * @param domain the domain name + * @return the domain is validate for the parent app or not + */ + Mono validateAsync(String domain); +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBinding.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBinding.java new file mode 100644 index 000000000000..337e9c171338 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBinding.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.models; + +import com.azure.resourcemanager.appplatform.fluent.inner.BindingResourceInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; + +/** An immutable client-side representation of an Azure Spring App Service Binding. */ +public interface SpringAppServiceBinding + extends ExternalChildResource, + HasInner { + /** @return the properties of the service binding */ + BindingResourceProperties properties(); +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBindings.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBindings.java new file mode 100644 index 000000000000..93573416739c --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringAppServiceBindings.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.annotation.Beta; +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.BindingsClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasParent; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingByName; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; + +/** Entry point for Spring App Service Bindings API. */ +@Fluent +@Beta +public interface SpringAppServiceBindings + extends HasManager, + HasInner, + HasParent, + SupportsGettingById, + SupportsGettingByName, + SupportsListing, + SupportsDeletingById, + SupportsDeletingByName { +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringService.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringService.java index 6403422be52d..cb76e85c3900 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringService.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringService.java @@ -35,6 +35,9 @@ public interface SpringService /** @return the entry point of the spring app */ SpringApps apps(); + /** @return the entry point of the spring service certificate */ + SpringServiceCertificates certificates(); + /** * Lists test keys for the service. * @return all test keys @@ -136,6 +139,28 @@ interface WithTracing { WithCreate withTracing(String appInsightInstrumentationKey); } + /** The stage of a spring service update allowing to specify the certificate. */ + interface WithCertificate { + /** + * Specifies a certificate in key vault with latest version binding to the spring service. + * @param name the certificate name + * @param keyVaultUri the uri for key vault that contains certificate + * @param certNameInKeyVault the certificate name in the key vault + * @return the next stage of spring service update + */ + WithCreate withCertificate(String name, String keyVaultUri, String certNameInKeyVault); + + /** + * Specifies a certificate in key vault with specific version binding to the spring service. + * @param name the certificate name + * @param keyVaultUri the uri for key vault that contains certificate + * @param certNameInKeyVault the certificate name in the key vault + * @param certVersion the certificate version in the key vault + * @return the next stage of spring service update + */ + WithCreate withCertificate(String name, String keyVaultUri, String certNameInKeyVault, String certVersion); + } + /** * The stage of the definition which contains all the minimum required inputs for the resource to be created, * but also allows for any other optional settings to be specified. @@ -144,7 +169,8 @@ interface WithCreate extends Creatable, Resource.DefinitionWithTags, WithSku, - WithTracing { } + WithTracing, + WithCertificate { } } /** The template for an update operation, containing all the settings that can be modified. */ @@ -153,7 +179,8 @@ interface Update Resource.UpdateWithTags, UpdateStages.WithSku, UpdateStages.WithTracing, - UpdateStages.WithConfiguration { } + UpdateStages.WithConfiguration, + UpdateStages.WithCertificate { } /** Grouping of spring service update stages. */ interface UpdateStages { @@ -232,5 +259,34 @@ interface WithConfiguration { */ Update withoutGitConfig(); } + + /** The stage of a spring service update allowing to specify the certificate. */ + interface WithCertificate { + /** + * Specifies a certificate in key vault with latest version binding to the spring service. + * @param name the certificate name + * @param keyVaultUri the uri for key vault that contains certificate + * @param certNameInKeyVault the certificate name in the key vault + * @return the next stage of spring service update + */ + Update withCertificate(String name, String keyVaultUri, String certNameInKeyVault); + + /** + * Specifies a certificate in key vault with specific version binding to the spring service. + * @param name the certificate name + * @param keyVaultUri the uri for key vault that contains certificate + * @param certNameInKeyVault the certificate name in the key vault + * @param certVersion the certificate version in the key vault + * @return the next stage of spring service update + */ + Update withCertificate(String name, String keyVaultUri, String certNameInKeyVault, String certVersion); + + /** + * Removes a certificate binding to the spring service. + * @param name the certificate name + * @return the next stage of spring service update + */ + Update withoutCertificate(String name); + } } } diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificate.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificate.java new file mode 100644 index 000000000000..c3fda6eaa74f --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificate.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.models; + +import com.azure.resourcemanager.appplatform.fluent.inner.CertificateResourceInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; + +/** An immutable client-side representation of an Azure Spring Service Certificate. */ +public interface SpringServiceCertificate + extends ExternalChildResource, + HasInner { + /** @return the properties of the service binding */ + CertificateProperties properties(); +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificates.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificates.java new file mode 100644 index 000000000000..22d36f521044 --- /dev/null +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServiceCertificates.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.implementation.annotation.Beta; +import com.azure.resourcemanager.appplatform.AppPlatformManager; +import com.azure.resourcemanager.appplatform.fluent.CertificatesClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasParent; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingByName; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; + +/** Entry point for Spring Service Certificates API. */ +@Fluent +@Beta +public interface SpringServiceCertificates + extends HasManager, + HasInner, + HasParent, + SupportsGettingById, + SupportsGettingByName, + SupportsListing, + SupportsDeletingById, + SupportsDeletingByName { +} diff --git a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServices.java b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServices.java index 861f7a4eca58..721941981771 100644 --- a/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServices.java +++ b/sdk/appplatform/mgmt/src/main/java/com/azure/resourcemanager/appplatform/models/SpringServices.java @@ -9,6 +9,7 @@ import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.appplatform.AppPlatformManager; import com.azure.resourcemanager.appplatform.fluent.ServicesClient; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup; @@ -18,6 +19,7 @@ import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import reactor.core.publisher.Mono; /** Entry point for Spring Service management API. */ @Fluent @@ -32,6 +34,24 @@ public interface SpringServices SupportsListingByResourceGroup, SupportsDeletingById, SupportsDeletingByResourceGroup { + /** + * Checks the name of the service is available in specific region or not. + * + * @param name the service name + * @param region the region of the service + * @return the service name is available or not. + */ + NameAvailability checkNameAvailability(String name, Region region); + + /** + * Checks the name of the service is available in specific region or not. + * + * @param name the service name + * @param region the region of the service + * @return the service name is available or not. + */ + Mono checkNameAvailabilityAsync(String name, Region region); + /** @return all available sku. */ PagedIterable listSkus(); diff --git a/sdk/appplatform/mgmt/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java b/sdk/appplatform/mgmt/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java index 2a1f0a14aeb6..e7261b470278 100644 --- a/sdk/appplatform/mgmt/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java +++ b/sdk/appplatform/mgmt/src/test/java/com/azure/resourcemanager/appplatform/AppPlatformTest.java @@ -4,6 +4,9 @@ package com.azure.resourcemanager.appplatform; import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.appservice.AppServiceManager; +import com.azure.resourcemanager.dns.DnsZoneManager; +import com.azure.resourcemanager.keyvault.KeyVaultManager; import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; @@ -11,6 +14,9 @@ public class AppPlatformTest extends TestBase { protected AppPlatformManager appPlatformManager; + protected AppServiceManager appServiceManager; + protected DnsZoneManager dnsZoneManager; + protected KeyVaultManager keyVaultManager; protected String rgName = ""; public AppPlatformTest() { @@ -23,7 +29,10 @@ public AppPlatformTest() { @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) throws IOException { rgName = generateRandomResourceName("rg", 20); - appPlatformManager = AppPlatformManager.authenticate(httpPipeline, profile); + appPlatformManager = AppPlatformManager.authenticate(httpPipeline, profile, sdkContext); + appServiceManager = AppServiceManager.authenticate(httpPipeline, profile, sdkContext); + dnsZoneManager = DnsZoneManager.authenticate(httpPipeline, profile, sdkContext); + keyVaultManager = KeyVaultManager.authenticate(httpPipeline, profile, sdkContext); } @Override diff --git a/sdk/appplatform/mgmt/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java b/sdk/appplatform/mgmt/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java index 86f1b70b83af..ff647311af02 100644 --- a/sdk/appplatform/mgmt/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java +++ b/sdk/appplatform/mgmt/src/test/java/com/azure/resourcemanager/appplatform/SpringCloudTest.java @@ -7,8 +7,20 @@ import com.azure.resourcemanager.appplatform.models.SpringApp; import com.azure.resourcemanager.appplatform.models.SpringAppDeployment; import com.azure.resourcemanager.appplatform.models.SpringService; +import com.azure.resourcemanager.appservice.models.AppServiceCertificateOrder; +import com.azure.resourcemanager.appservice.models.AppServiceDomain; +import com.azure.resourcemanager.dns.models.DnsZone; +import com.azure.resourcemanager.keyvault.models.CertificatePermissions; +import com.azure.resourcemanager.keyvault.models.Secret; +import com.azure.resourcemanager.keyvault.models.SecretPermissions; +import com.azure.resourcemanager.keyvault.models.Vault; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.security.keyvault.certificates.CertificateClient; +import com.azure.security.keyvault.certificates.CertificateClientBuilder; +import com.azure.security.keyvault.certificates.models.ImportCertificateOptions; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream; @@ -16,6 +28,8 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import javax.xml.bind.DatatypeConverter; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -23,8 +37,17 @@ import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; +import java.security.KeyStore; +import java.security.MessageDigest; +import java.util.Base64; +import java.util.Collections; public class SpringCloudTest extends AppPlatformTest { + private static final String PIGGYMETRICS_CONFIG_URL = "https://github.com/Azure-Samples/piggymetrics-config"; + private static final String GATEWAY_JAR_URL = "https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/gateway.jar"; + private static final String PIGGYMETRICS_TAR_GZ_URL = "https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/piggymetrics.tar.gz"; + + private static final String SPRING_CLOUD_SERVICE_PRINCIPAL = "03b39d0f-4213-4864-a245-b1476ec03169"; SpringCloudTest() { super(RunCondition.LIVE_ONLY); // need storage data-plane and url check @@ -36,6 +59,9 @@ public void canCRUDSpringAppWithDeployment() throws IOException { String appName = "gateway"; String deploymentName = generateRandomResourceName("deploy", 15); String deploymentName1 = generateRandomResourceName("deploy", 15); + Region region = Region.US_EAST; + + Assertions.assertTrue(appPlatformManager.springServices().checkNameAvailability(serviceName, region).nameAvailable()); SpringService service = appPlatformManager.springServices().define(serviceName) .withRegion(Region.US_EAST) @@ -52,13 +78,13 @@ public void canCRUDSpringAppWithDeployment() throws IOException { Assertions.assertEquals("S0", service.sku().name()); service.update() - .withGitUri("https://github.com/Azure-Samples/piggymetrics-config") + .withGitUri(PIGGYMETRICS_CONFIG_URL) .apply(); - Assertions.assertEquals("https://github.com/Azure-Samples/piggymetrics-config", service.serverProperties().configServer().gitProperty().uri()); + Assertions.assertEquals(PIGGYMETRICS_CONFIG_URL, service.serverProperties().configServer().gitProperty().uri()); File jarFile = new File("gateway.jar"); if (!jarFile.exists()) { - HttpURLConnection connection = (HttpURLConnection) new URL("https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/gateway.jar").openConnection(); + HttpURLConnection connection = (HttpURLConnection) new URL(GATEWAY_JAR_URL).openConnection(); connection.connect(); try (InputStream inputStream = connection.getInputStream(); OutputStream outputStream = new FileOutputStream(jarFile)) { @@ -68,7 +94,7 @@ public void canCRUDSpringAppWithDeployment() throws IOException { } SpringApp app = service.apps().define(appName) - .withPublicEndpoint() + .withDefaultPublicEndpoint() .create(); Assertions.assertNotNull(app.url()); @@ -102,10 +128,10 @@ public void canCRUDSpringAppWithDeployment() throws IOException { File sourceCodeFolder = new File("piggymetrics"); if (!sourceCodeFolder.exists() || sourceCodeFolder.isFile()) { - if (sourceCodeFolder.isFile()) { - sourceCodeFolder.delete(); + if (sourceCodeFolder.isFile() && !sourceCodeFolder.delete()) { + Assertions.fail(); } - extraTarGzSource(sourceCodeFolder); + extraTarGzSource(sourceCodeFolder, new URL(PIGGYMETRICS_TAR_GZ_URL)); } deployment = app.deployments().define(deploymentName1) @@ -123,11 +149,146 @@ public void canCRUDSpringAppWithDeployment() throws IOException { Assertions.assertTrue(requestSuccess(app.url())); app.update() - .withoutPublicEndpoint() + .withoutDefaultPublicEndpoint() .apply(); Assertions.assertFalse(app.isPublic()); } + @Test + public void canCreateCustomDomainWithSsl() throws Exception { + String domainName = generateRandomResourceName("jsdkdemo-", 20) + ".com"; + String certOrderName = generateRandomResourceName("cert", 15); + String vaultName = generateRandomResourceName("vault", 15); + String certName = generateRandomResourceName("cert", 15); + String serviceName = generateRandomResourceName("springsvc", 15); + String appName = "gateway"; + Region region = Region.US_EAST; + + appPlatformManager.resourceManager().resourceGroups().define(rgName) + .withRegion(region) + .create(); + + // create custom domain and certificate + DnsZone dnsZone = dnsZoneManager.zones().define(domainName) + .withExistingResourceGroup(rgName) + .create(); + + AppServiceDomain domain = appServiceManager.domains().define(domainName) + .withExistingResourceGroup(rgName) + .defineRegistrantContact() + .withFirstName("Jon") + .withLastName("Doe") + .withEmail("jondoe@contoso.com") + .withAddressLine1("123 4th Ave") + .withCity("Redmond") + .withStateOrProvince("WA") + .withCountry(CountryIsoCode.UNITED_STATES) + .withPostalCode("98052") + .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) + .withPhoneNumber("4258828080") + .attach() + .withDomainPrivacyEnabled(true) + .withAutoRenewEnabled(false) + .withExistingDnsZone(dnsZone) + .create(); + + AppServiceCertificateOrder certificateOrder = appServiceManager.certificateOrders().define(certOrderName) + .withExistingResourceGroup(rgName) + .withHostName(String.format("*.%s", domainName)) + .withWildcardSku() + .withDomainVerification(domain) + .withNewKeyVault(vaultName, region) + .withAutoRenew(true) + .create(); + + Vault vault = keyVaultManager.vaults().getByResourceGroup(rgName, vaultName); + vault.update() + .defineAccessPolicy() + .forServicePrincipal(clientIdFromFile()) + .allowSecretAllPermissions() + .allowCertificateAllPermissions() + .attach() + .defineAccessPolicy() + .forServicePrincipal(SPRING_CLOUD_SERVICE_PRINCIPAL) + .allowCertificatePermissions(CertificatePermissions.GET, CertificatePermissions.LIST) + .allowSecretPermissions(SecretPermissions.GET, SecretPermissions.LIST) + .attach() + .apply(); + + Secret secret = vault.secrets().getByName(certOrderName); + + byte[] certificate = Base64.getDecoder().decode(secret.value()); + + // upload certificate + CertificateClient certificateClient = new CertificateClientBuilder() + .vaultUrl(vault.vaultUri()) + .pipeline(appPlatformManager.httpPipeline()) + .buildClient(); + + certificateClient.importCertificate( + new ImportCertificateOptions(certName, certificate) + .setEnabled(true) + ); + + // get thumbprint + KeyStore store = KeyStore.getInstance("PKCS12"); + store.load(new ByteArrayInputStream(certificate), null); + String alias = Collections.list(store.aliases()).get(0); + String thumbprint = DatatypeConverter.printHexBinary(MessageDigest.getInstance("SHA-1").digest(store.getCertificate(alias).getEncoded())); + + Assertions.assertTrue(appPlatformManager.springServices().checkNameAvailability(serviceName, region).nameAvailable()); + + SpringService service = appPlatformManager.springServices().define(serviceName) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withCertificate("test", vault.vaultUri(), certName) + .create(); + + service.apps().define(appName).withDefaultPublicEndpoint().create(); + SpringApp app = service.apps().getByName(appName); + + dnsZone.update() + .withCNameRecordSet("www", app.fqdn()) + .withCNameRecordSet("ssl", app.fqdn()) + .apply(); + + app.update() + .withoutDefaultPublicEndpoint() + .withCustomDomain(String.format("www.%s", domainName)) + .withCustomDomain(String.format("ssl.%s", domainName), thumbprint) + .apply(); + + Assertions.assertTrue(app.customDomains().validate(String.format("www.%s", domainName)).isValid()); + Assertions.assertTrue(requestSuccess(String.format("http://www.%s", domainName))); + Assertions.assertTrue(requestSuccess(String.format("https://ssl.%s", domainName))); + + app.update() + .withHttpsOnly() + .apply(); + Assertions.assertTrue(checkRedirect(String.format("http://ssl.%s", domainName))); + } + + private boolean checkRedirect(String url) throws IOException { + for (int i = 0; i < 60; ++i) { + HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); + connection.setInstanceFollowRedirects(false); + try { + connection.connect(); + if (200 <= connection.getResponseCode() && connection.getResponseCode() < 400) { + connection.getInputStream().close(); + if (connection.getResponseCode() / 100 == 3) { + return true; + } + System.out.printf("Do request to %s with response code %d%n", url, connection.getResponseCode()); + } + } finally { + connection.disconnect(); + } + SdkContext.sleep(5000); + } + return false; + } + private boolean requestSuccess(String url) throws IOException { for (int i = 0; i < 60; ++i) { HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); @@ -140,14 +301,14 @@ private boolean requestSuccess(String url) throws IOException { System.out.printf("Do request to %s with response code %d%n", url, connection.getResponseCode()); } finally { connection.disconnect(); - SdkContext.sleep(5000); } + SdkContext.sleep(5000); } return false; } - private void extraTarGzSource(File folder) throws IOException { - HttpURLConnection connection = (HttpURLConnection) new URL("https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/piggymetrics.tar.gz").openConnection(); + private void extraTarGzSource(File folder, URL url) throws IOException { + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.connect(); try (TarArchiveInputStream inputStream = new TarArchiveInputStream(new GzipCompressorInputStream(connection.getInputStream()))) { TarArchiveEntry entry; @@ -157,14 +318,16 @@ private void extraTarGzSource(File folder) throws IOException { } File file = new File(folder, entry.getName()); File parent = file.getParentFile(); - if (!parent.exists()) { - parent.mkdirs(); - } - try (OutputStream outputStream = new FileOutputStream(file)) { - IOUtils.copy(inputStream, outputStream); + if (parent.exists() || parent.mkdirs()) { + try (OutputStream outputStream = new FileOutputStream(file)) { + IOUtils.copy(inputStream, outputStream); + } + } else { + throw new IllegalStateException("Cannot create directory: " + parent.getAbsolutePath()); } } + } finally { + connection.disconnect(); } - connection.disconnect(); } } diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java index 0381c1d7c68c..acd20cfc1cb4 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/WebSiteManagementClient.java @@ -8,7 +8,6 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import com.azure.resourcemanager.appservice.fluent.AppServiceCertificateOrdersClient; import com.azure.resourcemanager.appservice.fluent.AppServiceEnvironmentsClient; import com.azure.resourcemanager.appservice.fluent.AppServicePlansClient; @@ -25,6 +24,7 @@ import com.azure.resourcemanager.appservice.fluent.StaticSitesClient; import com.azure.resourcemanager.appservice.fluent.TopLevelDomainsClient; import com.azure.resourcemanager.appservice.fluent.WebAppsClient; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; /** Initializes a new instance of the WebSiteManagementClient type. */ @ServiceClient(builder = WebSiteManagementClientBuilder.class) diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java index 04a53826f5ce..dc4b30792bf1 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceCertificateOrdersClient.java @@ -31,6 +31,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AppServiceCertificateCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.AppServiceCertificateOrderCollectionInner; @@ -373,37 +374,6 @@ Mono>> retrieveCertificateEmailHistory( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("certificateOrderName") String certificateOrderName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AppServiceCertificateOrderInner certificateDistinguishedName, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateCertificateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("certificateOrderName") String certificateOrderName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AppServiceCertificateResourceInner keyVaultCertificate, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -491,6 +461,7 @@ public Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -634,6 +605,7 @@ public Mono> validatePurchaseInformationWithResponseAsync( } else { appServiceCertificateOrder.validate(); } + context = this.client.mergeContext(context); return service .validatePurchaseInformation( this.client.getEndpoint(), @@ -782,6 +754,7 @@ public Mono> listByResourceGroupS new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), @@ -945,6 +918,7 @@ public Mono> getByResourceGroupWithRes new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1141,6 +1115,7 @@ public Mono>> createOrUpdateWithResponseAsync( } else { certificateDistinguishedName.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -1164,10 +1139,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return sSL certificate purchase order. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, AppServiceCertificateOrderInner> beginCreateOrUpdate( - String resourceGroupName, - String certificateOrderName, - AppServiceCertificateOrderInner certificateDistinguishedName) { + public PollerFlux, AppServiceCertificateOrderInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName); return this @@ -1192,11 +1168,12 @@ public PollerFlux, AppServiceCertifi * @return sSL certificate purchase order. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, AppServiceCertificateOrderInner> beginCreateOrUpdate( - String resourceGroupName, - String certificateOrderName, - AppServiceCertificateOrderInner certificateDistinguishedName, - Context context) { + public PollerFlux, AppServiceCertificateOrderInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context) { Mono>> mono = createOrUpdateWithResponseAsync( resourceGroupName, certificateOrderName, certificateDistinguishedName, context); @@ -1209,6 +1186,48 @@ public PollerFlux, AppServiceCertifi AppServiceCertificateOrderInner.class); } + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName SSL certificate purchase order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AppServiceCertificateOrderInner> beginCreateOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName) { + return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName) + .getSyncPoller(); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName SSL certificate purchase order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AppServiceCertificateOrderInner> beginCreateOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, context) + .getSyncPoller(); + } + /** * Description for Create or update a certificate purchase order. * @@ -1225,17 +1244,9 @@ public Mono createOrUpdateAsync( String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - AppServiceCertificateOrderInner.class, - AppServiceCertificateOrderInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1256,18 +1267,9 @@ public Mono createOrUpdateAsync( String certificateOrderName, AppServiceCertificateOrderInner certificateDistinguishedName, Context context) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, certificateOrderName, certificateDistinguishedName, context); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - AppServiceCertificateOrderInner.class, - AppServiceCertificateOrderInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1391,6 +1393,7 @@ public Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1568,6 +1571,7 @@ public Mono> updateWithResponseAsync( } else { certificateDistinguishedName.validate(); } + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -1765,6 +1769,7 @@ public Mono> listCertificatesS new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listCertificates( this.client.getEndpoint(), @@ -1944,6 +1949,7 @@ public Mono> getCertificateWithResp new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getCertificate( this.client.getEndpoint(), @@ -2153,6 +2159,7 @@ public Mono>> createOrUpdateCertificateWithResponseAsy } else { keyVaultCertificate.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateCertificate( this.client.getEndpoint(), @@ -2179,7 +2186,7 @@ public Mono>> createOrUpdateCertificateWithResponseAsy */ @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux, AppServiceCertificateResourceInner> - beginCreateOrUpdateCertificate( + beginCreateOrUpdateCertificateAsync( String resourceGroupName, String certificateOrderName, String name, @@ -2211,7 +2218,7 @@ public Mono>> createOrUpdateCertificateWithResponseAsy */ @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux, AppServiceCertificateResourceInner> - beginCreateOrUpdateCertificate( + beginCreateOrUpdateCertificateAsync( String resourceGroupName, String certificateOrderName, String name, @@ -2229,6 +2236,55 @@ public Mono>> createOrUpdateCertificateWithResponseAsy AppServiceCertificateResourceInner.class); } + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AppServiceCertificateResourceInner> + beginCreateOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate) { + return beginCreateOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate) + .getSyncPoller(); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AppServiceCertificateResourceInner> + beginCreateOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate, + Context context) { + return beginCreateOrUpdateCertificateAsync( + resourceGroupName, certificateOrderName, name, keyVaultCertificate, context) + .getSyncPoller(); + } + /** * Description for Creates or updates a certificate and associates with key vault secret. * @@ -2247,18 +2303,9 @@ public Mono createOrUpdateCertificateAsync( String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { - Mono>> mono = - createOrUpdateCertificateWithResponseAsync( - resourceGroupName, certificateOrderName, name, keyVaultCertificate); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - AppServiceCertificateResourceInner.class, - AppServiceCertificateResourceInner.class) + return beginCreateOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2281,18 +2328,10 @@ public Mono createOrUpdateCertificateAsync( String name, AppServiceCertificateResourceInner keyVaultCertificate, Context context) { - Mono>> mono = - createOrUpdateCertificateWithResponseAsync( - resourceGroupName, certificateOrderName, name, keyVaultCertificate, context); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - AppServiceCertificateResourceInner.class, - AppServiceCertificateResourceInner.class) + return beginCreateOrUpdateCertificateAsync( + resourceGroupName, certificateOrderName, name, keyVaultCertificate, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2432,6 +2471,7 @@ public Mono> deleteCertificateWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteCertificate( this.client.getEndpoint(), @@ -2622,6 +2662,7 @@ public Mono> updateCertificateWithR } else { keyVaultCertificate.validate(); } + context = this.client.mergeContext(context); return service .updateCertificate( this.client.getEndpoint(), @@ -2845,6 +2886,7 @@ public Mono> reissueWithResponseAsync( } else { reissueCertificateOrderRequest.validate(); } + context = this.client.mergeContext(context); return service .reissue( this.client.getEndpoint(), @@ -3042,6 +3084,7 @@ public Mono> renewWithResponseAsync( } else { renewCertificateOrderRequest.validate(); } + context = this.client.mergeContext(context); return service .renew( this.client.getEndpoint(), @@ -3213,6 +3256,7 @@ public Mono> resendEmailWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .resendEmail( this.client.getEndpoint(), @@ -3373,6 +3417,7 @@ public Mono> resendRequestEmailsWithResponseAsync( } NameIdentifierInner nameIdentifier = new NameIdentifierInner(); nameIdentifier.withName(name); + context = this.client.mergeContext(context); return service .resendRequestEmails( this.client.getEndpoint(), @@ -3548,6 +3593,7 @@ public Mono> retrieveSiteSealWithResponseAsync( } else { siteSealRequest.validate(); } + context = this.client.mergeContext(context); return service .retrieveSiteSeal( this.client.getEndpoint(), @@ -3726,6 +3772,7 @@ public Mono> verifyDomainOwnershipWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .verifyDomainOwnership( this.client.getEndpoint(), @@ -3878,6 +3925,7 @@ public Mono>> retrieveCertificateActi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .retrieveCertificateActions( this.client.getEndpoint(), @@ -4048,6 +4096,7 @@ public Mono>> retrieveCertificateEmailHisto new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .retrieveCertificateEmailHistory( this.client.getEndpoint(), @@ -4139,460 +4188,6 @@ public List retrieveCertificateEmailHistory( return retrieveCertificateEmailHistoryAsync(resourceGroupName, name, context).block(); } - /** - * Description for Create or update a certificate purchase order. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param certificateDistinguishedName SSL certificate purchase order. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sSL certificate purchase order. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String certificateOrderName, - AppServiceCertificateOrderInner certificateDistinguishedName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (certificateOrderName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (certificateDistinguishedName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter certificateDistinguishedName is required and cannot be null.")); - } else { - certificateDistinguishedName.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - certificateOrderName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - certificateDistinguishedName, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Create or update a certificate purchase order. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param certificateDistinguishedName SSL certificate purchase order. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sSL certificate purchase order. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String certificateOrderName, - AppServiceCertificateOrderInner certificateDistinguishedName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (certificateOrderName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (certificateDistinguishedName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter certificateDistinguishedName is required and cannot be null.")); - } else { - certificateDistinguishedName.validate(); - } - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - certificateOrderName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - certificateDistinguishedName, - context); - } - - /** - * Description for Create or update a certificate purchase order. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param certificateDistinguishedName SSL certificate purchase order. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sSL certificate purchase order. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String certificateOrderName, - AppServiceCertificateOrderInner certificateDistinguishedName) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, certificateOrderName, certificateDistinguishedName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create or update a certificate purchase order. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param certificateDistinguishedName SSL certificate purchase order. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sSL certificate purchase order. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String certificateOrderName, - AppServiceCertificateOrderInner certificateDistinguishedName, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, certificateOrderName, certificateDistinguishedName, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create or update a certificate purchase order. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param certificateDistinguishedName SSL certificate purchase order. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sSL certificate purchase order. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppServiceCertificateOrderInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String certificateOrderName, - AppServiceCertificateOrderInner certificateDistinguishedName) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, certificateOrderName, certificateDistinguishedName) - .block(); - } - - /** - * Description for Create or update a certificate purchase order. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param certificateDistinguishedName SSL certificate purchase order. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sSL certificate purchase order. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppServiceCertificateOrderInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String certificateOrderName, - AppServiceCertificateOrderInner certificateDistinguishedName, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, certificateOrderName, certificateDistinguishedName, context) - .block(); - } - - /** - * Description for Creates or updates a certificate and associates with key vault secret. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param name Name of the certificate. - * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return key Vault container ARM resource for a certificate that is purchased through Azure. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - beginCreateOrUpdateCertificateWithoutPollingWithResponseAsync( - String resourceGroupName, - String certificateOrderName, - String name, - AppServiceCertificateResourceInner keyVaultCertificate) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (certificateOrderName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (keyVaultCertificate == null) { - return Mono - .error(new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null.")); - } else { - keyVaultCertificate.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateCertificateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - certificateOrderName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - keyVaultCertificate, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Creates or updates a certificate and associates with key vault secret. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param name Name of the certificate. - * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return key Vault container ARM resource for a certificate that is purchased through Azure. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - beginCreateOrUpdateCertificateWithoutPollingWithResponseAsync( - String resourceGroupName, - String certificateOrderName, - String name, - AppServiceCertificateResourceInner keyVaultCertificate, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (certificateOrderName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (keyVaultCertificate == null) { - return Mono - .error(new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null.")); - } else { - keyVaultCertificate.validate(); - } - return service - .beginCreateOrUpdateCertificateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - certificateOrderName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - keyVaultCertificate, - context); - } - - /** - * Description for Creates or updates a certificate and associates with key vault secret. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param name Name of the certificate. - * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return key Vault container ARM resource for a certificate that is purchased through Azure. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateCertificateWithoutPollingAsync( - String resourceGroupName, - String certificateOrderName, - String name, - AppServiceCertificateResourceInner keyVaultCertificate) { - return beginCreateOrUpdateCertificateWithoutPollingWithResponseAsync( - resourceGroupName, certificateOrderName, name, keyVaultCertificate) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates or updates a certificate and associates with key vault secret. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param name Name of the certificate. - * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return key Vault container ARM resource for a certificate that is purchased through Azure. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateCertificateWithoutPollingAsync( - String resourceGroupName, - String certificateOrderName, - String name, - AppServiceCertificateResourceInner keyVaultCertificate, - Context context) { - return beginCreateOrUpdateCertificateWithoutPollingWithResponseAsync( - resourceGroupName, certificateOrderName, name, keyVaultCertificate, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates or updates a certificate and associates with key vault secret. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param name Name of the certificate. - * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return key Vault container ARM resource for a certificate that is purchased through Azure. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppServiceCertificateResourceInner beginCreateOrUpdateCertificateWithoutPolling( - String resourceGroupName, - String certificateOrderName, - String name, - AppServiceCertificateResourceInner keyVaultCertificate) { - return beginCreateOrUpdateCertificateWithoutPollingAsync( - resourceGroupName, certificateOrderName, name, keyVaultCertificate) - .block(); - } - - /** - * Description for Creates or updates a certificate and associates with key vault secret. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param certificateOrderName Name of the certificate order. - * @param name Name of the certificate. - * @param keyVaultCertificate Key Vault container ARM resource for a certificate that is purchased through Azure. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return key Vault container ARM resource for a certificate that is purchased through Azure. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppServiceCertificateResourceInner beginCreateOrUpdateCertificateWithoutPolling( - String resourceGroupName, - String certificateOrderName, - String name, - AppServiceCertificateResourceInner keyVaultCertificate, - Context context) { - return beginCreateOrUpdateCertificateWithoutPollingAsync( - resourceGroupName, certificateOrderName, name, keyVaultCertificate, context) - .block(); - } - /** * Get the next page of items. * @@ -4637,6 +4232,7 @@ public Mono> listNextSinglePageAs if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -4695,6 +4291,7 @@ public Mono> listByResourceGroupN if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -4753,6 +4350,7 @@ public Mono> listCertificatesN if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listCertificatesNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java index 7550af44f578..0d53862c1ab5 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServiceEnvironmentsClient.java @@ -31,6 +31,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AddressResponseInner; import com.azure.resourcemanager.appservice.fluent.inner.AppServiceEnvironmentCollectionInner; @@ -619,110 +620,6 @@ Mono> listWebWorkerUsages( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" - + "/hostingEnvironments/{name}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" - + "/hostingEnvironments/{name}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @QueryParam("forceDelete") Boolean forceDelete, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" - + "/hostingEnvironments/{name}/changeVirtualNetwork") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginChangeVnetWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VirtualNetworkProfile vnetInfo, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" - + "/hostingEnvironments/{name}/multiRolePools/default") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateMultiRolePoolWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkerPoolResourceInner multiRolePoolEnvelope, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" - + "/hostingEnvironments/{name}/resume") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginResumeWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" - + "/hostingEnvironments/{name}/suspend") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginSuspendWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" - + "/hostingEnvironments/{name}/workerPools/{workerPoolName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateWorkerPoolWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("workerPoolName") String workerPoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkerPoolResourceInner workerPoolEnvelope, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -744,6 +641,13 @@ Mono> listByResourceGroupNext( Mono> listCapacitiesNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> changeVnetNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -793,6 +697,13 @@ Mono> listMultiRoleUsagesNext( Mono> getOutboundNetworkDependenciesEndpointsNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resumeNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -807,6 +718,13 @@ Mono> listAppServicePlansNext( Mono> listWebAppsNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> suspendNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -915,6 +833,7 @@ public Mono> listSinglePageAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -1059,6 +978,7 @@ public Mono> listByResourceGro new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), @@ -1220,6 +1140,7 @@ public Mono> getByResourceGroupWith new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1411,6 +1332,7 @@ public Mono>> createOrUpdateWithResponseAsync( } else { hostingEnvironmentEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -1435,7 +1357,7 @@ public Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux, AppServiceEnvironmentResourceInner> - beginCreateOrUpdate( + beginCreateOrUpdateAsync( String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope); @@ -1462,7 +1384,7 @@ public Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux, AppServiceEnvironmentResourceInner> - beginCreateOrUpdate( + beginCreateOrUpdateAsync( String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, @@ -1478,6 +1400,46 @@ public Mono>> createOrUpdateWithResponseAsync( AppServiceEnvironmentResourceInner.class); } + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope App Service Environment ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AppServiceEnvironmentResourceInner> + beginCreateOrUpdate( + String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope).getSyncPoller(); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope App Service Environment ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AppServiceEnvironmentResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String name, + AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context).getSyncPoller(); + } + /** * Description for Create or update an App Service Environment. * @@ -1492,17 +1454,9 @@ public Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync( String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - AppServiceEnvironmentResourceInner.class, - AppServiceEnvironmentResourceInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1523,17 +1477,9 @@ public Mono createOrUpdateAsync( String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, Context context) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - AppServiceEnvironmentResourceInner.class, - AppServiceEnvironmentResourceInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1658,6 +1604,7 @@ public Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1682,7 +1629,8 @@ public Mono>> deleteWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginDelete(String resourceGroupName, String name, Boolean forceDelete) { + public PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String name, Boolean forceDelete) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } @@ -1701,12 +1649,48 @@ public PollerFlux, Void> beginDelete(String resourceGroupName, * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginDelete( + public PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String name, Boolean forceDelete, Context context) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Boolean forceDelete) { + return beginDeleteAsync(resourceGroupName, name, forceDelete).getSyncPoller(); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String name, Boolean forceDelete, Context context) { + return beginDeleteAsync(resourceGroupName, name, forceDelete, context).getSyncPoller(); + } + /** * Description for Delete an App Service Environment. * @@ -1721,12 +1705,9 @@ public PollerFlux, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String name, Boolean forceDelete) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginDeleteAsync(resourceGroupName, name, forceDelete) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1744,12 +1725,9 @@ public Mono deleteAsync(String resourceGroupName, String name, Boolean for */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String name, Boolean forceDelete, Context context) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginDeleteAsync(resourceGroupName, name, forceDelete, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1766,12 +1744,9 @@ public Mono deleteAsync(String resourceGroupName, String name, Boolean for public Mono deleteAsync(String resourceGroupName, String name) { final Boolean forceDelete = null; final Context context = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginDeleteAsync(resourceGroupName, name, forceDelete) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1924,6 +1899,7 @@ public Mono> updateWithResponseAsyn } else { hostingEnvironmentEnvelope.validate(); } + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -2115,6 +2091,7 @@ public Mono> listCapacitiesSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listCapacities( this.client.getEndpoint(), @@ -2278,6 +2255,7 @@ public Mono> getVipInfoWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getVipInfo( this.client.getEndpoint(), @@ -2378,7 +2356,7 @@ public AddressResponseInner getVipInfo(String resourceGroupName, String name, Co * @return collection of App Service apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> changeVnetWithResponseAsync( + public Mono> changeVnetSinglePageAsync( String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { if (this.client.getEndpoint() == null) { return Mono @@ -2406,16 +2384,40 @@ public Mono>> changeVnetWithResponseAsync( } return FluxUtil .withContext( - context -> - service - .changeVnet( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - vnetInfo, - context)) + context -> { + Mono>> mono = + service + .changeVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + vnetInfo, + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResultAsync( + mono, + this.client.getHttpPipeline(), + WebAppCollectionInner.class, + WebAppCollectionInner.class) + .last() + .flatMap(this.client::getLroFinalResultOrError)); + }) + .>map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } @@ -2432,7 +2434,7 @@ public Mono>> changeVnetWithResponseAsync( * @return collection of App Service apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> changeVnetWithResponseAsync( + public Mono> changeVnetSinglePageAsync( String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -2458,15 +2460,36 @@ public Mono>> changeVnetWithResponseAsync( } else { vnetInfo.validate(); } - return service - .changeVnet( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - vnetInfo, - context); + context = this.client.mergeContext(context); + Mono>> mono = + service + .changeVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + vnetInfo, + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResultAsync( + mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) + .last() + .flatMap(this.client::getLroFinalResultOrError)) + .map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)); } /** @@ -2480,14 +2503,11 @@ public Mono>> changeVnetWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WebAppCollectionInner> beginChangeVnet( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { - Mono>> mono = changeVnetWithResponseAsync(resourceGroupName, name, vnetInfo); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux changeVnetAsync(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { + return new PagedFlux<>( + () -> changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo), + nextLink -> changeVnetNextSinglePageAsync(nextLink)); } /** @@ -2502,14 +2522,12 @@ public PollerFlux, WebAppCollectionInner> begi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WebAppCollectionInner> beginChangeVnet( + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux changeVnetAsync( String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { - Mono>> mono = changeVnetWithResponseAsync(resourceGroupName, name, vnetInfo, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class); + return new PagedFlux<>( + () -> changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo, context), + nextLink -> changeVnetNextSinglePageAsync(nextLink)); } /** @@ -2523,16 +2541,9 @@ public PollerFlux, WebAppCollectionInner> begi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeVnetAsync( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { - Mono>> mono = changeVnetWithResponseAsync(resourceGroupName, name, vnetInfo); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable changeVnet(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { + return new PagedIterable<>(changeVnetAsync(resourceGroupName, name, vnetInfo)); } /** @@ -2547,50 +2558,10 @@ public Mono changeVnetAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeVnetAsync( + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable changeVnet( String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { - Mono>> mono = changeVnetWithResponseAsync(resourceGroupName, name, vnetInfo, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); - } - - /** - * Description for Move an App Service Environment to a different VNET. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param vnetInfo Specification for using a Virtual Network. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner changeVnet(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { - return changeVnetAsync(resourceGroupName, name, vnetInfo).block(); - } - - /** - * Description for Move an App Service Environment to a different VNET. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param vnetInfo Specification for using a Virtual Network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner changeVnet( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { - return changeVnetAsync(resourceGroupName, name, vnetInfo, context).block(); + return new PagedIterable<>(changeVnetAsync(resourceGroupName, name, vnetInfo, context)); } /** @@ -2672,6 +2643,7 @@ public Mono>> listDiagnosticsW new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDiagnostics( this.client.getEndpoint(), @@ -2852,6 +2824,7 @@ public Mono> getDiagnosticsItemWith new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getDiagnosticsItem( this.client.getEndpoint(), @@ -3037,6 +3010,7 @@ public Mono> getInboundNetworkDep new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInboundNetworkDependenciesEndpoints( this.client.getEndpoint(), @@ -3214,6 +3188,7 @@ public Mono> listMultiRolePoolsSinglePage new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRolePools( this.client.getEndpoint(), @@ -3380,6 +3355,7 @@ public Mono> getMultiRolePoolWithResponseAsync new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getMultiRolePool( this.client.getEndpoint(), @@ -3562,6 +3538,7 @@ public Mono>> createOrUpdateMultiRolePoolWithResponseA } else { multiRolePoolEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateMultiRolePool( this.client.getEndpoint(), @@ -3585,8 +3562,9 @@ public Mono>> createOrUpdateMultiRolePoolWithResponseA * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool( - String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + public PollerFlux, WorkerPoolResourceInner> + beginCreateOrUpdateMultiRolePoolAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { Mono>> mono = createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope); return this @@ -3608,8 +3586,9 @@ public PollerFlux, WorkerPoolResourceInner> * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool( - String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + public PollerFlux, WorkerPoolResourceInner> + beginCreateOrUpdateMultiRolePoolAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { Mono>> mono = createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope, context); return this @@ -3618,6 +3597,42 @@ public PollerFlux, WorkerPoolResourceInner> mono, this.client.getHttpPipeline(), WorkerPoolResourceInner.class, WorkerPoolResourceInner.class); } + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope).getSyncPoller(); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope, context) + .getSyncPoller(); + } + /** * Description for Create or update a multi-role pool. * @@ -3632,14 +3647,9 @@ public PollerFlux, WorkerPoolResourceInner> @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateMultiRolePoolAsync( String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { - Mono>> mono = - createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WorkerPoolResourceInner.class, WorkerPoolResourceInner.class) + return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3657,14 +3667,9 @@ public Mono createOrUpdateMultiRolePoolAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateMultiRolePoolAsync( String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { - Mono>> mono = - createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WorkerPoolResourceInner.class, WorkerPoolResourceInner.class) + return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3796,6 +3801,7 @@ public Mono> updateMultiRolePoolWithResponseAs } else { multiRolePoolEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateMultiRolePool( this.client.getEndpoint(), @@ -3992,6 +3998,7 @@ public Mono> listMultiRolePoolInsta new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRolePoolInstanceMetricDefinitions( this.client.getEndpoint(), @@ -4179,6 +4186,7 @@ public Mono> listMultiRoleMetricDef new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRoleMetricDefinitions( this.client.getEndpoint(), @@ -4356,6 +4364,7 @@ public Mono> listMultiRolePoolSkusSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRolePoolSkus( this.client.getEndpoint(), @@ -4528,6 +4537,7 @@ public Mono> listMultiRoleUsagesSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRoleUsages( this.client.getEndpoint(), @@ -4691,6 +4701,7 @@ public Mono>> listOperationsWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOperations( this.client.getEndpoint(), @@ -4867,6 +4878,7 @@ public Mono> getOutboundNetworkD new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getOutboundNetworkDependenciesEndpoints( this.client.getEndpoint(), @@ -5033,6 +5045,7 @@ public Mono> rebootWithResponseAsync(String resourceGroupName, St new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .reboot( this.client.getEndpoint(), @@ -5114,7 +5127,7 @@ public void reboot(String resourceGroupName, String name, Context context) { * @return collection of App Service apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> resumeWithResponseAsync(String resourceGroupName, String name) { + public Mono> resumeSinglePageAsync(String resourceGroupName, String name) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -5136,15 +5149,39 @@ public Mono>> resumeWithResponseAsync(String resourceG } return FluxUtil .withContext( - context -> - service - .resume( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + context -> { + Mono>> mono = + service + .resume( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResultAsync( + mono, + this.client.getHttpPipeline(), + WebAppCollectionInner.class, + WebAppCollectionInner.class) + .last() + .flatMap(this.client::getLroFinalResultOrError)); + }) + .>map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } @@ -5160,7 +5197,7 @@ public Mono>> resumeWithResponseAsync(String resourceG * @return collection of App Service apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> resumeWithResponseAsync( + public Mono> resumeSinglePageAsync( String resourceGroupName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -5181,55 +5218,35 @@ public Mono>> resumeWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - return service - .resume( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Resume an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WebAppCollectionInner> beginResume( - String resourceGroupName, String name) { - Mono>> mono = resumeWithResponseAsync(resourceGroupName, name); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class); - } - - /** - * Description for Resume an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WebAppCollectionInner> beginResume( - String resourceGroupName, String name, Context context) { - Mono>> mono = resumeWithResponseAsync(resourceGroupName, name, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class); + context = this.client.mergeContext(context); + Mono>> mono = + service + .resume( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResultAsync( + mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) + .last() + .flatMap(this.client::getLroFinalResultOrError)) + .map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)); } /** @@ -5242,15 +5259,10 @@ public PollerFlux, WebAppCollectionInner> begi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resumeAsync(String resourceGroupName, String name) { - Mono>> mono = resumeWithResponseAsync(resourceGroupName, name); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux resumeAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> resumeSinglePageAsync(resourceGroupName, name), nextLink -> resumeNextSinglePageAsync(nextLink)); } /** @@ -5264,15 +5276,11 @@ public Mono resumeAsync(String resourceGroupName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resumeAsync(String resourceGroupName, String name, Context context) { - Mono>> mono = resumeWithResponseAsync(resourceGroupName, name, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux resumeAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> resumeSinglePageAsync(resourceGroupName, name, context), + nextLink -> resumeNextSinglePageAsync(nextLink)); } /** @@ -5285,9 +5293,9 @@ public Mono resumeAsync(String resourceGroupName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner resume(String resourceGroupName, String name) { - return resumeAsync(resourceGroupName, name).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable resume(String resourceGroupName, String name) { + return new PagedIterable<>(resumeAsync(resourceGroupName, name)); } /** @@ -5301,9 +5309,9 @@ public WebAppCollectionInner resume(String resourceGroupName, String name) { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner resume(String resourceGroupName, String name, Context context) { - return resumeAsync(resourceGroupName, name, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable resume(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(resumeAsync(resourceGroupName, name, context)); } /** @@ -5394,6 +5402,7 @@ public Mono> listAppServicePlansSinglePageAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listAppServicePlans( this.client.getEndpoint(), @@ -5572,6 +5581,7 @@ public Mono> listWebAppsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebApps( this.client.getEndpoint(), @@ -5711,7 +5721,7 @@ public PagedIterable listWebApps(String resourceGroupName, String nam * @return collection of App Service apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> suspendWithResponseAsync(String resourceGroupName, String name) { + public Mono> suspendSinglePageAsync(String resourceGroupName, String name) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -5733,15 +5743,39 @@ public Mono>> suspendWithResponseAsync(String resource } return FluxUtil .withContext( - context -> - service - .suspend( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + context -> { + Mono>> mono = + service + .suspend( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResultAsync( + mono, + this.client.getHttpPipeline(), + WebAppCollectionInner.class, + WebAppCollectionInner.class) + .last() + .flatMap(this.client::getLroFinalResultOrError)); + }) + .>map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } @@ -5757,7 +5791,7 @@ public Mono>> suspendWithResponseAsync(String resource * @return collection of App Service apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> suspendWithResponseAsync( + public Mono> suspendSinglePageAsync( String resourceGroupName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -5778,55 +5812,35 @@ public Mono>> suspendWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - return service - .suspend( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Suspend an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WebAppCollectionInner> beginSuspend( - String resourceGroupName, String name) { - Mono>> mono = suspendWithResponseAsync(resourceGroupName, name); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class); - } - - /** - * Description for Suspend an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WebAppCollectionInner> beginSuspend( - String resourceGroupName, String name, Context context) { - Mono>> mono = suspendWithResponseAsync(resourceGroupName, name, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class); + context = this.client.mergeContext(context); + Mono>> mono = + service + .suspend( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResultAsync( + mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) + .last() + .flatMap(this.client::getLroFinalResultOrError)) + .map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)); } /** @@ -5839,15 +5853,10 @@ public PollerFlux, WebAppCollectionInner> begi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono suspendAsync(String resourceGroupName, String name) { - Mono>> mono = suspendWithResponseAsync(resourceGroupName, name); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux suspendAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> suspendSinglePageAsync(resourceGroupName, name), nextLink -> suspendNextSinglePageAsync(nextLink)); } /** @@ -5861,15 +5870,11 @@ public Mono suspendAsync(String resourceGroupName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono suspendAsync(String resourceGroupName, String name, Context context) { - Mono>> mono = suspendWithResponseAsync(resourceGroupName, name, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WebAppCollectionInner.class, WebAppCollectionInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux suspendAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> suspendSinglePageAsync(resourceGroupName, name, context), + nextLink -> suspendNextSinglePageAsync(nextLink)); } /** @@ -5882,9 +5887,9 @@ public Mono suspendAsync(String resourceGroupName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner suspend(String resourceGroupName, String name) { - return suspendAsync(resourceGroupName, name).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable suspend(String resourceGroupName, String name) { + return new PagedIterable<>(suspendAsync(resourceGroupName, name)); } /** @@ -5898,9 +5903,9 @@ public WebAppCollectionInner suspend(String resourceGroupName, String name) { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of App Service apps. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner suspend(String resourceGroupName, String name, Context context) { - return suspendAsync(resourceGroupName, name, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable suspend(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(suspendAsync(resourceGroupName, name, context)); } /** @@ -5998,6 +6003,7 @@ public Mono> listUsagesSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listUsages( this.client.getEndpoint(), @@ -6222,6 +6228,7 @@ public Mono> listWorkerPoolsSinglePageAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWorkerPools( this.client.getEndpoint(), @@ -6397,6 +6404,7 @@ public Mono> getWorkerPoolWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getWorkerPool( this.client.getEndpoint(), @@ -6600,6 +6608,7 @@ public Mono>> createOrUpdateWorkerPoolWithResponseAsyn } else { workerPoolEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateWorkerPool( this.client.getEndpoint(), @@ -6625,7 +6634,7 @@ public Mono>> createOrUpdateWorkerPoolWithResponseAsyn * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPool( + public PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPoolAsync( String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { Mono>> mono = createOrUpdateWorkerPoolWithResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope); @@ -6649,7 +6658,7 @@ public PollerFlux, WorkerPoolResourceInner> * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPool( + public PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPoolAsync( String resourceGroupName, String name, String workerPoolName, @@ -6677,16 +6686,10 @@ public PollerFlux, WorkerPoolResourceInner> * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateWorkerPoolAsync( + public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPool( String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { - Mono>> mono = - createOrUpdateWorkerPoolWithResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WorkerPoolResourceInner.class, WorkerPoolResourceInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + return beginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope) + .getSyncPoller(); } /** @@ -6703,21 +6706,14 @@ public Mono createOrUpdateWorkerPoolAsync( * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateWorkerPoolAsync( + public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPool( String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope, Context context) { - Mono>> mono = - createOrUpdateWorkerPoolWithResponseAsync( - resourceGroupName, name, workerPoolName, workerPoolEnvelope, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), WorkerPoolResourceInner.class, WorkerPoolResourceInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + return beginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) + .getSyncPoller(); } /** @@ -6733,9 +6729,11 @@ public Mono createOrUpdateWorkerPoolAsync( * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkerPoolResourceInner createOrUpdateWorkerPool( + public Mono createOrUpdateWorkerPoolAsync( String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { - return createOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).block(); + return beginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -6752,14 +6750,15 @@ public WorkerPoolResourceInner createOrUpdateWorkerPool( * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkerPoolResourceInner createOrUpdateWorkerPool( + public Mono createOrUpdateWorkerPoolAsync( String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope, Context context) { - return createOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) - .block(); + return beginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -6775,15 +6774,57 @@ public WorkerPoolResourceInner createOrUpdateWorkerPool( * @return worker pool of an App Service Environment ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWorkerPoolWithResponseAsync( + public WorkerPoolResourceInner createOrUpdateWorkerPool( String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { + return createOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).block(); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Worker pool of an App Service Environment ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner createOrUpdateWorkerPool( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context) { + return createOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) + .block(); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Worker pool of an App Service Environment ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWorkerPoolWithResponseAsync( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } @@ -6869,6 +6910,7 @@ public Mono> updateWorkerPoolWithResponseAsync } else { workerPoolEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateWorkerPool( this.client.getEndpoint(), @@ -7085,6 +7127,7 @@ public Mono> listWorkerPoolInstance new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWorkerPoolInstanceMetricDefinitions( this.client.getEndpoint(), @@ -7287,6 +7330,7 @@ public Mono> listWebWorkerMetricDef new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebWorkerMetricDefinitions( this.client.getEndpoint(), @@ -7479,6 +7523,7 @@ public Mono> listWorkerPoolSkusSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWorkerPoolSkus( this.client.getEndpoint(), @@ -7670,6 +7715,7 @@ public Mono> listWebWorkerUsagesSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebWorkerUsages( this.client.getEndpoint(), @@ -7764,1430 +7810,139 @@ public PagedIterable listWebWorkerUsages( } /** - * Description for Create or update an App Service Environment. + * Get the next page of items. * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param hostingEnvironmentEnvelope App Service Environment ARM resource. + * @param nextLink The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service Environment ARM resource. + * @return collection of App Service Environments. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (hostingEnvironmentEnvelope == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter hostingEnvironmentEnvelope is required and cannot be null.")); - } else { - hostingEnvironmentEnvelope.validate(); + public Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - hostingEnvironmentEnvelope, - context)) + .withContext(context -> service.listNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } /** - * Description for Create or update an App Service Environment. + * Get the next page of items. * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param hostingEnvironmentEnvelope App Service Environment ARM resource. + * @param nextLink The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service Environment ARM resource. + * @return collection of App Service Environments. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (hostingEnvironmentEnvelope == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter hostingEnvironmentEnvelope is required and cannot be null.")); - } else { - hostingEnvironmentEnvelope.validate(); + public Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - hostingEnvironmentEnvelope, - context); + .listNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** - * Description for Create or update an App Service Environment. + * Get the next page of items. * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param hostingEnvironmentEnvelope App Service Environment ARM resource. + * @param nextLink The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service Environment ARM resource. + * @return collection of App Service Environments. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + public Mono> listByResourceGroupNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listByResourceGroupNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } /** - * Description for Create or update an App Service Environment. + * Get the next page of items. * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param hostingEnvironmentEnvelope App Service Environment ARM resource. + * @param nextLink The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service Environment ARM resource. + * @return collection of App Service Environments. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String name, - AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, name, hostingEnvironmentEnvelope, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + public Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** - * Description for Create or update an App Service Environment. + * Get the next page of items. * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param hostingEnvironmentEnvelope App Service Environment ARM resource. + * @param nextLink The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service Environment ARM resource. + * @return collection of stamp capacities. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AppServiceEnvironmentResourceInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, name, hostingEnvironmentEnvelope).block(); - } - - /** - * Description for Create or update an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param hostingEnvironmentEnvelope App Service Environment ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppServiceEnvironmentResourceInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String name, - AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context) - .block(); - } - - /** - * Description for Delete an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service - * Environment contains resources. The default is <code>false</code>. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String name, Boolean forceDelete) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - forceDelete, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Delete an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service - * Environment contains resources. The default is <code>false</code>. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String name, Boolean forceDelete, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - forceDelete, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Delete an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service - * Environment contains resources. The default is <code>false</code>. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String name, Boolean forceDelete) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, name, forceDelete) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Delete an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service - * Environment contains resources. The default is <code>false</code>. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String name, Boolean forceDelete, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, name, forceDelete, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Delete an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String name) { - final Boolean forceDelete = null; - final Context context = null; - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, name, forceDelete) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Delete an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service - * Environment contains resources. The default is <code>false</code>. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String name, Boolean forceDelete) { - beginDeleteWithoutPollingAsync(resourceGroupName, name, forceDelete).block(); - } - - /** - * Description for Delete an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service - * Environment contains resources. The default is <code>false</code>. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String name, Boolean forceDelete, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, name, forceDelete, context).block(); - } - - /** - * Description for Delete an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String name) { - final Boolean forceDelete = null; - final Context context = null; - beginDeleteWithoutPollingAsync(resourceGroupName, name, forceDelete).block(); - } - - /** - * Description for Move an App Service Environment to a different VNET. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param vnetInfo Specification for using a Virtual Network. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginChangeVnetWithoutPollingWithResponseAsync( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (vnetInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter vnetInfo is required and cannot be null.")); - } else { - vnetInfo.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginChangeVnetWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - vnetInfo, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Move an App Service Environment to a different VNET. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param vnetInfo Specification for using a Virtual Network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginChangeVnetWithoutPollingWithResponseAsync( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (vnetInfo == null) { - return Mono.error(new IllegalArgumentException("Parameter vnetInfo is required and cannot be null.")); - } else { - vnetInfo.validate(); - } - return service - .beginChangeVnetWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - vnetInfo, - context); - } - - /** - * Description for Move an App Service Environment to a different VNET. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param vnetInfo Specification for using a Virtual Network. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginChangeVnetWithoutPollingAsync( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { - return beginChangeVnetWithoutPollingWithResponseAsync(resourceGroupName, name, vnetInfo) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Move an App Service Environment to a different VNET. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param vnetInfo Specification for using a Virtual Network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginChangeVnetWithoutPollingAsync( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { - return beginChangeVnetWithoutPollingWithResponseAsync(resourceGroupName, name, vnetInfo, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Move an App Service Environment to a different VNET. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param vnetInfo Specification for using a Virtual Network. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner beginChangeVnetWithoutPolling( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { - return beginChangeVnetWithoutPollingAsync(resourceGroupName, name, vnetInfo).block(); - } - - /** - * Description for Move an App Service Environment to a different VNET. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param vnetInfo Specification for using a Virtual Network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner beginChangeVnetWithoutPolling( - String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { - return beginChangeVnetWithoutPollingAsync(resourceGroupName, name, vnetInfo, context).block(); - } - - /** - * Description for Create or update a multi-role pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateMultiRolePoolWithoutPollingWithResponseAsync( - String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (multiRolePoolEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null.")); - } else { - multiRolePoolEnvelope.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateMultiRolePoolWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - multiRolePoolEnvelope, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Create or update a multi-role pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateMultiRolePoolWithoutPollingWithResponseAsync( - String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (multiRolePoolEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null.")); - } else { - multiRolePoolEnvelope.validate(); - } - return service - .beginCreateOrUpdateMultiRolePoolWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - multiRolePoolEnvelope, - context); - } - - /** - * Description for Create or update a multi-role pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateMultiRolePoolWithoutPollingAsync( - String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { - return beginCreateOrUpdateMultiRolePoolWithoutPollingWithResponseAsync( - resourceGroupName, name, multiRolePoolEnvelope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create or update a multi-role pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateMultiRolePoolWithoutPollingAsync( - String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { - return beginCreateOrUpdateMultiRolePoolWithoutPollingWithResponseAsync( - resourceGroupName, name, multiRolePoolEnvelope, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create or update a multi-role pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkerPoolResourceInner beginCreateOrUpdateMultiRolePoolWithoutPolling( - String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { - return beginCreateOrUpdateMultiRolePoolWithoutPollingAsync(resourceGroupName, name, multiRolePoolEnvelope) - .block(); - } - - /** - * Description for Create or update a multi-role pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param multiRolePoolEnvelope Worker pool of an App Service Environment ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkerPoolResourceInner beginCreateOrUpdateMultiRolePoolWithoutPolling( - String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { - return beginCreateOrUpdateMultiRolePoolWithoutPollingAsync( - resourceGroupName, name, multiRolePoolEnvelope, context) - .block(); - } - - /** - * Description for Resume an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginResumeWithoutPollingWithResponseAsync( - String resourceGroupName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginResumeWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Resume an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginResumeWithoutPollingWithResponseAsync( - String resourceGroupName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginResumeWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Resume an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginResumeWithoutPollingAsync(String resourceGroupName, String name) { - return beginResumeWithoutPollingWithResponseAsync(resourceGroupName, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Resume an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginResumeWithoutPollingAsync( - String resourceGroupName, String name, Context context) { - return beginResumeWithoutPollingWithResponseAsync(resourceGroupName, name, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Resume an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner beginResumeWithoutPolling(String resourceGroupName, String name) { - return beginResumeWithoutPollingAsync(resourceGroupName, name).block(); - } - - /** - * Description for Resume an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner beginResumeWithoutPolling(String resourceGroupName, String name, Context context) { - return beginResumeWithoutPollingAsync(resourceGroupName, name, context).block(); - } - - /** - * Description for Suspend an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginSuspendWithoutPollingWithResponseAsync( - String resourceGroupName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginSuspendWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Suspend an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginSuspendWithoutPollingWithResponseAsync( - String resourceGroupName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginSuspendWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Suspend an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginSuspendWithoutPollingAsync(String resourceGroupName, String name) { - return beginSuspendWithoutPollingWithResponseAsync(resourceGroupName, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Suspend an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginSuspendWithoutPollingAsync( - String resourceGroupName, String name, Context context) { - return beginSuspendWithoutPollingWithResponseAsync(resourceGroupName, name, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Suspend an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner beginSuspendWithoutPolling(String resourceGroupName, String name) { - return beginSuspendWithoutPollingAsync(resourceGroupName, name).block(); - } - - /** - * Description for Suspend an App Service Environment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebAppCollectionInner beginSuspendWithoutPolling(String resourceGroupName, String name, Context context) { - return beginSuspendWithoutPollingAsync(resourceGroupName, name, context).block(); - } - - /** - * Description for Create or update a worker pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param workerPoolName Name of the worker pool. - * @param workerPoolEnvelope Worker pool of an App Service Environment ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWorkerPoolWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (workerPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (workerPoolEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null.")); - } else { - workerPoolEnvelope.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWorkerPoolWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - workerPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - workerPoolEnvelope, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Create or update a worker pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param workerPoolName Name of the worker pool. - * @param workerPoolEnvelope Worker pool of an App Service Environment ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWorkerPoolWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String workerPoolName, - WorkerPoolResourceInner workerPoolEnvelope, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (workerPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (workerPoolEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null.")); - } else { - workerPoolEnvelope.validate(); - } - return service - .beginCreateOrUpdateWorkerPoolWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - workerPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - workerPoolEnvelope, - context); - } - - /** - * Description for Create or update a worker pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param workerPoolName Name of the worker pool. - * @param workerPoolEnvelope Worker pool of an App Service Environment ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWorkerPoolWithoutPollingAsync( - String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { - return beginCreateOrUpdateWorkerPoolWithoutPollingWithResponseAsync( - resourceGroupName, name, workerPoolName, workerPoolEnvelope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create or update a worker pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param workerPoolName Name of the worker pool. - * @param workerPoolEnvelope Worker pool of an App Service Environment ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWorkerPoolWithoutPollingAsync( - String resourceGroupName, - String name, - String workerPoolName, - WorkerPoolResourceInner workerPoolEnvelope, - Context context) { - return beginCreateOrUpdateWorkerPoolWithoutPollingWithResponseAsync( - resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create or update a worker pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param workerPoolName Name of the worker pool. - * @param workerPoolEnvelope Worker pool of an App Service Environment ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkerPoolResourceInner beginCreateOrUpdateWorkerPoolWithoutPolling( - String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { - return beginCreateOrUpdateWorkerPoolWithoutPollingAsync( - resourceGroupName, name, workerPoolName, workerPoolEnvelope) - .block(); - } - - /** - * Description for Create or update a worker pool. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service Environment. - * @param workerPoolName Name of the worker pool. - * @param workerPoolEnvelope Worker pool of an App Service Environment ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return worker pool of an App Service Environment ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkerPoolResourceInner beginCreateOrUpdateWorkerPoolWithoutPolling( - String resourceGroupName, - String name, - String workerPoolName, - WorkerPoolResourceInner workerPoolEnvelope, - Context context) { - return beginCreateOrUpdateWorkerPoolWithoutPollingAsync( - resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service Environments. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.listNext(nextLink, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service Environments. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - return service - .listNext(nextLink, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service Environments. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listByResourceGroupNextSinglePageAsync( - String nextLink) { + public Mono> listCapacitiesNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } return FluxUtil - .withContext(context -> service.listByResourceGroupNext(nextLink, context)) - .>map( + .withContext(context -> service.listCapacitiesNext(nextLink, context)) + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -9207,16 +7962,16 @@ public Mono> listByResourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of App Service Environments. + * @return collection of stamp capacities. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + public Mono> listCapacitiesNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service - .listByResourceGroupNext(nextLink, context) + .listCapacitiesNext(nextLink, context) .map( res -> new PagedResponseBase<>( @@ -9235,16 +7990,16 @@ public Mono> listByResourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of stamp capacities. + * @return collection of App Service apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listCapacitiesNextSinglePageAsync(String nextLink) { + public Mono> changeVnetNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } return FluxUtil - .withContext(context -> service.listCapacitiesNext(nextLink, context)) - .>map( + .withContext(context -> service.changeVnetNext(nextLink, context)) + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -9264,15 +8019,16 @@ public Mono> listCapacitiesNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of stamp capacities. + * @return collection of App Service apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listCapacitiesNextSinglePageAsync(String nextLink, Context context) { + public Mono> changeVnetNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service - .listCapacitiesNext(nextLink, context) + .changeVnetNext(nextLink, context) .map( res -> new PagedResponseBase<>( @@ -9329,6 +8085,7 @@ public Mono> listCapacitiesNextSinglePageAsync if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInboundNetworkDependenciesEndpointsNext(nextLink, context) .map( @@ -9386,6 +8143,7 @@ public Mono> listMultiRolePoolsNextSingle if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRolePoolsNext(nextLink, context) .map( @@ -9444,6 +8202,7 @@ public Mono> listMultiRolePoolsNextSingle if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRolePoolInstanceMetricDefinitionsNext(nextLink, context) .map( @@ -9502,6 +8261,7 @@ public Mono> listMultiRoleMetricDef if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRoleMetricDefinitionsNext(nextLink, context) .map( @@ -9559,6 +8319,7 @@ public Mono> listMultiRolePoolSkusNextSinglePageAsyn if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRolePoolSkusNext(nextLink, context) .map( @@ -9615,6 +8376,7 @@ public Mono> listMultiRoleUsagesNextSinglePageAsync(St if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMultiRoleUsagesNext(nextLink, context) .map( @@ -9673,6 +8435,7 @@ public Mono> listMultiRoleUsagesNextSinglePageAsync(St if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getOutboundNetworkDependenciesEndpointsNext(nextLink, context) .map( @@ -9686,6 +8449,63 @@ public Mono> listMultiRoleUsagesNextSinglePageAsync(St null)); } + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resumeNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.resumeNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resumeNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .resumeNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + /** * Get the next page of items. * @@ -9730,6 +8550,7 @@ public Mono> listAppServicePlansNextSinglePag if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listAppServicePlansNext(nextLink, context) .map( @@ -9786,6 +8607,7 @@ public Mono> listWebAppsNextSinglePageAsync(String next if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebAppsNext(nextLink, context) .map( @@ -9799,6 +8621,63 @@ public Mono> listWebAppsNextSinglePageAsync(String next null)); } + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> suspendNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.suspendNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> suspendNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .suspendNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + /** * Get the next page of items. * @@ -9842,6 +8721,7 @@ public Mono> listUsagesNextSinglePageAsync(Str if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listUsagesNext(nextLink, context) .map( @@ -9899,6 +8779,7 @@ public Mono> listWorkerPoolsNextSinglePag if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWorkerPoolsNext(nextLink, context) .map( @@ -9957,6 +8838,7 @@ public Mono> listWorkerPoolsNextSinglePag if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWorkerPoolInstanceMetricDefinitionsNext(nextLink, context) .map( @@ -10015,6 +8897,7 @@ public Mono> listWebWorkerMetricDef if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebWorkerMetricDefinitionsNext(nextLink, context) .map( @@ -10071,6 +8954,7 @@ public Mono> listWorkerPoolSkusNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWorkerPoolSkusNext(nextLink, context) .map( @@ -10127,6 +9011,7 @@ public Mono> listWebWorkerUsagesNextSinglePageAsync(St if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebWorkerUsagesNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServicePlansClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServicePlansClient.java index 0b8a3421c074..ea67ff9cf97a 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServicePlansClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/AppServicePlansClient.java @@ -31,6 +31,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AppServicePlanCollectionInner; import com.azure.resourcemanager.appservice.fluent.inner.AppServicePlanInner; @@ -114,7 +115,7 @@ Mono> listByResourceGroup( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + "/{name}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getByResourceGroup( @HostParam("$host") String endpoint, @@ -353,7 +354,7 @@ Mono>> listVnets( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + "/{name}/virtualNetworkConnections/{vnetName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getVnetFromServerFarm( @HostParam("$host") String endpoint, @@ -416,7 +417,7 @@ Mono>> listRoutesForVnet( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + "/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono>> getRouteForVnet( @HostParam("$host") String endpoint, @@ -493,21 +494,6 @@ Mono> rebootWorker( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" - + "/{name}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AppServicePlanInner appServicePlan, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -624,6 +610,7 @@ public Mono> listSinglePageAsync(Boolean deta new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -815,6 +802,7 @@ public Mono> listByResourceGroupSinglePageAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), @@ -974,6 +962,7 @@ public Mono> getByResourceGroupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1154,6 +1143,7 @@ public Mono>> createOrUpdateWithResponseAsync( } else { appServicePlan.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -1177,7 +1167,7 @@ public Mono>> createOrUpdateWithResponseAsync( * @return app Service plan. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, AppServicePlanInner> beginCreateOrUpdate( + public PollerFlux, AppServicePlanInner> beginCreateOrUpdateAsync( String resourceGroupName, String name, AppServicePlanInner appServicePlan) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, appServicePlan); @@ -1200,7 +1190,7 @@ public PollerFlux, AppServicePlanInner> beginCre * @return app Service plan. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, AppServicePlanInner> beginCreateOrUpdate( + public PollerFlux, AppServicePlanInner> beginCreateOrUpdateAsync( String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, appServicePlan, context); @@ -1210,6 +1200,41 @@ public PollerFlux, AppServicePlanInner> beginCre mono, this.client.getHttpPipeline(), AppServicePlanInner.class, AppServicePlanInner.class); } + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AppServicePlanInner> beginCreateOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return beginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan).getSyncPoller(); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AppServicePlanInner> beginCreateOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan, context).getSyncPoller(); + } + /** * Description for Creates or updates an App Service Plan. * @@ -1224,14 +1249,9 @@ public PollerFlux, AppServicePlanInner> beginCre @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync( String resourceGroupName, String name, AppServicePlanInner appServicePlan) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, name, appServicePlan); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), AppServicePlanInner.class, AppServicePlanInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1249,14 +1269,9 @@ public Mono createOrUpdateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync( String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, name, appServicePlan, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), AppServicePlanInner.class, AppServicePlanInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1371,6 +1386,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1533,6 +1549,7 @@ public Mono> updateWithResponseAsync( } else { appServicePlan.validate(); } + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -1709,6 +1726,7 @@ public Mono>> listCapabilitiesWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listCapabilities( this.client.getEndpoint(), @@ -1894,6 +1912,7 @@ public Mono> getHybridConnectionWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getHybridConnection( this.client.getEndpoint(), @@ -2093,6 +2112,7 @@ public Mono> deleteHybridConnectionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteHybridConnection( this.client.getEndpoint(), @@ -2275,6 +2295,7 @@ public Mono> listHybridConnectionKeysWithResp new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHybridConnectionKeys( this.client.getEndpoint(), @@ -2483,6 +2504,7 @@ public Mono> listWebAppsByHybridConnectionSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebAppsByHybridConnection( this.client.getEndpoint(), @@ -2665,6 +2687,7 @@ public Mono> getHybridConnectionPlanLimitW new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getHybridConnectionPlanLimit( this.client.getEndpoint(), @@ -2843,6 +2866,7 @@ public Mono> listHybridConnectionsSinglePag new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHybridConnections( this.client.getEndpoint(), @@ -3016,6 +3040,7 @@ public Mono> restartWebAppsWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .restartWebApps( this.client.getEndpoint(), @@ -3236,6 +3261,7 @@ public Mono> listWebAppsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebApps( this.client.getEndpoint(), @@ -3466,6 +3492,7 @@ public Mono> getServerFarmSkusWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getServerFarmSkus( this.client.getEndpoint(), @@ -3647,6 +3674,7 @@ public Mono> listUsagesSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listUsages( this.client.getEndpoint(), @@ -3857,6 +3885,7 @@ public Mono>> listVnetsWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listVnets( this.client.getEndpoint(), @@ -4033,6 +4062,7 @@ public Mono> getVnetFromServerFarmWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getVnetFromServerFarm( this.client.getEndpoint(), @@ -4225,6 +4255,7 @@ public Mono> getVnetGatewayWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getVnetGateway( this.client.getEndpoint(), @@ -4449,6 +4480,7 @@ public Mono> updateVnetGatewayWithResponseAsync( } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateVnetGateway( this.client.getEndpoint(), @@ -4668,6 +4700,7 @@ public Mono>> listRoutesForVnetWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listRoutesForVnet( this.client.getEndpoint(), @@ -4860,6 +4893,7 @@ public Mono>> getRouteForVnetWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getRouteForVnet( this.client.getEndpoint(), @@ -5077,6 +5111,7 @@ public Mono> createOrUpdateVnetRouteWithResponseAsync( } else { route.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateVnetRoute( this.client.getEndpoint(), @@ -5291,6 +5326,7 @@ public Mono> deleteVnetRouteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteVnetRoute( this.client.getEndpoint(), @@ -5490,6 +5526,7 @@ public Mono> updateVnetRouteWithResponseAsync( } else { route.validate(); } + context = this.client.mergeContext(context); return service .updateVnetRoute( this.client.getEndpoint(), @@ -5695,6 +5732,7 @@ public Mono> rebootWorkerWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .rebootWorker( this.client.getEndpoint(), @@ -5772,195 +5810,6 @@ public void rebootWorker(String resourceGroupName, String name, String workerNam rebootWorkerAsync(resourceGroupName, name, workerName, context).block(); } - /** - * Description for Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service plan. - * @param appServicePlan App Service plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String name, AppServicePlanInner appServicePlan) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (appServicePlan == null) { - return Mono.error(new IllegalArgumentException("Parameter appServicePlan is required and cannot be null.")); - } else { - appServicePlan.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - appServicePlan, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service plan. - * @param appServicePlan App Service plan. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (appServicePlan == null) { - return Mono.error(new IllegalArgumentException("Parameter appServicePlan is required and cannot be null.")); - } else { - appServicePlan.validate(); - } - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - appServicePlan, - context); - } - - /** - * Description for Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service plan. - * @param appServicePlan App Service plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String name, AppServicePlanInner appServicePlan) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, name, appServicePlan) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service plan. - * @param appServicePlan App Service plan. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, name, appServicePlan, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service plan. - * @param appServicePlan App Service plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppServicePlanInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String name, AppServicePlanInner appServicePlan) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, name, appServicePlan).block(); - } - - /** - * Description for Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the App Service plan. - * @param appServicePlan App Service plan. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return app Service plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppServicePlanInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, name, appServicePlan, context).block(); - } - /** * Get the next page of items. * @@ -6004,6 +5853,7 @@ public Mono> listNextSinglePageAsync(String n if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -6061,6 +5911,7 @@ public Mono> listByResourceGroupNextSinglePag if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -6118,6 +5969,7 @@ public Mono> listWebAppsByHybridConnectionNextSinglePageAs if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebAppsByHybridConnectionNext(nextLink, context) .map( @@ -6175,6 +6027,7 @@ public Mono> listHybridConnectionsNextSingl if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHybridConnectionsNext(nextLink, context) .map( @@ -6231,6 +6084,7 @@ public Mono> listWebAppsNextSinglePageAsync(String next if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebAppsNext(nextLink, context) .map( @@ -6287,6 +6141,7 @@ public Mono> listUsagesNextSinglePageAsync(Str if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listUsagesNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificateRegistrationProvidersClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificateRegistrationProvidersClient.java index d9a4bc50e874..6f119194d036 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificateRegistrationProvidersClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificateRegistrationProvidersClient.java @@ -126,6 +126,7 @@ public Mono> listOperationsSinglePag new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOperations(this.client.getEndpoint(), this.client.getApiVersion(), context) .map( @@ -241,6 +242,7 @@ public Mono> listOperationsNextSingl if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOperationsNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java index bdb48e2f64ba..948e95fe9f06 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/CertificatesClient.java @@ -226,6 +226,7 @@ public Mono> listSinglePageAsync(Context context new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -369,6 +370,7 @@ public Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), @@ -527,6 +529,7 @@ public Mono> getByResourceGroupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -709,6 +712,7 @@ public Mono> createOrUpdateWithResponseAsync( } else { certificateEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -883,6 +887,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1047,6 +1052,7 @@ public Mono> updateWithResponseAsync( } else { certificateEnvelope.validate(); } + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -1187,6 +1193,7 @@ public Mono> listNextSinglePageAsync(String next if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -1244,6 +1251,7 @@ public Mono> listByResourceGroupNextSinglePageAs if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DeletedWebAppsClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DeletedWebAppsClient.java index 15b135befa77..7583e86abf31 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DeletedWebAppsClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DeletedWebAppsClient.java @@ -172,6 +172,7 @@ public Mono> listSinglePageAsync(Context context new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -312,6 +313,7 @@ public Mono> listByLocationSinglePageAsync(Strin new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByLocation( this.client.getEndpoint(), @@ -468,6 +470,7 @@ public Mono> getDeletedWebAppByLocationWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getDeletedWebAppByLocation( this.client.getEndpoint(), @@ -600,6 +603,7 @@ public Mono> listNextSinglePageAsync(String next if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -656,6 +660,7 @@ public Mono> listByLocationNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByLocationNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DiagnosticsClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DiagnosticsClient.java index 5f300f8935d7..d2119d09811f 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DiagnosticsClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DiagnosticsClient.java @@ -584,6 +584,7 @@ public Mono> listHostingEnvironmentDetector new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHostingEnvironmentDetectorResponses( this.client.getEndpoint(), @@ -781,6 +782,7 @@ public Mono> getHostingEnvironmentDetectorRespon new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getHostingEnvironmentDetectorResponse( this.client.getEndpoint(), @@ -1062,6 +1064,7 @@ public Mono> listSiteDetectorResponsesSingl new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDetectorResponses( this.client.getEndpoint(), @@ -1257,6 +1260,7 @@ public Mono> getSiteDetectorResponseWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteDetectorResponse( this.client.getEndpoint(), @@ -1536,6 +1540,7 @@ public Mono> listSiteDiagnosticCategories new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDiagnosticCategories( this.client.getEndpoint(), @@ -1715,6 +1720,7 @@ public Mono> getSiteDiagnosticCategoryWithResp new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteDiagnosticCategory( this.client.getEndpoint(), @@ -1911,6 +1917,7 @@ public Mono> listSiteAnalysesSinglePageAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteAnalyses( this.client.getEndpoint(), @@ -2104,6 +2111,7 @@ public Mono> getSiteAnalysisWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteAnalysis( this.client.getEndpoint(), @@ -2327,6 +2335,7 @@ public Mono> executeSiteAnalysisWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .executeSiteAnalysis( this.client.getEndpoint(), @@ -2630,6 +2639,7 @@ public Mono> listSiteDetectorsSinglePageA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDetectors( this.client.getEndpoint(), @@ -2823,6 +2833,7 @@ public Mono> getSiteDetectorWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteDetector( this.client.getEndpoint(), @@ -3046,6 +3057,7 @@ public Mono> executeSiteDetectorWithRe new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .executeSiteDetector( this.client.getEndpoint(), @@ -3347,6 +3359,7 @@ public Mono> listSiteDetectorResponsesSlotS new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDetectorResponsesSlot( this.client.getEndpoint(), @@ -3560,6 +3573,7 @@ public Mono> getSiteDetectorResponseSlotWithResp new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteDetectorResponseSlot( this.client.getEndpoint(), @@ -3861,6 +3875,7 @@ public Mono> listSiteDiagnosticCategories new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDiagnosticCategoriesSlot( this.client.getEndpoint(), @@ -4054,6 +4069,7 @@ public Mono> getSiteDiagnosticCategorySlotWith new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteDiagnosticCategorySlot( this.client.getEndpoint(), @@ -4266,6 +4282,7 @@ public Mono> listSiteAnalysesSlotSinglePa new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteAnalysesSlot( this.client.getEndpoint(), @@ -4479,6 +4496,7 @@ public Mono> getSiteAnalysisSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteAnalysisSlot( this.client.getEndpoint(), @@ -4730,6 +4748,7 @@ public Mono> executeSiteAnalysisSlotWithRespon new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .executeSiteAnalysisSlot( this.client.getEndpoint(), @@ -5069,6 +5088,7 @@ public Mono> listSiteDetectorsSlotSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDetectorsSlot( this.client.getEndpoint(), @@ -5282,6 +5302,7 @@ public Mono> getSiteDetectorSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteDetectorSlot( this.client.getEndpoint(), @@ -5533,6 +5554,7 @@ public Mono> executeSiteDetectorSlotWi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .executeSiteDetectorSlot( this.client.getEndpoint(), @@ -5809,6 +5831,7 @@ public Mono> listHostingEnvironmentDetector if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHostingEnvironmentDetectorResponsesNext(nextLink, context) .map( @@ -5866,6 +5889,7 @@ public Mono> listSiteDetectorResponsesNextS if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDetectorResponsesNext(nextLink, context) .map( @@ -5924,6 +5948,7 @@ public Mono> listSiteDiagnosticCategories if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDiagnosticCategoriesNext(nextLink, context) .map( @@ -5981,6 +6006,7 @@ public Mono> listSiteAnalysesNextSinglePa if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteAnalysesNext(nextLink, context) .map( @@ -6038,6 +6064,7 @@ public Mono> listSiteDetectorsNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDetectorsNext(nextLink, context) .map( @@ -6096,6 +6123,7 @@ public Mono> listSiteDetectorResponsesSlotN if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDetectorResponsesSlotNext(nextLink, context) .map( @@ -6154,6 +6182,7 @@ public Mono> listSiteDiagnosticCategories if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDiagnosticCategoriesSlotNext(nextLink, context) .map( @@ -6211,6 +6240,7 @@ public Mono> listSiteAnalysesSlotNextSing if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteAnalysesSlotNext(nextLink, context) .map( @@ -6268,6 +6298,7 @@ public Mono> listSiteDetectorsSlotNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteDetectorsSlotNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainRegistrationProvidersClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainRegistrationProvidersClient.java index 7eed1cecc2b6..f8c2dd735509 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainRegistrationProvidersClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainRegistrationProvidersClient.java @@ -124,6 +124,7 @@ public Mono> listOperationsSinglePag new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOperations(this.client.getEndpoint(), this.client.getApiVersion(), context) .map( @@ -239,6 +240,7 @@ public Mono> listOperationsNextSingl if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOperationsNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java index 3e7157c3002c..8f0670685147 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java @@ -31,6 +31,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.DomainAvailabilityCheckResultInner; import com.azure.resourcemanager.appservice.fluent.inner.DomainCollectionInner; @@ -282,21 +283,6 @@ Mono> renew( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" - + "/domains/{domainName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("domainName") String domainName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DomainInner domain, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -391,6 +377,7 @@ public Mono> checkAvailabilityWithR } NameIdentifierInner identifier = new NameIdentifierInner(); identifier.withName(name); + context = this.client.mergeContext(context); return service .checkAvailability( this.client.getEndpoint(), @@ -539,6 +526,7 @@ public Mono> listSinglePageAsync(Context context) { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -661,6 +649,7 @@ public Mono> getControlCenterSsoReq new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getControlCenterSsoRequest( this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context); @@ -815,6 +804,7 @@ public Mono> listRecommendationsSinglePageAsy } else { parameters.validate(); } + context = this.client.mergeContext(context); return service .listRecommendations( this.client.getEndpoint(), @@ -975,6 +965,7 @@ public Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), @@ -1134,6 +1125,7 @@ public Mono> getByResourceGroupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1314,6 +1306,7 @@ public Mono>> createOrUpdateWithResponseAsync( } else { domain.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -1337,7 +1330,7 @@ public Mono>> createOrUpdateWithResponseAsync( * @return information about a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, DomainInner> beginCreateOrUpdate( + public PollerFlux, DomainInner> beginCreateOrUpdateAsync( String resourceGroupName, String domainName, DomainInner domain) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, domainName, domain); return this @@ -1359,7 +1352,7 @@ public PollerFlux, DomainInner> beginCreateOrUpdate( * @return information about a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, DomainInner> beginCreateOrUpdate( + public PollerFlux, DomainInner> beginCreateOrUpdateAsync( String resourceGroupName, String domainName, DomainInner domain, Context context) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, domainName, domain, context); @@ -1369,6 +1362,41 @@ public PollerFlux, DomainInner> beginCreateOrUpdate( mono, this.client.getHttpPipeline(), DomainInner.class, DomainInner.class); } + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Information about a domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DomainInner> beginCreateOrUpdate( + String resourceGroupName, String domainName, DomainInner domain) { + return beginCreateOrUpdateAsync(resourceGroupName, domainName, domain).getSyncPoller(); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Information about a domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DomainInner> beginCreateOrUpdate( + String resourceGroupName, String domainName, DomainInner domain, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, domainName, domain, context).getSyncPoller(); + } + /** * Description for Creates or updates a domain. * @@ -1382,13 +1410,9 @@ public PollerFlux, DomainInner> beginCreateOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domain) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, domainName, domain); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), DomainInner.class, DomainInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, domainName, domain) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1406,14 +1430,9 @@ public Mono createOrUpdateAsync(String resourceGroupName, String do @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync( String resourceGroupName, String domainName, DomainInner domain, Context context) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, domainName, domain, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), DomainInner.class, DomainInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, domainName, domain, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1534,6 +1553,7 @@ public Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1742,6 +1762,7 @@ public Mono> updateWithResponseAsync( } else { domain.validate(); } + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -1925,6 +1946,7 @@ public Mono> listOwnershipIdentifi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOwnershipIdentifiers( this.client.getEndpoint(), @@ -2102,6 +2124,7 @@ public Mono> getOwnershipIdentifierWith new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getOwnershipIdentifier( this.client.getEndpoint(), @@ -2315,6 +2338,7 @@ public Mono> createOrUpdateOwnershipIde } else { domainOwnershipIdentifier.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateOwnershipIdentifier( this.client.getEndpoint(), @@ -2528,6 +2552,7 @@ public Mono> deleteOwnershipIdentifierWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteOwnershipIdentifier( this.client.getEndpoint(), @@ -2722,6 +2747,7 @@ public Mono> updateOwnershipIdentifierW } else { domainOwnershipIdentifier.validate(); } + context = this.client.mergeContext(context); return service .updateOwnershipIdentifier( this.client.getEndpoint(), @@ -2922,6 +2948,7 @@ public Mono> renewWithResponseAsync(String resourceGroupName, Str new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .renew( this.client.getEndpoint(), @@ -2993,195 +3020,6 @@ public void renew(String resourceGroupName, String domainName, Context context) renewAsync(resourceGroupName, domainName, context).block(); } - /** - * Description for Creates or updates a domain. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param domainName Name of the domain. - * @param domain Information about a domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String domainName, DomainInner domain) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (domain == null) { - return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); - } else { - domain.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - domainName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - domain, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Creates or updates a domain. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param domainName Name of the domain. - * @param domain Information about a domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String domainName, DomainInner domain, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (domain == null) { - return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); - } else { - domain.validate(); - } - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - domainName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - domain, - context); - } - - /** - * Description for Creates or updates a domain. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param domainName Name of the domain. - * @param domain Information about a domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String domainName, DomainInner domain) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, domainName, domain) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates or updates a domain. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param domainName Name of the domain. - * @param domain Information about a domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String domainName, DomainInner domain, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, domainName, domain, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates or updates a domain. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param domainName Name of the domain. - * @param domain Information about a domain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DomainInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String domainName, DomainInner domain) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, domainName, domain).block(); - } - - /** - * Description for Creates or updates a domain. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param domainName Name of the domain. - * @param domain Information about a domain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a domain. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DomainInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String domainName, DomainInner domain, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, domainName, domain, context).block(); - } - /** * Get the next page of items. * @@ -3225,6 +3063,7 @@ public Mono> listNextSinglePageAsync(String nextLink, if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -3282,6 +3121,7 @@ public Mono> listRecommendationsNextSinglePag if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listRecommendationsNext(nextLink, context) .map( @@ -3338,6 +3178,7 @@ public Mono> listByResourceGroupNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -3396,6 +3237,7 @@ public Mono> listOwnershipIdentifi if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOwnershipIdentifiersNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ProvidersClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ProvidersClient.java index 6c201bb0d137..cffc01e192bd 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ProvidersClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ProvidersClient.java @@ -166,6 +166,7 @@ public Mono> getAvailableStacksSing new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getAvailableStacks(this.client.getEndpoint(), osTypeSelected, this.client.getApiVersion(), context) .map( @@ -322,6 +323,7 @@ public Mono> listOperationsSinglePag new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOperations(this.client.getEndpoint(), this.client.getApiVersion(), context) .map( @@ -464,6 +466,7 @@ public Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -618,6 +621,7 @@ public Mono> getAvailableStacksNext if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getAvailableStacksNext(nextLink, context) .map( @@ -675,6 +679,7 @@ public Mono> listOperationsNextSingl if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listOperationsNext(nextLink, context) .map( @@ -733,6 +738,7 @@ public Mono> getAvailableStacksOnPr if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getAvailableStacksOnPremNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java index a596d839a508..07d5fee61bd7 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java @@ -395,6 +395,7 @@ public Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -577,6 +578,7 @@ public Mono> resetAllFiltersWithResponseAsync(Context context) { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .resetAllFilters( this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context); @@ -698,6 +700,7 @@ public Mono> disableRecommendationForSubscriptionWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .disableRecommendationForSubscription( this.client.getEndpoint(), name, this.client.getSubscriptionId(), this.client.getApiVersion(), context); @@ -865,6 +868,7 @@ public Mono> listHistoryForHostingEnvironment new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHistoryForHostingEnvironment( this.client.getEndpoint(), @@ -1128,6 +1132,7 @@ public Mono> listRecommendedRulesForHostingEn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listRecommendedRulesForHostingEnvironment( this.client.getEndpoint(), @@ -1381,6 +1386,7 @@ public Mono> disableAllForHostingEnvironmentWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .disableAllForHostingEnvironment( this.client.getEndpoint(), @@ -1559,6 +1565,7 @@ public Mono> resetAllFiltersForHostingEnvironmentWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .resetAllFiltersForHostingEnvironment( this.client.getEndpoint(), @@ -1754,6 +1761,7 @@ public Mono> getRuleDetailsByHostingEnvironmen new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getRuleDetailsByHostingEnvironment( this.client.getEndpoint(), @@ -2047,6 +2055,7 @@ public Mono> disableRecommendationForHostingEnvironmentWithRespon new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .disableRecommendationForHostingEnvironment( this.client.getEndpoint(), @@ -2239,6 +2248,7 @@ public Mono> listHistoryForWebAppSinglePageAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHistoryForWebApp( this.client.getEndpoint(), @@ -2487,6 +2497,7 @@ public Mono> listRecommendedRulesForWebAppSin new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listRecommendedRulesForWebApp( this.client.getEndpoint(), @@ -2712,6 +2723,7 @@ public Mono> disableAllForWebAppWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .disableAllForWebApp( this.client.getEndpoint(), @@ -2862,6 +2874,7 @@ public Mono> resetAllFiltersForWebAppWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .resetAllFiltersForWebApp( this.client.getEndpoint(), @@ -3037,6 +3050,7 @@ public Mono> getRuleDetailsByWebAppWithRespons new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getRuleDetailsByWebApp( this.client.getEndpoint(), @@ -3299,6 +3313,7 @@ public Mono> disableRecommendationForSiteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .disableRecommendationForSite( this.client.getEndpoint(), @@ -3420,6 +3435,7 @@ public Mono> listNextSinglePageAsync(String n if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -3478,6 +3494,7 @@ public Mono> listHistoryForHostingEnvironment if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHistoryForHostingEnvironmentNext(nextLink, context) .map( @@ -3536,6 +3553,7 @@ public Mono> listRecommendedRulesForHostingEn if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listRecommendedRulesForHostingEnvironmentNext(nextLink, context) .map( @@ -3593,6 +3611,7 @@ public Mono> listHistoryForWebAppNextSinglePa if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHistoryForWebAppNext(nextLink, context) .map( @@ -3650,6 +3669,7 @@ public Mono> listRecommendedRulesForWebAppNex if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listRecommendedRulesForWebAppNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceHealthMetadatasClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceHealthMetadatasClient.java index 4726bbf10c53..8ca374b254ad 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceHealthMetadatasClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceHealthMetadatasClient.java @@ -235,6 +235,7 @@ public Mono> listSinglePageAsync(Cont new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -379,6 +380,7 @@ public Mono> listByResourceGroupSingl new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), @@ -547,6 +549,7 @@ public Mono> listBySiteSinglePageAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBySite( this.client.getEndpoint(), @@ -713,6 +716,7 @@ public Mono> getBySiteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getBySite( this.client.getEndpoint(), @@ -898,6 +902,7 @@ public Mono> listBySiteSlotSinglePage new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBySiteSlot( this.client.getEndpoint(), @@ -1080,6 +1085,7 @@ public Mono> getBySiteSlotWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getBySiteSlot( this.client.getEndpoint(), @@ -1218,6 +1224,7 @@ public Mono> listNextSinglePageAsync( if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -1275,6 +1282,7 @@ public Mono> listByResourceGroupNextS if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -1332,6 +1340,7 @@ public Mono> listBySiteNextSinglePage if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBySiteNext(nextLink, context) .map( @@ -1389,6 +1398,7 @@ public Mono> listBySiteSlotNextSingle if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBySiteSlotNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java index 09e58a2cc6bb..35d8dd6d0983 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java @@ -326,6 +326,7 @@ public Mono> getPublishingUserWithResponseAsync(Context cont new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service.getPublishingUser(this.client.getEndpoint(), this.client.getApiVersion(), context); } @@ -451,6 +452,7 @@ public Mono> updatePublishingUserWithResponseAsync(UserInner } else { userDetails.validate(); } + context = this.client.mergeContext(context); return service .updatePublishingUser(this.client.getEndpoint(), this.client.getApiVersion(), userDetails, context); } @@ -576,6 +578,7 @@ public Mono> listSourceControlsSinglePageAsync new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSourceControls(this.client.getEndpoint(), this.client.getApiVersion(), context) .map( @@ -697,6 +700,7 @@ public Mono> getSourceControlWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter sourceControlType is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSourceControl(this.client.getEndpoint(), sourceControlType, this.client.getApiVersion(), context); } @@ -845,6 +849,7 @@ public Mono> updateSourceControlWithResponseAsync( } else { requestMessage.validate(); } + context = this.client.mergeContext(context); return service .updateSourceControl( this.client.getEndpoint(), sourceControlType, this.client.getApiVersion(), requestMessage, context); @@ -1004,6 +1009,7 @@ public Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -1207,6 +1213,7 @@ public Mono> checkNameAvailabilityWithRe request.withName(name); request.withType(type); request.withIsFqdn(isFqdn); + context = this.client.mergeContext(context); return service .checkNameAvailability( this.client.getEndpoint(), @@ -1361,6 +1368,7 @@ public Mono> getSubscriptionDeploymentLocatio new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSubscriptionDeploymentLocations( this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context); @@ -1528,6 +1536,7 @@ public Mono> listGeoRegionsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listGeoRegions( this.client.getEndpoint(), @@ -1766,6 +1775,7 @@ public Mono> listSiteIdentifiersAssignedToHostnam } NameIdentifierInner nameIdentifier = new NameIdentifierInner(); nameIdentifier.withName(name); + context = this.client.mergeContext(context); return service .listSiteIdentifiersAssignedToHostname( this.client.getEndpoint(), @@ -1911,6 +1921,7 @@ public Mono> listPremierAddOnOffersSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPremierAddOnOffers( this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) @@ -2037,6 +2048,7 @@ public Mono> listSkusWithResponseAsync(Context context) new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context); } @@ -2183,6 +2195,7 @@ public Mono> verifyHostingEnvironmen } else { parameters.validate(); } + context = this.client.mergeContext(context); return service .verifyHostingEnvironmentVnet( this.client.getEndpoint(), @@ -2358,6 +2371,7 @@ public Mono> moveWithResponseAsync( } else { moveResourceEnvelope.validate(); } + context = this.client.mergeContext(context); return service .move( this.client.getEndpoint(), @@ -2520,6 +2534,7 @@ public Mono> validateWithResponseAsync( } else { validateRequest.validate(); } + context = this.client.mergeContext(context); return service .validate( this.client.getEndpoint(), @@ -2696,6 +2711,7 @@ public Mono> validateMoveWithResponseAsync( } else { moveResourceEnvelope.validate(); } + context = this.client.mergeContext(context); return service .validateMove( this.client.getEndpoint(), @@ -2817,6 +2833,7 @@ public Mono> listSourceControlsNextSinglePageA if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSourceControlsNext(nextLink, context) .map( @@ -2874,6 +2891,7 @@ public Mono> listBillingMetersNextSinglePageAsy if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBillingMetersNext(nextLink, context) .map( @@ -2930,6 +2948,7 @@ public Mono> listGeoRegionsNextSinglePageAsync(Str if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listGeoRegionsNext(nextLink, context) .map( @@ -2988,6 +3007,7 @@ public Mono> listSiteIdentifiersAssignedToHostnam if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteIdentifiersAssignedToHostnameNext(nextLink, context) .map( @@ -3045,6 +3065,7 @@ public Mono> listPremierAddOnOffersNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPremierAddOnOffersNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/StaticSitesClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/StaticSitesClient.java index fac6576dbf67..349cb28c6e69 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/StaticSitesClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/StaticSitesClient.java @@ -572,6 +572,7 @@ public Mono> listSinglePageAsync(Conte new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -716,6 +717,7 @@ public Mono> listByResourceGroupSingle new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), @@ -875,6 +877,7 @@ public Mono> getByResourceGroupWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1058,6 +1061,7 @@ public Mono> createOrUpdateStaticSiteWithRe } else { staticSiteEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateStaticSite( this.client.getEndpoint(), @@ -1233,6 +1237,7 @@ public Mono> deleteStaticSiteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteStaticSite( this.client.getEndpoint(), @@ -1398,6 +1403,7 @@ public Mono> updateStaticSiteWithResponseAs } else { staticSiteEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateStaticSite( this.client.getEndpoint(), @@ -1592,6 +1598,7 @@ public Mono> listStaticSiteUsersSi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteUsers( this.client.getEndpoint(), @@ -1783,6 +1790,7 @@ public Mono> deleteStaticSiteUserWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteStaticSiteUser( this.client.getEndpoint(), @@ -1991,6 +1999,7 @@ public Mono> updateStaticSiteUserWithRe } else { staticSiteUserEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateStaticSiteUser( this.client.getEndpoint(), @@ -2207,6 +2216,7 @@ public Mono> getStaticSiteBuildsS new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getStaticSiteBuilds( this.client.getEndpoint(), @@ -2382,6 +2392,7 @@ public Mono> getStaticSiteBuildWithRes new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getStaticSiteBuild( this.client.getEndpoint(), @@ -2566,6 +2577,7 @@ public Mono> deleteStaticSiteBuildWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteStaticSiteBuild( this.client.getEndpoint(), @@ -2744,6 +2756,7 @@ public Mono> createOrUpdateStaticSiteBuildFuncti } else { appSettings.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateStaticSiteBuildFunctionAppSettings( this.client.getEndpoint(), @@ -2948,6 +2961,7 @@ public Mono> listStati new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteBuildFunctions( this.client.getEndpoint(), @@ -3130,6 +3144,7 @@ public Mono> listStaticSiteBuildFunctionAppSetti new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteBuildFunctionAppSettings( this.client.getEndpoint(), @@ -3319,6 +3334,7 @@ public Mono> createOrUpdateStaticSiteFunctionApp } else { appSettings.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateStaticSiteFunctionAppSettings( this.client.getEndpoint(), @@ -3520,6 +3536,7 @@ public Mono> createUserR } else { staticSiteUserRolesInvitationEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createUserRolesInvitationLink( this.client.getEndpoint(), @@ -3720,6 +3737,7 @@ public StaticSiteUserInvitationResponseResourceInner createUserRolesInvitationLi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteCustomDomains( this.client.getEndpoint(), @@ -3899,6 +3917,7 @@ public PagedIterable listStaticS new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .createOrUpdateStaticSiteCustomDomain( this.client.getEndpoint(), @@ -4084,6 +4103,7 @@ public Mono> deleteStaticSiteCustomDomainWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteStaticSiteCustomDomain( this.client.getEndpoint(), @@ -4251,6 +4271,7 @@ public Mono> validateCustomDomainCanBeAddedToStaticSiteWithRespon new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .validateCustomDomainCanBeAddedToStaticSite( this.client.getEndpoint(), @@ -4409,6 +4430,7 @@ public Mono> detachStaticSiteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .detachStaticSite( this.client.getEndpoint(), @@ -4568,6 +4590,7 @@ public Mono> listStati new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteFunctions( this.client.getEndpoint(), @@ -4736,6 +4759,7 @@ public Mono> listStaticSiteFunctionAppSettingsWi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteFunctionAppSettings( this.client.getEndpoint(), @@ -4905,6 +4929,7 @@ public Mono> listStaticSiteSecretsWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteSecrets( this.client.getEndpoint(), @@ -5093,6 +5118,7 @@ public Mono> resetStaticSiteApiKeyWithResponseAsync( } else { resetPropertiesEnvelope.validate(); } + context = this.client.mergeContext(context); return service .resetStaticSiteApiKey( this.client.getEndpoint(), @@ -5223,6 +5249,7 @@ public Mono> listNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -5281,6 +5308,7 @@ public Mono> getStaticSitesByResourceG if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getStaticSitesByResourceGroupNext(nextLink, context) .map( @@ -5338,6 +5366,7 @@ public Mono> listStaticSiteUsersNe if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteUsersNext(nextLink, context) .map( @@ -5396,6 +5425,7 @@ public Mono> getStaticSiteBuildsN if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getStaticSiteBuildsNext(nextLink, context) .map( @@ -5454,6 +5484,7 @@ public Mono> getStaticSiteBuildsN if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteBuildFunctionsNext(nextLink, context) .map( @@ -5512,6 +5543,7 @@ public Mono> getStaticSiteBuildsN if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteCustomDomainsNext(nextLink, context) .map( @@ -5570,6 +5602,7 @@ public Mono> listStati if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listStaticSiteFunctionsNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/TopLevelDomainsClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/TopLevelDomainsClient.java index 35435edb0ffd..d9fbced033e4 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/TopLevelDomainsClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/TopLevelDomainsClient.java @@ -178,6 +178,7 @@ public Mono> listSinglePageAsync(Context cont new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -309,6 +310,7 @@ public Mono> getWithResponseAsync(String name, Con new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), name, this.client.getSubscriptionId(), this.client.getApiVersion(), context); @@ -480,6 +482,7 @@ public Mono> listAgreementsSinglePageAsync } else { agreementOption.validate(); } + context = this.client.mergeContext(context); return service .listAgreements( this.client.getEndpoint(), @@ -612,6 +615,7 @@ public Mono> listNextSinglePageAsync(String n if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -669,6 +673,7 @@ public Mono> listAgreementsNextSinglePageA if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listAgreementsNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/WebAppsClient.java b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/WebAppsClient.java index 97a01737de3c..245297cd0889 100644 --- a/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/WebAppsClient.java +++ b/sdk/appservice/mgmt/src/main/java/com/azure/resourcemanager/appservice/fluent/WebAppsClient.java @@ -33,6 +33,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appservice.WebSiteManagementClient; import com.azure.resourcemanager.appservice.fluent.inner.AzureStoragePropertyDictionaryResourceInner; import com.azure.resourcemanager.appservice.fluent.inner.BackupItemCollectionInner; @@ -135,7 +136,8 @@ import java.io.InputStream; import java.io.SequenceInputStream; import java.nio.ByteBuffer; -import java.util.Collections; +import java.util.Enumeration; +import java.util.Iterator; import java.util.List; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -192,7 +194,7 @@ Mono> listByResourceGroup( @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getByResourceGroup( @HostParam("$host") String endpoint, @@ -905,7 +907,7 @@ Mono> listContinuousWebJobs( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/continuouswebjobs/{webJobName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getContinuousWebJob( @HostParam("$host") String endpoint, @@ -1160,7 +1162,7 @@ Mono>> createMSDeployOperation( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/extensions/MSDeploy/log") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getMSDeployLog( @HostParam("$host") String endpoint, @@ -1174,7 +1176,7 @@ Mono> getMSDeployLog( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/functions") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listFunctions( @HostParam("$host") String endpoint, @@ -1202,7 +1204,7 @@ Mono> getFunctionsAdminToken( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/functions/{functionName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getFunction( @HostParam("$host") String endpoint, @@ -1662,7 +1664,7 @@ Mono>> createInstanceMSDeployOperation( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/instances/{instanceId}/extensions/MSDeploy/log") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getInstanceMSDeployLog( @HostParam("$host") String endpoint, @@ -1677,7 +1679,7 @@ Mono> getInstanceMSDeployLog( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/instances/{instanceId}/processes") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcesses( @HostParam("$host") String endpoint, @@ -1692,7 +1694,7 @@ Mono> listInstanceProcesses( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/instances/{instanceId}/processes/{processId}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getInstanceProcess( @HostParam("$host") String endpoint, @@ -1724,7 +1726,7 @@ Mono> deleteInstanceProcess( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/instances/{instanceId}/processes/{processId}/dump") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono getInstanceProcessDump( @HostParam("$host") String endpoint, @@ -1740,7 +1742,7 @@ Mono getInstanceProcessDump( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/instances/{instanceId}/processes/{processId}/modules") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcessModules( @HostParam("$host") String endpoint, @@ -1756,7 +1758,7 @@ Mono> listInstanceProcessModules( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getInstanceProcessModule( @HostParam("$host") String endpoint, @@ -1773,7 +1775,7 @@ Mono> getInstanceProcessModule( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/instances/{instanceId}/processes/{processId}/threads") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcessThreads( @HostParam("$host") String endpoint, @@ -1934,7 +1936,7 @@ Mono> updateSwiftVirtualNetworkConnection( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/networkFeatures/{view}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listNetworkFeatures( @HostParam("$host") String endpoint, @@ -2205,7 +2207,7 @@ Mono> putPrivateAccessVnet( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/processes") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcesses( @HostParam("$host") String endpoint, @@ -2219,7 +2221,7 @@ Mono> listProcesses( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/processes/{processId}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getProcess( @HostParam("$host") String endpoint, @@ -2249,7 +2251,7 @@ Mono> deleteProcess( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/processes/{processId}/dump") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono getProcessDump( @HostParam("$host") String endpoint, @@ -2264,7 +2266,7 @@ Mono getProcessDump( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/processes/{processId}/modules") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcessModules( @HostParam("$host") String endpoint, @@ -2279,7 +2281,7 @@ Mono> listProcessModules( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/processes/{processId}/modules/{baseAddress}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getProcessModule( @HostParam("$host") String endpoint, @@ -2295,7 +2297,7 @@ Mono> getProcessModule( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/processes/{processId}/threads") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcessThreads( @HostParam("$host") String endpoint, @@ -2460,7 +2462,7 @@ Mono>> restoreSnapshot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/siteextensions") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listSiteExtensions( @HostParam("$host") String endpoint, @@ -2474,7 +2476,7 @@ Mono> listSiteExtensions( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/siteextensions/{siteExtensionId}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getSiteExtension( @HostParam("$host") String endpoint, @@ -2548,7 +2550,7 @@ Mono> listSlots( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getSlot( @HostParam("$host") String endpoint, @@ -3173,7 +3175,7 @@ Mono> listContinuousWebJobsSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/continuouswebjobs/{webJobName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getContinuousWebJobSlot( @HostParam("$host") String endpoint, @@ -3445,7 +3447,7 @@ Mono>> createMSDeployOperationSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/extensions/MSDeploy/log") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getMSDeployLogSlot( @HostParam("$host") String endpoint, @@ -3460,7 +3462,7 @@ Mono> getMSDeployLogSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/functions") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceFunctionsSlot( @HostParam("$host") String endpoint, @@ -3490,7 +3492,7 @@ Mono> getFunctionsAdminTokenSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/functions/{functionName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getInstanceFunctionSlot( @HostParam("$host") String endpoint, @@ -3980,7 +3982,7 @@ Mono>> createInstanceMSDeployOperationSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getInstanceMSDeployLogSlot( @HostParam("$host") String endpoint, @@ -3996,7 +3998,7 @@ Mono> getInstanceMSDeployLogSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/instances/{instanceId}/processes") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcessesSlot( @HostParam("$host") String endpoint, @@ -4012,7 +4014,7 @@ Mono> listInstanceProcessesSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/instances/{instanceId}/processes/{processId}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getInstanceProcessSlot( @HostParam("$host") String endpoint, @@ -4046,7 +4048,7 @@ Mono> deleteInstanceProcessSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono getInstanceProcessDumpSlot( @HostParam("$host") String endpoint, @@ -4063,7 +4065,7 @@ Mono getInstanceProcessDumpSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcessModulesSlot( @HostParam("$host") String endpoint, @@ -4080,7 +4082,7 @@ Mono> listInstanceProcessModulesSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getInstanceProcessModuleSlot( @HostParam("$host") String endpoint, @@ -4098,7 +4100,7 @@ Mono> getInstanceProcessModuleSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcessThreadsSlot( @HostParam("$host") String endpoint, @@ -4237,7 +4239,7 @@ Mono> updateSwiftVirtualNetworkConnectionSlot @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/networkFeatures/{view}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listNetworkFeaturesSlot( @HostParam("$host") String endpoint, @@ -4586,7 +4588,7 @@ Mono> getPrivateLinkResources( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/processes") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcessesSlot( @HostParam("$host") String endpoint, @@ -4601,7 +4603,7 @@ Mono> listProcessesSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/processes/{processId}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getProcessSlot( @HostParam("$host") String endpoint, @@ -4633,7 +4635,7 @@ Mono> deleteProcessSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/processes/{processId}/dump") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono getProcessDumpSlot( @HostParam("$host") String endpoint, @@ -4649,7 +4651,7 @@ Mono getProcessDumpSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/processes/{processId}/modules") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcessModulesSlot( @HostParam("$host") String endpoint, @@ -4665,7 +4667,7 @@ Mono> listProcessModulesSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/processes/{processId}/modules/{baseAddress}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getProcessModuleSlot( @HostParam("$host") String endpoint, @@ -4682,7 +4684,7 @@ Mono> getProcessModuleSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/processes/{processId}/threads") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcessThreadsSlot( @HostParam("$host") String endpoint, @@ -4858,7 +4860,7 @@ Mono>> restoreSnapshotSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/siteextensions") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listSiteExtensionsSlot( @HostParam("$host") String endpoint, @@ -4873,7 +4875,7 @@ Mono> listSiteExtensionsSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/siteextensions/{siteExtensionId}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getSiteExtensionSlot( @HostParam("$host") String endpoint, @@ -5169,7 +5171,7 @@ Mono> listTriggeredWebJobsSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/triggeredwebjobs/{webJobName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getTriggeredWebJobSlot( @HostParam("$host") String endpoint, @@ -5201,7 +5203,7 @@ Mono> deleteTriggeredWebJobSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/triggeredwebjobs/{webJobName}/history") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listTriggeredWebJobHistorySlot( @HostParam("$host") String endpoint, @@ -5217,7 +5219,7 @@ Mono> listTriggeredWebJobHistorySlo @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getTriggeredWebJobHistorySlot( @HostParam("$host") String endpoint, @@ -5347,7 +5349,7 @@ Mono> updateVnetConnectionSlot( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getVnetConnectionGatewaySlot( @HostParam("$host") String endpoint, @@ -5620,7 +5622,7 @@ Mono> syncRepository( @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/syncfunctiontriggers") - @ExpectedResponses({200, 204}) + @ExpectedResponses({204}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> syncFunctionTriggers( @HostParam("$host") String endpoint, @@ -5648,7 +5650,7 @@ Mono> listTriggeredWebJobs( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/triggeredwebjobs/{webJobName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getTriggeredWebJob( @HostParam("$host") String endpoint, @@ -5678,7 +5680,7 @@ Mono> deleteTriggeredWebJob( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/triggeredwebjobs/{webJobName}/history") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listTriggeredWebJobHistory( @HostParam("$host") String endpoint, @@ -5693,7 +5695,7 @@ Mono> listTriggeredWebJobHistory( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/triggeredwebjobs/{webJobName}/history/{id}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getTriggeredWebJobHistory( @HostParam("$host") String endpoint, @@ -5815,7 +5817,7 @@ Mono> updateVnetConnection( @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + "/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> getVnetConnectionGateway( @HostParam("$host") String endpoint, @@ -5891,724 +5893,186 @@ Mono> getWebJob( Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") - @ExpectedResponses({200, 202}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SiteInner siteEnvelope, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/backups/{backupId}/restore") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginRestoreWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("backupId") String backupId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RestoreRequestInner request, - Context context); + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/config/publishingcredentials/list") + @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginListPublishingCredentialsWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> listBackupsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/extensions/MSDeploy") - @ExpectedResponses({201, 409}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateMSDeployOperationWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MSDeploy mSDeploy, - Context context); + Mono> listConfigurationsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/functions/{functionName}") - @ExpectedResponses({201}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateFunctionWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("functionName") String functionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FunctionEnvelopeInner functionEnvelope, - Context context); + Mono> listConfigurationSnapshotInfoNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/instances/{instanceId}/extensions/MSDeploy") - @ExpectedResponses({201, 409}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateInstanceMSDeployOperationWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("instanceId") String instanceId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MSDeploy mSDeploy, - Context context); + Mono> listContinuousWebJobsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/migrate") + @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginMigrateStorageWithoutPolling( - @HostParam("$host") String endpoint, - @QueryParam("subscriptionName") String subscriptionName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") StorageMigrationOptions migrationOptions, - Context context); + Mono> listDeploymentsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/migratemysql") + @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginMigrateMySqlWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MigrateMySqlRequest migrationRequestEnvelope, - Context context); + Mono> listDomainOwnershipIdentifiersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/networkTrace/startOperation") - @ExpectedResponses({200, 202}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginStartWebSiteNetworkTraceOperationWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @QueryParam("durationInSeconds") Integer durationInSeconds, - @QueryParam("maxFrameLength") Integer maxFrameLength, - @QueryParam("sasUrl") String sasUrl, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> listFunctionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/restoreFromBackupBlob") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginRestoreFromBackupBlobWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RestoreRequestInner request, - Context context); + Mono> listHostnameBindingsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/restoreFromDeletedApp") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginRestoreFromDeletedAppWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeletedAppRestoreRequest restoreRequest, - Context context); + Mono> listInstanceIdentifiersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/restoreSnapshot") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginRestoreSnapshotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SnapshotRestoreRequest restoreRequest, - Context context); + Mono> listInstanceProcessesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/siteextensions/{siteExtensionId}") - @ExpectedResponses({200, 201, 429}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginInstallSiteExtensionWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("siteExtensionId") String siteExtensionId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> listInstanceProcessModulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slotcopy") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCopyProductionSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CsmCopySlotEntityInner copySlotEntity, - Context context); + Mono> listInstanceProcessThreadsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}") - @ExpectedResponses({200, 202}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SiteInner siteEnvelope, - Context context); + Mono> listSiteBackupsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/backups/{backupId}/restore") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginRestoreSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("backupId") String backupId, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RestoreRequestInner request, - Context context); + Mono> listPerfMonCountersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/config/publishingcredentials/list") + @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginListPublishingCredentialsSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> listProcessesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/extensions/MSDeploy") - @ExpectedResponses({201, 409}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateMSDeployOperationSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MSDeploy mSDeploy, - Context context); + Mono> listProcessModulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/functions/{functionName}") - @ExpectedResponses({201}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateInstanceFunctionSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("functionName") String functionName, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FunctionEnvelopeInner functionEnvelope, - Context context); + Mono> listProcessThreadsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") - @ExpectedResponses({201, 409}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateInstanceMSDeployOperationSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("instanceId") String instanceId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MSDeploy mSDeploy, - Context context); + Mono> listPublicCertificatesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/networkTrace/startOperation") - @ExpectedResponses({200, 202}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginStartWebSiteNetworkTraceOperationSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @QueryParam("durationInSeconds") Integer durationInSeconds, - @PathParam("slot") String slot, - @QueryParam("maxFrameLength") Integer maxFrameLength, - @QueryParam("sasUrl") String sasUrl, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> listSiteExtensionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> - beginApproveOrRejectPrivateEndpointConnectionWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, - Context context); + Mono> listSlotsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202, 204}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginDeletePrivateEndpointConnectionWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> listBackupsSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/restoreFromBackupBlob") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginRestoreFromBackupBlobSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RestoreRequestInner request, - Context context); + Mono> listConfigurationsSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/restoreFromDeletedApp") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginRestoreFromDeletedAppSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeletedAppRestoreRequest restoreRequest, - Context context); + Mono> listConfigurationSnapshotInfoSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/restoreSnapshot") - @ExpectedResponses({200, 202}) + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginRestoreSnapshotSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SnapshotRestoreRequest restoreRequest, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/siteextensions/{siteExtensionId}") - @ExpectedResponses({200, 201, 429}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginInstallSiteExtensionSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("siteExtensionId") String siteExtensionId, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/slotcopy") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCopySlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CsmCopySlotEntityInner copySlotEntity, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/slotsswap") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginSwapSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CsmSlotEntity slotSwapEntity, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/sourcecontrols/web") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateSourceControlSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("slot") String slot, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SiteSourceControlInner siteSourceControl, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slots/{slot}/startNetworkTrace") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginStartNetworkTraceSlotWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @QueryParam("durationInSeconds") Integer durationInSeconds, - @PathParam("slot") String slot, - @QueryParam("maxFrameLength") Integer maxFrameLength, - @QueryParam("sasUrl") String sasUrl, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/slotsswap") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginSwapSlotWithProductionWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CsmSlotEntity slotSwapEntity, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/sourcecontrols/web") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginCreateOrUpdateSourceControlWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SiteSourceControlInner siteSourceControl, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - + "/startNetworkTrace") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> beginStartNetworkTraceWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @QueryParam("durationInSeconds") Integer durationInSeconds, - @QueryParam("maxFrameLength") Integer maxFrameLength, - @QueryParam("sasUrl") String sasUrl, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listBackupsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listConfigurationsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listConfigurationSnapshotInfoNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listContinuousWebJobsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDeploymentsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDomainOwnershipIdentifiersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200, 404}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listFunctionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listHostnameBindingsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listInstanceIdentifiersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200, 404}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listInstanceProcessesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200, 404}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listInstanceProcessModulesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200, 404}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listInstanceProcessThreadsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSiteBackupsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listPerfMonCountersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200, 404}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listProcessesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200, 404}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listProcessModulesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200, 404}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listProcessThreadsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listPublicCertificatesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200, 404}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSiteExtensionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSlotsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listBackupsSlotNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listConfigurationsSlotNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listConfigurationSnapshotInfoSlotNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listContinuousWebJobsSlotNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + Mono> listContinuousWebJobsSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @@ -6626,7 +6090,7 @@ Mono> listDomainOwnershipIdentifiersSlotNext @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceFunctionsSlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @@ -6647,21 +6111,21 @@ Mono> listInstanceIdentifiersSlotNext( @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcessesSlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcessModulesSlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listInstanceProcessThreadsSlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @@ -6682,21 +6146,21 @@ Mono> listPerfMonCountersSlotNext( @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcessesSlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcessModulesSlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listProcessThreadsSlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @@ -6710,7 +6174,7 @@ Mono> listPublicCertificatesSlotNext( @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listSiteExtensionsSlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @@ -6745,7 +6209,7 @@ Mono> listTriggeredWebJobsSlotNext( @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listTriggeredWebJobHistorySlotNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @@ -6794,7 +6258,7 @@ Mono> listTriggeredWebJobsNext( @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listTriggeredWebJobHistoryNext( @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); @@ -6879,6 +6343,7 @@ public Mono> listSinglePageAsync(Context context) { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) .map( @@ -7028,6 +6493,7 @@ public Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), @@ -7231,6 +6697,7 @@ public Mono> getByResourceGroupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -7413,6 +6880,7 @@ public Mono>> createOrUpdateWithResponseAsync( } else { siteEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -7437,7 +6905,7 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a web app, a mobile app backend, or an API app. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteInner> beginCreateOrUpdate( + public PollerFlux, SiteInner> beginCreateOrUpdateAsync( String resourceGroupName, String name, SiteInner siteEnvelope) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, siteEnvelope); return this @@ -7460,7 +6928,7 @@ public PollerFlux, SiteInner> beginCreateOrUpdate( * @return a web app, a mobile app backend, or an API app. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteInner> beginCreateOrUpdate( + public PollerFlux, SiteInner> beginCreateOrUpdateAsync( String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, siteEnvelope, context); @@ -7470,6 +6938,43 @@ public PollerFlux, SiteInner> beginCreateOrUpdate( mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class); } + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A web app, a mobile app backend, or an API app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteInner> beginCreateOrUpdate( + String resourceGroupName, String name, SiteInner siteEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope).getSyncPoller(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A web app, a mobile app backend, or an API app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteInner> beginCreateOrUpdate( + String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope, context).getSyncPoller(); + } + /** * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. * @@ -7484,13 +6989,9 @@ public PollerFlux, SiteInner> beginCreateOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, siteEnvelope); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -7509,14 +7010,9 @@ public Mono createOrUpdateAsync(String resourceGroupName, String name @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync( String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, name, siteEnvelope, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class) + return beginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -7641,6 +7137,7 @@ public Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -7860,6 +7357,7 @@ public Mono> updateWithResponseAsync( } else { siteEnvelope.validate(); } + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -8041,6 +7539,7 @@ public Mono> analyzeCustomHostnameWi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .analyzeCustomHostname( this.client.getEndpoint(), @@ -8272,6 +7771,7 @@ public Mono> applySlotConfigToProductionWithResponseAsync( } else { slotSwapEntity.validate(); } + context = this.client.mergeContext(context); return service .applySlotConfigToProduction( this.client.getEndpoint(), @@ -8444,6 +7944,7 @@ public Mono> backupWithResponseAsync( } else { request.validate(); } + context = this.client.mergeContext(context); return service .backup( this.client.getEndpoint(), @@ -8625,6 +8126,7 @@ public Mono> listBackupsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBackups( this.client.getEndpoint(), @@ -8798,6 +8300,7 @@ public Mono> getBackupStatusWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getBackupStatus( this.client.getEndpoint(), @@ -8979,6 +8482,7 @@ public Mono> deleteBackupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteBackup( this.client.getEndpoint(), @@ -9161,6 +8665,7 @@ public Mono> listBackupStatusSecretsWithResponseAsync( } else { request.validate(); } + context = this.client.mergeContext(context); return service .listBackupStatusSecrets( this.client.getEndpoint(), @@ -9372,6 +8877,7 @@ public Mono>> restoreWithResponseAsync( } else { request.validate(); } + context = this.client.mergeContext(context); return service .restore( this.client.getEndpoint(), @@ -9397,7 +8903,7 @@ public Mono>> restoreWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestore( + public PollerFlux, Void> beginRestoreAsync( String resourceGroupName, String name, String backupId, RestoreRequestInner request) { Mono>> mono = restoreWithResponseAsync(resourceGroupName, name, backupId, request); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); @@ -9417,13 +8923,50 @@ public PollerFlux, Void> beginRestore( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestore( + public PollerFlux, Void> beginRestoreAsync( String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { Mono>> mono = restoreWithResponseAsync(resourceGroupName, name, backupId, request, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Description of a restore request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestore( + String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return beginRestoreAsync(resourceGroupName, name, backupId, request).getSyncPoller(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Description of a restore request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestore( + String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { + return beginRestoreAsync(resourceGroupName, name, backupId, request, context).getSyncPoller(); + } + /** * Description for Restores a specific backup to another app (or deployment slot, if specified). * @@ -9439,12 +8982,9 @@ public PollerFlux, Void> beginRestore( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreAsync( String resourceGroupName, String name, String backupId, RestoreRequestInner request) { - Mono>> mono = restoreWithResponseAsync(resourceGroupName, name, backupId, request); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreAsync(resourceGroupName, name, backupId, request) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -9463,13 +9003,9 @@ public Mono restoreAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreAsync( String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { - Mono>> mono = - restoreWithResponseAsync(resourceGroupName, name, backupId, request, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreAsync(resourceGroupName, name, backupId, request, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -9585,6 +9121,7 @@ public void restore( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getBasicPublishingCredentialsPolicies( this.client.getEndpoint(), @@ -9756,6 +9293,7 @@ public Mono> getFtpAllowed new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getFtpAllowed( this.client.getEndpoint(), @@ -9949,6 +9487,7 @@ public Mono> updateFtpAllo } else { csmPublishingAccessPoliciesEntity.validate(); } + context = this.client.mergeContext(context); return service .updateFtpAllowed( this.client.getEndpoint(), @@ -10135,6 +9674,7 @@ public Mono> getScmAllowed new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getScmAllowed( this.client.getEndpoint(), @@ -10328,6 +9868,7 @@ public Mono> updateScmAllo } else { csmPublishingAccessPoliciesEntity.validate(); } + context = this.client.mergeContext(context); return service .updateScmAllowed( this.client.getEndpoint(), @@ -10523,6 +10064,7 @@ public Mono> listConfigurationsSinglePage new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConfigurations( this.client.getEndpoint(), @@ -10702,6 +10244,7 @@ public Mono> updateApplicationSettingsWithRespon } else { appSettings.validate(); } + context = this.client.mergeContext(context); return service .updateApplicationSettings( this.client.getEndpoint(), @@ -10878,6 +10421,7 @@ public Mono> listApplicationSettingsWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listApplicationSettings( this.client.getEndpoint(), @@ -11061,6 +10605,7 @@ public Mono> updateAuthSettingsWithResponseAsync } else { siteAuthSettings.validate(); } + context = this.client.mergeContext(context); return service .updateAuthSettings( this.client.getEndpoint(), @@ -11237,6 +10782,7 @@ public Mono> getAuthSettingsWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getAuthSettings( this.client.getEndpoint(), @@ -11422,6 +10968,7 @@ public Mono> updateAzureSt } else { azureStorageAccounts.validate(); } + context = this.client.mergeContext(context); return service .updateAzureStorageAccounts( this.client.getEndpoint(), @@ -11604,6 +11151,7 @@ public Mono> listAzureStor new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listAzureStorageAccounts( this.client.getEndpoint(), @@ -11787,6 +11335,7 @@ public Mono> updateBackupConfigurationWithResponseA } else { request.validate(); } + context = this.client.mergeContext(context); return service .updateBackupConfiguration( this.client.getEndpoint(), @@ -11962,6 +11511,7 @@ public Mono> deleteBackupConfigurationWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteBackupConfiguration( this.client.getEndpoint(), @@ -12113,6 +11663,7 @@ public Mono> getBackupConfigurationWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getBackupConfiguration( this.client.getEndpoint(), @@ -12281,6 +11832,7 @@ public Mono> getAppSettingsKeyVaultRe new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getAppSettingsKeyVaultReferences( this.client.getEndpoint(), @@ -12460,6 +12012,7 @@ public Mono> getAppSettingKeyVaultRefer new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getAppSettingKeyVaultReference( this.client.getEndpoint(), @@ -12651,6 +12204,7 @@ public Mono> updateConnectionStringsWi } else { connectionStrings.validate(); } + context = this.client.mergeContext(context); return service .updateConnectionStrings( this.client.getEndpoint(), @@ -12827,6 +12381,7 @@ public Mono> listConnectionStringsWith new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConnectionStrings( this.client.getEndpoint(), @@ -12996,6 +12551,7 @@ public Mono> getDiagnosticLogsConfigurationWithRes new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getDiagnosticLogsConfiguration( this.client.getEndpoint(), @@ -13177,6 +12733,7 @@ public Mono> updateDiagnosticLogsConfigWithRespons } else { siteLogsConfig.validate(); } + context = this.client.mergeContext(context); return service .updateDiagnosticLogsConfig( this.client.getEndpoint(), @@ -13366,6 +12923,7 @@ public Mono> updateMetadataWithResponseAsync( } else { metadata.validate(); } + context = this.client.mergeContext(context); return service .updateMetadata( this.client.getEndpoint(), @@ -13540,6 +13098,7 @@ public Mono> listMetadataWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMetadata( this.client.getEndpoint(), @@ -13707,6 +13266,7 @@ public Mono>> listPublishingCredentialsWithResponseAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPublishingCredentials( this.client.getEndpoint(), @@ -13728,7 +13288,7 @@ public Mono>> listPublishingCredentialsWithResponseAsy * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, UserInner> beginListPublishingCredentials( + public PollerFlux, UserInner> beginListPublishingCredentialsAsync( String resourceGroupName, String name) { Mono>> mono = listPublishingCredentialsWithResponseAsync(resourceGroupName, name); return this @@ -13749,7 +13309,7 @@ public PollerFlux, UserInner> beginListPublishingCredentia * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, UserInner> beginListPublishingCredentials( + public PollerFlux, UserInner> beginListPublishingCredentialsAsync( String resourceGroupName, String name, Context context) { Mono>> mono = listPublishingCredentialsWithResponseAsync(resourceGroupName, name, context); @@ -13759,6 +13319,39 @@ public PollerFlux, UserInner> beginListPublishingCredentia mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class); } + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, UserInner> beginListPublishingCredentials( + String resourceGroupName, String name) { + return beginListPublishingCredentialsAsync(resourceGroupName, name).getSyncPoller(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, UserInner> beginListPublishingCredentials( + String resourceGroupName, String name, Context context) { + return beginListPublishingCredentialsAsync(resourceGroupName, name, context).getSyncPoller(); + } + /** * Description for Gets the Git/FTP publishing credentials of an app. * @@ -13771,13 +13364,9 @@ public PollerFlux, UserInner> beginListPublishingCredentia */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listPublishingCredentialsAsync(String resourceGroupName, String name) { - Mono>> mono = listPublishingCredentialsWithResponseAsync(resourceGroupName, name); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class) + return beginListPublishingCredentialsAsync(resourceGroupName, name) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -13793,14 +13382,9 @@ public Mono listPublishingCredentialsAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listPublishingCredentialsAsync(String resourceGroupName, String name, Context context) { - Mono>> mono = - listPublishingCredentialsWithResponseAsync(resourceGroupName, name, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class) + return beginListPublishingCredentialsAsync(resourceGroupName, name, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -13926,6 +13510,7 @@ public Mono> updateSitePushSettingsWithResponseAsync } else { pushSettings.validate(); } + context = this.client.mergeContext(context); return service .updateSitePushSettings( this.client.getEndpoint(), @@ -14102,6 +13687,7 @@ public Mono> listSitePushSettingsWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSitePushSettings( this.client.getEndpoint(), @@ -14269,6 +13855,7 @@ public Mono> listSlotConfigurationNamesWi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSlotConfigurationNames( this.client.getEndpoint(), @@ -14455,6 +14042,7 @@ public Mono> updateSlotConfigurationNames } else { slotConfigNames.validate(); } + context = this.client.mergeContext(context); return service .updateSlotConfigurationNames( this.client.getEndpoint(), @@ -14637,6 +14225,7 @@ public Mono> getConfigurationWithResponseAsync new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getConfiguration( this.client.getEndpoint(), @@ -14821,6 +14410,7 @@ public Mono> createOrUpdateConfigurationWithRe } else { siteConfig.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateConfiguration( this.client.getEndpoint(), @@ -15010,6 +14600,7 @@ public Mono> updateConfigurationWithResponseAs } else { siteConfig.validate(); } + context = this.client.mergeContext(context); return service .updateConfiguration( this.client.getEndpoint(), @@ -15197,6 +14788,7 @@ public Mono> listConfiguration new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConfigurationSnapshotInfo( this.client.getEndpoint(), @@ -15378,6 +14970,7 @@ public Mono> getConfigurationSnapshotWithRespo new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getConfigurationSnapshot( this.client.getEndpoint(), @@ -15562,6 +15155,7 @@ public Mono> recoverSiteConfigurationSnapshotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .recoverSiteConfigurationSnapshot( this.client.getEndpoint(), @@ -15719,6 +15313,7 @@ public Mono getWebSiteContainerLogsWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getWebSiteContainerLogs( this.client.getEndpoint(), @@ -15773,11 +15368,24 @@ public Flux getWebSiteContainerLogsAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getWebSiteContainerLogs(String resourceGroupName, String name) { - return getWebSiteContainerLogsAsync(resourceGroupName, name) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getWebSiteContainerLogsAsync(resourceGroupName, name) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -15793,11 +15401,24 @@ public InputStream getWebSiteContainerLogs(String resourceGroupName, String name */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getWebSiteContainerLogs(String resourceGroupName, String name, Context context) { - return getWebSiteContainerLogsAsync(resourceGroupName, name, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getWebSiteContainerLogsAsync(resourceGroupName, name, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -15878,6 +15499,7 @@ public Mono getContainerLogsZipWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getContainerLogsZip( this.client.getEndpoint(), @@ -15932,11 +15554,24 @@ public Flux getContainerLogsZipAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getContainerLogsZip(String resourceGroupName, String name) { - return getContainerLogsZipAsync(resourceGroupName, name) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getContainerLogsZipAsync(resourceGroupName, name) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -15952,11 +15587,24 @@ public InputStream getContainerLogsZip(String resourceGroupName, String name) { */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getContainerLogsZip(String resourceGroupName, String name, Context context) { - return getContainerLogsZipAsync(resourceGroupName, name, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getContainerLogsZipAsync(resourceGroupName, name, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -16047,6 +15695,7 @@ public Mono> listContinuousWebJobsSinglePag new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listContinuousWebJobs( this.client.getEndpoint(), @@ -16222,6 +15871,7 @@ public Mono> getContinuousWebJobWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getContinuousWebJob( this.client.getEndpoint(), @@ -16406,6 +16056,7 @@ public Mono> deleteContinuousWebJobWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteContinuousWebJob( this.client.getEndpoint(), @@ -16572,6 +16223,7 @@ public Mono> startContinuousWebJobWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startContinuousWebJob( this.client.getEndpoint(), @@ -16738,6 +16390,7 @@ public Mono> stopContinuousWebJobWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .stopContinuousWebJob( this.client.getEndpoint(), @@ -16903,6 +16556,7 @@ public Mono> listDeploymentsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDeployments( this.client.getEndpoint(), @@ -17076,6 +16730,7 @@ public Mono> getDeploymentWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getDeployment( this.client.getEndpoint(), @@ -17270,6 +16925,7 @@ public Mono> createDeploymentWithResponseAsync( } else { deployment.validate(); } + context = this.client.mergeContext(context); return service .createDeployment( this.client.getEndpoint(), @@ -17459,6 +17115,7 @@ public Mono> deleteDeploymentWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteDeployment( this.client.getEndpoint(), @@ -17626,6 +17283,7 @@ public Mono> listDeploymentLogWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDeploymentLog( this.client.getEndpoint(), @@ -17818,6 +17476,7 @@ public Mono> discoverBackupWithResponseAsync( } else { request.validate(); } + context = this.client.mergeContext(context); return service .discoverBackup( this.client.getEndpoint(), @@ -18006,6 +17665,7 @@ public Mono> listDomainOwnershipIdentifiersSingle new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDomainOwnershipIdentifiers( this.client.getEndpoint(), @@ -18187,6 +17847,7 @@ public Mono> getDomainOwnershipIdentifierWithResponseA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getDomainOwnershipIdentifier( this.client.getEndpoint(), @@ -18406,6 +18067,7 @@ public Mono> createOrUpdateDomainOwnershipIdentifierWi } else { domainOwnershipIdentifier.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateDomainOwnershipIdentifier( this.client.getEndpoint(), @@ -18622,6 +18284,7 @@ public Mono> deleteDomainOwnershipIdentifierWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteDomainOwnershipIdentifier( this.client.getEndpoint(), @@ -18824,6 +18487,7 @@ public Mono> updateDomainOwnershipIdentifierWithRespon } else { domainOwnershipIdentifier.validate(); } + context = this.client.mergeContext(context); return service .updateDomainOwnershipIdentifier( this.client.getEndpoint(), @@ -19025,6 +18689,7 @@ public Mono> getMSDeployStatusWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getMSDeployStatus( this.client.getEndpoint(), @@ -19205,6 +18870,7 @@ public Mono>> createMSDeployOperationWithResponseAsync } else { mSDeploy.validate(); } + context = this.client.mergeContext(context); return service .createMSDeployOperation( this.client.getEndpoint(), @@ -19228,7 +18894,7 @@ public Mono>> createMSDeployOperationWithResponseAsync * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperation( + public PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationAsync( String resourceGroupName, String name, MSDeploy mSDeploy) { Mono>> mono = createMSDeployOperationWithResponseAsync(resourceGroupName, name, mSDeploy); @@ -19251,7 +18917,7 @@ public PollerFlux, MSDeployStatusInner> beginCre * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperation( + public PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationAsync( String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { Mono>> mono = createMSDeployOperationWithResponseAsync(resourceGroupName, name, mSDeploy, context); @@ -19261,6 +18927,41 @@ public PollerFlux, MSDeployStatusInner> beginCre mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class); } + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy MSDeploy ARM PUT information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy) { + return beginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy).getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy MSDeploy ARM PUT information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { + return beginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy, context).getSyncPoller(); + } + /** * Description for Invoke the MSDeploy web app extension. * @@ -19275,14 +18976,9 @@ public PollerFlux, MSDeployStatusInner> beginCre @ServiceMethod(returns = ReturnType.SINGLE) public Mono createMSDeployOperationAsync( String resourceGroupName, String name, MSDeploy mSDeploy) { - Mono>> mono = - createMSDeployOperationWithResponseAsync(resourceGroupName, name, mSDeploy); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class) + return beginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -19300,14 +18996,9 @@ public Mono createMSDeployOperationAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createMSDeployOperationAsync( String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { - Mono>> mono = - createMSDeployOperationWithResponseAsync(resourceGroupName, name, mSDeploy, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class) + return beginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -19422,6 +19113,7 @@ public Mono> getMSDeployLogWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getMSDeployLog( this.client.getEndpoint(), @@ -19598,6 +19290,7 @@ public Mono> listFunctionsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listFunctions( this.client.getEndpoint(), @@ -19761,6 +19454,7 @@ public Mono> getFunctionsAdminTokenWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getFunctionsAdminToken( this.client.getEndpoint(), @@ -19937,6 +19631,7 @@ public Mono> getFunctionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getFunction( this.client.getEndpoint(), @@ -20139,6 +19834,7 @@ public Mono>> createFunctionWithResponseAsync( } else { functionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createFunction( this.client.getEndpoint(), @@ -20164,7 +19860,7 @@ public Mono>> createFunctionWithResponseAsync( * @return function information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, FunctionEnvelopeInner> beginCreateFunction( + public PollerFlux, FunctionEnvelopeInner> beginCreateFunctionAsync( String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { Mono>> mono = createFunctionWithResponseAsync(resourceGroupName, name, functionName, functionEnvelope); @@ -20188,7 +19884,7 @@ public PollerFlux, FunctionEnvelopeInner> begi * @return function information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, FunctionEnvelopeInner> beginCreateFunction( + public PollerFlux, FunctionEnvelopeInner> beginCreateFunctionAsync( String resourceGroupName, String name, String functionName, @@ -20202,6 +19898,48 @@ public PollerFlux, FunctionEnvelopeInner> begi mono, this.client.getHttpPipeline(), FunctionEnvelopeInner.class, FunctionEnvelopeInner.class); } + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, FunctionEnvelopeInner> beginCreateFunction( + String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + return beginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope).getSyncPoller(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, FunctionEnvelopeInner> beginCreateFunction( + String resourceGroupName, + String name, + String functionName, + FunctionEnvelopeInner functionEnvelope, + Context context) { + return beginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope, context) + .getSyncPoller(); + } + /** * Description for Create function for web site, or a deployment slot. * @@ -20217,14 +19955,9 @@ public PollerFlux, FunctionEnvelopeInner> begi @ServiceMethod(returns = ReturnType.SINGLE) public Mono createFunctionAsync( String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { - Mono>> mono = - createFunctionWithResponseAsync(resourceGroupName, name, functionName, functionEnvelope); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), FunctionEnvelopeInner.class, FunctionEnvelopeInner.class) + return beginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -20247,14 +19980,9 @@ public Mono createFunctionAsync( String functionName, FunctionEnvelopeInner functionEnvelope, Context context) { - Mono>> mono = - createFunctionWithResponseAsync(resourceGroupName, name, functionName, functionEnvelope, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), FunctionEnvelopeInner.class, FunctionEnvelopeInner.class) + return beginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -20386,6 +20114,7 @@ public Mono> deleteFunctionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteFunction( this.client.getEndpoint(), @@ -20573,6 +20302,7 @@ public Mono> createOrUpdateFunctionSecretWithResponseAsyn } else { key.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateFunctionSecret( this.client.getEndpoint(), @@ -20778,6 +20508,7 @@ public Mono> deleteFunctionSecretWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteFunctionSecret( this.client.getEndpoint(), @@ -20951,6 +20682,7 @@ public Mono> listFunctionKeysWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listFunctionKeys( this.client.getEndpoint(), @@ -21135,6 +20867,7 @@ public Mono> listFunctionSecretsWithResponseAsync new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listFunctionSecrets( this.client.getEndpoint(), @@ -21309,6 +21042,7 @@ public Mono> listHostKeysWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHostKeys( this.client.getEndpoint(), @@ -21475,6 +21209,7 @@ public Mono> listSyncStatusWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSyncStatus( this.client.getEndpoint(), @@ -21623,6 +21358,7 @@ public Mono> syncFunctionsWithResponseAsync(String resourceGroupN new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .syncFunctions( this.client.getEndpoint(), @@ -21804,6 +21540,7 @@ public Mono> createOrUpdateHostSecretWithResponseAsync( } else { key.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateHostSecret( this.client.getEndpoint(), @@ -22008,6 +21745,7 @@ public Mono> deleteHostSecretWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteHostSecret( this.client.getEndpoint(), @@ -22180,6 +21918,7 @@ public Mono> listHostnameBindingsSinglePageA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHostnameBindings( this.client.getEndpoint(), @@ -22355,6 +22094,7 @@ public Mono> getHostnameBindingWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getHostnameBinding( this.client.getEndpoint(), @@ -22553,6 +22293,7 @@ public Mono> createOrUpdateHostnameBindingWithRes } else { hostnameBinding.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateHostnameBinding( this.client.getEndpoint(), @@ -22744,6 +22485,7 @@ public Mono> deleteHostnameBindingWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteHostnameBinding( this.client.getEndpoint(), @@ -22919,6 +22661,7 @@ public Mono> getHybridConnectionWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getHybridConnection( this.client.getEndpoint(), @@ -23142,6 +22885,7 @@ public Mono> createOrUpdateHybridConnectionWithR } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateHybridConnection( this.client.getEndpoint(), @@ -23370,6 +23114,7 @@ public Mono> deleteHybridConnectionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteHybridConnection( this.client.getEndpoint(), @@ -23576,6 +23321,7 @@ public Mono> updateHybridConnectionWithResponseA } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateHybridConnection( this.client.getEndpoint(), @@ -23785,6 +23531,7 @@ public Mono> listHybridConnectionsWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHybridConnections( this.client.getEndpoint(), @@ -23953,6 +23700,7 @@ public Mono> listRelayServiceConnect new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listRelayServiceConnections( this.client.getEndpoint(), @@ -24132,6 +23880,7 @@ public Mono> getRelayServiceConnecti new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getRelayServiceConnection( this.client.getEndpoint(), @@ -24339,6 +24088,7 @@ public Mono> createOrUpdateRelayServ } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateRelayServiceConnection( this.client.getEndpoint(), @@ -24548,6 +24298,7 @@ public Mono> deleteRelayServiceConnectionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteRelayServiceConnection( this.client.getEndpoint(), @@ -24737,6 +24488,7 @@ public Mono> updateRelayServiceConne } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateRelayServiceConnection( this.client.getEndpoint(), @@ -24943,6 +24695,7 @@ public Mono> listInstanceIdentifiersSinglePageA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceIdentifiers( this.client.getEndpoint(), @@ -25118,6 +24871,7 @@ public Mono> getInstanceInfoWithResponseAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceInfo( this.client.getEndpoint(), @@ -25302,6 +25056,7 @@ public Mono> getInstanceMsDeployStatusWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceMsDeployStatus( this.client.getEndpoint(), @@ -25499,6 +25254,7 @@ public Mono>> createInstanceMSDeployOperationWithRespo } else { mSDeploy.validate(); } + context = this.client.mergeContext(context); return service .createInstanceMSDeployOperation( this.client.getEndpoint(), @@ -25524,7 +25280,7 @@ public Mono>> createInstanceMSDeployOperationWithRespo * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, MSDeployStatusInner> beginCreateInstanceMSDeployOperation( + public PollerFlux, MSDeployStatusInner> beginCreateInstanceMSDeployOperationAsync( String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { Mono>> mono = createInstanceMSDeployOperationWithResponseAsync(resourceGroupName, name, instanceId, mSDeploy); @@ -25548,7 +25304,7 @@ public PollerFlux, MSDeployStatusInner> beginCre * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, MSDeployStatusInner> beginCreateInstanceMSDeployOperation( + public PollerFlux, MSDeployStatusInner> beginCreateInstanceMSDeployOperationAsync( String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { Mono>> mono = createInstanceMSDeployOperationWithResponseAsync(resourceGroupName, name, instanceId, mSDeploy, context); @@ -25558,6 +25314,44 @@ public PollerFlux, MSDeployStatusInner> beginCre mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class); } + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy MSDeploy ARM PUT information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { + return beginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy).getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy MSDeploy ARM PUT information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { + return beginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy, context) + .getSyncPoller(); + } + /** * Description for Invoke the MSDeploy web app extension. * @@ -25573,14 +25367,9 @@ public PollerFlux, MSDeployStatusInner> beginCre @ServiceMethod(returns = ReturnType.SINGLE) public Mono createInstanceMSDeployOperationAsync( String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { - Mono>> mono = - createInstanceMSDeployOperationWithResponseAsync(resourceGroupName, name, instanceId, mSDeploy); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class) + return beginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -25599,14 +25388,9 @@ public Mono createInstanceMSDeployOperationAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createInstanceMSDeployOperationAsync( String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { - Mono>> mono = - createInstanceMSDeployOperationWithResponseAsync(resourceGroupName, name, instanceId, mSDeploy, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class) + return beginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -25734,6 +25518,7 @@ public Mono> getInstanceMSDeployLogWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceMSDeployLog( this.client.getEndpoint(), @@ -25931,6 +25716,7 @@ public Mono> listInstanceProcessesSinglePageAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcesses( this.client.getEndpoint(), @@ -26132,6 +25918,7 @@ public Mono> getInstanceProcessWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceProcess( this.client.getEndpoint(), @@ -26339,6 +26126,7 @@ public Mono> deleteInstanceProcessWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteInstanceProcess( this.client.getEndpoint(), @@ -26531,6 +26319,7 @@ public Mono getInstanceProcessDumpWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceProcessDump( this.client.getEndpoint(), @@ -26600,11 +26389,24 @@ public Flux getInstanceProcessDumpAsync( @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getInstanceProcessDump( String resourceGroupName, String name, String processId, String instanceId) { - return getInstanceProcessDumpAsync(resourceGroupName, name, processId, instanceId) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getInstanceProcessDumpAsync(resourceGroupName, name, processId, instanceId) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -26624,11 +26426,24 @@ public InputStream getInstanceProcessDump( @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getInstanceProcessDump( String resourceGroupName, String name, String processId, String instanceId, Context context) { - return getInstanceProcessDumpAsync(resourceGroupName, name, processId, instanceId, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getInstanceProcessDumpAsync(resourceGroupName, name, processId, instanceId, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -26739,6 +26554,7 @@ public Mono> listInstanceProcessModulesSin new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessModules( this.client.getEndpoint(), @@ -26956,6 +26772,7 @@ public Mono> getInstanceProcessModuleWithRespon new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceProcessModule( this.client.getEndpoint(), @@ -27187,6 +27004,7 @@ public Mono> listInstanceProcessThreadsSin new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessThreads( this.client.getEndpoint(), @@ -27369,6 +27187,7 @@ public Mono> isCloneableWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .isCloneable( this.client.getEndpoint(), @@ -27544,6 +27363,7 @@ public Mono> listSiteBackupsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteBackups( this.client.getEndpoint(), @@ -27708,6 +27528,7 @@ public Mono> listSyncFunctionTriggersWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSyncFunctionTriggers( this.client.getEndpoint(), @@ -27906,6 +27727,7 @@ public Mono>> migrateStorageWithResponseAsync( } else { migrationOptions.validate(); } + context = this.client.mergeContext(context); return service .migrateStorage( this.client.getEndpoint(), @@ -27931,8 +27753,9 @@ public Mono>> migrateStorageWithResponseAsync( * @return response for a migration of app content request. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, StorageMigrationResponseInner> beginMigrateStorage( - String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { + public PollerFlux, StorageMigrationResponseInner> + beginMigrateStorageAsync( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { Mono>> mono = migrateStorageWithResponseAsync(subscriptionName, resourceGroupName, name, migrationOptions); return this @@ -27958,12 +27781,13 @@ public PollerFlux, StorageMigrationRes * @return response for a migration of app content request. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, StorageMigrationResponseInner> beginMigrateStorage( - String subscriptionName, - String resourceGroupName, - String name, - StorageMigrationOptions migrationOptions, - Context context) { + public PollerFlux, StorageMigrationResponseInner> + beginMigrateStorageAsync( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context) { Mono>> mono = migrateStorageWithResponseAsync(subscriptionName, resourceGroupName, name, migrationOptions, context); return this @@ -27975,6 +27799,48 @@ public PollerFlux, StorageMigrationRes StorageMigrationResponseInner.class); } + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Options for app content migration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, StorageMigrationResponseInner> beginMigrateStorage( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { + return beginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions).getSyncPoller(); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Options for app content migration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, StorageMigrationResponseInner> beginMigrateStorage( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context) { + return beginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions, context) + .getSyncPoller(); + } + /** * Description for Restores a web app. * @@ -27990,17 +27856,9 @@ public PollerFlux, StorageMigrationRes @ServiceMethod(returns = ReturnType.SINGLE) public Mono migrateStorageAsync( String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { - Mono>> mono = - migrateStorageWithResponseAsync(subscriptionName, resourceGroupName, name, migrationOptions); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - StorageMigrationResponseInner.class, - StorageMigrationResponseInner.class) + return beginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -28023,17 +27881,9 @@ public Mono migrateStorageAsync( String name, StorageMigrationOptions migrationOptions, Context context) { - Mono>> mono = - migrateStorageWithResponseAsync(subscriptionName, resourceGroupName, name, migrationOptions, context); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - StorageMigrationResponseInner.class, - StorageMigrationResponseInner.class) + return beginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -28173,6 +28023,7 @@ public Mono>> migrateMySqlWithResponseAsync( } else { migrationRequestEnvelope.validate(); } + context = this.client.mergeContext(context); return service .migrateMySql( this.client.getEndpoint(), @@ -28196,7 +28047,7 @@ public Mono>> migrateMySqlWithResponseAsync( * @return an operation on a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, OperationInner> beginMigrateMySql( + public PollerFlux, OperationInner> beginMigrateMySqlAsync( String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { Mono>> mono = migrateMySqlWithResponseAsync(resourceGroupName, name, migrationRequestEnvelope); @@ -28219,7 +28070,7 @@ public PollerFlux, OperationInner> beginMigrateMySql( * @return an operation on a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, OperationInner> beginMigrateMySql( + public PollerFlux, OperationInner> beginMigrateMySqlAsync( String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { Mono>> mono = migrateMySqlWithResponseAsync(resourceGroupName, name, migrationRequestEnvelope, context); @@ -28229,6 +28080,41 @@ public PollerFlux, OperationInner> beginMigrateMySql( mono, this.client.getHttpPipeline(), OperationInner.class, OperationInner.class); } + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySQL migration request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OperationInner> beginMigrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { + return beginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope).getSyncPoller(); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySQL migration request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OperationInner> beginMigrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { + return beginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope, context).getSyncPoller(); + } + /** * Description for Migrates a local (in-app) MySql database to a remote MySql database. * @@ -28243,14 +28129,9 @@ public PollerFlux, OperationInner> beginMigrateMySql( @ServiceMethod(returns = ReturnType.SINGLE) public Mono migrateMySqlAsync( String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { - Mono>> mono = - migrateMySqlWithResponseAsync(resourceGroupName, name, migrationRequestEnvelope); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), OperationInner.class, OperationInner.class) + return beginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -28268,14 +28149,9 @@ public Mono migrateMySqlAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono migrateMySqlAsync( String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { - Mono>> mono = - migrateMySqlWithResponseAsync(resourceGroupName, name, migrationRequestEnvelope, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), OperationInner.class, OperationInner.class) + return beginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -28394,6 +28270,7 @@ public Mono> getMigrateMySqlStatusWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getMigrateMySqlStatus( this.client.getEndpoint(), @@ -28566,6 +28443,7 @@ public Mono> getSwiftVirtualNetworkConnection new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSwiftVirtualNetworkConnection( this.client.getEndpoint(), @@ -28756,6 +28634,7 @@ public Mono> createOrUpdateSwiftVirtualNetwor } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateSwiftVirtualNetworkConnection( this.client.getEndpoint(), @@ -28945,6 +28824,7 @@ public Mono> deleteSwiftVirtualNetworkWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteSwiftVirtualNetwork( this.client.getEndpoint(), @@ -29117,6 +28997,7 @@ public Mono> updateSwiftVirtualNetworkConnect } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateSwiftVirtualNetworkConnection( this.client.getEndpoint(), @@ -29315,6 +29196,7 @@ public Mono> listNetworkFeaturesWithResponseAsync new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNetworkFeatures( this.client.getEndpoint(), @@ -29498,6 +29380,7 @@ public Mono> getNetworkTraceOperationWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getNetworkTraceOperation( this.client.getEndpoint(), @@ -29685,6 +29568,7 @@ public Mono> startWebSiteNetworkTraceWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startWebSiteNetworkTrace( this.client.getEndpoint(), @@ -29948,6 +29832,7 @@ public Mono>> startWebSiteNetworkTraceOperationWithRes new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startWebSiteNetworkTraceOperation( this.client.getEndpoint(), @@ -29975,7 +29860,7 @@ public Mono>> startWebSiteNetworkTraceOperationWithRes * @return array of NetworkTrace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginStartWebSiteNetworkTraceOperation( + public PollerFlux, Object> beginStartWebSiteNetworkTraceOperationAsync( String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { Mono>> mono = startWebSiteNetworkTraceOperationWithResponseAsync( @@ -30000,7 +29885,7 @@ public PollerFlux, Object> beginStartWebSiteNetworkTraceOpera * @return array of NetworkTrace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginStartWebSiteNetworkTraceOperation( + public PollerFlux, Object> beginStartWebSiteNetworkTraceOperationAsync( String resourceGroupName, String name, Integer durationInSeconds, @@ -30015,6 +29900,54 @@ public PollerFlux, Object> beginStartWebSiteNetworkTraceOpera .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class); } + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginStartWebSiteNetworkTraceOperation( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginStartWebSiteNetworkTraceOperation( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .getSyncPoller(); + } + /** * Description for Start capturing network packets for the site. * @@ -30031,14 +29964,10 @@ public PollerFlux, Object> beginStartWebSiteNetworkTraceOpera @ServiceMethod(returns = ReturnType.SINGLE) public Mono startWebSiteNetworkTraceOperationAsync( String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - Mono>> mono = - startWebSiteNetworkTraceOperationWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -30063,14 +29992,10 @@ public Mono startWebSiteNetworkTraceOperationAsync( Integer maxFrameLength, String sasUrl, Context context) { - Mono>> mono = - startWebSiteNetworkTraceOperationWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -30089,14 +30014,10 @@ public Mono startWebSiteNetworkTraceOperationAsync(String resourceGroupN final Integer maxFrameLength = null; final String sasUrl = null; final Context context = null; - Mono>> mono = - startWebSiteNetworkTraceOperationWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -30246,6 +30167,7 @@ public Mono> stopWebSiteNetworkTraceWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .stopWebSiteNetworkTrace( this.client.getEndpoint(), @@ -30406,6 +30328,7 @@ public Mono>> getNetworkTracesWithResponseAsync new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getNetworkTraces( this.client.getEndpoint(), @@ -30590,6 +30513,7 @@ public Mono> getNetworkTraceOperationV2WithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getNetworkTraceOperationV2( this.client.getEndpoint(), @@ -30773,6 +30697,7 @@ public Mono>> getNetworkTracesV2WithResponseAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getNetworkTracesV2( this.client.getEndpoint(), @@ -30948,6 +30873,7 @@ public Mono> generateNewSitePublishingPasswordWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .generateNewSitePublishingPassword( this.client.getEndpoint(), @@ -31115,6 +31041,7 @@ public Mono> listPerfMonCountersSinglePageAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPerfMonCounters( this.client.getEndpoint(), @@ -31332,6 +31259,7 @@ public Mono> getSitePhpErrorLogFlagWithRespon new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSitePhpErrorLogFlag( this.client.getEndpoint(), @@ -31499,6 +31427,7 @@ public Mono> listPremierAddOnsWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPremierAddOns( this.client.getEndpoint(), @@ -31677,6 +31606,7 @@ public Mono> getPremierAddOnWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getPremierAddOn( this.client.getEndpoint(), @@ -31880,6 +31810,7 @@ public Mono> addPremierAddOnWithResponseAsync( } else { premierAddOn.validate(); } + context = this.client.mergeContext(context); return service .addPremierAddOn( this.client.getEndpoint(), @@ -32080,6 +32011,7 @@ public Mono> deletePremierAddOnWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deletePremierAddOn( this.client.getEndpoint(), @@ -32265,6 +32197,7 @@ public Mono> updatePremierAddOnWithResponseAsync( } else { premierAddOn.validate(); } + context = this.client.mergeContext(context); return service .updatePremierAddOn( this.client.getEndpoint(), @@ -32455,6 +32388,7 @@ public Mono> getPrivateAccessWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getPrivateAccess( this.client.getEndpoint(), @@ -32641,6 +32575,7 @@ public Mono> putPrivateAccessVnetWithResponseAsync( } else { access.validate(); } + context = this.client.mergeContext(context); return service .putPrivateAccessVnet( this.client.getEndpoint(), @@ -32830,6 +32765,7 @@ public Mono> listProcessesSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcesses( this.client.getEndpoint(), @@ -33007,6 +32943,7 @@ public Mono> getProcessWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getProcess( this.client.getEndpoint(), @@ -33191,6 +33128,7 @@ public Mono> deleteProcessWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteProcess( this.client.getEndpoint(), @@ -33360,6 +33298,7 @@ public Mono getProcessDumpWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getProcessDump( this.client.getEndpoint(), @@ -33420,11 +33359,24 @@ public Flux getProcessDumpAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getProcessDump(String resourceGroupName, String name, String processId) { - return getProcessDumpAsync(resourceGroupName, name, processId) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getProcessDumpAsync(resourceGroupName, name, processId) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -33441,11 +33393,24 @@ public InputStream getProcessDump(String resourceGroupName, String name, String */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getProcessDump(String resourceGroupName, String name, String processId, Context context) { - return getProcessDumpAsync(resourceGroupName, name, processId, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getProcessDumpAsync(resourceGroupName, name, processId, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -33545,6 +33510,7 @@ public Mono> listProcessModulesSinglePageA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessModules( this.client.getEndpoint(), @@ -33736,6 +33702,7 @@ public Mono> getProcessModuleWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getProcessModule( this.client.getEndpoint(), @@ -33935,6 +33902,7 @@ public Mono> listProcessThreadsSinglePageA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessThreads( this.client.getEndpoint(), @@ -34117,6 +34085,7 @@ public Mono> listPublicCertificatesSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPublicCertificates( this.client.getEndpoint(), @@ -34294,6 +34263,7 @@ public Mono> getPublicCertificateWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getPublicCertificate( this.client.getEndpoint(), @@ -34500,6 +34470,7 @@ public Mono> createOrUpdatePublicCertificateWit } else { publicCertificate.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdatePublicCertificate( this.client.getEndpoint(), @@ -34705,6 +34676,7 @@ public Mono> deletePublicCertificateWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deletePublicCertificate( this.client.getEndpoint(), @@ -34881,6 +34853,7 @@ public Mono listPublishingProfileXmlWithSecretsWithResponseAsync } else { publishingProfileOptions.validate(); } + context = this.client.mergeContext(context); return service .listPublishingProfileXmlWithSecrets( this.client.getEndpoint(), @@ -34944,11 +34917,24 @@ public Flux listPublishingProfileXmlWithSecretsAsync( @ServiceMethod(returns = ReturnType.SINGLE) public InputStream listPublishingProfileXmlWithSecrets( String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions) { - return listPublishingProfileXmlWithSecretsAsync(resourceGroupName, name, publishingProfileOptions) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + listPublishingProfileXmlWithSecretsAsync(resourceGroupName, name, publishingProfileOptions) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -34966,11 +34952,24 @@ public InputStream listPublishingProfileXmlWithSecrets( @ServiceMethod(returns = ReturnType.SINGLE) public InputStream listPublishingProfileXmlWithSecrets( String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions, Context context) { - return listPublishingProfileXmlWithSecretsAsync(resourceGroupName, name, publishingProfileOptions, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + listPublishingProfileXmlWithSecretsAsync(resourceGroupName, name, publishingProfileOptions, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -35053,6 +35052,7 @@ public Mono> resetProductionSlotConfigWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .resetProductionSlotConfig( this.client.getEndpoint(), @@ -35218,6 +35218,7 @@ public Mono> restartWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .restart( this.client.getEndpoint(), @@ -35438,6 +35439,7 @@ public Mono>> restoreFromBackupBlobWithResponseAsync( } else { request.validate(); } + context = this.client.mergeContext(context); return service .restoreFromBackupBlob( this.client.getEndpoint(), @@ -35461,7 +35463,7 @@ public Mono>> restoreFromBackupBlobWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreFromBackupBlob( + public PollerFlux, Void> beginRestoreFromBackupBlobAsync( String resourceGroupName, String name, RestoreRequestInner request) { Mono>> mono = restoreFromBackupBlobWithResponseAsync(resourceGroupName, name, request); @@ -35481,7 +35483,7 @@ public PollerFlux, Void> beginRestoreFromBackupBlob( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreFromBackupBlob( + public PollerFlux, Void> beginRestoreFromBackupBlobAsync( String resourceGroupName, String name, RestoreRequestInner request, Context context) { Mono>> mono = restoreFromBackupBlobWithResponseAsync(resourceGroupName, name, request, context); @@ -35500,14 +35502,9 @@ public PollerFlux, Void> beginRestoreFromBackupBlob( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono restoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request) { - Mono>> mono = - restoreFromBackupBlobWithResponseAsync(resourceGroupName, name, request); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) - .last() - .flatMap(client::getLroFinalResultOrError); + public SyncPoller, Void> beginRestoreFromBackupBlob( + String resourceGroupName, String name, RestoreRequestInner request) { + return beginRestoreFromBackupBlobAsync(resourceGroupName, name, request).getSyncPoller(); } /** @@ -35523,15 +35520,9 @@ public Mono restoreFromBackupBlobAsync(String resourceGroupName, String na * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono restoreFromBackupBlobAsync( + public SyncPoller, Void> beginRestoreFromBackupBlob( String resourceGroupName, String name, RestoreRequestInner request, Context context) { - Mono>> mono = - restoreFromBackupBlobWithResponseAsync(resourceGroupName, name, request, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) - .last() - .flatMap(client::getLroFinalResultOrError); + return beginRestoreFromBackupBlobAsync(resourceGroupName, name, request, context).getSyncPoller(); } /** @@ -35543,10 +35534,13 @@ public Mono restoreFromBackupBlobAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request) { - restoreFromBackupBlobAsync(resourceGroupName, name, request).block(); + public Mono restoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request) { + return beginRestoreFromBackupBlobAsync(resourceGroupName, name, request) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -35559,64 +35553,46 @@ public void restoreFromBackupBlob(String resourceGroupName, String name, Restore * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restoreFromBackupBlob( + public Mono restoreFromBackupBlobAsync( String resourceGroupName, String name, RestoreRequestInner request, Context context) { - restoreFromBackupBlobAsync(resourceGroupName, name, request, context).block(); + return beginRestoreFromBackupBlobAsync(resourceGroupName, name, request, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Description for Restores a deleted web app to this web app. + * Description for Restores an app from a backup blob in Azure Storage. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about restoring a deleted app. + * @param name Name of the app. + * @param request Description of a restore request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> restoreFromDeletedAppWithResponseAsync( - String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return FluxUtil - .withContext( - context -> - service - .restoreFromDeletedApp( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + public void restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request) { + restoreFromBackupBlobAsync(resourceGroupName, name, request).block(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Description of a restore request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreFromBackupBlob( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + restoreFromBackupBlobAsync(resourceGroupName, name, request, context).block(); } /** @@ -35625,7 +35601,6 @@ public Mono>> restoreFromDeletedAppWithResponseAsync( * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of web app. * @param restoreRequest Details about restoring a deleted app. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -35633,7 +35608,7 @@ public Mono>> restoreFromDeletedAppWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> restoreFromDeletedAppWithResponseAsync( - String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -35658,6 +35633,61 @@ public Mono>> restoreFromDeletedAppWithResponseAsync( } else { restoreRequest.validate(); } + return FluxUtil + .withContext( + context -> + service + .restoreFromDeletedApp( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Details about restoring a deleted app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> restoreFromDeletedAppWithResponseAsync( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + context = this.client.mergeContext(context); return service .restoreFromDeletedApp( this.client.getEndpoint(), @@ -35681,7 +35711,7 @@ public Mono>> restoreFromDeletedAppWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreFromDeletedApp( + public PollerFlux, Void> beginRestoreFromDeletedAppAsync( String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { Mono>> mono = restoreFromDeletedAppWithResponseAsync(resourceGroupName, name, restoreRequest); @@ -35701,13 +35731,48 @@ public PollerFlux, Void> beginRestoreFromDeletedApp( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreFromDeletedApp( + public PollerFlux, Void> beginRestoreFromDeletedAppAsync( String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { Mono>> mono = restoreFromDeletedAppWithResponseAsync(resourceGroupName, name, restoreRequest, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Details about restoring a deleted app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + return beginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest).getSyncPoller(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Details about restoring a deleted app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + return beginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest, context).getSyncPoller(); + } + /** * Description for Restores a deleted web app to this web app. * @@ -35722,13 +35787,9 @@ public PollerFlux, Void> beginRestoreFromDeletedApp( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreFromDeletedAppAsync( String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { - Mono>> mono = - restoreFromDeletedAppWithResponseAsync(resourceGroupName, name, restoreRequest); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -35746,13 +35807,9 @@ public Mono restoreFromDeletedAppAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreFromDeletedAppAsync( String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { - Mono>> mono = - restoreFromDeletedAppWithResponseAsync(resourceGroupName, name, restoreRequest, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -35879,6 +35936,7 @@ public Mono>> restoreSnapshotWithResponseAsync( } else { restoreRequest.validate(); } + context = this.client.mergeContext(context); return service .restoreSnapshot( this.client.getEndpoint(), @@ -35902,7 +35960,7 @@ public Mono>> restoreSnapshotWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreSnapshot( + public PollerFlux, Void> beginRestoreSnapshotAsync( String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { Mono>> mono = restoreSnapshotWithResponseAsync(resourceGroupName, name, restoreRequest); @@ -35922,13 +35980,48 @@ public PollerFlux, Void> beginRestoreSnapshot( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreSnapshot( + public PollerFlux, Void> beginRestoreSnapshotAsync( String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { Mono>> mono = restoreSnapshotWithResponseAsync(resourceGroupName, name, restoreRequest, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Details about app recovery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreSnapshot( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + return beginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest).getSyncPoller(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Details about app recovery operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreSnapshot( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { + return beginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest, context).getSyncPoller(); + } + /** * Description for Restores a web app from a snapshot. * @@ -35943,13 +36036,9 @@ public PollerFlux, Void> beginRestoreSnapshot( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreSnapshotAsync( String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { - Mono>> mono = - restoreSnapshotWithResponseAsync(resourceGroupName, name, restoreRequest); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -35967,13 +36056,9 @@ public Mono restoreSnapshotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreSnapshotAsync( String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { - Mono>> mono = - restoreSnapshotWithResponseAsync(resourceGroupName, name, restoreRequest, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -36096,6 +36181,7 @@ public Mono> listSiteExtensionsSinglePageA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteExtensions( this.client.getEndpoint(), @@ -36273,6 +36359,7 @@ public Mono> getSiteExtensionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteExtension( this.client.getEndpoint(), @@ -36459,6 +36546,7 @@ public Mono>> installSiteExtensionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .installSiteExtension( this.client.getEndpoint(), @@ -36482,7 +36570,7 @@ public Mono>> installSiteExtensionWithResponseAsync( * @return site Extension Information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtension( + public PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionAsync( String resourceGroupName, String name, String siteExtensionId) { Mono>> mono = installSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId); @@ -36505,7 +36593,7 @@ public PollerFlux, SiteExtensionInfoInner> be * @return site Extension Information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtension( + public PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionAsync( String resourceGroupName, String name, String siteExtensionId, Context context) { Mono>> mono = installSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId, context); @@ -36515,6 +36603,41 @@ public PollerFlux, SiteExtensionInfoInner> be mono, this.client.getHttpPipeline(), SiteExtensionInfoInner.class, SiteExtensionInfoInner.class); } + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtension( + String resourceGroupName, String name, String siteExtensionId) { + return beginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId).getSyncPoller(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtension( + String resourceGroupName, String name, String siteExtensionId, Context context) { + return beginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId, context).getSyncPoller(); + } + /** * Description for Install site extension on a web site, or a deployment slot. * @@ -36529,14 +36652,9 @@ public PollerFlux, SiteExtensionInfoInner> be @ServiceMethod(returns = ReturnType.SINGLE) public Mono installSiteExtensionAsync( String resourceGroupName, String name, String siteExtensionId) { - Mono>> mono = - installSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteExtensionInfoInner.class, SiteExtensionInfoInner.class) + return beginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -36554,14 +36672,9 @@ public Mono installSiteExtensionAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono installSiteExtensionAsync( String resourceGroupName, String name, String siteExtensionId, Context context) { - Mono>> mono = - installSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteExtensionInfoInner.class, SiteExtensionInfoInner.class) + return beginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -36688,6 +36801,7 @@ public Mono> deleteSiteExtensionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteSiteExtension( this.client.getEndpoint(), @@ -36858,6 +36972,7 @@ public Mono>> copyProductionSlotWithResponseAsync( } else { copySlotEntity.validate(); } + context = this.client.mergeContext(context); return service .copyProductionSlot( this.client.getEndpoint(), @@ -36881,7 +36996,7 @@ public Mono>> copyProductionSlotWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginCopyProductionSlot( + public PollerFlux, Void> beginCopyProductionSlotAsync( String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity) { Mono>> mono = copyProductionSlotWithResponseAsync(resourceGroupName, name, copySlotEntity); @@ -36901,13 +37016,48 @@ public PollerFlux, Void> beginCopyProductionSlot( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginCopyProductionSlot( + public PollerFlux, Void> beginCopyProductionSlotAsync( String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity, Context context) { Mono>> mono = copyProductionSlotWithResponseAsync(resourceGroupName, name, copySlotEntity, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity Copy deployment slot parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginCopyProductionSlot( + String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity) { + return beginCopyProductionSlotAsync(resourceGroupName, name, copySlotEntity).getSyncPoller(); + } + + /** + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity Copy deployment slot parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginCopyProductionSlot( + String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity, Context context) { + return beginCopyProductionSlotAsync(resourceGroupName, name, copySlotEntity, context).getSyncPoller(); + } + /** * Description for Copies a deployment slot to another deployment slot of an app. * @@ -36922,13 +37072,9 @@ public PollerFlux, Void> beginCopyProductionSlot( @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyProductionSlotAsync( String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity) { - Mono>> mono = - copyProductionSlotWithResponseAsync(resourceGroupName, name, copySlotEntity); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginCopyProductionSlotAsync(resourceGroupName, name, copySlotEntity) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -36946,13 +37092,9 @@ public Mono copyProductionSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono copyProductionSlotAsync( String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity, Context context) { - Mono>> mono = - copyProductionSlotWithResponseAsync(resourceGroupName, name, copySlotEntity, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginCopyProductionSlotAsync(resourceGroupName, name, copySlotEntity, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -37074,6 +37216,7 @@ public Mono> listSlotsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSlots( this.client.getEndpoint(), @@ -37246,6 +37389,7 @@ public Mono> getSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSlot( this.client.getEndpoint(), @@ -37444,6 +37588,7 @@ public Mono>> createOrUpdateSlotWithResponseAsync( } else { siteEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateSlot( this.client.getEndpoint(), @@ -37471,7 +37616,7 @@ public Mono>> createOrUpdateSlotWithResponseAsync( * @return a web app, a mobile app backend, or an API app. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteInner> beginCreateOrUpdateSlot( + public PollerFlux, SiteInner> beginCreateOrUpdateSlotAsync( String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { Mono>> mono = createOrUpdateSlotWithResponseAsync(resourceGroupName, name, slot, siteEnvelope); @@ -37497,7 +37642,7 @@ public PollerFlux, SiteInner> beginCreateOrUpdateSlot( * @return a web app, a mobile app backend, or an API app. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteInner> beginCreateOrUpdateSlot( + public PollerFlux, SiteInner> beginCreateOrUpdateSlotAsync( String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { Mono>> mono = createOrUpdateSlotWithResponseAsync(resourceGroupName, name, slot, siteEnvelope, context); @@ -37507,6 +37652,47 @@ public PollerFlux, SiteInner> beginCreateOrUpdateSlot( mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class); } + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A web app, a mobile app backend, or an API app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteInner> beginCreateOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return beginCreateOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope).getSyncPoller(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A web app, a mobile app backend, or an API app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteInner> beginCreateOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { + return beginCreateOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope, context).getSyncPoller(); + } + /** * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. * @@ -37524,14 +37710,9 @@ public PollerFlux, SiteInner> beginCreateOrUpdateSlot( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateSlotAsync( String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { - Mono>> mono = - createOrUpdateSlotWithResponseAsync(resourceGroupName, name, slot, siteEnvelope); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class) + return beginCreateOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -37552,14 +37733,9 @@ public Mono createOrUpdateSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateSlotAsync( String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { - Mono>> mono = - createOrUpdateSlotWithResponseAsync(resourceGroupName, name, slot, siteEnvelope, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class) + return beginCreateOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -37703,6 +37879,7 @@ public Mono> deleteSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteSlot( this.client.getEndpoint(), @@ -37951,6 +38128,7 @@ public Mono> updateSlotWithResponseAsync( } else { siteEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateSlot( this.client.getEndpoint(), @@ -38152,6 +38330,7 @@ public Mono> analyzeCustomHostnameSl new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .analyzeCustomHostnameSlot( this.client.getEndpoint(), @@ -38401,6 +38580,7 @@ public Mono> applySlotConfigurationSlotWithResponseAsync( } else { slotSwapEntity.validate(); } + context = this.client.mergeContext(context); return service .applySlotConfigurationSlot( this.client.getEndpoint(), @@ -38590,6 +38770,7 @@ public Mono> backupSlotWithResponseAsync( } else { request.validate(); } + context = this.client.mergeContext(context); return service .backupSlot( this.client.getEndpoint(), @@ -38794,6 +38975,7 @@ public Mono> listBackupsSlotSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBackupsSlot( this.client.getEndpoint(), @@ -38989,6 +39171,7 @@ public Mono> getBackupStatusSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getBackupStatusSlot( this.client.getEndpoint(), @@ -39193,6 +39376,7 @@ public Mono> deleteBackupSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteBackupSlot( this.client.getEndpoint(), @@ -39399,6 +39583,7 @@ public Mono> listBackupStatusSecretsSlotWithResponseAs } else { request.validate(); } + context = this.client.mergeContext(context); return service .listBackupStatusSecretsSlot( this.client.getEndpoint(), @@ -39641,6 +39826,7 @@ public Mono>> restoreSlotWithResponseAsync( } else { request.validate(); } + context = this.client.mergeContext(context); return service .restoreSlot( this.client.getEndpoint(), @@ -39669,7 +39855,7 @@ public Mono>> restoreSlotWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreSlot( + public PollerFlux, Void> beginRestoreSlotAsync( String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { Mono>> mono = restoreSlotWithResponseAsync(resourceGroupName, name, backupId, slot, request); @@ -39692,7 +39878,7 @@ public PollerFlux, Void> beginRestoreSlot( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreSlot( + public PollerFlux, Void> beginRestoreSlotAsync( String resourceGroupName, String name, String backupId, @@ -39704,6 +39890,52 @@ public PollerFlux, Void> beginRestoreSlot( return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Description of a restore request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreSlot( + String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return beginRestoreSlotAsync(resourceGroupName, name, backupId, slot, request).getSyncPoller(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Description of a restore request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreSlot( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context) { + return beginRestoreSlotAsync(resourceGroupName, name, backupId, slot, request, context).getSyncPoller(); + } + /** * Description for Restores a specific backup to another app (or deployment slot, if specified). * @@ -39721,13 +39953,9 @@ public PollerFlux, Void> beginRestoreSlot( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreSlotAsync( String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { - Mono>> mono = - restoreSlotWithResponseAsync(resourceGroupName, name, backupId, slot, request); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreSlotAsync(resourceGroupName, name, backupId, slot, request) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -39753,13 +39981,9 @@ public Mono restoreSlotAsync( String slot, RestoreRequestInner request, Context context) { - Mono>> mono = - restoreSlotWithResponseAsync(resourceGroupName, name, backupId, slot, request, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreSlotAsync(resourceGroupName, name, backupId, slot, request, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -39905,6 +40129,7 @@ public Mono> listConfigurationsSlotSingle new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConfigurationsSlot( this.client.getEndpoint(), @@ -40106,6 +40331,7 @@ public Mono> updateApplicationSettingsSlotWithRe } else { appSettings.validate(); } + context = this.client.mergeContext(context); return service .updateApplicationSettingsSlot( this.client.getEndpoint(), @@ -40302,6 +40528,7 @@ public Mono> listApplicationSettingsSlotWithResp new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listApplicationSettingsSlot( this.client.getEndpoint(), @@ -40505,6 +40732,7 @@ public Mono> updateAuthSettingsSlotWithResponseA } else { siteAuthSettings.validate(); } + context = this.client.mergeContext(context); return service .updateAuthSettingsSlot( this.client.getEndpoint(), @@ -40697,6 +40925,7 @@ public Mono> getAuthSettingsSlotWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getAuthSettingsSlot( this.client.getEndpoint(), @@ -40908,6 +41137,7 @@ public Mono> updateAzureSt } else { azureStorageAccounts.validate(); } + context = this.client.mergeContext(context); return service .updateAzureStorageAccountsSlot( this.client.getEndpoint(), @@ -41120,6 +41350,7 @@ public Mono> listAzureStor new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listAzureStorageAccountsSlot( this.client.getEndpoint(), @@ -41324,6 +41555,7 @@ public Mono> updateBackupConfigurationSlotWithRespo } else { request.validate(); } + context = this.client.mergeContext(context); return service .updateBackupConfigurationSlot( this.client.getEndpoint(), @@ -41520,6 +41752,7 @@ public Mono> deleteBackupConfigurationSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteBackupConfigurationSlot( this.client.getEndpoint(), @@ -41692,6 +41925,7 @@ public Mono> getBackupConfigurationSlotWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getBackupConfigurationSlot( this.client.getEndpoint(), @@ -41901,6 +42135,7 @@ public Mono> updateConnectionStringsSl } else { connectionStrings.validate(); } + context = this.client.mergeContext(context); return service .updateConnectionStringsSlot( this.client.getEndpoint(), @@ -42105,6 +42340,7 @@ public Mono> listConnectionStringsSlot new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConnectionStringsSlot( this.client.getEndpoint(), @@ -42296,6 +42532,7 @@ public Mono> getDiagnosticLogsConfigurationSlotWit new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getDiagnosticLogsConfigurationSlot( this.client.getEndpoint(), @@ -42499,6 +42736,7 @@ public Mono> updateDiagnosticLogsConfigSlotWithRes } else { siteLogsConfig.validate(); } + context = this.client.mergeContext(context); return service .updateDiagnosticLogsConfigSlot( this.client.getEndpoint(), @@ -42708,6 +42946,7 @@ public Mono> updateMetadataSlotWithResponseAsync } else { metadata.validate(); } + context = this.client.mergeContext(context); return service .updateMetadataSlot( this.client.getEndpoint(), @@ -42904,6 +43143,7 @@ public Mono> listMetadataSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listMetadataSlot( this.client.getEndpoint(), @@ -43092,6 +43332,7 @@ public Mono>> listPublishingCredentialsSlotWithRespons new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPublishingCredentialsSlot( this.client.getEndpoint(), @@ -43116,7 +43357,7 @@ public Mono>> listPublishingCredentialsSlotWithRespons * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, UserInner> beginListPublishingCredentialsSlot( + public PollerFlux, UserInner> beginListPublishingCredentialsSlotAsync( String resourceGroupName, String name, String slot) { Mono>> mono = listPublishingCredentialsSlotWithResponseAsync(resourceGroupName, name, slot); @@ -43140,7 +43381,7 @@ public PollerFlux, UserInner> beginListPublishingCredentia * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, UserInner> beginListPublishingCredentialsSlot( + public PollerFlux, UserInner> beginListPublishingCredentialsSlotAsync( String resourceGroupName, String name, String slot, Context context) { Mono>> mono = listPublishingCredentialsSlotWithResponseAsync(resourceGroupName, name, slot, context); @@ -43163,15 +43404,9 @@ public PollerFlux, UserInner> beginListPublishingCredentia * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { - Mono>> mono = - listPublishingCredentialsSlotWithResponseAsync(resourceGroupName, name, slot); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + public SyncPoller, UserInner> beginListPublishingCredentialsSlot( + String resourceGroupName, String name, String slot) { + return beginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot).getSyncPoller(); } /** @@ -43188,16 +43423,9 @@ public Mono listPublishingCredentialsSlotAsync(String resourceGroupNa * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listPublishingCredentialsSlotAsync( + public SyncPoller, UserInner> beginListPublishingCredentialsSlot( String resourceGroupName, String name, String slot, Context context) { - Mono>> mono = - listPublishingCredentialsSlotWithResponseAsync(resourceGroupName, name, slot, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + return beginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot, context).getSyncPoller(); } /** @@ -43213,8 +43441,10 @@ public Mono listPublishingCredentialsSlotAsync( * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UserInner listPublishingCredentialsSlot(String resourceGroupName, String name, String slot) { - return listPublishingCredentialsSlotAsync(resourceGroupName, name, slot).block(); + public Mono listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { + return beginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -43231,175 +43461,47 @@ public UserInner listPublishingCredentialsSlot(String resourceGroupName, String * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UserInner listPublishingCredentialsSlot( + public Mono listPublishingCredentialsSlotAsync( String resourceGroupName, String name, String slot, Context context) { - return listPublishingCredentialsSlotAsync(resourceGroupName, name, slot, context).block(); - } - - /** - * Description for Updates the Push settings associated with web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param pushSettings Push settings for the App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return push settings for the App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSitePushSettingsSlotWithResponseAsync( - String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (pushSettings == null) { - return Mono.error(new IllegalArgumentException("Parameter pushSettings is required and cannot be null.")); - } else { - pushSettings.validate(); - } - return FluxUtil - .withContext( - context -> - service - .updateSitePushSettingsSlot( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - pushSettings, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Updates the Push settings associated with web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param pushSettings Push settings for the App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return push settings for the App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSitePushSettingsSlotWithResponseAsync( - String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (pushSettings == null) { - return Mono.error(new IllegalArgumentException("Parameter pushSettings is required and cannot be null.")); - } else { - pushSettings.validate(); - } - return service - .updateSitePushSettingsSlot( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - pushSettings, - context); + return beginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Description for Updates the Push settings associated with web app. + * Description for Gets the Git/FTP publishing credentials of an app. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param pushSettings Push settings for the App. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return push settings for the App. + * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateSitePushSettingsSlotAsync( - String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { - return updateSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, pushSettings) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + public UserInner listPublishingCredentialsSlot(String resourceGroupName, String name, String slot) { + return listPublishingCredentialsSlotAsync(resourceGroupName, name, slot).block(); } /** - * Description for Updates the Push settings associated with web app. + * Description for Gets the Git/FTP publishing credentials of an app. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param pushSettings Push settings for the App. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return push settings for the App. + * @return user credentials used for publishing activity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateSitePushSettingsSlotAsync( - String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { - return updateSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, pushSettings, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + public UserInner listPublishingCredentialsSlot( + String resourceGroupName, String name, String slot, Context context) { + return listPublishingCredentialsSlotAsync(resourceGroupName, name, slot, context).block(); } /** @@ -43415,44 +43517,8 @@ public Mono updateSitePushSettingsSlotAsync( * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PushSettingsInner updateSitePushSettingsSlot( + public Mono> updateSitePushSettingsSlotWithResponseAsync( String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { - return updateSitePushSettingsSlotAsync(resourceGroupName, name, slot, pushSettings).block(); - } - - /** - * Description for Updates the Push settings associated with web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param pushSettings Push settings for the App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return push settings for the App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PushSettingsInner updateSitePushSettingsSlot( - String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { - return updateSitePushSettingsSlotAsync(resourceGroupName, name, slot, pushSettings, context).block(); - } - - /** - * Description for Gets the Push settings associated with web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return push settings for the App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listSitePushSettingsSlotWithResponseAsync( - String resourceGroupName, String name, String slot) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -43475,27 +43541,34 @@ public Mono> listSitePushSettingsSlotWithResponseAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (pushSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter pushSettings is required and cannot be null.")); + } else { + pushSettings.validate(); + } return FluxUtil .withContext( context -> service - .listSitePushSettingsSlot( + .updateSitePushSettingsSlot( this.client.getEndpoint(), resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), + pushSettings, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } /** - * Description for Gets the Push settings associated with web app. + * Description for Updates the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of web app. * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings for the App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -43503,8 +43576,8 @@ public Mono> listSitePushSettingsSlotWithResponseAsy * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listSitePushSettingsSlotWithResponseAsync( - String resourceGroupName, String name, String slot, Context context) { + public Mono> updateSitePushSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -43527,31 +43600,40 @@ public Mono> listSitePushSettingsSlotWithResponseAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (pushSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter pushSettings is required and cannot be null.")); + } else { + pushSettings.validate(); + } + context = this.client.mergeContext(context); return service - .listSitePushSettingsSlot( + .updateSitePushSettingsSlot( this.client.getEndpoint(), resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), + pushSettings, context); } /** - * Description for Gets the Push settings associated with web app. + * Description for Updates the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of web app. * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings for the App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot) { - return listSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot) + public Mono updateSitePushSettingsSlotAsync( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + return updateSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, pushSettings) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -43563,11 +43645,12 @@ public Mono listSitePushSettingsSlotAsync(String resourceGrou } /** - * Description for Gets the Push settings associated with web app. + * Description for Updates the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of web app. * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings for the App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -43575,9 +43658,9 @@ public Mono listSitePushSettingsSlotAsync(String resourceGrou * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listSitePushSettingsSlotAsync( - String resourceGroupName, String name, String slot, Context context) { - return listSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, context) + public Mono updateSitePushSettingsSlotAsync( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { + return updateSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, pushSettings, context) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -43589,27 +43672,30 @@ public Mono listSitePushSettingsSlotAsync( } /** - * Description for Gets the Push settings associated with web app. + * Description for Updates the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of web app. * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings for the App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PushSettingsInner listSitePushSettingsSlot(String resourceGroupName, String name, String slot) { - return listSitePushSettingsSlotAsync(resourceGroupName, name, slot).block(); + public PushSettingsInner updateSitePushSettingsSlot( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + return updateSitePushSettingsSlotAsync(resourceGroupName, name, slot, pushSettings).block(); } /** - * Description for Gets the Push settings associated with web app. + * Description for Updates the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of web app. * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings for the App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -43617,26 +43703,24 @@ public PushSettingsInner listSitePushSettingsSlot(String resourceGroupName, Stri * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PushSettingsInner listSitePushSettingsSlot( - String resourceGroupName, String name, String slot, Context context) { - return listSitePushSettingsSlotAsync(resourceGroupName, name, slot, context).block(); + public PushSettingsInner updateSitePushSettingsSlot( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { + return updateSitePushSettingsSlotAsync(resourceGroupName, name, slot, pushSettings, context).block(); } /** - * Description for Gets the configuration of an app, such as platform version and bitness, default documents, - * virtual applications, Always On, etc. + * Description for Gets the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the - * production slot. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return web app configuration ARM resource. + * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getConfigurationSlotWithResponseAsync( + public Mono> listSitePushSettingsSlotWithResponseAsync( String resourceGroupName, String name, String slot) { if (this.client.getEndpoint() == null) { return Mono @@ -43664,7 +43748,7 @@ public Mono> getConfigurationSlotWithResponseA .withContext( context -> service - .getConfigurationSlot( + .listSitePushSettingsSlot( this.client.getEndpoint(), resourceGroupName, name, @@ -43676,21 +43760,19 @@ public Mono> getConfigurationSlotWithResponseA } /** - * Description for Gets the configuration of an app, such as platform version and bitness, default documents, - * virtual applications, Always On, etc. + * Description for Gets the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the - * production slot. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return web app configuration ARM resource. + * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getConfigurationSlotWithResponseAsync( + public Mono> listSitePushSettingsSlotWithResponseAsync( String resourceGroupName, String name, String slot, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -43714,8 +43796,9 @@ public Mono> getConfigurationSlotWithResponseA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service - .getConfigurationSlot( + .listSitePushSettingsSlot( this.client.getEndpoint(), resourceGroupName, name, @@ -43726,23 +43809,21 @@ public Mono> getConfigurationSlotWithResponseA } /** - * Description for Gets the configuration of an app, such as platform version and bitness, default documents, - * virtual applications, Always On, etc. + * Description for Gets the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the - * production slot. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return web app configuration ARM resource. + * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getConfigurationSlotAsync(String resourceGroupName, String name, String slot) { - return getConfigurationSlotWithResponseAsync(resourceGroupName, name, slot) + public Mono listSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot) { + return listSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -43752,25 +43833,23 @@ public Mono getConfigurationSlotAsync(String resourceGr } /** - * Description for Gets the configuration of an app, such as platform version and bitness, default documents, - * virtual applications, Always On, etc. + * Description for Gets the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the - * production slot. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return web app configuration ARM resource. + * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getConfigurationSlotAsync( + public Mono listSitePushSettingsSlotAsync( String resourceGroupName, String name, String slot, Context context) { - return getConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, context) + return listSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, context) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -43780,59 +43859,55 @@ public Mono getConfigurationSlotAsync( } /** - * Description for Gets the configuration of an app, such as platform version and bitness, default documents, - * virtual applications, Always On, etc. + * Description for Gets the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the - * production slot. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return web app configuration ARM resource. + * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SiteConfigResourceInner getConfigurationSlot(String resourceGroupName, String name, String slot) { - return getConfigurationSlotAsync(resourceGroupName, name, slot).block(); + public PushSettingsInner listSitePushSettingsSlot(String resourceGroupName, String name, String slot) { + return listSitePushSettingsSlotAsync(resourceGroupName, name, slot).block(); } /** - * Description for Gets the configuration of an app, such as platform version and bitness, default documents, - * virtual applications, Always On, etc. + * Description for Gets the Push settings associated with web app. * * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the - * production slot. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return web app configuration ARM resource. + * @return push settings for the App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SiteConfigResourceInner getConfigurationSlot( + public PushSettingsInner listSitePushSettingsSlot( String resourceGroupName, String name, String slot, Context context) { - return getConfigurationSlotAsync(resourceGroupName, name, slot, context).block(); + return listSitePushSettingsSlotAsync(resourceGroupName, name, slot, context).block(); } /** - * Description for Updates the configuration of an app. + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the * production slot. - * @param siteConfig Web app configuration ARM resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateConfigurationSlotWithResponseAsync( - String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + public Mono> getConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -43855,35 +43930,29 @@ public Mono> createOrUpdateConfigurationSlotWi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (siteConfig == null) { - return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); - } else { - siteConfig.validate(); - } return FluxUtil .withContext( context -> service - .createOrUpdateConfigurationSlot( + .getConfigurationSlot( this.client.getEndpoint(), resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), - siteConfig, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } /** - * Description for Updates the configuration of an app. + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the * production slot. - * @param siteConfig Web app configuration ARM resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -43891,8 +43960,8 @@ public Mono> createOrUpdateConfigurationSlotWi * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateConfigurationSlotWithResponseAsync( - String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + public Mono> getConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -43915,40 +43984,34 @@ public Mono> createOrUpdateConfigurationSlotWi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (siteConfig == null) { - return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); - } else { - siteConfig.validate(); - } + context = this.client.mergeContext(context); return service - .createOrUpdateConfigurationSlot( + .getConfigurationSlot( this.client.getEndpoint(), resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), - siteConfig, context); } /** - * Description for Updates the configuration of an app. + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the * production slot. - * @param siteConfig Web app configuration ARM resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateConfigurationSlotAsync( - String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { - return createOrUpdateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig) + public Mono getConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return getConfigurationSlotWithResponseAsync(resourceGroupName, name, slot) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -43960,13 +44023,13 @@ public Mono createOrUpdateConfigurationSlotAsync( } /** - * Description for Updates the configuration of an app. + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the * production slot. - * @param siteConfig Web app configuration ARM resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -43974,9 +44037,9 @@ public Mono createOrUpdateConfigurationSlotAsync( * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateConfigurationSlotAsync( - String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { - return createOrUpdateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig, context) + public Mono getConfigurationSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return getConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, context) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -43988,32 +44051,31 @@ public Mono createOrUpdateConfigurationSlotAsync( } /** - * Description for Updates the configuration of an app. + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the * production slot. - * @param siteConfig Web app configuration ARM resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SiteConfigResourceInner createOrUpdateConfigurationSlot( - String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { - return createOrUpdateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig).block(); + public SiteConfigResourceInner getConfigurationSlot(String resourceGroupName, String name, String slot) { + return getConfigurationSlotAsync(resourceGroupName, name, slot).block(); } /** - * Description for Updates the configuration of an app. + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the * production slot. - * @param siteConfig Web app configuration ARM resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -44021,9 +44083,9 @@ public SiteConfigResourceInner createOrUpdateConfigurationSlot( * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SiteConfigResourceInner createOrUpdateConfigurationSlot( - String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { - return createOrUpdateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig, context).block(); + public SiteConfigResourceInner getConfigurationSlot( + String resourceGroupName, String name, String slot, Context context) { + return getConfigurationSlotAsync(resourceGroupName, name, slot, context).block(); } /** @@ -44040,7 +44102,7 @@ public SiteConfigResourceInner createOrUpdateConfigurationSlot( * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateConfigurationSlotWithResponseAsync( + public Mono> createOrUpdateConfigurationSlotWithResponseAsync( String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { if (this.client.getEndpoint() == null) { return Mono @@ -44073,7 +44135,7 @@ public Mono> updateConfigurationSlotWithRespon .withContext( context -> service - .updateConfigurationSlot( + .createOrUpdateConfigurationSlot( this.client.getEndpoint(), resourceGroupName, name, @@ -44100,7 +44162,7 @@ public Mono> updateConfigurationSlotWithRespon * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateConfigurationSlotWithResponseAsync( + public Mono> createOrUpdateConfigurationSlotWithResponseAsync( String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -44129,8 +44191,9 @@ public Mono> updateConfigurationSlotWithRespon } else { siteConfig.validate(); } + context = this.client.mergeContext(context); return service - .updateConfigurationSlot( + .createOrUpdateConfigurationSlot( this.client.getEndpoint(), resourceGroupName, name, @@ -44155,9 +44218,9 @@ public Mono> updateConfigurationSlotWithRespon * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateConfigurationSlotAsync( + public Mono createOrUpdateConfigurationSlotAsync( String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { - return updateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig) + return createOrUpdateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -44183,9 +44246,9 @@ public Mono updateConfigurationSlotAsync( * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateConfigurationSlotAsync( + public Mono createOrUpdateConfigurationSlotAsync( String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { - return updateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig, context) + return createOrUpdateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig, context) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -44210,9 +44273,9 @@ public Mono updateConfigurationSlotAsync( * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SiteConfigResourceInner updateConfigurationSlot( + public SiteConfigResourceInner createOrUpdateConfigurationSlot( String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { - return updateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig).block(); + return createOrUpdateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig).block(); } /** @@ -44230,27 +44293,237 @@ public SiteConfigResourceInner updateConfigurationSlot( * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SiteConfigResourceInner updateConfigurationSlot( + public SiteConfigResourceInner createOrUpdateConfigurationSlot( String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { - return updateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig, context).block(); + return createOrUpdateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig, context).block(); } /** - * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a - * timestamp and the ID of the snapshot. + * Description for Updates the configuration of an app. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the * production slot. + * @param siteConfig Web app configuration ARM resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of metadata for the app configuration snapshots that can be restored. + * @return web app configuration ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listConfigurationSnapshotInfoSlotSinglePageAsync( - String resourceGroupName, String name, String slot) { + public Mono> updateConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + return FluxUtil + .withContext( + context -> + service + .updateConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig Web app configuration ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + context = this.client.mergeContext(context); + return service + .updateConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + context); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig Web app configuration ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateConfigurationSlotAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return updateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig Web app configuration ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateConfigurationSlotAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + return updateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig Web app configuration ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner updateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return updateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig).block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig Web app configuration ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner updateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + return updateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig, context).block(); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listConfigurationSnapshotInfoSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -44336,6 +44609,7 @@ public Mono> listConfiguration new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConfigurationSnapshotInfoSlot( this.client.getEndpoint(), @@ -44537,6 +44811,7 @@ public Mono> getConfigurationSnapshotSlotWithR new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getConfigurationSnapshotSlot( this.client.getEndpoint(), @@ -44742,6 +45017,7 @@ public Mono> recoverSiteConfigurationSnapshotSlotWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .recoverSiteConfigurationSnapshotSlot( this.client.getEndpoint(), @@ -44920,6 +45196,7 @@ public Mono getWebSiteContainerLogsSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getWebSiteContainerLogsSlot( this.client.getEndpoint(), @@ -44980,11 +45257,24 @@ public Flux getWebSiteContainerLogsSlotAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getWebSiteContainerLogsSlot(String resourceGroupName, String name, String slot) { - return getWebSiteContainerLogsSlotAsync(resourceGroupName, name, slot) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getWebSiteContainerLogsSlotAsync(resourceGroupName, name, slot) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -45002,11 +45292,24 @@ public InputStream getWebSiteContainerLogsSlot(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getWebSiteContainerLogsSlot( String resourceGroupName, String name, String slot, Context context) { - return getWebSiteContainerLogsSlotAsync(resourceGroupName, name, slot, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getWebSiteContainerLogsSlotAsync(resourceGroupName, name, slot, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -45097,6 +45400,7 @@ public Mono getContainerLogsZipSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getContainerLogsZipSlot( this.client.getEndpoint(), @@ -45157,11 +45461,24 @@ public Flux getContainerLogsZipSlotAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getContainerLogsZipSlot(String resourceGroupName, String name, String slot) { - return getContainerLogsZipSlotAsync(resourceGroupName, name, slot) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getContainerLogsZipSlotAsync(resourceGroupName, name, slot) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -45178,11 +45495,24 @@ public InputStream getContainerLogsZipSlot(String resourceGroupName, String name */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getContainerLogsZipSlot(String resourceGroupName, String name, String slot, Context context) { - return getContainerLogsZipSlotAsync(resourceGroupName, name, slot, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getContainerLogsZipSlotAsync(resourceGroupName, name, slot, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -45284,6 +45614,7 @@ public Mono> listContinuousWebJobsSlotSingl new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listContinuousWebJobsSlot( this.client.getEndpoint(), @@ -45481,6 +45812,7 @@ public Mono> getContinuousWebJobSlotWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getContinuousWebJobSlot( this.client.getEndpoint(), @@ -45686,6 +46018,7 @@ public Mono> deleteContinuousWebJobSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteContinuousWebJobSlot( this.client.getEndpoint(), @@ -45874,6 +46207,7 @@ public Mono> startContinuousWebJobSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startContinuousWebJobSlot( this.client.getEndpoint(), @@ -46062,6 +46396,7 @@ public Mono> stopContinuousWebJobSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .stopContinuousWebJobSlot( this.client.getEndpoint(), @@ -46250,6 +46585,7 @@ public Mono> listDeploymentsSlotSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDeploymentsSlot( this.client.getEndpoint(), @@ -46445,6 +46781,7 @@ public Mono> getDeploymentSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getDeploymentSlot( this.client.getEndpoint(), @@ -46661,6 +46998,7 @@ public Mono> createDeploymentSlotWithResponseAsync( } else { deployment.validate(); } + context = this.client.mergeContext(context); return service .createDeploymentSlot( this.client.getEndpoint(), @@ -46871,6 +47209,7 @@ public Mono> deleteDeploymentSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteDeploymentSlot( this.client.getEndpoint(), @@ -47059,6 +47398,7 @@ public Mono> listDeploymentLogSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDeploymentLogSlot( this.client.getEndpoint(), @@ -47273,6 +47613,7 @@ public Mono> discoverBackupSlotWithResponseAsync( } else { request.validate(); } + context = this.client.mergeContext(context); return service .discoverBackupSlot( this.client.getEndpoint(), @@ -47482,6 +47823,7 @@ public Mono> listDomainOwnershipIdentifiersSlotSi new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDomainOwnershipIdentifiersSlot( this.client.getEndpoint(), @@ -47685,6 +48027,7 @@ public Mono> getDomainOwnershipIdentifierSlotWithRespo new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getDomainOwnershipIdentifierSlot( this.client.getEndpoint(), @@ -47929,6 +48272,7 @@ public Mono> createOrUpdateDomainOwnershipIdentifierSl } else { domainOwnershipIdentifier.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateDomainOwnershipIdentifierSlot( this.client.getEndpoint(), @@ -48169,6 +48513,7 @@ public Mono> deleteDomainOwnershipIdentifierSlotWithResponseAsync new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteDomainOwnershipIdentifierSlot( this.client.getEndpoint(), @@ -48395,6 +48740,7 @@ public Mono> updateDomainOwnershipIdentifierSlotWithRe } else { domainOwnershipIdentifier.validate(); } + context = this.client.mergeContext(context); return service .updateDomainOwnershipIdentifierSlot( this.client.getEndpoint(), @@ -48618,6 +48964,7 @@ public Mono> getMSDeployStatusSlotWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getMSDeployStatusSlot( this.client.getEndpoint(), @@ -48814,6 +49161,7 @@ public Mono>> createMSDeployOperationSlotWithResponseA } else { mSDeploy.validate(); } + context = this.client.mergeContext(context); return service .createMSDeployOperationSlot( this.client.getEndpoint(), @@ -48839,7 +49187,7 @@ public Mono>> createMSDeployOperationSlotWithResponseA * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationSlot( + public PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationSlotAsync( String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { Mono>> mono = createMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, mSDeploy); @@ -48863,7 +49211,7 @@ public PollerFlux, MSDeployStatusInner> beginCre * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationSlot( + public PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationSlotAsync( String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { Mono>> mono = createMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, mSDeploy, context); @@ -48886,16 +49234,9 @@ public PollerFlux, MSDeployStatusInner> beginCre * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createMSDeployOperationSlotAsync( + public SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperationSlot( String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { - Mono>> mono = - createMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, mSDeploy); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + return beginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy).getSyncPoller(); } /** @@ -48912,16 +49253,9 @@ public Mono createMSDeployOperationSlotAsync( * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createMSDeployOperationSlotAsync( + public SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperationSlot( String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { - Mono>> mono = - createMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, mSDeploy, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class) - .last() - .flatMap(client::getLroFinalResultOrError); + return beginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy, context).getSyncPoller(); } /** @@ -48937,9 +49271,11 @@ public Mono createMSDeployOperationSlotAsync( * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner createMSDeployOperationSlot( + public Mono createMSDeployOperationSlotAsync( String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { - return createMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy).block(); + return beginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -48956,77 +49292,64 @@ public MSDeployStatusInner createMSDeployOperationSlot( * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner createMSDeployOperationSlot( + public Mono createMSDeployOperationSlotAsync( String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { - return createMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy, context).block(); + return beginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Description for Get the MSDeploy Log for the last MSDeploy operation. + * Description for Invoke the MSDeploy web app extension. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of web app. * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy MSDeploy ARM PUT information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy log. + * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMSDeployLogSlotWithResponseAsync( - String resourceGroupName, String name, String slot) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .getMSDeployLogSlot( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + public MSDeployStatusInner createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { + return createMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy).block(); } /** - * Description for Get the MSDeploy Log for the last MSDeploy operation. + * Description for Invoke the MSDeploy web app extension. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of web app. * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy MSDeploy ARM PUT information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { + return createMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy, context).block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return mSDeploy log. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMSDeployLogSlotWithResponseAsync( - String resourceGroupName, String name, String slot, Context context) { + String resourceGroupName, String name, String slot) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -49049,6 +49372,59 @@ public Mono> getMSDeployLogSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + return FluxUtil + .withContext( + context -> + service + .getMSDeployLogSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMSDeployLogSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + context = this.client.mergeContext(context); return service .getMSDeployLogSlot( this.client.getEndpoint(), @@ -49240,6 +49616,7 @@ public Mono> listInstanceFunctionsSlotSingl new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceFunctionsSlot( this.client.getEndpoint(), @@ -49422,6 +49799,7 @@ public Mono> getFunctionsAdminTokenSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getFunctionsAdminTokenSlot( this.client.getEndpoint(), @@ -49613,6 +49991,7 @@ public Mono> getInstanceFunctionSlotWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceFunctionSlot( this.client.getEndpoint(), @@ -49836,6 +50215,7 @@ public Mono>> createInstanceFunctionSlotWithResponseAs } else { functionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createInstanceFunctionSlot( this.client.getEndpoint(), @@ -49863,7 +50243,7 @@ public Mono>> createInstanceFunctionSlotWithResponseAs * @return function information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, FunctionEnvelopeInner> beginCreateInstanceFunctionSlot( + public PollerFlux, FunctionEnvelopeInner> beginCreateInstanceFunctionSlotAsync( String resourceGroupName, String name, String functionName, @@ -49892,7 +50272,7 @@ public PollerFlux, FunctionEnvelopeInner> begi * @return function information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, FunctionEnvelopeInner> beginCreateInstanceFunctionSlot( + public PollerFlux, FunctionEnvelopeInner> beginCreateInstanceFunctionSlotAsync( String resourceGroupName, String name, String functionName, @@ -49908,6 +50288,57 @@ public PollerFlux, FunctionEnvelopeInner> begi mono, this.client.getHttpPipeline(), FunctionEnvelopeInner.class, FunctionEnvelopeInner.class); } + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, FunctionEnvelopeInner> beginCreateInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope) { + return beginCreateInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope) + .getSyncPoller(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, FunctionEnvelopeInner> beginCreateInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context) { + return beginCreateInstanceFunctionSlotAsync( + resourceGroupName, name, functionName, slot, functionEnvelope, context) + .getSyncPoller(); + } + /** * Description for Create function for web site, or a deployment slot. * @@ -49928,14 +50359,9 @@ public Mono createInstanceFunctionSlotAsync( String functionName, String slot, FunctionEnvelopeInner functionEnvelope) { - Mono>> mono = - createInstanceFunctionSlotWithResponseAsync(resourceGroupName, name, functionName, slot, functionEnvelope); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), FunctionEnvelopeInner.class, FunctionEnvelopeInner.class) + return beginCreateInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -49960,15 +50386,10 @@ public Mono createInstanceFunctionSlotAsync( String slot, FunctionEnvelopeInner functionEnvelope, Context context) { - Mono>> mono = - createInstanceFunctionSlotWithResponseAsync( - resourceGroupName, name, functionName, slot, functionEnvelope, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), FunctionEnvelopeInner.class, FunctionEnvelopeInner.class) + return beginCreateInstanceFunctionSlotAsync( + resourceGroupName, name, functionName, slot, functionEnvelope, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -50117,6 +50538,7 @@ public Mono> deleteInstanceFunctionSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteInstanceFunctionSlot( this.client.getEndpoint(), @@ -50327,6 +50749,7 @@ public Mono> createOrUpdateFunctionSecretSlotWithResponse } else { key.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateFunctionSecretSlot( this.client.getEndpoint(), @@ -50560,6 +50983,7 @@ public Mono> deleteFunctionSecretSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteFunctionSecretSlot( this.client.getEndpoint(), @@ -50748,6 +51172,7 @@ public Mono> listFunctionKeysSlotWithResponseAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listFunctionKeysSlot( this.client.getEndpoint(), @@ -50947,6 +51372,7 @@ public Mono> listFunctionSecretsSlotWithResponseA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listFunctionSecretsSlot( this.client.getEndpoint(), @@ -51137,6 +51563,7 @@ public Mono> listHostKeysSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHostKeysSlot( this.client.getEndpoint(), @@ -51319,6 +51746,7 @@ public Mono> listSyncStatusSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSyncStatusSlot( this.client.getEndpoint(), @@ -51483,6 +51911,7 @@ public Mono> syncFunctionsSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .syncFunctionsSlot( this.client.getEndpoint(), @@ -51685,6 +52114,7 @@ public Mono> createOrUpdateHostSecretSlotWithResponseAsyn } else { key.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateHostSecretSlot( this.client.getEndpoint(), @@ -51916,6 +52346,7 @@ public Mono> deleteHostSecretSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteHostSecretSlot( this.client.getEndpoint(), @@ -52106,6 +52537,7 @@ public Mono> listHostnameBindingsSlotSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHostnameBindingsSlot( this.client.getEndpoint(), @@ -52303,6 +52735,7 @@ public Mono> getHostnameBindingSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getHostnameBindingSlot( this.client.getEndpoint(), @@ -52528,6 +52961,7 @@ public Mono> createOrUpdateHostnameBindingSlotWit } else { hostnameBinding.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateHostnameBindingSlot( this.client.getEndpoint(), @@ -52751,6 +53185,7 @@ public Mono> deleteHostnameBindingSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteHostnameBindingSlot( this.client.getEndpoint(), @@ -52946,6 +53381,7 @@ public Mono> getHybridConnectionSlotWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getHybridConnectionSlot( this.client.getEndpoint(), @@ -53186,6 +53622,7 @@ public Mono> createOrUpdateHybridConnectionSlotW } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateHybridConnectionSlot( this.client.getEndpoint(), @@ -53432,6 +53869,7 @@ public Mono> deleteHybridConnectionSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteHybridConnectionSlot( this.client.getEndpoint(), @@ -53656,6 +54094,7 @@ public Mono> updateHybridConnectionSlotWithRespo } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateHybridConnectionSlot( this.client.getEndpoint(), @@ -53884,6 +54323,7 @@ public Mono> listHybridConnectionsSlotWithRespon new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHybridConnectionsSlot( this.client.getEndpoint(), @@ -54070,6 +54510,7 @@ public Mono> listRelayServiceConnect new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listRelayServiceConnectionsSlot( this.client.getEndpoint(), @@ -54270,6 +54711,7 @@ public Mono> getRelayServiceConnecti new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getRelayServiceConnectionSlot( this.client.getEndpoint(), @@ -54499,6 +54941,7 @@ public Mono> createOrUpdateRelayServ } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateRelayServiceConnectionSlot( this.client.getEndpoint(), @@ -54733,6 +55176,7 @@ public Mono> deleteRelayServiceConnectionSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteRelayServiceConnectionSlot( this.client.getEndpoint(), @@ -54946,6 +55390,7 @@ public Mono> updateRelayServiceConne } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateRelayServiceConnectionSlot( this.client.getEndpoint(), @@ -55177,6 +55622,7 @@ public Mono> listInstanceIdentifiersSlotSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceIdentifiersSlot( this.client.getEndpoint(), @@ -55368,6 +55814,7 @@ public Mono> getInstanceInfoSlotWithRespons new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceInfoSlot( this.client.getEndpoint(), @@ -55567,6 +56014,7 @@ public Mono> getInstanceMsDeployStatusSlotWithResp new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceMsDeployStatusSlot( this.client.getEndpoint(), @@ -55779,6 +56227,7 @@ public Mono>> createInstanceMSDeployOperationSlotWithR } else { mSDeploy.validate(); } + context = this.client.mergeContext(context); return service .createInstanceMSDeployOperationSlot( this.client.getEndpoint(), @@ -55806,8 +56255,9 @@ public Mono>> createInstanceMSDeployOperationSlotWithR * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, MSDeployStatusInner> beginCreateInstanceMSDeployOperationSlot( - String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + public PollerFlux, MSDeployStatusInner> + beginCreateInstanceMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { Mono>> mono = createInstanceMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy); return this @@ -55831,8 +56281,9 @@ public PollerFlux, MSDeployStatusInner> beginCre * @return mSDeploy ARM response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, MSDeployStatusInner> beginCreateInstanceMSDeployOperationSlot( - String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { + public PollerFlux, MSDeployStatusInner> + beginCreateInstanceMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { Mono>> mono = createInstanceMSDeployOperationSlotWithResponseAsync( resourceGroupName, name, slot, instanceId, mSDeploy, context); @@ -55842,6 +56293,48 @@ public PollerFlux, MSDeployStatusInner> beginCre mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class); } + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy MSDeploy ARM PUT information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + return beginCreateInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy) + .getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy MSDeploy ARM PUT information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { + return beginCreateInstanceMSDeployOperationSlotAsync( + resourceGroupName, name, slot, instanceId, mSDeploy, context) + .getSyncPoller(); + } + /** * Description for Invoke the MSDeploy web app extension. * @@ -55858,14 +56351,9 @@ public PollerFlux, MSDeployStatusInner> beginCre @ServiceMethod(returns = ReturnType.SINGLE) public Mono createInstanceMSDeployOperationSlotAsync( String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { - Mono>> mono = - createInstanceMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class) + return beginCreateInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -55885,15 +56373,10 @@ public Mono createInstanceMSDeployOperationSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createInstanceMSDeployOperationSlotAsync( String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { - Mono>> mono = - createInstanceMSDeployOperationSlotWithResponseAsync( - resourceGroupName, name, slot, instanceId, mSDeploy, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class) + return beginCreateInstanceMSDeployOperationSlotAsync( + resourceGroupName, name, slot, instanceId, mSDeploy, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -56033,6 +56516,7 @@ public Mono> getInstanceMSDeployLogSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceMSDeployLogSlot( this.client.getEndpoint(), @@ -56247,6 +56731,7 @@ public Mono> listInstanceProcessesSlotSinglePage new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessesSlot( this.client.getEndpoint(), @@ -56468,6 +56953,7 @@ public Mono> getInstanceProcessSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceProcessSlot( this.client.getEndpoint(), @@ -56695,6 +57181,7 @@ public Mono> deleteInstanceProcessSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteInstanceProcessSlot( this.client.getEndpoint(), @@ -56908,6 +57395,7 @@ public Mono getInstanceProcessDumpSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceProcessDumpSlot( this.client.getEndpoint(), @@ -56985,11 +57473,24 @@ public Flux getInstanceProcessDumpSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getInstanceProcessDumpSlot( String resourceGroupName, String name, String processId, String slot, String instanceId) { - return getInstanceProcessDumpSlotAsync(resourceGroupName, name, processId, slot, instanceId) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getInstanceProcessDumpSlotAsync(resourceGroupName, name, processId, slot, instanceId) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -57011,11 +57512,24 @@ public InputStream getInstanceProcessDumpSlot( @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getInstanceProcessDumpSlot( String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { - return getInstanceProcessDumpSlotAsync(resourceGroupName, name, processId, slot, instanceId, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getInstanceProcessDumpSlotAsync(resourceGroupName, name, processId, slot, instanceId, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -57137,6 +57651,7 @@ public Mono> listInstanceProcessModulesSlo new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessModulesSlot( this.client.getEndpoint(), @@ -57378,6 +57893,7 @@ public Mono> getInstanceProcessModuleSlotWithRe new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getInstanceProcessModuleSlot( this.client.getEndpoint(), @@ -57634,6 +58150,7 @@ public Mono> listInstanceProcessThreadsSlo new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessThreadsSlot( this.client.getEndpoint(), @@ -57838,6 +58355,7 @@ public Mono> isCloneableSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .isCloneableSlot( this.client.getEndpoint(), @@ -58031,6 +58549,7 @@ public Mono> listSiteBackupsSlotSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteBackupsSlot( this.client.getEndpoint(), @@ -58215,6 +58734,7 @@ public Mono> listSyncFunctionTriggersSlotWithResp new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSyncFunctionTriggersSlot( this.client.getEndpoint(), @@ -58401,6 +58921,7 @@ public Mono> getMigrateMySqlStatusSlotWithResp new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getMigrateMySqlStatusSlot( this.client.getEndpoint(), @@ -58591,6 +59112,7 @@ public Mono> getSwiftVirtualNetworkConnection new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSwiftVirtualNetworkConnectionSlot( this.client.getEndpoint(), @@ -58807,6 +59329,7 @@ public Mono> createOrUpdateSwiftVirtualNetwor } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateSwiftVirtualNetworkConnectionSlot( this.client.getEndpoint(), @@ -59028,6 +59551,7 @@ public Mono> deleteSwiftVirtualNetworkSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteSwiftVirtualNetworkSlot( this.client.getEndpoint(), @@ -59225,6 +59749,7 @@ public Mono> updateSwiftVirtualNetworkConnect } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateSwiftVirtualNetworkConnectionSlot( this.client.getEndpoint(), @@ -59453,6 +59978,7 @@ public Mono> listNetworkFeaturesSlotWithResponseA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNetworkFeaturesSlot( this.client.getEndpoint(), @@ -59658,6 +60184,7 @@ public Mono> getNetworkTraceOperationSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getNetworkTraceOperationSlot( this.client.getEndpoint(), @@ -59871,6 +60398,7 @@ public Mono> startWebSiteNetworkTraceSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startWebSiteNetworkTraceSlot( this.client.getEndpoint(), @@ -60170,6 +60698,7 @@ public Mono>> startWebSiteNetworkTraceOperationSlotWit new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startWebSiteNetworkTraceOperationSlot( this.client.getEndpoint(), @@ -60199,7 +60728,7 @@ public Mono>> startWebSiteNetworkTraceOperationSlotWit * @return array of NetworkTrace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginStartWebSiteNetworkTraceOperationSlot( + public PollerFlux, Object> beginStartWebSiteNetworkTraceOperationSlotAsync( String resourceGroupName, String name, String slot, @@ -60230,7 +60759,7 @@ public PollerFlux, Object> beginStartWebSiteNetworkTraceOpera * @return array of NetworkTrace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginStartWebSiteNetworkTraceOperationSlot( + public PollerFlux, Object> beginStartWebSiteNetworkTraceOperationSlotAsync( String resourceGroupName, String name, String slot, @@ -60246,6 +60775,62 @@ public PollerFlux, Object> beginStartWebSiteNetworkTraceOpera .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class); } + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginStartWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginStartWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .getSyncPoller(); + } + /** * Description for Start capturing network packets for the site. * @@ -60268,14 +60853,10 @@ public Mono startWebSiteNetworkTraceOperationSlotAsync( Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - Mono>> mono = - startWebSiteNetworkTraceOperationSlotWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -60302,14 +60883,10 @@ public Mono startWebSiteNetworkTraceOperationSlotAsync( Integer maxFrameLength, String sasUrl, Context context) { - Mono>> mono = - startWebSiteNetworkTraceOperationSlotWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -60329,14 +60906,10 @@ public Mono startWebSiteNetworkTraceOperationSlotAsync(String resourceGr final Integer maxFrameLength = null; final String sasUrl = null; final Context context = null; - Mono>> mono = - startWebSiteNetworkTraceOperationSlotWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -60505,6 +61078,7 @@ public Mono> stopWebSiteNetworkTraceSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .stopWebSiteNetworkTraceSlot( this.client.getEndpoint(), @@ -60682,6 +61256,7 @@ public Mono>> getNetworkTracesSlotWithResponseA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getNetworkTracesSlot( this.client.getEndpoint(), @@ -60887,6 +61462,7 @@ public Mono> getNetworkTraceOperationSlotV2WithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getNetworkTraceOperationSlotV2( this.client.getEndpoint(), @@ -61092,6 +61668,7 @@ public Mono>> getNetworkTracesSlotV2WithRespons new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getNetworkTracesSlotV2( this.client.getEndpoint(), @@ -61288,6 +61865,7 @@ public Mono> generateNewSitePublishingPasswordSlotWithResponseAsy new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .generateNewSitePublishingPasswordSlot( this.client.getEndpoint(), @@ -61475,6 +62053,7 @@ public Mono> listPerfMonCountersSlotSinglePa new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPerfMonCountersSlot( this.client.getEndpoint(), @@ -61710,6 +62289,7 @@ public Mono> getSitePhpErrorLogFlagSlotWithRe new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSitePhpErrorLogFlagSlot( this.client.getEndpoint(), @@ -61896,6 +62476,7 @@ public Mono> listPremierAddOnsSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPremierAddOnsSlot( this.client.getEndpoint(), @@ -62096,6 +62677,7 @@ public Mono> getPremierAddOnSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getPremierAddOnSlot( this.client.getEndpoint(), @@ -62321,6 +62903,7 @@ public Mono> addPremierAddOnSlotWithResponseAsync( } else { premierAddOn.validate(); } + context = this.client.mergeContext(context); return service .addPremierAddOnSlot( this.client.getEndpoint(), @@ -62544,6 +63127,7 @@ public Mono> deletePremierAddOnSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deletePremierAddOnSlot( this.client.getEndpoint(), @@ -62756,6 +63340,7 @@ public Mono> updatePremierAddOnSlotWithResponseAsync } else { premierAddOn.validate(); } + context = this.client.mergeContext(context); return service .updatePremierAddOnSlot( this.client.getEndpoint(), @@ -62977,6 +63562,7 @@ public Mono> getPrivateAccessSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getPrivateAccessSlot( this.client.getEndpoint(), @@ -63179,6 +63765,7 @@ public Mono> putPrivateAccessVnetSlotWithResponseAs } else { access.validate(); } + context = this.client.mergeContext(context); return service .putPrivateAccessVnetSlot( this.client.getEndpoint(), @@ -63379,6 +63966,7 @@ public Mono> getPrivateEndpoint new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getPrivateEndpointConnection( this.client.getEndpoint(), @@ -63596,6 +64184,7 @@ public Mono>> approveOrRejectPrivateEndpointConnection } else { privateEndpointWrapper.validate(); } + context = this.client.mergeContext(context); return service .approveOrRejectPrivateEndpointConnection( this.client.getEndpoint(), @@ -63622,7 +64211,7 @@ public Mono>> approveOrRejectPrivateEndpointConnection */ @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux, PrivateEndpointConnectionResourceInner> - beginApproveOrRejectPrivateEndpointConnection( + beginApproveOrRejectPrivateEndpointConnectionAsync( String resourceGroupName, String name, String privateEndpointConnectionName, @@ -63654,7 +64243,7 @@ public Mono>> approveOrRejectPrivateEndpointConnection */ @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux, PrivateEndpointConnectionResourceInner> - beginApproveOrRejectPrivateEndpointConnection( + beginApproveOrRejectPrivateEndpointConnectionAsync( String resourceGroupName, String name, String privateEndpointConnectionName, @@ -63672,6 +64261,56 @@ public Mono>> approveOrRejectPrivateEndpointConnection PrivateEndpointConnectionResourceInner.class); } + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, PrivateEndpointConnectionResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, PrivateEndpointConnectionResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .getSyncPoller(); + } + /** * Description for Approves or rejects a private endpoint connection. * @@ -63690,18 +64329,10 @@ public Mono approveOrRejectPrivateEndpoi String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { - Mono>> mono = - approveOrRejectPrivateEndpointConnectionWithResponseAsync( - resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionResourceInner.class, - PrivateEndpointConnectionResourceInner.class) + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -63724,18 +64355,10 @@ public Mono approveOrRejectPrivateEndpoi String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Context context) { - Mono>> mono = - approveOrRejectPrivateEndpointConnectionWithResponseAsync( - resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context); - return this - .client - .getLroResultAsync( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionResourceInner.class, - PrivateEndpointConnectionResourceInner.class) + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -63880,6 +64503,7 @@ public Mono>> deletePrivateEndpointConnectionWithRespo new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deletePrivateEndpointConnection( this.client.getEndpoint(), @@ -63903,7 +64527,7 @@ public Mono>> deletePrivateEndpointConnectionWithRespo * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginDeletePrivateEndpointConnection( + public PollerFlux, Object> beginDeletePrivateEndpointConnectionAsync( String resourceGroupName, String name, String privateEndpointConnectionName) { Mono>> mono = deletePrivateEndpointConnectionWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName); @@ -63925,7 +64549,7 @@ public PollerFlux, Object> beginDeletePrivateEndpointConnecti * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginDeletePrivateEndpointConnection( + public PollerFlux, Object> beginDeletePrivateEndpointConnectionAsync( String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { Mono>> mono = deletePrivateEndpointConnectionWithResponseAsync( @@ -63935,6 +64559,44 @@ public PollerFlux, Object> beginDeletePrivateEndpointConnecti .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class); } + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return beginDeletePrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .getSyncPoller(); + } + /** * Description for Deletes a private endpoint connection. * @@ -63949,13 +64611,9 @@ public PollerFlux, Object> beginDeletePrivateEndpointConnecti @ServiceMethod(returns = ReturnType.SINGLE) public Mono deletePrivateEndpointConnectionAsync( String resourceGroupName, String name, String privateEndpointConnectionName) { - Mono>> mono = - deletePrivateEndpointConnectionWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -63973,14 +64631,10 @@ public Mono deletePrivateEndpointConnectionAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono deletePrivateEndpointConnectionAsync( String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { - Mono>> mono = - deletePrivateEndpointConnectionWithResponseAsync( - resourceGroupName, name, privateEndpointConnectionName, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginDeletePrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -64098,6 +64752,7 @@ public Mono> getPrivateLinkResourcesW new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getPrivateLinkResources( this.client.getEndpoint(), @@ -64289,6 +64944,7 @@ public Mono> listProcessesSlotSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessesSlot( this.client.getEndpoint(), @@ -64488,6 +65144,7 @@ public Mono> getProcessSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getProcessSlot( this.client.getEndpoint(), @@ -64694,6 +65351,7 @@ public Mono> deleteProcessSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteProcessSlot( this.client.getEndpoint(), @@ -64885,6 +65543,7 @@ public Mono getProcessDumpSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getProcessDumpSlot( this.client.getEndpoint(), @@ -64953,11 +65612,24 @@ public Flux getProcessDumpSlotAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getProcessDumpSlot(String resourceGroupName, String name, String processId, String slot) { - return getProcessDumpSlotAsync(resourceGroupName, name, processId, slot) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getProcessDumpSlotAsync(resourceGroupName, name, processId, slot) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -64977,11 +65649,24 @@ public InputStream getProcessDumpSlot(String resourceGroupName, String name, Str @ServiceMethod(returns = ReturnType.SINGLE) public InputStream getProcessDumpSlot( String resourceGroupName, String name, String processId, String slot, Context context) { - return getProcessDumpSlotAsync(resourceGroupName, name, processId, slot, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + getProcessDumpSlotAsync(resourceGroupName, name, processId, slot, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -65092,6 +65777,7 @@ public Mono> listProcessModulesSlotSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessModulesSlot( this.client.getEndpoint(), @@ -65303,6 +65989,7 @@ public Mono> getProcessModuleSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getProcessModuleSlot( this.client.getEndpoint(), @@ -65522,6 +66209,7 @@ public Mono> listProcessThreadsSlotSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessThreadsSlot( this.client.getEndpoint(), @@ -65724,6 +66412,7 @@ public Mono> listPublicCertificatesSlotSin new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPublicCertificatesSlot( this.client.getEndpoint(), @@ -65923,6 +66612,7 @@ public Mono> getPublicCertificateSlotWithRespon new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getPublicCertificateSlot( this.client.getEndpoint(), @@ -66154,6 +66844,7 @@ public Mono> createOrUpdatePublicCertificateSlo } else { publicCertificate.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdatePublicCertificateSlot( this.client.getEndpoint(), @@ -66390,6 +67081,7 @@ public Mono> deletePublicCertificateSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deletePublicCertificateSlot( this.client.getEndpoint(), @@ -66592,6 +67284,7 @@ public Mono listPublishingProfileXmlWithSecretsSlotWithResponseA } else { publishingProfileOptions.validate(); } + context = this.client.mergeContext(context); return service .listPublishingProfileXmlWithSecretsSlot( this.client.getEndpoint(), @@ -66667,11 +67360,24 @@ public Flux listPublishingProfileXmlWithSecretsSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public InputStream listPublishingProfileXmlWithSecretsSlot( String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions) { - return listPublishingProfileXmlWithSecretsSlotAsync(resourceGroupName, name, slot, publishingProfileOptions) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + listPublishingProfileXmlWithSecretsSlotAsync(resourceGroupName, name, slot, publishingProfileOptions) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -66695,12 +67401,25 @@ public InputStream listPublishingProfileXmlWithSecretsSlot( String slot, CsmPublishingProfileOptions publishingProfileOptions, Context context) { - return listPublishingProfileXmlWithSecretsSlotAsync( - resourceGroupName, name, slot, publishingProfileOptions, context) - .map(ByteBufferBackedInputStream::new) - .collectList() - .map(list -> new SequenceInputStream(Collections.enumeration(list))) - .block(); + Iterator iterator = + listPublishingProfileXmlWithSecretsSlotAsync( + resourceGroupName, name, slot, publishingProfileOptions, context) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); } /** @@ -66795,6 +67514,7 @@ public Mono> resetSlotConfigurationSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .resetSlotConfigurationSlot( this.client.getEndpoint(), @@ -66979,6 +67699,7 @@ public Mono> restartSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .restartSlot( this.client.getEndpoint(), @@ -67219,6 +67940,7 @@ public Mono>> restoreFromBackupBlobSlotWithResponseAsy } else { request.validate(); } + context = this.client.mergeContext(context); return service .restoreFromBackupBlobSlot( this.client.getEndpoint(), @@ -67245,7 +67967,7 @@ public Mono>> restoreFromBackupBlobSlotWithResponseAsy * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreFromBackupBlobSlot( + public PollerFlux, Void> beginRestoreFromBackupBlobSlotAsync( String resourceGroupName, String name, String slot, RestoreRequestInner request) { Mono>> mono = restoreFromBackupBlobSlotWithResponseAsync(resourceGroupName, name, slot, request); @@ -67267,13 +67989,52 @@ public PollerFlux, Void> beginRestoreFromBackupBlobSlot( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreFromBackupBlobSlot( + public PollerFlux, Void> beginRestoreFromBackupBlobSlotAsync( String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { Mono>> mono = restoreFromBackupBlobSlotWithResponseAsync(resourceGroupName, name, slot, request, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Description of a restore request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return beginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request).getSyncPoller(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Description of a restore request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + return beginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request, context).getSyncPoller(); + } + /** * Description for Restores an app from a backup blob in Azure Storage. * @@ -67290,13 +68051,9 @@ public PollerFlux, Void> beginRestoreFromBackupBlobSlot( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreFromBackupBlobSlotAsync( String resourceGroupName, String name, String slot, RestoreRequestInner request) { - Mono>> mono = - restoreFromBackupBlobSlotWithResponseAsync(resourceGroupName, name, slot, request); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -67316,13 +68073,9 @@ public Mono restoreFromBackupBlobSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreFromBackupBlobSlotAsync( String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { - Mono>> mono = - restoreFromBackupBlobSlotWithResponseAsync(resourceGroupName, name, slot, request, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -67463,6 +68216,7 @@ public Mono>> restoreFromDeletedAppSlotWithResponseAsy } else { restoreRequest.validate(); } + context = this.client.mergeContext(context); return service .restoreFromDeletedAppSlot( this.client.getEndpoint(), @@ -67488,7 +68242,7 @@ public Mono>> restoreFromDeletedAppSlotWithResponseAsy * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreFromDeletedAppSlot( + public PollerFlux, Void> beginRestoreFromDeletedAppSlotAsync( String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { Mono>> mono = restoreFromDeletedAppSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest); @@ -67509,13 +68263,51 @@ public PollerFlux, Void> beginRestoreFromDeletedAppSlot( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreFromDeletedAppSlot( + public PollerFlux, Void> beginRestoreFromDeletedAppSlotAsync( String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { Mono>> mono = restoreFromDeletedAppSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Details about restoring a deleted app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + return beginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest).getSyncPoller(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Details about restoring a deleted app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { + return beginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest, context) + .getSyncPoller(); + } + /** * Description for Restores a deleted web app to this web app. * @@ -67531,13 +68323,9 @@ public PollerFlux, Void> beginRestoreFromDeletedAppSlot( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreFromDeletedAppSlotAsync( String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { - Mono>> mono = - restoreFromDeletedAppSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -67556,13 +68344,9 @@ public Mono restoreFromDeletedAppSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreFromDeletedAppSlotAsync( String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { - Mono>> mono = - restoreFromDeletedAppSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -67701,6 +68485,7 @@ public Mono>> restoreSnapshotSlotWithResponseAsync( } else { restoreRequest.validate(); } + context = this.client.mergeContext(context); return service .restoreSnapshotSlot( this.client.getEndpoint(), @@ -67726,7 +68511,7 @@ public Mono>> restoreSnapshotSlotWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreSnapshotSlot( + public PollerFlux, Void> beginRestoreSnapshotSlotAsync( String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { Mono>> mono = restoreSnapshotSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest); @@ -67747,13 +68532,50 @@ public PollerFlux, Void> beginRestoreSnapshotSlot( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginRestoreSnapshotSlot( + public PollerFlux, Void> beginRestoreSnapshotSlotAsync( String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { Mono>> mono = restoreSnapshotSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Details about app recovery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + return beginRestoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest).getSyncPoller(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Details about app recovery operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { + return beginRestoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest, context).getSyncPoller(); + } + /** * Description for Restores a web app from a snapshot. * @@ -67769,13 +68591,9 @@ public PollerFlux, Void> beginRestoreSnapshotSlot( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreSnapshotSlotAsync( String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { - Mono>> mono = - restoreSnapshotSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -67794,13 +68612,9 @@ public Mono restoreSnapshotSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreSnapshotSlotAsync( String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { - Mono>> mono = - restoreSnapshotSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginRestoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -67935,6 +68749,7 @@ public Mono> listSiteExtensionsSlotSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteExtensionsSlot( this.client.getEndpoint(), @@ -68128,6 +68943,7 @@ public Mono> getSiteExtensionSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSiteExtensionSlot( this.client.getEndpoint(), @@ -68329,6 +69145,7 @@ public Mono>> installSiteExtensionSlotWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .installSiteExtensionSlot( this.client.getEndpoint(), @@ -68354,7 +69171,7 @@ public Mono>> installSiteExtensionSlotWithResponseAsyn * @return site Extension Information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionSlot( + public PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionSlotAsync( String resourceGroupName, String name, String siteExtensionId, String slot) { Mono>> mono = installSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot); @@ -68378,7 +69195,7 @@ public PollerFlux, SiteExtensionInfoInner> be * @return site Extension Information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionSlot( + public PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionSlotAsync( String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { Mono>> mono = installSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot, context); @@ -68388,6 +69205,44 @@ public PollerFlux, SiteExtensionInfoInner> be mono, this.client.getHttpPipeline(), SiteExtensionInfoInner.class, SiteExtensionInfoInner.class); } + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot) { + return beginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).getSyncPoller(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + return beginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot, context) + .getSyncPoller(); + } + /** * Description for Install site extension on a web site, or a deployment slot. * @@ -68403,14 +69258,9 @@ public PollerFlux, SiteExtensionInfoInner> be @ServiceMethod(returns = ReturnType.SINGLE) public Mono installSiteExtensionSlotAsync( String resourceGroupName, String name, String siteExtensionId, String slot) { - Mono>> mono = - installSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteExtensionInfoInner.class, SiteExtensionInfoInner.class) + return beginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -68429,14 +69279,9 @@ public Mono installSiteExtensionSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono installSiteExtensionSlotAsync( String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { - Mono>> mono = - installSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteExtensionInfoInner.class, SiteExtensionInfoInner.class) + return beginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -68577,6 +69422,7 @@ public Mono> deleteSiteExtensionSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteSiteExtensionSlot( this.client.getEndpoint(), @@ -68767,6 +69613,7 @@ public Mono>> copySlotWithResponseAsync( } else { copySlotEntity.validate(); } + context = this.client.mergeContext(context); return service .copySlot( this.client.getEndpoint(), @@ -68792,7 +69639,7 @@ public Mono>> copySlotWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginCopySlot( + public PollerFlux, Void> beginCopySlotAsync( String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity) { Mono>> mono = copySlotWithResponseAsync(resourceGroupName, name, slot, copySlotEntity); @@ -68813,13 +69660,50 @@ public PollerFlux, Void> beginCopySlot( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginCopySlot( + public PollerFlux, Void> beginCopySlotAsync( String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity, Context context) { Mono>> mono = copySlotWithResponseAsync(resourceGroupName, name, slot, copySlotEntity, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param copySlotEntity Copy deployment slot parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginCopySlot( + String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity) { + return beginCopySlotAsync(resourceGroupName, name, slot, copySlotEntity).getSyncPoller(); + } + + /** + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param copySlotEntity Copy deployment slot parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginCopySlot( + String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity, Context context) { + return beginCopySlotAsync(resourceGroupName, name, slot, copySlotEntity, context).getSyncPoller(); + } + /** * Description for Copies a deployment slot to another deployment slot of an app. * @@ -68835,13 +69719,9 @@ public PollerFlux, Void> beginCopySlot( @ServiceMethod(returns = ReturnType.SINGLE) public Mono copySlotAsync( String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity) { - Mono>> mono = - copySlotWithResponseAsync(resourceGroupName, name, slot, copySlotEntity); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginCopySlotAsync(resourceGroupName, name, slot, copySlotEntity) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -68860,13 +69740,9 @@ public Mono copySlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono copySlotAsync( String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity, Context context) { - Mono>> mono = - copySlotWithResponseAsync(resourceGroupName, name, slot, copySlotEntity, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginCopySlotAsync(resourceGroupName, name, slot, copySlotEntity, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -69013,6 +69889,7 @@ public Mono> listSlotDifferencesSlotSinglePag } else { slotSwapEntity.validate(); } + context = this.client.mergeContext(context); return service .listSlotDifferencesSlot( this.client.getEndpoint(), @@ -69214,6 +70091,7 @@ public Mono>> swapSlotWithResponseAsync( } else { slotSwapEntity.validate(); } + context = this.client.mergeContext(context); return service .swapSlot( this.client.getEndpoint(), @@ -69239,7 +70117,7 @@ public Mono>> swapSlotWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginSwapSlot( + public PollerFlux, Void> beginSwapSlotAsync( String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { Mono>> mono = swapSlotWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity); @@ -69260,13 +70138,50 @@ public PollerFlux, Void> beginSwapSlot( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginSwapSlot( + public PollerFlux, Void> beginSwapSlotAsync( String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { Mono>> mono = swapSlotWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity Deployment slot parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginSwapSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + return beginSwapSlotAsync(resourceGroupName, name, slot, slotSwapEntity).getSyncPoller(); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity Deployment slot parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginSwapSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + return beginSwapSlotAsync(resourceGroupName, name, slot, slotSwapEntity, context).getSyncPoller(); + } + /** * Description for Swaps two deployment slots of an app. * @@ -69281,13 +70196,9 @@ public PollerFlux, Void> beginSwapSlot( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono swapSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { - Mono>> mono = - swapSlotWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginSwapSlotAsync(resourceGroupName, name, slot, slotSwapEntity) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -69306,13 +70217,9 @@ public Mono swapSlotAsync(String resourceGroupName, String name, String sl @ServiceMethod(returns = ReturnType.SINGLE) public Mono swapSlotAsync( String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { - Mono>> mono = - swapSlotWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginSwapSlotAsync(resourceGroupName, name, slot, slotSwapEntity, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -69446,6 +70353,7 @@ public Mono> listSnapshotsSlotSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSnapshotsSlot( this.client.getEndpoint(), @@ -69635,6 +70543,7 @@ public Mono> listSnapshotsFromDRSecondarySlotSingle new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSnapshotsFromDRSecondarySlot( this.client.getEndpoint(), @@ -69819,6 +70728,7 @@ public Mono> getSourceControlSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSourceControlSlot( this.client.getEndpoint(), @@ -70023,6 +70933,7 @@ public Mono>> createOrUpdateSourceControlSlotWithRespo } else { siteSourceControl.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateSourceControlSlot( this.client.getEndpoint(), @@ -70049,8 +70960,9 @@ public Mono>> createOrUpdateSourceControlSlotWithRespo * @return source control configuration for an app. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteSourceControlInner> beginCreateOrUpdateSourceControlSlot( - String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + public PollerFlux, SiteSourceControlInner> + beginCreateOrUpdateSourceControlSlotAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { Mono>> mono = createOrUpdateSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, siteSourceControl); return this @@ -70074,8 +70986,13 @@ public PollerFlux, SiteSourceControlInner> be * @return source control configuration for an app. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteSourceControlInner> beginCreateOrUpdateSourceControlSlot( - String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + public PollerFlux, SiteSourceControlInner> + beginCreateOrUpdateSourceControlSlotAsync( + String resourceGroupName, + String name, + String slot, + SiteSourceControlInner siteSourceControl, + Context context) { Mono>> mono = createOrUpdateSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, siteSourceControl, context); return this @@ -70084,6 +71001,47 @@ public PollerFlux, SiteSourceControlInner> be mono, this.client.getHttpPipeline(), SiteSourceControlInner.class, SiteSourceControlInner.class); } + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl Source control configuration for an app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl) + .getSyncPoller(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl Source control configuration for an app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + return beginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl, context) + .getSyncPoller(); + } + /** * Description for Updates the source control configuration of an app. * @@ -70100,14 +71058,9 @@ public PollerFlux, SiteSourceControlInner> be @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateSourceControlSlotAsync( String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { - Mono>> mono = - createOrUpdateSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, siteSourceControl); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteSourceControlInner.class, SiteSourceControlInner.class) + return beginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -70127,14 +71080,9 @@ public Mono createOrUpdateSourceControlSlotAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateSourceControlSlotAsync( String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { - Mono>> mono = - createOrUpdateSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, siteSourceControl, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteSourceControlInner.class, SiteSourceControlInner.class) + return beginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -70266,6 +71214,7 @@ public Mono> deleteSourceControlSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteSourceControlSlot( this.client.getEndpoint(), @@ -70453,6 +71402,7 @@ public Mono> updateSourceControlSlotWithRespons } else { siteSourceControl.validate(); } + context = this.client.mergeContext(context); return service .updateSourceControlSlot( this.client.getEndpoint(), @@ -70646,6 +71596,7 @@ public Mono> startSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startSlot( this.client.getEndpoint(), @@ -70830,6 +71781,7 @@ public Mono>> startNetworkTraceSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startNetworkTraceSlot( this.client.getEndpoint(), @@ -70859,7 +71811,7 @@ public Mono>> startNetworkTraceSlotWithResponseAsync( * @return array of NetworkTrace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginStartNetworkTraceSlot( + public PollerFlux, Object> beginStartNetworkTraceSlotAsync( String resourceGroupName, String name, String slot, @@ -70890,7 +71842,7 @@ public PollerFlux, Object> beginStartNetworkTraceSlot( * @return array of NetworkTrace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginStartNetworkTraceSlot( + public PollerFlux, Object> beginStartNetworkTraceSlotAsync( String resourceGroupName, String name, String slot, @@ -70906,6 +71858,61 @@ public PollerFlux, Object> beginStartNetworkTraceSlot( .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class); } + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginStartNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return beginStartNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginStartNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartNetworkTraceSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .getSyncPoller(); + } + /** * Description for Start capturing network packets for the site. * @@ -70928,14 +71935,9 @@ public Mono startNetworkTraceSlotAsync( Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - Mono>> mono = - startNetworkTraceSlotWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -70962,14 +71964,10 @@ public Mono startNetworkTraceSlotAsync( Integer maxFrameLength, String sasUrl, Context context) { - Mono>> mono = - startNetworkTraceSlotWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartNetworkTraceSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -70989,14 +71987,9 @@ public Mono startNetworkTraceSlotAsync(String resourceGroupName, String final Integer maxFrameLength = null; final String sasUrl = null; final Context context = null; - Mono>> mono = - startNetworkTraceSlotWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -71162,6 +72155,7 @@ public Mono> stopSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .stopSlot( this.client.getEndpoint(), @@ -71326,6 +72320,7 @@ public Mono> stopNetworkTraceSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .stopNetworkTraceSlot( this.client.getEndpoint(), @@ -71491,6 +72486,7 @@ public Mono> syncRepositorySlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .syncRepositorySlot( this.client.getEndpoint(), @@ -71656,6 +72652,7 @@ public Mono> syncFunctionTriggersSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .syncFunctionTriggersSlot( this.client.getEndpoint(), @@ -71833,6 +72830,7 @@ public Mono> listTriggeredWebJobsSlotSingleP new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listTriggeredWebJobsSlot( this.client.getEndpoint(), @@ -72028,6 +73026,7 @@ public Mono> getTriggeredWebJobSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getTriggeredWebJobSlot( this.client.getEndpoint(), @@ -72229,6 +73228,7 @@ public Mono> deleteTriggeredWebJobSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteTriggeredWebJobSlot( this.client.getEndpoint(), @@ -72424,6 +73424,7 @@ public Mono> listTriggeredWebJobHistoryS new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listTriggeredWebJobHistorySlot( this.client.getEndpoint(), @@ -72630,6 +73631,7 @@ public Mono> getTriggeredWebJobHistorySlotWit new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getTriggeredWebJobHistorySlot( this.client.getEndpoint(), @@ -72834,6 +73836,7 @@ public Mono> runTriggeredWebJobSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .runTriggeredWebJobSlot( this.client.getEndpoint(), @@ -73025,6 +74028,7 @@ public Mono> listUsagesSlotSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listUsagesSlot( this.client.getEndpoint(), @@ -73266,6 +74270,7 @@ public Mono>> listVnetConnectionsSlotWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listVnetConnectionsSlot( this.client.getEndpoint(), @@ -73464,6 +74469,7 @@ public Mono> getVnetConnectionSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getVnetConnectionSlot( this.client.getEndpoint(), @@ -73690,6 +74696,7 @@ public Mono> createOrUpdateVnetConnectionSlotWithRespons } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateVnetConnectionSlot( this.client.getEndpoint(), @@ -73919,6 +74926,7 @@ public Mono> deleteVnetConnectionSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteVnetConnectionSlot( this.client.getEndpoint(), @@ -74129,6 +75137,7 @@ public Mono> updateVnetConnectionSlotWithResponseAsync( } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateVnetConnectionSlot( this.client.getEndpoint(), @@ -74364,6 +75373,7 @@ public Mono> getVnetConnectionGatewaySlotWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getVnetConnectionGatewaySlot( this.client.getEndpoint(), @@ -74612,6 +75622,7 @@ public Mono> createOrUpdateVnetConnectionGatewaySlotW } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateVnetConnectionGatewaySlot( this.client.getEndpoint(), @@ -74896,6 +75907,7 @@ public Mono> updateVnetConnectionGatewaySlotWithRespo } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateVnetConnectionGatewaySlot( this.client.getEndpoint(), @@ -75143,6 +76155,7 @@ public Mono> listWebJobsSlotSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebJobsSlot( this.client.getEndpoint(), @@ -75338,6 +76351,7 @@ public Mono> getWebJobSlotWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getWebJobSlot( this.client.getEndpoint(), @@ -75543,6 +76557,7 @@ public Mono> listSlotDifferencesFromProductio } else { slotSwapEntity.validate(); } + context = this.client.mergeContext(context); return service .listSlotDifferencesFromProduction( this.client.getEndpoint(), @@ -75730,6 +76745,7 @@ public Mono>> swapSlotWithProductionWithResponseAsync( } else { slotSwapEntity.validate(); } + context = this.client.mergeContext(context); return service .swapSlotWithProduction( this.client.getEndpoint(), @@ -75753,7 +76769,7 @@ public Mono>> swapSlotWithProductionWithResponseAsync( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginSwapSlotWithProduction( + public PollerFlux, Void> beginSwapSlotWithProductionAsync( String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { Mono>> mono = swapSlotWithProductionWithResponseAsync(resourceGroupName, name, slotSwapEntity); @@ -75773,13 +76789,48 @@ public PollerFlux, Void> beginSwapSlotWithProduction( * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Void> beginSwapSlotWithProduction( + public PollerFlux, Void> beginSwapSlotWithProductionAsync( String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { Mono>> mono = swapSlotWithProductionWithResponseAsync(resourceGroupName, name, slotSwapEntity, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity Deployment slot parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginSwapSlotWithProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + return beginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity).getSyncPoller(); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity Deployment slot parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginSwapSlotWithProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + return beginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity, context).getSyncPoller(); + } + /** * Description for Swaps two deployment slots of an app. * @@ -75793,13 +76844,9 @@ public PollerFlux, Void> beginSwapSlotWithProduction( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { - Mono>> mono = - swapSlotWithProductionWithResponseAsync(resourceGroupName, name, slotSwapEntity); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -75817,13 +76864,9 @@ public Mono swapSlotWithProductionAsync(String resourceGroupName, String n @ServiceMethod(returns = ReturnType.SINGLE) public Mono swapSlotWithProductionAsync( String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { - Mono>> mono = - swapSlotWithProductionWithResponseAsync(resourceGroupName, name, slotSwapEntity, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class) + return beginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -75945,6 +76988,7 @@ public Mono> listSnapshotsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSnapshots( this.client.getEndpoint(), @@ -76118,6 +77162,7 @@ public Mono> listSnapshotsFromDRSecondarySinglePage new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSnapshotsFromDRSecondary( this.client.getEndpoint(), @@ -76284,6 +77329,7 @@ public Mono> getSourceControlWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getSourceControl( this.client.getEndpoint(), @@ -76466,6 +77512,7 @@ public Mono>> createOrUpdateSourceControlWithResponseA } else { siteSourceControl.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateSourceControl( this.client.getEndpoint(), @@ -76489,7 +77536,7 @@ public Mono>> createOrUpdateSourceControlWithResponseA * @return source control configuration for an app. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteSourceControlInner> beginCreateOrUpdateSourceControl( + public PollerFlux, SiteSourceControlInner> beginCreateOrUpdateSourceControlAsync( String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { Mono>> mono = createOrUpdateSourceControlWithResponseAsync(resourceGroupName, name, siteSourceControl); @@ -76512,7 +77559,7 @@ public PollerFlux, SiteSourceControlInner> be * @return source control configuration for an app. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, SiteSourceControlInner> beginCreateOrUpdateSourceControl( + public PollerFlux, SiteSourceControlInner> beginCreateOrUpdateSourceControlAsync( String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { Mono>> mono = createOrUpdateSourceControlWithResponseAsync(resourceGroupName, name, siteSourceControl, context); @@ -76522,6 +77569,42 @@ public PollerFlux, SiteSourceControlInner> be mono, this.client.getHttpPipeline(), SiteSourceControlInner.class, SiteSourceControlInner.class); } + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl Source control configuration for an app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl).getSyncPoller(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl Source control configuration for an app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + return beginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl, context) + .getSyncPoller(); + } + /** * Description for Updates the source control configuration of an app. * @@ -76536,14 +77619,9 @@ public PollerFlux, SiteSourceControlInner> be @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateSourceControlAsync( String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { - Mono>> mono = - createOrUpdateSourceControlWithResponseAsync(resourceGroupName, name, siteSourceControl); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteSourceControlInner.class, SiteSourceControlInner.class) + return beginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -76561,14 +77639,9 @@ public Mono createOrUpdateSourceControlAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateSourceControlAsync( String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { - Mono>> mono = - createOrUpdateSourceControlWithResponseAsync(resourceGroupName, name, siteSourceControl, context); - return this - .client - .getLroResultAsync( - mono, this.client.getHttpPipeline(), SiteSourceControlInner.class, SiteSourceControlInner.class) + return beginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -76684,6 +77757,7 @@ public Mono> deleteSourceControlWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteSourceControl( this.client.getEndpoint(), @@ -76850,6 +77924,7 @@ public Mono> updateSourceControlWithResponseAsy } else { siteSourceControl.validate(); } + context = this.client.mergeContext(context); return service .updateSourceControl( this.client.getEndpoint(), @@ -77024,6 +78099,7 @@ public Mono> startWithResponseAsync(String resourceGroupName, Str new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .start( this.client.getEndpoint(), @@ -77187,6 +78263,7 @@ public Mono>> startNetworkTraceWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .startNetworkTrace( this.client.getEndpoint(), @@ -77214,7 +78291,7 @@ public Mono>> startNetworkTraceWithResponseAsync( * @return array of NetworkTrace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginStartNetworkTrace( + public PollerFlux, Object> beginStartNetworkTraceAsync( String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { Mono>> mono = startNetworkTraceWithResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); @@ -77238,7 +78315,7 @@ public PollerFlux, Object> beginStartNetworkTrace( * @return array of NetworkTrace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PollerFlux, Object> beginStartNetworkTrace( + public PollerFlux, Object> beginStartNetworkTraceAsync( String resourceGroupName, String name, Integer durationInSeconds, @@ -77253,6 +78330,52 @@ public PollerFlux, Object> beginStartNetworkTrace( .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class); } + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginStartNetworkTrace( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Object> beginStartNetworkTrace( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .getSyncPoller(); + } + /** * Description for Start capturing network packets for the site. * @@ -77269,13 +78392,9 @@ public PollerFlux, Object> beginStartNetworkTrace( @ServiceMethod(returns = ReturnType.SINGLE) public Mono startNetworkTraceAsync( String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - Mono>> mono = - startNetworkTraceWithResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -77300,14 +78419,9 @@ public Mono startNetworkTraceAsync( Integer maxFrameLength, String sasUrl, Context context) { - Mono>> mono = - startNetworkTraceWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -77326,13 +78440,9 @@ public Mono startNetworkTraceAsync(String resourceGroupName, String name final Integer maxFrameLength = null; final String sasUrl = null; final Context context = null; - Mono>> mono = - startNetworkTraceWithResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); - return this - .client - .getLroResultAsync(mono, this.client.getHttpPipeline(), Object.class, Object.class) + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -77476,6 +78586,7 @@ public Mono> stopWithResponseAsync(String resourceGroupName, Stri new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .stop( this.client.getEndpoint(), @@ -77624,6 +78735,7 @@ public Mono> stopNetworkTraceWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .stopNetworkTrace( this.client.getEndpoint(), @@ -77773,6 +78885,7 @@ public Mono> syncRepositoryWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .syncRepository( this.client.getEndpoint(), @@ -77922,6 +79035,7 @@ public Mono> syncFunctionTriggersWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .syncFunctionTriggers( this.client.getEndpoint(), @@ -78082,6 +79196,7 @@ public Mono> listTriggeredWebJobsSinglePageA new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listTriggeredWebJobs( this.client.getEndpoint(), @@ -78257,6 +79372,7 @@ public Mono> getTriggeredWebJobWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getTriggeredWebJob( this.client.getEndpoint(), @@ -78441,6 +79557,7 @@ public Mono> deleteTriggeredWebJobWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteTriggeredWebJob( this.client.getEndpoint(), @@ -78616,6 +79733,7 @@ public Mono> listTriggeredWebJobHistoryS new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listTriggeredWebJobHistory( this.client.getEndpoint(), @@ -78807,6 +79925,7 @@ public Mono> getTriggeredWebJobHistoryWithRes new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getTriggeredWebJobHistory( this.client.getEndpoint(), @@ -78997,6 +80116,7 @@ public Mono> runTriggeredWebJobWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .runTriggeredWebJob( this.client.getEndpoint(), @@ -79170,6 +80290,7 @@ public Mono> listUsagesSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listUsages( this.client.getEndpoint(), @@ -79385,6 +80506,7 @@ public Mono>> listVnetConnectionsWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listVnetConnections( this.client.getEndpoint(), @@ -79561,6 +80683,7 @@ public Mono> getVnetConnectionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getVnetConnection( this.client.getEndpoint(), @@ -79760,6 +80883,7 @@ public Mono> createOrUpdateVnetConnectionWithResponseAsy } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateVnetConnection( this.client.getEndpoint(), @@ -79956,6 +81080,7 @@ public Mono> deleteVnetConnectionWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .deleteVnetConnection( this.client.getEndpoint(), @@ -80139,6 +81264,7 @@ public Mono> updateVnetConnectionWithResponseAsync( } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateVnetConnection( this.client.getEndpoint(), @@ -80342,6 +81468,7 @@ public Mono> getVnetConnectionGatewayWithResponseAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getVnetConnectionGateway( this.client.getEndpoint(), @@ -80567,6 +81694,7 @@ public Mono> createOrUpdateVnetConnectionGatewayWithR } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .createOrUpdateVnetConnectionGateway( this.client.getEndpoint(), @@ -80825,6 +81953,7 @@ public Mono> updateVnetConnectionGatewayWithResponseA } else { connectionEnvelope.validate(); } + context = this.client.mergeContext(context); return service .updateVnetConnectionGateway( this.client.getEndpoint(), @@ -81046,6 +82175,7 @@ public Mono> listWebJobsSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebJobs( this.client.getEndpoint(), @@ -81219,6 +82349,7 @@ public Mono> getWebJobWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getWebJob( this.client.getEndpoint(), @@ -81312,7089 +82443,6 @@ public WebJobInner getWebJob(String resourceGroupName, String name, String webJo return getWebJobAsync(resourceGroupName, name, webJobName, context).block(); } - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String name, SiteInner siteEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (siteEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); - } else { - siteEnvelope.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - siteEnvelope, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (siteEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); - } else { - siteEnvelope.validate(); - } - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - siteEnvelope, - context); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String name, SiteInner siteEnvelope) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, name, siteEnvelope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, name, siteEnvelope, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteInner beginCreateOrUpdateWithoutPolling(String resourceGroupName, String name, SiteInner siteEnvelope) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, name, siteEnvelope).block(); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, name, siteEnvelope, context).block(); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String backupId, RestoreRequestInner request) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (backupId == null) { - return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginRestoreWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - backupId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - request, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (backupId == null) { - return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - return service - .beginRestoreWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - backupId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - request, - context); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreWithoutPollingAsync( - String resourceGroupName, String name, String backupId, RestoreRequestInner request) { - return beginRestoreWithoutPollingWithResponseAsync(resourceGroupName, name, backupId, request) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreWithoutPollingAsync( - String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { - return beginRestoreWithoutPollingWithResponseAsync(resourceGroupName, name, backupId, request, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreWithoutPolling( - String resourceGroupName, String name, String backupId, RestoreRequestInner request) { - beginRestoreWithoutPollingAsync(resourceGroupName, name, backupId, request).block(); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreWithoutPolling( - String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { - beginRestoreWithoutPollingAsync(resourceGroupName, name, backupId, request, context).block(); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginListPublishingCredentialsWithoutPollingWithResponseAsync( - String resourceGroupName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginListPublishingCredentialsWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginListPublishingCredentialsWithoutPollingWithResponseAsync( - String resourceGroupName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginListPublishingCredentialsWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginListPublishingCredentialsWithoutPollingAsync(String resourceGroupName, String name) { - return beginListPublishingCredentialsWithoutPollingWithResponseAsync(resourceGroupName, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginListPublishingCredentialsWithoutPollingAsync( - String resourceGroupName, String name, Context context) { - return beginListPublishingCredentialsWithoutPollingWithResponseAsync(resourceGroupName, name, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UserInner beginListPublishingCredentialsWithoutPolling(String resourceGroupName, String name) { - return beginListPublishingCredentialsWithoutPollingAsync(resourceGroupName, name).block(); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UserInner beginListPublishingCredentialsWithoutPolling( - String resourceGroupName, String name, Context context) { - return beginListPublishingCredentialsWithoutPollingAsync(resourceGroupName, name, context).block(); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateMSDeployOperationWithoutPollingWithResponseAsync( - String resourceGroupName, String name, MSDeploy mSDeploy) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (mSDeploy == null) { - return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); - } else { - mSDeploy.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateMSDeployOperationWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - mSDeploy, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateMSDeployOperationWithoutPollingWithResponseAsync( - String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (mSDeploy == null) { - return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); - } else { - mSDeploy.validate(); - } - return service - .beginCreateMSDeployOperationWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - mSDeploy, - context); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateMSDeployOperationWithoutPollingAsync( - String resourceGroupName, String name, MSDeploy mSDeploy) { - return beginCreateMSDeployOperationWithoutPollingWithResponseAsync(resourceGroupName, name, mSDeploy) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateMSDeployOperationWithoutPollingAsync( - String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { - return beginCreateMSDeployOperationWithoutPollingWithResponseAsync(resourceGroupName, name, mSDeploy, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner beginCreateMSDeployOperationWithoutPolling( - String resourceGroupName, String name, MSDeploy mSDeploy) { - return beginCreateMSDeployOperationWithoutPollingAsync(resourceGroupName, name, mSDeploy).block(); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner beginCreateMSDeployOperationWithoutPolling( - String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { - return beginCreateMSDeployOperationWithoutPollingAsync(resourceGroupName, name, mSDeploy, context).block(); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param functionEnvelope Function information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateFunctionWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (functionName == null) { - return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (functionEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null.")); - } else { - functionEnvelope.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateFunctionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - functionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - functionEnvelope, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param functionEnvelope Function information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateFunctionWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String functionName, - FunctionEnvelopeInner functionEnvelope, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (functionName == null) { - return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (functionEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null.")); - } else { - functionEnvelope.validate(); - } - return service - .beginCreateFunctionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - functionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - functionEnvelope, - context); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param functionEnvelope Function information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateFunctionWithoutPollingAsync( - String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { - return beginCreateFunctionWithoutPollingWithResponseAsync( - resourceGroupName, name, functionName, functionEnvelope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param functionEnvelope Function information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateFunctionWithoutPollingAsync( - String resourceGroupName, - String name, - String functionName, - FunctionEnvelopeInner functionEnvelope, - Context context) { - return beginCreateFunctionWithoutPollingWithResponseAsync( - resourceGroupName, name, functionName, functionEnvelope, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param functionEnvelope Function information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FunctionEnvelopeInner beginCreateFunctionWithoutPolling( - String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { - return beginCreateFunctionWithoutPollingAsync(resourceGroupName, name, functionName, functionEnvelope).block(); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param functionEnvelope Function information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FunctionEnvelopeInner beginCreateFunctionWithoutPolling( - String resourceGroupName, - String name, - String functionName, - FunctionEnvelopeInner functionEnvelope, - Context context) { - return beginCreateFunctionWithoutPollingAsync(resourceGroupName, name, functionName, functionEnvelope, context) - .block(); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateInstanceMSDeployOperationWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (mSDeploy == null) { - return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); - } else { - mSDeploy.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateInstanceMSDeployOperationWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - instanceId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - mSDeploy, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateInstanceMSDeployOperationWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (mSDeploy == null) { - return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); - } else { - mSDeploy.validate(); - } - return service - .beginCreateInstanceMSDeployOperationWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - instanceId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - mSDeploy, - context); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateInstanceMSDeployOperationWithoutPollingAsync( - String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { - return beginCreateInstanceMSDeployOperationWithoutPollingWithResponseAsync( - resourceGroupName, name, instanceId, mSDeploy) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateInstanceMSDeployOperationWithoutPollingAsync( - String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { - return beginCreateInstanceMSDeployOperationWithoutPollingWithResponseAsync( - resourceGroupName, name, instanceId, mSDeploy, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner beginCreateInstanceMSDeployOperationWithoutPolling( - String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { - return beginCreateInstanceMSDeployOperationWithoutPollingAsync(resourceGroupName, name, instanceId, mSDeploy) - .block(); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner beginCreateInstanceMSDeployOperationWithoutPolling( - String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { - return beginCreateInstanceMSDeployOperationWithoutPollingAsync( - resourceGroupName, name, instanceId, mSDeploy, context) - .block(); - } - - /** - * Description for Restores a web app. - * - * @param subscriptionName Azure subscription. - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationOptions Options for app content migration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for a migration of app content request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginMigrateStorageWithoutPollingWithResponseAsync( - String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter subscriptionName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (migrationOptions == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationOptions is required and cannot be null.")); - } else { - migrationOptions.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginMigrateStorageWithoutPolling( - this.client.getEndpoint(), - subscriptionName, - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - migrationOptions, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores a web app. - * - * @param subscriptionName Azure subscription. - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationOptions Options for app content migration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for a migration of app content request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginMigrateStorageWithoutPollingWithResponseAsync( - String subscriptionName, - String resourceGroupName, - String name, - StorageMigrationOptions migrationOptions, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter subscriptionName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (migrationOptions == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationOptions is required and cannot be null.")); - } else { - migrationOptions.validate(); - } - return service - .beginMigrateStorageWithoutPolling( - this.client.getEndpoint(), - subscriptionName, - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - migrationOptions, - context); - } - - /** - * Description for Restores a web app. - * - * @param subscriptionName Azure subscription. - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationOptions Options for app content migration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for a migration of app content request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginMigrateStorageWithoutPollingAsync( - String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { - return beginMigrateStorageWithoutPollingWithResponseAsync( - subscriptionName, resourceGroupName, name, migrationOptions) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Restores a web app. - * - * @param subscriptionName Azure subscription. - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationOptions Options for app content migration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for a migration of app content request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginMigrateStorageWithoutPollingAsync( - String subscriptionName, - String resourceGroupName, - String name, - StorageMigrationOptions migrationOptions, - Context context) { - return beginMigrateStorageWithoutPollingWithResponseAsync( - subscriptionName, resourceGroupName, name, migrationOptions, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Restores a web app. - * - * @param subscriptionName Azure subscription. - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationOptions Options for app content migration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for a migration of app content request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StorageMigrationResponseInner beginMigrateStorageWithoutPolling( - String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { - return beginMigrateStorageWithoutPollingAsync(subscriptionName, resourceGroupName, name, migrationOptions) - .block(); - } - - /** - * Description for Restores a web app. - * - * @param subscriptionName Azure subscription. - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationOptions Options for app content migration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for a migration of app content request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StorageMigrationResponseInner beginMigrateStorageWithoutPolling( - String subscriptionName, - String resourceGroupName, - String name, - StorageMigrationOptions migrationOptions, - Context context) { - return beginMigrateStorageWithoutPollingAsync( - subscriptionName, resourceGroupName, name, migrationOptions, context) - .block(); - } - - /** - * Description for Migrates a local (in-app) MySql database to a remote MySql database. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationRequestEnvelope MySQL migration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an operation on a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginMigrateMySqlWithoutPollingWithResponseAsync( - String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (migrationRequestEnvelope == null) { - return Mono - .error( - new IllegalArgumentException("Parameter migrationRequestEnvelope is required and cannot be null.")); - } else { - migrationRequestEnvelope.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginMigrateMySqlWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - migrationRequestEnvelope, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Migrates a local (in-app) MySql database to a remote MySql database. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationRequestEnvelope MySQL migration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an operation on a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginMigrateMySqlWithoutPollingWithResponseAsync( - String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (migrationRequestEnvelope == null) { - return Mono - .error( - new IllegalArgumentException("Parameter migrationRequestEnvelope is required and cannot be null.")); - } else { - migrationRequestEnvelope.validate(); - } - return service - .beginMigrateMySqlWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - migrationRequestEnvelope, - context); - } - - /** - * Description for Migrates a local (in-app) MySql database to a remote MySql database. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationRequestEnvelope MySQL migration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an operation on a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginMigrateMySqlWithoutPollingAsync( - String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { - return beginMigrateMySqlWithoutPollingWithResponseAsync(resourceGroupName, name, migrationRequestEnvelope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Migrates a local (in-app) MySql database to a remote MySql database. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationRequestEnvelope MySQL migration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an operation on a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginMigrateMySqlWithoutPollingAsync( - String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { - return beginMigrateMySqlWithoutPollingWithResponseAsync( - resourceGroupName, name, migrationRequestEnvelope, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Migrates a local (in-app) MySql database to a remote MySql database. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationRequestEnvelope MySQL migration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an operation on a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationInner beginMigrateMySqlWithoutPolling( - String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { - return beginMigrateMySqlWithoutPollingAsync(resourceGroupName, name, migrationRequestEnvelope).block(); - } - - /** - * Description for Migrates a local (in-app) MySql database to a remote MySql database. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param migrationRequestEnvelope MySQL migration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an operation on a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationInner beginMigrateMySqlWithoutPolling( - String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { - return beginMigrateMySqlWithoutPollingAsync(resourceGroupName, name, migrationRequestEnvelope, context).block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWebSiteNetworkTraceOperationWithoutPollingWithResponseAsync( - String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginStartWebSiteNetworkTraceOperationWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - durationInSeconds, - maxFrameLength, - sasUrl, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWebSiteNetworkTraceOperationWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginStartWebSiteNetworkTraceOperationWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - durationInSeconds, - maxFrameLength, - sasUrl, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWebSiteNetworkTraceOperationWithoutPollingAsync( - String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - return beginStartWebSiteNetworkTraceOperationWithoutPollingWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWebSiteNetworkTraceOperationWithoutPollingAsync( - String resourceGroupName, - String name, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - return beginStartWebSiteNetworkTraceOperationWithoutPollingWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWebSiteNetworkTraceOperationWithoutPollingAsync( - String resourceGroupName, String name) { - final Integer durationInSeconds = null; - final Integer maxFrameLength = null; - final String sasUrl = null; - final Context context = null; - return beginStartWebSiteNetworkTraceOperationWithoutPollingWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartWebSiteNetworkTraceOperationWithoutPolling( - String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - return beginStartWebSiteNetworkTraceOperationWithoutPollingAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartWebSiteNetworkTraceOperationWithoutPolling( - String resourceGroupName, - String name, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - return beginStartWebSiteNetworkTraceOperationWithoutPollingAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartWebSiteNetworkTraceOperationWithoutPolling(String resourceGroupName, String name) { - final Integer durationInSeconds = null; - final Integer maxFrameLength = null; - final String sasUrl = null; - final Context context = null; - return beginStartWebSiteNetworkTraceOperationWithoutPollingAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) - .block(); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreFromBackupBlobWithoutPollingWithResponseAsync( - String resourceGroupName, String name, RestoreRequestInner request) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginRestoreFromBackupBlobWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - request, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreFromBackupBlobWithoutPollingWithResponseAsync( - String resourceGroupName, String name, RestoreRequestInner request, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - return service - .beginRestoreFromBackupBlobWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - request, - context); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreFromBackupBlobWithoutPollingAsync( - String resourceGroupName, String name, RestoreRequestInner request) { - return beginRestoreFromBackupBlobWithoutPollingWithResponseAsync(resourceGroupName, name, request) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreFromBackupBlobWithoutPollingAsync( - String resourceGroupName, String name, RestoreRequestInner request, Context context) { - return beginRestoreFromBackupBlobWithoutPollingWithResponseAsync(resourceGroupName, name, request, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreFromBackupBlobWithoutPolling( - String resourceGroupName, String name, RestoreRequestInner request) { - beginRestoreFromBackupBlobWithoutPollingAsync(resourceGroupName, name, request).block(); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreFromBackupBlobWithoutPolling( - String resourceGroupName, String name, RestoreRequestInner request, Context context) { - beginRestoreFromBackupBlobWithoutPollingAsync(resourceGroupName, name, request, context).block(); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about restoring a deleted app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreFromDeletedAppWithoutPollingWithResponseAsync( - String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginRestoreFromDeletedAppWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about restoring a deleted app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreFromDeletedAppWithoutPollingWithResponseAsync( - String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return service - .beginRestoreFromDeletedAppWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about restoring a deleted app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreFromDeletedAppWithoutPollingAsync( - String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { - return beginRestoreFromDeletedAppWithoutPollingWithResponseAsync(resourceGroupName, name, restoreRequest) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about restoring a deleted app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreFromDeletedAppWithoutPollingAsync( - String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { - return beginRestoreFromDeletedAppWithoutPollingWithResponseAsync( - resourceGroupName, name, restoreRequest, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about restoring a deleted app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreFromDeletedAppWithoutPolling( - String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { - beginRestoreFromDeletedAppWithoutPollingAsync(resourceGroupName, name, restoreRequest).block(); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about restoring a deleted app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreFromDeletedAppWithoutPolling( - String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { - beginRestoreFromDeletedAppWithoutPollingAsync(resourceGroupName, name, restoreRequest, context).block(); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about app recovery operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreSnapshotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginRestoreSnapshotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about app recovery operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreSnapshotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return service - .beginRestoreSnapshotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about app recovery operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreSnapshotWithoutPollingAsync( - String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { - return beginRestoreSnapshotWithoutPollingWithResponseAsync(resourceGroupName, name, restoreRequest) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about app recovery operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreSnapshotWithoutPollingAsync( - String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { - return beginRestoreSnapshotWithoutPollingWithResponseAsync(resourceGroupName, name, restoreRequest, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about app recovery operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreSnapshotWithoutPolling( - String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { - beginRestoreSnapshotWithoutPollingAsync(resourceGroupName, name, restoreRequest).block(); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param restoreRequest Details about app recovery operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreSnapshotWithoutPolling( - String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { - beginRestoreSnapshotWithoutPollingAsync(resourceGroupName, name, restoreRequest, context).block(); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginInstallSiteExtensionWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String siteExtensionId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (siteExtensionId == null) { - return Mono - .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginInstallSiteExtensionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - siteExtensionId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginInstallSiteExtensionWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String siteExtensionId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (siteExtensionId == null) { - return Mono - .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginInstallSiteExtensionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - siteExtensionId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginInstallSiteExtensionWithoutPollingAsync( - String resourceGroupName, String name, String siteExtensionId) { - return beginInstallSiteExtensionWithoutPollingWithResponseAsync(resourceGroupName, name, siteExtensionId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginInstallSiteExtensionWithoutPollingAsync( - String resourceGroupName, String name, String siteExtensionId, Context context) { - return beginInstallSiteExtensionWithoutPollingWithResponseAsync( - resourceGroupName, name, siteExtensionId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteExtensionInfoInner beginInstallSiteExtensionWithoutPolling( - String resourceGroupName, String name, String siteExtensionId) { - return beginInstallSiteExtensionWithoutPollingAsync(resourceGroupName, name, siteExtensionId).block(); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteExtensionInfoInner beginInstallSiteExtensionWithoutPolling( - String resourceGroupName, String name, String siteExtensionId, Context context) { - return beginInstallSiteExtensionWithoutPollingAsync(resourceGroupName, name, siteExtensionId, context).block(); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param copySlotEntity Copy deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCopyProductionSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (copySlotEntity == null) { - return Mono.error(new IllegalArgumentException("Parameter copySlotEntity is required and cannot be null.")); - } else { - copySlotEntity.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCopyProductionSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - copySlotEntity, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param copySlotEntity Copy deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCopyProductionSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (copySlotEntity == null) { - return Mono.error(new IllegalArgumentException("Parameter copySlotEntity is required and cannot be null.")); - } else { - copySlotEntity.validate(); - } - return service - .beginCopyProductionSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - copySlotEntity, - context); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param copySlotEntity Copy deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCopyProductionSlotWithoutPollingAsync( - String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity) { - return beginCopyProductionSlotWithoutPollingWithResponseAsync(resourceGroupName, name, copySlotEntity) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param copySlotEntity Copy deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCopyProductionSlotWithoutPollingAsync( - String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity, Context context) { - return beginCopyProductionSlotWithoutPollingWithResponseAsync(resourceGroupName, name, copySlotEntity, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param copySlotEntity Copy deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginCopyProductionSlotWithoutPolling( - String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity) { - beginCopyProductionSlotWithoutPollingAsync(resourceGroupName, name, copySlotEntity).block(); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param copySlotEntity Copy deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginCopyProductionSlotWithoutPolling( - String resourceGroupName, String name, CsmCopySlotEntityInner copySlotEntity, Context context) { - beginCopyProductionSlotWithoutPollingAsync(resourceGroupName, name, copySlotEntity, context).block(); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify - * the production slot. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (siteEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); - } else { - siteEnvelope.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - siteEnvelope, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify - * the production slot. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (siteEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); - } else { - siteEnvelope.validate(); - } - return service - .beginCreateOrUpdateSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - siteEnvelope, - context); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify - * the production slot. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { - return beginCreateOrUpdateSlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, siteEnvelope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify - * the production slot. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { - return beginCreateOrUpdateSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, siteEnvelope, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify - * the production slot. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteInner beginCreateOrUpdateSlotWithoutPolling( - String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { - return beginCreateOrUpdateSlotWithoutPollingAsync(resourceGroupName, name, slot, siteEnvelope).block(); - } - - /** - * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} - * parameter. - * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify - * the production slot. - * @param siteEnvelope A web app, a mobile app backend, or an API app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a web app, a mobile app backend, or an API app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteInner beginCreateOrUpdateSlotWithoutPolling( - String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { - return beginCreateOrUpdateSlotWithoutPollingAsync(resourceGroupName, name, slot, siteEnvelope, context).block(); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (backupId == null) { - return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginRestoreSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - backupId, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - request, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreSlotWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String backupId, - String slot, - RestoreRequestInner request, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (backupId == null) { - return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - return service - .beginRestoreSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - backupId, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - request, - context); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreSlotWithoutPollingAsync( - String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { - return beginRestoreSlotWithoutPollingWithResponseAsync(resourceGroupName, name, backupId, slot, request) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreSlotWithoutPollingAsync( - String resourceGroupName, - String name, - String backupId, - String slot, - RestoreRequestInner request, - Context context) { - return beginRestoreSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, backupId, slot, request, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreSlotWithoutPolling( - String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { - beginRestoreSlotWithoutPollingAsync(resourceGroupName, name, backupId, slot, request).block(); - } - - /** - * Description for Restores a specific backup to another app (or deployment slot, if specified). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param backupId ID of the backup. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreSlotWithoutPolling( - String resourceGroupName, - String name, - String backupId, - String slot, - RestoreRequestInner request, - Context context) { - beginRestoreSlotWithoutPollingAsync(resourceGroupName, name, backupId, slot, request, context).block(); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials - * for the production slot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginListPublishingCredentialsSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginListPublishingCredentialsSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials - * for the production slot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginListPublishingCredentialsSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginListPublishingCredentialsSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials - * for the production slot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginListPublishingCredentialsSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot) { - return beginListPublishingCredentialsSlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials - * for the production slot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginListPublishingCredentialsSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, Context context) { - return beginListPublishingCredentialsSlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials - * for the production slot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UserInner beginListPublishingCredentialsSlotWithoutPolling( - String resourceGroupName, String name, String slot) { - return beginListPublishingCredentialsSlotWithoutPollingAsync(resourceGroupName, name, slot).block(); - } - - /** - * Description for Gets the Git/FTP publishing credentials of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials - * for the production slot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user credentials used for publishing activity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UserInner beginListPublishingCredentialsSlotWithoutPolling( - String resourceGroupName, String name, String slot, Context context) { - return beginListPublishingCredentialsSlotWithoutPollingAsync(resourceGroupName, name, slot, context).block(); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateMSDeployOperationSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (mSDeploy == null) { - return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); - } else { - mSDeploy.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateMSDeployOperationSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - mSDeploy, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateMSDeployOperationSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (mSDeploy == null) { - return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); - } else { - mSDeploy.validate(); - } - return service - .beginCreateMSDeployOperationSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - mSDeploy, - context); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateMSDeployOperationSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { - return beginCreateMSDeployOperationSlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, mSDeploy) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateMSDeployOperationSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { - return beginCreateMSDeployOperationSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, mSDeploy, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner beginCreateMSDeployOperationSlotWithoutPolling( - String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { - return beginCreateMSDeployOperationSlotWithoutPollingAsync(resourceGroupName, name, slot, mSDeploy).block(); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner beginCreateMSDeployOperationSlotWithoutPolling( - String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { - return beginCreateMSDeployOperationSlotWithoutPollingAsync(resourceGroupName, name, slot, mSDeploy, context) - .block(); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param slot Name of the deployment slot. - * @param functionEnvelope Function information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateInstanceFunctionSlotWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String functionName, - String slot, - FunctionEnvelopeInner functionEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (functionName == null) { - return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (functionEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null.")); - } else { - functionEnvelope.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateInstanceFunctionSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - functionName, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - functionEnvelope, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param slot Name of the deployment slot. - * @param functionEnvelope Function information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateInstanceFunctionSlotWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String functionName, - String slot, - FunctionEnvelopeInner functionEnvelope, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (functionName == null) { - return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (functionEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null.")); - } else { - functionEnvelope.validate(); - } - return service - .beginCreateInstanceFunctionSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - functionName, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - functionEnvelope, - context); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param slot Name of the deployment slot. - * @param functionEnvelope Function information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateInstanceFunctionSlotWithoutPollingAsync( - String resourceGroupName, - String name, - String functionName, - String slot, - FunctionEnvelopeInner functionEnvelope) { - return beginCreateInstanceFunctionSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, functionName, slot, functionEnvelope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param slot Name of the deployment slot. - * @param functionEnvelope Function information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateInstanceFunctionSlotWithoutPollingAsync( - String resourceGroupName, - String name, - String functionName, - String slot, - FunctionEnvelopeInner functionEnvelope, - Context context) { - return beginCreateInstanceFunctionSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, functionName, slot, functionEnvelope, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param slot Name of the deployment slot. - * @param functionEnvelope Function information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FunctionEnvelopeInner beginCreateInstanceFunctionSlotWithoutPolling( - String resourceGroupName, - String name, - String functionName, - String slot, - FunctionEnvelopeInner functionEnvelope) { - return beginCreateInstanceFunctionSlotWithoutPollingAsync( - resourceGroupName, name, functionName, slot, functionEnvelope) - .block(); - } - - /** - * Description for Create function for web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param functionName Function name. - * @param slot Name of the deployment slot. - * @param functionEnvelope Function information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return function information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FunctionEnvelopeInner beginCreateInstanceFunctionSlotWithoutPolling( - String resourceGroupName, - String name, - String functionName, - String slot, - FunctionEnvelopeInner functionEnvelope, - Context context) { - return beginCreateInstanceFunctionSlotWithoutPollingAsync( - resourceGroupName, name, functionName, slot, functionEnvelope, context) - .block(); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateInstanceMSDeployOperationSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (mSDeploy == null) { - return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); - } else { - mSDeploy.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateInstanceMSDeployOperationSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - instanceId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - mSDeploy, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateInstanceMSDeployOperationSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (mSDeploy == null) { - return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); - } else { - mSDeploy.validate(); - } - return service - .beginCreateInstanceMSDeployOperationSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - instanceId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - mSDeploy, - context); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateInstanceMSDeployOperationSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { - return beginCreateInstanceMSDeployOperationSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, instanceId, mSDeploy) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateInstanceMSDeployOperationSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { - return beginCreateInstanceMSDeployOperationSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, instanceId, mSDeploy, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner beginCreateInstanceMSDeployOperationSlotWithoutPolling( - String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { - return beginCreateInstanceMSDeployOperationSlotWithoutPollingAsync( - resourceGroupName, name, slot, instanceId, mSDeploy) - .block(); - } - - /** - * Description for Invoke the MSDeploy web app extension. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId ID of web app instance. - * @param mSDeploy MSDeploy ARM PUT information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mSDeploy ARM response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MSDeployStatusInner beginCreateInstanceMSDeployOperationSlotWithoutPolling( - String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { - return beginCreateInstanceMSDeployOperationSlotWithoutPollingAsync( - resourceGroupName, name, slot, instanceId, mSDeploy, context) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWebSiteNetworkTraceOperationSlotWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginStartWebSiteNetworkTraceOperationSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - durationInSeconds, - slot, - maxFrameLength, - sasUrl, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWebSiteNetworkTraceOperationSlotWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginStartWebSiteNetworkTraceOperationSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - durationInSeconds, - slot, - maxFrameLength, - sasUrl, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWebSiteNetworkTraceOperationSlotWithoutPollingAsync( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl) { - return beginStartWebSiteNetworkTraceOperationSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWebSiteNetworkTraceOperationSlotWithoutPollingAsync( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - return beginStartWebSiteNetworkTraceOperationSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWebSiteNetworkTraceOperationSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot) { - final Integer durationInSeconds = null; - final Integer maxFrameLength = null; - final String sasUrl = null; - final Context context = null; - return beginStartWebSiteNetworkTraceOperationSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartWebSiteNetworkTraceOperationSlotWithoutPolling( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl) { - return beginStartWebSiteNetworkTraceOperationSlotWithoutPollingAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartWebSiteNetworkTraceOperationSlotWithoutPolling( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - return beginStartWebSiteNetworkTraceOperationSlotWithoutPollingAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartWebSiteNetworkTraceOperationSlotWithoutPolling( - String resourceGroupName, String name, String slot) { - final Integer durationInSeconds = null; - final Integer maxFrameLength = null; - final String sasUrl = null; - final Context context = null; - return beginStartWebSiteNetworkTraceOperationSlotWithoutPollingAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) - .block(); - } - - /** - * Description for Approves or rejects a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - beginApproveOrRejectPrivateEndpointConnectionWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String privateEndpointConnectionName, - PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointWrapper == null) { - return Mono - .error( - new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); - } else { - privateEndpointWrapper.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginApproveOrRejectPrivateEndpointConnectionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - privateEndpointWrapper, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Approves or rejects a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - beginApproveOrRejectPrivateEndpointConnectionWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String privateEndpointConnectionName, - PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointWrapper == null) { - return Mono - .error( - new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); - } else { - privateEndpointWrapper.validate(); - } - return service - .beginApproveOrRejectPrivateEndpointConnectionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - privateEndpointWrapper, - context); - } - - /** - * Description for Approves or rejects a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono - beginApproveOrRejectPrivateEndpointConnectionWithoutPollingAsync( - String resourceGroupName, - String name, - String privateEndpointConnectionName, - PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { - return beginApproveOrRejectPrivateEndpointConnectionWithoutPollingWithResponseAsync( - resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Approves or rejects a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono - beginApproveOrRejectPrivateEndpointConnectionWithoutPollingAsync( - String resourceGroupName, - String name, - String privateEndpointConnectionName, - PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, - Context context) { - return beginApproveOrRejectPrivateEndpointConnectionWithoutPollingWithResponseAsync( - resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Approves or rejects a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionResourceInner beginApproveOrRejectPrivateEndpointConnectionWithoutPolling( - String resourceGroupName, - String name, - String privateEndpointConnectionName, - PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { - return beginApproveOrRejectPrivateEndpointConnectionWithoutPollingAsync( - resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) - .block(); - } - - /** - * Description for Approves or rejects a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionResourceInner beginApproveOrRejectPrivateEndpointConnectionWithoutPolling( - String resourceGroupName, - String name, - String privateEndpointConnectionName, - PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, - Context context) { - return beginApproveOrRejectPrivateEndpointConnectionWithoutPollingAsync( - resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) - .block(); - } - - /** - * Description for Deletes a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeletePrivateEndpointConnectionWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginDeletePrivateEndpointConnectionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Deletes a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeletePrivateEndpointConnectionWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginDeletePrivateEndpointConnectionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Deletes a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeletePrivateEndpointConnectionWithoutPollingAsync( - String resourceGroupName, String name, String privateEndpointConnectionName) { - return beginDeletePrivateEndpointConnectionWithoutPollingWithResponseAsync( - resourceGroupName, name, privateEndpointConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Deletes a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeletePrivateEndpointConnectionWithoutPollingAsync( - String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { - return beginDeletePrivateEndpointConnectionWithoutPollingWithResponseAsync( - resourceGroupName, name, privateEndpointConnectionName, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Deletes a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginDeletePrivateEndpointConnectionWithoutPolling( - String resourceGroupName, String name, String privateEndpointConnectionName) { - return beginDeletePrivateEndpointConnectionWithoutPollingAsync( - resourceGroupName, name, privateEndpointConnectionName) - .block(); - } - - /** - * Description for Deletes a private endpoint connection. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the site. - * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginDeletePrivateEndpointConnectionWithoutPolling( - String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { - return beginDeletePrivateEndpointConnectionWithoutPollingAsync( - resourceGroupName, name, privateEndpointConnectionName, context) - .block(); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreFromBackupBlobSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, RestoreRequestInner request) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginRestoreFromBackupBlobSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - request, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreFromBackupBlobSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - return service - .beginRestoreFromBackupBlobSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - request, - context); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreFromBackupBlobSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, RestoreRequestInner request) { - return beginRestoreFromBackupBlobSlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, request) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreFromBackupBlobSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { - return beginRestoreFromBackupBlobSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, request, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreFromBackupBlobSlotWithoutPolling( - String resourceGroupName, String name, String slot, RestoreRequestInner request) { - beginRestoreFromBackupBlobSlotWithoutPollingAsync(resourceGroupName, name, slot, request).block(); - } - - /** - * Description for Restores an app from a backup blob in Azure Storage. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the - * production slot. - * @param request Description of a restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreFromBackupBlobSlotWithoutPolling( - String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { - beginRestoreFromBackupBlobSlotWithoutPollingAsync(resourceGroupName, name, slot, request, context).block(); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about restoring a deleted app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreFromDeletedAppSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginRestoreFromDeletedAppSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about restoring a deleted app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreFromDeletedAppSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return service - .beginRestoreFromDeletedAppSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about restoring a deleted app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreFromDeletedAppSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { - return beginRestoreFromDeletedAppSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, restoreRequest) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about restoring a deleted app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreFromDeletedAppSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { - return beginRestoreFromDeletedAppSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, restoreRequest, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about restoring a deleted app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreFromDeletedAppSlotWithoutPolling( - String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { - beginRestoreFromDeletedAppSlotWithoutPollingAsync(resourceGroupName, name, slot, restoreRequest).block(); - } - - /** - * Description for Restores a deleted web app to this web app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about restoring a deleted app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreFromDeletedAppSlotWithoutPolling( - String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { - beginRestoreFromDeletedAppSlotWithoutPollingAsync(resourceGroupName, name, slot, restoreRequest, context) - .block(); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about app recovery operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreSnapshotSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginRestoreSnapshotSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about app recovery operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestoreSnapshotSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (restoreRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); - } else { - restoreRequest.validate(); - } - return service - .beginRestoreSnapshotSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - restoreRequest, - context); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about app recovery operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreSnapshotSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { - return beginRestoreSnapshotSlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, restoreRequest) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about app recovery operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestoreSnapshotSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { - return beginRestoreSnapshotSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, restoreRequest, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about app recovery operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreSnapshotSlotWithoutPolling( - String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { - beginRestoreSnapshotSlotWithoutPollingAsync(resourceGroupName, name, slot, restoreRequest).block(); - } - - /** - * Description for Restores a web app from a snapshot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of web app. - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param restoreRequest Details about app recovery operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestoreSnapshotSlotWithoutPolling( - String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { - beginRestoreSnapshotSlotWithoutPollingAsync(resourceGroupName, name, slot, restoreRequest, context).block(); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginInstallSiteExtensionSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String siteExtensionId, String slot) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (siteExtensionId == null) { - return Mono - .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginInstallSiteExtensionSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - siteExtensionId, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginInstallSiteExtensionSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (siteExtensionId == null) { - return Mono - .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginInstallSiteExtensionSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - siteExtensionId, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginInstallSiteExtensionSlotWithoutPollingAsync( - String resourceGroupName, String name, String siteExtensionId, String slot) { - return beginInstallSiteExtensionSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, siteExtensionId, slot) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginInstallSiteExtensionSlotWithoutPollingAsync( - String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { - return beginInstallSiteExtensionSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, siteExtensionId, slot, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteExtensionInfoInner beginInstallSiteExtensionSlotWithoutPolling( - String resourceGroupName, String name, String siteExtensionId, String slot) { - return beginInstallSiteExtensionSlotWithoutPollingAsync(resourceGroupName, name, siteExtensionId, slot).block(); - } - - /** - * Description for Install site extension on a web site, or a deployment slot. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Site name. - * @param siteExtensionId Site extension name. - * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return site Extension Information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteExtensionInfoInner beginInstallSiteExtensionSlotWithoutPolling( - String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { - return beginInstallSiteExtensionSlotWithoutPollingAsync(resourceGroupName, name, siteExtensionId, slot, context) - .block(); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param copySlotEntity Copy deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCopySlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (copySlotEntity == null) { - return Mono.error(new IllegalArgumentException("Parameter copySlotEntity is required and cannot be null.")); - } else { - copySlotEntity.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCopySlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - copySlotEntity, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param copySlotEntity Copy deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCopySlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (copySlotEntity == null) { - return Mono.error(new IllegalArgumentException("Parameter copySlotEntity is required and cannot be null.")); - } else { - copySlotEntity.validate(); - } - return service - .beginCopySlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - copySlotEntity, - context); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param copySlotEntity Copy deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCopySlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity) { - return beginCopySlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, copySlotEntity) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param copySlotEntity Copy deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCopySlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity, Context context) { - return beginCopySlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, copySlotEntity, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param copySlotEntity Copy deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginCopySlotWithoutPolling( - String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity) { - beginCopySlotWithoutPollingAsync(resourceGroupName, name, slot, copySlotEntity).block(); - } - - /** - * Description for Copies a deployment slot to another deployment slot of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param copySlotEntity Copy deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginCopySlotWithoutPolling( - String resourceGroupName, String name, String slot, CsmCopySlotEntityInner copySlotEntity, Context context) { - beginCopySlotWithoutPollingAsync(resourceGroupName, name, slot, copySlotEntity, context).block(); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param slotSwapEntity Deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginSwapSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (slotSwapEntity == null) { - return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); - } else { - slotSwapEntity.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginSwapSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - slotSwapEntity, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param slotSwapEntity Deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginSwapSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (slotSwapEntity == null) { - return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); - } else { - slotSwapEntity.validate(); - } - return service - .beginSwapSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - slotSwapEntity, - context); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param slotSwapEntity Deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginSwapSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { - return beginSwapSlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param slotSwapEntity Deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginSwapSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { - return beginSwapSlotWithoutPollingWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param slotSwapEntity Deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginSwapSlotWithoutPolling( - String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { - beginSwapSlotWithoutPollingAsync(resourceGroupName, name, slot, slotSwapEntity).block(); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. - * @param slotSwapEntity Deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginSwapSlotWithoutPolling( - String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { - beginSwapSlotWithoutPollingAsync(resourceGroupName, name, slot, slotSwapEntity, context).block(); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control - * configuration for the production slot. - * @param siteSourceControl Source control configuration for an app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateSourceControlSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (siteSourceControl == null) { - return Mono - .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); - } else { - siteSourceControl.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateSourceControlSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - siteSourceControl, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control - * configuration for the production slot. - * @param siteSourceControl Source control configuration for an app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateSourceControlSlotWithoutPollingWithResponseAsync( - String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (siteSourceControl == null) { - return Mono - .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); - } else { - siteSourceControl.validate(); - } - return service - .beginCreateOrUpdateSourceControlSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - slot, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - siteSourceControl, - context); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control - * configuration for the production slot. - * @param siteSourceControl Source control configuration for an app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateSourceControlSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { - return beginCreateOrUpdateSourceControlSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, siteSourceControl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control - * configuration for the production slot. - * @param siteSourceControl Source control configuration for an app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateSourceControlSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { - return beginCreateOrUpdateSourceControlSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, siteSourceControl, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control - * configuration for the production slot. - * @param siteSourceControl Source control configuration for an app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteSourceControlInner beginCreateOrUpdateSourceControlSlotWithoutPolling( - String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { - return beginCreateOrUpdateSourceControlSlotWithoutPollingAsync(resourceGroupName, name, slot, siteSourceControl) - .block(); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control - * configuration for the production slot. - * @param siteSourceControl Source control configuration for an app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteSourceControlInner beginCreateOrUpdateSourceControlSlotWithoutPolling( - String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { - return beginCreateOrUpdateSourceControlSlotWithoutPollingAsync( - resourceGroupName, name, slot, siteSourceControl, context) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartNetworkTraceSlotWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginStartNetworkTraceSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - durationInSeconds, - slot, - maxFrameLength, - sasUrl, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartNetworkTraceSlotWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (slot == null) { - return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginStartNetworkTraceSlotWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - durationInSeconds, - slot, - maxFrameLength, - sasUrl, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartNetworkTraceSlotWithoutPollingAsync( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl) { - return beginStartNetworkTraceSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartNetworkTraceSlotWithoutPollingAsync( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - return beginStartNetworkTraceSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartNetworkTraceSlotWithoutPollingAsync( - String resourceGroupName, String name, String slot) { - final Integer durationInSeconds = null; - final Integer maxFrameLength = null; - final String sasUrl = null; - final Context context = null; - return beginStartNetworkTraceSlotWithoutPollingWithResponseAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartNetworkTraceSlotWithoutPolling( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl) { - return beginStartNetworkTraceSlotWithoutPollingAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartNetworkTraceSlotWithoutPolling( - String resourceGroupName, - String name, - String slot, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - return beginStartNetworkTraceSlotWithoutPollingAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param slot The name of the slot for this web app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartNetworkTraceSlotWithoutPolling(String resourceGroupName, String name, String slot) { - final Integer durationInSeconds = null; - final Integer maxFrameLength = null; - final String sasUrl = null; - final Context context = null; - return beginStartNetworkTraceSlotWithoutPollingAsync( - resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) - .block(); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slotSwapEntity Deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginSwapSlotWithProductionWithoutPollingWithResponseAsync( - String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (slotSwapEntity == null) { - return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); - } else { - slotSwapEntity.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginSwapSlotWithProductionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - slotSwapEntity, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slotSwapEntity Deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginSwapSlotWithProductionWithoutPollingWithResponseAsync( - String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (slotSwapEntity == null) { - return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); - } else { - slotSwapEntity.validate(); - } - return service - .beginSwapSlotWithProductionWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - slotSwapEntity, - context); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slotSwapEntity Deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginSwapSlotWithProductionWithoutPollingAsync( - String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { - return beginSwapSlotWithProductionWithoutPollingWithResponseAsync(resourceGroupName, name, slotSwapEntity) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slotSwapEntity Deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginSwapSlotWithProductionWithoutPollingAsync( - String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { - return beginSwapSlotWithProductionWithoutPollingWithResponseAsync( - resourceGroupName, name, slotSwapEntity, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slotSwapEntity Deployment slot parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginSwapSlotWithProductionWithoutPolling( - String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { - beginSwapSlotWithProductionWithoutPollingAsync(resourceGroupName, name, slotSwapEntity).block(); - } - - /** - * Description for Swaps two deployment slots of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param slotSwapEntity Deployment slot parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginSwapSlotWithProductionWithoutPolling( - String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { - beginSwapSlotWithProductionWithoutPollingAsync(resourceGroupName, name, slotSwapEntity, context).block(); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param siteSourceControl Source control configuration for an app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateSourceControlWithoutPollingWithResponseAsync( - String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (siteSourceControl == null) { - return Mono - .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); - } else { - siteSourceControl.validate(); - } - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateSourceControlWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - siteSourceControl, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param siteSourceControl Source control configuration for an app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateSourceControlWithoutPollingWithResponseAsync( - String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (siteSourceControl == null) { - return Mono - .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); - } else { - siteSourceControl.validate(); - } - return service - .beginCreateOrUpdateSourceControlWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - siteSourceControl, - context); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param siteSourceControl Source control configuration for an app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateSourceControlWithoutPollingAsync( - String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { - return beginCreateOrUpdateSourceControlWithoutPollingWithResponseAsync( - resourceGroupName, name, siteSourceControl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param siteSourceControl Source control configuration for an app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateSourceControlWithoutPollingAsync( - String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { - return beginCreateOrUpdateSourceControlWithoutPollingWithResponseAsync( - resourceGroupName, name, siteSourceControl, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param siteSourceControl Source control configuration for an app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteSourceControlInner beginCreateOrUpdateSourceControlWithoutPolling( - String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { - return beginCreateOrUpdateSourceControlWithoutPollingAsync(resourceGroupName, name, siteSourceControl).block(); - } - - /** - * Description for Updates the source control configuration of an app. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name Name of the app. - * @param siteSourceControl Source control configuration for an app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return source control configuration for an app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SiteSourceControlInner beginCreateOrUpdateSourceControlWithoutPolling( - String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { - return beginCreateOrUpdateSourceControlWithoutPollingAsync(resourceGroupName, name, siteSourceControl, context) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartNetworkTraceWithoutPollingWithResponseAsync( - String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .beginStartNetworkTraceWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - durationInSeconds, - maxFrameLength, - sasUrl, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartNetworkTraceWithoutPollingWithResponseAsync( - String resourceGroupName, - String name, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return service - .beginStartNetworkTraceWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - name, - durationInSeconds, - maxFrameLength, - sasUrl, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartNetworkTraceWithoutPollingAsync( - String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - return beginStartNetworkTraceWithoutPollingWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartNetworkTraceWithoutPollingAsync( - String resourceGroupName, - String name, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - return beginStartNetworkTraceWithoutPollingWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartNetworkTraceWithoutPollingAsync(String resourceGroupName, String name) { - final Integer durationInSeconds = null; - final Integer maxFrameLength = null; - final String sasUrl = null; - final Context context = null; - return beginStartNetworkTraceWithoutPollingWithResponseAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartNetworkTraceWithoutPolling( - String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { - return beginStartNetworkTraceWithoutPollingAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @param durationInSeconds The duration to keep capturing in seconds. - * @param maxFrameLength The maximum frame length in bytes (Optional). - * @param sasUrl The Blob URL to store capture file. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartNetworkTraceWithoutPolling( - String resourceGroupName, - String name, - Integer durationInSeconds, - Integer maxFrameLength, - String sasUrl, - Context context) { - return beginStartNetworkTraceWithoutPollingAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) - .block(); - } - - /** - * Description for Start capturing network packets for the site. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param name The name of the web app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of NetworkTrace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object beginStartNetworkTraceWithoutPolling(String resourceGroupName, String name) { - final Integer durationInSeconds = null; - final Integer maxFrameLength = null; - final String sasUrl = null; - final Context context = null; - return beginStartNetworkTraceWithoutPollingAsync( - resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) - .block(); - } - /** * Get the next page of items. * @@ -88438,6 +82486,7 @@ public Mono> listNextSinglePageAsync(String nextLink, C if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -88494,6 +82543,7 @@ public Mono> listByResourceGroupNextSinglePageAsync(Str if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -88550,6 +82600,7 @@ public Mono> listBackupsNextSinglePageAsync(Strin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBackupsNext(nextLink, context) .map( @@ -88607,6 +82658,7 @@ public Mono> listConfigurationsNextSingle if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConfigurationsNext(nextLink, context) .map( @@ -88665,6 +82717,7 @@ public Mono> listConfiguration if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConfigurationSnapshotInfoNext(nextLink, context) .map( @@ -88722,6 +82775,7 @@ public Mono> listContinuousWebJobsNextSingl if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listContinuousWebJobsNext(nextLink, context) .map( @@ -88778,6 +82832,7 @@ public Mono> listDeploymentsNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDeploymentsNext(nextLink, context) .map( @@ -88835,6 +82890,7 @@ public Mono> listDomainOwnershipIdentifiersNextSi if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDomainOwnershipIdentifiersNext(nextLink, context) .map( @@ -88892,6 +82948,7 @@ public Mono> listFunctionsNextSinglePageAsy if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listFunctionsNext(nextLink, context) .map( @@ -88949,6 +83006,7 @@ public Mono> listHostnameBindingsNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHostnameBindingsNext(nextLink, context) .map( @@ -89006,6 +83064,7 @@ public Mono> listInstanceIdentifiersNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceIdentifiersNext(nextLink, context) .map( @@ -89063,6 +83122,7 @@ public Mono> listInstanceProcessesNextSinglePage if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessesNext(nextLink, context) .map( @@ -89120,6 +83180,7 @@ public Mono> listInstanceProcessModulesNex if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessModulesNext(nextLink, context) .map( @@ -89177,6 +83238,7 @@ public Mono> listInstanceProcessThreadsNex if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessThreadsNext(nextLink, context) .map( @@ -89233,6 +83295,7 @@ public Mono> listSiteBackupsNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteBackupsNext(nextLink, context) .map( @@ -89290,6 +83353,7 @@ public Mono> listPerfMonCountersNextSinglePa if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPerfMonCountersNext(nextLink, context) .map( @@ -89346,6 +83410,7 @@ public Mono> listProcessesNextSinglePageAsync(St if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessesNext(nextLink, context) .map( @@ -89403,6 +83468,7 @@ public Mono> listProcessModulesNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessModulesNext(nextLink, context) .map( @@ -89460,6 +83526,7 @@ public Mono> listProcessThreadsNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessThreadsNext(nextLink, context) .map( @@ -89517,6 +83584,7 @@ public Mono> listPublicCertificatesNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPublicCertificatesNext(nextLink, context) .map( @@ -89574,6 +83642,7 @@ public Mono> listSiteExtensionsNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteExtensionsNext(nextLink, context) .map( @@ -89630,6 +83699,7 @@ public Mono> listSlotsNextSinglePageAsync(String nextLi if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSlotsNext(nextLink, context) .map( @@ -89686,6 +83756,7 @@ public Mono> listBackupsSlotNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBackupsSlotNext(nextLink, context) .map( @@ -89743,6 +83814,7 @@ public Mono> listConfigurationsSlotNextSi if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConfigurationsSlotNext(nextLink, context) .map( @@ -89801,6 +83873,7 @@ public Mono> listConfiguration if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listConfigurationSnapshotInfoSlotNext(nextLink, context) .map( @@ -89858,6 +83931,7 @@ public Mono> listContinuousWebJobsSlotNextS if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listContinuousWebJobsSlotNext(nextLink, context) .map( @@ -89915,6 +83989,7 @@ public Mono> listDeploymentsSlotNextSinglePageAsy if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDeploymentsSlotNext(nextLink, context) .map( @@ -89972,6 +84047,7 @@ public Mono> listDomainOwnershipIdentifiersSlotNe if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listDomainOwnershipIdentifiersSlotNext(nextLink, context) .map( @@ -90029,6 +84105,7 @@ public Mono> listInstanceFunctionsSlotNextS if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceFunctionsSlotNext(nextLink, context) .map( @@ -90086,6 +84163,7 @@ public Mono> listHostnameBindingsSlotNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listHostnameBindingsSlotNext(nextLink, context) .map( @@ -90143,6 +84221,7 @@ public Mono> listInstanceIdentifiersSlotNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceIdentifiersSlotNext(nextLink, context) .map( @@ -90200,6 +84279,7 @@ public Mono> listInstanceProcessesSlotNextSingle if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessesSlotNext(nextLink, context) .map( @@ -90258,6 +84338,7 @@ public Mono> listInstanceProcessModulesSlo if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessModulesSlotNext(nextLink, context) .map( @@ -90316,6 +84397,7 @@ public Mono> listInstanceProcessThreadsSlo if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listInstanceProcessThreadsSlotNext(nextLink, context) .map( @@ -90373,6 +84455,7 @@ public Mono> listSiteBackupsSlotNextSinglePageAsy if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteBackupsSlotNext(nextLink, context) .map( @@ -90430,6 +84513,7 @@ public Mono> listPerfMonCountersSlotNextSing if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPerfMonCountersSlotNext(nextLink, context) .map( @@ -90487,6 +84571,7 @@ public Mono> listProcessesSlotNextSinglePageAsyn if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessesSlotNext(nextLink, context) .map( @@ -90544,6 +84629,7 @@ public Mono> listProcessModulesSlotNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessModulesSlotNext(nextLink, context) .map( @@ -90601,6 +84687,7 @@ public Mono> listProcessThreadsSlotNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listProcessThreadsSlotNext(nextLink, context) .map( @@ -90658,6 +84745,7 @@ public Mono> listPublicCertificatesSlotNex if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listPublicCertificatesSlotNext(nextLink, context) .map( @@ -90715,6 +84803,7 @@ public Mono> listSiteExtensionsSlotNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSiteExtensionsSlotNext(nextLink, context) .map( @@ -90772,6 +84861,7 @@ public Mono> listSlotDifferencesSlotNextSingl if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSlotDifferencesSlotNext(nextLink, context) .map( @@ -90828,6 +84918,7 @@ public Mono> listSnapshotsSlotNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSnapshotsSlotNext(nextLink, context) .map( @@ -90885,6 +84976,7 @@ public Mono> listSnapshotsFromDRSecondarySlotNextSi if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSnapshotsFromDRSecondarySlotNext(nextLink, context) .map( @@ -90942,6 +85034,7 @@ public Mono> listTriggeredWebJobsSlotNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listTriggeredWebJobsSlotNext(nextLink, context) .map( @@ -91000,6 +85093,7 @@ public Mono> listTriggeredWebJobHistoryS if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listTriggeredWebJobHistorySlotNext(nextLink, context) .map( @@ -91056,6 +85150,7 @@ public Mono> listUsagesSlotNextSinglePageAsync if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listUsagesSlotNext(nextLink, context) .map( @@ -91112,6 +85207,7 @@ public Mono> listWebJobsSlotNextSinglePageAsync(Strin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebJobsSlotNext(nextLink, context) .map( @@ -91170,6 +85266,7 @@ public Mono> listSlotDifferencesFromProductio if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSlotDifferencesFromProductionNext(nextLink, context) .map( @@ -91226,6 +85323,7 @@ public Mono> listSnapshotsNextSinglePageAsync(Strin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSnapshotsNext(nextLink, context) .map( @@ -91283,6 +85381,7 @@ public Mono> listSnapshotsFromDRSecondaryNextSingle if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSnapshotsFromDRSecondaryNext(nextLink, context) .map( @@ -91340,6 +85439,7 @@ public Mono> listTriggeredWebJobsNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listTriggeredWebJobsNext(nextLink, context) .map( @@ -91398,6 +85498,7 @@ public Mono> listTriggeredWebJobHistoryN if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listTriggeredWebJobHistoryNext(nextLink, context) .map( @@ -91454,6 +85555,7 @@ public Mono> listUsagesNextSinglePageAsync(Str if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listUsagesNext(nextLink, context) .map( @@ -91510,6 +85612,7 @@ public Mono> listWebJobsNextSinglePageAsync(String ne if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listWebJobsNext(nextLink, context) .map( diff --git a/sdk/appservice/mgmt/src/test/java/com/azure/resourcemanager/appservice/AppServicePlansTests.java b/sdk/appservice/mgmt/src/test/java/com/azure/resourcemanager/appservice/AppServicePlansTests.java index d73cefc4383f..aca05ae1cc6f 100644 --- a/sdk/appservice/mgmt/src/test/java/com/azure/resourcemanager/appservice/AppServicePlansTests.java +++ b/sdk/appservice/mgmt/src/test/java/com/azure/resourcemanager/appservice/AppServicePlansTests.java @@ -5,6 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.appservice.models.AppServicePlan; import com.azure.resourcemanager.appservice.models.OperatingSystem; import com.azure.resourcemanager.appservice.models.PricingTier; @@ -77,4 +78,14 @@ public void canCRUDAppServicePlan() throws Exception { Assertions.assertEquals(true, appServicePlan.perSiteScaling()); Assertions.assertEquals(3, appServicePlan.capacity()); } + + @Test + public void failOnAppServiceNotFound() { + resourceManager.resourceGroups().define(rgName) + .withRegion(Region.US_WEST) + .create(); + Assertions.assertThrows(ManagementException.class, () -> { + appServiceManager.appServicePlans().getByResourceGroup("rgName", "no_such_appservice"); + }); + } } diff --git a/sdk/appservice/mgmt/src/test/resources/session-records/failOnAppServiceNotFound.json b/sdk/appservice/mgmt/src/test/resources/session-records/failOnAppServiceNotFound.json new file mode 100644 index 000000000000..377809fe19cc --- /dev/null +++ b/sdk/appservice/mgmt/src/test/resources/session-records/failOnAppServiceNotFound.json @@ -0,0 +1,144 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg9e1968872?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Thu, 16 Jul 2020 05:53:38 GMT", + "content-length" : "320", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1afb0c61-450f-46fe-bf1c-f0c4f4c4e3f2", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T055339Z:1afb0c61-450f-46fe-bf1c-f0c4f4c4e3f2", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "1afb0c61-450f-46fe-bf1c-f0c4f4c4e3f2", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg9e1968872\",\"name\":\"javacsmrg9e1968872\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2020-07-16T05:53:34.488136Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Web/serverfarms/no_such_appservice?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.appservice/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Thu, 16 Jul 2020 05:53:38 GMT", + "content-length" : "98", + "expires" : "-1", + "retry-after" : "0", + "StatusCode" : "404", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "55a35191-f08e-4d6f-83b9-9c2afb6fa08d", + "x-content-type-options" : "nosniff", + "x-ms-failure-cause" : "gateway", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T055339Z:55a35191-f08e-4d6f-83b9-9c2afb6fa08d", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "55a35191-f08e-4d6f-83b9-9c2afb6fa08d", + "Body" : "{\"error\":{\"code\":\"ResourceGroupNotFound\",\"message\":\"Resource group 'rgName' could not be found.\"}}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/javacsmrg9e1968872?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Thu, 16 Jul 2020 05:53:42 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b5d1f855-77e0-447d-aa83-4d26ac03d5ff", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T055343Z:b5d1f855-77e0-447d-aa83-4d26ac03d5ff", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5RTE5Njg4NzItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "b5d1f855-77e0-447d-aa83-4d26ac03d5ff", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5RTE5Njg4NzItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Thu, 16 Jul 2020 05:53:59 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "684a1888-efc4-4bba-8877-a8dc40478c49", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T055359Z:684a1888-efc4-4bba-8877-a8dc40478c49", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5RTE5Njg4NzItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "684a1888-efc4-4bba-8877-a8dc40478c49", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5RTE5Njg4NzItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Thu, 16 Jul 2020 05:54:15 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "50a2c01b-8752-4122-b58d-ad2ea8b7e05c", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T055415Z:50a2c01b-8752-4122-b58d-ad2ea8b7e05c", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5RTE5Njg4NzItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "50a2c01b-8752-4122-b58d-ad2ea8b7e05c", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1KQVZBQ1NNUkc5RTE5Njg4NzItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)" + }, + "Response" : { + "date" : "Thu, 16 Jul 2020 05:54:31 GMT", + "content-length" : "0", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9cdc23db-86ad-47ce-b716-cc3115493d5c", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T055431Z:9cdc23db-86ad-47ce-b716-cc3115493d5c", + "cache-control" : "no-cache", + "x-ms-request-id" : "9cdc23db-86ad-47ce-b716-cc3115493d5c", + "Body" : "" + } + } ], + "variables" : [ "java-asp-f1b813712", "javacsmrg9e1968872" ] +} \ No newline at end of file diff --git a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryApplicationsImpl.java b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryApplicationsImpl.java index caa579548312..65bbac0e1e59 100644 --- a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryApplicationsImpl.java +++ b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryApplicationsImpl.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.authorization.AuthorizationManager; import com.azure.resourcemanager.authorization.models.ActiveDirectoryApplication; import com.azure.resourcemanager.authorization.models.ActiveDirectoryApplications; -import com.azure.resourcemanager.authorization.models.GraphErrorException; import com.azure.resourcemanager.authorization.fluent.inner.ApplicationInner; import com.azure.resourcemanager.authorization.fluent.ApplicationsClient; import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.CreatableResourcesImpl; @@ -72,7 +71,6 @@ public ActiveDirectoryApplicationImpl getById(String id) { public Mono getByIdAsync(String id) { return innerCollection .getAsync(id) - .onErrorResume(GraphErrorException.class, e -> Mono.empty()) .flatMap( applicationInner -> new ActiveDirectoryApplicationImpl(applicationInner, manager()).refreshCredentialsAsync()); @@ -93,10 +91,13 @@ public Mono getByNameAsync(String name) { Mono .defer( () -> { - UUID.fromString(trimmed); - return inner().listAsync(String.format("appId eq '%s'", trimmed)).singleOrEmpty(); + try { + UUID.fromString(trimmed); + return inner().listAsync(String.format("appId eq '%s'", trimmed)).singleOrEmpty(); + } catch (IllegalArgumentException e) { + return Mono.empty(); + } })) - .onErrorResume(IllegalArgumentException.class, e -> Mono.empty()) .map(applicationInner -> new ActiveDirectoryApplicationImpl(applicationInner, manager())) .flatMap(activeDirectoryApplication -> activeDirectoryApplication.refreshCredentialsAsync()); } diff --git a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryGroupsImpl.java b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryGroupsImpl.java index 846b318c7168..47e3a2178904 100644 --- a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryGroupsImpl.java +++ b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryGroupsImpl.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.authorization.AuthorizationManager; import com.azure.resourcemanager.authorization.models.ActiveDirectoryGroup; import com.azure.resourcemanager.authorization.models.ActiveDirectoryGroups; -import com.azure.resourcemanager.authorization.models.GraphErrorException; import com.azure.resourcemanager.authorization.fluent.inner.ADGroupInner; import com.azure.resourcemanager.authorization.fluent.GroupsClient; import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.CreatableWrappersImpl; @@ -48,7 +47,6 @@ public Mono getByIdAsync(String id) { .inner() .getGroups() .getAsync(id) - .onErrorResume(GraphErrorException.class, e -> Mono.empty()) .map(groupInner -> new ActiveDirectoryGroupImpl(groupInner, manager())); } diff --git a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryUsersImpl.java b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryUsersImpl.java index a917e23f06be..ea77ec3226c6 100644 --- a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryUsersImpl.java +++ b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ActiveDirectoryUsersImpl.java @@ -49,7 +49,6 @@ public Mono getByIdAsync(String id) { .inner() .getUsers() .getAsync(id) - .onErrorResume(GraphErrorException.class, e -> Mono.empty()) .map(userInner -> new ActiveDirectoryUserImpl(userInner, manager())); } diff --git a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentHelper.java b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentHelper.java index 5658bad032fc..d1890d45ac4b 100644 --- a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentHelper.java +++ b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentHelper.java @@ -96,7 +96,6 @@ public RoleAssignmentHelper withAccessTo(final String scope, final BuiltInRole a .createAsync() .last() .onErrorResume( - (Function>) throwable -> { if (isRoleAssignmentExists(throwable)) { return cxt.voidMono(); @@ -150,7 +149,6 @@ public RoleAssignmentHelper withAccessTo(final String scope, final String roleDe .createAsync() .last() .onErrorResume( - (Function>) throwable -> { if (isRoleAssignmentExists(throwable)) { return cxt.voidMono(); diff --git a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentsImpl.java b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentsImpl.java index d7c6ac9e4e47..185f2128a8be 100644 --- a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentsImpl.java +++ b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentsImpl.java @@ -5,7 +5,6 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.authorization.AuthorizationManager; import com.azure.resourcemanager.authorization.models.RoleAssignment; import com.azure.resourcemanager.authorization.models.RoleAssignments; @@ -41,7 +40,6 @@ public RoleAssignmentImpl getById(String objectId) { public Mono getByIdAsync(String id) { return inner() .getByIdAsync(id) - .onErrorResume(ManagementException.class, e -> Mono.empty()) .map( roleAssignmentInner -> new RoleAssignmentImpl(roleAssignmentInner.name(), roleAssignmentInner, manager())); @@ -66,7 +64,6 @@ public PagedIterable listByScope(String scope) { public Mono getByScopeAsync(String scope, String name) { return inner() .getAsync(scope, name) - .onErrorResume(ManagementException.class, e -> Mono.empty()) .map( roleAssignmentInner -> new RoleAssignmentImpl(roleAssignmentInner.name(), roleAssignmentInner, manager())); @@ -81,7 +78,6 @@ protected RoleAssignmentImpl wrapModel(String name) { public Mono deleteByIdAsync(String id) { return inner() .deleteByIdAsync(id) - .onErrorResume(ManagementException.class, e -> Mono.empty()) .map( roleAssignmentInner -> new RoleAssignmentImpl(roleAssignmentInner.name(), roleAssignmentInner, manager())); diff --git a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleDefinitionsImpl.java b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleDefinitionsImpl.java index 03a5d6eb7e5c..36cdcc223dd7 100644 --- a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleDefinitionsImpl.java +++ b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleDefinitionsImpl.java @@ -5,7 +5,6 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.authorization.AuthorizationManager; import com.azure.resourcemanager.authorization.models.RoleDefinition; import com.azure.resourcemanager.authorization.models.RoleDefinitions; @@ -41,7 +40,6 @@ public RoleDefinition getById(String objectId) { public Mono getByIdAsync(String id) { return inner() .getByIdAsync(id) - .onErrorResume(ManagementException.class, e -> Mono.empty()) .map(roleDefinitionInner -> new RoleDefinitionImpl(roleDefinitionInner, manager())); } @@ -54,7 +52,6 @@ public RoleDefinition getByScope(String scope, String name) { public Mono getByScopeAsync(String scope, String name) { return inner() .getAsync(scope, name) - .onErrorResume(ManagementException.class, e -> Mono.empty()) .map(roleDefinitionInner -> new RoleDefinitionImpl(roleDefinitionInner, manager())); } @@ -79,7 +76,6 @@ public PagedIterable listByScope(String scope) { public Mono getByScopeAndRoleNameAsync(String scope, String roleName) { return inner() .listAsync(scope, String.format("roleName eq '%s'", roleName)) - .onErrorResume(ManagementException.class, e -> Mono.empty()) .singleOrEmpty() .map(roleDefinitionInner -> new RoleDefinitionImpl(roleDefinitionInner, manager())); } diff --git a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsImpl.java b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsImpl.java index 6b4bb1873004..eca51340fc1b 100644 --- a/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsImpl.java +++ b/sdk/authorization/mgmt/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsImpl.java @@ -6,7 +6,6 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.authorization.AuthorizationManager; -import com.azure.resourcemanager.authorization.models.GraphErrorException; import com.azure.resourcemanager.authorization.models.ServicePrincipal; import com.azure.resourcemanager.authorization.models.ServicePrincipals; import com.azure.resourcemanager.authorization.fluent.inner.ServicePrincipalInner; @@ -69,7 +68,6 @@ public ServicePrincipalImpl getById(String id) { public Mono getByIdAsync(String id) { return innerCollection .getAsync(id) - .onErrorResume(GraphErrorException.class, e -> Mono.empty()) .flatMap( servicePrincipalInner -> new ServicePrincipalImpl(servicePrincipalInner, manager()).refreshCredentialsAsync()); diff --git a/sdk/batch/microsoft-azure-batch/README.md b/sdk/batch/microsoft-azure-batch/README.md index 8d7555d644ab..c2d545630a7e 100644 --- a/sdk/batch/microsoft-azure-batch/README.md +++ b/sdk/batch/microsoft-azure-batch/README.md @@ -9,7 +9,7 @@ The Azure Batch Libraries for Java is a higher-level, object-oriented API for in **Azure Batch Authentication** -You need to create a Batch account through the [Azure portal](https://portal.azure.com) or Azure cli. +You need to create a Batch account through the [Azure portal](https://portal.azure.com) or Azure cli. * Use the account name, key, and URL to create a `BatchSharedKeyCredentials` instance for authentication with the Azure Batch service. The `BatchClient` class is the simplest entry point for creating and interacting with Azure Batch objects. @@ -71,7 +71,7 @@ You can find sample code that illustrates Batch usage scenarios in https://githu - A Java Developer Kit (JDK), v 1.7 or later - Maven -- Azure Service Principal - see [how to create authentication info](./AUTH.md). +- Azure Service Principal - see [how to create authentication info](https://docs.microsoft.com/en-us/azure/batch/batch-aad-auth#use-a-service-principal). ## Help diff --git a/sdk/boms/azure-sdk-template-bom/CHANGELOG.md b/sdk/boms/azure-sdk-template-bom/CHANGELOG.md index cfac04f0b52e..31b97f304c54 100644 --- a/sdk/boms/azure-sdk-template-bom/CHANGELOG.md +++ b/sdk/boms/azure-sdk-template-bom/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.5 (2020-07-15) +- Release test 5 ## 1.0.0-beta.4 (2020-06-30) diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClient.java index c2c288d7c6fe..129b08aa1103 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/ComputeManagementClient.java @@ -8,7 +8,6 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import com.azure.resourcemanager.compute.fluent.AvailabilitySetsClient; import com.azure.resourcemanager.compute.fluent.ContainerServicesClient; import com.azure.resourcemanager.compute.fluent.DedicatedHostGroupsClient; @@ -39,6 +38,7 @@ import com.azure.resourcemanager.compute.fluent.VirtualMachineScaleSetsClient; import com.azure.resourcemanager.compute.fluent.VirtualMachineSizesClient; import com.azure.resourcemanager.compute.fluent.VirtualMachinesClient; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; /** Initializes a new instance of the ComputeManagementClient type. */ @ServiceClient(builder = ComputeManagementClientBuilder.class) diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java index 97020ea8fd54..19c7bf0fc60c 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java @@ -294,6 +294,7 @@ public Mono> createOrUpdateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -521,6 +522,7 @@ public Mono> updateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -704,6 +706,7 @@ public Mono> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -859,6 +862,7 @@ public Mono> getByResourceGroupWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1015,6 +1019,7 @@ public Mono> listSinglePageAsync(String expa "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), expand, context) .map( @@ -1197,6 +1202,7 @@ public Mono> listByResourceGroupSinglePageAs "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), context) @@ -1361,6 +1367,7 @@ public Mono> listAvailableSizesSinglePage "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listAvailableSizes( this.client.getEndpoint(), @@ -1490,6 +1497,7 @@ public Mono> listBySubscriptionNextSinglePag if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBySubscriptionNext(nextLink, context) .map( @@ -1546,6 +1554,7 @@ public Mono> listNextSinglePageAsync(String if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java index 3c6731cc1039..623a5a520c33 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java @@ -138,35 +138,6 @@ Mono> listByResourceGroup( @PathParam("subscriptionId") String subscriptionId, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService" - + "/containerServices/{containerServiceName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerServiceName") String containerServiceName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ContainerServiceInner parameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService" - + "/containerServices/{containerServiceName}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerServiceName") String containerServiceName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -246,6 +217,7 @@ public Mono> listSinglePageAsync(Context co "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2017-01-31"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), context) .map( @@ -411,6 +383,7 @@ public Mono>> createOrUpdateWithResponseAsync( parameters.validate(); } final String apiVersion = "2017-01-31"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -518,7 +491,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, containerServiceName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -538,7 +511,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, containerServiceName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -663,6 +636,7 @@ public Mono> getByResourceGroupWithResponseAsync "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2017-01-31"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -850,6 +824,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2017-01-31"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -956,7 +931,7 @@ public SyncPoller, Void> beginDelete( public Mono deleteAsync(String resourceGroupName, String containerServiceName) { return beginDeleteAsync(resourceGroupName, containerServiceName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -977,7 +952,7 @@ public Mono deleteAsync(String resourceGroupName, String containerServiceN public Mono deleteAsync(String resourceGroupName, String containerServiceName, Context context) { return beginDeleteAsync(resourceGroupName, containerServiceName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1099,6 +1074,7 @@ public Mono> listByResourceGroupSinglePageA "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2017-01-31"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), context) @@ -1183,375 +1159,6 @@ public PagedIterable listByResourceGroup(String resourceG return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } - /** - * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param parameters Container service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (containerServiceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerServiceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2017-01-31"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - containerServiceName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param parameters Container service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (containerServiceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerServiceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2017-01-31"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - containerServiceName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param parameters Container service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, containerServiceName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param parameters Container service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, containerServiceName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param parameters Container service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerServiceInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, containerServiceName, parameters).block(); - } - - /** - * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param parameters Container service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerServiceInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, containerServiceName, parameters, context) - .block(); - } - - /** - * Deletes the specified container service in the specified subscription and resource group. The operation does not - * delete other resources created as part of creating a container service, including storage accounts, VMs, and - * availability sets. All the other resources created with the container service are part of the same resource group - * and can be deleted individually. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String containerServiceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (containerServiceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerServiceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2017-01-31"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - containerServiceName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deletes the specified container service in the specified subscription and resource group. The operation does not - * delete other resources created as part of creating a container service, including storage accounts, VMs, and - * availability sets. All the other resources created with the container service are part of the same resource group - * and can be deleted individually. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String containerServiceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (containerServiceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerServiceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2017-01-31"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - containerServiceName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Deletes the specified container service in the specified subscription and resource group. The operation does not - * delete other resources created as part of creating a container service, including storage accounts, VMs, and - * availability sets. All the other resources created with the container service are part of the same resource group - * and can be deleted individually. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String containerServiceName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, containerServiceName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes the specified container service in the specified subscription and resource group. The operation does not - * delete other resources created as part of creating a container service, including storage accounts, VMs, and - * availability sets. All the other resources created with the container service are part of the same resource group - * and can be deleted individually. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String containerServiceName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, containerServiceName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes the specified container service in the specified subscription and resource group. The operation does not - * delete other resources created as part of creating a container service, including storage accounts, VMs, and - * availability sets. All the other resources created with the container service are part of the same resource group - * and can be deleted individually. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String containerServiceName) { - beginDeleteWithoutPollingAsync(resourceGroupName, containerServiceName).block(); - } - - /** - * Deletes the specified container service in the specified subscription and resource group. The operation does not - * delete other resources created as part of creating a container service, including storage accounts, VMs, and - * availability sets. All the other resources created with the container service are part of the same resource group - * and can be deleted individually. - * - * @param resourceGroupName The name of the resource group. - * @param containerServiceName The name of the container service in the specified subscription and resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String containerServiceName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, containerServiceName, context).block(); - } - /** * Get the next page of items. * @@ -1595,6 +1202,7 @@ public Mono> listNextSinglePageAsync(String if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -1652,6 +1260,7 @@ public Mono> listByResourceGroupNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java index 724b71cb4cec..3a3f6019aefb 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java @@ -264,6 +264,7 @@ public Mono> createOrUpdateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -469,6 +470,7 @@ public Mono> updateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -650,6 +652,7 @@ public Mono> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -802,6 +805,7 @@ public Mono> getByResourceGroupWithResponseAsy "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -973,6 +977,7 @@ public Mono> listByResourceGroupSinglePag "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), context) @@ -1117,6 +1122,7 @@ public Mono> listSinglePageAsync(Context "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), context) .map( @@ -1232,6 +1238,7 @@ public Mono> listByResourceGroupNextSingl if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -1289,6 +1296,7 @@ public Mono> listBySubscriptionNextSingle if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBySubscriptionNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java index 11b802e7e403..9635c340da21 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java @@ -146,53 +146,6 @@ Mono> listByHostGroup( @PathParam("subscriptionId") String subscriptionId, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups" - + "/{hostGroupName}/hosts/{hostName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostGroupName") String hostGroupName, - @PathParam("hostName") String hostname, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") DedicatedHostInner parameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups" - + "/{hostGroupName}/hosts/{hostName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostGroupName") String hostGroupName, - @PathParam("hostName") String hostname, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") DedicatedHostUpdate parameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups" - + "/{hostGroupName}/hosts/{hostName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostGroupName") String hostGroupName, - @PathParam("hostName") String hostname, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -308,6 +261,7 @@ public Mono>> createOrUpdateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -430,7 +384,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String hostGroupName, String hostname, DedicatedHostInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, hostGroupName, hostname, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -455,7 +409,7 @@ public Mono createOrUpdateAsync( Context context) { return beginCreateOrUpdateAsync(resourceGroupName, hostGroupName, hostname, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -608,6 +562,7 @@ public Mono>> updateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -734,7 +689,7 @@ public Mono updateAsync( String resourceGroupName, String hostGroupName, String hostname, DedicatedHostUpdate parameters) { return beginUpdateAsync(resourceGroupName, hostGroupName, hostname, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -760,7 +715,7 @@ public Mono updateAsync( Context context) { return beginUpdateAsync(resourceGroupName, hostGroupName, hostname, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -896,6 +851,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -995,7 +951,7 @@ public SyncPoller, Void> beginDelete( public Mono deleteAsync(String resourceGroupName, String hostGroupName, String hostname) { return beginDeleteAsync(resourceGroupName, hostGroupName, hostname) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1014,7 +970,7 @@ public Mono deleteAsync(String resourceGroupName, String hostGroupName, St public Mono deleteAsync(String resourceGroupName, String hostGroupName, String hostname, Context context) { return beginDeleteAsync(resourceGroupName, hostGroupName, hostname, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1141,6 +1097,7 @@ public Mono> getWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -1379,6 +1336,7 @@ public Mono> listByHostGroupSinglePageAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByHostGroup( this.client.getEndpoint(), @@ -1470,619 +1428,6 @@ public PagedIterable listByHostGroup( return new PagedIterable<>(listByHostGroupAsync(resourceGroupName, hostGroupName, context)); } - /** - * Create or update a dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the Dedicated host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String hostGroupName, String hostname, DedicatedHostInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (hostGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter hostGroupName is required and cannot be null.")); - } - if (hostname == null) { - return Mono.error(new IllegalArgumentException("Parameter hostname is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - hostGroupName, - hostname, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Create or update a dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the Dedicated host. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String hostGroupName, - String hostname, - DedicatedHostInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (hostGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter hostGroupName is required and cannot be null.")); - } - if (hostname == null) { - return Mono.error(new IllegalArgumentException("Parameter hostname is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - hostGroupName, - hostname, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Create or update a dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the Dedicated host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String hostGroupName, String hostname, DedicatedHostInner parameters) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, hostGroupName, hostname, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the Dedicated host. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String hostGroupName, - String hostname, - DedicatedHostInner parameters, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, hostGroupName, hostname, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the Dedicated host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DedicatedHostInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String hostGroupName, String hostname, DedicatedHostInner parameters) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, hostGroupName, hostname, parameters).block(); - } - - /** - * Create or update a dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the Dedicated host. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DedicatedHostInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String hostGroupName, - String hostname, - DedicatedHostInner parameters, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, hostGroupName, hostname, parameters, context) - .block(); - } - - /** - * Update an dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType - * may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String hostGroupName, String hostname, DedicatedHostUpdate parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (hostGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter hostGroupName is required and cannot be null.")); - } - if (hostname == null) { - return Mono.error(new IllegalArgumentException("Parameter hostname is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - hostGroupName, - hostname, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Update an dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType - * may be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String hostGroupName, - String hostname, - DedicatedHostUpdate parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (hostGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter hostGroupName is required and cannot be null.")); - } - if (hostname == null) { - return Mono.error(new IllegalArgumentException("Parameter hostname is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - hostGroupName, - hostname, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Update an dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType - * may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String hostGroupName, String hostname, DedicatedHostUpdate parameters) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, hostGroupName, hostname, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update an dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType - * may be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String hostGroupName, - String hostname, - DedicatedHostUpdate parameters, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, hostGroupName, hostname, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update an dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType - * may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DedicatedHostInner beginUpdateWithoutPolling( - String resourceGroupName, String hostGroupName, String hostname, DedicatedHostUpdate parameters) { - return beginUpdateWithoutPollingAsync(resourceGroupName, hostGroupName, hostname, parameters).block(); - } - - /** - * Update an dedicated host . - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host . - * @param parameters Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType - * may be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Dedicated host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DedicatedHostInner beginUpdateWithoutPolling( - String resourceGroupName, - String hostGroupName, - String hostname, - DedicatedHostUpdate parameters, - Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, hostGroupName, hostname, parameters, context).block(); - } - - /** - * Delete a dedicated host. - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String hostGroupName, String hostname) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (hostGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter hostGroupName is required and cannot be null.")); - } - if (hostname == null) { - return Mono.error(new IllegalArgumentException("Parameter hostname is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - hostGroupName, - hostname, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Delete a dedicated host. - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String hostGroupName, String hostname, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (hostGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter hostGroupName is required and cannot be null.")); - } - if (hostname == null) { - return Mono.error(new IllegalArgumentException("Parameter hostname is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - hostGroupName, - hostname, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Delete a dedicated host. - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String hostGroupName, String hostname) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, hostGroupName, hostname) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a dedicated host. - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String hostGroupName, String hostname, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, hostGroupName, hostname, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a dedicated host. - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String hostGroupName, String hostname) { - beginDeleteWithoutPollingAsync(resourceGroupName, hostGroupName, hostname).block(); - } - - /** - * Delete a dedicated host. - * - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param hostname The name of the dedicated host. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String hostGroupName, String hostname, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, hostGroupName, hostname, context).block(); - } - /** * Get the next page of items. * @@ -2127,6 +1472,7 @@ public Mono> listByHostGroupNextSinglePageAsyn if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByHostGroupNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java index ce206fd2d93a..24e8473f7c32 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java @@ -155,50 +155,6 @@ Mono> list( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/diskEncryptionSets/{diskEncryptionSetName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("diskEncryptionSetName") String diskEncryptionSetName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DiskEncryptionSetInner diskEncryptionSet, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/diskEncryptionSets/{diskEncryptionSetName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("diskEncryptionSetName") String diskEncryptionSetName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DiskEncryptionSetUpdate diskEncryptionSet, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/diskEncryptionSets/{diskEncryptionSetName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("diskEncryptionSetName") String diskEncryptionSetName, - @QueryParam("api-version") String apiVersion, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -319,6 +275,7 @@ public Mono>> createOrUpdateWithResponseAsync( diskEncryptionSet.validate(); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -443,7 +400,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String diskEncryptionSetName, DiskEncryptionSetInner diskEncryptionSet) { return beginCreateOrUpdateAsync(resourceGroupName, diskEncryptionSetName, diskEncryptionSet) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -468,7 +425,7 @@ public Mono createOrUpdateAsync( Context context) { return beginCreateOrUpdateAsync(resourceGroupName, diskEncryptionSetName, diskEncryptionSet, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -618,6 +575,7 @@ public Mono>> updateWithResponseAsync( diskEncryptionSet.validate(); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -741,7 +699,7 @@ public Mono updateAsync( String resourceGroupName, String diskEncryptionSetName, DiskEncryptionSetUpdate diskEncryptionSet) { return beginUpdateAsync(resourceGroupName, diskEncryptionSetName, diskEncryptionSet) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -766,7 +724,7 @@ public Mono updateAsync( Context context) { return beginUpdateAsync(resourceGroupName, diskEncryptionSetName, diskEncryptionSet, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -898,6 +856,7 @@ public Mono> getByResourceGroupWithResponseAsyn .error(new IllegalArgumentException("Parameter diskEncryptionSetName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1084,6 +1043,7 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter diskEncryptionSetName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1185,7 +1145,7 @@ public SyncPoller, Void> beginDelete( public Mono deleteAsync(String resourceGroupName, String diskEncryptionSetName) { return beginDeleteAsync(resourceGroupName, diskEncryptionSetName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1205,7 +1165,7 @@ public Mono deleteAsync(String resourceGroupName, String diskEncryptionSet public Mono deleteAsync(String resourceGroupName, String diskEncryptionSetName, Context context) { return beginDeleteAsync(resourceGroupName, diskEncryptionSetName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1321,6 +1281,7 @@ public Mono> listByResourceGroupSinglePage .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, apiVersion, context) @@ -1459,6 +1420,7 @@ public Mono> listSinglePageAsync(Context c "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, context) .map( @@ -1524,613 +1486,6 @@ public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } - /** - * Creates or updates a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String diskEncryptionSetName, DiskEncryptionSetInner diskEncryptionSet) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskEncryptionSetName == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSetName is required and cannot be null.")); - } - if (diskEncryptionSet == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSet is required and cannot be null.")); - } else { - diskEncryptionSet.validate(); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskEncryptionSetName, - apiVersion, - diskEncryptionSet, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Creates or updates a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String diskEncryptionSetName, - DiskEncryptionSetInner diskEncryptionSet, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskEncryptionSetName == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSetName is required and cannot be null.")); - } - if (diskEncryptionSet == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSet is required and cannot be null.")); - } else { - diskEncryptionSet.validate(); - } - final String apiVersion = "2019-11-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskEncryptionSetName, - apiVersion, - diskEncryptionSet, - context); - } - - /** - * Creates or updates a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String diskEncryptionSetName, DiskEncryptionSetInner diskEncryptionSet) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, diskEncryptionSetName, diskEncryptionSet) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String diskEncryptionSetName, - DiskEncryptionSetInner diskEncryptionSet, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, diskEncryptionSetName, diskEncryptionSet, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiskEncryptionSetInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String diskEncryptionSetName, DiskEncryptionSetInner diskEncryptionSet) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, diskEncryptionSetName, diskEncryptionSet) - .block(); - } - - /** - * Creates or updates a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiskEncryptionSetInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String diskEncryptionSetName, - DiskEncryptionSetInner diskEncryptionSet, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, diskEncryptionSetName, diskEncryptionSet, context) - .block(); - } - - /** - * Updates (patches) a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String diskEncryptionSetName, DiskEncryptionSetUpdate diskEncryptionSet) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskEncryptionSetName == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSetName is required and cannot be null.")); - } - if (diskEncryptionSet == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSet is required and cannot be null.")); - } else { - diskEncryptionSet.validate(); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskEncryptionSetName, - apiVersion, - diskEncryptionSet, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Updates (patches) a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String diskEncryptionSetName, - DiskEncryptionSetUpdate diskEncryptionSet, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskEncryptionSetName == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSetName is required and cannot be null.")); - } - if (diskEncryptionSet == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSet is required and cannot be null.")); - } else { - diskEncryptionSet.validate(); - } - final String apiVersion = "2019-11-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskEncryptionSetName, - apiVersion, - diskEncryptionSet, - context); - } - - /** - * Updates (patches) a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String diskEncryptionSetName, DiskEncryptionSetUpdate diskEncryptionSet) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, diskEncryptionSetName, diskEncryptionSet) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates (patches) a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String diskEncryptionSetName, - DiskEncryptionSetUpdate diskEncryptionSet, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, diskEncryptionSetName, diskEncryptionSet, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates (patches) a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiskEncryptionSetInner beginUpdateWithoutPolling( - String resourceGroupName, String diskEncryptionSetName, DiskEncryptionSetUpdate diskEncryptionSet) { - return beginUpdateWithoutPollingAsync(resourceGroupName, diskEncryptionSetName, diskEncryptionSet).block(); - } - - /** - * Updates (patches) a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk encryption set resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiskEncryptionSetInner beginUpdateWithoutPolling( - String resourceGroupName, - String diskEncryptionSetName, - DiskEncryptionSetUpdate diskEncryptionSet, - Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, diskEncryptionSetName, diskEncryptionSet, context) - .block(); - } - - /** - * Deletes a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String diskEncryptionSetName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskEncryptionSetName == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSetName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskEncryptionSetName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deletes a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String diskEncryptionSetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskEncryptionSetName == null) { - return Mono - .error(new IllegalArgumentException("Parameter diskEncryptionSetName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskEncryptionSetName, - apiVersion, - context); - } - - /** - * Deletes a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String diskEncryptionSetName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, diskEncryptionSetName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String diskEncryptionSetName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, diskEncryptionSetName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String diskEncryptionSetName) { - beginDeleteWithoutPollingAsync(resourceGroupName, diskEncryptionSetName).block(); - } - - /** - * Deletes a disk encryption set. - * - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name can't be changed - * after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String diskEncryptionSetName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, diskEncryptionSetName, context).block(); - } - /** * Get the next page of items. * @@ -2175,6 +1530,7 @@ public Mono> listByResourceGroupNextSingle if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -2231,6 +1587,7 @@ public Mono> listNextSinglePageAsync(Strin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java index fa403cb03caf..1795861ee990 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java @@ -182,79 +182,6 @@ Mono>> revokeAccess( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks" - + "/{diskName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("diskName") String diskName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DiskInner disk, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks" - + "/{diskName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("diskName") String diskName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DiskUpdate disk, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks" - + "/{diskName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("diskName") String diskName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks" - + "/{diskName}/beginGetAccess") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginGrantAccessWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("diskName") String diskName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GrantAccessData grantAccessData, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks" - + "/{diskName}/endGetAccess") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRevokeAccessWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("diskName") String diskName, - @QueryParam("api-version") String apiVersion, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -366,6 +293,7 @@ public Mono>> createOrUpdateWithResponseAsync( disk.validate(); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -476,7 +404,7 @@ public SyncPoller, DiskInner> beginCreateOrUpdate( public Mono createOrUpdateAsync(String resourceGroupName, String diskName, DiskInner disk) { return beginCreateOrUpdateAsync(resourceGroupName, diskName, disk) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -497,7 +425,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String diskName, DiskInner disk, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, diskName, disk, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -631,6 +559,7 @@ public Mono>> updateWithResponseAsync( disk.validate(); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -738,7 +667,9 @@ public SyncPoller, DiskInner> beginUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync(String resourceGroupName, String diskName, DiskUpdate disk) { - return beginUpdateAsync(resourceGroupName, diskName, disk).last().flatMap(client::getLroFinalResultOrError); + return beginUpdateAsync(resourceGroupName, diskName, disk) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -758,7 +689,7 @@ public Mono updateAsync(String resourceGroupName, String diskName, Di public Mono updateAsync(String resourceGroupName, String diskName, DiskUpdate disk, Context context) { return beginUpdateAsync(resourceGroupName, diskName, disk, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -878,6 +809,7 @@ public Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1052,6 +984,7 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1144,7 +1077,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String diskName) { - return beginDeleteAsync(resourceGroupName, diskName).last().flatMap(client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, diskName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -1161,7 +1094,9 @@ public Mono deleteAsync(String resourceGroupName, String diskName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String diskName, Context context) { - return beginDeleteAsync(resourceGroupName, diskName, context).last().flatMap(client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, diskName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1275,6 +1210,7 @@ public Mono> listByResourceGroupSinglePageAsync( .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, apiVersion, context) @@ -1413,6 +1349,7 @@ public Mono> listSinglePageAsync(Context context) { "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, context) .map( @@ -1576,6 +1513,7 @@ public Mono>> grantAccessWithResponseAsync( grantAccessData.validate(); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .grantAccess( this.client.getEndpoint(), @@ -1688,7 +1626,7 @@ public Mono grantAccessAsync( String resourceGroupName, String diskName, GrantAccessData grantAccessData) { return beginGrantAccessAsync(resourceGroupName, diskName, grantAccessData) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1709,7 +1647,7 @@ public Mono grantAccessAsync( String resourceGroupName, String diskName, GrantAccessData grantAccessData, Context context) { return beginGrantAccessAsync(resourceGroupName, diskName, grantAccessData, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1830,6 +1768,7 @@ public Mono>> revokeAccessWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .revokeAccess( this.client.getEndpoint(), @@ -1923,7 +1862,9 @@ public SyncPoller, Void> beginRevokeAccess( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono revokeAccessAsync(String resourceGroupName, String diskName) { - return beginRevokeAccessAsync(resourceGroupName, diskName).last().flatMap(client::getLroFinalResultOrError); + return beginRevokeAccessAsync(resourceGroupName, diskName) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1942,7 +1883,7 @@ public Mono revokeAccessAsync(String resourceGroupName, String diskName) { public Mono revokeAccessAsync(String resourceGroupName, String diskName, Context context) { return beginRevokeAccessAsync(resourceGroupName, diskName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1976,913 +1917,6 @@ public void revokeAccess(String resourceGroupName, String diskName, Context cont revokeAccessAsync(resourceGroupName, diskName, context).block(); } - /** - * Creates or updates a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName, DiskInner disk) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - if (disk == null) { - return Mono.error(new IllegalArgumentException("Parameter disk is required and cannot be null.")); - } else { - disk.validate(); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - disk, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Creates or updates a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName, DiskInner disk, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - if (disk == null) { - return Mono.error(new IllegalArgumentException("Parameter disk is required and cannot be null.")); - } else { - disk.validate(); - } - final String apiVersion = "2019-11-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - disk, - context); - } - - /** - * Creates or updates a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String diskName, DiskInner disk) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, diskName, disk) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String diskName, DiskInner disk, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, diskName, disk, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiskInner beginCreateOrUpdateWithoutPolling(String resourceGroupName, String diskName, DiskInner disk) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, diskName, disk).block(); - } - - /** - * Creates or updates a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiskInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String diskName, DiskInner disk, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, diskName, disk, context).block(); - } - - /** - * Updates (patches) a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName, DiskUpdate disk) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - if (disk == null) { - return Mono.error(new IllegalArgumentException("Parameter disk is required and cannot be null.")); - } else { - disk.validate(); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - disk, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Updates (patches) a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName, DiskUpdate disk, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - if (disk == null) { - return Mono.error(new IllegalArgumentException("Parameter disk is required and cannot be null.")); - } else { - disk.validate(); - } - final String apiVersion = "2019-11-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - disk, - context); - } - - /** - * Updates (patches) a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync(String resourceGroupName, String diskName, DiskUpdate disk) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, diskName, disk) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates (patches) a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String diskName, DiskUpdate disk, Context context) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, diskName, disk, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates (patches) a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiskInner beginUpdateWithoutPolling(String resourceGroupName, String diskName, DiskUpdate disk) { - return beginUpdateWithoutPollingAsync(resourceGroupName, diskName, disk).block(); - } - - /** - * Updates (patches) a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param disk Disk update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiskInner beginUpdateWithoutPolling( - String resourceGroupName, String diskName, DiskUpdate disk, Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, diskName, disk, context).block(); - } - - /** - * Deletes a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync(String resourceGroupName, String diskName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deletes a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - context); - } - - /** - * Deletes a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String diskName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, diskName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String diskName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, diskName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String diskName) { - beginDeleteWithoutPollingAsync(resourceGroupName, diskName).block(); - } - - /** - * Deletes a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String diskName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, diskName, context).block(); - } - - /** - * Grants access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginGrantAccessWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName, GrantAccessData grantAccessData) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - if (grantAccessData == null) { - return Mono - .error(new IllegalArgumentException("Parameter grantAccessData is required and cannot be null.")); - } else { - grantAccessData.validate(); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginGrantAccessWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - grantAccessData, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Grants access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginGrantAccessWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName, GrantAccessData grantAccessData, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - if (grantAccessData == null) { - return Mono - .error(new IllegalArgumentException("Parameter grantAccessData is required and cannot be null.")); - } else { - grantAccessData.validate(); - } - final String apiVersion = "2019-11-01"; - return service - .beginGrantAccessWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - grantAccessData, - context); - } - - /** - * Grants access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginGrantAccessWithoutPollingAsync( - String resourceGroupName, String diskName, GrantAccessData grantAccessData) { - return beginGrantAccessWithoutPollingWithResponseAsync(resourceGroupName, diskName, grantAccessData) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Grants access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginGrantAccessWithoutPollingAsync( - String resourceGroupName, String diskName, GrantAccessData grantAccessData, Context context) { - return beginGrantAccessWithoutPollingWithResponseAsync(resourceGroupName, diskName, grantAccessData, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Grants access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessUriInner beginGrantAccessWithoutPolling( - String resourceGroupName, String diskName, GrantAccessData grantAccessData) { - return beginGrantAccessWithoutPollingAsync(resourceGroupName, diskName, grantAccessData).block(); - } - - /** - * Grants access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessUriInner beginGrantAccessWithoutPolling( - String resourceGroupName, String diskName, GrantAccessData grantAccessData, Context context) { - return beginGrantAccessWithoutPollingAsync(resourceGroupName, diskName, grantAccessData, context).block(); - } - - /** - * Revokes access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRevokeAccessWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginRevokeAccessWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Revokes access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRevokeAccessWithoutPollingWithResponseAsync( - String resourceGroupName, String diskName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (diskName == null) { - return Mono.error(new IllegalArgumentException("Parameter diskName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return service - .beginRevokeAccessWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - diskName, - apiVersion, - context); - } - - /** - * Revokes access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRevokeAccessWithoutPollingAsync(String resourceGroupName, String diskName) { - return beginRevokeAccessWithoutPollingWithResponseAsync(resourceGroupName, diskName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Revokes access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRevokeAccessWithoutPollingAsync(String resourceGroupName, String diskName, Context context) { - return beginRevokeAccessWithoutPollingWithResponseAsync(resourceGroupName, diskName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Revokes access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRevokeAccessWithoutPolling(String resourceGroupName, String diskName) { - beginRevokeAccessWithoutPollingAsync(resourceGroupName, diskName).block(); - } - - /** - * Revokes access to a disk. - * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is - * created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRevokeAccessWithoutPolling(String resourceGroupName, String diskName, Context context) { - beginRevokeAccessWithoutPollingAsync(resourceGroupName, diskName, context).block(); - } - /** * Get the next page of items. * @@ -2926,6 +1960,7 @@ public Mono> listByResourceGroupNextSinglePageAsync(Str if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -2982,6 +2017,7 @@ public Mono> listNextSinglePageAsync(String nextLink, C if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java index 98839c6f9ff3..52d07399997a 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java @@ -151,50 +151,6 @@ Mono> list( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryInner gallery, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryUpdate gallery, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @QueryParam("api-version") String apiVersion, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -306,6 +262,7 @@ public Mono>> createOrUpdateWithResponseAsync( gallery.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -417,7 +374,7 @@ public SyncPoller, GalleryInner> beginCreateOrUpdate( public Mono createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { return beginCreateOrUpdateAsync(resourceGroupName, galleryName, gallery) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -438,7 +395,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String galleryName, GalleryInner gallery, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, galleryName, gallery, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -573,6 +530,7 @@ public Mono>> updateWithResponseAsync( gallery.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -683,7 +641,7 @@ public SyncPoller, GalleryInner> beginUpdate( public Mono updateAsync(String resourceGroupName, String galleryName, GalleryUpdate gallery) { return beginUpdateAsync(resourceGroupName, galleryName, gallery) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -704,7 +662,7 @@ public Mono updateAsync( String resourceGroupName, String galleryName, GalleryUpdate gallery, Context context) { return beginUpdateAsync(resourceGroupName, galleryName, gallery, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -823,6 +781,7 @@ public Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -991,6 +950,7 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1079,7 +1039,7 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String galleryName) { - return beginDeleteAsync(resourceGroupName, galleryName).last().flatMap(client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, galleryName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -1097,7 +1057,7 @@ public Mono deleteAsync(String resourceGroupName, String galleryName) { public Mono deleteAsync(String resourceGroupName, String galleryName, Context context) { return beginDeleteAsync(resourceGroupName, galleryName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1209,6 +1169,7 @@ public Mono> listByResourceGroupSinglePageAsync( .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, apiVersion, context) @@ -1347,6 +1308,7 @@ public Mono> listSinglePageAsync(Context context) { "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, context) .map( @@ -1412,552 +1374,6 @@ public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } - /** - * Create or update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, GalleryInner gallery) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (gallery == null) { - return Mono.error(new IllegalArgumentException("Parameter gallery is required and cannot be null.")); - } else { - gallery.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - apiVersion, - gallery, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Create or update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, GalleryInner gallery, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (gallery == null) { - return Mono.error(new IllegalArgumentException("Parameter gallery is required and cannot be null.")); - } else { - gallery.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - apiVersion, - gallery, - context); - } - - /** - * Create or update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String galleryName, GalleryInner gallery) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, galleryName, gallery) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String galleryName, GalleryInner gallery, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, galleryName, gallery, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String galleryName, GalleryInner gallery) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, galleryName, gallery).block(); - } - - /** - * Create or update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String galleryName, GalleryInner gallery, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, galleryName, gallery, context).block(); - } - - /** - * Update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, GalleryUpdate gallery) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (gallery == null) { - return Mono.error(new IllegalArgumentException("Parameter gallery is required and cannot be null.")); - } else { - gallery.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - apiVersion, - gallery, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, GalleryUpdate gallery, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (gallery == null) { - return Mono.error(new IllegalArgumentException("Parameter gallery is required and cannot be null.")); - } else { - gallery.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - apiVersion, - gallery, - context); - } - - /** - * Update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String galleryName, GalleryUpdate gallery) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, galleryName, gallery) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String galleryName, GalleryUpdate gallery, Context context) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, galleryName, gallery, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryInner beginUpdateWithoutPolling(String resourceGroupName, String galleryName, GalleryUpdate gallery) { - return beginUpdateWithoutPollingAsync(resourceGroupName, galleryName, gallery).block(); - } - - /** - * Update a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - * dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Specifies information about the Shared Image Gallery that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the Shared Image Gallery that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryInner beginUpdateWithoutPolling( - String resourceGroupName, String galleryName, GalleryUpdate gallery, Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, galleryName, gallery, context).block(); - } - - /** - * Delete a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Delete a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - apiVersion, - context); - } - - /** - * Delete a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String galleryName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, galleryName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String galleryName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, galleryName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String galleryName) { - beginDeleteWithoutPollingAsync(resourceGroupName, galleryName).block(); - } - - /** - * Delete a Shared Image Gallery. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String galleryName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, galleryName, context).block(); - } - /** * Get the next page of items. * @@ -2001,6 +1417,7 @@ public Mono> listByResourceGroupNextSinglePageAsync( if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -2057,6 +1474,7 @@ public Mono> listNextSinglePageAsync(String nextLink if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java index 8c338b4d06b2..5db021c4f73c 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java @@ -153,56 +153,6 @@ Mono> listByGalleryApplication( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryApplicationName") String galleryApplicationName, - @PathParam("galleryApplicationVersionName") String galleryApplicationVersionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryApplicationVersionInner galleryApplicationVersion, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryApplicationName") String galleryApplicationName, - @PathParam("galleryApplicationVersionName") String galleryApplicationVersionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryApplicationVersionUpdate galleryApplicationVersion, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryApplicationName") String galleryApplicationName, - @PathParam("galleryApplicationVersionName") String galleryApplicationVersionName, - @QueryParam("api-version") String apiVersion, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -356,6 +306,7 @@ public Mono>> createOrUpdateWithResponseAsync( galleryApplicationVersion.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -554,7 +505,7 @@ public Mono createOrUpdateAsync( galleryApplicationVersionName, galleryApplicationVersion) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -591,7 +542,7 @@ public Mono createOrUpdateAsync( galleryApplicationVersion, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -808,6 +759,7 @@ public Mono>> updateWithResponseAsync( galleryApplicationVersion.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -1004,7 +956,7 @@ public Mono updateAsync( galleryApplicationVersionName, galleryApplicationVersion) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1041,7 +993,7 @@ public Mono updateAsync( galleryApplicationVersion, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1236,6 +1188,7 @@ public Mono> getWithResponseAsync( "Parameter galleryApplicationVersionName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -1546,6 +1499,7 @@ public Mono>> deleteWithResponseAsync( "Parameter galleryApplicationVersionName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1680,7 +1634,7 @@ public Mono deleteAsync( String galleryApplicationVersionName) { return beginDeleteAsync(resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1707,7 +1661,7 @@ public Mono deleteAsync( return beginDeleteAsync( resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1860,6 +1814,7 @@ public Mono> listByGalleryApplicat new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByGalleryApplication( this.client.getEndpoint(), @@ -1962,854 +1917,6 @@ public PagedIterable listByGalleryApplication( listByGalleryApplicationAsync(resourceGroupName, galleryName, galleryApplicationName, context)); } - /** - * Create or update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be created. - * @param galleryApplicationVersionName The name of the gallery Application Version to be created. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionInner galleryApplicationVersion) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplicationVersionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersionName is required and cannot be null.")); - } - if (galleryApplicationVersion == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersion is required and cannot be null.")); - } else { - galleryApplicationVersion.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - apiVersion, - galleryApplicationVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Create or update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be created. - * @param galleryApplicationVersionName The name of the gallery Application Version to be created. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionInner galleryApplicationVersion, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplicationVersionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersionName is required and cannot be null.")); - } - if (galleryApplicationVersion == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersion is required and cannot be null.")); - } else { - galleryApplicationVersion.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - apiVersion, - galleryApplicationVersion, - context); - } - - /** - * Create or update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be created. - * @param galleryApplicationVersionName The name of the gallery Application Version to be created. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionInner galleryApplicationVersion) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be created. - * @param galleryApplicationVersionName The name of the gallery Application Version to be created. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionInner galleryApplicationVersion, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion, - context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be created. - * @param galleryApplicationVersionName The name of the gallery Application Version to be created. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryApplicationVersionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionInner galleryApplicationVersion) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion) - .block(); - } - - /** - * Create or update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be created. - * @param galleryApplicationVersionName The name of the gallery Application Version to be created. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryApplicationVersionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionInner galleryApplicationVersion, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion, - context) - .block(); - } - - /** - * Update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be updated. - * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionUpdate galleryApplicationVersion) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplicationVersionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersionName is required and cannot be null.")); - } - if (galleryApplicationVersion == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersion is required and cannot be null.")); - } else { - galleryApplicationVersion.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - apiVersion, - galleryApplicationVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be updated. - * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionUpdate galleryApplicationVersion, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplicationVersionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersionName is required and cannot be null.")); - } - if (galleryApplicationVersion == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersion is required and cannot be null.")); - } else { - galleryApplicationVersion.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - apiVersion, - galleryApplicationVersion, - context); - } - - /** - * Update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be updated. - * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionUpdate galleryApplicationVersion) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be updated. - * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionUpdate galleryApplicationVersion, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion, - context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be updated. - * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryApplicationVersionInner beginUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionUpdate galleryApplicationVersion) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion) - .block(); - } - - /** - * Update a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version is - * to be updated. - * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. Needs to follow - * semantic version name pattern: The allowed characters are digit and period. Digits must be within the range - * of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryApplicationVersion Specifies information about the gallery Application Version that you want to - * update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryApplicationVersionInner beginUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - GalleryApplicationVersionUpdate galleryApplicationVersion, - Context context) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion, - context) - .block(); - } - - /** - * Delete a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version - * resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplicationVersionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersionName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Delete a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version - * resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplicationVersionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter galleryApplicationVersionName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - apiVersion, - context); - } - - /** - * Delete a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version - * resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName) { - return beginDeleteWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version - * resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - Context context) { - return beginDeleteWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version - * resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName) { - beginDeleteWithoutPollingAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName) - .block(); - } - - /** - * Delete a gallery Application Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the Application Version - * resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - String galleryApplicationVersionName, - Context context) { - beginDeleteWithoutPollingAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, context) - .block(); - } - /** * Get the next page of items. * @@ -2855,6 +1962,7 @@ public Mono> listByGalleryApplicat if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByGalleryApplicationNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java index 7d057a8238e5..1d58caac63b3 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java @@ -144,53 +144,6 @@ Mono> listByGallery( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/applications/{galleryApplicationName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryApplicationName") String galleryApplicationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryApplicationInner galleryApplication, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/applications/{galleryApplicationName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryApplicationName") String galleryApplicationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryApplicationUpdate galleryApplication, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/applications/{galleryApplicationName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryApplicationName") String galleryApplicationName, - @QueryParam("api-version") String apiVersion, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -323,6 +276,7 @@ public Mono>> createOrUpdateWithResponseAsync( galleryApplication.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -477,7 +431,7 @@ public Mono createOrUpdateAsync( GalleryApplicationInner galleryApplication) { return beginCreateOrUpdateAsync(resourceGroupName, galleryName, galleryApplicationName, galleryApplication) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -507,7 +461,7 @@ public Mono createOrUpdateAsync( return beginCreateOrUpdateAsync( resourceGroupName, galleryName, galleryApplicationName, galleryApplication, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -685,6 +639,7 @@ public Mono>> updateWithResponseAsync( galleryApplication.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -833,7 +788,7 @@ public Mono updateAsync( GalleryApplicationUpdate galleryApplication) { return beginUpdateAsync(resourceGroupName, galleryName, galleryApplicationName, galleryApplication) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -861,7 +816,7 @@ public Mono updateAsync( Context context) { return beginUpdateAsync(resourceGroupName, galleryName, galleryApplicationName, galleryApplication, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1010,6 +965,7 @@ public Mono> getWithResponseAsync( new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -1206,6 +1162,7 @@ public Mono>> deleteWithResponseAsync( new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1311,7 +1268,7 @@ public SyncPoller, Void> beginDelete( public Mono deleteAsync(String resourceGroupName, String galleryName, String galleryApplicationName) { return beginDeleteAsync(resourceGroupName, galleryName, galleryApplicationName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1332,7 +1289,7 @@ public Mono deleteAsync( String resourceGroupName, String galleryName, String galleryApplicationName, Context context) { return beginDeleteAsync(resourceGroupName, galleryName, galleryApplicationName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1460,6 +1417,7 @@ public Mono> listByGallerySinglePageAsync return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByGallery( this.client.getEndpoint(), @@ -1551,705 +1509,6 @@ public PagedIterable listByGallery( return new PagedIterable<>(listByGalleryAsync(resourceGroupName, galleryName, context)); } - /** - * Create or update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * created. - * @param galleryApplicationName The name of the gallery Application Definition to be created or updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The - * maximum length is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to create - * or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationInner galleryApplication) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplication == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryApplication is required and cannot be null.")); - } else { - galleryApplication.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - apiVersion, - galleryApplication, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Create or update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * created. - * @param galleryApplicationName The name of the gallery Application Definition to be created or updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The - * maximum length is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to create - * or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationInner galleryApplication, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplication == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryApplication is required and cannot be null.")); - } else { - galleryApplication.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - apiVersion, - galleryApplication, - context); - } - - /** - * Create or update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * created. - * @param galleryApplicationName The name of the gallery Application Definition to be created or updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The - * maximum length is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to create - * or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationInner galleryApplication) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplication) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * created. - * @param galleryApplicationName The name of the gallery Application Definition to be created or updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The - * maximum length is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to create - * or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationInner galleryApplication, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplication, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * created. - * @param galleryApplicationName The name of the gallery Application Definition to be created or updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The - * maximum length is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to create - * or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryApplicationInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationInner galleryApplication) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplication) - .block(); - } - - /** - * Create or update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * created. - * @param galleryApplicationName The name of the gallery Application Definition to be created or updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The - * maximum length is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to create - * or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryApplicationInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationInner galleryApplication, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplication, context) - .block(); - } - - /** - * Update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * updated. - * @param galleryApplicationName The name of the gallery Application Definition to be updated. The allowed - * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length - * is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationUpdate galleryApplication) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplication == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryApplication is required and cannot be null.")); - } else { - galleryApplication.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - apiVersion, - galleryApplication, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * updated. - * @param galleryApplicationName The name of the gallery Application Definition to be updated. The allowed - * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length - * is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationUpdate galleryApplication, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - if (galleryApplication == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryApplication is required and cannot be null.")); - } else { - galleryApplication.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - apiVersion, - galleryApplication, - context); - } - - /** - * Update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * updated. - * @param galleryApplicationName The name of the gallery Application Definition to be updated. The allowed - * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length - * is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationUpdate galleryApplication) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplication) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * updated. - * @param galleryApplicationName The name of the gallery Application Definition to be updated. The allowed - * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length - * is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationUpdate galleryApplication, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplication, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * updated. - * @param galleryApplicationName The name of the gallery Application Definition to be updated. The allowed - * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length - * is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryApplicationInner beginUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationUpdate galleryApplication) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplication) - .block(); - } - - /** - * Update a gallery Application Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * updated. - * @param galleryApplicationName The name of the gallery Application Definition to be updated. The allowed - * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length - * is 80 characters. - * @param galleryApplication Specifies information about the gallery Application Definition that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Application Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryApplicationInner beginUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryApplicationName, - GalleryApplicationUpdate galleryApplication, - Context context) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryApplicationName, galleryApplication, context) - .block(); - } - - /** - * Delete a gallery Application. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * deleted. - * @param galleryApplicationName The name of the gallery Application Definition to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, String galleryApplicationName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Delete a gallery Application. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * deleted. - * @param galleryApplicationName The name of the gallery Application Definition to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, String galleryApplicationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryApplicationName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryApplicationName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryApplicationName, - apiVersion, - context); - } - - /** - * Delete a gallery Application. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * deleted. - * @param galleryApplicationName The name of the gallery Application Definition to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String galleryName, String galleryApplicationName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, galleryName, galleryApplicationName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a gallery Application. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * deleted. - * @param galleryApplicationName The name of the gallery Application Definition to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String galleryName, String galleryApplicationName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryApplicationName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a gallery Application. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * deleted. - * @param galleryApplicationName The name of the gallery Application Definition to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String galleryName, String galleryApplicationName) { - beginDeleteWithoutPollingAsync(resourceGroupName, galleryName, galleryApplicationName).block(); - } - - /** - * Delete a gallery Application. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application Definition is to be - * deleted. - * @param galleryApplicationName The name of the gallery Application Definition to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String galleryName, String galleryApplicationName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, galleryName, galleryApplicationName, context).block(); - } - /** * Get the next page of items. * @@ -2294,6 +1553,7 @@ public Mono> listByGalleryNextSinglePageA if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByGalleryNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java index e8ac9eb58037..53d0acbe851c 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java @@ -152,56 +152,6 @@ Mono> listByGalleryImage( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryImageName") String galleryImageName, - @PathParam("galleryImageVersionName") String galleryImageVersionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryImageVersionInner galleryImageVersion, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryImageName") String galleryImageName, - @PathParam("galleryImageVersionName") String galleryImageVersionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryImageVersionUpdate galleryImageVersion, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryImageName") String galleryImageName, - @PathParam("galleryImageVersionName") String galleryImageVersionName, - @QueryParam("api-version") String apiVersion, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -345,6 +295,7 @@ public Mono>> createOrUpdateWithResponseAsync( galleryImageVersion.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -513,7 +464,7 @@ public Mono createOrUpdateAsync( return beginCreateOrUpdateAsync( resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -544,7 +495,7 @@ public Mono createOrUpdateAsync( return beginCreateOrUpdateAsync( resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -738,6 +689,7 @@ public Mono>> updateWithResponseAsync( galleryImageVersion.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -901,7 +853,7 @@ public Mono updateAsync( return beginUpdateAsync( resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -931,7 +883,7 @@ public Mono updateAsync( return beginUpdateAsync( resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1107,6 +1059,7 @@ public Mono> getWithResponseAsync( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -1391,6 +1344,7 @@ public Mono>> deleteWithResponseAsync( new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1508,7 +1462,7 @@ public Mono deleteAsync( String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { return beginDeleteAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1533,7 +1487,7 @@ public Mono deleteAsync( Context context) { return beginDeleteAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1678,6 +1632,7 @@ public Mono> listByGalleryImageSinglePag .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByGalleryImage( this.client.getEndpoint(), @@ -1776,764 +1731,6 @@ public PagedIterable listByGalleryImage( return new PagedIterable<>(listByGalleryImageAsync(resourceGroupName, galleryName, galleryImageName, context)); } - /** - * Create or update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be created. - * @param galleryImageVersionName The name of the gallery Image Version to be created. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to create or - * update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionInner galleryImageVersion) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImageVersionName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); - } - if (galleryImageVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageVersion is required and cannot be null.")); - } else { - galleryImageVersion.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - galleryImageVersionName, - apiVersion, - galleryImageVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Create or update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be created. - * @param galleryImageVersionName The name of the gallery Image Version to be created. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to create or - * update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionInner galleryImageVersion, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImageVersionName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); - } - if (galleryImageVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageVersion is required and cannot be null.")); - } else { - galleryImageVersion.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - galleryImageVersionName, - apiVersion, - galleryImageVersion, - context); - } - - /** - * Create or update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be created. - * @param galleryImageVersionName The name of the gallery Image Version to be created. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to create or - * update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionInner galleryImageVersion) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be created. - * @param galleryImageVersionName The name of the gallery Image Version to be created. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to create or - * update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionInner galleryImageVersion, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be created. - * @param galleryImageVersionName The name of the gallery Image Version to be created. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to create or - * update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImageVersionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionInner galleryImageVersion) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) - .block(); - } - - /** - * Create or update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be created. - * @param galleryImageVersionName The name of the gallery Image Version to be created. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to create or - * update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImageVersionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionInner galleryImageVersion, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, context) - .block(); - } - - /** - * Update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be updated. - * @param galleryImageVersionName The name of the gallery Image Version to be updated. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionUpdate galleryImageVersion) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImageVersionName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); - } - if (galleryImageVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageVersion is required and cannot be null.")); - } else { - galleryImageVersion.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - galleryImageVersionName, - apiVersion, - galleryImageVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be updated. - * @param galleryImageVersionName The name of the gallery Image Version to be updated. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionUpdate galleryImageVersion, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImageVersionName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); - } - if (galleryImageVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageVersion is required and cannot be null.")); - } else { - galleryImageVersion.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - galleryImageVersionName, - apiVersion, - galleryImageVersion, - context); - } - - /** - * Update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be updated. - * @param galleryImageVersionName The name of the gallery Image Version to be updated. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionUpdate galleryImageVersion) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be updated. - * @param galleryImageVersionName The name of the gallery Image Version to be updated. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionUpdate galleryImageVersion, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be updated. - * @param galleryImageVersionName The name of the gallery Image Version to be updated. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImageVersionInner beginUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionUpdate galleryImageVersion) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) - .block(); - } - - /** - * Update a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version is to be updated. - * @param galleryImageVersionName The name of the gallery Image Version to be updated. Needs to follow semantic - * version name pattern: The allowed characters are digit and period. Digits must be within the range of a - * 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. - * @param galleryImageVersion Specifies information about the gallery Image Version that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Version that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImageVersionInner beginUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - GalleryImageVersionUpdate galleryImageVersion, - Context context) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, context) - .block(); - } - - /** - * Delete a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version resides. - * @param galleryImageVersionName The name of the gallery Image Version to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImageVersionName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - galleryImageVersionName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Delete a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version resides. - * @param galleryImageVersionName The name of the gallery Image Version to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImageVersionName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - galleryImageVersionName, - apiVersion, - context); - } - - /** - * Delete a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version resides. - * @param galleryImageVersionName The name of the gallery Image Version to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { - return beginDeleteWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version resides. - * @param galleryImageVersionName The name of the gallery Image Version to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - Context context) { - return beginDeleteWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version resides. - * @param galleryImageVersionName The name of the gallery Image Version to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { - beginDeleteWithoutPollingAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName) - .block(); - } - - /** - * Delete a gallery Image Version. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery Image Definition in which the Image Version resides. - * @param galleryImageVersionName The name of the gallery Image Version to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryImageName, - String galleryImageVersionName, - Context context) { - beginDeleteWithoutPollingAsync( - resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, context) - .block(); - } - /** * Get the next page of items. * @@ -2578,6 +1775,7 @@ public Mono> listByGalleryImageNextSingl if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByGalleryImageNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java index 45cf925620a8..5244e8815208 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java @@ -144,53 +144,6 @@ Mono> listByGallery( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/images/{galleryImageName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryImageName") String galleryImageName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryImageInner galleryImage, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/images/{galleryImageName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryImageName") String galleryImageName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryImageUpdate galleryImage, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries" - + "/{galleryName}/images/{galleryImageName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryName") String galleryName, - @PathParam("galleryImageName") String galleryImageName, - @QueryParam("api-version") String apiVersion, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -312,6 +265,7 @@ public Mono>> createOrUpdateWithResponseAsync( galleryImage.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -444,7 +398,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { return beginCreateOrUpdateAsync(resourceGroupName, galleryName, galleryImageName, galleryImage) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -471,7 +425,7 @@ public Mono createOrUpdateAsync( Context context) { return beginCreateOrUpdateAsync(resourceGroupName, galleryName, galleryImageName, galleryImage, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -632,6 +586,7 @@ public Mono>> updateWithResponseAsync( galleryImage.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -764,7 +719,7 @@ public Mono updateAsync( String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { return beginUpdateAsync(resourceGroupName, galleryName, galleryImageName, galleryImage) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -791,7 +746,7 @@ public Mono updateAsync( Context context) { return beginUpdateAsync(resourceGroupName, galleryName, galleryImageName, galleryImage, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -931,6 +886,7 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -1118,6 +1074,7 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1218,7 +1175,7 @@ public SyncPoller, Void> beginDelete( public Mono deleteAsync(String resourceGroupName, String galleryName, String galleryImageName) { return beginDeleteAsync(resourceGroupName, galleryName, galleryImageName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1238,7 +1195,7 @@ public Mono deleteAsync( String resourceGroupName, String galleryName, String galleryImageName, Context context) { return beginDeleteAsync(resourceGroupName, galleryName, galleryImageName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1362,6 +1319,7 @@ public Mono> listByGallerySinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByGallery( this.client.getEndpoint(), @@ -1449,648 +1407,6 @@ public PagedIterable listByGallery( return new PagedIterable<>(listByGalleryAsync(resourceGroupName, galleryName, context)); } - /** - * Create or update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. - * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters - * are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImage == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryImage is required and cannot be null.")); - } else { - galleryImage.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - apiVersion, - galleryImage, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Create or update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. - * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters - * are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - GalleryImageInner galleryImage, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImage == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryImage is required and cannot be null.")); - } else { - galleryImage.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - apiVersion, - galleryImage, - context); - } - - /** - * Create or update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. - * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters - * are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImage) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. - * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters - * are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - GalleryImageInner galleryImage, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImage, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. - * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters - * are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImageInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, galleryName, galleryImageName, galleryImage) - .block(); - } - - /** - * Create or update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. - * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters - * are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImageInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryImageName, - GalleryImageInner galleryImage, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, galleryName, galleryImageName, galleryImage, context) - .block(); - } - - /** - * Update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. - * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are - * alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImage == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryImage is required and cannot be null.")); - } else { - galleryImage.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - apiVersion, - galleryImage, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. - * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are - * alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - GalleryImageUpdate galleryImage, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - if (galleryImage == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryImage is required and cannot be null.")); - } else { - galleryImage.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - apiVersion, - galleryImage, - context); - } - - /** - * Update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. - * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are - * alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImage) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. - * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are - * alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String galleryName, - String galleryImageName, - GalleryImageUpdate galleryImage, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, galleryName, galleryImageName, galleryImage, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. - * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are - * alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImageInner beginUpdateWithoutPolling( - String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { - return beginUpdateWithoutPollingAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).block(); - } - - /** - * Update a gallery Image Definition. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. - * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are - * alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 - * characters. - * @param galleryImage Specifies information about the gallery Image Definition that you want to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies information about the gallery Image Definition that you want to create or update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImageInner beginUpdateWithoutPolling( - String resourceGroupName, - String galleryName, - String galleryImageName, - GalleryImageUpdate galleryImage, - Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, galleryName, galleryImageName, galleryImage, context) - .block(); - } - - /** - * Delete a gallery image. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. - * @param galleryImageName The name of the gallery Image Definition to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, String galleryImageName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Delete a gallery image. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. - * @param galleryImageName The name of the gallery Image Definition to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String galleryName, String galleryImageName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (galleryName == null) { - return Mono.error(new IllegalArgumentException("Parameter galleryName is required and cannot be null.")); - } - if (galleryImageName == null) { - return Mono - .error(new IllegalArgumentException("Parameter galleryImageName is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryName, - galleryImageName, - apiVersion, - context); - } - - /** - * Delete a gallery image. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. - * @param galleryImageName The name of the gallery Image Definition to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String galleryName, String galleryImageName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, galleryName, galleryImageName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a gallery image. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. - * @param galleryImageName The name of the gallery Image Definition to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String galleryName, String galleryImageName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, galleryName, galleryImageName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a gallery image. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. - * @param galleryImageName The name of the gallery Image Definition to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String galleryName, String galleryImageName) { - beginDeleteWithoutPollingAsync(resourceGroupName, galleryName, galleryImageName).block(); - } - - /** - * Delete a gallery image. - * - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. - * @param galleryImageName The name of the gallery Image Definition to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String galleryName, String galleryImageName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, galleryName, galleryImageName, context).block(); - } - /** * Get the next page of items. * @@ -2134,6 +1450,7 @@ public Mono> listByGalleryNextSinglePageAsync(S if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByGalleryNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java index e2a752d015cc..9a06ed1154f8 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java @@ -151,50 +151,6 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images" - + "/{imageName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("imageName") String imageName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ImageInner parameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images" - + "/{imageName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("imageName") String imageName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ImageUpdate parameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images" - + "/{imageName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("imageName") String imageName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -308,6 +264,7 @@ public Mono>> createOrUpdateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -424,7 +381,7 @@ public SyncPoller, ImageInner> beginCreateOrUpdate( public Mono createOrUpdateAsync(String resourceGroupName, String imageName, ImageInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, imageName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -446,7 +403,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String imageName, ImageInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, imageName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -581,6 +538,7 @@ public Mono>> updateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -686,7 +644,7 @@ public SyncPoller, ImageInner> beginUpdate( public Mono updateAsync(String resourceGroupName, String imageName, ImageUpdate parameters) { return beginUpdateAsync(resourceGroupName, imageName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -706,7 +664,7 @@ public Mono updateAsync( String resourceGroupName, String imageName, ImageUpdate parameters, Context context) { return beginUpdateAsync(resourceGroupName, imageName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -822,6 +780,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -909,7 +868,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String imageName) { - return beginDeleteAsync(resourceGroupName, imageName).last().flatMap(client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, imageName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -927,7 +886,7 @@ public Mono deleteAsync(String resourceGroupName, String imageName) { public Mono deleteAsync(String resourceGroupName, String imageName, Context context) { return beginDeleteAsync(resourceGroupName, imageName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1043,6 +1002,7 @@ public Mono> getByResourceGroupWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1259,6 +1219,7 @@ public Mono> listByResourceGroupSinglePageAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), context) @@ -1399,6 +1360,7 @@ public Mono> listSinglePageAsync(Context context) { "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), context) .map( @@ -1468,551 +1430,6 @@ public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } - /** - * Create or update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String imageName, ImageInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (imageName == null) { - return Mono.error(new IllegalArgumentException("Parameter imageName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - imageName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Create or update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String imageName, ImageInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (imageName == null) { - return Mono.error(new IllegalArgumentException("Parameter imageName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - imageName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Create or update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String imageName, ImageInner parameters) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, imageName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String imageName, ImageInner parameters, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, imageName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ImageInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String imageName, ImageInner parameters) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, imageName, parameters).block(); - } - - /** - * Create or update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ImageInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String imageName, ImageInner parameters, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, imageName, parameters, context).block(); - } - - /** - * Update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. Only tags may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String imageName, ImageUpdate parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (imageName == null) { - return Mono.error(new IllegalArgumentException("Parameter imageName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - imageName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. Only tags may be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String imageName, ImageUpdate parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (imageName == null) { - return Mono.error(new IllegalArgumentException("Parameter imageName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - imageName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. Only tags may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String imageName, ImageUpdate parameters) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, imageName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. Only tags may be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String imageName, ImageUpdate parameters, Context context) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, imageName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. Only tags may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ImageInner beginUpdateWithoutPolling(String resourceGroupName, String imageName, ImageUpdate parameters) { - return beginUpdateWithoutPollingAsync(resourceGroupName, imageName, parameters).block(); - } - - /** - * Update an image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters The source user image virtual hard disk. Only tags may be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the source user image virtual hard disk. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ImageInner beginUpdateWithoutPolling( - String resourceGroupName, String imageName, ImageUpdate parameters, Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, imageName, parameters, context).block(); - } - - /** - * Deletes an Image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync(String resourceGroupName, String imageName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (imageName == null) { - return Mono.error(new IllegalArgumentException("Parameter imageName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - imageName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deletes an Image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String imageName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (imageName == null) { - return Mono.error(new IllegalArgumentException("Parameter imageName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - imageName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Deletes an Image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String imageName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, imageName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes an Image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String imageName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, imageName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes an Image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String imageName) { - beginDeleteWithoutPollingAsync(resourceGroupName, imageName).block(); - } - - /** - * Deletes an Image. - * - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String imageName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, imageName, context).block(); - } - /** * Get the next page of items. * @@ -2056,6 +1473,7 @@ public Mono> listByResourceGroupNextSinglePageAsync(St if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -2112,6 +1530,7 @@ public Mono> listNextSinglePageAsync(String nextLink, if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java index 3e5652556eba..e028c7cb9ce0 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java @@ -88,34 +88,6 @@ Mono>> exportThrottledRequests( @PathParam("subscriptionId") String subscriptionId, @BodyParam("application/json") LogAnalyticsInputBase parameters, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess" - + "/getRequestRateByInterval") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginExportRequestRateByIntervalWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") RequestRateByIntervalInput parameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess" - + "/getThrottledRequests") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginExportThrottledRequestsWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") LogAnalyticsInputBase parameters, - Context context); } /** @@ -203,6 +175,7 @@ public Mono>> exportRequestRateByIntervalWithResponseA parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .exportRequestRateByInterval( this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), parameters, context); @@ -309,7 +282,7 @@ public Mono exportRequestRateByIntervalAsync( String location, RequestRateByIntervalInput parameters) { return beginExportRequestRateByIntervalAsync(location, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -329,7 +302,7 @@ public Mono exportRequestRateByIntervalAsync( String location, RequestRateByIntervalInput parameters, Context context) { return beginExportRequestRateByIntervalAsync(location, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -450,6 +423,7 @@ public Mono>> exportThrottledRequestsWithResponseAsync parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .exportThrottledRequests( this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), parameters, context); @@ -550,7 +524,7 @@ public Mono exportThrottledRequestsAsync( String location, LogAnalyticsInputBase parameters) { return beginExportThrottledRequestsAsync(location, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -569,7 +543,7 @@ public Mono exportThrottledRequestsAsync( String location, LogAnalyticsInputBase parameters, Context context) { return beginExportThrottledRequestsAsync(location, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -603,352 +577,4 @@ public LogAnalyticsOperationResultInner exportThrottledRequests( String location, LogAnalyticsInputBase parameters, Context context) { return exportThrottledRequestsAsync(location, parameters, context).block(); } - - /** - * Export logs that show Api requests made by this subscription in the given time window to show throttling - * activities. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api request input for LogAnalytics getRequestRateByInterval Api. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - beginExportRequestRateByIntervalWithoutPollingWithResponseAsync( - String location, RequestRateByIntervalInput parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginExportRequestRateByIntervalWithoutPolling( - this.client.getEndpoint(), - location, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Export logs that show Api requests made by this subscription in the given time window to show throttling - * activities. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api request input for LogAnalytics getRequestRateByInterval Api. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - beginExportRequestRateByIntervalWithoutPollingWithResponseAsync( - String location, RequestRateByIntervalInput parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginExportRequestRateByIntervalWithoutPolling( - this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), parameters, context); - } - - /** - * Export logs that show Api requests made by this subscription in the given time window to show throttling - * activities. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api request input for LogAnalytics getRequestRateByInterval Api. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginExportRequestRateByIntervalWithoutPollingAsync( - String location, RequestRateByIntervalInput parameters) { - return beginExportRequestRateByIntervalWithoutPollingWithResponseAsync(location, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Export logs that show Api requests made by this subscription in the given time window to show throttling - * activities. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api request input for LogAnalytics getRequestRateByInterval Api. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginExportRequestRateByIntervalWithoutPollingAsync( - String location, RequestRateByIntervalInput parameters, Context context) { - return beginExportRequestRateByIntervalWithoutPollingWithResponseAsync(location, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Export logs that show Api requests made by this subscription in the given time window to show throttling - * activities. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api request input for LogAnalytics getRequestRateByInterval Api. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsOperationResultInner beginExportRequestRateByIntervalWithoutPolling( - String location, RequestRateByIntervalInput parameters) { - return beginExportRequestRateByIntervalWithoutPollingAsync(location, parameters).block(); - } - - /** - * Export logs that show Api requests made by this subscription in the given time window to show throttling - * activities. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api request input for LogAnalytics getRequestRateByInterval Api. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsOperationResultInner beginExportRequestRateByIntervalWithoutPolling( - String location, RequestRateByIntervalInput parameters, Context context) { - return beginExportRequestRateByIntervalWithoutPollingAsync(location, parameters, context).block(); - } - - /** - * Export logs that show total throttled Api requests for this subscription in the given time window. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api input base class for LogAnalytics Api. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginExportThrottledRequestsWithoutPollingWithResponseAsync( - String location, LogAnalyticsInputBase parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginExportThrottledRequestsWithoutPolling( - this.client.getEndpoint(), - location, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Export logs that show total throttled Api requests for this subscription in the given time window. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api input base class for LogAnalytics Api. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginExportThrottledRequestsWithoutPollingWithResponseAsync( - String location, LogAnalyticsInputBase parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginExportThrottledRequestsWithoutPolling( - this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), parameters, context); - } - - /** - * Export logs that show total throttled Api requests for this subscription in the given time window. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api input base class for LogAnalytics Api. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginExportThrottledRequestsWithoutPollingAsync( - String location, LogAnalyticsInputBase parameters) { - return beginExportThrottledRequestsWithoutPollingWithResponseAsync(location, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Export logs that show total throttled Api requests for this subscription in the given time window. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api input base class for LogAnalytics Api. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginExportThrottledRequestsWithoutPollingAsync( - String location, LogAnalyticsInputBase parameters, Context context) { - return beginExportThrottledRequestsWithoutPollingWithResponseAsync(location, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Export logs that show total throttled Api requests for this subscription in the given time window. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api input base class for LogAnalytics Api. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsOperationResultInner beginExportThrottledRequestsWithoutPolling( - String location, LogAnalyticsInputBase parameters) { - return beginExportThrottledRequestsWithoutPollingAsync(location, parameters).block(); - } - - /** - * Export logs that show total throttled Api requests for this subscription in the given time window. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param parameters Api input base class for LogAnalytics Api. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsOperationResultInner beginExportThrottledRequestsWithoutPolling( - String location, LogAnalyticsInputBase parameters, Context context) { - return beginExportThrottledRequestsWithoutPollingAsync(location, parameters, context).block(); - } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java index acfa82adde4b..8dcd55d1b7e7 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java @@ -108,6 +108,7 @@ public Mono> listSinglePageAsync(Conte "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java index 0e7920237e5e..c0cceda83dc5 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java @@ -271,6 +271,7 @@ public Mono> createOrUpdateWithResponseAs parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -468,6 +469,7 @@ public Mono> updateWithResponseAsync( final String apiVersion = "2019-12-01"; UpdateResource parameters = new UpdateResource(); parameters.withTags(tags); + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -651,6 +653,7 @@ public Mono> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -815,6 +818,7 @@ public Mono> getByResourceGroupWithRespon "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1026,6 +1030,7 @@ public Mono> listSinglePageAsync(Con "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), context) .map( @@ -1174,6 +1179,7 @@ public Mono> listByResourceGroupSing "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), context) @@ -1294,6 +1300,7 @@ public Mono> listBySubscriptionNextS if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBySubscriptionNext(nextLink, context) .map( @@ -1351,6 +1358,7 @@ public Mono> listByResourceGroupNext if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java index 26d1bb7b1b31..e1a493a133d3 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java @@ -143,6 +143,7 @@ public Mono> listSinglePageAsync(String filter, "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-04-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), filter, context) .map( @@ -286,6 +287,7 @@ public Mono> listNextSinglePageAsync(String next if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java index 32220bff368b..ccb61f253f38 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java @@ -183,79 +183,6 @@ Mono>> revokeAccess( @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots" - + "/{snapshotName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SnapshotInner snapshot, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots" - + "/{snapshotName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SnapshotUpdate snapshot, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots" - + "/{snapshotName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots" - + "/{snapshotName}/beginGetAccess") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginGrantAccessWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GrantAccessData grantAccessData, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots" - + "/{snapshotName}/endGetAccess") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRevokeAccessWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -367,6 +294,7 @@ public Mono>> createOrUpdateWithResponseAsync( snapshot.validate(); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -479,7 +407,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String snapshotName, SnapshotInner snapshot) { return beginCreateOrUpdateAsync(resourceGroupName, snapshotName, snapshot) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -500,7 +428,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String snapshotName, SnapshotInner snapshot, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, snapshotName, snapshot, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -635,6 +563,7 @@ public Mono>> updateWithResponseAsync( snapshot.validate(); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -745,7 +674,7 @@ public SyncPoller, SnapshotInner> beginUpdate( public Mono updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { return beginUpdateAsync(resourceGroupName, snapshotName, snapshot) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -766,7 +695,7 @@ public Mono updateAsync( String resourceGroupName, String snapshotName, SnapshotUpdate snapshot, Context context) { return beginUpdateAsync(resourceGroupName, snapshotName, snapshot, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -888,6 +817,7 @@ public Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1062,6 +992,7 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1155,7 +1086,7 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String snapshotName) { - return beginDeleteAsync(resourceGroupName, snapshotName).last().flatMap(client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, snapshotName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -1174,7 +1105,7 @@ public Mono deleteAsync(String resourceGroupName, String snapshotName) { public Mono deleteAsync(String resourceGroupName, String snapshotName, Context context) { return beginDeleteAsync(resourceGroupName, snapshotName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1288,6 +1219,7 @@ public Mono> listByResourceGroupSinglePageAsync( .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, apiVersion, context) @@ -1426,6 +1358,7 @@ public Mono> listSinglePageAsync(Context context) { "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, context) .map( @@ -1589,6 +1522,7 @@ public Mono>> grantAccessWithResponseAsync( grantAccessData.validate(); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .grantAccess( this.client.getEndpoint(), @@ -1701,7 +1635,7 @@ public Mono grantAccessAsync( String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { return beginGrantAccessAsync(resourceGroupName, snapshotName, grantAccessData) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1722,7 +1656,7 @@ public Mono grantAccessAsync( String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, Context context) { return beginGrantAccessAsync(resourceGroupName, snapshotName, grantAccessData, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1844,6 +1778,7 @@ public Mono>> revokeAccessWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); } final String apiVersion = "2019-11-01"; + context = this.client.mergeContext(context); return service .revokeAccess( this.client.getEndpoint(), @@ -1939,7 +1874,7 @@ public SyncPoller, Void> beginRevokeAccess( public Mono revokeAccessAsync(String resourceGroupName, String snapshotName) { return beginRevokeAccessAsync(resourceGroupName, snapshotName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1958,7 +1893,7 @@ public Mono revokeAccessAsync(String resourceGroupName, String snapshotNam public Mono revokeAccessAsync(String resourceGroupName, String snapshotName, Context context) { return beginRevokeAccessAsync(resourceGroupName, snapshotName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1992,919 +1927,6 @@ public void revokeAccess(String resourceGroupName, String snapshotName, Context revokeAccessAsync(resourceGroupName, snapshotName, context).block(); } - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName, SnapshotInner snapshot) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (snapshot == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshot is required and cannot be null.")); - } else { - snapshot.validate(); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - snapshot, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName, SnapshotInner snapshot, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (snapshot == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshot is required and cannot be null.")); - } else { - snapshot.validate(); - } - final String apiVersion = "2019-11-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - snapshot, - context); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String snapshotName, SnapshotInner snapshot) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, snapshotName, snapshot) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String snapshotName, SnapshotInner snapshot, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, snapshotName, snapshot, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String snapshotName, SnapshotInner snapshot) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, snapshotName, snapshot).block(); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String snapshotName, SnapshotInner snapshot, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, snapshotName, snapshot, context).block(); - } - - /** - * Updates (patches) a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (snapshot == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshot is required and cannot be null.")); - } else { - snapshot.validate(); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - snapshot, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Updates (patches) a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName, SnapshotUpdate snapshot, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (snapshot == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshot is required and cannot be null.")); - } else { - snapshot.validate(); - } - final String apiVersion = "2019-11-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - snapshot, - context); - } - - /** - * Updates (patches) a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, snapshotName, snapshot) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates (patches) a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String snapshotName, SnapshotUpdate snapshot, Context context) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, snapshotName, snapshot, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates (patches) a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot update resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner beginUpdateWithoutPolling( - String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { - return beginUpdateWithoutPollingAsync(resourceGroupName, snapshotName, snapshot).block(); - } - - /** - * Updates (patches) a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param snapshot Snapshot update resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner beginUpdateWithoutPolling( - String resourceGroupName, String snapshotName, SnapshotUpdate snapshot, Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, snapshotName, snapshot, context).block(); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - context); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String snapshotName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, snapshotName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String snapshotName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, snapshotName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String snapshotName) { - beginDeleteWithoutPollingAsync(resourceGroupName, snapshotName).block(); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String snapshotName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, snapshotName, context).block(); - } - - /** - * Grants access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginGrantAccessWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (grantAccessData == null) { - return Mono - .error(new IllegalArgumentException("Parameter grantAccessData is required and cannot be null.")); - } else { - grantAccessData.validate(); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginGrantAccessWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - grantAccessData, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Grants access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginGrantAccessWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (grantAccessData == null) { - return Mono - .error(new IllegalArgumentException("Parameter grantAccessData is required and cannot be null.")); - } else { - grantAccessData.validate(); - } - final String apiVersion = "2019-11-01"; - return service - .beginGrantAccessWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - grantAccessData, - context); - } - - /** - * Grants access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginGrantAccessWithoutPollingAsync( - String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { - return beginGrantAccessWithoutPollingWithResponseAsync(resourceGroupName, snapshotName, grantAccessData) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Grants access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginGrantAccessWithoutPollingAsync( - String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, Context context) { - return beginGrantAccessWithoutPollingWithResponseAsync( - resourceGroupName, snapshotName, grantAccessData, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Grants access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessUriInner beginGrantAccessWithoutPolling( - String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { - return beginGrantAccessWithoutPollingAsync(resourceGroupName, snapshotName, grantAccessData).block(); - } - - /** - * Grants access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param grantAccessData Data used for requesting a SAS. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessUriInner beginGrantAccessWithoutPolling( - String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, Context context) { - return beginGrantAccessWithoutPollingAsync(resourceGroupName, snapshotName, grantAccessData, context).block(); - } - - /** - * Revokes access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRevokeAccessWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return FluxUtil - .withContext( - context -> - service - .beginRevokeAccessWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Revokes access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRevokeAccessWithoutPollingWithResponseAsync( - String resourceGroupName, String snapshotName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - return service - .beginRevokeAccessWithoutPolling( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - snapshotName, - apiVersion, - context); - } - - /** - * Revokes access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRevokeAccessWithoutPollingAsync(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithoutPollingWithResponseAsync(resourceGroupName, snapshotName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Revokes access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRevokeAccessWithoutPollingAsync( - String resourceGroupName, String snapshotName, Context context) { - return beginRevokeAccessWithoutPollingWithResponseAsync(resourceGroupName, snapshotName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Revokes access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRevokeAccessWithoutPolling(String resourceGroupName, String snapshotName) { - beginRevokeAccessWithoutPollingAsync(resourceGroupName, snapshotName).block(); - } - - /** - * Revokes access to a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot - * is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRevokeAccessWithoutPolling(String resourceGroupName, String snapshotName, Context context) { - beginRevokeAccessWithoutPollingAsync(resourceGroupName, snapshotName, context).block(); - } - /** * Get the next page of items. * @@ -2948,6 +1970,7 @@ public Mono> listByResourceGroupNextSinglePageAsync if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( @@ -3004,6 +2027,7 @@ public Mono> listNextSinglePageAsync(String nextLin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java index a235536e529f..b03342bad4d4 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java @@ -245,6 +245,7 @@ public Mono> listSinglePageAsync(Contex "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), context) .map( @@ -398,6 +399,7 @@ public Mono> listByResourceGroupSingleP "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), context) @@ -574,6 +576,7 @@ public Mono> createWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .create( this.client.getEndpoint(), @@ -767,6 +770,7 @@ public Mono> updateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -946,6 +950,7 @@ public Mono> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1101,6 +1106,7 @@ public Mono> getByResourceGroupWithResponseA "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1276,6 +1282,7 @@ public Mono> generateKeyPairWit "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .generateKeyPair( this.client.getEndpoint(), @@ -1415,6 +1422,7 @@ public Mono> listBySubscriptionNextSing if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listBySubscriptionNext(nextLink, context) .map( @@ -1472,6 +1480,7 @@ public Mono> listByResourceGroupNextSin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByResourceGroupNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java index a4d631bffb95..0b064146aaeb 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java @@ -151,6 +151,7 @@ public Mono> listSinglePageAsync(String location, Cont "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), context) .map( @@ -270,6 +271,7 @@ public Mono> listNextSinglePageAsync(String nextLink, if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java index bb19231dd7f9..8fca1070ab83 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java @@ -204,6 +204,7 @@ public Mono> getWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -384,6 +385,7 @@ public Mono>> listTypesWithResp "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listTypes( this.client.getEndpoint(), @@ -576,6 +578,7 @@ public Mono>> listVersionsWithR "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listVersions( this.client.getEndpoint(), diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java index c913c72feb05..d2e67bc7b23e 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java @@ -142,53 +142,6 @@ Mono> list( @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/extensions/{vmExtensionName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @PathParam("vmExtensionName") String vmExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineExtensionInner extensionParameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/extensions/{vmExtensionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @PathParam("vmExtensionName") String vmExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineExtensionUpdate extensionParameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/extensions/{vmExtensionName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @PathParam("vmExtensionName") String vmExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); } /** @@ -305,6 +258,7 @@ public Mono>> createOrUpdateWithResponseAsync( extensionParameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -443,7 +397,7 @@ public Mono createOrUpdateAsync( VirtualMachineExtensionInner extensionParameters) { return beginCreateOrUpdateAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -468,7 +422,7 @@ public Mono createOrUpdateAsync( Context context) { return beginCreateOrUpdateAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -629,6 +583,7 @@ public Mono>> updateWithResponseAsync( extensionParameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -766,7 +721,7 @@ public Mono updateAsync( VirtualMachineExtensionUpdate extensionParameters) { return beginUpdateAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -791,7 +746,7 @@ public Mono updateAsync( Context context) { return beginUpdateAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -930,6 +885,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1029,7 +985,7 @@ public SyncPoller, Void> beginDelete( public Mono deleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { return beginDeleteAsync(resourceGroupName, vmName, vmExtensionName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1048,7 +1004,7 @@ public Mono deleteAsync(String resourceGroupName, String vmName, String vm public Mono deleteAsync(String resourceGroupName, String vmName, String vmExtensionName, Context context) { return beginDeleteAsync(resourceGroupName, vmName, vmExtensionName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1177,6 +1133,7 @@ public Mono> getWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -1408,6 +1365,7 @@ public Mono> listWithResponseA "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -1545,643 +1503,4 @@ public VirtualMachineExtensionsListResultInner list(String resourceGroupName, St final Context context = null; return listAsync(resourceGroupName, vmName, expand).block(); } - - /** - * The operation to create or update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to create or update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context); - } - - /** - * The operation to create or update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmName, vmExtensionName, extensionParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to create or update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmName, vmExtensionName, extensionParameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to create or update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineExtensionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters) - .block(); - } - - /** - * The operation to create or update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineExtensionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, vmName, vmExtensionName, extensionParameters, context) - .block(); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmName, vmExtensionName, extensionParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmName, vmExtensionName, extensionParameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineExtensionInner beginUpdateWithoutPolling( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).block(); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineExtensionInner beginUpdateWithoutPolling( - String resourceGroupName, - String vmName, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters, - Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters, context) - .block(); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be deleted. - * @param vmExtensionName The name of the virtual machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, String vmExtensionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be deleted. - * @param vmExtensionName The name of the virtual machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, String vmExtensionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be deleted. - * @param vmExtensionName The name of the virtual machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String vmName, String vmExtensionName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmName, vmExtensionName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be deleted. - * @param vmExtensionName The name of the virtual machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String vmName, String vmExtensionName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmName, vmExtensionName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be deleted. - * @param vmExtensionName The name of the virtual machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String vmName, String vmExtensionName) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmName, vmExtensionName).block(); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be deleted. - * @param vmExtensionName The name of the virtual machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String vmName, String vmExtensionName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmName, vmExtensionName, context).block(); - } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java index 454896511ae8..c69154278b53 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java @@ -239,6 +239,7 @@ public Mono> getWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -459,6 +460,7 @@ public Mono>> listWithResponseAs "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -721,6 +723,7 @@ public Mono>> listOffersWithResp "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listOffers( this.client.getEndpoint(), @@ -875,6 +878,7 @@ public Mono>> listPublishersWith "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listPublishers(this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), context); } @@ -1041,6 +1045,7 @@ public Mono>> listSkusWithRespon "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listSkus( this.client.getEndpoint(), diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java index da4489de1202..4bad1232cdbc 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java @@ -165,6 +165,7 @@ public Mono> listSinglePageAsync(Stri "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), context) .map( @@ -315,6 +316,7 @@ public Mono> getWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get(this.client.getEndpoint(), location, commandId, apiVersion, this.client.getSubscriptionId(), context); } @@ -440,6 +442,7 @@ public Mono> listNextSinglePageAsync( if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java index def470e91cc3..ea603ecf3b87 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java @@ -149,53 +149,6 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("vmssExtensionName") String vmssExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetExtensionInner extensionParameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("vmssExtensionName") String vmssExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetExtensionUpdate extensionParameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("vmssExtensionName") String vmssExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -318,6 +271,7 @@ public Mono>> createOrUpdateWithResponseAsync( extensionParameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -462,7 +416,7 @@ public Mono createOrUpdateAsync( VirtualMachineScaleSetExtensionInner extensionParameters) { return beginCreateOrUpdateAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -488,7 +442,7 @@ public Mono createOrUpdateAsync( return beginCreateOrUpdateAsync( resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -650,6 +604,7 @@ public Mono>> updateWithResponseAsync( extensionParameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -792,7 +747,7 @@ public Mono updateAsync( VirtualMachineScaleSetExtensionUpdate extensionParameters) { return beginUpdateAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -817,7 +772,7 @@ public Mono updateAsync( Context context) { return beginUpdateAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -956,6 +911,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1056,7 +1012,7 @@ public SyncPoller, Void> beginDelete( public Mono deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { return beginDeleteAsync(resourceGroupName, vmScaleSetName, vmssExtensionName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1076,7 +1032,7 @@ public Mono deleteAsync( String resourceGroupName, String vmScaleSetName, String vmssExtensionName, Context context) { return beginDeleteAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1205,6 +1161,7 @@ public Mono> getWithResponseAsync "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -1443,6 +1400,7 @@ public Mono> listSinglePageA "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -1530,649 +1488,6 @@ public PagedIterable list( return new PagedIterable<>(listAsync(resourceGroupName, vmScaleSetName, context)); } - /** - * The operation to create or update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionInner extensionParameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (vmssExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmssExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - vmssExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to create or update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionInner extensionParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (vmssExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmssExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - vmssExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context); - } - - /** - * The operation to create or update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionInner extensionParameters) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to create or update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionInner extensionParameters, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to create or update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetExtensionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionInner extensionParameters) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters) - .block(); - } - - /** - * The operation to create or update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetExtensionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionInner extensionParameters, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, context) - .block(); - } - - /** - * The operation to update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionUpdate extensionParameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (vmssExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmssExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - vmssExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionUpdate extensionParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (vmssExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmssExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - vmssExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context); - } - - /** - * The operation to update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionUpdate extensionParameters) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionUpdate extensionParameters, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetExtensionInner beginUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionUpdate extensionParameters) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters) - .block(); - } - - /** - * The operation to update an extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Describes a Virtual Machine Scale Set Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetExtensionInner beginUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String vmssExtensionName, - VirtualMachineScaleSetExtensionUpdate extensionParameters, - Context context) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, context) - .block(); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. - * @param vmssExtensionName The name of the VM scale set extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (vmssExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmssExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - vmssExtensionName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. - * @param vmssExtensionName The name of the VM scale set extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String vmssExtensionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (vmssExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmssExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - vmssExtensionName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. - * @param vmssExtensionName The name of the VM scale set extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. - * @param vmssExtensionName The name of the VM scale set extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String vmssExtensionName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. - * @param vmssExtensionName The name of the VM scale set extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).block(); - } - - /** - * The operation to delete the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. - * @param vmssExtensionName The name of the VM scale set extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String vmScaleSetName, String vmssExtensionName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, context).block(); - } - /** * Get the next page of items. * @@ -2217,6 +1532,7 @@ public Mono> listNextSingleP if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java index 9ea4a38e9b07..743aa7e76d12 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java @@ -118,48 +118,6 @@ Mono> getLatest( @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCancelWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginStartOSUpgradeWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginStartExtensionUpgradeWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); } /** @@ -242,6 +200,7 @@ public Mono>> cancelWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .cancel( this.client.getEndpoint(), @@ -330,7 +289,9 @@ public SyncPoller, Void> beginCancel( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono cancelAsync(String resourceGroupName, String vmScaleSetName) { - return beginCancelAsync(resourceGroupName, vmScaleSetName).last().flatMap(client::getLroFinalResultOrError); + return beginCancelAsync(resourceGroupName, vmScaleSetName) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -348,7 +309,7 @@ public Mono cancelAsync(String resourceGroupName, String vmScaleSetName) { public Mono cancelAsync(String resourceGroupName, String vmScaleSetName, Context context) { return beginCancelAsync(resourceGroupName, vmScaleSetName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -463,6 +424,7 @@ public Mono>> startOSUpgradeWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .startOSUpgrade( this.client.getEndpoint(), @@ -560,7 +522,7 @@ public SyncPoller, Void> beginStartOSUpgrade( public Mono startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { return beginStartOSUpgradeAsync(resourceGroupName, vmScaleSetName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -579,7 +541,7 @@ public Mono startOSUpgradeAsync(String resourceGroupName, String vmScaleSe public Mono startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, Context context) { return beginStartOSUpgradeAsync(resourceGroupName, vmScaleSetName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -696,6 +658,7 @@ public Mono>> startExtensionUpgradeWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .startExtensionUpgrade( this.client.getEndpoint(), @@ -795,7 +758,7 @@ public SyncPoller, Void> beginStartExtensionUpgrade( public Mono startExtensionUpgradeAsync(String resourceGroupName, String vmScaleSetName) { return beginStartExtensionUpgradeAsync(resourceGroupName, vmScaleSetName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -814,7 +777,7 @@ public Mono startExtensionUpgradeAsync(String resourceGroupName, String vm public Mono startExtensionUpgradeAsync(String resourceGroupName, String vmScaleSetName, Context context) { return beginStartExtensionUpgradeAsync(resourceGroupName, vmScaleSetName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -929,6 +892,7 @@ public Mono> getLatestWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getLatest( this.client.getEndpoint(), @@ -1017,478 +981,4 @@ public RollingUpgradeStatusInfoInner getLatest(String resourceGroupName, String public RollingUpgradeStatusInfoInner getLatest(String resourceGroupName, String vmScaleSetName, Context context) { return getLatestAsync(resourceGroupName, vmScaleSetName, context).block(); } - - /** - * Cancels the current virtual machine scale set rolling upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCancelWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCancelWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Cancels the current virtual machine scale set rolling upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCancelWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginCancelWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Cancels the current virtual machine scale set rolling upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCancelWithoutPollingAsync(String resourceGroupName, String vmScaleSetName) { - return beginCancelWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Cancels the current virtual machine scale set rolling upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCancelWithoutPollingAsync(String resourceGroupName, String vmScaleSetName, Context context) { - return beginCancelWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Cancels the current virtual machine scale set rolling upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginCancelWithoutPolling(String resourceGroupName, String vmScaleSetName) { - beginCancelWithoutPollingAsync(resourceGroupName, vmScaleSetName).block(); - } - - /** - * Cancels the current virtual machine scale set rolling upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginCancelWithoutPolling(String resourceGroupName, String vmScaleSetName, Context context) { - beginCancelWithoutPollingAsync(resourceGroupName, vmScaleSetName, context).block(); - } - - /** - * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image - * OS version. Instances which are already running the latest available OS version are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartOSUpgradeWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginStartOSUpgradeWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image - * OS version. Instances which are already running the latest available OS version are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartOSUpgradeWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginStartOSUpgradeWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image - * OS version. Instances which are already running the latest available OS version are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartOSUpgradeWithoutPollingAsync(String resourceGroupName, String vmScaleSetName) { - return beginStartOSUpgradeWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image - * OS version. Instances which are already running the latest available OS version are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartOSUpgradeWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, Context context) { - return beginStartOSUpgradeWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image - * OS version. Instances which are already running the latest available OS version are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartOSUpgradeWithoutPolling(String resourceGroupName, String vmScaleSetName) { - beginStartOSUpgradeWithoutPollingAsync(resourceGroupName, vmScaleSetName).block(); - } - - /** - * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image - * OS version. Instances which are already running the latest available OS version are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartOSUpgradeWithoutPolling(String resourceGroupName, String vmScaleSetName, Context context) { - beginStartOSUpgradeWithoutPollingAsync(resourceGroupName, vmScaleSetName, context).block(); - } - - /** - * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest - * available extension version. Instances which are already running the latest extension versions are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartExtensionUpgradeWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginStartExtensionUpgradeWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest - * available extension version. Instances which are already running the latest extension versions are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartExtensionUpgradeWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginStartExtensionUpgradeWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest - * available extension version. Instances which are already running the latest extension versions are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartExtensionUpgradeWithoutPollingAsync(String resourceGroupName, String vmScaleSetName) { - return beginStartExtensionUpgradeWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest - * available extension version. Instances which are already running the latest extension versions are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartExtensionUpgradeWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, Context context) { - return beginStartExtensionUpgradeWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest - * available extension version. Instances which are already running the latest extension versions are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartExtensionUpgradeWithoutPolling(String resourceGroupName, String vmScaleSetName) { - beginStartExtensionUpgradeWithoutPollingAsync(resourceGroupName, vmScaleSetName).block(); - } - - /** - * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest - * available extension version. Instances which are already running the latest extension versions are not affected. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartExtensionUpgradeWithoutPolling( - String resourceGroupName, String vmScaleSetName, Context context) { - beginStartExtensionUpgradeWithoutPollingAsync(resourceGroupName, vmScaleSetName, context).block(); - } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java index 5525467cc624..79eb0dc75769 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java @@ -150,56 +150,6 @@ Mono> list( @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @PathParam("vmExtensionName") String vmExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineExtensionInner extensionParameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @PathParam("vmExtensionName") String vmExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineExtensionUpdate extensionParameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @PathParam("vmExtensionName") String vmExtensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); } /** @@ -327,6 +277,7 @@ public Mono>> createOrUpdateWithResponseAsync( extensionParameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -481,7 +432,7 @@ public Mono createOrUpdateAsync( return beginCreateOrUpdateAsync( resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -509,7 +460,7 @@ public Mono createOrUpdateAsync( return beginCreateOrUpdateAsync( resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -688,6 +639,7 @@ public Mono>> updateWithResponseAsync( extensionParameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -840,7 +792,7 @@ public Mono updateAsync( VirtualMachineExtensionUpdate extensionParameters) { return beginUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -868,7 +820,7 @@ public Mono updateAsync( return beginUpdateAsync( resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1021,6 +973,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1129,7 +1082,7 @@ public Mono deleteAsync( String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) { return beginDeleteAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1150,7 +1103,7 @@ public Mono deleteAsync( String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, Context context) { return beginDeleteAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1296,6 +1249,7 @@ public Mono> getWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -1554,6 +1508,7 @@ public Mono> listWithResponseA "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -1701,705 +1656,4 @@ public VirtualMachineExtensionsListResultInner list( final Context context = null; return listAsync(resourceGroupName, vmScaleSetName, instanceId, expand).block(); } - - /** - * The operation to create or update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to create or update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context); - } - - /** - * The operation to create or update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to create or update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters, - Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to create or update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineExtensionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters) - .block(); - } - - /** - * The operation to create or update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineExtensionInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionInner extensionParameters, - Context context) { - return beginCreateOrUpdateWithoutPollingAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters, context) - .block(); - } - - /** - * The operation to update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (extensionParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); - } else { - extensionParameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - extensionParameters, - context); - } - - /** - * The operation to update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineExtensionInner beginUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters) - .block(); - } - - /** - * The operation to update the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Describes a Virtual Machine Extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineExtensionInner beginUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - String vmExtensionName, - VirtualMachineExtensionUpdate extensionParameters, - Context context) { - return beginUpdateWithoutPollingAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters, context) - .block(); - } - - /** - * The operation to delete the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to delete the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (vmExtensionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - vmExtensionName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to delete the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) { - return beginDeleteWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to delete the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to delete the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName).block(); - } - - /** - * The operation to delete the VMSS VM extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, context).block(); - } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java index 9e137e3102c1..0ad2aa74e002 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java @@ -306,175 +306,6 @@ Mono>> runCommand( @BodyParam("application/json") RunCommandInput parameters, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginReimageWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineReimageParameters vmScaleSetVMReimageInput, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginReimageAllWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeallocateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInner parameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginPowerOffWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("skipShutdown") Boolean skipShutdown, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRestartWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginStartWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRedeployWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginPerformMaintenanceWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json,text/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRunCommandWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @PathParam("instanceId") String instanceId, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") RunCommandInput parameters, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -590,6 +421,7 @@ public Mono>> reimageWithResponseAsync( vmScaleSetVMReimageInputInternal.withTempDisk(tempDisk); } VirtualMachineReimageParameters vmScaleSetVMReimageInput = vmScaleSetVMReimageInputInternal; + context = this.client.mergeContext(context); return service .reimage( this.client.getEndpoint(), @@ -702,7 +534,7 @@ public Mono reimageAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Boolean tempDisk) { return beginReimageAsync(resourceGroupName, vmScaleSetName, instanceId, tempDisk) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -724,7 +556,7 @@ public Mono reimageAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Boolean tempDisk, Context context) { return beginReimageAsync(resourceGroupName, vmScaleSetName, instanceId, tempDisk, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -855,6 +687,7 @@ public Mono>> reimageAllWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .reimageAll( this.client.getEndpoint(), @@ -960,7 +793,7 @@ public SyncPoller, Void> beginReimageAll( public Mono reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return beginReimageAllAsync(resourceGroupName, vmScaleSetName, instanceId) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -981,7 +814,7 @@ public Mono reimageAllAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { return beginReimageAllAsync(resourceGroupName, vmScaleSetName, instanceId, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1109,6 +942,7 @@ public Mono>> deallocateWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .deallocate( this.client.getEndpoint(), @@ -1214,7 +1048,7 @@ public SyncPoller, Void> beginDeallocate( public Mono deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return beginDeallocateAsync(resourceGroupName, vmScaleSetName, instanceId) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1235,7 +1069,7 @@ public Mono deallocateAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { return beginDeallocateAsync(resourceGroupName, vmScaleSetName, instanceId, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1378,6 +1212,7 @@ public Mono>> updateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -1505,7 +1340,7 @@ public Mono updateAsync( String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { return beginUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1530,7 +1365,7 @@ public Mono updateAsync( Context context) { return beginUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1664,6 +1499,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1763,7 +1599,7 @@ public SyncPoller, Void> beginDelete( public Mono deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return beginDeleteAsync(resourceGroupName, vmScaleSetName, instanceId) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1782,7 +1618,7 @@ public Mono deleteAsync(String resourceGroupName, String vmScaleSetName, S public Mono deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { return beginDeleteAsync(resourceGroupName, vmScaleSetName, instanceId, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1909,6 +1745,7 @@ public Mono> getWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), @@ -2146,6 +1983,7 @@ public Mono> getInstanceView "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getInstanceView( this.client.getEndpoint(), @@ -2355,6 +2193,7 @@ public Mono> listSinglePageAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list( this.client.getEndpoint(), @@ -2615,6 +2454,7 @@ public Mono>> powerOffWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .powerOff( this.client.getEndpoint(), @@ -2737,7 +2577,7 @@ public Mono powerOffAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Boolean skipShutdown) { return beginPowerOffAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2761,7 +2601,7 @@ public Mono powerOffAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Boolean skipShutdown, Context context) { return beginPowerOffAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2782,7 +2622,7 @@ public Mono powerOffAsync(String resourceGroupName, String vmScaleSetName, final Context context = null; return beginPowerOffAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2933,6 +2773,7 @@ public Mono>> restartWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .restart( this.client.getEndpoint(), @@ -3032,7 +2873,7 @@ public SyncPoller, Void> beginRestart( public Mono restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return beginRestartAsync(resourceGroupName, vmScaleSetName, instanceId) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3052,7 +2893,7 @@ public Mono restartAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { return beginRestartAsync(resourceGroupName, vmScaleSetName, instanceId, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3176,6 +3017,7 @@ public Mono>> startWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .start( this.client.getEndpoint(), @@ -3275,7 +3117,7 @@ public SyncPoller, Void> beginStart( public Mono startAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return beginStartAsync(resourceGroupName, vmScaleSetName, instanceId) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3294,7 +3136,7 @@ public Mono startAsync(String resourceGroupName, String vmScaleSetName, St public Mono startAsync(String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { return beginStartAsync(resourceGroupName, vmScaleSetName, instanceId, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3418,6 +3260,7 @@ public Mono>> redeployWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .redeploy( this.client.getEndpoint(), @@ -3518,7 +3361,7 @@ public SyncPoller, Void> beginRedeploy( public Mono redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return beginRedeployAsync(resourceGroupName, vmScaleSetName, instanceId) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3538,7 +3381,7 @@ public Mono redeployAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { return beginRedeployAsync(resourceGroupName, vmScaleSetName, instanceId, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3662,6 +3505,7 @@ public Mono>> performMaintenanceWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .performMaintenance( this.client.getEndpoint(), @@ -3762,7 +3606,7 @@ public SyncPoller, Void> beginPerformMaintenance( public Mono performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return beginPerformMaintenanceAsync(resourceGroupName, vmScaleSetName, instanceId) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3782,7 +3626,7 @@ public Mono performMaintenanceAsync( String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { return beginPerformMaintenanceAsync(resourceGroupName, vmScaleSetName, instanceId, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3909,6 +3753,7 @@ public Mono> simulateEvictionWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .simulateEviction( this.client.getEndpoint(), @@ -4098,6 +3943,7 @@ public Mono>> runCommandWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .runCommand( this.client.getEndpoint(), @@ -4219,7 +4065,7 @@ public Mono runCommandAsync( String resourceGroupName, String vmScaleSetName, String instanceId, RunCommandInput parameters) { return beginRunCommandAsync(resourceGroupName, vmScaleSetName, instanceId, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4244,7 +4090,7 @@ public Mono runCommandAsync( Context context) { return beginRunCommandAsync(resourceGroupName, vmScaleSetName, instanceId, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4288,2083 +4134,6 @@ public RunCommandResultInner runCommand( return runCommandAsync(resourceGroupName, vmScaleSetName, instanceId, parameters, context).block(); } - /** - * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean tempDisk) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineReimageParameters vmScaleSetVMReimageInputInternal = null; - if (tempDisk != null) { - vmScaleSetVMReimageInputInternal = new VirtualMachineReimageParameters(); - vmScaleSetVMReimageInputInternal.withTempDisk(tempDisk); - } - VirtualMachineReimageParameters vmScaleSetVMReimageInput = vmScaleSetVMReimageInputInternal; - return FluxUtil - .withContext( - context -> - service - .beginReimageWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - vmScaleSetVMReimageInput, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean tempDisk, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineReimageParameters vmScaleSetVMReimageInputInternal = null; - if (tempDisk != null) { - vmScaleSetVMReimageInputInternal = new VirtualMachineReimageParameters(); - vmScaleSetVMReimageInputInternal.withTempDisk(tempDisk); - } - VirtualMachineReimageParameters vmScaleSetVMReimageInput = vmScaleSetVMReimageInputInternal; - return service - .beginReimageWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - vmScaleSetVMReimageInput, - context); - } - - /** - * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean tempDisk) { - return beginReimageWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, tempDisk) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean tempDisk, Context context) { - return beginReimageWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, tempDisk, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean tempDisk) { - beginReimageWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, tempDisk).block(); - } - - /** - * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean tempDisk, Context context) { - beginReimageWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, tempDisk, context).block(); - } - - /** - * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is - * only supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageAllWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginReimageAllWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is - * only supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageAllWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginReimageAllWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is - * only supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageAllWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageAllWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is - * only supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageAllWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - return beginReimageAllWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is - * only supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageAllWithoutPolling(String resourceGroupName, String vmScaleSetName, String instanceId) { - beginReimageAllWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId).block(); - } - - /** - * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is - * only supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageAllWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - beginReimageAllWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, context).block(); - } - - /** - * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute - * resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeallocateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeallocateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute - * resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeallocateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeallocateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute - * resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeallocateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeallocateWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute - * resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeallocateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - return beginDeallocateWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute - * resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeallocateWithoutPolling(String resourceGroupName, String vmScaleSetName, String instanceId) { - beginDeallocateWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId).block(); - } - - /** - * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute - * resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeallocateWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - beginDeallocateWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, context).block(); - } - - /** - * Updates a virtual machine of a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Describes a virtual machine scale set virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a virtual machine scale set virtual machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Updates a virtual machine of a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Describes a virtual machine scale set virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a virtual machine scale set virtual machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - VirtualMachineScaleSetVMInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Updates a virtual machine of a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Describes a virtual machine scale set virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a virtual machine scale set virtual machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a virtual machine of a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Describes a virtual machine scale set virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a virtual machine scale set virtual machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - VirtualMachineScaleSetVMInner parameters, - Context context) { - return beginUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a virtual machine of a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Describes a virtual machine scale set virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a virtual machine scale set virtual machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetVMInner beginUpdateWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, parameters).block(); - } - - /** - * Updates a virtual machine of a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Describes a virtual machine scale set virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a virtual machine scale set virtual machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetVMInner beginUpdateWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - VirtualMachineScaleSetVMInner parameters, - Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, parameters, context) - .block(); - } - - /** - * Deletes a virtual machine from a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deletes a virtual machine from a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Deletes a virtual machine from a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a virtual machine from a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a virtual machine from a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String vmScaleSetName, String instanceId) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId).block(); - } - - /** - * Deletes a virtual machine from a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, context).block(); - } - - /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPowerOffWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean skipShutdown) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginPowerOffWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - skipShutdown, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPowerOffWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean skipShutdown, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginPowerOffWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - skipShutdown, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPowerOffWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean skipShutdown) { - return beginPowerOffWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPowerOffWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean skipShutdown, Context context) { - return beginPowerOffWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, skipShutdown, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPowerOffWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - final Boolean skipShutdown = null; - final Context context = null; - return beginPowerOffWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPowerOffWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean skipShutdown) { - beginPowerOffWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown).block(); - } - - /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPowerOffWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Boolean skipShutdown, Context context) { - beginPowerOffWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown, context).block(); - } - - /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting - * charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPowerOffWithoutPolling(String resourceGroupName, String vmScaleSetName, String instanceId) { - final Boolean skipShutdown = null; - final Context context = null; - beginPowerOffWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown).block(); - } - - /** - * Restarts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginRestartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Restarts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginRestartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Restarts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestartWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRestartWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Restarts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestartWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - return beginRestartWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Restarts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestartWithoutPolling(String resourceGroupName, String vmScaleSetName, String instanceId) { - beginRestartWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId).block(); - } - - /** - * Restarts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestartWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - beginRestartWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, context).block(); - } - - /** - * Starts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginStartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Starts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginStartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Starts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginStartWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Starts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - return beginStartWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Starts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartWithoutPolling(String resourceGroupName, String vmScaleSetName, String instanceId) { - beginStartWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId).block(); - } - - /** - * Starts a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - beginStartWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, context).block(); - } - - /** - * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRedeployWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginRedeployWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRedeployWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginRedeployWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRedeployWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRedeployWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRedeployWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - return beginRedeployWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRedeployWithoutPolling(String resourceGroupName, String vmScaleSetName, String instanceId) { - beginRedeployWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId).block(); - } - - /** - * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRedeployWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - beginRedeployWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, context).block(); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPerformMaintenanceWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginPerformMaintenanceWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPerformMaintenanceWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginPerformMaintenanceWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPerformMaintenanceWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPerformMaintenanceWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPerformMaintenanceWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - return beginPerformMaintenanceWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPerformMaintenanceWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId) { - beginPerformMaintenanceWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId).block(); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPerformMaintenanceWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, Context context) { - beginPerformMaintenanceWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, context).block(); - } - - /** - * Run command on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRunCommandWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, RunCommandInput parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginRunCommandWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Run command on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRunCommandWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - RunCommandInput parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (instanceId == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginRunCommandWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - instanceId, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Run command on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRunCommandWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, String instanceId, RunCommandInput parameters) { - return beginRunCommandWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Run command on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRunCommandWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - RunCommandInput parameters, - Context context) { - return beginRunCommandWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceId, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Run command on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner beginRunCommandWithoutPolling( - String resourceGroupName, String vmScaleSetName, String instanceId, RunCommandInput parameters) { - return beginRunCommandWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, parameters).block(); - } - - /** - * Run command on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner beginRunCommandWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - String instanceId, - RunCommandInput parameters, - Context context) { - return beginRunCommandWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceId, parameters, context) - .block(); - } - /** * Get the next page of items. * @@ -6409,6 +4178,7 @@ public Mono> listNextSinglePageAsyn if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java index b07582bf262a..bf1687c26e29 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java @@ -43,7 +43,6 @@ import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineScaleSetListSkusResultInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineScaleSetListWithLinkResultInner; import com.azure.resourcemanager.compute.fluent.inner.VirtualMachineScaleSetSkuInner; -import com.azure.resourcemanager.compute.models.OrchestrationServiceStateAction; import com.azure.resourcemanager.compute.models.OrchestrationServiceStateInput; import com.azure.resourcemanager.compute.models.VMScaleSetConvertToSinglePlacementGroupInput; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetReimageParameters; @@ -409,216 +408,6 @@ Mono>> setOrchestrationServiceState( @BodyParam("application/json") OrchestrationServiceStateInput parameters, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetInner parameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetUpdate parameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/deallocate") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeallocateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/delete") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteInstancesWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/poweroff") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginPowerOffWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("skipShutdown") Boolean skipShutdown, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/restart") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRestartWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/start") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginStartWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/redeploy") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRedeployWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginPerformMaintenanceWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateInstancesWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/reimage") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginReimageWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/reimageall") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginReimageAllWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginSetOrchestrationServiceStateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmScaleSetName") String vmScaleSetName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") OrchestrationServiceStateInput parameters, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -742,6 +531,7 @@ public Mono>> createOrUpdateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -855,7 +645,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, vmScaleSetName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -875,7 +665,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, vmScaleSetName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1007,6 +797,7 @@ public Mono>> updateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -1119,7 +910,7 @@ public Mono updateAsync( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return beginUpdateAsync(resourceGroupName, vmScaleSetName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1139,7 +930,7 @@ public Mono updateAsync( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, Context context) { return beginUpdateAsync(resourceGroupName, vmScaleSetName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1257,6 +1048,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1345,7 +1137,9 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String vmScaleSetName) { - return beginDeleteAsync(resourceGroupName, vmScaleSetName).last().flatMap(client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, vmScaleSetName) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1363,7 +1157,7 @@ public Mono deleteAsync(String resourceGroupName, String vmScaleSetName) { public Mono deleteAsync(String resourceGroupName, String vmScaleSetName, Context context) { return beginDeleteAsync(resourceGroupName, vmScaleSetName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1476,6 +1270,7 @@ public Mono> getByResourceGroupWithRespons "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -1666,6 +1461,7 @@ public Mono>> deallocateWithResponseAsync( vmInstanceIDsInternal.withInstanceIds(instanceIds); } VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; + context = this.client.mergeContext(context); return service .deallocate( this.client.getEndpoint(), @@ -1776,7 +1572,7 @@ public SyncPoller, Void> beginDeallocate( public Mono deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { return beginDeallocateAsync(resourceGroupName, vmScaleSetName, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1798,7 +1594,7 @@ public Mono deallocateAsync( String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { return beginDeallocateAsync(resourceGroupName, vmScaleSetName, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1930,6 +1726,7 @@ public Mono>> deleteInstancesWithResponseAsync( final String apiVersion = "2019-12-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); + context = this.client.mergeContext(context); return service .deleteInstances( this.client.getEndpoint(), @@ -2030,7 +1827,7 @@ public SyncPoller, Void> beginDeleteInstances( public Mono deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { return beginDeleteInstancesAsync(resourceGroupName, vmScaleSetName, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2050,7 +1847,7 @@ public Mono deleteInstancesAsync( String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { return beginDeleteInstancesAsync(resourceGroupName, vmScaleSetName, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2166,6 +1963,7 @@ public Mono> getInstanceViewWi "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getInstanceView( this.client.getEndpoint(), @@ -2338,6 +2136,7 @@ public Mono> listByResourceGroupSingl "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), context) @@ -2479,6 +2278,7 @@ public Mono> listSinglePageAsync(Cont "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), context) .map( @@ -2646,6 +2446,7 @@ public Mono> listSkusSinglePageAsy "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listSkus( this.client.getEndpoint(), @@ -2831,6 +2632,7 @@ public Mono> getOSUpgra "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getOSUpgradeHistory( this.client.getEndpoint(), @@ -3031,6 +2833,7 @@ public Mono>> powerOffWithResponseAsync( vmInstanceIDsInternal.withInstanceIds(instanceIds); } VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; + context = this.client.mergeContext(context); return service .powerOff( this.client.getEndpoint(), @@ -3167,7 +2970,7 @@ public Mono powerOffAsync( String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List instanceIds) { return beginPowerOffAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3196,7 +2999,7 @@ public Mono powerOffAsync( Context context) { return beginPowerOffAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3344,6 +3147,7 @@ public Mono>> restartWithResponseAsync( vmInstanceIDsInternal.withInstanceIds(instanceIds); } VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; + context = this.client.mergeContext(context); return service .restart( this.client.getEndpoint(), @@ -3449,7 +3253,7 @@ public SyncPoller, Void> beginRestart( public Mono restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { return beginRestartAsync(resourceGroupName, vmScaleSetName, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3470,7 +3274,7 @@ public Mono restartAsync( String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { return beginRestartAsync(resourceGroupName, vmScaleSetName, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3604,6 +3408,7 @@ public Mono>> startWithResponseAsync( vmInstanceIDsInternal.withInstanceIds(instanceIds); } VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; + context = this.client.mergeContext(context); return service .start( this.client.getEndpoint(), @@ -3708,7 +3513,7 @@ public SyncPoller, Void> beginStart( public Mono startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { return beginStartAsync(resourceGroupName, vmScaleSetName, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3729,7 +3534,7 @@ public Mono startAsync( String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { return beginStartAsync(resourceGroupName, vmScaleSetName, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3865,6 +3670,7 @@ public Mono>> redeployWithResponseAsync( vmInstanceIDsInternal.withInstanceIds(instanceIds); } VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; + context = this.client.mergeContext(context); return service .redeploy( this.client.getEndpoint(), @@ -3975,7 +3781,7 @@ public SyncPoller, Void> beginRedeploy( public Mono redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { return beginRedeployAsync(resourceGroupName, vmScaleSetName, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3997,7 +3803,7 @@ public Mono redeployAsync( String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { return beginRedeployAsync(resourceGroupName, vmScaleSetName, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4137,6 +3943,7 @@ public Mono>> performMaintenanceWithResponseAsync( vmInstanceIDsInternal.withInstanceIds(instanceIds); } VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; + context = this.client.mergeContext(context); return service .performMaintenance( this.client.getEndpoint(), @@ -4253,7 +4060,7 @@ public Mono performMaintenanceAsync( String resourceGroupName, String vmScaleSetName, List instanceIds) { return beginPerformMaintenanceAsync(resourceGroupName, vmScaleSetName, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4276,7 +4083,7 @@ public Mono performMaintenanceAsync( String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { return beginPerformMaintenanceAsync(resourceGroupName, vmScaleSetName, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4411,6 +4218,7 @@ public Mono>> updateInstancesWithResponseAsync( final String apiVersion = "2019-12-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); + context = this.client.mergeContext(context); return service .updateInstances( this.client.getEndpoint(), @@ -4511,7 +4319,7 @@ public SyncPoller, Void> beginUpdateInstances( public Mono updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { return beginUpdateInstancesAsync(resourceGroupName, vmScaleSetName, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4531,7 +4339,7 @@ public Mono updateInstancesAsync( String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { return beginUpdateInstancesAsync(resourceGroupName, vmScaleSetName, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4665,6 +4473,7 @@ public Mono>> reimageWithResponseAsync( vmScaleSetReimageInput.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .reimage( this.client.getEndpoint(), @@ -4788,7 +4597,7 @@ public Mono reimageAsync( VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { return beginReimageAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4813,7 +4622,7 @@ public Mono reimageAsync( Context context) { return beginReimageAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4834,7 +4643,7 @@ public Mono reimageAsync(String resourceGroupName, String vmScaleSetName) final Context context = null; return beginReimageAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4997,6 +4806,7 @@ public Mono>> reimageAllWithResponseAsync( vmInstanceIDsInternal.withInstanceIds(instanceIds); } VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; + context = this.client.mergeContext(context); return service .reimageAll( this.client.getEndpoint(), @@ -5107,7 +4917,7 @@ public SyncPoller, Void> beginReimageAll( public Mono reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { return beginReimageAllAsync(resourceGroupName, vmScaleSetName, instanceIds) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5129,7 +4939,7 @@ public Mono reimageAllAsync( String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { return beginReimageAllAsync(resourceGroupName, vmScaleSetName, instanceIds, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5253,6 +5063,7 @@ public void reimageAll(String resourceGroupName, String vmScaleSetName, List> convertToSinglePlacementGroupWithResponseAsync( final String apiVersion = "2019-12-01"; VMScaleSetConvertToSinglePlacementGroupInput parameters = new VMScaleSetConvertToSinglePlacementGroupInput(); parameters.withActivePlacementGroupId(activePlacementGroupId); + context = this.client.mergeContext(context); return service .convertToSinglePlacementGroup( this.client.getEndpoint(), @@ -5543,7 +5355,7 @@ public void convertToSinglePlacementGroup( * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5551,7 +5363,7 @@ public void convertToSinglePlacementGroup( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> setOrchestrationServiceStateWithResponseAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -5571,12 +5383,12 @@ public Mono>> setOrchestrationServiceStateWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (action == null) { - return Mono.error(new IllegalArgumentException("Parameter action is required and cannot be null.")); + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } final String apiVersion = "2019-12-01"; - OrchestrationServiceStateInput parameters = new OrchestrationServiceStateInput(); - parameters.withAction(action); return FluxUtil .withContext( context -> @@ -5597,7 +5409,7 @@ public Mono>> setOrchestrationServiceStateWithResponse * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5606,7 +5418,7 @@ public Mono>> setOrchestrationServiceStateWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> setOrchestrationServiceStateWithResponseAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, Context context) { + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -5626,12 +5438,13 @@ public Mono>> setOrchestrationServiceStateWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (action == null) { - return Mono.error(new IllegalArgumentException("Parameter action is required and cannot be null.")); + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } final String apiVersion = "2019-12-01"; - OrchestrationServiceStateInput parameters = new OrchestrationServiceStateInput(); - parameters.withAction(action); + context = this.client.mergeContext(context); return service .setOrchestrationServiceState( this.client.getEndpoint(), @@ -5648,7 +5461,7 @@ public Mono>> setOrchestrationServiceStateWithResponse * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5656,9 +5469,9 @@ public Mono>> setOrchestrationServiceStateWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux, Void> beginSetOrchestrationServiceStateAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters) { Mono>> mono = - setOrchestrationServiceStateWithResponseAsync(resourceGroupName, vmScaleSetName, action); + setOrchestrationServiceStateWithResponseAsync(resourceGroupName, vmScaleSetName, parameters); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } @@ -5667,7 +5480,7 @@ public PollerFlux, Void> beginSetOrchestrationServiceStateAsync * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5676,9 +5489,9 @@ public PollerFlux, Void> beginSetOrchestrationServiceStateAsync */ @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux, Void> beginSetOrchestrationServiceStateAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, Context context) { + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters, Context context) { Mono>> mono = - setOrchestrationServiceStateWithResponseAsync(resourceGroupName, vmScaleSetName, action, context); + setOrchestrationServiceStateWithResponseAsync(resourceGroupName, vmScaleSetName, parameters, context); return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); } @@ -5687,7 +5500,7 @@ public PollerFlux, Void> beginSetOrchestrationServiceStateAsync * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5695,8 +5508,8 @@ public PollerFlux, Void> beginSetOrchestrationServiceStateAsync */ @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller, Void> beginSetOrchestrationServiceState( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { - return beginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action).getSyncPoller(); + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters) { + return beginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters).getSyncPoller(); } /** @@ -5704,7 +5517,7 @@ public SyncPoller, Void> beginSetOrchestrationServiceState( * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5713,8 +5526,8 @@ public SyncPoller, Void> beginSetOrchestrationServiceState( */ @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller, Void> beginSetOrchestrationServiceState( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, Context context) { - return beginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action, context) + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters, Context context) { + return beginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters, context) .getSyncPoller(); } @@ -5723,7 +5536,7 @@ public SyncPoller, Void> beginSetOrchestrationServiceState( * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5731,10 +5544,10 @@ public SyncPoller, Void> beginSetOrchestrationServiceState( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setOrchestrationServiceStateAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { - return beginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action) + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters) { + return beginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5742,7 +5555,7 @@ public Mono setOrchestrationServiceStateAsync( * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5751,10 +5564,10 @@ public Mono setOrchestrationServiceStateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setOrchestrationServiceStateAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, Context context) { - return beginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action, context) + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters, Context context) { + return beginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5762,15 +5575,15 @@ public Mono setOrchestrationServiceStateAsync( * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) public void setOrchestrationServiceState( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { - setOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action).block(); + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters) { + setOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters).block(); } /** @@ -5778,7 +5591,7 @@ public void setOrchestrationServiceState( * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. + * @param parameters The input for OrchestrationServiceState. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5786,2660 +5599,8 @@ public void setOrchestrationServiceState( */ @ServiceMethod(returns = ReturnType.SINGLE) public void setOrchestrationServiceState( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, Context context) { - setOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action, context).block(); - } - - /** - * Create or update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Create or update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Create or update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, vmScaleSetName, parameters).block(); - } - - /** - * Create or update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, vmScaleSetName, parameters, context).block(); - } - - /** - * Update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, Context context) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetInner beginUpdateWithoutPolling( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmScaleSetName, parameters).block(); - } - - /** - * Update a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters Describes a Virtual Machine Scale Set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine Scale Set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineScaleSetInner beginUpdateWithoutPolling( - String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmScaleSetName, parameters, context).block(); - } - - /** - * Deletes a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deletes a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Deletes a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String vmScaleSetName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String vmScaleSetName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String vmScaleSetName) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmScaleSetName).block(); - } - - /** - * Deletes a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String vmScaleSetName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmScaleSetName, context).block(); - } - - /** - * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute - * resources. You are not billed for the compute resources that this virtual machine scale set deallocates. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeallocateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return FluxUtil - .withContext( - context -> - service - .beginDeallocateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute - * resources. You are not billed for the compute resources that this virtual machine scale set deallocates. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeallocateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return service - .beginDeallocateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute - * resources. You are not billed for the compute resources that this virtual machine scale set deallocates. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeallocateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeallocateWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute - * resources. You are not billed for the compute resources that this virtual machine scale set deallocates. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeallocateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - return beginDeallocateWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute - * resources. You are not billed for the compute resources that this virtual machine scale set deallocates. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeallocateWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - beginDeallocateWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds).block(); - } - - /** - * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute - * resources. You are not billed for the compute resources that this virtual machine scale set deallocates. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeallocateWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - beginDeallocateWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds, context).block(); - } - - /** - * Deletes virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteInstancesWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (instanceIds == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceIds is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - return FluxUtil - .withContext( - context -> - service - .beginDeleteInstancesWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Deletes virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteInstancesWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (instanceIds == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceIds is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - return service - .beginDeleteInstancesWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Deletes virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteInstancesWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeleteInstancesWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteInstancesWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - return beginDeleteInstancesWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteInstancesWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - beginDeleteInstancesWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds).block(); - } - - /** - * Deletes virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteInstancesWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - beginDeleteInstancesWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds, context).block(); - } - - /** - * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you - * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPowerOffWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return FluxUtil - .withContext( - context -> - service - .beginPowerOffWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - skipShutdown, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you - * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPowerOffWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - Boolean skipShutdown, - List instanceIds, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return service - .beginPowerOffWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - skipShutdown, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you - * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPowerOffWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List instanceIds) { - return beginPowerOffWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, skipShutdown, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you - * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPowerOffWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - Boolean skipShutdown, - List instanceIds, - Context context) { - return beginPowerOffWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, skipShutdown, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you - * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPowerOffWithoutPolling( - String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List instanceIds) { - beginPowerOffWithoutPollingAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds).block(); - } - - /** - * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you - * are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPowerOffWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - Boolean skipShutdown, - List instanceIds, - Context context) { - beginPowerOffWithoutPollingAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds, context).block(); - } - - /** - * Restarts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return FluxUtil - .withContext( - context -> - service - .beginRestartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Restarts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return service - .beginRestartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Restarts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestartWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRestartWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Restarts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestartWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - return beginRestartWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Restarts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestartWithoutPolling(String resourceGroupName, String vmScaleSetName, List instanceIds) { - beginRestartWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds).block(); - } - - /** - * Restarts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestartWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - beginRestartWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds, context).block(); - } - - /** - * Starts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return FluxUtil - .withContext( - context -> - service - .beginStartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Starts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return service - .beginStartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Starts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginStartWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Starts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - return beginStartWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Starts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartWithoutPolling(String resourceGroupName, String vmScaleSetName, List instanceIds) { - beginStartWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds).block(); - } - - /** - * Starts one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - beginStartWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds, context).block(); - } - - /** - * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them - * back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRedeployWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return FluxUtil - .withContext( - context -> - service - .beginRedeployWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them - * back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRedeployWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return service - .beginRedeployWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them - * back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRedeployWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRedeployWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them - * back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRedeployWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - return beginRedeployWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them - * back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRedeployWithoutPolling(String resourceGroupName, String vmScaleSetName, List instanceIds) { - beginRedeployWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds).block(); - } - - /** - * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them - * back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRedeployWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - beginRedeployWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds, context).block(); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not - * eligible for perform maintenance will be failed. Please refer to best practices for more details: - * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPerformMaintenanceWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return FluxUtil - .withContext( - context -> - service - .beginPerformMaintenanceWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not - * eligible for perform maintenance will be failed. Please refer to best practices for more details: - * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPerformMaintenanceWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return service - .beginPerformMaintenanceWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not - * eligible for perform maintenance will be failed. Please refer to best practices for more details: - * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPerformMaintenanceWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginPerformMaintenanceWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not - * eligible for perform maintenance will be failed. Please refer to best practices for more details: - * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPerformMaintenanceWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - return beginPerformMaintenanceWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not - * eligible for perform maintenance will be failed. Please refer to best practices for more details: - * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPerformMaintenanceWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - beginPerformMaintenanceWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds).block(); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not - * eligible for perform maintenance will be failed. Please refer to best practices for more details: - * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPerformMaintenanceWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - beginPerformMaintenanceWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds, context).block(); - } - - /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateInstancesWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (instanceIds == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceIds is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - return FluxUtil - .withContext( - context -> - service - .beginUpdateInstancesWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateInstancesWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (instanceIds == null) { - return Mono.error(new IllegalArgumentException("Parameter instanceIds is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - return service - .beginUpdateInstancesWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateInstancesWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateInstancesWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - return beginUpdateInstancesWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginUpdateInstancesWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - beginUpdateInstancesWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds).block(); - } - - /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginUpdateInstancesWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - beginUpdateInstancesWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds, context).block(); - } - - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a - * ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial - * state. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param vmScaleSetReimageInput Describes a Virtual Machine Scale Set VM Reimage Parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (vmScaleSetReimageInput != null) { - vmScaleSetReimageInput.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginReimageWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmScaleSetReimageInput, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a - * ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial - * state. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param vmScaleSetReimageInput Describes a Virtual Machine Scale Set VM Reimage Parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageWithoutPollingWithResponseAsync( - String resourceGroupName, - String vmScaleSetName, - VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (vmScaleSetReimageInput != null) { - vmScaleSetReimageInput.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginReimageWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmScaleSetReimageInput, - context); - } - - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a - * ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial - * state. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param vmScaleSetReimageInput Describes a Virtual Machine Scale Set VM Reimage Parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { - return beginReimageWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a - * ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial - * state. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param vmScaleSetReimageInput Describes a Virtual Machine Scale Set VM Reimage Parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageWithoutPollingAsync( - String resourceGroupName, - String vmScaleSetName, - VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput, - Context context) { - return beginReimageWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, vmScaleSetReimageInput, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a - * ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial - * state. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageWithoutPollingAsync(String resourceGroupName, String vmScaleSetName) { - final VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput = null; - final Context context = null; - return beginReimageWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a - * ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial - * state. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param vmScaleSetReimageInput Describes a Virtual Machine Scale Set VM Reimage Parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { - beginReimageWithoutPollingAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput).block(); - } - - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a - * ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial - * state. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param vmScaleSetReimageInput Describes a Virtual Machine Scale Set VM Reimage Parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageWithoutPolling( - String resourceGroupName, - String vmScaleSetName, - VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput, - Context context) { - beginReimageWithoutPollingAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput, context).block(); - } - - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a - * ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial - * state. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageWithoutPolling(String resourceGroupName, String vmScaleSetName) { - final VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput = null; - final Context context = null; - beginReimageWithoutPollingAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput).block(); - } - - /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only - * supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageAllWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return FluxUtil - .withContext( - context -> - service - .beginReimageAllWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only - * supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageAllWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDsInternal = null; - if (instanceIds != null) { - vmInstanceIDsInternal = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDsInternal.withInstanceIds(instanceIds); - } - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = vmInstanceIDsInternal; - return service - .beginReimageAllWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - vmInstanceIDs, - context); - } - - /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only - * supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageAllWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginReimageAllWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only - * supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageAllWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - return beginReimageAllWithoutPollingWithResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only - * supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageAllWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds) { - beginReimageAllWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds).block(); - } - - /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only - * supported for managed disks. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageAllWithoutPolling( - String resourceGroupName, String vmScaleSetName, List instanceIds, Context context) { - beginReimageAllWithoutPollingAsync(resourceGroupName, vmScaleSetName, instanceIds, context).block(); - } - - /** - * Changes ServiceState property for a given service. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginSetOrchestrationServiceStateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (action == null) { - return Mono.error(new IllegalArgumentException("Parameter action is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - OrchestrationServiceStateInput parameters = new OrchestrationServiceStateInput(); - parameters.withAction(action); - return FluxUtil - .withContext( - context -> - service - .beginSetOrchestrationServiceStateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Changes ServiceState property for a given service. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginSetOrchestrationServiceStateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmScaleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (action == null) { - return Mono.error(new IllegalArgumentException("Parameter action is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - OrchestrationServiceStateInput parameters = new OrchestrationServiceStateInput(); - parameters.withAction(action); - return service - .beginSetOrchestrationServiceStateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmScaleSetName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Changes ServiceState property for a given service. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginSetOrchestrationServiceStateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { - return beginSetOrchestrationServiceStateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, action) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Changes ServiceState property for a given service. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginSetOrchestrationServiceStateWithoutPollingAsync( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, Context context) { - return beginSetOrchestrationServiceStateWithoutPollingWithResponseAsync( - resourceGroupName, vmScaleSetName, action, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Changes ServiceState property for a given service. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginSetOrchestrationServiceStateWithoutPolling( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { - beginSetOrchestrationServiceStateWithoutPollingAsync(resourceGroupName, vmScaleSetName, action).block(); - } - - /** - * Changes ServiceState property for a given service. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param action The action to be performed. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginSetOrchestrationServiceStateWithoutPolling( - String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, Context context) { - beginSetOrchestrationServiceStateWithoutPollingAsync(resourceGroupName, vmScaleSetName, action, context) - .block(); + String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateInput parameters, Context context) { + setOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters, context).block(); } /** @@ -8485,6 +5646,7 @@ public Mono> listNextSinglePageAsync( if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -8542,6 +5704,7 @@ public Mono> listAllNextSinglePageAsy if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listAllNext(nextLink, context) .map( @@ -8599,6 +5762,7 @@ public Mono> listSkusNextSinglePag if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listSkusNext(nextLink, context) .map( @@ -8657,6 +5821,7 @@ public Mono> getOSUpgra if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .getOSUpgradeHistoryNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java index 22de99921877..97e76a35af88 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java @@ -140,6 +140,7 @@ public Mono> listSinglePageAsync(String l "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java index 1f12644b7d6f..0ae685fea879 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java @@ -393,208 +393,6 @@ Mono>> runCommand( @BodyParam("application/json") RunCommandInput parameters, Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/capture") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCaptureWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineCaptureParameters parameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginCreateOrUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineInner parameters, - Context context); - - @Headers({"Accept: application/json", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginUpdateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineUpdateInner parameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeleteWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/convertToManagedDisks") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginConvertToManagedDisksWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/deallocate") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginDeallocateWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/powerOff") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginPowerOffWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("skipShutdown") Boolean skipShutdown, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/reapply") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono> beginReapplyWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/restart") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRestartWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/start") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginStartWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/redeploy") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRedeployWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/reimage") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginReimageWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") VirtualMachineReimageParameters parameters, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/performMaintenance") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginPerformMaintenanceWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - Context context); - - @Headers({"Accept: application/json,text/json", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute" - + "/virtualMachines/{vmName}/runCommand") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> beginRunCommandWithoutPolling( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vmName") String vmName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") RunCommandInput parameters, - Context context); - @Headers({"Accept: application/json", "Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -690,6 +488,7 @@ public Mono> listByLocationSinglePageAsync(St "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByLocation(this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), context) .map( @@ -860,6 +659,7 @@ public Mono>> captureWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .capture( this.client.getEndpoint(), @@ -977,7 +777,7 @@ public Mono captureAsync( String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return beginCaptureAsync(resourceGroupName, vmName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -998,7 +798,7 @@ public Mono captureAsync( String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, Context context) { return beginCaptureAsync(resourceGroupName, vmName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1134,6 +934,7 @@ public Mono>> createOrUpdateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), @@ -1245,7 +1046,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String vmName, VirtualMachineInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, vmName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1266,7 +1067,7 @@ public Mono createOrUpdateAsync( String resourceGroupName, String vmName, VirtualMachineInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, vmName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1399,6 +1200,7 @@ public Mono>> updateWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), @@ -1504,7 +1306,7 @@ public Mono updateAsync( String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { return beginUpdateAsync(resourceGroupName, vmName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1524,7 +1326,7 @@ public Mono updateAsync( String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, Context context) { return beginUpdateAsync(resourceGroupName, vmName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1641,6 +1443,7 @@ public Mono>> deleteWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), @@ -1728,7 +1531,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String vmName) { - return beginDeleteAsync(resourceGroupName, vmName).last().flatMap(client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, vmName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -1744,7 +1547,9 @@ public Mono deleteAsync(String resourceGroupName, String vmName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String vmName, Context context) { - return beginDeleteAsync(resourceGroupName, vmName, context).last().flatMap(client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, vmName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1860,6 +1665,7 @@ public Mono> getByResourceGroupWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .getByResourceGroup( this.client.getEndpoint(), @@ -2079,6 +1885,7 @@ public Mono> instanceViewWithResponseA "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .instanceView( this.client.getEndpoint(), @@ -2251,6 +2058,7 @@ public Mono>> convertToManagedDisksWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .convertToManagedDisks( this.client.getEndpoint(), @@ -2347,7 +2155,7 @@ public SyncPoller, Void> beginConvertToManagedDisks( public Mono convertToManagedDisksAsync(String resourceGroupName, String vmName) { return beginConvertToManagedDisksAsync(resourceGroupName, vmName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2366,7 +2174,7 @@ public Mono convertToManagedDisksAsync(String resourceGroupName, String vm public Mono convertToManagedDisksAsync(String resourceGroupName, String vmName, Context context) { return beginConvertToManagedDisksAsync(resourceGroupName, vmName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2482,6 +2290,7 @@ public Mono>> deallocateWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .deallocate( this.client.getEndpoint(), @@ -2575,7 +2384,7 @@ public SyncPoller, Void> beginDeallocate( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deallocateAsync(String resourceGroupName, String vmName) { - return beginDeallocateAsync(resourceGroupName, vmName).last().flatMap(client::getLroFinalResultOrError); + return beginDeallocateAsync(resourceGroupName, vmName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -2594,7 +2403,7 @@ public Mono deallocateAsync(String resourceGroupName, String vmName) { public Mono deallocateAsync(String resourceGroupName, String vmName, Context context) { return beginDeallocateAsync(resourceGroupName, vmName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2715,6 +2524,7 @@ public Mono> generalizeWithResponseAsync(String resourceGroupName "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .generalize( this.client.getEndpoint(), @@ -2884,6 +2694,7 @@ public Mono> listByResourceGroupSinglePageAsy "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), context) @@ -3036,6 +2847,7 @@ public Mono> listSinglePageAsync(String statu "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), statusOnly, context) .map( @@ -3227,6 +3039,7 @@ public Mono> listAvailableSizesSinglePage "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .listAvailableSizes( this.client.getEndpoint(), @@ -3395,6 +3208,7 @@ public Mono>> powerOffWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .powerOff( this.client.getEndpoint(), @@ -3509,7 +3323,7 @@ public SyncPoller, Void> beginPowerOff( public Mono powerOffAsync(String resourceGroupName, String vmName, Boolean skipShutdown) { return beginPowerOffAsync(resourceGroupName, vmName, skipShutdown) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3531,7 +3345,7 @@ public Mono powerOffAsync(String resourceGroupName, String vmName, Boolean public Mono powerOffAsync(String resourceGroupName, String vmName, Boolean skipShutdown, Context context) { return beginPowerOffAsync(resourceGroupName, vmName, skipShutdown, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3551,7 +3365,7 @@ public Mono powerOffAsync(String resourceGroupName, String vmName) { final Context context = null; return beginPowerOffAsync(resourceGroupName, vmName, skipShutdown) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3688,6 +3502,7 @@ public Mono>> reapplyWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .reapply( this.client.getEndpoint(), @@ -3775,7 +3590,7 @@ public SyncPoller, Void> beginReapply(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono reapplyAsync(String resourceGroupName, String vmName) { - return beginReapplyAsync(resourceGroupName, vmName).last().flatMap(client::getLroFinalResultOrError); + return beginReapplyAsync(resourceGroupName, vmName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -3791,7 +3606,9 @@ public Mono reapplyAsync(String resourceGroupName, String vmName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono reapplyAsync(String resourceGroupName, String vmName, Context context) { - return beginReapplyAsync(resourceGroupName, vmName, context).last().flatMap(client::getLroFinalResultOrError); + return beginReapplyAsync(resourceGroupName, vmName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -3903,6 +3720,7 @@ public Mono>> restartWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .restart( this.client.getEndpoint(), @@ -3990,7 +3808,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono restartAsync(String resourceGroupName, String vmName) { - return beginRestartAsync(resourceGroupName, vmName).last().flatMap(client::getLroFinalResultOrError); + return beginRestartAsync(resourceGroupName, vmName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -4006,7 +3824,9 @@ public Mono restartAsync(String resourceGroupName, String vmName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono restartAsync(String resourceGroupName, String vmName, Context context) { - return beginRestartAsync(resourceGroupName, vmName, context).last().flatMap(client::getLroFinalResultOrError); + return beginRestartAsync(resourceGroupName, vmName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4118,6 +3938,7 @@ public Mono>> startWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .start( this.client.getEndpoint(), @@ -4205,7 +4026,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono startAsync(String resourceGroupName, String vmName) { - return beginStartAsync(resourceGroupName, vmName).last().flatMap(client::getLroFinalResultOrError); + return beginStartAsync(resourceGroupName, vmName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -4221,7 +4042,9 @@ public Mono startAsync(String resourceGroupName, String vmName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono startAsync(String resourceGroupName, String vmName, Context context) { - return beginStartAsync(resourceGroupName, vmName, context).last().flatMap(client::getLroFinalResultOrError); + return beginStartAsync(resourceGroupName, vmName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4333,6 +4156,7 @@ public Mono>> redeployWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .redeploy( this.client.getEndpoint(), @@ -4420,7 +4244,7 @@ public SyncPoller, Void> beginRedeploy(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono redeployAsync(String resourceGroupName, String vmName) { - return beginRedeployAsync(resourceGroupName, vmName).last().flatMap(client::getLroFinalResultOrError); + return beginRedeployAsync(resourceGroupName, vmName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -4436,7 +4260,9 @@ public Mono redeployAsync(String resourceGroupName, String vmName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono redeployAsync(String resourceGroupName, String vmName, Context context) { - return beginRedeployAsync(resourceGroupName, vmName, context).last().flatMap(client::getLroFinalResultOrError); + return beginRedeployAsync(resourceGroupName, vmName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4566,6 +4392,7 @@ public Mono>> reimageWithResponseAsync( parametersInternal.withTempDisk(tempDisk); } VirtualMachineReimageParameters parameters = parametersInternal; + context = this.client.mergeContext(context); return service .reimage( this.client.getEndpoint(), @@ -4666,7 +4493,9 @@ public SyncPoller, Void> beginReimage( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono reimageAsync(String resourceGroupName, String vmName, Boolean tempDisk) { - return beginReimageAsync(resourceGroupName, vmName, tempDisk).last().flatMap(client::getLroFinalResultOrError); + return beginReimageAsync(resourceGroupName, vmName, tempDisk) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4686,7 +4515,7 @@ public Mono reimageAsync(String resourceGroupName, String vmName, Boolean public Mono reimageAsync(String resourceGroupName, String vmName, Boolean tempDisk, Context context) { return beginReimageAsync(resourceGroupName, vmName, tempDisk, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4803,6 +4632,7 @@ public Mono>> performMaintenanceWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .performMaintenance( this.client.getEndpoint(), @@ -4893,7 +4723,7 @@ public SyncPoller, Void> beginPerformMaintenance( public Mono performMaintenanceAsync(String resourceGroupName, String vmName) { return beginPerformMaintenanceAsync(resourceGroupName, vmName) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -4911,7 +4741,7 @@ public Mono performMaintenanceAsync(String resourceGroupName, String vmNam public Mono performMaintenanceAsync(String resourceGroupName, String vmName, Context context) { return beginPerformMaintenanceAsync(resourceGroupName, vmName, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5025,6 +4855,7 @@ public Mono> simulateEvictionWithResponseAsync( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .simulateEviction( this.client.getEndpoint(), @@ -5195,6 +5026,7 @@ public Mono>> runCommandWithResponseAsync( parameters.validate(); } final String apiVersion = "2019-12-01"; + context = this.client.mergeContext(context); return service .runCommand( this.client.getEndpoint(), @@ -5301,7 +5133,7 @@ public Mono runCommandAsync( String resourceGroupName, String vmName, RunCommandInput parameters) { return beginRunCommandAsync(resourceGroupName, vmName, parameters) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5321,7 +5153,7 @@ public Mono runCommandAsync( String resourceGroupName, String vmName, RunCommandInput parameters, Context context) { return beginRunCommandAsync(resourceGroupName, vmName, parameters, context) .last() - .flatMap(client::getLroFinalResultOrError); + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5358,2412 +5190,6 @@ public RunCommandResultInner runCommand( return runCommandAsync(resourceGroupName, vmName, parameters, context).block(); } - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar - * VMs. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCaptureWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCaptureWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar - * VMs. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCaptureWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCaptureWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar - * VMs. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCaptureWithoutPollingAsync( - String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { - return beginCaptureWithoutPollingWithResponseAsync(resourceGroupName, vmName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar - * VMs. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCaptureWithoutPollingAsync( - String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, Context context) { - return beginCaptureWithoutPollingWithResponseAsync(resourceGroupName, vmName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar - * VMs. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineCaptureResultInner beginCaptureWithoutPolling( - String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { - return beginCaptureWithoutPollingAsync(resourceGroupName, vmName, parameters).block(); - } - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar - * VMs. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineCaptureResultInner beginCaptureWithoutPolling( - String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, Context context) { - return beginCaptureWithoutPollingAsync(resourceGroupName, vmName, parameters, context).block(); - } - - /** - * The operation to create or update a virtual machine. Please note some properties can be set only during virtual - * machine creation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, VirtualMachineInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to create or update a virtual machine. Please note some properties can be set only during virtual - * machine creation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginCreateOrUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, VirtualMachineInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginCreateOrUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * The operation to create or update a virtual machine. Please note some properties can be set only during virtual - * machine creation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String vmName, VirtualMachineInner parameters) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, vmName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to create or update a virtual machine. Please note some properties can be set only during virtual - * machine creation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginCreateOrUpdateWithoutPollingAsync( - String resourceGroupName, String vmName, VirtualMachineInner parameters, Context context) { - return beginCreateOrUpdateWithoutPollingWithResponseAsync(resourceGroupName, vmName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to create or update a virtual machine. Please note some properties can be set only during virtual - * machine creation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String vmName, VirtualMachineInner parameters) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, vmName, parameters).block(); - } - - /** - * The operation to create or update a virtual machine. Please note some properties can be set only during virtual - * machine creation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner beginCreateOrUpdateWithoutPolling( - String resourceGroupName, String vmName, VirtualMachineInner parameters, Context context) { - return beginCreateOrUpdateWithoutPollingAsync(resourceGroupName, vmName, parameters, context).block(); - } - - /** - * The operation to update a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine Update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to update a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine Update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginUpdateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginUpdateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * The operation to update a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine Update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, vmName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to update a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine Update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginUpdateWithoutPollingAsync( - String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, Context context) { - return beginUpdateWithoutPollingWithResponseAsync(resourceGroupName, vmName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * The operation to update a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine Update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner beginUpdateWithoutPolling( - String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmName, parameters).block(); - } - - /** - * The operation to update a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Describes a Virtual Machine Update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Virtual Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner beginUpdateWithoutPolling( - String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, Context context) { - return beginUpdateWithoutPollingAsync(resourceGroupName, vmName, parameters, context).block(); - } - - /** - * The operation to delete a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync(String resourceGroupName, String vmName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to delete a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeleteWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeleteWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to delete a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String vmName) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to delete a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeleteWithoutPollingAsync(String resourceGroupName, String vmName, Context context) { - return beginDeleteWithoutPollingWithResponseAsync(resourceGroupName, vmName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to delete a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String vmName) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmName).block(); - } - - /** - * The operation to delete a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeleteWithoutPolling(String resourceGroupName, String vmName, Context context) { - beginDeleteWithoutPollingAsync(resourceGroupName, vmName, context).block(); - } - - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before - * invoking this operation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginConvertToManagedDisksWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginConvertToManagedDisksWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before - * invoking this operation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginConvertToManagedDisksWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginConvertToManagedDisksWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before - * invoking this operation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginConvertToManagedDisksWithoutPollingAsync(String resourceGroupName, String vmName) { - return beginConvertToManagedDisksWithoutPollingWithResponseAsync(resourceGroupName, vmName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before - * invoking this operation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginConvertToManagedDisksWithoutPollingAsync( - String resourceGroupName, String vmName, Context context) { - return beginConvertToManagedDisksWithoutPollingWithResponseAsync(resourceGroupName, vmName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before - * invoking this operation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginConvertToManagedDisksWithoutPolling(String resourceGroupName, String vmName) { - beginConvertToManagedDisksWithoutPollingAsync(resourceGroupName, vmName).block(); - } - - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before - * invoking this operation. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginConvertToManagedDisksWithoutPolling(String resourceGroupName, String vmName, Context context) { - beginConvertToManagedDisksWithoutPollingAsync(resourceGroupName, vmName, context).block(); - } - - /** - * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources - * that this virtual machine uses. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeallocateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginDeallocateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources - * that this virtual machine uses. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginDeallocateWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginDeallocateWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources - * that this virtual machine uses. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeallocateWithoutPollingAsync(String resourceGroupName, String vmName) { - return beginDeallocateWithoutPollingWithResponseAsync(resourceGroupName, vmName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources - * that this virtual machine uses. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginDeallocateWithoutPollingAsync(String resourceGroupName, String vmName, Context context) { - return beginDeallocateWithoutPollingWithResponseAsync(resourceGroupName, vmName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources - * that this virtual machine uses. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeallocateWithoutPolling(String resourceGroupName, String vmName) { - beginDeallocateWithoutPollingAsync(resourceGroupName, vmName).block(); - } - - /** - * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources - * that this virtual machine uses. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginDeallocateWithoutPolling(String resourceGroupName, String vmName, Context context) { - beginDeallocateWithoutPollingAsync(resourceGroupName, vmName, context).block(); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPowerOffWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Boolean skipShutdown) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginPowerOffWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - skipShutdown, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPowerOffWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Boolean skipShutdown, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginPowerOffWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - skipShutdown, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPowerOffWithoutPollingAsync(String resourceGroupName, String vmName, Boolean skipShutdown) { - return beginPowerOffWithoutPollingWithResponseAsync(resourceGroupName, vmName, skipShutdown) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPowerOffWithoutPollingAsync( - String resourceGroupName, String vmName, Boolean skipShutdown, Context context) { - return beginPowerOffWithoutPollingWithResponseAsync(resourceGroupName, vmName, skipShutdown, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPowerOffWithoutPollingAsync(String resourceGroupName, String vmName) { - final Boolean skipShutdown = null; - final Context context = null; - return beginPowerOffWithoutPollingWithResponseAsync(resourceGroupName, vmName, skipShutdown) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPowerOffWithoutPolling(String resourceGroupName, String vmName, Boolean skipShutdown) { - beginPowerOffWithoutPollingAsync(resourceGroupName, vmName, skipShutdown).block(); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not - * specified. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPowerOffWithoutPolling( - String resourceGroupName, String vmName, Boolean skipShutdown, Context context) { - beginPowerOffWithoutPollingAsync(resourceGroupName, vmName, skipShutdown, context).block(); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same - * provisioned resources. You are still charged for this virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPowerOffWithoutPolling(String resourceGroupName, String vmName) { - final Boolean skipShutdown = null; - final Context context = null; - beginPowerOffWithoutPollingAsync(resourceGroupName, vmName, skipShutdown).block(); - } - - /** - * The operation to reapply a virtual machine's state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReapplyWithoutPollingWithResponseAsync(String resourceGroupName, String vmName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginReapplyWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to reapply a virtual machine's state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReapplyWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginReapplyWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to reapply a virtual machine's state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReapplyWithoutPollingAsync(String resourceGroupName, String vmName) { - return beginReapplyWithoutPollingWithResponseAsync(resourceGroupName, vmName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to reapply a virtual machine's state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReapplyWithoutPollingAsync(String resourceGroupName, String vmName, Context context) { - return beginReapplyWithoutPollingWithResponseAsync(resourceGroupName, vmName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to reapply a virtual machine's state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReapplyWithoutPolling(String resourceGroupName, String vmName) { - beginReapplyWithoutPollingAsync(resourceGroupName, vmName).block(); - } - - /** - * The operation to reapply a virtual machine's state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReapplyWithoutPolling(String resourceGroupName, String vmName, Context context) { - beginReapplyWithoutPollingAsync(resourceGroupName, vmName, context).block(); - } - - /** - * The operation to restart a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestartWithoutPollingWithResponseAsync(String resourceGroupName, String vmName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginRestartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to restart a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRestartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginRestartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to restart a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestartWithoutPollingAsync(String resourceGroupName, String vmName) { - return beginRestartWithoutPollingWithResponseAsync(resourceGroupName, vmName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to restart a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRestartWithoutPollingAsync(String resourceGroupName, String vmName, Context context) { - return beginRestartWithoutPollingWithResponseAsync(resourceGroupName, vmName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to restart a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestartWithoutPolling(String resourceGroupName, String vmName) { - beginRestartWithoutPollingAsync(resourceGroupName, vmName).block(); - } - - /** - * The operation to restart a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRestartWithoutPolling(String resourceGroupName, String vmName, Context context) { - beginRestartWithoutPollingAsync(resourceGroupName, vmName, context).block(); - } - - /** - * The operation to start a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWithoutPollingWithResponseAsync(String resourceGroupName, String vmName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginStartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to start a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginStartWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginStartWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to start a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWithoutPollingAsync(String resourceGroupName, String vmName) { - return beginStartWithoutPollingWithResponseAsync(resourceGroupName, vmName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to start a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginStartWithoutPollingAsync(String resourceGroupName, String vmName, Context context) { - return beginStartWithoutPollingWithResponseAsync(resourceGroupName, vmName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to start a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartWithoutPolling(String resourceGroupName, String vmName) { - beginStartWithoutPollingAsync(resourceGroupName, vmName).block(); - } - - /** - * The operation to start a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginStartWithoutPolling(String resourceGroupName, String vmName, Context context) { - beginStartWithoutPollingAsync(resourceGroupName, vmName, context).block(); - } - - /** - * Shuts down the virtual machine, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRedeployWithoutPollingWithResponseAsync(String resourceGroupName, String vmName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginRedeployWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Shuts down the virtual machine, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRedeployWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginRedeployWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * Shuts down the virtual machine, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRedeployWithoutPollingAsync(String resourceGroupName, String vmName) { - return beginRedeployWithoutPollingWithResponseAsync(resourceGroupName, vmName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Shuts down the virtual machine, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRedeployWithoutPollingAsync(String resourceGroupName, String vmName, Context context) { - return beginRedeployWithoutPollingWithResponseAsync(resourceGroupName, vmName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Shuts down the virtual machine, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRedeployWithoutPolling(String resourceGroupName, String vmName) { - beginRedeployWithoutPollingAsync(resourceGroupName, vmName).block(); - } - - /** - * Shuts down the virtual machine, moves it to a new node, and powers it back on. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginRedeployWithoutPolling(String resourceGroupName, String vmName, Context context) { - beginRedeployWithoutPollingAsync(resourceGroupName, vmName, context).block(); - } - - /** - * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Boolean tempDisk) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineReimageParameters parametersInternal = null; - if (tempDisk != null) { - parametersInternal = new VirtualMachineReimageParameters(); - parametersInternal.withTempDisk(tempDisk); - } - VirtualMachineReimageParameters parameters = parametersInternal; - return FluxUtil - .withContext( - context -> - service - .beginReimageWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginReimageWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Boolean tempDisk, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - VirtualMachineReimageParameters parametersInternal = null; - if (tempDisk != null) { - parametersInternal = new VirtualMachineReimageParameters(); - parametersInternal.withTempDisk(tempDisk); - } - VirtualMachineReimageParameters parameters = parametersInternal; - return service - .beginReimageWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageWithoutPollingAsync(String resourceGroupName, String vmName, Boolean tempDisk) { - return beginReimageWithoutPollingWithResponseAsync(resourceGroupName, vmName, tempDisk) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginReimageWithoutPollingAsync( - String resourceGroupName, String vmName, Boolean tempDisk, Context context) { - return beginReimageWithoutPollingWithResponseAsync(resourceGroupName, vmName, tempDisk, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageWithoutPolling(String resourceGroupName, String vmName, Boolean tempDisk) { - beginReimageWithoutPollingAsync(resourceGroupName, vmName, tempDisk).block(); - } - - /** - * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginReimageWithoutPolling(String resourceGroupName, String vmName, Boolean tempDisk, Context context) { - beginReimageWithoutPollingAsync(resourceGroupName, vmName, tempDisk, context).block(); - } - - /** - * The operation to perform maintenance on a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPerformMaintenanceWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginPerformMaintenanceWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * The operation to perform maintenance on a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginPerformMaintenanceWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-12-01"; - return service - .beginPerformMaintenanceWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - context); - } - - /** - * The operation to perform maintenance on a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPerformMaintenanceWithoutPollingAsync(String resourceGroupName, String vmName) { - return beginPerformMaintenanceWithoutPollingWithResponseAsync(resourceGroupName, vmName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to perform maintenance on a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginPerformMaintenanceWithoutPollingAsync( - String resourceGroupName, String vmName, Context context) { - return beginPerformMaintenanceWithoutPollingWithResponseAsync(resourceGroupName, vmName, context) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * The operation to perform maintenance on a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPerformMaintenanceWithoutPolling(String resourceGroupName, String vmName) { - beginPerformMaintenanceWithoutPollingAsync(resourceGroupName, vmName).block(); - } - - /** - * The operation to perform maintenance on a virtual machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void beginPerformMaintenanceWithoutPolling(String resourceGroupName, String vmName, Context context) { - beginPerformMaintenanceWithoutPollingAsync(resourceGroupName, vmName, context).block(); - } - - /** - * Run command on the VM. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRunCommandWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, RunCommandInput parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return FluxUtil - .withContext( - context -> - service - .beginRunCommandWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Run command on the VM. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> beginRunCommandWithoutPollingWithResponseAsync( - String resourceGroupName, String vmName, RunCommandInput parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-12-01"; - return service - .beginRunCommandWithoutPolling( - this.client.getEndpoint(), - resourceGroupName, - vmName, - apiVersion, - this.client.getSubscriptionId(), - parameters, - context); - } - - /** - * Run command on the VM. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRunCommandWithoutPollingAsync( - String resourceGroupName, String vmName, RunCommandInput parameters) { - return beginRunCommandWithoutPollingWithResponseAsync(resourceGroupName, vmName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Run command on the VM. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono beginRunCommandWithoutPollingAsync( - String resourceGroupName, String vmName, RunCommandInput parameters, Context context) { - return beginRunCommandWithoutPollingWithResponseAsync(resourceGroupName, vmName, parameters, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Run command on the VM. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner beginRunCommandWithoutPolling( - String resourceGroupName, String vmName, RunCommandInput parameters) { - return beginRunCommandWithoutPollingAsync(resourceGroupName, vmName, parameters).block(); - } - - /** - * Run command on the VM. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Capture Virtual Machine parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner beginRunCommandWithoutPolling( - String resourceGroupName, String vmName, RunCommandInput parameters, Context context) { - return beginRunCommandWithoutPollingAsync(resourceGroupName, vmName, parameters, context).block(); - } - /** * Get the next page of items. * @@ -7808,6 +5234,7 @@ public Mono> listByLocationNextSinglePageAsyn if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listByLocationNext(nextLink, context) .map( @@ -7864,6 +5291,7 @@ public Mono> listNextSinglePageAsync(String n if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listNext(nextLink, context) .map( @@ -7920,6 +5348,7 @@ public Mono> listAllNextSinglePageAsync(Strin if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } + context = this.client.mergeContext(context); return service .listAllNext(nextLink, context) .map( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/inner/VirtualMachineExtensionInner.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/inner/VirtualMachineExtensionInner.java index bf453696b546..cbb3732b6fd0 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/inner/VirtualMachineExtensionInner.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/inner/VirtualMachineExtensionInner.java @@ -121,8 +121,8 @@ public VirtualMachineExtensionInner withPublisher(String publisher) { } /** - * Get the virtualMachineExtensionType property: Specifies the type of the extension; an example is - * "CustomScriptExtension". + * Get the virtualMachineExtensionType property: + * Specifies the type of the extension; an example is "CustomScriptExtension". * * @return the virtualMachineExtensionType value. */ @@ -131,8 +131,8 @@ public String virtualMachineExtensionType() { } /** - * Set the virtualMachineExtensionType property: Specifies the type of the extension; an example is - * "CustomScriptExtension". + * Set the virtualMachineExtensionType property: + * Specifies the type of the extension; an example is "CustomScriptExtension". * * @param virtualMachineExtensionType the virtualMachineExtensionType value to set. * @return the VirtualMachineExtensionInner object itself. diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/inner/VirtualMachineScaleSetExtensionInner.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/inner/VirtualMachineScaleSetExtensionInner.java index 973a0a9948d9..14894df3dc4c 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/inner/VirtualMachineScaleSetExtensionInner.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/fluent/inner/VirtualMachineScaleSetExtensionInner.java @@ -24,6 +24,12 @@ public class VirtualMachineScaleSetExtensionInner extends SubResourceReadOnly { @JsonProperty(value = "name") private String name; +// /* +// * Resource type +// */ +// @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) +// private String type; + /* * If a value is provided and is different from the previous value, the * extension handler will be forced to update even if the extension @@ -106,6 +112,15 @@ public VirtualMachineScaleSetExtensionInner withName(String name) { return this; } +// /** +// * Get the type property: Resource type. +// * +// * @return the type value. +// */ +// public String type() { +// return this.type; +// } + /** * Get the forceUpdateTag property: If a value is provided and is different from the previous value, the extension * handler will be forced to update even if the extension configuration has not changed. diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/DiskImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/DiskImpl.java index ead47902ac27..304fb276c054 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/DiskImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/DiskImpl.java @@ -106,7 +106,6 @@ public Mono grantAccessAsync(int accessDurationInSeconds) { .inner() .getDisks() .grantAccessAsync(this.resourceGroupName(), this.name(), grantAccessDataInner) - .onErrorResume(e -> Mono.empty()) .map(accessUriInner -> accessUriInner.accessSas()); } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsImpl.java index de260341acbe..e7135d7f7c41 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsImpl.java @@ -58,7 +58,6 @@ public Mono getByGalleryImageAsync( String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { return inner() .getAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesImpl.java index c99d8b8918ef..557d090cea23 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesImpl.java @@ -53,7 +53,6 @@ public PagedIterable listByGallery(String resourceGroupName, Strin public Mono getByGalleryAsync(String resourceGroupName, String galleryName, String galleryImageName) { return inner() .getAsync(resourceGroupName, galleryName, galleryImageName) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/LinuxDiskVolumeLegacyEncryptionMonitorImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/LinuxDiskVolumeLegacyEncryptionMonitorImpl.java index 8953db53da62..9e0ea3349cac 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/LinuxDiskVolumeLegacyEncryptionMonitorImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/LinuxDiskVolumeLegacyEncryptionMonitorImpl.java @@ -117,8 +117,7 @@ private Mono retrieveExtensionWithInstanceViewAsyn return computeManager .inner() .getVirtualMachineExtensions() - .getAsync(rgName, vmName, extension.name(), "instanceView") - .onErrorResume(e -> Mono.empty()); + .getAsync(rgName, vmName, extension.name(), "instanceView"); } /** @@ -133,12 +132,7 @@ private Mono retrieveEncryptExtensionWithInstanceV .inner() .getVirtualMachines() .getByResourceGroupAsync(rgName, vmName) - .onErrorResume( - e -> - Mono - .error( - new Exception( - String.format("VM with name '%s' not found (resource group '%s')", vmName, rgName)))) + // Exception if vm not found .flatMap( virtualMachine -> { if (virtualMachine.resources() != null) { diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/LinuxDiskVolumeNoAADEncryptionMonitorImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/LinuxDiskVolumeNoAADEncryptionMonitorImpl.java index edd531cec7f7..2d0f60d33631 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/LinuxDiskVolumeNoAADEncryptionMonitorImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/LinuxDiskVolumeNoAADEncryptionMonitorImpl.java @@ -128,13 +128,8 @@ private Mono retrieveVirtualMachineAsync() { return computeManager .inner() .getVirtualMachines() - .getByResourceGroupAsync(rgName, vmName) - .onErrorResume( - e -> - Mono - .error( - new Exception( - String.format("VM with name '%s' not found (resource group '%s')", vmName, rgName)))); + .getByResourceGroupAsync(rgName, vmName); + // Exception if vm not found } private boolean hasEncryptionExtensionInstanceView() { diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/ProxyEncryptionMonitorImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/ProxyEncryptionMonitorImpl.java index c47503bbdbcd..0f7d30dd07c6 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/ProxyEncryptionMonitorImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/ProxyEncryptionMonitorImpl.java @@ -113,8 +113,8 @@ private Mono retrieveVirtualMachineAsync() { return computeManager .inner() .getVirtualMachines() - .getByResourceGroupAsync(ResourceUtils.groupFromResourceId(vmId), ResourceUtils.nameFromResourceId(vmId)) - .onErrorResume(e -> Mono.error(new Exception(String.format("VM with id '%s' not found.", vmId)))); + .getByResourceGroupAsync(ResourceUtils.groupFromResourceId(vmId), ResourceUtils.nameFromResourceId(vmId)); + // Exception if vm not found } /** diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotImpl.java index 71bd42f54de8..69f114fa68a4 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotImpl.java @@ -93,7 +93,6 @@ public Mono grantAccessAsync(int accessDurationInSeconds) { .inner() .getSnapshots() .grantAccessAsync(resourceGroupName(), name(), grantAccessDataInner) - .onErrorResume(e -> Mono.empty()) .map(accessUriInner -> accessUriInner.accessSas()); } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsImpl.java index 55fdeb60df33..1f15fcb331bf 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsImpl.java @@ -29,7 +29,6 @@ public Mono grantAccessAsync( grantAccessDataInner.withAccess(accessLevel).withDurationInSeconds(accessDuration); return inner() .grantAccessAsync(resourceGroupName, snapshotName, grantAccessDataInner) - .onErrorResume(e -> Mono.empty()) .map(accessUriInner -> accessUriInner.accessSas()); } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImageVersionImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImageVersionImpl.java index 3017cbcbf3ee..ff5a66fe34de 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImageVersionImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImageVersionImpl.java @@ -60,7 +60,6 @@ public Mono getImageAsync() { final VirtualMachineExtensionImageVersionImpl self = this; return client .getAsync(regionName(), type().publisher().name(), type().name(), name()) - .onErrorResume(e -> Mono.empty()) .map(inner -> new VirtualMachineExtensionImageImpl(self, inner)); } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImagesImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImagesImpl.java index 455645b2f275..3facbf7e77ec 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImagesImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImagesImpl.java @@ -4,13 +4,14 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.compute.models.VirtualMachineExtensionImage; import com.azure.resourcemanager.compute.models.VirtualMachineExtensionImageVersion; import com.azure.resourcemanager.compute.models.VirtualMachineExtensionImages; import com.azure.resourcemanager.compute.models.VirtualMachinePublishers; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.PagedConverter; -import reactor.core.publisher.Mono; +import reactor.core.publisher.Flux; /** The implementation for {@link VirtualMachineExtensionImages}. */ public class VirtualMachineExtensionImagesImpl implements VirtualMachineExtensionImages { @@ -44,9 +45,10 @@ public PagedFlux listByRegionAsync(String regionNa virtualMachinePublisher .extensionTypes() .listAsync() - .onErrorResume(e -> Mono.empty()) - .flatMap( - virtualMachineExtensionImageType -> virtualMachineExtensionImageType.versions().listAsync()) + .onErrorResume(ManagementException.class, + e -> e.getResponse().getStatusCode() == 404 ? Flux.empty() : Flux.error(e)) + .flatMap(virtualMachineExtensionImageType -> + virtualMachineExtensionImageType.versions().listAsync()) .flatMap(VirtualMachineExtensionImageVersion::getImageAsync)); } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImpl.java index 039b8d9cb224..a2b170625b66 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImpl.java @@ -92,7 +92,6 @@ public Mono getInstanceViewAsync() { return this .client .getAsync(this.parent().resourceGroupName(), this.parent().name(), this.name(), "instanceView") - .onErrorResume(e -> Mono.empty()) .map(inner -> inner.instanceView()); } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImagesImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImagesImpl.java index b2529d1d4b7f..0fc380749ed3 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImagesImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImagesImpl.java @@ -4,6 +4,7 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.compute.models.VirtualMachineImage; import com.azure.resourcemanager.compute.models.VirtualMachineImages; import com.azure.resourcemanager.compute.models.VirtualMachinePublishers; @@ -12,8 +13,9 @@ import com.azure.resourcemanager.compute.fluent.VirtualMachineImagesClient; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.PagedConverter; +import reactor.core.publisher.Flux; + import java.util.List; -import reactor.core.publisher.Mono; /** The implementation for {@link VirtualMachineImages}. */ public class VirtualMachineImagesImpl implements VirtualMachineImages { @@ -85,7 +87,8 @@ public PagedFlux listByRegionAsync(String regionName) { virtualMachinePublisher .offers() .listAsync() - .onErrorResume(e -> Mono.empty()) + .onErrorResume(ManagementException.class, + e -> e.getResponse().getStatusCode() == 404 ? Flux.empty() : Flux.error(e)) .flatMap(virtualMachineOffer -> virtualMachineOffer.skus().listAsync()) .flatMap(virtualMachineSku -> virtualMachineSku.images().listAsync())); } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImpl.java index 35b9f795dd50..a65c2eea6715 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImpl.java @@ -1786,7 +1786,7 @@ public Accepted beginCreate() { inner -> new VirtualMachineImpl(inner.name(), inner, this.manager(), this.storageManager, this.networkManager, this.authorizationManager)); - reset(accepted.getAcceptedResult().getValue().inner()); + reset(accepted.getActivationResponse().getValue().inner()); return accepted; } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/WindowsVolumeLegacyEncryptionMonitorImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/WindowsVolumeLegacyEncryptionMonitorImpl.java index b9c284ea3fd2..f8e78ecbafa8 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/WindowsVolumeLegacyEncryptionMonitorImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/WindowsVolumeLegacyEncryptionMonitorImpl.java @@ -152,13 +152,8 @@ private Mono retrieveVirtualMachineAsync() { .computeManager .inner() .getVirtualMachines() - .getByResourceGroupAsync(rgName, vmName) - .onErrorResume( - e -> - Mono - .error( - new Exception( - String.format("VM with name '%s' not found (resource group '%s')", vmName, rgName)))); + .getByResourceGroupAsync(rgName, vmName); + // Exception if vm not found } private boolean hasEncryptionDetails() { diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/WindowsVolumeNoAADEncryptionMonitorImpl.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/WindowsVolumeNoAADEncryptionMonitorImpl.java index 35e00710e92a..a00c24daaa3a 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/WindowsVolumeNoAADEncryptionMonitorImpl.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/implementation/WindowsVolumeNoAADEncryptionMonitorImpl.java @@ -155,13 +155,8 @@ private Mono retrieveVirtualMachineAsync() { .computeManager .inner() .getVirtualMachines() - .getByResourceGroupAsync(rgName, vmName) - .onErrorResume( - e -> - Mono - .error( - new Exception( - String.format("VM with name '%s' not found (resource group '%s')", vmName, rgName)))); + .getByResourceGroupAsync(rgName, vmName); + // Exception if vm not found } /** diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/ApiError.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/ApiError.java index c608fd9302f3..0c468859d0f2 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/ApiError.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/ApiError.java @@ -36,8 +36,5 @@ public InnerError getInnererror() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innererror != null) { - innererror.validate(); - } } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/DiffDiskOptions.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/DiffDiskOptions.java index fb29c6580f57..0548c706432f 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/DiffDiskOptions.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/DiffDiskOptions.java @@ -4,41 +4,28 @@ package com.azure.resourcemanager.compute.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Defines values for DiffDiskOptions. */ -public enum DiffDiskOptions { - /** Enum value Local. */ - LOCAL("Local"); - - /** The actual serialized value for a DiffDiskOptions instance. */ - private final String value; - - DiffDiskOptions(String value) { - this.value = value; - } +public final class DiffDiskOptions extends ExpandableStringEnum { + /** Static value Local for DiffDiskOptions. */ + public static final DiffDiskOptions LOCAL = fromString("Local"); /** - * Parses a serialized value to a DiffDiskOptions instance. + * Creates or finds a DiffDiskOptions from its string representation. * - * @param value the serialized value to parse. - * @return the parsed DiffDiskOptions object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding DiffDiskOptions. */ @JsonCreator - public static DiffDiskOptions fromString(String value) { - DiffDiskOptions[] items = DiffDiskOptions.values(); - for (DiffDiskOptions item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static DiffDiskOptions fromString(String name) { + return fromString(name, DiffDiskOptions.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** @return known DiffDiskOptions values. */ + public static Collection values() { + return values(DiffDiskOptions.class); } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetIdentityType.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetIdentityType.java index 76ab87d2b1df..d298d05950cc 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetIdentityType.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetIdentityType.java @@ -4,41 +4,28 @@ package com.azure.resourcemanager.compute.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Defines values for DiskEncryptionSetIdentityType. */ -public enum DiskEncryptionSetIdentityType { - /** Enum value SystemAssigned. */ - SYSTEM_ASSIGNED("SystemAssigned"); - - /** The actual serialized value for a DiskEncryptionSetIdentityType instance. */ - private final String value; - - DiskEncryptionSetIdentityType(String value) { - this.value = value; - } +public final class DiskEncryptionSetIdentityType extends ExpandableStringEnum { + /** Static value SystemAssigned for DiskEncryptionSetIdentityType. */ + public static final DiskEncryptionSetIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Parses a serialized value to a DiskEncryptionSetIdentityType instance. + * Creates or finds a DiskEncryptionSetIdentityType from its string representation. * - * @param value the serialized value to parse. - * @return the parsed DiskEncryptionSetIdentityType object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding DiskEncryptionSetIdentityType. */ @JsonCreator - public static DiskEncryptionSetIdentityType fromString(String value) { - DiskEncryptionSetIdentityType[] items = DiskEncryptionSetIdentityType.values(); - for (DiskEncryptionSetIdentityType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static DiskEncryptionSetIdentityType fromString(String name) { + return fromString(name, DiskEncryptionSetIdentityType.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** @return known DiskEncryptionSetIdentityType values. */ + public static Collection values() { + return values(DiskEncryptionSetIdentityType.class); } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceNames.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceNames.java index 0fc0f8b8babd..c73007451755 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceNames.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceNames.java @@ -4,41 +4,28 @@ package com.azure.resourcemanager.compute.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Defines values for OrchestrationServiceNames. */ -public enum OrchestrationServiceNames { - /** Enum value AutomaticRepairs. */ - AUTOMATIC_REPAIRS("AutomaticRepairs"); - - /** The actual serialized value for a OrchestrationServiceNames instance. */ - private final String value; - - OrchestrationServiceNames(String value) { - this.value = value; - } +public final class OrchestrationServiceNames extends ExpandableStringEnum { + /** Static value AutomaticRepairs for OrchestrationServiceNames. */ + public static final OrchestrationServiceNames AUTOMATIC_REPAIRS = fromString("AutomaticRepairs"); /** - * Parses a serialized value to a OrchestrationServiceNames instance. + * Creates or finds a OrchestrationServiceNames from its string representation. * - * @param value the serialized value to parse. - * @return the parsed OrchestrationServiceNames object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding OrchestrationServiceNames. */ @JsonCreator - public static OrchestrationServiceNames fromString(String value) { - OrchestrationServiceNames[] items = OrchestrationServiceNames.values(); - for (OrchestrationServiceNames item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static OrchestrationServiceNames fromString(String name) { + return fromString(name, OrchestrationServiceNames.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** @return known OrchestrationServiceNames values. */ + public static Collection values() { + return values(OrchestrationServiceNames.class); } } diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceStateInput.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceStateInput.java index 048beb2f72fc..f07747103629 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceStateInput.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceStateInput.java @@ -18,7 +18,7 @@ public final class OrchestrationServiceStateInput { * The name of the service. */ @JsonProperty(value = "serviceName", required = true) - private String serviceName; + private OrchestrationServiceNames serviceName; /* * The action to be performed. @@ -26,17 +26,12 @@ public final class OrchestrationServiceStateInput { @JsonProperty(value = "action", required = true) private OrchestrationServiceStateAction action; - /** Creates an instance of OrchestrationServiceStateInput class. */ - public OrchestrationServiceStateInput() { - serviceName = "AutomaticRepairs"; - } - /** * Get the serviceName property: The name of the service. * * @return the serviceName value. */ - public String serviceName() { + public OrchestrationServiceNames serviceName() { return this.serviceName; } @@ -46,7 +41,7 @@ public String serviceName() { * @param serviceName the serviceName value to set. * @return the OrchestrationServiceStateInput object itself. */ - public OrchestrationServiceStateInput withServiceName(String serviceName) { + public OrchestrationServiceStateInput withServiceName(OrchestrationServiceNames serviceName) { this.serviceName = serviceName; return this; } @@ -77,6 +72,12 @@ public OrchestrationServiceStateInput withAction(OrchestrationServiceStateAction * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (serviceName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property serviceName in model OrchestrationServiceStateInput")); + } if (action() == null) { throw logger .logExceptionAsError( diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/ReplicationStatusTypes.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/ReplicationStatusTypes.java index 6adaaf9ea66c..19f17e12b6be 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/ReplicationStatusTypes.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/ReplicationStatusTypes.java @@ -4,41 +4,28 @@ package com.azure.resourcemanager.compute.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Defines values for ReplicationStatusTypes. */ -public enum ReplicationStatusTypes { - /** Enum value ReplicationStatus. */ - REPLICATION_STATUS("ReplicationStatus"); - - /** The actual serialized value for a ReplicationStatusTypes instance. */ - private final String value; - - ReplicationStatusTypes(String value) { - this.value = value; - } +public final class ReplicationStatusTypes extends ExpandableStringEnum { + /** Static value ReplicationStatus for ReplicationStatusTypes. */ + public static final ReplicationStatusTypes REPLICATION_STATUS = fromString("ReplicationStatus"); /** - * Parses a serialized value to a ReplicationStatusTypes instance. + * Creates or finds a ReplicationStatusTypes from its string representation. * - * @param value the serialized value to parse. - * @return the parsed ReplicationStatusTypes object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding ReplicationStatusTypes. */ @JsonCreator - public static ReplicationStatusTypes fromString(String value) { - ReplicationStatusTypes[] items = ReplicationStatusTypes.values(); - for (ReplicationStatusTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static ReplicationStatusTypes fromString(String name) { + return fromString(name, ReplicationStatusTypes.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** @return known ReplicationStatusTypes values. */ + public static Collection values() { + return values(ReplicationStatusTypes.class); } } diff --git a/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java b/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java index e1f36bef08b9..1bf08a91f275 100644 --- a/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java +++ b/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java @@ -211,17 +211,17 @@ public void canCreateVirtualMachineSyncPoll() throws Exception { .withOSDiskName("javatest") .withLicenseType("Windows_Server") .beginCreate(); - VirtualMachine createdVirtualMachine = acceptedVirtualMachine.getAcceptedResult().getValue(); + VirtualMachine createdVirtualMachine = acceptedVirtualMachine.getActivationResponse().getValue(); Assertions.assertNotEquals("Succeeded", createdVirtualMachine.provisioningState()); - LongRunningOperationStatus pollStatus = acceptedVirtualMachine.getAcceptedResult().getStatus(); - int delayInMills = acceptedVirtualMachine.getAcceptedResult().getRetryAfter() == null + LongRunningOperationStatus pollStatus = acceptedVirtualMachine.getActivationResponse().getStatus(); + int delayInMills = acceptedVirtualMachine.getActivationResponse().getRetryAfter() == null ? 0 - : (int) acceptedVirtualMachine.getAcceptedResult().getRetryAfter().toMillis(); + : (int) acceptedVirtualMachine.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); - PollResponse pollResponse = acceptedVirtualMachine.getSyncPoller().poll(); + PollResponse pollResponse = acceptedVirtualMachine.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null ? 10000 @@ -234,15 +234,15 @@ public void canCreateVirtualMachineSyncPoll() throws Exception { Accepted acceptedDelete = computeManager.virtualMachines() .beginDeleteByResourceGroup(virtualMachine.resourceGroupName(), virtualMachine.name()); - pollStatus = acceptedDelete.getAcceptedResult().getStatus(); - delayInMills = acceptedDelete.getAcceptedResult().getRetryAfter() == null + pollStatus = acceptedDelete.getActivationResponse().getStatus(); + delayInMills = acceptedDelete.getActivationResponse().getRetryAfter() == null ? 0 - : (int) acceptedDelete.getAcceptedResult().getRetryAfter().toMillis(); + : (int) acceptedDelete.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); - PollResponse pollResponse = acceptedDelete.getSyncPoller().poll(); + PollResponse pollResponse = acceptedDelete.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null ? 10000 diff --git a/sdk/containerinstance/mgmt/pom.xml b/sdk/containerinstance/mgmt/pom.xml new file mode 100644 index 000000000000..bbbf926f4e24 --- /dev/null +++ b/sdk/containerinstance/mgmt/pom.xml @@ -0,0 +1,151 @@ + + + 4.0.0 + + com.azure.resourcemanager + azure-resourcemanager-parent + 2.0.0-SNAPSHOT + ../../management/pom.xml + + + azure-resourcemanager-containerinstance + jar + + Microsoft Azure SDK for Container Instance Management + This package contains Microsoft Azure Container Instance SDK. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + UTF-8 + + + + + + microsoft + Microsoft + + + + + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.0.0-SNAPSHOT + + + com.azure.resourcemanager + azure-resourcemanager-storage + 2.0.0-SNAPSHOT + + + com.azure.resourcemanager + azure-resourcemanager-authorization + 2.0.0-SNAPSHOT + + + com.azure.resourcemanager + azure-resourcemanager-msi + 2.0.0-SNAPSHOT + + + com.azure.resourcemanager + azure-resourcemanager-network + 2.0.0-SNAPSHOT + + + com.azure + azure-storage-file-share + 12.5.0 + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.jupiter + junit-jupiter-api + test + + + com.azure + azure-core-http-netty + test + + + com.azure + azure-identity + test + + + + + azure-mgmt-sdk-test-jar + + + !maven.test.skip + + + + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.0.0-SNAPSHOT + test-jar + test + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + true + true + + true + true + + + + + + diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClient.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClient.java new file mode 100644 index 000000000000..4176c76c07a3 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClient.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.fluent.ContainerGroupsClient; +import com.azure.resourcemanager.containerinstance.fluent.ContainersClient; +import com.azure.resourcemanager.containerinstance.fluent.LocationsClient; +import com.azure.resourcemanager.containerinstance.fluent.OperationsClient; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; + +/** Initializes a new instance of the ContainerInstanceManagementClient type. */ +@ServiceClient(builder = ContainerInstanceManagementClientBuilder.class) +public final class ContainerInstanceManagementClient extends AzureServiceClient { + private final ClientLogger logger = new ClientLogger(ContainerInstanceManagementClient.class); + + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. + */ + private final String subscriptionId; + + /** + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The ContainerGroupsClient object to access its operations. */ + private final ContainerGroupsClient containerGroups; + + /** + * Gets the ContainerGroupsClient object to access its operations. + * + * @return the ContainerGroupsClient object. + */ + public ContainerGroupsClient getContainerGroups() { + return this.containerGroups; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** The LocationsClient object to access its operations. */ + private final LocationsClient locations; + + /** + * Gets the LocationsClient object to access its operations. + * + * @return the LocationsClient object. + */ + public LocationsClient getLocations() { + return this.locations; + } + + /** The ContainersClient object to access its operations. */ + private final ContainersClient containers; + + /** + * Gets the ContainersClient object to access its operations. + * + * @return the ContainersClient object. + */ + public ContainersClient getContainers() { + return this.containers; + } + + /** + * Initializes an instance of ContainerInstanceManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param environment The Azure environment. + */ + ContainerInstanceManagementClient( + HttpPipeline httpPipeline, AzureEnvironment environment, String subscriptionId, String endpoint) { + super(httpPipeline, environment); + this.httpPipeline = httpPipeline; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2019-12-01"; + this.containerGroups = new ContainerGroupsClient(this); + this.operations = new OperationsClient(this); + this.locations = new LocationsClient(this); + this.containers = new ContainersClient(this); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClientBuilder.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClientBuilder.java new file mode 100644 index 000000000000..89e311287f69 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementClientBuilder.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; + +/** A builder for creating a new instance of the ContainerInstanceManagementClient type. */ +@ServiceClientBuilder(serviceClients = {ContainerInstanceManagementClient.class}) +public final class ContainerInstanceManagementClientBuilder { + /* + * Subscription credentials which uniquely identify Microsoft Azure + * subscription. The subscription ID forms part of the URI for every + * service call. + */ + private String subscriptionId; + + /** + * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the ContainerInstanceManagementClientBuilder. + */ + public ContainerInstanceManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the ContainerInstanceManagementClientBuilder. + */ + public ContainerInstanceManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the ContainerInstanceManagementClientBuilder. + */ + public ContainerInstanceManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the ContainerInstanceManagementClientBuilder. + */ + public ContainerInstanceManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /** + * Builds an instance of ContainerInstanceManagementClient with the provided parameters. + * + * @return an instance of ContainerInstanceManagementClient. + */ + public ContainerInstanceManagementClient buildClient() { + if (endpoint == null) { + this.endpoint = "https://management.azure.com"; + } + if (environment == null) { + this.environment = AzureEnvironment.AZURE; + } + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + ContainerInstanceManagementClient client = + new ContainerInstanceManagementClient(pipeline, environment, subscriptionId, endpoint); + return client; + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java new file mode 100644 index 000000000000..91a2faed93a9 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManager.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.authorization.AuthorizationManager; +import com.azure.resourcemanager.containerinstance.implementation.ContainerGroupsImpl; +import com.azure.resourcemanager.containerinstance.models.ContainerGroups; +import com.azure.resourcemanager.network.NetworkManager; +import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; +import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl; +import com.azure.resourcemanager.resources.fluentcore.arm.implementation.Manager; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.storage.StorageManager; + +/** Entry point to Azure container instance management. */ +public final class ContainerInstanceManager + extends Manager { + + // The service managers + private ContainerGroupsImpl containerGroups; + private final StorageManager storageManager; + private final AuthorizationManager authorizationManager; + private final NetworkManager networkManager; + + /** + * Get a Configurable instance that can be used to create ContainerInstanceManager with optional configuration. + * + * @return Configurable + */ + public static Configurable configure() { + return new ContainerInstanceManager.ConfigurableImpl(); + } + + /** + * Creates an instance of ContainerInstanceManager that exposes resource management API entry points. + * + * @param credential the credential to use + * @param profile the profile to use + * @return the ContainerInstanceManager + */ + public static ContainerInstanceManager authenticate(TokenCredential credential, AzureProfile profile) { + return authenticate(HttpPipelineProvider.buildHttpPipeline(credential, profile), profile); + } + + /** + * Creates an instance of ContainerInstanceManager that exposes resource management API entry points. + * + * @param httpPipeline the HttpPipeline to be used for API calls. + * @param profile the profile to use + * @return the ContainerInstanceManager + */ + public static ContainerInstanceManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + return authenticate(httpPipeline, profile, new SdkContext()); + } + + /** + * Creates an instance of ContainerInstanceManager that exposes resource management API entry points. + * + * @param httpPipeline the HttpPipeline to be used for API calls. + * @param profile the profile to use + * @param sdkContext the sdk context + * @return the ContainerInstanceManager + */ + public static ContainerInstanceManager authenticate( + HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { + return new ContainerInstanceManager(httpPipeline, profile, sdkContext); + } + + /** The interface allowing configurations to be set. */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of ContainerInstanceManager that exposes resource management API entry points. + * + * @param credential the credential to use + * @param profile the profile to use + * @return the ContainerInstanceManager + */ + ContainerInstanceManager authenticate(TokenCredential credential, AzureProfile profile); + } + + /** The implementation for Configurable interface. */ + private static final class ConfigurableImpl extends AzureConfigurableImpl implements Configurable { + @Override + public ContainerInstanceManager authenticate(TokenCredential credential, AzureProfile profile) { + return ContainerInstanceManager.authenticate(buildHttpPipeline(credential, profile), profile); + } + } + + private ContainerInstanceManager(HttpPipeline httpPipeline, AzureProfile profile, SdkContext sdkContext) { + super( + httpPipeline, + profile, + new ContainerInstanceManagementClientBuilder() + .pipeline(httpPipeline) + .endpoint(profile.environment().getResourceManagerEndpoint()) + .subscriptionId(profile.subscriptionId()) + .buildClient(), + sdkContext); + + this.storageManager = StorageManager.authenticate(httpPipeline, profile, sdkContext); + this.authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile, sdkContext); + this.networkManager = NetworkManager.authenticate(httpPipeline, profile, sdkContext); + } + + /** @return the storage manager in container instance manager */ + public StorageManager storageManager() { + return storageManager; + } + + /** @return the authorization manager in container instance manager */ + public AuthorizationManager authorizationManager() { + return authorizationManager; + } + + /** @return the network manager in container instance manager */ + public NetworkManager networkManager() { + return networkManager; + } + + /** @return the resource management API entry point */ + public ContainerGroups containerGroups() { + if (this.containerGroups == null) { + this.containerGroups = new ContainerGroupsImpl(this); + } + + return this.containerGroups; + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java new file mode 100644 index 000000000000..a81a3c2a7d0d --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java @@ -0,0 +1,2125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.Resource; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManagementClient; +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerGroupInner; +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerGroupListResultInner; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ContainerGroups. */ +public final class ContainerGroupsClient + implements InnerSupportsGet, + InnerSupportsListing, + InnerSupportsDelete { + private final ClientLogger logger = new ClientLogger(ContainerGroupsClient.class); + + /** The proxy service used to perform REST calls. */ + private final ContainerGroupsService service; + + /** The service client containing this operation class. */ + private final ContainerInstanceManagementClient client; + + /** + * Initializes an instance of ContainerGroupsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public ContainerGroupsClient(ContainerInstanceManagementClient client) { + this.service = + RestProxy.create(ContainerGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerInstanceManagementClientContainerGroups to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerInstanceMan") + private interface ContainerGroupsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + @BodyParam("application/json") ContainerGroupInner containerGroup, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + @BodyParam("application/json") Resource resource, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}/restart") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> restart( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}/stop") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> stop( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}/start") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in a specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in a specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in a specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in a specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in a specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of container groups in a specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets the properties of the specified container group in the specified subscription and resource group. The + * operation returns the properties of each container group including containers, image registry credentials, + * restart policy, IP address type, OS type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the specified container group in the specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String containerGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Gets the properties of the specified container group in the specified subscription and resource group. The + * operation returns the properties of each container group including containers, image registry credentials, + * restart policy, IP address type, OS type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the specified container group in the specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String containerGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context); + } + + /** + * Gets the properties of the specified container group in the specified subscription and resource group. The + * operation returns the properties of each container group including containers, image registry credentials, + * restart policy, IP address type, OS type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the specified container group in the specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String containerGroupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, containerGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the properties of the specified container group in the specified subscription and resource group. The + * operation returns the properties of each container group including containers, image registry credentials, + * restart policy, IP address type, OS type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the specified container group in the specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync( + String resourceGroupName, String containerGroupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, containerGroupName, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the properties of the specified container group in the specified subscription and resource group. The + * operation returns the properties of each container group including containers, image registry credentials, + * restart policy, IP address type, OS type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the specified container group in the specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerGroupInner getByResourceGroup(String resourceGroupName, String containerGroupName) { + return getByResourceGroupAsync(resourceGroupName, containerGroupName).block(); + } + + /** + * Gets the properties of the specified container group in the specified subscription and resource group. The + * operation returns the properties of each container group including containers, image registry credentials, + * restart policy, IP address type, OS type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the specified container group in the specified subscription and resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerGroupInner getByResourceGroup( + String resourceGroupName, String containerGroupName, Context context) { + return getByResourceGroupAsync(resourceGroupName, containerGroupName, context).block(); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + if (containerGroup == null) { + return Mono.error(new IllegalArgumentException("Parameter containerGroup is required and cannot be null.")); + } else { + containerGroup.validate(); + } + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + containerGroup, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + if (containerGroup == null) { + return Mono.error(new IllegalArgumentException("Parameter containerGroup is required and cannot be null.")); + } else { + containerGroup.validate(); + } + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + containerGroup, + context); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, ContainerGroupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, containerGroupName, containerGroup); + return this + .client + .getLroResultAsync( + mono, this.client.getHttpPipeline(), ContainerGroupInner.class, ContainerGroupInner.class); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, ContainerGroupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup, Context context) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, containerGroupName, containerGroup, context); + return this + .client + .getLroResultAsync( + mono, this.client.getHttpPipeline(), ContainerGroupInner.class, ContainerGroupInner.class); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ContainerGroupInner> beginCreateOrUpdate( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { + return beginCreateOrUpdateAsync(resourceGroupName, containerGroupName, containerGroup).getSyncPoller(); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ContainerGroupInner> beginCreateOrUpdate( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, containerGroupName, containerGroup, context).getSyncPoller(); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { + return beginCreateOrUpdateAsync(resourceGroupName, containerGroupName, containerGroup) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, containerGroupName, containerGroup, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerGroupInner createOrUpdate( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { + return createOrUpdateAsync(resourceGroupName, containerGroupName, containerGroup).block(); + } + + /** + * Create or update container groups with specified configurations. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerGroup A container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerGroupInner createOrUpdate( + String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup, Context context) { + return createOrUpdateAsync(resourceGroupName, containerGroupName, containerGroup, context).block(); + } + + /** + * Updates container group tags with specified values. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param resource The Resource model definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, String containerGroupName, Resource resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + resource, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Updates container group tags with specified values. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param resource The Resource model definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, String containerGroupName, Resource resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + resource, + context); + } + + /** + * Updates container group tags with specified values. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param resource The Resource model definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, String containerGroupName, Resource resource) { + return updateWithResponseAsync(resourceGroupName, containerGroupName, resource) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates container group tags with specified values. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param resource The Resource model definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, String containerGroupName, Resource resource, Context context) { + return updateWithResponseAsync(resourceGroupName, containerGroupName, resource, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates container group tags with specified values. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param resource The Resource model definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerGroupInner update(String resourceGroupName, String containerGroupName, Resource resource) { + return updateAsync(resourceGroupName, containerGroupName, resource).block(); + } + + /** + * Updates container group tags with specified values. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param resource The Resource model definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerGroupInner update( + String resourceGroupName, String containerGroupName, Resource resource, Context context) { + return updateAsync(resourceGroupName, containerGroupName, resource, context).block(); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync( + String resourceGroupName, String containerGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync( + String resourceGroupName, String containerGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, ContainerGroupInner> beginDeleteAsync( + String resourceGroupName, String containerGroupName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerGroupName); + return this + .client + .getLroResultAsync( + mono, this.client.getHttpPipeline(), ContainerGroupInner.class, ContainerGroupInner.class); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, ContainerGroupInner> beginDeleteAsync( + String resourceGroupName, String containerGroupName, Context context) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerGroupName, context); + return this + .client + .getLroResultAsync( + mono, this.client.getHttpPipeline(), ContainerGroupInner.class, ContainerGroupInner.class); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ContainerGroupInner> beginDelete( + String resourceGroupName, String containerGroupName) { + return beginDeleteAsync(resourceGroupName, containerGroupName).getSyncPoller(); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ContainerGroupInner> beginDelete( + String resourceGroupName, String containerGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, containerGroupName, context).getSyncPoller(); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String containerGroupName) { + return beginDeleteAsync(resourceGroupName, containerGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String containerGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, containerGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerGroupInner delete(String resourceGroupName, String containerGroupName) { + return deleteAsync(resourceGroupName, containerGroupName).block(); + } + + /** + * Delete the specified container group in the specified subscription and resource group. The operation does not + * delete other resources provided by the user, such as volumes. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerGroupInner delete(String resourceGroupName, String containerGroupName, Context context) { + return deleteAsync(resourceGroupName, containerGroupName, context).block(); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> restartWithResponseAsync( + String resourceGroupName, String containerGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .restart( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> restartWithResponseAsync( + String resourceGroupName, String containerGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .restart( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, Void> beginRestartAsync(String resourceGroupName, String containerGroupName) { + Mono>> mono = restartWithResponseAsync(resourceGroupName, containerGroupName); + return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, Void> beginRestartAsync( + String resourceGroupName, String containerGroupName, Context context) { + Mono>> mono = + restartWithResponseAsync(resourceGroupName, containerGroupName, context); + return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestart(String resourceGroupName, String containerGroupName) { + return beginRestartAsync(resourceGroupName, containerGroupName).getSyncPoller(); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRestart( + String resourceGroupName, String containerGroupName, Context context) { + return beginRestartAsync(resourceGroupName, containerGroupName, context).getSyncPoller(); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono restartAsync(String resourceGroupName, String containerGroupName) { + return beginRestartAsync(resourceGroupName, containerGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono restartAsync(String resourceGroupName, String containerGroupName, Context context) { + return beginRestartAsync(resourceGroupName, containerGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restart(String resourceGroupName, String containerGroupName) { + restartAsync(resourceGroupName, containerGroupName).block(); + } + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restart(String resourceGroupName, String containerGroupName, Context context) { + restartAsync(resourceGroupName, containerGroupName, context).block(); + } + + /** + * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopWithResponseAsync(String resourceGroupName, String containerGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .stop( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopWithResponseAsync( + String resourceGroupName, String containerGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .stop( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context); + } + + /** + * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopAsync(String resourceGroupName, String containerGroupName) { + return stopWithResponseAsync(resourceGroupName, containerGroupName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopAsync(String resourceGroupName, String containerGroupName, Context context) { + return stopWithResponseAsync(resourceGroupName, containerGroupName, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String resourceGroupName, String containerGroupName) { + stopAsync(resourceGroupName, containerGroupName).block(); + } + + /** + * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String resourceGroupName, String containerGroupName, Context context) { + stopAsync(resourceGroupName, containerGroupName, context).block(); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> startWithResponseAsync( + String resourceGroupName, String containerGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .start( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> startWithResponseAsync( + String resourceGroupName, String containerGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .start( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + context); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, Void> beginStartAsync(String resourceGroupName, String containerGroupName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, containerGroupName); + return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PollerFlux, Void> beginStartAsync( + String resourceGroupName, String containerGroupName, Context context) { + Mono>> mono = startWithResponseAsync(resourceGroupName, containerGroupName, context); + return this.client.getLroResultAsync(mono, this.client.getHttpPipeline(), Void.class, Void.class); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStart(String resourceGroupName, String containerGroupName) { + return beginStartAsync(resourceGroupName, containerGroupName).getSyncPoller(); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStart( + String resourceGroupName, String containerGroupName, Context context) { + return beginStartAsync(resourceGroupName, containerGroupName, context).getSyncPoller(); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startAsync(String resourceGroupName, String containerGroupName) { + return beginStartAsync(resourceGroupName, containerGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startAsync(String resourceGroupName, String containerGroupName, Context context) { + return beginStartAsync(resourceGroupName, containerGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String containerGroupName) { + startAsync(resourceGroupName, containerGroupName).block(); + } + + /** + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String containerGroupName, Context context) { + startAsync(resourceGroupName, containerGroupName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the container group list response that contains the container group properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the container group list response that contains the container group properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the container group list response that contains the container group properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listByResourceGroupNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the container group list response that contains the container group properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java new file mode 100644 index 000000000000..2045796462bb --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java @@ -0,0 +1,569 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManagementClient; +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerExecResponseInner; +import com.azure.resourcemanager.containerinstance.fluent.inner.LogsInner; +import com.azure.resourcemanager.containerinstance.models.ContainerExecRequest; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Containers. */ +public final class ContainersClient { + private final ClientLogger logger = new ClientLogger(ContainersClient.class); + + /** The proxy service used to perform REST calls. */ + private final ContainersService service; + + /** The service client containing this operation class. */ + private final ContainerInstanceManagementClient client; + + /** + * Initializes an instance of ContainersClient. + * + * @param client the instance of the service client containing this operation class. + */ + public ContainersClient(ContainerInstanceManagementClient client) { + this.service = + RestProxy.create(ContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerInstanceManagementClientContainers to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerInstanceMan") + private interface ContainersService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}/containers/{containerName}/logs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listLogs( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + @PathParam("containerName") String containerName, + @QueryParam("tail") Integer tail, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance" + + "/containerGroups/{containerGroupName}/containers/{containerName}/exec") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> executeCommand( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerGroupName") String containerGroupName, + @PathParam("containerName") String containerName, + @BodyParam("application/json") ContainerExecRequest containerExecRequest, + Context context); + } + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param tail The number of lines to show from the tail of the container instance log. If not provided, all + * available logs are shown up to 4mb. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the logs for a specified container instance in a specified resource group and container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listLogsWithResponseAsync( + String resourceGroupName, String containerGroupName, String containerName, Integer tail) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + if (containerName == null) { + return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .listLogs( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + containerName, + tail, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param tail The number of lines to show from the tail of the container instance log. If not provided, all + * available logs are shown up to 4mb. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the logs for a specified container instance in a specified resource group and container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listLogsWithResponseAsync( + String resourceGroupName, String containerGroupName, String containerName, Integer tail, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + if (containerName == null) { + return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listLogs( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + containerName, + tail, + context); + } + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param tail The number of lines to show from the tail of the container instance log. If not provided, all + * available logs are shown up to 4mb. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the logs for a specified container instance in a specified resource group and container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listLogsAsync( + String resourceGroupName, String containerGroupName, String containerName, Integer tail) { + return listLogsWithResponseAsync(resourceGroupName, containerGroupName, containerName, tail) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param tail The number of lines to show from the tail of the container instance log. If not provided, all + * available logs are shown up to 4mb. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the logs for a specified container instance in a specified resource group and container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listLogsAsync( + String resourceGroupName, String containerGroupName, String containerName, Integer tail, Context context) { + return listLogsWithResponseAsync(resourceGroupName, containerGroupName, containerName, tail, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the logs for a specified container instance in a specified resource group and container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listLogsAsync(String resourceGroupName, String containerGroupName, String containerName) { + final Integer tail = null; + final Context context = null; + return listLogsWithResponseAsync(resourceGroupName, containerGroupName, containerName, tail) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param tail The number of lines to show from the tail of the container instance log. If not provided, all + * available logs are shown up to 4mb. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the logs for a specified container instance in a specified resource group and container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogsInner listLogs(String resourceGroupName, String containerGroupName, String containerName, Integer tail) { + return listLogsAsync(resourceGroupName, containerGroupName, containerName, tail).block(); + } + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param tail The number of lines to show from the tail of the container instance log. If not provided, all + * available logs are shown up to 4mb. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the logs for a specified container instance in a specified resource group and container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogsInner listLogs( + String resourceGroupName, String containerGroupName, String containerName, Integer tail, Context context) { + return listLogsAsync(resourceGroupName, containerGroupName, containerName, tail, context).block(); + } + + /** + * Get the logs for a specified container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the logs for a specified container instance in a specified resource group and container group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogsInner listLogs(String resourceGroupName, String containerGroupName, String containerName) { + final Integer tail = null; + final Context context = null; + return listLogsAsync(resourceGroupName, containerGroupName, containerName, tail).block(); + } + + /** + * Executes a command for a specific container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The container exec request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the information for the container exec command. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> executeCommandWithResponseAsync( + String resourceGroupName, + String containerGroupName, + String containerName, + ContainerExecRequest containerExecRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + if (containerName == null) { + return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); + } + if (containerExecRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerExecRequest is required and cannot be null.")); + } else { + containerExecRequest.validate(); + } + return FluxUtil + .withContext( + context -> + service + .executeCommand( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + containerName, + containerExecRequest, + context)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Executes a command for a specific container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The container exec request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the information for the container exec command. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> executeCommandWithResponseAsync( + String resourceGroupName, + String containerGroupName, + String containerName, + ContainerExecRequest containerExecRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } + if (containerName == null) { + return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); + } + if (containerExecRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerExecRequest is required and cannot be null.")); + } else { + containerExecRequest.validate(); + } + context = this.client.mergeContext(context); + return service + .executeCommand( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resourceGroupName, + containerGroupName, + containerName, + containerExecRequest, + context); + } + + /** + * Executes a command for a specific container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The container exec request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the information for the container exec command. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono executeCommandAsync( + String resourceGroupName, + String containerGroupName, + String containerName, + ContainerExecRequest containerExecRequest) { + return executeCommandWithResponseAsync( + resourceGroupName, containerGroupName, containerName, containerExecRequest) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Executes a command for a specific container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The container exec request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the information for the container exec command. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono executeCommandAsync( + String resourceGroupName, + String containerGroupName, + String containerName, + ContainerExecRequest containerExecRequest, + Context context) { + return executeCommandWithResponseAsync( + resourceGroupName, containerGroupName, containerName, containerExecRequest, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Executes a command for a specific container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The container exec request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the information for the container exec command. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerExecResponseInner executeCommand( + String resourceGroupName, + String containerGroupName, + String containerName, + ContainerExecRequest containerExecRequest) { + return executeCommandAsync(resourceGroupName, containerGroupName, containerName, containerExecRequest).block(); + } + + /** + * Executes a command for a specific container instance in a specified resource group and container group. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @param containerName The name of the container instance. + * @param containerExecRequest The container exec request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the information for the container exec command. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerExecResponseInner executeCommand( + String resourceGroupName, + String containerGroupName, + String containerName, + ContainerExecRequest containerExecRequest, + Context context) { + return executeCommandAsync(resourceGroupName, containerGroupName, containerName, containerExecRequest, context) + .block(); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java new file mode 100644 index 000000000000..c59e1fec9f11 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java @@ -0,0 +1,678 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManagementClient; +import com.azure.resourcemanager.containerinstance.fluent.inner.CachedImagesListResultInner; +import com.azure.resourcemanager.containerinstance.fluent.inner.CapabilitiesListResultInner; +import com.azure.resourcemanager.containerinstance.fluent.inner.UsageInner; +import com.azure.resourcemanager.containerinstance.fluent.inner.UsageListResultInner; +import com.azure.resourcemanager.containerinstance.models.CachedImages; +import com.azure.resourcemanager.containerinstance.models.Capabilities; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Locations. */ +public final class LocationsClient { + private final ClientLogger logger = new ClientLogger(LocationsClient.class); + + /** The proxy service used to perform REST calls. */ + private final LocationsService service; + + /** The service client containing this operation class. */ + private final ContainerInstanceManagementClient client; + + /** + * Initializes an instance of LocationsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public LocationsClient(ContainerInstanceManagementClient client) { + this.service = + RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerInstanceManagementClientLocations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerInstanceMan") + private interface LocationsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listUsage( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCachedImages( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCapabilities( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, + Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCachedImagesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCapabilitiesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Get the usage for a subscription. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the usage for a subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listUsageSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .listUsage( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the usage for a subscription. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the usage for a subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listUsageSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listUsage( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Get the usage for a subscription. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the usage for a subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listUsageAsync(String location) { + return new PagedFlux<>(() -> listUsageSinglePageAsync(location)); + } + + /** + * Get the usage for a subscription. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the usage for a subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listUsageAsync(String location, Context context) { + return new PagedFlux<>(() -> listUsageSinglePageAsync(location, context)); + } + + /** + * Get the usage for a subscription. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the usage for a subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsage(String location) { + return new PagedIterable<>(listUsageAsync(location)); + } + + /** + * Get the usage for a subscription. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the usage for a subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsage(String location, Context context) { + return new PagedIterable<>(listUsageAsync(location, context)); + } + + /** + * Get the list of cached images on specific OS type for a subscription in a region. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cached images on specific OS type for a subscription in a region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCachedImagesSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .listCachedImages( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the list of cached images on specific OS type for a subscription in a region. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cached images on specific OS type for a subscription in a region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCachedImagesSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listCachedImages( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the list of cached images on specific OS type for a subscription in a region. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cached images on specific OS type for a subscription in a region. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listCachedImagesAsync(String location) { + return new PagedFlux<>( + () -> listCachedImagesSinglePageAsync(location), nextLink -> listCachedImagesNextSinglePageAsync(nextLink)); + } + + /** + * Get the list of cached images on specific OS type for a subscription in a region. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cached images on specific OS type for a subscription in a region. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listCachedImagesAsync(String location, Context context) { + return new PagedFlux<>( + () -> listCachedImagesSinglePageAsync(location, context), + nextLink -> listCachedImagesNextSinglePageAsync(nextLink)); + } + + /** + * Get the list of cached images on specific OS type for a subscription in a region. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cached images on specific OS type for a subscription in a region. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCachedImages(String location) { + return new PagedIterable<>(listCachedImagesAsync(location)); + } + + /** + * Get the list of cached images on specific OS type for a subscription in a region. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cached images on specific OS type for a subscription in a region. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCachedImages(String location, Context context) { + return new PagedIterable<>(listCachedImagesAsync(location, context)); + } + + /** + * Get the list of CPU/memory/GPU capabilities of a region. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 CPU/memory/GPU capabilities of a region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCapabilitiesSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .listCapabilities( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the list of CPU/memory/GPU capabilities of a region. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 CPU/memory/GPU capabilities of a region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCapabilitiesSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listCapabilities( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the list of CPU/memory/GPU capabilities of a region. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 CPU/memory/GPU capabilities of a region. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listCapabilitiesAsync(String location) { + return new PagedFlux<>( + () -> listCapabilitiesSinglePageAsync(location), nextLink -> listCapabilitiesNextSinglePageAsync(nextLink)); + } + + /** + * Get the list of CPU/memory/GPU capabilities of a region. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 CPU/memory/GPU capabilities of a region. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listCapabilitiesAsync(String location, Context context) { + return new PagedFlux<>( + () -> listCapabilitiesSinglePageAsync(location, context), + nextLink -> listCapabilitiesNextSinglePageAsync(nextLink)); + } + + /** + * Get the list of CPU/memory/GPU capabilities of a region. + * + * @param location The identifier for the physical azure location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 CPU/memory/GPU capabilities of a region. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCapabilities(String location) { + return new PagedIterable<>(listCapabilitiesAsync(location)); + } + + /** + * Get the list of CPU/memory/GPU capabilities of a region. + * + * @param location The identifier for the physical azure location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 CPU/memory/GPU capabilities of a region. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCapabilities(String location, Context context) { + return new PagedIterable<>(listCapabilitiesAsync(location, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 containing cached images. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCachedImagesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listCachedImagesNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 containing cached images. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCachedImagesNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listCachedImagesNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 containing list of capabilities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCapabilitiesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listCapabilitiesNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 containing list of capabilities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCapabilitiesNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listCapabilitiesNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java new file mode 100644 index 000000000000..e9714bb5170d --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManagementClient; +import com.azure.resourcemanager.containerinstance.fluent.inner.OperationListResultInner; +import com.azure.resourcemanager.containerinstance.models.Operation; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Operations. */ +public final class OperationsClient { + private final ClientLogger logger = new ClientLogger(OperationsClient.class); + + /** The proxy service used to perform REST calls. */ + private final OperationsService service; + + /** The service client containing this operation class. */ + private final ContainerInstanceManagementClient client; + + /** + * Initializes an instance of OperationsClient. + * + * @param client the instance of the service client containing this operation class. + */ + public OperationsClient(ContainerInstanceManagementClient client) { + this.service = + RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerInstanceManagementClientOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerInstanceMan") + private interface OperationsService { + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("/providers/Microsoft.ContainerInstance/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, Context context); + + @Headers({"Accept: application/json", "Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * List the operations for Azure Container Instance service. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation list response that contains all operations for Azure Container Instance service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * List the operations for Azure Container Instance service. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation list response that contains all operations for Azure Container Instance service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List the operations for Azure Container Instance service. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation list response that contains all operations for Azure Container Instance service. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for Azure Container Instance service. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation list response that contains all operations for Azure Container Instance service. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for Azure Container Instance service. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation list response that contains all operations for Azure Container Instance service. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List the operations for Azure Container Instance service. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation list response that contains all operations for Azure Container Instance service. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation list response that contains all operations for Azure Container Instance service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.listNext(nextLink, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation list response that contains all operations for Azure Container Instance service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .listNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/CachedImagesListResultInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/CachedImagesListResultInner.java new file mode 100644 index 000000000000..f64efa9e2319 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/CachedImagesListResultInner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.models.CachedImages; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The CachedImagesListResult model. */ +@Fluent +public final class CachedImagesListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CachedImagesListResultInner.class); + + /* + * The list of cached images. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URI to fetch the next page of cached images. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: The list of cached images. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of cached images. + * + * @param value the value value to set. + * @return the CachedImagesListResultInner object itself. + */ + public CachedImagesListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of cached images. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URI to fetch the next page of cached images. + * + * @param nextLink the nextLink value to set. + * @return the CachedImagesListResultInner object itself. + */ + public CachedImagesListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/CapabilitiesListResultInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/CapabilitiesListResultInner.java new file mode 100644 index 000000000000..e9b423e9bace --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/CapabilitiesListResultInner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.models.Capabilities; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The CapabilitiesListResult model. */ +@Fluent +public final class CapabilitiesListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilitiesListResultInner.class); + + /* + * The list of capabilities. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URI to fetch the next page of capabilities. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: The list of capabilities. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of capabilities. + * + * @param value the value value to set. + * @return the CapabilitiesListResultInner object itself. + */ + public CapabilitiesListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of capabilities. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URI to fetch the next page of capabilities. + * + * @param nextLink the nextLink value to set. + * @return the CapabilitiesListResultInner object itself. + */ + public CapabilitiesListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerExecResponseInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerExecResponseInner.java new file mode 100644 index 000000000000..aed2b637abe5 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerExecResponseInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerExecResponse model. */ +@Fluent +public final class ContainerExecResponseInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerExecResponseInner.class); + + /* + * The uri for the exec websocket. + */ + @JsonProperty(value = "webSocketUri") + private String webSocketUri; + + /* + * The password to start the exec command. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the webSocketUri property: The uri for the exec websocket. + * + * @return the webSocketUri value. + */ + public String webSocketUri() { + return this.webSocketUri; + } + + /** + * Set the webSocketUri property: The uri for the exec websocket. + * + * @param webSocketUri the webSocketUri value to set. + * @return the ContainerExecResponseInner object itself. + */ + public ContainerExecResponseInner withWebSocketUri(String webSocketUri) { + this.webSocketUri = webSocketUri; + return this; + } + + /** + * Get the password property: The password to start the exec command. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password to start the exec command. + * + * @param password the password value to set. + * @return the ContainerExecResponseInner object itself. + */ + public ContainerExecResponseInner withPassword(String password) { + this.password = password; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerGroupInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerGroupInner.java new file mode 100644 index 000000000000..08685baccde6 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerGroupInner.java @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.models.Container; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupDiagnostics; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupIdentity; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupNetworkProfile; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupPropertiesInstanceView; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupSku; +import com.azure.resourcemanager.containerinstance.models.DnsConfiguration; +import com.azure.resourcemanager.containerinstance.models.EncryptionProperties; +import com.azure.resourcemanager.containerinstance.models.ImageRegistryCredential; +import com.azure.resourcemanager.containerinstance.models.InitContainerDefinition; +import com.azure.resourcemanager.containerinstance.models.IpAddress; +import com.azure.resourcemanager.containerinstance.models.OperatingSystemTypes; +import com.azure.resourcemanager.containerinstance.models.Volume; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ContainerGroup model. */ +@JsonFlatten +@Fluent +public class ContainerGroupInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerGroupInner.class); + + /* + * The identity of the container group, if configured. + */ + @JsonProperty(value = "identity") + private ContainerGroupIdentity identity; + + /* + * The provisioning state of the container group. This only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The containers within the container group. + */ + @JsonProperty(value = "properties.containers", required = true) + private List containers; + + /* + * The image registry credentials by which the container group is created + * from. + */ + @JsonProperty(value = "properties.imageRegistryCredentials") + private List imageRegistryCredentials; + + /* + * Restart policy for all containers within the container group. + * - `Always` Always restart + * - `OnFailure` Restart on failure + * - `Never` Never restart + * + */ + @JsonProperty(value = "properties.restartPolicy") + private ContainerGroupRestartPolicy restartPolicy; + + /* + * The IP address type of the container group. + */ + @JsonProperty(value = "properties.ipAddress") + private IpAddress ipAddress; + + /* + * The operating system type required by the containers in the container + * group. + */ + @JsonProperty(value = "properties.osType", required = true) + private OperatingSystemTypes osType; + + /* + * The list of volumes that can be mounted by containers in this container + * group. + */ + @JsonProperty(value = "properties.volumes") + private List volumes; + + /* + * The instance view of the container group. Only valid in response. + */ + @JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY) + private ContainerGroupPropertiesInstanceView instanceView; + + /* + * The diagnostic information for a container group. + */ + @JsonProperty(value = "properties.diagnostics") + private ContainerGroupDiagnostics diagnostics; + + /* + * The network profile information for a container group. + */ + @JsonProperty(value = "properties.networkProfile") + private ContainerGroupNetworkProfile networkProfile; + + /* + * The DNS config information for a container group. + */ + @JsonProperty(value = "properties.dnsConfig") + private DnsConfiguration dnsConfig; + + /* + * The SKU for a container group. + */ + @JsonProperty(value = "properties.sku") + private ContainerGroupSku sku; + + /* + * The encryption properties for a container group. + */ + @JsonProperty(value = "properties.encryptionProperties") + private EncryptionProperties encryptionProperties; + + /* + * The init containers for a container group. + */ + @JsonProperty(value = "properties.initContainers") + private List initContainers; + + /** + * Get the identity property: The identity of the container group, if configured. + * + * @return the identity value. + */ + public ContainerGroupIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the container group, if configured. + * + * @param identity the identity value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withIdentity(ContainerGroupIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the container group. This only appears in the + * response. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the containers property: The containers within the container group. + * + * @return the containers value. + */ + public List containers() { + return this.containers; + } + + /** + * Set the containers property: The containers within the container group. + * + * @param containers the containers value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withContainers(List containers) { + this.containers = containers; + return this; + } + + /** + * Get the imageRegistryCredentials property: The image registry credentials by which the container group is created + * from. + * + * @return the imageRegistryCredentials value. + */ + public List imageRegistryCredentials() { + return this.imageRegistryCredentials; + } + + /** + * Set the imageRegistryCredentials property: The image registry credentials by which the container group is created + * from. + * + * @param imageRegistryCredentials the imageRegistryCredentials value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withImageRegistryCredentials(List imageRegistryCredentials) { + this.imageRegistryCredentials = imageRegistryCredentials; + return this; + } + + /** + * Get the restartPolicy property: Restart policy for all containers within the container group. - `Always` Always + * restart - `OnFailure` Restart on failure - `Never` Never restart. + * + * @return the restartPolicy value. + */ + public ContainerGroupRestartPolicy restartPolicy() { + return this.restartPolicy; + } + + /** + * Set the restartPolicy property: Restart policy for all containers within the container group. - `Always` Always + * restart - `OnFailure` Restart on failure - `Never` Never restart. + * + * @param restartPolicy the restartPolicy value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withRestartPolicy(ContainerGroupRestartPolicy restartPolicy) { + this.restartPolicy = restartPolicy; + return this; + } + + /** + * Get the ipAddress property: The IP address type of the container group. + * + * @return the ipAddress value. + */ + public IpAddress ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: The IP address type of the container group. + * + * @param ipAddress the ipAddress value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withIpAddress(IpAddress ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the osType property: The operating system type required by the containers in the container group. + * + * @return the osType value. + */ + public OperatingSystemTypes osType() { + return this.osType; + } + + /** + * Set the osType property: The operating system type required by the containers in the container group. + * + * @param osType the osType value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get the volumes property: The list of volumes that can be mounted by containers in this container group. + * + * @return the volumes value. + */ + public List volumes() { + return this.volumes; + } + + /** + * Set the volumes property: The list of volumes that can be mounted by containers in this container group. + * + * @param volumes the volumes value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withVolumes(List volumes) { + this.volumes = volumes; + return this; + } + + /** + * Get the instanceView property: The instance view of the container group. Only valid in response. + * + * @return the instanceView value. + */ + public ContainerGroupPropertiesInstanceView instanceView() { + return this.instanceView; + } + + /** + * Get the diagnostics property: The diagnostic information for a container group. + * + * @return the diagnostics value. + */ + public ContainerGroupDiagnostics diagnostics() { + return this.diagnostics; + } + + /** + * Set the diagnostics property: The diagnostic information for a container group. + * + * @param diagnostics the diagnostics value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withDiagnostics(ContainerGroupDiagnostics diagnostics) { + this.diagnostics = diagnostics; + return this; + } + + /** + * Get the networkProfile property: The network profile information for a container group. + * + * @return the networkProfile value. + */ + public ContainerGroupNetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: The network profile information for a container group. + * + * @param networkProfile the networkProfile value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withNetworkProfile(ContainerGroupNetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the dnsConfig property: The DNS config information for a container group. + * + * @return the dnsConfig value. + */ + public DnsConfiguration dnsConfig() { + return this.dnsConfig; + } + + /** + * Set the dnsConfig property: The DNS config information for a container group. + * + * @param dnsConfig the dnsConfig value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withDnsConfig(DnsConfiguration dnsConfig) { + this.dnsConfig = dnsConfig; + return this; + } + + /** + * Get the sku property: The SKU for a container group. + * + * @return the sku value. + */ + public ContainerGroupSku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU for a container group. + * + * @param sku the sku value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withSku(ContainerGroupSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the encryptionProperties property: The encryption properties for a container group. + * + * @return the encryptionProperties value. + */ + public EncryptionProperties encryptionProperties() { + return this.encryptionProperties; + } + + /** + * Set the encryptionProperties property: The encryption properties for a container group. + * + * @param encryptionProperties the encryptionProperties value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withEncryptionProperties(EncryptionProperties encryptionProperties) { + this.encryptionProperties = encryptionProperties; + return this; + } + + /** + * Get the initContainers property: The init containers for a container group. + * + * @return the initContainers value. + */ + public List initContainers() { + return this.initContainers; + } + + /** + * Set the initContainers property: The init containers for a container group. + * + * @param initContainers the initContainers value to set. + * @return the ContainerGroupInner object itself. + */ + public ContainerGroupInner withInitContainers(List initContainers) { + this.initContainers = initContainers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (containers() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property containers in model ContainerGroupInner")); + } else { + containers().forEach(e -> e.validate()); + } + if (imageRegistryCredentials() != null) { + imageRegistryCredentials().forEach(e -> e.validate()); + } + if (ipAddress() != null) { + ipAddress().validate(); + } + if (osType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property osType in model ContainerGroupInner")); + } + if (volumes() != null) { + volumes().forEach(e -> e.validate()); + } + if (instanceView() != null) { + instanceView().validate(); + } + if (diagnostics() != null) { + diagnostics().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + if (dnsConfig() != null) { + dnsConfig().validate(); + } + if (encryptionProperties() != null) { + encryptionProperties().validate(); + } + if (initContainers() != null) { + initContainers().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerGroupListResultInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerGroupListResultInner.java new file mode 100644 index 000000000000..62470b83017a --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/ContainerGroupListResultInner.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ContainerGroupListResult model. */ +@Fluent +public final class ContainerGroupListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerGroupListResultInner.class); + + /* + * The list of container groups. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URI to fetch the next page of container groups. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: The list of container groups. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of container groups. + * + * @param value the value value to set. + * @return the ContainerGroupListResultInner object itself. + */ + public ContainerGroupListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of container groups. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URI to fetch the next page of container groups. + * + * @param nextLink the nextLink value to set. + * @return the ContainerGroupListResultInner object itself. + */ + public ContainerGroupListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/LogsInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/LogsInner.java new file mode 100644 index 000000000000..564bc70772cb --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/LogsInner.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Logs model. */ +@Fluent +public final class LogsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LogsInner.class); + + /* + * The content of the log. + */ + @JsonProperty(value = "content") + private String content; + + /** + * Get the content property: The content of the log. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Set the content property: The content of the log. + * + * @param content the content value to set. + * @return the LogsInner object itself. + */ + public LogsInner withContent(String content) { + this.content = content; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/OperationListResultInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/OperationListResultInner.java new file mode 100644 index 000000000000..5d3f2be41b84 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/OperationListResultInner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.models.Operation; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The OperationListResult model. */ +@Fluent +public final class OperationListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class); + + /* + * The list of operations. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URI to fetch the next page of operations. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: The list of operations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of operations. + * + * @param value the value value to set. + * @return the OperationListResultInner object itself. + */ + public OperationListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of operations. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URI to fetch the next page of operations. + * + * @param nextLink the nextLink value to set. + * @return the OperationListResultInner object itself. + */ + public OperationListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/UsageInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/UsageInner.java new file mode 100644 index 000000000000..3896343abefe --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/UsageInner.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerinstance.models.UsageName; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Usage model. */ +@Immutable +public final class UsageInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageInner.class); + + /* + * Unit of the usage result + */ + @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /* + * The current usage of the resource + */ + @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) + private Integer currentValue; + + /* + * The maximum permitted usage of the resource. + */ + @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) + private Integer limit; + + /* + * The name object of the resource + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private UsageName name; + + /** + * Get the unit property: Unit of the usage result. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Get the currentValue property: The current usage of the resource. + * + * @return the currentValue value. + */ + public Integer currentValue() { + return this.currentValue; + } + + /** + * Get the limit property: The maximum permitted usage of the resource. + * + * @return the limit value. + */ + public Integer limit() { + return this.limit; + } + + /** + * Get the name property: The name object of the resource. + * + * @return the name value. + */ + public UsageName name() { + return this.name; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() != null) { + name().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/UsageListResultInner.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/UsageListResultInner.java new file mode 100644 index 000000000000..aefd988a84cc --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/UsageListResultInner.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.fluent.inner; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The UsageListResult model. */ +@Immutable +public final class UsageListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageListResultInner.class); + + /* + * The usage data. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /** + * Get the value property: The usage data. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/package-info.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/package-info.java new file mode 100644 index 000000000000..a83bf45d9d4c --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/inner/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the inner classes for ContainerInstanceManagementClient. null. */ +package com.azure.resourcemanager.containerinstance.fluent.inner; diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/package-info.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/package-info.java new file mode 100644 index 000000000000..d66f871c6568 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/fluent/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the client classes for ContainerInstanceManagementClient. null. */ +package com.azure.resourcemanager.containerinstance.fluent; diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerExecResponseImpl.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerExecResponseImpl.java new file mode 100644 index 000000000000..ba1a041f1be4 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerExecResponseImpl.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.implementation; + +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerExecResponseInner; +import com.azure.resourcemanager.containerinstance.models.ContainerExecResponse; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl; + +/** Implementation for RegistryCredentials. */ +public class ContainerExecResponseImpl extends WrapperImpl + implements ContainerExecResponse { + protected ContainerExecResponseImpl(ContainerExecResponseInner innerObject) { + super(innerObject); + } + + @Override + public String webSocketUri() { + return this.inner().webSocketUri(); + } + + @Override + public String password() { + return this.inner().password(); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupImpl.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupImpl.java new file mode 100644 index 000000000000..fc17c487b271 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupImpl.java @@ -0,0 +1,818 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.implementation; + +import com.azure.core.management.Resource; +import com.azure.resourcemanager.authorization.implementation.RoleAssignmentHelper; +import com.azure.resourcemanager.authorization.models.BuiltInRole; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManager; +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerGroupInner; +import com.azure.resourcemanager.containerinstance.models.Container; +import com.azure.resourcemanager.containerinstance.models.ContainerExecRequest; +import com.azure.resourcemanager.containerinstance.models.ContainerExecRequestTerminalSize; +import com.azure.resourcemanager.containerinstance.models.ContainerExecResponse; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupDiagnostics; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupIpAddressType; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupNetworkProfile; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupNetworkProtocol; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; +import com.azure.resourcemanager.containerinstance.models.DnsConfiguration; +import com.azure.resourcemanager.containerinstance.models.Event; +import com.azure.resourcemanager.containerinstance.models.ImageRegistryCredential; +import com.azure.resourcemanager.containerinstance.models.IpAddress; +import com.azure.resourcemanager.containerinstance.models.LogAnalytics; +import com.azure.resourcemanager.containerinstance.models.LogAnalyticsLogType; +import com.azure.resourcemanager.containerinstance.models.OperatingSystemTypes; +import com.azure.resourcemanager.containerinstance.models.Port; +import com.azure.resourcemanager.containerinstance.models.ResourceIdentityType; +import com.azure.resourcemanager.containerinstance.models.Volume; +import com.azure.resourcemanager.msi.models.Identity; +import com.azure.resourcemanager.network.fluent.inner.IpConfigurationProfileInner; +import com.azure.resourcemanager.network.fluent.inner.NetworkProfileInner; +import com.azure.resourcemanager.network.fluent.inner.SubnetInner; +import com.azure.resourcemanager.network.models.ContainerNetworkInterfaceConfiguration; +import com.azure.resourcemanager.network.models.Network; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.GroupableParentResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.utils.Utils; +import com.azure.resourcemanager.storage.models.StorageAccount; +import com.azure.storage.file.share.ShareServiceAsyncClient; +import com.azure.storage.file.share.ShareServiceClientBuilder; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** Implementation for ContainerGroup and its create interfaces. */ +public class ContainerGroupImpl + extends GroupableParentResourceImpl< + ContainerGroup, ContainerGroupInner, ContainerGroupImpl, ContainerInstanceManager> + implements ContainerGroup, ContainerGroup.Definition, ContainerGroup.Update { + + private String creatableStorageAccountKey; + private Creatable creatableVirtualNetwork; + private NetworkProfileInner creatableNetworkProfileInner; + private String creatableNetworkProfileName; + private Map newFileShares; + + private Map containers; + private Map volumes; + private List imageRegistryServers; + private int[] externalTcpPorts; + private int[] externalUdpPorts; + private ContainerGroupMsiHandler containerGroupMsiHandler; + + protected ContainerGroupImpl(String name, ContainerGroupInner innerObject, ContainerInstanceManager manager) { + super(name, innerObject, manager); + this.containerGroupMsiHandler = new ContainerGroupMsiHandler(this); + initializeChildrenFromInner(); + } + + private Mono beforeCreation() { + Mono mono = Mono.empty(); + if (creatableVirtualNetwork != null) { + mono = + mono + .then(creatableVirtualNetwork.createAsync().last()) + .flatMap( + network -> { + creatableVirtualNetwork = null; + return Mono.empty(); + }); + } + if (creatableNetworkProfileName != null && creatableNetworkProfileInner != null) { + mono = + mono + .then( + manager() + .networkManager() + .inner() + .getNetworkProfiles() + .createOrUpdateAsync( + resourceGroupName(), creatableNetworkProfileName, creatableNetworkProfileInner) + .flatMap( + profile -> { + creatableNetworkProfileName = null; + creatableNetworkProfileInner = null; + return Mono.empty(); + })); + } + return mono; + } + + @Override + protected Mono createInner() { + this.containerGroupMsiHandler.processCreatedExternalIdentities(); + this.containerGroupMsiHandler.handleExternalIdentities(); + final ContainerGroupImpl self = this; + + if (!isInCreateMode()) { + Resource resource = new Resource(); + resource.withLocation(self.regionName()); + resource.withTags(self.tags()); + return beforeCreation() + .then( + manager() + .inner() + .getContainerGroups() + .updateAsync(self.resourceGroupName(), self.name(), resource)); + } else if (newFileShares == null || creatableStorageAccountKey == null) { + return beforeCreation() + .then(manager().inner().getContainerGroups().createOrUpdateAsync(resourceGroupName(), name(), inner())); + } else { + final StorageAccount storageAccount = this.taskResult(this.creatableStorageAccountKey); + return beforeCreation() + .thenMany(createFileShareAsync(storageAccount)) + .map( + volumeParameters -> + this + .defineVolume(volumeParameters.volumeName) + .withExistingReadWriteAzureFileShare(volumeParameters.fileShareName) + .withStorageAccountName(storageAccount.name()) + .withStorageAccountKey(volumeParameters.storageAccountKey) + .attach()) + .then( + this + .manager() + .inner() + .getContainerGroups() + .createOrUpdateAsync(resourceGroupName(), name(), inner())); + } + } + + private static class VolumeParameters { + private String volumeName; + private String fileShareName; + private String storageAccountKey; + + VolumeParameters(String volumeName, String fileShareName, String storageAccountKey) { + this.volumeName = volumeName; + this.fileShareName = fileShareName; + this.storageAccountKey = storageAccountKey; + } + } + + private Flux createFileShareAsync(final StorageAccount storageAccount) { + return storageAccount + .getKeysAsync() + .map(storageAccountKeys -> storageAccountKeys.get(0).value()) + .flatMapMany( + key -> { + ShareServiceAsyncClient shareServiceAsyncClient = + new ShareServiceClientBuilder() + .connectionString( + Utils.getStorageConnectionString(storageAccount.name(), key, manager().environment())) + .httpClient(manager().httpPipeline().getHttpClient()) + .buildAsyncClient(); + + Objects.requireNonNull(newFileShares); + return Flux + .fromIterable(newFileShares.entrySet()) + .flatMap( + fileShareEntry -> + createSingleFileShareAsync( + shareServiceAsyncClient, fileShareEntry.getKey(), fileShareEntry.getValue(), key)); + }); + } + + private Mono createSingleFileShareAsync( + final ShareServiceAsyncClient client, + final String volumeName, + final String fileShareName, + final String storageAccountKey) { + return client + .createShare(fileShareName) + .then(Mono.just(new VolumeParameters(volumeName, fileShareName, storageAccountKey))); + } + + @Override + protected void afterCreating() { + initializeChildrenFromInner(); + } + + @Override + protected void initializeChildrenFromInner() { + // Getting the container instances + this.containers = new HashMap<>(); + if (this.inner().containers() != null && this.inner().containers().size() > 0) { + for (Container containerInstance : this.inner().containers()) { + this.containers.put(containerInstance.name(), containerInstance); + } + } + + // Getting the volumes + this.volumes = new HashMap<>(); + if (this.inner().volumes() != null && this.inner().volumes().size() > 0) { + for (Volume volume : this.inner().volumes()) { + this.volumes.put(volume.name(), volume); + } + } + + // Getting the private image registry servers + this.imageRegistryServers = new ArrayList<>(); + if (this.inner().imageRegistryCredentials() != null && this.inner().imageRegistryCredentials().size() > 0) { + for (ImageRegistryCredential imageRegistry : this.inner().imageRegistryCredentials()) { + this.imageRegistryServers.add(imageRegistry.server()); + } + } + + // Splitting ports between TCP and UDP ports + if (this.inner().ipAddress() != null && this.inner().ipAddress().ports() != null) { + List tcpPorts = new ArrayList<>(); + List udpPorts = new ArrayList<>(); + for (Port port : this.inner().ipAddress().ports()) { + if (port.protocol().equals(ContainerGroupNetworkProtocol.TCP)) { + tcpPorts.add(port); + } else if (port.protocol().equals(ContainerGroupNetworkProtocol.UDP)) { + udpPorts.add(port); + } + } + this.externalTcpPorts = new int[tcpPorts.size()]; + for (int i = 0; i < this.externalTcpPorts.length; i++) { + this.externalTcpPorts[i] = tcpPorts.get(i).port(); + } + this.externalUdpPorts = new int[udpPorts.size()]; + for (int i = 0; i < this.externalTcpPorts.length; i++) { + this.externalTcpPorts[i] = tcpPorts.get(i).port(); + } + } else { + this.externalTcpPorts = new int[0]; + this.externalUdpPorts = new int[0]; + } + } + + // Verbs + + @Override + public Mono refreshAsync() { + return super + .refreshAsync() + .map( + containerGroup -> { + ContainerGroupImpl impl = (ContainerGroupImpl) containerGroup; + impl.initializeChildrenFromInner(); + return impl; + }); + } + + @Override + protected Mono getInnerAsync() { + return this + .manager() + .inner() + .getContainerGroups() + .getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public ContainerGroupImpl withLinux() { + this.inner().withOsType(OperatingSystemTypes.LINUX); + + return this; + } + + @Override + public ContainerGroupImpl withWindows() { + this.inner().withOsType(OperatingSystemTypes.WINDOWS); + + return this; + } + + @Override + public ContainerGroupImpl withSystemAssignedManagedServiceIdentity() { + this.containerGroupMsiHandler.withLocalManagedServiceIdentity(); + return this; + } + + @Override + public ContainerGroupImpl withSystemAssignedIdentityBasedAccessTo(String resourceId, BuiltInRole role) { + this.containerGroupMsiHandler.withAccessTo(resourceId, role); + return this; + } + + @Override + public ContainerGroupImpl withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(BuiltInRole role) { + this.containerGroupMsiHandler.withAccessToCurrentResourceGroup(role); + return this; + } + + @Override + public ContainerGroupImpl withSystemAssignedIdentityBasedAccessTo(String resourceId, String roleDefinitionId) { + this.containerGroupMsiHandler.withAccessTo(resourceId, roleDefinitionId); + return this; + } + + @Override + public ContainerGroupImpl withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(String roleDefinitionId) { + this.containerGroupMsiHandler.withAccessToCurrentResourceGroup(roleDefinitionId); + return this; + } + + @Override + public ContainerGroupImpl withNewUserAssignedManagedServiceIdentity(Creatable creatableIdentity) { + this.containerGroupMsiHandler.withNewExternalManagedServiceIdentity(creatableIdentity); + return this; + } + + @Override + public ContainerGroupImpl withExistingUserAssignedManagedServiceIdentity(Identity identity) { + this.containerGroupMsiHandler.withExistingExternalManagedServiceIdentity(identity); + return this; + } + + @Override + public ContainerGroupImpl withPublicImageRegistryOnly() { + this.inner().withImageRegistryCredentials(null); + + return this; + } + + @Override + public ContainerGroupImpl withPrivateImageRegistry(String server, String username, String password) { + if (this.inner().imageRegistryCredentials() == null) { + this.inner().withImageRegistryCredentials(new ArrayList()); + } + this + .inner() + .imageRegistryCredentials() + .add(new ImageRegistryCredential().withServer(server).withUsername(username).withPassword(password)); + + return this; + } + + @Override + public ContainerGroupImpl withNewAzureFileShareVolume(String volumeName, String shareName) { + if (this.newFileShares == null || this.creatableStorageAccountKey == null) { + StorageAccount.DefinitionStages.WithGroup definitionWithGroup = + manager() + .storageManager() + .storageAccounts() + .define(manager().sdkContext().randomResourceName("fs", 24)) + .withRegion(this.regionName()); + Creatable creatable; + if (this.creatableGroup != null) { + creatable = definitionWithGroup.withNewResourceGroup(this.creatableGroup); + } else { + creatable = definitionWithGroup.withExistingResourceGroup(this.resourceGroupName()); + } + this.creatableStorageAccountKey = this.addDependency(creatable); + this.newFileShares = new HashMap<>(); + } + this.newFileShares.put(volumeName, shareName); + + return this; + } + + @Override + public ContainerGroupImpl withEmptyDirectoryVolume(String volumeName) { + if (this.inner().volumes() == null) { + this.inner().withVolumes(new ArrayList()); + } + this.inner().volumes().add(new Volume().withName(volumeName).withEmptyDir(new Object())); + + return this; + } + + @Override + public VolumeImpl defineVolume(String name) { + return new VolumeImpl(this, name); + } + + @Override + public ContainerGroupImpl withoutVolume() { + this.inner().withVolumes(null); + + return this; + } + + @Override + public ContainerImpl defineContainerInstance(String name) { + return new ContainerImpl(this, name); + } + + @Override + public ContainerGroupImpl withContainerInstance(String imageName) { + return this + .defineContainerInstance(this.name()) + .withImage(imageName) + .withoutPorts() + .withCpuCoreCount(1) + .withMemorySizeInGB(1.5) + .attach(); + } + + @Override + public ContainerGroupImpl withContainerInstance(String imageName, int port) { + return this + .defineContainerInstance(this.name()) + .withImage(imageName) + .withExternalTcpPort(port) + .withCpuCoreCount(1) + .withMemorySizeInGB(1.5) + .attach(); + } + + @Override + public ContainerGroupImpl withRestartPolicy(ContainerGroupRestartPolicy restartPolicy) { + this.inner().withRestartPolicy(restartPolicy); + + return this; + } + + @Override + public ContainerGroupImpl withDnsPrefix(String dnsPrefix) { + if (this.inner().ipAddress() == null) { + this.inner().withIpAddress(new IpAddress()); + } + this.inner().ipAddress().withDnsNameLabel(dnsPrefix).withType(ContainerGroupIpAddressType.PUBLIC); + + return this; + } + + @Override + public ContainerGroupImpl withExistingNetworkProfile( + String subscriptionId, String resourceGroupName, String networkProfileName) { + String networkProfileId = + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Network/networkProfiles/" + + networkProfileName; + return this.withExistingNetworkProfile(networkProfileId); + } + + @Override + public ContainerGroupImpl withExistingNetworkProfile(String networkProfileId) { + this.inner().withNetworkProfile(new ContainerGroupNetworkProfile().withId(networkProfileId)); + if (this.inner().ipAddress() == null) { + this.inner().withIpAddress(new IpAddress()); + } + this.inner().ipAddress().withType(ContainerGroupIpAddressType.PRIVATE); + return this; + } + + @Override + public ContainerGroupImpl withNewNetworkProfileOnExistingVirtualNetwork( + String virtualNetworkId, String subnetName) { + creatableNetworkProfileName = manager().sdkContext().randomResourceName("aci-profile-", 20); + String subnetId = String.format("%s/subnets/%s", virtualNetworkId, subnetName); + SubnetInner subnetInner = new SubnetInner(); + subnetInner.withId(subnetId); + creatableNetworkProfileInner = + new NetworkProfileInner() + .withContainerNetworkInterfaceConfigurations( + Collections + .singletonList( + new ContainerNetworkInterfaceConfiguration() + .withName("eth0") + .withIpConfigurations( + Collections + .singletonList( + new IpConfigurationProfileInner() + .withName("ipconfig0") + .withSubnet(subnetInner))))); + creatableNetworkProfileInner.withLocation(regionName()); + + return this.withExistingNetworkProfile( + manager().subscriptionId(), resourceGroupName(), creatableNetworkProfileName); + } + + @Override + public ContainerGroupImpl withNewVirtualNetwork(String addressSpace) { + String virtualNetworkName = manager().sdkContext().randomResourceName("net", 20); + String subnetName = "subnet0"; + + creatableVirtualNetwork = + manager() + .networkManager() + .networks() + .define(virtualNetworkName) + .withRegion(region()) + .withExistingResourceGroup(resourceGroupName()) + .withAddressSpace(addressSpace) + .defineSubnet(subnetName) + .withAddressPrefix(addressSpace) + .withDelegation("Microsoft.ContainerInstance/containerGroups") + .attach(); + + String virtualNetworkId = + String + .format( + "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s", + manager().subscriptionId(), resourceGroupName(), virtualNetworkName); + return withNewNetworkProfileOnExistingVirtualNetwork(virtualNetworkId, subnetName); + } + + @Override + public ContainerGroupImpl withDnsServerNames(List dnsServerNames) { + this.inner().withDnsConfig(new DnsConfiguration().withNameServers(dnsServerNames)); + return this; + } + + @Override + public ContainerGroupImpl withDnsConfiguration( + List dnsServerNames, String dnsSearchDomains, String dnsOptions) { + this + .inner() + .withDnsConfig( + new DnsConfiguration() + .withNameServers(dnsServerNames) + .withSearchDomains(dnsSearchDomains) + .withOptions(dnsOptions)); + return this; + } + + @Override + public ContainerGroupImpl withLogAnalytics(String workspaceId, String workspaceKey) { + this + .inner() + .withDiagnostics( + new ContainerGroupDiagnostics() + .withLogAnalytics(new LogAnalytics().withWorkspaceId(workspaceId).withWorkspaceKey(workspaceKey))); + return this; + } + + @Override + public ContainerGroupImpl withLogAnalytics( + String workspaceId, String workspaceKey, LogAnalyticsLogType logType, Map metadata) { + this + .inner() + .withDiagnostics( + new ContainerGroupDiagnostics() + .withLogAnalytics( + new LogAnalytics() + .withWorkspaceId(workspaceId) + .withWorkspaceKey(workspaceKey) + .withLogType(logType) + .withMetadata(metadata))); + return this; + } + + @Override + public Map containers() { + return Collections.unmodifiableMap(this.containers); + } + + @Override + public Set externalPorts() { + return Collections + .unmodifiableSet( + this.inner().ipAddress() != null && this.inner().ipAddress().ports() != null + ? new HashSet(this.inner().ipAddress().ports()) + : new HashSet()); + } + + @Override + public int[] externalTcpPorts() { + return this.externalTcpPorts.clone(); + } + + @Override + public int[] externalUdpPorts() { + return this.externalUdpPorts.clone(); + } + + @Override + public Map volumes() { + return Collections.unmodifiableMap(this.volumes); + } + + @Override + public Collection imageRegistryServers() { + return Collections.unmodifiableCollection(this.imageRegistryServers); + } + + @Override + public ContainerGroupRestartPolicy restartPolicy() { + return this.inner().restartPolicy(); + } + + @Override + public String dnsPrefix() { + if (this.inner().ipAddress() != null) { + return this.inner().ipAddress().dnsNameLabel(); + } else { + return null; + } + } + + @Override + public String fqdn() { + if (this.inner().ipAddress() != null) { + return this.inner().ipAddress().fqdn(); + } else { + return null; + } + } + + @Override + public String ipAddress() { + if (this.inner().ipAddress() != null) { + return this.inner().ipAddress().ip(); + } else { + return null; + } + } + + @Override + public boolean isIPAddressPublic() { + return this.inner().ipAddress() != null + && this.inner().ipAddress().type() != null + && this.inner().ipAddress().type() == ContainerGroupIpAddressType.PUBLIC; + } + + @Override + public boolean isIPAddressPrivate() { + return this.inner().ipAddress() != null + && this.inner().ipAddress().type() != null + && this.inner().ipAddress().type() == ContainerGroupIpAddressType.PRIVATE; + } + + @Override + public OperatingSystemTypes osType() { + return this.inner().osType(); + } + + @Override + public String state() { + if (this.inner().instanceView() != null && this.inner().instanceView().state() != null) { + return this.inner().instanceView().state(); + } else { + return null; + } + } + + @Override + public String provisioningState() { + if (this.inner().provisioningState() != null) { + return this.inner().provisioningState(); + } else { + return null; + } + } + + @Override + public Set events() { + return Collections + .unmodifiableSet( + this.inner().instanceView() != null && this.inner().instanceView().events() != null + ? new HashSet(this.inner().instanceView().events()) + : new HashSet()); + } + + @Override + public DnsConfiguration dnsConfig() { + return this.inner().dnsConfig(); + } + + @Override + public String networkProfileId() { + return this.inner().networkProfile().id(); + } + + @Override + public boolean isManagedServiceIdentityEnabled() { + ResourceIdentityType type = this.managedServiceIdentityType(); + return type != null && !type.equals(ResourceIdentityType.NONE); + } + + @Override + public String systemAssignedManagedServiceIdentityTenantId() { + if (this.inner().identity() != null) { + return this.inner().identity().tenantId(); + } + return null; + } + + @Override + public String systemAssignedManagedServiceIdentityPrincipalId() { + if (this.inner().identity() != null) { + return this.inner().identity().principalId(); + } + return null; + } + + @Override + public ResourceIdentityType managedServiceIdentityType() { + if (this.inner().identity() != null) { + return this.inner().identity().type(); + } + return null; + } + + @Override + public Set userAssignedManagedServiceIdentityIds() { + if (this.inner().identity() != null && this.inner().identity().userAssignedIdentities() != null) { + return Collections + .unmodifiableSet(new HashSet(this.inner().identity().userAssignedIdentities().keySet())); + } + return Collections.unmodifiableSet(new HashSet()); + } + + @Override + public LogAnalytics logAnalytics() { + return this.inner().diagnostics().logAnalytics(); + } + + @Override + public void restart() { + this.manager().inner().getContainerGroups().restart(this.resourceGroupName(), this.name()); + } + + @Override + public Mono restartAsync() { + return this.manager().inner().getContainerGroups().restartAsync(this.resourceGroupName(), this.name()); + } + + @Override + public void stop() { + this.manager().inner().getContainerGroups().stop(this.resourceGroupName(), this.name()); + } + + @Override + public Mono stopAsync() { + return this.manager().inner().getContainerGroups().stopAsync(this.resourceGroupName(), this.name()); + } + + @Override + public String getLogContent(String containerName) { + return this.manager().containerGroups().getLogContent(this.resourceGroupName(), this.name(), containerName); + } + + @Override + public String getLogContent(String containerName, int tailLineCount) { + return this + .manager() + .containerGroups() + .getLogContent(this.resourceGroupName(), this.name(), containerName, tailLineCount); + } + + @Override + public Mono getLogContentAsync(String containerName) { + return this + .manager() + .containerGroups() + .getLogContentAsync(this.resourceGroupName(), this.name(), containerName); + } + + @Override + public Mono getLogContentAsync(String containerName, int tailLineCount) { + return this + .manager() + .containerGroups() + .getLogContentAsync(this.resourceGroupName(), this.name(), containerName, tailLineCount); + } + + @Override + public ContainerExecResponse executeCommand(String containerName, String command, int row, int column) { + return executeCommandAsync(containerName, command, row, column).block(); + } + + @Override + public Mono executeCommandAsync(String containerName, String command, int row, int column) { + return this + .manager() + .inner() + .getContainers() + .executeCommandAsync( + this.resourceGroupName(), + this.name(), + containerName, + new ContainerExecRequest() + .withCommand(command) + .withTerminalSize(new ContainerExecRequestTerminalSize().withRows(row).withCols(column))) + .map(ContainerExecResponseImpl::new); + } + + RoleAssignmentHelper.IdProvider idProvider() { + return new RoleAssignmentHelper.IdProvider() { + @Override + public String principalId() { + if (inner() != null && inner().identity() != null) { + return inner().identity().principalId(); + } else { + return null; + } + } + + @Override + public String resourceId() { + if (inner() != null) { + return inner().id(); + } else { + return null; + } + } + }; + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupMsiHandler.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupMsiHandler.java new file mode 100644 index 000000000000..77684ae92ac2 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupMsiHandler.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.implementation; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.authorization.implementation.RoleAssignmentHelper; +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerGroupInner; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupIdentity; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupIdentityUserAssignedIdentities; +import com.azure.resourcemanager.containerinstance.models.ResourceIdentityType; +import com.azure.resourcemanager.msi.models.Identity; +import com.azure.resourcemanager.resources.fluentcore.dag.TaskGroup; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +class ContainerGroupMsiHandler extends RoleAssignmentHelper { + private final ContainerGroupImpl containerGroup; + private final ClientLogger logger = new ClientLogger(getClass()); + + private List creatableIdentityKeys; + private Map userAssignedIdentities; + + ContainerGroupMsiHandler(ContainerGroupImpl containerGroup) { + super(containerGroup.manager().authorizationManager(), containerGroup.taskGroup(), containerGroup.idProvider()); + this.containerGroup = containerGroup; + this.creatableIdentityKeys = new ArrayList<>(); + this.userAssignedIdentities = new HashMap<>(); + } + + void processCreatedExternalIdentities() { + for (String key : this.creatableIdentityKeys) { + Identity identity = (Identity) this.containerGroup.taskGroup().taskResult(key); + Objects.requireNonNull(identity); + this.userAssignedIdentities.put(identity.id(), new ContainerGroupIdentityUserAssignedIdentities()); + } + this.creatableIdentityKeys.clear(); + } + + void handleExternalIdentities() { + if (!this.userAssignedIdentities.isEmpty()) { + this.containerGroup.inner().identity().withUserAssignedIdentities(this.userAssignedIdentities); + } + } + + /** + * Specifies that Local Managed Service Identity needs to be enabled in the virtual machine. If MSI extension is not + * already installed then it will be installed with access token port as 50342. + * + * @return ContainerGroupMsiHandler + */ + ContainerGroupMsiHandler withLocalManagedServiceIdentity() { + this.initContainerInstanceIdentity(ResourceIdentityType.SYSTEM_ASSIGNED); + return this; + } + + /** + * Specifies that given identity should be set as one of the External Managed Service Identity of the container + * instance. + * + * @param creatableIdentity yet-to-be-created identity to be associated with the container instance + * @return ContainerGroupMsiHandler + */ + ContainerGroupMsiHandler withNewExternalManagedServiceIdentity(Creatable creatableIdentity) { + this.initContainerInstanceIdentity(ResourceIdentityType.USER_ASSIGNED); + + TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) creatableIdentity; + Objects.requireNonNull(dependency); + + this.containerGroup.taskGroup().addDependency(dependency); + this.creatableIdentityKeys.add(creatableIdentity.key()); + + return this; + } + + /** + * Specifies that given identity should be set as one of the External Managed Service Identity of the container + * instance. + * + * @param identity an identity to associate + * @return ContainerGroupMsiHandler + */ + ContainerGroupMsiHandler withExistingExternalManagedServiceIdentity(Identity identity) { + this.initContainerInstanceIdentity(ResourceIdentityType.USER_ASSIGNED); + this.userAssignedIdentities.put(identity.id(), new ContainerGroupIdentityUserAssignedIdentities()); + return this; + } + + /** + * Initialize Container Instance's identity property. + * + * @param identityType the identity type to set + */ + private void initContainerInstanceIdentity(ResourceIdentityType identityType) { + if (!identityType.equals(ResourceIdentityType.USER_ASSIGNED) + && !identityType.equals(ResourceIdentityType.SYSTEM_ASSIGNED)) { + throw logger.logExceptionAsError(new IllegalArgumentException("Invalid argument: " + identityType)); + } + + ContainerGroupInner containerGroupInner = this.containerGroup.inner(); + if (containerGroupInner.identity() == null) { + containerGroupInner.withIdentity(new ContainerGroupIdentity()); + } + if (containerGroupInner.identity().type() == null + || containerGroupInner.identity().type().equals(ResourceIdentityType.NONE) + || containerGroupInner.identity().type().equals(identityType)) { + containerGroupInner.identity().withType(identityType); + } else { + containerGroupInner.identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED__USER_ASSIGNED); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupsImpl.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupsImpl.java new file mode 100644 index 000000000000..3b997d5bee09 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupsImpl.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManager; +import com.azure.resourcemanager.containerinstance.fluent.ContainerGroupsClient; +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerGroupInner; +import com.azure.resourcemanager.containerinstance.fluent.inner.LogsInner; +import com.azure.resourcemanager.containerinstance.models.CachedImages; +import com.azure.resourcemanager.containerinstance.models.Capabilities; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.ContainerGroups; +import com.azure.resourcemanager.containerinstance.models.Operation; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.TopLevelModifiableResourcesImpl; +import reactor.core.publisher.Mono; + +/** Implementation for ContainerGroups. */ +public class ContainerGroupsImpl + extends TopLevelModifiableResourcesImpl< + ContainerGroup, ContainerGroupImpl, ContainerGroupInner, ContainerGroupsClient, ContainerInstanceManager> + implements ContainerGroups { + + public ContainerGroupsImpl(final ContainerInstanceManager manager) { + super(manager.inner().getContainerGroups(), manager); + } + + @Override + protected ContainerGroupImpl wrapModel(String name) { + return new ContainerGroupImpl(name, new ContainerGroupInner(), this.manager()); + } + + @Override + protected ContainerGroupImpl wrapModel(ContainerGroupInner inner) { + if (inner == null) { + return null; + } + return new ContainerGroupImpl(inner.name(), inner, this.manager()); + } + + @Override + protected Mono deleteInnerAsync(String resourceGroupName, String name) { + return this.manager().inner().getContainerGroups().deleteAsync(resourceGroupName, name).then(); + } + + @Override + public ContainerGroup.DefinitionStages.Blank define(String name) { + return wrapModel(name); + } + + @Override + public String getLogContent(String resourceGroupName, String containerGroupName, String containerName) { + LogsInner logsInner = + this.manager().inner().getContainers().listLogs(resourceGroupName, containerGroupName, containerName); + + return logsInner != null ? logsInner.content() : null; + } + + @Override + public String getLogContent( + String resourceGroupName, String containerGroupName, String containerName, int tailLineCount) { + LogsInner logsInner = + this + .manager() + .inner() + .getContainers() + .listLogs(resourceGroupName, containerGroupName, containerName, tailLineCount); + + return logsInner != null ? logsInner.content() : null; + } + + @Override + public Mono getLogContentAsync(String resourceGroupName, String containerGroupName, String containerName) { + return this + .manager() + .inner() + .getContainers() + .listLogsAsync(resourceGroupName, containerGroupName, containerName) + .map(LogsInner::content); + } + + @Override + public Mono getLogContentAsync( + String resourceGroupName, String containerGroupName, String containerName, int tailLineCount) { + return this + .manager() + .inner() + .getContainers() + .listLogsAsync(resourceGroupName, containerGroupName, containerName, tailLineCount) + .map(LogsInner::content); + } + + @Override + public PagedIterable listOperations() { + return new PagedIterable<>(listOperationsAsync()); + } + + @Override + public PagedFlux listOperationsAsync() { + return this.manager().inner().getOperations().listAsync(); + } + + @Override + public PagedIterable listCachedImages(String location) { + return new PagedIterable<>(listCachedImagesAsync(location)); + } + + @Override + public PagedFlux listCachedImagesAsync(String location) { + return this.manager().inner().getLocations().listCachedImagesAsync(location); + } + + @Override + public PagedIterable listCapabilities(String location) { + return new PagedIterable<>(listCapabilitiesAsync(location)); + } + + @Override + public PagedFlux listCapabilitiesAsync(String location) { + return this.manager().inner().getLocations().listCapabilitiesAsync(location); + } + + @Override + public void start(String resourceGroupName, String containerGroupName) { + this.manager().inner().getContainerGroups().start(resourceGroupName, containerGroupName); + } + + @Override + public Mono startAsync(String resourceGroupName, String containerGroupName) { + return this.manager().inner().getContainerGroups().startAsync(resourceGroupName, containerGroupName); + } + + @Override + public PagedFlux listAsync() { + return wrapPageAsync(inner().listAsync()); + } + + @Override + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return wrapPageAsync(inner().listByResourceGroupAsync(resourceGroupName)); + } + + @Override + public final PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + @Override + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerImpl.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerImpl.java new file mode 100644 index 000000000000..8997048c2b92 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerImpl.java @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.implementation; + +import com.azure.resourcemanager.containerinstance.models.Container; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupIpAddressType; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupNetworkProtocol; +import com.azure.resourcemanager.containerinstance.models.ContainerNetworkProtocol; +import com.azure.resourcemanager.containerinstance.models.ContainerPort; +import com.azure.resourcemanager.containerinstance.models.EnvironmentVariable; +import com.azure.resourcemanager.containerinstance.models.GpuResource; +import com.azure.resourcemanager.containerinstance.models.GpuSku; +import com.azure.resourcemanager.containerinstance.models.IpAddress; +import com.azure.resourcemanager.containerinstance.models.Port; +import com.azure.resourcemanager.containerinstance.models.ResourceRequests; +import com.azure.resourcemanager.containerinstance.models.ResourceRequirements; +import com.azure.resourcemanager.containerinstance.models.VolumeMount; +import java.util.ArrayList; +import java.util.Map; + +/** Implementation for container group's container instance definition stages interface. */ +class ContainerImpl + implements ContainerGroup.DefinitionStages.ContainerInstanceDefinitionStages.ContainerInstanceDefinition< + ContainerGroup.DefinitionStages.WithNextContainerInstance> { + private Container innerContainer; + private ContainerGroupImpl parent; + + ContainerImpl(ContainerGroupImpl parent, String containerName) { + this.parent = parent; + this.innerContainer = + new Container() + .withName(containerName) + .withResources( + new ResourceRequirements().withRequests(new ResourceRequests().withCpu(1).withMemoryInGB(1.5))); + } + + @Override + public ContainerGroupImpl attach() { + if (parent.inner().containers() == null) { + parent.inner().withContainers(new ArrayList()); + } + parent.inner().containers().add(innerContainer); + + return parent; + } + + @Override + public ContainerImpl withImage(String imageName) { + innerContainer.withImage(imageName); + return this; + } + + @Override + public ContainerImpl withoutPorts() { + innerContainer.withPorts(null); + + return this; + } + + @Override + public ContainerImpl withExternalTcpPorts(int... ports) { + for (int port : ports) { + this.withExternalTcpPort(port); + } + + return this; + } + + @Override + public ContainerImpl withExternalTcpPort(int port) { + ensureParentIpAddress().ports().add(new Port().withPort(port).withProtocol(ContainerGroupNetworkProtocol.TCP)); + this.withInternalTcpPort(port); + + return this; + } + + private IpAddress ensureParentIpAddress() { + if (parent.inner().ipAddress() == null) { + parent.inner().withIpAddress(new IpAddress()); + } + if (parent.inner().ipAddress().type() == null && parent.inner().ipAddress().dnsNameLabel() == null) { + parent.inner().ipAddress().withType(ContainerGroupIpAddressType.PRIVATE); + } else { + parent.inner().ipAddress().withType(ContainerGroupIpAddressType.PUBLIC); + } + if (parent.inner().ipAddress().ports() == null) { + parent.inner().ipAddress().withPorts(new ArrayList()); + } + + return parent.inner().ipAddress(); + } + + @Override + public ContainerImpl withExternalUdpPorts(int... ports) { + for (int port : ports) { + this.withExternalUdpPort(port); + } + + return this; + } + + @Override + public ContainerImpl withExternalUdpPort(int port) { + ensureParentIpAddress().ports().add(new Port().withPort(port).withProtocol(ContainerGroupNetworkProtocol.UDP)); + this.withInternalUdpPort(port); + + return this; + } + + @Override + public ContainerImpl withInternalTcpPorts(int... ports) { + for (int port : ports) { + this.withInternalTcpPort(port); + } + + return this; + } + + @Override + public ContainerImpl withInternalUdpPorts(int... ports) { + for (int port : ports) { + this.withInternalUdpPort(port); + } + + return this; + } + + @Override + public ContainerImpl withInternalTcpPort(int port) { + if (innerContainer.ports() == null) { + innerContainer.withPorts(new ArrayList()); + } + innerContainer.ports().add(new ContainerPort().withPort(port).withProtocol(ContainerNetworkProtocol.TCP)); + + return this; + } + + @Override + public ContainerImpl withInternalUdpPort(int port) { + if (innerContainer.ports() == null) { + innerContainer.withPorts(new ArrayList()); + } + innerContainer.ports().add(new ContainerPort().withPort(port).withProtocol(ContainerNetworkProtocol.UDP)); + + return this; + } + + @Override + public ContainerImpl withCpuCoreCount(double cpuCoreCount) { + innerContainer.resources().requests().withCpu(cpuCoreCount); + return this; + } + + @Override + public ContainerImpl withGpuResource(int gpuCoreCount, GpuSku gpuSku) { + innerContainer.resources().requests().withGpu(new GpuResource().withCount(gpuCoreCount).withSku(gpuSku)); + return this; + } + + @Override + public ContainerImpl withMemorySizeInGB(double memorySize) { + innerContainer.resources().requests().withMemoryInGB(memorySize); + + return this; + } + + @Override + public ContainerImpl withStartingCommandLine(String executable, String... parameters) { + this.withStartingCommandLine(executable); + if (parameters != null) { + for (String parameter : parameters) { + this.withStartingCommandLine(parameter); + } + } + + return this; + } + + @Override + public ContainerImpl withStartingCommandLine(String commandLine) { + if (innerContainer.command() == null) { + innerContainer.withCommand(new ArrayList()); + } + innerContainer.command().add(commandLine); + + return this; + } + + @Override + public ContainerImpl withEnvironmentVariables(Map environmentVariables) { + for (Map.Entry entry : environmentVariables.entrySet()) { + this.withEnvironmentVariable(entry.getKey(), entry.getValue()); + } + + return this; + } + + @Override + public ContainerImpl withEnvironmentVariable(String envName, String envValue) { + if (innerContainer.environmentVariables() == null) { + innerContainer.withEnvironmentVariables(new ArrayList()); + } + + innerContainer.environmentVariables().add(new EnvironmentVariable().withName(envName).withValue(envValue)); + + return this; + } + + @Override + public ContainerImpl withEnvironmentVariableWithSecuredValue(Map environmentVariables) { + for (Map.Entry entry : environmentVariables.entrySet()) { + this.withEnvironmentVariableWithSecuredValue(entry.getKey(), entry.getValue()); + } + + return this; + } + + @Override + public ContainerImpl withEnvironmentVariableWithSecuredValue(String envName, String securedValue) { + if (innerContainer.environmentVariables() == null) { + innerContainer.withEnvironmentVariables(new ArrayList()); + } + + innerContainer + .environmentVariables() + .add(new EnvironmentVariable().withName(envName).withSecureValue(securedValue)); + + return this; + } + + @Override + public ContainerImpl withVolumeMountSetting(String volumeName, String mountPath) { + if (innerContainer.volumeMounts() == null) { + innerContainer.withVolumeMounts(new ArrayList()); + } + innerContainer + .volumeMounts() + .add(new VolumeMount().withName(volumeName).withMountPath(mountPath).withReadOnly(false)); + + return this; + } + + @Override + public ContainerImpl withVolumeMountSetting(Map volumeMountSetting) { + for (Map.Entry entry : volumeMountSetting.entrySet()) { + this.withVolumeMountSetting(entry.getKey(), entry.getValue()); + } + + return this; + } + + @Override + public ContainerImpl withReadOnlyVolumeMountSetting(String volumeName, String mountPath) { + if (innerContainer.volumeMounts() == null) { + innerContainer.withVolumeMounts(new ArrayList()); + } + innerContainer + .volumeMounts() + .add(new VolumeMount().withName(volumeName).withMountPath(mountPath).withReadOnly(true)); + + return this; + } + + @Override + public ContainerImpl withReadOnlyVolumeMountSetting(Map volumeMountSetting) { + for (Map.Entry entry : volumeMountSetting.entrySet()) { + this.withReadOnlyVolumeMountSetting(entry.getKey(), entry.getValue()); + } + + return this; + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/VolumeImpl.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/VolumeImpl.java new file mode 100644 index 000000000000..5835f264063c --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/implementation/VolumeImpl.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.implementation; + +import com.azure.resourcemanager.containerinstance.models.AzureFileVolume; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.GitRepoVolume; +import com.azure.resourcemanager.containerinstance.models.Volume; +import java.util.ArrayList; +import java.util.Map; + +/** Implementation for container group's volume definition stages interface. */ +class VolumeImpl + implements ContainerGroup.DefinitionStages.VolumeDefinitionStages.VolumeDefinition< + ContainerGroup.DefinitionStages.WithVolume> { + private Volume innerVolume; + private ContainerGroupImpl parent; + + VolumeImpl(ContainerGroupImpl parent, String volumeName) { + this.parent = parent; + this.innerVolume = new Volume().withName(volumeName); + } + + @Override + public ContainerGroupImpl attach() { + if (parent.inner().volumes() == null) { + parent.inner().withVolumes(new ArrayList()); + } + parent.inner().volumes().add(innerVolume); + + return parent; + } + + @Override + public VolumeImpl withExistingReadWriteAzureFileShare(String shareName) { + ensureAzureFileVolume().withReadOnly(false).withShareName(shareName); + + return this; + } + + @Override + public VolumeImpl withExistingReadOnlyAzureFileShare(String shareName) { + ensureAzureFileVolume().withReadOnly(true).withShareName(shareName); + + return this; + } + + private AzureFileVolume ensureAzureFileVolume() { + if (innerVolume.azureFile() == null) { + innerVolume.withAzureFile(new AzureFileVolume()); + } + + return innerVolume.azureFile(); + } + + @Override + public VolumeImpl withStorageAccountName(String storageAccountName) { + ensureAzureFileVolume().withStorageAccountName(storageAccountName); + + return this; + } + + @Override + public VolumeImpl withStorageAccountKey(String storageAccountKey) { + ensureAzureFileVolume().withStorageAccountKey(storageAccountKey); + + return this; + } + + @Override + public VolumeImpl withSecrets(Map secrets) { + this.innerVolume.withSecret(secrets); + + return this; + } + + @Override + public VolumeImpl withGitUrl(String gitUrl) { + this.innerVolume.withGitRepo(new GitRepoVolume()); + this.innerVolume.gitRepo().withRepository(gitUrl); + + return this; + } + + @Override + public VolumeImpl withGitDirectoryName(String gitDirectoryName) { + if (this.innerVolume.gitRepo() == null) { + this.innerVolume.withGitRepo(new GitRepoVolume()); + } + this.innerVolume.gitRepo().withDirectory(gitDirectoryName); + + return this; + } + + @Override + public VolumeImpl withGitRevision(String gitRevision) { + if (this.innerVolume.gitRepo() == null) { + this.innerVolume.withGitRepo(new GitRepoVolume()); + } + this.innerVolume.gitRepo().withRevision(gitRevision); + + return this; + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileVolume.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileVolume.java new file mode 100644 index 000000000000..7b2708e17480 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileVolume.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AzureFileVolume model. */ +@Fluent +public final class AzureFileVolume { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureFileVolume.class); + + /* + * The name of the Azure File share to be mounted as a volume. + */ + @JsonProperty(value = "shareName", required = true) + private String shareName; + + /* + * The flag indicating whether the Azure File shared mounted as a volume is + * read-only. + */ + @JsonProperty(value = "readOnly") + private Boolean readOnly; + + /* + * The name of the storage account that contains the Azure File share. + */ + @JsonProperty(value = "storageAccountName", required = true) + private String storageAccountName; + + /* + * The storage account access key used to access the Azure File share. + */ + @JsonProperty(value = "storageAccountKey") + private String storageAccountKey; + + /** + * Get the shareName property: The name of the Azure File share to be mounted as a volume. + * + * @return the shareName value. + */ + public String shareName() { + return this.shareName; + } + + /** + * Set the shareName property: The name of the Azure File share to be mounted as a volume. + * + * @param shareName the shareName value to set. + * @return the AzureFileVolume object itself. + */ + public AzureFileVolume withShareName(String shareName) { + this.shareName = shareName; + return this; + } + + /** + * Get the readOnly property: The flag indicating whether the Azure File shared mounted as a volume is read-only. + * + * @return the readOnly value. + */ + public Boolean readOnly() { + return this.readOnly; + } + + /** + * Set the readOnly property: The flag indicating whether the Azure File shared mounted as a volume is read-only. + * + * @param readOnly the readOnly value to set. + * @return the AzureFileVolume object itself. + */ + public AzureFileVolume withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + /** + * Get the storageAccountName property: The name of the storage account that contains the Azure File share. + * + * @return the storageAccountName value. + */ + public String storageAccountName() { + return this.storageAccountName; + } + + /** + * Set the storageAccountName property: The name of the storage account that contains the Azure File share. + * + * @param storageAccountName the storageAccountName value to set. + * @return the AzureFileVolume object itself. + */ + public AzureFileVolume withStorageAccountName(String storageAccountName) { + this.storageAccountName = storageAccountName; + return this; + } + + /** + * Get the storageAccountKey property: The storage account access key used to access the Azure File share. + * + * @return the storageAccountKey value. + */ + public String storageAccountKey() { + return this.storageAccountKey; + } + + /** + * Set the storageAccountKey property: The storage account access key used to access the Azure File share. + * + * @param storageAccountKey the storageAccountKey value to set. + * @return the AzureFileVolume object itself. + */ + public AzureFileVolume withStorageAccountKey(String storageAccountKey) { + this.storageAccountKey = storageAccountKey; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (shareName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property shareName in model AzureFileVolume")); + } + if (storageAccountName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property storageAccountName in model AzureFileVolume")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImages.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImages.java new file mode 100644 index 000000000000..11462df5859c --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImages.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CachedImages model. */ +@Fluent +public final class CachedImages { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CachedImages.class); + + /* + * The OS type of the cached image. + */ + @JsonProperty(value = "osType", required = true) + private String osType; + + /* + * The cached image name. + */ + @JsonProperty(value = "image", required = true) + private String image; + + /** + * Get the osType property: The OS type of the cached image. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Set the osType property: The OS type of the cached image. + * + * @param osType the osType value to set. + * @return the CachedImages object itself. + */ + public CachedImages withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the image property: The cached image name. + * + * @return the image value. + */ + public String image() { + return this.image; + } + + /** + * Set the image property: The cached image name. + * + * @param image the image value to set. + * @return the CachedImages object itself. + */ + public CachedImages withImage(String image) { + this.image = image; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (osType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property osType in model CachedImages")); + } + if (image() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property image in model CachedImages")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Capabilities.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Capabilities.java new file mode 100644 index 000000000000..dcb0f15d5006 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Capabilities.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Capabilities model. */ +@Immutable +public final class Capabilities { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Capabilities.class); + + /* + * The resource type that this capability describes. + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /* + * The OS type that this capability describes. + */ + @JsonProperty(value = "osType", access = JsonProperty.Access.WRITE_ONLY) + private String osType; + + /* + * The resource location. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /* + * The ip address type that this capability describes. + */ + @JsonProperty(value = "ipAddressType", access = JsonProperty.Access.WRITE_ONLY) + private String ipAddressType; + + /* + * The GPU sku that this capability describes. + */ + @JsonProperty(value = "gpu", access = JsonProperty.Access.WRITE_ONLY) + private String gpu; + + /* + * The supported capabilities. + */ + @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) + private CapabilitiesAutoGenerated capabilities; + + /** + * Get the resourceType property: The resource type that this capability describes. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the osType property: The OS type that this capability describes. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Get the location property: The resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the ipAddressType property: The ip address type that this capability describes. + * + * @return the ipAddressType value. + */ + public String ipAddressType() { + return this.ipAddressType; + } + + /** + * Get the gpu property: The GPU sku that this capability describes. + * + * @return the gpu value. + */ + public String gpu() { + return this.gpu; + } + + /** + * Get the capabilities property: The supported capabilities. + * + * @return the capabilities value. + */ + public CapabilitiesAutoGenerated capabilities() { + return this.capabilities; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capabilities() != null) { + capabilities().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/CapabilitiesAutoGenerated.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/CapabilitiesAutoGenerated.java new file mode 100644 index 000000000000..26f8c7ed84f6 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/CapabilitiesAutoGenerated.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CapabilitiesAutoGenerated model. */ +@Immutable +public final class CapabilitiesAutoGenerated { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilitiesAutoGenerated.class); + + /* + * The maximum allowed memory request in GB. + */ + @JsonProperty(value = "maxMemoryInGB", access = JsonProperty.Access.WRITE_ONLY) + private Float maxMemoryInGB; + + /* + * The maximum allowed CPU request in cores. + */ + @JsonProperty(value = "maxCpu", access = JsonProperty.Access.WRITE_ONLY) + private Float maxCpu; + + /* + * The maximum allowed GPU count. + */ + @JsonProperty(value = "maxGpuCount", access = JsonProperty.Access.WRITE_ONLY) + private Float maxGpuCount; + + /** + * Get the maxMemoryInGB property: The maximum allowed memory request in GB. + * + * @return the maxMemoryInGB value. + */ + public Float maxMemoryInGB() { + return this.maxMemoryInGB; + } + + /** + * Get the maxCpu property: The maximum allowed CPU request in cores. + * + * @return the maxCpu value. + */ + public Float maxCpu() { + return this.maxCpu; + } + + /** + * Get the maxGpuCount property: The maximum allowed GPU count. + * + * @return the maxGpuCount value. + */ + public Float maxGpuCount() { + return this.maxGpuCount; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Container.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Container.java new file mode 100644 index 000000000000..6ad80dcec121 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Container.java @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Container model. */ +@JsonFlatten +@Fluent +public class Container { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Container.class); + + /* + * The user-provided name of the container instance. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The name of the image used to create the container instance. + */ + @JsonProperty(value = "properties.image", required = true) + private String image; + + /* + * The commands to execute within the container instance in exec form. + */ + @JsonProperty(value = "properties.command") + private List command; + + /* + * The exposed ports on the container instance. + */ + @JsonProperty(value = "properties.ports") + private List ports; + + /* + * The environment variables to set in the container instance. + */ + @JsonProperty(value = "properties.environmentVariables") + private List environmentVariables; + + /* + * The instance view of the container instance. Only valid in response. + */ + @JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY) + private ContainerPropertiesInstanceView instanceView; + + /* + * The resource requirements of the container instance. + */ + @JsonProperty(value = "properties.resources", required = true) + private ResourceRequirements resources; + + /* + * The volume mounts available to the container instance. + */ + @JsonProperty(value = "properties.volumeMounts") + private List volumeMounts; + + /* + * The liveness probe. + */ + @JsonProperty(value = "properties.livenessProbe") + private ContainerProbe livenessProbe; + + /* + * The readiness probe. + */ + @JsonProperty(value = "properties.readinessProbe") + private ContainerProbe readinessProbe; + + /** + * Get the name property: The user-provided name of the container instance. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The user-provided name of the container instance. + * + * @param name the name value to set. + * @return the Container object itself. + */ + public Container withName(String name) { + this.name = name; + return this; + } + + /** + * Get the image property: The name of the image used to create the container instance. + * + * @return the image value. + */ + public String image() { + return this.image; + } + + /** + * Set the image property: The name of the image used to create the container instance. + * + * @param image the image value to set. + * @return the Container object itself. + */ + public Container withImage(String image) { + this.image = image; + return this; + } + + /** + * Get the command property: The commands to execute within the container instance in exec form. + * + * @return the command value. + */ + public List command() { + return this.command; + } + + /** + * Set the command property: The commands to execute within the container instance in exec form. + * + * @param command the command value to set. + * @return the Container object itself. + */ + public Container withCommand(List command) { + this.command = command; + return this; + } + + /** + * Get the ports property: The exposed ports on the container instance. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: The exposed ports on the container instance. + * + * @param ports the ports value to set. + * @return the Container object itself. + */ + public Container withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Get the environmentVariables property: The environment variables to set in the container instance. + * + * @return the environmentVariables value. + */ + public List environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: The environment variables to set in the container instance. + * + * @param environmentVariables the environmentVariables value to set. + * @return the Container object itself. + */ + public Container withEnvironmentVariables(List environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the instanceView property: The instance view of the container instance. Only valid in response. + * + * @return the instanceView value. + */ + public ContainerPropertiesInstanceView instanceView() { + return this.instanceView; + } + + /** + * Get the resources property: The resource requirements of the container instance. + * + * @return the resources value. + */ + public ResourceRequirements resources() { + return this.resources; + } + + /** + * Set the resources property: The resource requirements of the container instance. + * + * @param resources the resources value to set. + * @return the Container object itself. + */ + public Container withResources(ResourceRequirements resources) { + this.resources = resources; + return this; + } + + /** + * Get the volumeMounts property: The volume mounts available to the container instance. + * + * @return the volumeMounts value. + */ + public List volumeMounts() { + return this.volumeMounts; + } + + /** + * Set the volumeMounts property: The volume mounts available to the container instance. + * + * @param volumeMounts the volumeMounts value to set. + * @return the Container object itself. + */ + public Container withVolumeMounts(List volumeMounts) { + this.volumeMounts = volumeMounts; + return this; + } + + /** + * Get the livenessProbe property: The liveness probe. + * + * @return the livenessProbe value. + */ + public ContainerProbe livenessProbe() { + return this.livenessProbe; + } + + /** + * Set the livenessProbe property: The liveness probe. + * + * @param livenessProbe the livenessProbe value to set. + * @return the Container object itself. + */ + public Container withLivenessProbe(ContainerProbe livenessProbe) { + this.livenessProbe = livenessProbe; + return this; + } + + /** + * Get the readinessProbe property: The readiness probe. + * + * @return the readinessProbe value. + */ + public ContainerProbe readinessProbe() { + return this.readinessProbe; + } + + /** + * Set the readinessProbe property: The readiness probe. + * + * @param readinessProbe the readinessProbe value to set. + * @return the Container object itself. + */ + public Container withReadinessProbe(ContainerProbe readinessProbe) { + this.readinessProbe = readinessProbe; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Container")); + } + if (image() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property image in model Container")); + } + if (ports() != null) { + ports().forEach(e -> e.validate()); + } + if (environmentVariables() != null) { + environmentVariables().forEach(e -> e.validate()); + } + if (instanceView() != null) { + instanceView().validate(); + } + if (resources() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property resources in model Container")); + } else { + resources().validate(); + } + if (volumeMounts() != null) { + volumeMounts().forEach(e -> e.validate()); + } + if (livenessProbe() != null) { + livenessProbe().validate(); + } + if (readinessProbe() != null) { + readinessProbe().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExec.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExec.java new file mode 100644 index 000000000000..30755cd54b55 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExec.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ContainerExec model. */ +@Fluent +public final class ContainerExec { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerExec.class); + + /* + * The commands to execute within the container. + */ + @JsonProperty(value = "command") + private List command; + + /** + * Get the command property: The commands to execute within the container. + * + * @return the command value. + */ + public List command() { + return this.command; + } + + /** + * Set the command property: The commands to execute within the container. + * + * @param command the command value to set. + * @return the ContainerExec object itself. + */ + public ContainerExec withCommand(List command) { + this.command = command; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequest.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequest.java new file mode 100644 index 000000000000..cc05bd7d026d --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequest.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerExecRequest model. */ +@Fluent +public final class ContainerExecRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerExecRequest.class); + + /* + * The command to be executed. + */ + @JsonProperty(value = "command") + private String command; + + /* + * The size of the terminal. + */ + @JsonProperty(value = "terminalSize") + private ContainerExecRequestTerminalSize terminalSize; + + /** + * Get the command property: The command to be executed. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: The command to be executed. + * + * @param command the command value to set. + * @return the ContainerExecRequest object itself. + */ + public ContainerExecRequest withCommand(String command) { + this.command = command; + return this; + } + + /** + * Get the terminalSize property: The size of the terminal. + * + * @return the terminalSize value. + */ + public ContainerExecRequestTerminalSize terminalSize() { + return this.terminalSize; + } + + /** + * Set the terminalSize property: The size of the terminal. + * + * @param terminalSize the terminalSize value to set. + * @return the ContainerExecRequest object itself. + */ + public ContainerExecRequest withTerminalSize(ContainerExecRequestTerminalSize terminalSize) { + this.terminalSize = terminalSize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (terminalSize() != null) { + terminalSize().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequestTerminalSize.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequestTerminalSize.java new file mode 100644 index 000000000000..0a9adf08c662 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequestTerminalSize.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerExecRequestTerminalSize model. */ +@Fluent +public final class ContainerExecRequestTerminalSize { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerExecRequestTerminalSize.class); + + /* + * The row size of the terminal + */ + @JsonProperty(value = "rows") + private Integer rows; + + /* + * The column size of the terminal + */ + @JsonProperty(value = "cols") + private Integer cols; + + /** + * Get the rows property: The row size of the terminal. + * + * @return the rows value. + */ + public Integer rows() { + return this.rows; + } + + /** + * Set the rows property: The row size of the terminal. + * + * @param rows the rows value to set. + * @return the ContainerExecRequestTerminalSize object itself. + */ + public ContainerExecRequestTerminalSize withRows(Integer rows) { + this.rows = rows; + return this; + } + + /** + * Get the cols property: The column size of the terminal. + * + * @return the cols value. + */ + public Integer cols() { + return this.cols; + } + + /** + * Set the cols property: The column size of the terminal. + * + * @param cols the cols value to set. + * @return the ContainerExecRequestTerminalSize object itself. + */ + public ContainerExecRequestTerminalSize withCols(Integer cols) { + this.cols = cols; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecResponse.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecResponse.java new file mode 100644 index 000000000000..2dacfa035b86 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerExecResponseInner; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; + +/** Response containing the container exec command. */ +@Fluent +public interface ContainerExecResponse extends HasInner { + /** + * Get the webSocketUri value. + * + * @return the webSocketUri value + */ + String webSocketUri(); + + /** + * Get the password value. + * + * @return the password value + */ + String password(); +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroup.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroup.java new file mode 100644 index 000000000000..0f3cef24a7af --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroup.java @@ -0,0 +1,1124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.authorization.models.BuiltInRole; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManager; +import com.azure.resourcemanager.containerinstance.fluent.inner.ContainerGroupInner; +import com.azure.resourcemanager.msi.models.Identity; +import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; +import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; +import com.azure.resourcemanager.resources.fluentcore.model.Appliable; +import com.azure.resourcemanager.resources.fluentcore.model.Attachable; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; +import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; +import com.azure.resourcemanager.resources.fluentcore.model.Updatable; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; +import reactor.core.publisher.Mono; + +/** An immutable client-side representation of an Azure Container Group. */ +@Fluent +public interface ContainerGroup + extends GroupableResource, + Refreshable, + Updatable { + + /*********************************************************** + * Getters + ***********************************************************/ + + /** @return the container instances in this container group */ + Map containers(); + + /** @return all the ports publicly exposed for this container group */ + Set externalPorts(); + + /** @return the TCP ports publicly exposed for this container group */ + int[] externalTcpPorts(); + + /** @return the UDP ports publicly exposed for this container group */ + int[] externalUdpPorts(); + + /** @return the volumes for this container group */ + Map volumes(); + + /** @return the Docker image registry servers by which the container group is created from */ + Collection imageRegistryServers(); + + /** @return the container group restart policy */ + ContainerGroupRestartPolicy restartPolicy(); + + /** @return the DNS prefix which was specified at creation time */ + String dnsPrefix(); + + /** @return the FQDN for the container group */ + String fqdn(); + + /** @return the IP address */ + String ipAddress(); + + /** @return true if IP address is public */ + boolean isIPAddressPublic(); + + /** @return true if IP address is private */ + boolean isIPAddressPrivate(); + + /** @return the base level OS type required by the containers in the group */ + OperatingSystemTypes osType(); + + /** @return the state of the container group; only valid in response */ + String state(); + + /** @return the provisioningState of the container group */ + String provisioningState(); + + /** @return the container group events */ + Set events(); + + /** @return the DNS configuration for the container group */ + DnsConfiguration dnsConfig(); + + /** @return the id of the network profile for the container group */ + String networkProfileId(); + + /** @return whether managed service identity is enabled for the container group */ + boolean isManagedServiceIdentityEnabled(); + + /** + * @return the tenant id of the system assigned managed service identity. Null if managed service identity is not + * configured. + */ + String systemAssignedManagedServiceIdentityTenantId(); + + /** + * @return the principal id of the system assigned managed service identity. Null if managed service identity is not + * configured. + */ + String systemAssignedManagedServiceIdentityPrincipalId(); + + /** @return whether managed service identity is system assigned, user assigned, both, or neither */ + ResourceIdentityType managedServiceIdentityType(); + + /** @return the ids of the user assigned managed service identities. Returns an empty set if no MSIs are set. */ + Set userAssignedManagedServiceIdentityIds(); + + /** @return the log analytics information of the container group. */ + LogAnalytics logAnalytics(); + + /*********************************************************** + * Actions + ***********************************************************/ + + /** + * Restarts all containers in a container group in place. If container image has updates, new image will be + * downloaded. + */ + void restart(); + + /** + * Restarts all containers in a container group in place asynchronously. If container image has updates, new image + * will be downloaded. + * + * @return a representation of the deferred computation of this call + */ + Mono restartAsync(); + + /** Stops all containers in a container group. Compute resources will be de-allocated and billing will stop. */ + void stop(); + + /** + * Stops all containers in a container group asynchronously. Compute resources will be de-allocated and billing will + * stop. + * + * @return a representation of the deferred computation of this call + */ + Mono stopAsync(); + + /** + * Get the log content for the specified container instance within the container group. + * + * @param containerName the container instance name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return all available log lines + */ + String getLogContent(String containerName); + + /** + * Get the log content for the specified container instance within the container group. + * + * @param containerName the container instance name + * @param tailLineCount only get the last log lines up to this + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the log lines from the end, up to the number specified + */ + String getLogContent(String containerName, int tailLineCount); + + /** + * Get the log content for the specified container instance within the container group. + * + * @param containerName the container instance name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return a representation of the future computation of this call + */ + Mono getLogContentAsync(String containerName); + + /** + * Get the log content for the specified container instance within the container group. + * + * @param containerName the container instance name + * @param tailLineCount only get the last log lines up to this + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return a representation of the future computation of this call + */ + Mono getLogContentAsync(String containerName, int tailLineCount); + + /** + * Starts the exec command for a specific container instance. + * + * @param containerName the container instance name + * @param command the command to be executed + * @param row the row size of the terminal + * @param column the column size of the terminal + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the log lines from the end, up to the number specified + */ + ContainerExecResponse executeCommand(String containerName, String command, int row, int column); + + /** + * Starts the exec command for a specific container instance within the container group. + * + * @param containerName the container instance name + * @param command the command to be executed + * @param row the row size of the terminal + * @param column the column size of the terminal + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return a representation of the future computation of this call + */ + Mono executeCommandAsync(String containerName, String command, int row, int column); + + /** Starts the exec command for a specific container instance within the current group asynchronously. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithGroup, + DefinitionStages.WithOsType, + DefinitionStages.WithPublicOrPrivateImageRegistry, + DefinitionStages.WithPrivateImageRegistryOrVolume, + DefinitionStages.WithVolume, + DefinitionStages.WithFirstContainerInstance, + DefinitionStages.WithSystemAssignedManagedServiceIdentity, + DefinitionStages.WithSystemAssignedIdentityBasedAccessOrCreate, + DefinitionStages.WithNextContainerInstance, + DefinitionStages.DnsConfigFork, + DefinitionStages.WithCreate { + } + + /** Grouping of the container group definition stages. */ + interface DefinitionStages { + /** The first stage of the container group definition. */ + interface Blank extends GroupableResource.DefinitionWithRegion { + } + + /** The stage of the container group definition allowing to specify the resource group. */ + interface WithGroup extends GroupableResource.DefinitionStages.WithGroup { + } + + /** The stage of the container group definition allowing to specify the OS type. */ + interface WithOsType { + /** + * Specifies this is a Linux container group. + * + * @return the next stage of the definition + */ + WithPublicOrPrivateImageRegistry withLinux(); + + /** + * Specifies this is a Windows container group. + * + * @return the next stage of the definition + */ + WithPublicOrPrivateImageRegistry withWindows(); + } + + /** The stage of the container group definition allowing to specify a public only or private image registry. */ + interface WithPublicOrPrivateImageRegistry extends WithPublicImageRegistryOnly, WithPrivateImageRegistry { + } + + /** The stage of the container group definition allowing to skip the private image registry. */ + interface WithPublicImageRegistryOnly { + /** + * Only public container image repository will be used to create the container instances in the container + * group. + * + * @return the next stage of the definition + */ + WithPrivateImageRegistryOrVolume withPublicImageRegistryOnly(); + } + + /** The stage of the container group definition allowing to specify a private image registry. */ + interface WithPrivateImageRegistry { + /** + * Specifies the private container image registry server login for the container group. + * + * @param server Docker image registry server, without protocol such as "http" and "https" + * @param username the username for the private registry + * @param password the password for the private registry + * @return the next stage of the definition + */ + WithPrivateImageRegistryOrVolume withPrivateImageRegistry(String server, String username, String password); + } + + /** The stage of the container group definition allowing to specify a private image registry or a volume. */ + interface WithPrivateImageRegistryOrVolume extends WithPrivateImageRegistry { + /** + * Skips the definition of volumes to be shared by the container instances. + * + *

An IllegalArgumentException will be thrown if a container instance attempts to define a volume + * mounting. + * + * @return the next stage of the definition + */ + WithFirstContainerInstance withoutVolume(); + + /** + * Specifies a new Azure file share name to be created. + * + * @param volumeName the name of the volume + * @param shareName the Azure file share name to be created + * @return the next stage of the definition + */ + WithFirstContainerInstance withNewAzureFileShareVolume(String volumeName, String shareName); + + /** + * Specifies an empty directory volume that can be shared by the container instances in the container group. + * + * @param name the name of the empty directory volume + * @return the next stage of the definition + */ + WithFirstContainerInstance withEmptyDirectoryVolume(String name); + + /** + * Begins the definition of a volume that can be shared by the container instances in the container group. + * + *

The definition must be completed with a call to {@link + * VolumeDefinitionStages.WithVolumeAttach#attach()} + * + * @param name the name of the volume + * @return the next stage of the definition + */ + VolumeDefinitionStages.VolumeDefinitionBlank defineVolume(String name); + } + + /** + * The stage of the container group definition allowing to specify a volume that can be mounted by a container + * instance. + */ + interface WithVolume extends WithFirstContainerInstance { + /** + * Begins the definition of a volume that can be shared by the container instances in the container group. + * + *

The definition must be completed with a call to {@link + * VolumeDefinitionStages.WithVolumeAttach#attach()} + * + * @param name the name of the volume + * @return the next stage of the definition + */ + VolumeDefinitionStages.VolumeDefinitionBlank defineVolume(String name); + } + + /** Grouping of volume definition stages. */ + interface VolumeDefinitionStages { + /** + * The first stage of the volume definition. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface VolumeDefinitionBlank extends WithAzureFileShare { + } + + /** + * The stage of the volume definition allowing to specify a read only Azure File Share name. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithAzureFileShare { + /** + * Specifies an existing Azure file share name. + * + * @param shareName an existing Azure file share name + * @return the next stage of the definition + */ + WithStorageAccountName withExistingReadWriteAzureFileShare(String shareName); + + /** + * Specifies an existing Azure file share name. + * + * @param shareName an existing Azure file share name + * @return the next stage of the definition + */ + WithStorageAccountName withExistingReadOnlyAzureFileShare(String shareName); + } + + /** + * The stage of the volume definition allowing to specify the storage account name to access to the Azure + * file. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithStorageAccountName { + /** + * Specifies the storage account name to access to the Azure file. + * + * @param storageAccountName the storage account name + * @return the next stage of the definition + */ + WithStorageAccountKey withStorageAccountName(String storageAccountName); + } + + /** + * The stage of the volume definition allowing to specify the storage account key to access to the Azure + * file. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithStorageAccountKey { + /** + * Specifies the storage account key to access to the Azure file. + * + * @param storageAccountKey the storage account key + * @return the next stage of the definition + */ + WithVolumeAttach withStorageAccountKey(String storageAccountKey); + } + + /** + * The stage of the volume definition allowing to specify the secrets map. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithSecretsMap { + /** + * Specifies the secrets map. + * + *

The secret value must be specified in Base64 encoding + * + * @param secrets the new volume secrets map; value must be in Base64 encoding + * @return the next stage of the definition + */ + WithVolumeAttach withSecrets(Map secrets); + } + + /** + * The stage of the volume definition allowing to specify the Git URL mappings. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithGitUrl { + /** + * Specifies the Git URL for the new volume. + * + * @param gitUrl the Git URL for the new volume + * @return the next stage of the definition + */ + WithGitDirectoryName withGitUrl(String gitUrl); + } + + /** + * The stage of the volume definition allowing to specify the Git target directory name mappings. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithGitDirectoryName extends WithGitRevision { + /** + * Specifies the Git target directory name for the new volume. + * + *

Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git + * repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory + * with the given name. + * + * @param gitDirectoryName the Git target directory name for the new volume + * @return the next stage of the definition + */ + WithGitRevision withGitDirectoryName(String gitDirectoryName); + } + + /** + * The stage of the volume definition allowing to specify the Git revision. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithGitRevision extends WithVolumeAttach { + /** + * Specifies the Git revision for the new volume. + * + * @param gitRevision the Git revision for the new volume + * @return the next stage of the definition + */ + WithVolumeAttach withGitRevision(String gitRevision); + } + + /** + * The final stage of the volume definition. + * + *

At this stage, any remaining optional settings can be specified, or the subnet definition can be + * attached to the parent virtual network definition. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithVolumeAttach extends Attachable.InDefinition { + } + + /** Grouping of the container group's volume definition stages. */ + interface VolumeDefinition + extends VolumeDefinitionBlank, + WithAzureFileShare, + WithStorageAccountName, + WithStorageAccountKey, + WithSecretsMap, + WithGitUrl, + WithGitDirectoryName, + WithGitRevision, + WithVolumeAttach { + } + } + + /** The stage of the container group definition allowing to specify first required container instance. */ + interface WithFirstContainerInstance { + /** + * Begins the definition of a container instance. + * + * @param name the name of the container instance + * @return the next stage of the definition + */ + ContainerInstanceDefinitionStages.ContainerInstanceDefinitionBlank + defineContainerInstance(String name); + + /** + * Defines one container instance for the specified image with one CPU count and 1.5 GB memory, with TCP + * port 80 opened externally. + * + * @param imageName the name of the container image + * @return the next stage of the definition + */ + WithCreate withContainerInstance(String imageName); + + /** + * Defines one container instance for the specified image with one CPU count and 1.5 GB memory, with a + * custom TCP port opened externally. + * + * @param imageName the name of the container image + * @param port the external port to be opened + * @return the next stage of the definition + */ + WithCreate withContainerInstance(String imageName, int port); + } + + /** The stage of the container group definition allowing to specify a container instance. */ + interface WithNextContainerInstance extends WithCreate { + /** + * Begins the definition of a container instance. + * + * @param name the name of the volume + * @return the next stage of the definition + */ + ContainerInstanceDefinitionStages.ContainerInstanceDefinitionBlank + defineContainerInstance(String name); + } + + /** Grouping of volume definition stages. */ + interface ContainerInstanceDefinitionStages { + /** + * The first stage of the container instance definition. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface ContainerInstanceDefinitionBlank extends WithImage { + } + + /** + * The stage of the container instance definition allowing to specify the container image. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithImage { + /** + * Specifies the container image to be used. + * + * @param imageName the container image + * @return the next stage of the definition + */ + WithOrWithoutPorts withImage(String imageName); + } + + /** + * The stage of the container instance definition allowing to specify (or not) the container ports. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithOrWithoutPorts extends WithPorts, WithoutPorts { + } + + /** + * The stage of the container instance definition allowing not to specify any container ports internal or + * external. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithoutPorts { + /** + * Specifies that not ports will be opened internally or externally for this container instance. + * + * @return the next stage of the definition + */ + WithContainerInstanceAttach withoutPorts(); + } + + /** + * The stage of the container instance definition allowing to specify one or more container ports. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithPortsOrContainerInstanceAttach + extends WithPorts, WithContainerInstanceAttach { + } + + /** + * The stage of the container instance definition allowing to specify the container ports. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithPorts { + /** + * Specifies the container's TCP ports available to external clients. + * + *

A public IP address will be create to allow external clients to reach the containers within the + * group. To enable external clients to reach a container within the group, you must expose the port on + * the IP address and from the container. Because containers within the group share a port namespace, + * port mapping is not supported. + * + * @param ports array of TCP ports to be exposed externally + * @return the next stage of the definition + */ + WithPortsOrContainerInstanceAttach withExternalTcpPorts(int... ports); + + /** + * Specifies the container's TCP port available to external clients. + * + *

A public IP address will be create to allow external clients to reach the containers within the + * group. To enable external clients to reach a container within the group, you must expose the port on + * the IP address and from the container. Because containers within the group share a port namespace, + * port mapping is not supported. + * + * @param port TCP port to be exposed externally + * @return the next stage of the definition + */ + WithPortsOrContainerInstanceAttach withExternalTcpPort(int port); + + /** + * Specifies the container's UDP ports available to external clients. + * + *

A public IP address will be create to allow external clients to reach the containers within the + * group. To enable external clients to reach a container within the group, you must expose the port on + * the IP address and from the container. Because containers within the group share a port namespace, + * port mapping is not supported. + * + * @param ports array of UDP ports to be exposed externally + * @return the next stage of the definition + */ + WithPortsOrContainerInstanceAttach withExternalUdpPorts(int... ports); + + /** + * Specifies the container's UDP port available to external clients. + * + *

A public IP address will be create to allow external clients to reach the containers within the + * group. To enable external clients to reach a container within the group, you must expose the port on + * the IP address and from the container. Because containers within the group share a port namespace, + * port mapping is not supported. + * + * @param port UDP port to be exposed externally + * @return the next stage of the definition + */ + WithPortsOrContainerInstanceAttach withExternalUdpPort(int port); + + /** + * Specifies the container's TCP ports are available to internal clients only (other container instances + * within the container group). + * + *

Containers within a group can reach each other via localhost on the ports that they have exposed, + * even if those ports are not exposed externally on the group's IP address. + * + * @param ports array of TCP ports to be exposed internally + * @return the next stage of the definition + */ + WithPortsOrContainerInstanceAttach withInternalTcpPorts(int... ports); + + /** + * Specifies the container's Udp ports are available to internal clients only (other container instances + * within the container group). + * + *

Containers within a group can reach each other via localhost on the ports that they have exposed, + * even if those ports are not exposed externally on the group's IP address. + * + * @param ports array of UDP ports to be exposed internally + * @return the next stage of the definition + */ + WithPortsOrContainerInstanceAttach withInternalUdpPorts(int... ports); + + /** + * Specifies the container's TCP port is available to internal clients only (other container instances + * within the container group). + * + *

Containers within a group can reach each other via localhost on the ports that they have exposed, + * even if those ports are not exposed externally on the group's IP address. + * + * @param port TCP port to be exposed internally + * @return the next stage of the definition + */ + WithPortsOrContainerInstanceAttach withInternalTcpPort(int port); + + /** + * Specifies the container's UDP port is available to internal clients only (other container instances + * within the container group). + * + *

Containers within a group can reach each other via localhost on the ports that they have exposed, + * even if those ports are not exposed externally on the group's IP address. + * + * @param port UDP port to be exposed internally + * @return the next stage of the definition + */ + WithPortsOrContainerInstanceAttach withInternalUdpPort(int port); + } + + /** + * The stage of the container instance definition allowing to specify the number of CPU cores. + * + *

The CPU cores can be specified as a fraction, i.e. 1.5 represents one and a half atomic CPU cores will + * be assigned to this container instance. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithCpuCoreCount { + /** + * Specifies the number of CPU cores assigned to this container instance. + * + * @param cpuCoreCount the number of CPU cores + * @return the next stage of the definition + */ + WithContainerInstanceAttach withCpuCoreCount(double cpuCoreCount); + } + + interface WithGpuResource { + WithContainerInstanceAttach withGpuResource(int gpuCoreCount, GpuSku gpuSku); + } + + /** + * The stage of the container instance definition allowing to specify the memory size in GB. + * + *

The memory size can be specified as a fraction, i.e. 1.5 represents one and a half GB of memory. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithMemorySize { + /** + * Specifies the memory size in GB assigned to this container instance. + * + * @param memorySize the memory size in GB + * @return the next stage of the definition + */ + WithContainerInstanceAttach withMemorySizeInGB(double memorySize); + } + + /** + * The stage of the container instance definition allowing to specify the starting command line. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithStartingCommandLine { + /** + * Specifies the starting command lines. + * + * @param executable the executable which it will call after initializing the container + * @param parameters the parameter list for the executable to be called + * @return the next stage of the definition + */ + WithContainerInstanceAttach withStartingCommandLine(String executable, String... parameters); + + /** + * Specifies the starting command line. + * + * @param executable the executable or path to the executable that will be called after initializing the + * container + * @return the next stage of the definition + */ + WithContainerInstanceAttach withStartingCommandLine(String executable); + } + + /** + * The stage of the container instance definition allowing to specify the environment variables. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithEnvironmentVariables { + /** + * Specifies the environment variables. + * + * @param environmentVariables the environment variables in a name and value pair to be set after the + * container gets initialized + * @return the next stage of the definition + */ + WithContainerInstanceAttach withEnvironmentVariables(Map environmentVariables); + + /** + * Specifies the environment variable. + * + * @param envName the environment variable name + * @param envValue the environment variable value + * @return the next stage of the definition + */ + WithContainerInstanceAttach withEnvironmentVariable(String envName, String envValue); + + /** + * Specifies a collection of name and secure value pairs for the environment variables. + * + * @param environmentVariables the environment variables in a name and value pair to be set after the + * container gets initialized + * @return the next stage of the definition + */ + WithContainerInstanceAttach withEnvironmentVariableWithSecuredValue( + Map environmentVariables); + + /** + * Specifies the environment variable that has a secured value. + * + * @param envName the environment variable name + * @param securedValue the environment variable secured value + * @return the next stage of the definition + */ + WithContainerInstanceAttach withEnvironmentVariableWithSecuredValue( + String envName, String securedValue); + } + + /** + * The stage of the container instance definition allowing to specify volume mount setting. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithVolumeMountSetting { + /** + * Specifies the container group's volume to be mounted by the container instance at a specified mount + * path. + * + *

Mounting an Azure file share as a volume in a container is a two-step process. First, you provide + * the details of the share as part of defining the container group, then you specify how you wan the + * volume mounted within one or more of the containers in the group. + * + * @param volumeName the volume name as defined in the volumes of the container group + * @param mountPath the local path the volume will be mounted at + * @return the next stage of the definition + * @throws IllegalArgumentException thrown if volumeName was not defined in the respective container + * group definition stage. + */ + WithContainerInstanceAttach withVolumeMountSetting(String volumeName, String mountPath); + + /** + * Specifies the container group's volume to be mounted by the container instance at a specified mount + * path. + * + *

Mounting an Azure file share as a volume in a container is a two-step process. First, you provide + * the details of the share as part of defining the container group, then you specify how you wan the + * volume mounted within one or more of the containers in the group. + * + * @param volumeMountSetting the name and value pair representing volume names as defined in the volumes + * of the container group and the local paths the volume will be mounted at + * @return the next stage of the definition + * @throws IllegalArgumentException thrown if volumeName was not defined in the respective container + * group definition stage. + */ + WithContainerInstanceAttach withVolumeMountSetting(Map volumeMountSetting); + + /** + * Specifies the container group's volume to be mounted by the container instance at a specified mount + * path. + * + *

Mounting an Azure file share as a volume in a container is a two-step process. First, you provide + * the details of the share as part of defining the container group, then you specify how you wan the + * volume mounted within one or more of the containers in the group. + * + * @param volumeName the volume name as defined in the volumes of the container group + * @param mountPath the local path the volume will be mounted at + * @return the next stage of the definition + * @throws IllegalArgumentException thrown if volumeName was not defined in the respective container + * group definition stage. + */ + WithContainerInstanceAttach withReadOnlyVolumeMountSetting( + String volumeName, String mountPath); + + /** + * Specifies the container group's volume to be mounted by the container instance at a specified mount + * path. + * + *

Mounting an Azure file share as a volume in a container is a two-step process. First, you provide + * the details of the share as part of defining the container group, then you specify how you wan the + * volume mounted within one or more of the containers in the group. + * + * @param volumeMountSetting the name and value pair representing volume names as defined in the volumes + * of the container group and the local paths the volume will be mounted at + * @return the next stage of the definition + * @throws IllegalArgumentException thrown if volumeName was not defined in the respective container + * group definition stage. + */ + WithContainerInstanceAttach withReadOnlyVolumeMountSetting( + Map volumeMountSetting); + } + + /** + * The final stage of the container instance definition. + * + *

At this stage, any remaining optional settings can be specified, or the subnet definition can be + * attached to the parent virtual network definition. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithContainerInstanceAttach + extends WithCpuCoreCount, + WithGpuResource, + WithMemorySize, + WithStartingCommandLine, + WithEnvironmentVariables, + WithVolumeMountSetting, + Attachable.InDefinition { + } + + /** Grouping of the container group's volume definition stages. */ + interface ContainerInstanceDefinition + extends ContainerInstanceDefinitionBlank, + WithImage, + WithOrWithoutPorts, + WithPortsOrContainerInstanceAttach, + WithContainerInstanceAttach { + } + } + + /** + * The stage of the container instance definition allowing to specify having system assigned managed service + * identity. + */ + interface WithSystemAssignedManagedServiceIdentity { + /** + * Specifies a system assigned managed service identity for the container group. + * + * @return the next stage of the definition + */ + WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedManagedServiceIdentity(); + } + + /** + * The stage of the container instance definition allowing to specify system assigned managed service identity + * with specific role based access. + */ + interface WithSystemAssignedIdentityBasedAccessOrCreate extends WithCreate { + /** + * Specifies a system assigned managed service identity with access to a specific resource with a specified + * role. + * + * @param resourceId the id of the resource you are setting up access to + * @param role access role to be assigned to the identity + * @return the next stage of the definition + */ + WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedIdentityBasedAccessTo( + String resourceId, BuiltInRole role); + + /** + * Specifies a system assigned managed service identity with access to the current resource group and with + * the specified role. + * + * @param role access role to be assigned to the identity + * @return the next stage of the definition + */ + WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedIdentityBasedAccessToCurrentResourceGroup( + BuiltInRole role); + + /** + * Specifies a system assigned managed service identity with access to a specific resource with a specified + * role from the id. + * + * @param resourceId the id of the resource you are setting up access to + * @param roleDefinitionId id of the access role to be assigned to the identity + * @return the next stage of the definition + */ + WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedIdentityBasedAccessTo( + String resourceId, String roleDefinitionId); + + /** + * Specifies a system assigned managed service identity with access to the current resource group and with + * the specified role from the id. + * + * @param roleDefinitionId id of the access role to be assigned to the identity + * @return the next stage of the definition + */ + WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedIdentityBasedAccessToCurrentResourceGroup( + String roleDefinitionId); + } + + /** + * The stage of the container instance definition allowing to specify user assigned managed service identity. + */ + interface WithUserAssignedManagedServiceIdentity { + /** + * Specifies the definition of a not-yet-created user assigned identity to be associated with the virtual + * machine. + * + * @param creatableIdentity a creatable identity definition + * @return the next stage of the definition + */ + WithCreate withNewUserAssignedManagedServiceIdentity(Creatable creatableIdentity); + + /** + * Specifies an existing user assigned identity to be associate with the container group. + * + * @param identity the identity + * @return the next stage of the definition + */ + WithCreate withExistingUserAssignedManagedServiceIdentity(Identity identity); + } + + /** The stage of the container group definition allowing to specify the container group restart policy. */ + interface WithRestartPolicy { + /** + * Specifies the restart policy for all the container instances within the container group. + * + * @param restartPolicy the restart policy for all the container instances within the container group + * @return the next stage of the definition + */ + WithCreate withRestartPolicy(ContainerGroupRestartPolicy restartPolicy); + } + + /** The stage of the container group definition allowing to specify the DNS prefix label. */ + interface WithDnsPrefix { + /** + * Specifies the DNS prefix to be used to create the FQDN for the container group. + * + * @param dnsPrefix the DNS prefix to be used to create the FQDN for the container group + * @return the next stage of the definition + */ + WithCreate withDnsPrefix(String dnsPrefix); + } + + /** The stage of the container group definition allowing to specify the network profile id. */ + interface WithNetworkProfile { + /** + * Specifies the network profile information for a container group. + * + * @param subscriptionId the ID of the subscription of the network profile + * @param resourceGroupName the name of the resource group of the network profile + * @param networkProfileName the name of the network profile + * @return the next stage of the definition + */ + DnsConfigFork withExistingNetworkProfile( + String subscriptionId, String resourceGroupName, String networkProfileName); + + /** + * Specifies the network profile information for a container group. + * + * @param networkProfileId the ID of the network profile + * @return the next stage of the definition + */ + DnsConfigFork withExistingNetworkProfile(String networkProfileId); + + /** + * Specifies the virtual network in network profile for a container group. + * + * @param virtualNetworkId the ID of the virtual network + * @param subnetName the name of the subnet within the virtual network.; + * the subnet must have delegation for 'Microsoft.ContainerInstance/containerGroups'. + * @return the next stage of the definition + */ + DnsConfigFork withNewNetworkProfileOnExistingVirtualNetwork(String virtualNetworkId, String subnetName); + + /** + * Creates a new virtual network to associate with network profile in a container group. + * + * @param addressSpace the address space for the virtual network + * @return the next stage of the definition + */ + DnsConfigFork withNewVirtualNetwork(String addressSpace); + } + + interface DnsConfigFork extends WithDnsConfig, WithCreate { + } + + /** + * The stage of the container group definition allowing to specify the DNS configuration of the container group. + */ + interface WithDnsConfig { + /** + * Specifies the DNS servers for the container group. + * + * @param dnsServerNames the names of the DNS servers + * @return the next stage of the definition + */ + WithCreate withDnsServerNames(List dnsServerNames); + + /** + * Specifies the DNS configuration for the container group. + * + * @param dnsServerNames the names of the DNS servers for the container group + * @param dnsSearchDomains the DNS search domains for hostname lookup in the container group + * @param dnsOptions the DNS options for the container group + * @return the next stage of the definition + */ + WithCreate withDnsConfiguration(List dnsServerNames, String dnsSearchDomains, String dnsOptions); + } + + /** + * The stage of the container group definition allowing to specify the log analytics platform for the container + * group. + */ + interface WithLogAnalytics { + /** + * Specifies the log analytics workspace to use for the container group. + * + * @param workspaceId the id of the previously-created log analytics workspace + * @param workspaceKey the key of the previously-created log analytics workspace + * @return the next stage of the definition + */ + WithCreate withLogAnalytics(String workspaceId, String workspaceKey); + + /** + * Specifies the log analytics workspace with optional add-ons for the container group. + * + * @param workspaceId the id of the previously-created log analytics workspace + * @param workspaceKey the key of the previously-created log analytics workspace + * @param logType the log type to be used. Possible values include: 'ContainerInsights', + * 'ContainerInstanceLogs'. + * @param metadata the metadata for log analytics + * @return the next stage of the definition + */ + WithCreate withLogAnalytics( + String workspaceId, String workspaceKey, LogAnalyticsLogType logType, Map metadata); + } + + /** + * The stage of the definition which contains all the minimum required inputs for the resource to be created + * (via {@link WithCreate#create()}), but also allows for any other optional settings to be specified. + */ + interface WithCreate + extends WithRestartPolicy, + WithSystemAssignedManagedServiceIdentity, + WithUserAssignedManagedServiceIdentity, + WithDnsPrefix, + WithNetworkProfile, + WithLogAnalytics, + Creatable, + Resource.DefinitionWithTags { + } + } + + /** The template for an update operation, containing all the settings that can be modified. */ + interface Update extends Resource.UpdateWithTags, Appliable { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupDiagnostics.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupDiagnostics.java new file mode 100644 index 000000000000..aa718b5e0e42 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupDiagnostics.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerGroupDiagnostics model. */ +@Fluent +public final class ContainerGroupDiagnostics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerGroupDiagnostics.class); + + /* + * Container group log analytics information. + */ + @JsonProperty(value = "logAnalytics") + private LogAnalytics logAnalytics; + + /** + * Get the logAnalytics property: Container group log analytics information. + * + * @return the logAnalytics value. + */ + public LogAnalytics logAnalytics() { + return this.logAnalytics; + } + + /** + * Set the logAnalytics property: Container group log analytics information. + * + * @param logAnalytics the logAnalytics value to set. + * @return the ContainerGroupDiagnostics object itself. + */ + public ContainerGroupDiagnostics withLogAnalytics(LogAnalytics logAnalytics) { + this.logAnalytics = logAnalytics; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logAnalytics() != null) { + logAnalytics().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentity.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentity.java new file mode 100644 index 000000000000..6e709c475538 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentity.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The ContainerGroupIdentity model. */ +@Fluent +public class ContainerGroupIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerGroupIdentity.class); + + /* + * The principal id of the container group identity. This property will + * only be provided for a system assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The tenant id associated with the container group. This property will + * only be provided for a system assigned identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /* + * The type of identity used for the container group. The type + * 'SystemAssigned, UserAssigned' includes both an implicitly created + * identity and a set of user assigned identities. The type 'None' will + * remove any identities from the container group. + */ + @JsonProperty(value = "type") + private ResourceIdentityType type; + + /* + * The list of user identities associated with the container group. The + * user identity dictionary key references will be ARM resource ids in the + * form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; + + /** + * Get the principalId property: The principal id of the container group identity. This property will only be + * provided for a system assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant id associated with the container group. This property will only be provided + * for a system assigned identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' + * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove + * any identities from the container group. + * + * @return the type value. + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' + * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove + * any identities from the container group. + * + * @param type the type value to set. + * @return the ContainerGroupIdentity object itself. + */ + public ContainerGroupIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The list of user identities associated with the container group. The + * user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The list of user identities associated with the container group. The + * user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ContainerGroupIdentity object itself. + */ + public ContainerGroupIdentity withUserAssignedIdentities( + Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentityUserAssignedIdentities.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentityUserAssignedIdentities.java new file mode 100644 index 000000000000..f88f85649171 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentityUserAssignedIdentities.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerGroupIdentityUserAssignedIdentities model. */ +@Immutable +public final class ContainerGroupIdentityUserAssignedIdentities { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(ContainerGroupIdentityUserAssignedIdentities.class); + + /* + * The principal id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The client id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** + * Get the principalId property: The principal id of user assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client id of user assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIpAddressType.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIpAddressType.java new file mode 100644 index 000000000000..f18684ac7e19 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIpAddressType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerGroupIpAddressType. */ +public final class ContainerGroupIpAddressType extends ExpandableStringEnum { + /** Static value Public for ContainerGroupIpAddressType. */ + public static final ContainerGroupIpAddressType PUBLIC = fromString("Public"); + + /** Static value Private for ContainerGroupIpAddressType. */ + public static final ContainerGroupIpAddressType PRIVATE = fromString("Private"); + + /** + * Creates or finds a ContainerGroupIpAddressType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerGroupIpAddressType. + */ + @JsonCreator + public static ContainerGroupIpAddressType fromString(String name) { + return fromString(name, ContainerGroupIpAddressType.class); + } + + /** @return known ContainerGroupIpAddressType values. */ + public static Collection values() { + return values(ContainerGroupIpAddressType.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProfile.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProfile.java new file mode 100644 index 000000000000..74a0eacee8b5 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProfile.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerGroupNetworkProfile model. */ +@Fluent +public final class ContainerGroupNetworkProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerGroupNetworkProfile.class); + + /* + * The identifier for a network profile. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * Get the id property: The identifier for a network profile. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The identifier for a network profile. + * + * @param id the id value to set. + * @return the ContainerGroupNetworkProfile object itself. + */ + public ContainerGroupNetworkProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model ContainerGroupNetworkProfile")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProtocol.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProtocol.java new file mode 100644 index 000000000000..fab217a3d6d8 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProtocol.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerGroupNetworkProtocol. */ +public final class ContainerGroupNetworkProtocol extends ExpandableStringEnum { + /** Static value TCP for ContainerGroupNetworkProtocol. */ + public static final ContainerGroupNetworkProtocol TCP = fromString("TCP"); + + /** Static value UDP for ContainerGroupNetworkProtocol. */ + public static final ContainerGroupNetworkProtocol UDP = fromString("UDP"); + + /** + * Creates or finds a ContainerGroupNetworkProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerGroupNetworkProtocol. + */ + @JsonCreator + public static ContainerGroupNetworkProtocol fromString(String name) { + return fromString(name, ContainerGroupNetworkProtocol.class); + } + + /** @return known ContainerGroupNetworkProtocol values. */ + public static Collection values() { + return values(ContainerGroupNetworkProtocol.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPropertiesInstanceView.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPropertiesInstanceView.java new file mode 100644 index 000000000000..c3ecb9696842 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPropertiesInstanceView.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ContainerGroupPropertiesInstanceView model. */ +@Immutable +public final class ContainerGroupPropertiesInstanceView { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerGroupPropertiesInstanceView.class); + + /* + * The events of this container group. + */ + @JsonProperty(value = "events", access = JsonProperty.Access.WRITE_ONLY) + private List events; + + /* + * The state of the container group. Only valid in response. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /** + * Get the events property: The events of this container group. + * + * @return the events value. + */ + public List events() { + return this.events; + } + + /** + * Get the state property: The state of the container group. Only valid in response. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (events() != null) { + events().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupRestartPolicy.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupRestartPolicy.java new file mode 100644 index 000000000000..2d74cd2945a3 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupRestartPolicy.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerGroupRestartPolicy. */ +public final class ContainerGroupRestartPolicy extends ExpandableStringEnum { + /** Static value Always for ContainerGroupRestartPolicy. */ + public static final ContainerGroupRestartPolicy ALWAYS = fromString("Always"); + + /** Static value OnFailure for ContainerGroupRestartPolicy. */ + public static final ContainerGroupRestartPolicy ON_FAILURE = fromString("OnFailure"); + + /** Static value Never for ContainerGroupRestartPolicy. */ + public static final ContainerGroupRestartPolicy NEVER = fromString("Never"); + + /** + * Creates or finds a ContainerGroupRestartPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerGroupRestartPolicy. + */ + @JsonCreator + public static ContainerGroupRestartPolicy fromString(String name) { + return fromString(name, ContainerGroupRestartPolicy.class); + } + + /** @return known ContainerGroupRestartPolicy values. */ + public static Collection values() { + return values(ContainerGroupRestartPolicy.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSku.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSku.java new file mode 100644 index 000000000000..7bac3dbee09a --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSku.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerGroupSku. */ +public final class ContainerGroupSku extends ExpandableStringEnum { + /** Static value Standard for ContainerGroupSku. */ + public static final ContainerGroupSku STANDARD = fromString("Standard"); + + /** Static value Dedicated for ContainerGroupSku. */ + public static final ContainerGroupSku DEDICATED = fromString("Dedicated"); + + /** + * Creates or finds a ContainerGroupSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerGroupSku. + */ + @JsonCreator + public static ContainerGroupSku fromString(String name) { + return fromString(name, ContainerGroupSku.class); + } + + /** @return known ContainerGroupSku values. */ + public static Collection values() { + return values(ContainerGroupSku.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroups.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroups.java new file mode 100644 index 000000000000..2d382a91de4b --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroups.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManager; +import com.azure.resourcemanager.containerinstance.fluent.ContainerGroupsClient; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByResourceGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsBatchCreation; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; +import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; +import com.azure.resourcemanager.resources.fluentcore.model.HasInner; +import reactor.core.publisher.Mono; + +/** Entry point to the container instance management API. */ +@Fluent +public interface ContainerGroups + extends SupportsCreating, + HasManager, + HasInner, + SupportsBatchCreation, + SupportsGettingByResourceGroup, + SupportsGettingById, + SupportsDeletingByResourceGroup, + SupportsDeletingById, + SupportsBatchDeletion, + SupportsListingByResourceGroup, + SupportsListing { + + /** + * Get the log content for the specified container instance within a container group. + * + * @param resourceGroupName the Azure resource group name + * @param containerGroupName the container group name + * @param containerName the container instance name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return all available log lines + */ + String getLogContent(String resourceGroupName, String containerGroupName, String containerName); + + /** + * Get the log content for the specified container instance within a container group. + * + * @param resourceGroupName the Azure resource group name + * @param containerGroupName the container group name + * @param containerName the container instance name + * @param tailLineCount only get the last log lines up to this + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the log lines from the end, up to the number specified + */ + String getLogContent(String resourceGroupName, String containerGroupName, String containerName, int tailLineCount); + + /** + * Get the log content for the specified container instance within a container group. + * + * @param resourceGroupName the Azure resource group name + * @param containerGroupName the container group name + * @param containerName the container instance name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return a representation of the future computation of this call + */ + Mono getLogContentAsync(String resourceGroupName, String containerGroupName, String containerName); + + /** + * Get the log content for the specified container instance within a container group. + * + * @param resourceGroupName the Azure resource group name + * @param containerGroupName the container group name + * @param containerName the container instance name + * @param tailLineCount only get the last log lines up to this + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return a representation of the future computation of this call + */ + Mono getLogContentAsync( + String resourceGroupName, String containerGroupName, String containerName, int tailLineCount); + + /** + * Lists all operations for Azure Container Instance service. + * + * @return all operations for Azure Container Instance service + */ + PagedIterable listOperations(); + + /** + * Lists all operations for Azure Container Instance service. + * + * @return a representation of the future computation of this call + */ + PagedFlux listOperationsAsync(); + + /** + * Lists cached images for a subscription in a region. + * + * @param location the identifier for the physical azure location. + * @return all cached images from the specified location + */ + PagedIterable listCachedImages(String location); + + /** + * Lists cached images for a subscription in a region. + * + * @param location the identifier for the physical azure location. + * @return a representation of the future computation of this call + */ + PagedFlux listCachedImagesAsync(String location); + + /** + * Lists the capabilities of a location. + * + * @param location the identifier for the physical azure location + * @return a list of all of the capabilities of the given location + */ + PagedIterable listCapabilities(String location); + + /** + * Lists the capabilities of a location. + * + * @param location the identifier for the physical azure location + * @return a representation of the future computation of this call + */ + PagedFlux listCapabilitiesAsync(String location); + + /** + * Starts all containers in a container group. + * + * @param resourceGroupName the name of the resource group of the container group + * @param containerGroupName the name of the container group + */ + void start(String resourceGroupName, String containerGroupName); + + /** + * Starts all containers in a container group. + * + * @param resourceGroupName the name of the resource group of the container group + * @param containerGroupName the name of the container group + * @return a representation of the future computation of this call + */ + Mono startAsync(String resourceGroupName, String containerGroupName); +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerHttpGet.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerHttpGet.java new file mode 100644 index 000000000000..43c6de070cd0 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerHttpGet.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerHttpGet model. */ +@Fluent +public final class ContainerHttpGet { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerHttpGet.class); + + /* + * The path to probe. + */ + @JsonProperty(value = "path") + private String path; + + /* + * The port number to probe. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /* + * The scheme. + */ + @JsonProperty(value = "scheme") + private Scheme scheme; + + /** + * Get the path property: The path to probe. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The path to probe. + * + * @param path the path value to set. + * @return the ContainerHttpGet object itself. + */ + public ContainerHttpGet withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the port property: The port number to probe. + * + * @return the port value. + */ + public int port() { + return this.port; + } + + /** + * Set the port property: The port number to probe. + * + * @param port the port value to set. + * @return the ContainerHttpGet object itself. + */ + public ContainerHttpGet withPort(int port) { + this.port = port; + return this; + } + + /** + * Get the scheme property: The scheme. + * + * @return the scheme value. + */ + public Scheme scheme() { + return this.scheme; + } + + /** + * Set the scheme property: The scheme. + * + * @param scheme the scheme value to set. + * @return the ContainerHttpGet object itself. + */ + public ContainerHttpGet withScheme(Scheme scheme) { + this.scheme = scheme; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerInstanceOperationsOrigin.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerInstanceOperationsOrigin.java new file mode 100644 index 000000000000..f87e06f6e3c3 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerInstanceOperationsOrigin.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerInstanceOperationsOrigin. */ +public final class ContainerInstanceOperationsOrigin extends ExpandableStringEnum { + /** Static value User for ContainerInstanceOperationsOrigin. */ + public static final ContainerInstanceOperationsOrigin USER = fromString("User"); + + /** Static value System for ContainerInstanceOperationsOrigin. */ + public static final ContainerInstanceOperationsOrigin SYSTEM = fromString("System"); + + /** + * Creates or finds a ContainerInstanceOperationsOrigin from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerInstanceOperationsOrigin. + */ + @JsonCreator + public static ContainerInstanceOperationsOrigin fromString(String name) { + return fromString(name, ContainerInstanceOperationsOrigin.class); + } + + /** @return known ContainerInstanceOperationsOrigin values. */ + public static Collection values() { + return values(ContainerInstanceOperationsOrigin.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerNetworkProtocol.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerNetworkProtocol.java new file mode 100644 index 000000000000..3b177a2eb3ca --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerNetworkProtocol.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerNetworkProtocol. */ +public final class ContainerNetworkProtocol extends ExpandableStringEnum { + /** Static value TCP for ContainerNetworkProtocol. */ + public static final ContainerNetworkProtocol TCP = fromString("TCP"); + + /** Static value UDP for ContainerNetworkProtocol. */ + public static final ContainerNetworkProtocol UDP = fromString("UDP"); + + /** + * Creates or finds a ContainerNetworkProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerNetworkProtocol. + */ + @JsonCreator + public static ContainerNetworkProtocol fromString(String name) { + return fromString(name, ContainerNetworkProtocol.class); + } + + /** @return known ContainerNetworkProtocol values. */ + public static Collection values() { + return values(ContainerNetworkProtocol.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPort.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPort.java new file mode 100644 index 000000000000..8a13ec236682 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPort.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerPort model. */ +@Fluent +public final class ContainerPort { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerPort.class); + + /* + * The protocol associated with the port. + */ + @JsonProperty(value = "protocol") + private ContainerNetworkProtocol protocol; + + /* + * The port number exposed within the container group. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /** + * Get the protocol property: The protocol associated with the port. + * + * @return the protocol value. + */ + public ContainerNetworkProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The protocol associated with the port. + * + * @param protocol the protocol value to set. + * @return the ContainerPort object itself. + */ + public ContainerPort withProtocol(ContainerNetworkProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the port property: The port number exposed within the container group. + * + * @return the port value. + */ + public int port() { + return this.port; + } + + /** + * Set the port property: The port number exposed within the container group. + * + * @param port the port value to set. + * @return the ContainerPort object itself. + */ + public ContainerPort withPort(int port) { + this.port = port; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerProbe.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerProbe.java new file mode 100644 index 000000000000..227512ee2be1 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerProbe.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerProbe model. */ +@Fluent +public final class ContainerProbe { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerProbe.class); + + /* + * The execution command to probe + */ + @JsonProperty(value = "exec") + private ContainerExec exec; + + /* + * The Http Get settings to probe + */ + @JsonProperty(value = "httpGet") + private ContainerHttpGet httpGet; + + /* + * The initial delay seconds. + */ + @JsonProperty(value = "initialDelaySeconds") + private Integer initialDelaySeconds; + + /* + * The period seconds. + */ + @JsonProperty(value = "periodSeconds") + private Integer periodSeconds; + + /* + * The failure threshold. + */ + @JsonProperty(value = "failureThreshold") + private Integer failureThreshold; + + /* + * The success threshold. + */ + @JsonProperty(value = "successThreshold") + private Integer successThreshold; + + /* + * The timeout seconds. + */ + @JsonProperty(value = "timeoutSeconds") + private Integer timeoutSeconds; + + /** + * Get the exec property: The execution command to probe. + * + * @return the exec value. + */ + public ContainerExec exec() { + return this.exec; + } + + /** + * Set the exec property: The execution command to probe. + * + * @param exec the exec value to set. + * @return the ContainerProbe object itself. + */ + public ContainerProbe withExec(ContainerExec exec) { + this.exec = exec; + return this; + } + + /** + * Get the httpGet property: The Http Get settings to probe. + * + * @return the httpGet value. + */ + public ContainerHttpGet httpGet() { + return this.httpGet; + } + + /** + * Set the httpGet property: The Http Get settings to probe. + * + * @param httpGet the httpGet value to set. + * @return the ContainerProbe object itself. + */ + public ContainerProbe withHttpGet(ContainerHttpGet httpGet) { + this.httpGet = httpGet; + return this; + } + + /** + * Get the initialDelaySeconds property: The initial delay seconds. + * + * @return the initialDelaySeconds value. + */ + public Integer initialDelaySeconds() { + return this.initialDelaySeconds; + } + + /** + * Set the initialDelaySeconds property: The initial delay seconds. + * + * @param initialDelaySeconds the initialDelaySeconds value to set. + * @return the ContainerProbe object itself. + */ + public ContainerProbe withInitialDelaySeconds(Integer initialDelaySeconds) { + this.initialDelaySeconds = initialDelaySeconds; + return this; + } + + /** + * Get the periodSeconds property: The period seconds. + * + * @return the periodSeconds value. + */ + public Integer periodSeconds() { + return this.periodSeconds; + } + + /** + * Set the periodSeconds property: The period seconds. + * + * @param periodSeconds the periodSeconds value to set. + * @return the ContainerProbe object itself. + */ + public ContainerProbe withPeriodSeconds(Integer periodSeconds) { + this.periodSeconds = periodSeconds; + return this; + } + + /** + * Get the failureThreshold property: The failure threshold. + * + * @return the failureThreshold value. + */ + public Integer failureThreshold() { + return this.failureThreshold; + } + + /** + * Set the failureThreshold property: The failure threshold. + * + * @param failureThreshold the failureThreshold value to set. + * @return the ContainerProbe object itself. + */ + public ContainerProbe withFailureThreshold(Integer failureThreshold) { + this.failureThreshold = failureThreshold; + return this; + } + + /** + * Get the successThreshold property: The success threshold. + * + * @return the successThreshold value. + */ + public Integer successThreshold() { + return this.successThreshold; + } + + /** + * Set the successThreshold property: The success threshold. + * + * @param successThreshold the successThreshold value to set. + * @return the ContainerProbe object itself. + */ + public ContainerProbe withSuccessThreshold(Integer successThreshold) { + this.successThreshold = successThreshold; + return this; + } + + /** + * Get the timeoutSeconds property: The timeout seconds. + * + * @return the timeoutSeconds value. + */ + public Integer timeoutSeconds() { + return this.timeoutSeconds; + } + + /** + * Set the timeoutSeconds property: The timeout seconds. + * + * @param timeoutSeconds the timeoutSeconds value to set. + * @return the ContainerProbe object itself. + */ + public ContainerProbe withTimeoutSeconds(Integer timeoutSeconds) { + this.timeoutSeconds = timeoutSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exec() != null) { + exec().validate(); + } + if (httpGet() != null) { + httpGet().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPropertiesInstanceView.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPropertiesInstanceView.java new file mode 100644 index 000000000000..6b5723d0f322 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPropertiesInstanceView.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ContainerPropertiesInstanceView model. */ +@Immutable +public final class ContainerPropertiesInstanceView { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerPropertiesInstanceView.class); + + /* + * The number of times that the container instance has been restarted. + */ + @JsonProperty(value = "restartCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer restartCount; + + /* + * Current container instance state. + */ + @JsonProperty(value = "currentState", access = JsonProperty.Access.WRITE_ONLY) + private ContainerState currentState; + + /* + * Previous container instance state. + */ + @JsonProperty(value = "previousState", access = JsonProperty.Access.WRITE_ONLY) + private ContainerState previousState; + + /* + * The events of the container instance. + */ + @JsonProperty(value = "events", access = JsonProperty.Access.WRITE_ONLY) + private List events; + + /** + * Get the restartCount property: The number of times that the container instance has been restarted. + * + * @return the restartCount value. + */ + public Integer restartCount() { + return this.restartCount; + } + + /** + * Get the currentState property: Current container instance state. + * + * @return the currentState value. + */ + public ContainerState currentState() { + return this.currentState; + } + + /** + * Get the previousState property: Previous container instance state. + * + * @return the previousState value. + */ + public ContainerState previousState() { + return this.previousState; + } + + /** + * Get the events property: The events of the container instance. + * + * @return the events value. + */ + public List events() { + return this.events; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (currentState() != null) { + currentState().validate(); + } + if (previousState() != null) { + previousState().validate(); + } + if (events() != null) { + events().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerState.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerState.java new file mode 100644 index 000000000000..2fb2ec8471c5 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerState.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The ContainerState model. */ +@Immutable +public final class ContainerState { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerState.class); + + /* + * The state of the container instance. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /* + * The date-time when the container instance state started. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * The container instance exit codes correspond to those from the `docker + * run` command. + */ + @JsonProperty(value = "exitCode", access = JsonProperty.Access.WRITE_ONLY) + private Integer exitCode; + + /* + * The date-time when the container instance state finished. + */ + @JsonProperty(value = "finishTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime finishTime; + + /* + * The human-readable status of the container instance state. + */ + @JsonProperty(value = "detailStatus", access = JsonProperty.Access.WRITE_ONLY) + private String detailStatus; + + /** + * Get the state property: The state of the container instance. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Get the startTime property: The date-time when the container instance state started. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the exitCode property: The container instance exit codes correspond to those from the `docker run` command. + * + * @return the exitCode value. + */ + public Integer exitCode() { + return this.exitCode; + } + + /** + * Get the finishTime property: The date-time when the container instance state finished. + * + * @return the finishTime value. + */ + public OffsetDateTime finishTime() { + return this.finishTime; + } + + /** + * Get the detailStatus property: The human-readable status of the container instance state. + * + * @return the detailStatus value. + */ + public String detailStatus() { + return this.detailStatus; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsConfiguration.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsConfiguration.java new file mode 100644 index 000000000000..fdc94223c2a5 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsConfiguration.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The DnsConfiguration model. */ +@Fluent +public final class DnsConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DnsConfiguration.class); + + /* + * The DNS servers for the container group. + */ + @JsonProperty(value = "nameServers", required = true) + private List nameServers; + + /* + * The DNS search domains for hostname lookup in the container group. + */ + @JsonProperty(value = "searchDomains") + private String searchDomains; + + /* + * The DNS options for the container group. + */ + @JsonProperty(value = "options") + private String options; + + /** + * Get the nameServers property: The DNS servers for the container group. + * + * @return the nameServers value. + */ + public List nameServers() { + return this.nameServers; + } + + /** + * Set the nameServers property: The DNS servers for the container group. + * + * @param nameServers the nameServers value to set. + * @return the DnsConfiguration object itself. + */ + public DnsConfiguration withNameServers(List nameServers) { + this.nameServers = nameServers; + return this; + } + + /** + * Get the searchDomains property: The DNS search domains for hostname lookup in the container group. + * + * @return the searchDomains value. + */ + public String searchDomains() { + return this.searchDomains; + } + + /** + * Set the searchDomains property: The DNS search domains for hostname lookup in the container group. + * + * @param searchDomains the searchDomains value to set. + * @return the DnsConfiguration object itself. + */ + public DnsConfiguration withSearchDomains(String searchDomains) { + this.searchDomains = searchDomains; + return this; + } + + /** + * Get the options property: The DNS options for the container group. + * + * @return the options value. + */ + public String options() { + return this.options; + } + + /** + * Set the options property: The DNS options for the container group. + * + * @param options the options value to set. + * @return the DnsConfiguration object itself. + */ + public DnsConfiguration withOptions(String options) { + this.options = options; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nameServers() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property nameServers in model DnsConfiguration")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/EncryptionProperties.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/EncryptionProperties.java new file mode 100644 index 000000000000..2b7e41e2c209 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/EncryptionProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The EncryptionProperties model. */ +@Fluent +public final class EncryptionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionProperties.class); + + /* + * The keyvault base url. + */ + @JsonProperty(value = "vaultBaseUrl", required = true) + private String vaultBaseUrl; + + /* + * The encryption key name. + */ + @JsonProperty(value = "keyName", required = true) + private String keyName; + + /* + * The encryption key version. + */ + @JsonProperty(value = "keyVersion", required = true) + private String keyVersion; + + /** + * Get the vaultBaseUrl property: The keyvault base url. + * + * @return the vaultBaseUrl value. + */ + public String vaultBaseUrl() { + return this.vaultBaseUrl; + } + + /** + * Set the vaultBaseUrl property: The keyvault base url. + * + * @param vaultBaseUrl the vaultBaseUrl value to set. + * @return the EncryptionProperties object itself. + */ + public EncryptionProperties withVaultBaseUrl(String vaultBaseUrl) { + this.vaultBaseUrl = vaultBaseUrl; + return this; + } + + /** + * Get the keyName property: The encryption key name. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the keyName property: The encryption key name. + * + * @param keyName the keyName value to set. + * @return the EncryptionProperties object itself. + */ + public EncryptionProperties withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the keyVersion property: The encryption key version. + * + * @return the keyVersion value. + */ + public String keyVersion() { + return this.keyVersion; + } + + /** + * Set the keyVersion property: The encryption key version. + * + * @param keyVersion the keyVersion value to set. + * @return the EncryptionProperties object itself. + */ + public EncryptionProperties withKeyVersion(String keyVersion) { + this.keyVersion = keyVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vaultBaseUrl() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property vaultBaseUrl in model EncryptionProperties")); + } + if (keyName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property keyName in model EncryptionProperties")); + } + if (keyVersion() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property keyVersion in model EncryptionProperties")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/EnvironmentVariable.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/EnvironmentVariable.java new file mode 100644 index 000000000000..9846d4ed6837 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/EnvironmentVariable.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The EnvironmentVariable model. */ +@Fluent +public final class EnvironmentVariable { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentVariable.class); + + /* + * The name of the environment variable. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The value of the environment variable. + */ + @JsonProperty(value = "value") + private String value; + + /* + * The value of the secure environment variable. + */ + @JsonProperty(value = "secureValue") + private String secureValue; + + /** + * Get the name property: The name of the environment variable. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the environment variable. + * + * @param name the name value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: The value of the environment variable. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the environment variable. + * + * @param value the value value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the secureValue property: The value of the secure environment variable. + * + * @return the secureValue value. + */ + public String secureValue() { + return this.secureValue; + } + + /** + * Set the secureValue property: The value of the secure environment variable. + * + * @param secureValue the secureValue value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withSecureValue(String secureValue) { + this.secureValue = secureValue; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model EnvironmentVariable")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Event.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Event.java new file mode 100644 index 000000000000..935f392fe6cb --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Event.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The Event model. */ +@Immutable +public final class Event { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Event.class); + + /* + * The count of the event. + */ + @JsonProperty(value = "count", access = JsonProperty.Access.WRITE_ONLY) + private Integer count; + + /* + * The date-time of the earliest logged event. + */ + @JsonProperty(value = "firstTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime firstTimestamp; + + /* + * The date-time of the latest logged event. + */ + @JsonProperty(value = "lastTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastTimestamp; + + /* + * The event name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The event message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * The event type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the count property: The count of the event. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Get the firstTimestamp property: The date-time of the earliest logged event. + * + * @return the firstTimestamp value. + */ + public OffsetDateTime firstTimestamp() { + return this.firstTimestamp; + } + + /** + * Get the lastTimestamp property: The date-time of the latest logged event. + * + * @return the lastTimestamp value. + */ + public OffsetDateTime lastTimestamp() { + return this.lastTimestamp; + } + + /** + * Get the name property: The event name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the message property: The event message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the type property: The event type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GitRepoVolume.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GitRepoVolume.java new file mode 100644 index 000000000000..07c8bfe6d8ea --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GitRepoVolume.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The GitRepoVolume model. */ +@Fluent +public final class GitRepoVolume { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GitRepoVolume.class); + + /* + * Target directory name. Must not contain or start with '..'. If '.' is + * supplied, the volume directory will be the git repository. Otherwise, + * if specified, the volume will contain the git repository in the + * subdirectory with the given name. + */ + @JsonProperty(value = "directory") + private String directory; + + /* + * Repository URL + */ + @JsonProperty(value = "repository", required = true) + private String repository; + + /* + * Commit hash for the specified revision. + */ + @JsonProperty(value = "revision") + private String revision; + + /** + * Get the directory property: Target directory name. Must not contain or start with '..'. If '.' is supplied, the + * volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository + * in the subdirectory with the given name. + * + * @return the directory value. + */ + public String directory() { + return this.directory; + } + + /** + * Set the directory property: Target directory name. Must not contain or start with '..'. If '.' is supplied, the + * volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository + * in the subdirectory with the given name. + * + * @param directory the directory value to set. + * @return the GitRepoVolume object itself. + */ + public GitRepoVolume withDirectory(String directory) { + this.directory = directory; + return this; + } + + /** + * Get the repository property: Repository URL. + * + * @return the repository value. + */ + public String repository() { + return this.repository; + } + + /** + * Set the repository property: Repository URL. + * + * @param repository the repository value to set. + * @return the GitRepoVolume object itself. + */ + public GitRepoVolume withRepository(String repository) { + this.repository = repository; + return this; + } + + /** + * Get the revision property: Commit hash for the specified revision. + * + * @return the revision value. + */ + public String revision() { + return this.revision; + } + + /** + * Set the revision property: Commit hash for the specified revision. + * + * @param revision the revision value to set. + * @return the GitRepoVolume object itself. + */ + public GitRepoVolume withRevision(String revision) { + this.revision = revision; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (repository() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property repository in model GitRepoVolume")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuResource.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuResource.java new file mode 100644 index 000000000000..6e2e5e9727cc --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuResource.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The GpuResource model. */ +@Fluent +public final class GpuResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GpuResource.class); + + /* + * The count of the GPU resource. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /* + * The SKU of the GPU resource. + */ + @JsonProperty(value = "sku", required = true) + private GpuSku sku; + + /** + * Get the count property: The count of the GPU resource. + * + * @return the count value. + */ + public int count() { + return this.count; + } + + /** + * Set the count property: The count of the GPU resource. + * + * @param count the count value to set. + * @return the GpuResource object itself. + */ + public GpuResource withCount(int count) { + this.count = count; + return this; + } + + /** + * Get the sku property: The SKU of the GPU resource. + * + * @return the sku value. + */ + public GpuSku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU of the GPU resource. + * + * @param sku the sku value to set. + * @return the GpuResource object itself. + */ + public GpuResource withSku(GpuSku sku) { + this.sku = sku; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property sku in model GpuResource")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuSku.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuSku.java new file mode 100644 index 000000000000..eeac31935e85 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuSku.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for GpuSku. */ +public final class GpuSku extends ExpandableStringEnum { + /** Static value K80 for GpuSku. */ + public static final GpuSku K80 = fromString("K80"); + + /** Static value P100 for GpuSku. */ + public static final GpuSku P100 = fromString("P100"); + + /** Static value V100 for GpuSku. */ + public static final GpuSku V100 = fromString("V100"); + + /** + * Creates or finds a GpuSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding GpuSku. + */ + @JsonCreator + public static GpuSku fromString(String name) { + return fromString(name, GpuSku.class); + } + + /** @return known GpuSku values. */ + public static Collection values() { + return values(GpuSku.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ImageRegistryCredential.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ImageRegistryCredential.java new file mode 100644 index 000000000000..714337b49eab --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ImageRegistryCredential.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ImageRegistryCredential model. */ +@Fluent +public final class ImageRegistryCredential { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageRegistryCredential.class); + + /* + * The Docker image registry server without a protocol such as "http" and + * "https". + */ + @JsonProperty(value = "server", required = true) + private String server; + + /* + * The username for the private registry. + */ + @JsonProperty(value = "username", required = true) + private String username; + + /* + * The password for the private registry. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the server property: The Docker image registry server without a protocol such as "http" and "https". + * + * @return the server value. + */ + public String server() { + return this.server; + } + + /** + * Set the server property: The Docker image registry server without a protocol such as "http" and "https". + * + * @param server the server value to set. + * @return the ImageRegistryCredential object itself. + */ + public ImageRegistryCredential withServer(String server) { + this.server = server; + return this; + } + + /** + * Get the username property: The username for the private registry. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The username for the private registry. + * + * @param username the username value to set. + * @return the ImageRegistryCredential object itself. + */ + public ImageRegistryCredential withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: The password for the private registry. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password for the private registry. + * + * @param password the password value to set. + * @return the ImageRegistryCredential object itself. + */ + public ImageRegistryCredential withPassword(String password) { + this.password = password; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (server() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property server in model ImageRegistryCredential")); + } + if (username() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property username in model ImageRegistryCredential")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/InitContainerDefinition.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/InitContainerDefinition.java new file mode 100644 index 000000000000..e6228e5baf55 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/InitContainerDefinition.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The InitContainerDefinition model. */ +@JsonFlatten +@Fluent +public class InitContainerDefinition { + @JsonIgnore private final ClientLogger logger = new ClientLogger(InitContainerDefinition.class); + + /* + * The name for the init container. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The image of the init container. + */ + @JsonProperty(value = "properties.image") + private String image; + + /* + * The command to execute within the init container in exec form. + */ + @JsonProperty(value = "properties.command") + private List command; + + /* + * The environment variables to set in the init container. + */ + @JsonProperty(value = "properties.environmentVariables") + private List environmentVariables; + + /* + * The instance view of the init container. Only valid in response. + */ + @JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY) + private InitContainerPropertiesDefinitionInstanceView instanceView; + + /* + * The volume mounts available to the init container. + */ + @JsonProperty(value = "properties.volumeMounts") + private List volumeMounts; + + /** + * Get the name property: The name for the init container. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name for the init container. + * + * @param name the name value to set. + * @return the InitContainerDefinition object itself. + */ + public InitContainerDefinition withName(String name) { + this.name = name; + return this; + } + + /** + * Get the image property: The image of the init container. + * + * @return the image value. + */ + public String image() { + return this.image; + } + + /** + * Set the image property: The image of the init container. + * + * @param image the image value to set. + * @return the InitContainerDefinition object itself. + */ + public InitContainerDefinition withImage(String image) { + this.image = image; + return this; + } + + /** + * Get the command property: The command to execute within the init container in exec form. + * + * @return the command value. + */ + public List command() { + return this.command; + } + + /** + * Set the command property: The command to execute within the init container in exec form. + * + * @param command the command value to set. + * @return the InitContainerDefinition object itself. + */ + public InitContainerDefinition withCommand(List command) { + this.command = command; + return this; + } + + /** + * Get the environmentVariables property: The environment variables to set in the init container. + * + * @return the environmentVariables value. + */ + public List environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: The environment variables to set in the init container. + * + * @param environmentVariables the environmentVariables value to set. + * @return the InitContainerDefinition object itself. + */ + public InitContainerDefinition withEnvironmentVariables(List environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the instanceView property: The instance view of the init container. Only valid in response. + * + * @return the instanceView value. + */ + public InitContainerPropertiesDefinitionInstanceView instanceView() { + return this.instanceView; + } + + /** + * Get the volumeMounts property: The volume mounts available to the init container. + * + * @return the volumeMounts value. + */ + public List volumeMounts() { + return this.volumeMounts; + } + + /** + * Set the volumeMounts property: The volume mounts available to the init container. + * + * @param volumeMounts the volumeMounts value to set. + * @return the InitContainerDefinition object itself. + */ + public InitContainerDefinition withVolumeMounts(List volumeMounts) { + this.volumeMounts = volumeMounts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model InitContainerDefinition")); + } + if (environmentVariables() != null) { + environmentVariables().forEach(e -> e.validate()); + } + if (instanceView() != null) { + instanceView().validate(); + } + if (volumeMounts() != null) { + volumeMounts().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/InitContainerPropertiesDefinitionInstanceView.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/InitContainerPropertiesDefinitionInstanceView.java new file mode 100644 index 000000000000..dc3354403f9b --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/InitContainerPropertiesDefinitionInstanceView.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The InitContainerPropertiesDefinitionInstanceView model. */ +@Immutable +public final class InitContainerPropertiesDefinitionInstanceView { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(InitContainerPropertiesDefinitionInstanceView.class); + + /* + * The number of times that the init container has been restarted. + */ + @JsonProperty(value = "restartCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer restartCount; + + /* + * The current state of the init container. + */ + @JsonProperty(value = "currentState", access = JsonProperty.Access.WRITE_ONLY) + private ContainerState currentState; + + /* + * The previous state of the init container. + */ + @JsonProperty(value = "previousState", access = JsonProperty.Access.WRITE_ONLY) + private ContainerState previousState; + + /* + * The events of the init container. + */ + @JsonProperty(value = "events", access = JsonProperty.Access.WRITE_ONLY) + private List events; + + /** + * Get the restartCount property: The number of times that the init container has been restarted. + * + * @return the restartCount value. + */ + public Integer restartCount() { + return this.restartCount; + } + + /** + * Get the currentState property: The current state of the init container. + * + * @return the currentState value. + */ + public ContainerState currentState() { + return this.currentState; + } + + /** + * Get the previousState property: The previous state of the init container. + * + * @return the previousState value. + */ + public ContainerState previousState() { + return this.previousState; + } + + /** + * Get the events property: The events of the init container. + * + * @return the events value. + */ + public List events() { + return this.events; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (currentState() != null) { + currentState().validate(); + } + if (previousState() != null) { + previousState().validate(); + } + if (events() != null) { + events().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/IpAddress.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/IpAddress.java new file mode 100644 index 000000000000..edecb4ce3790 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/IpAddress.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The IpAddress model. */ +@Fluent +public final class IpAddress { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IpAddress.class); + + /* + * The list of ports exposed on the container group. + */ + @JsonProperty(value = "ports", required = true) + private List ports; + + /* + * Specifies if the IP is exposed to the public internet or private VNET. + */ + @JsonProperty(value = "type", required = true) + private ContainerGroupIpAddressType type; + + /* + * The IP exposed to the public internet. + */ + @JsonProperty(value = "ip") + private String ip; + + /* + * The Dns name label for the IP. + */ + @JsonProperty(value = "dnsNameLabel") + private String dnsNameLabel; + + /* + * The FQDN for the IP. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Get the ports property: The list of ports exposed on the container group. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: The list of ports exposed on the container group. + * + * @param ports the ports value to set. + * @return the IpAddress object itself. + */ + public IpAddress withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Get the type property: Specifies if the IP is exposed to the public internet or private VNET. + * + * @return the type value. + */ + public ContainerGroupIpAddressType type() { + return this.type; + } + + /** + * Set the type property: Specifies if the IP is exposed to the public internet or private VNET. + * + * @param type the type value to set. + * @return the IpAddress object itself. + */ + public IpAddress withType(ContainerGroupIpAddressType type) { + this.type = type; + return this; + } + + /** + * Get the ip property: The IP exposed to the public internet. + * + * @return the ip value. + */ + public String ip() { + return this.ip; + } + + /** + * Set the ip property: The IP exposed to the public internet. + * + * @param ip the ip value to set. + * @return the IpAddress object itself. + */ + public IpAddress withIp(String ip) { + this.ip = ip; + return this; + } + + /** + * Get the dnsNameLabel property: The Dns name label for the IP. + * + * @return the dnsNameLabel value. + */ + public String dnsNameLabel() { + return this.dnsNameLabel; + } + + /** + * Set the dnsNameLabel property: The Dns name label for the IP. + * + * @param dnsNameLabel the dnsNameLabel value to set. + * @return the IpAddress object itself. + */ + public IpAddress withDnsNameLabel(String dnsNameLabel) { + this.dnsNameLabel = dnsNameLabel; + return this; + } + + /** + * Get the fqdn property: The FQDN for the IP. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ports() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property ports in model IpAddress")); + } else { + ports().forEach(e -> e.validate()); + } + if (type() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property type in model IpAddress")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalytics.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalytics.java new file mode 100644 index 000000000000..86d3a845417e --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalytics.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The LogAnalytics model. */ +@Fluent +public final class LogAnalytics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LogAnalytics.class); + + /* + * The workspace id for log analytics + */ + @JsonProperty(value = "workspaceId", required = true) + private String workspaceId; + + /* + * The workspace key for log analytics + */ + @JsonProperty(value = "workspaceKey", required = true) + private String workspaceKey; + + /* + * The log type to be used. + */ + @JsonProperty(value = "logType") + private LogAnalyticsLogType logType; + + /* + * Metadata for log analytics. + */ + @JsonProperty(value = "metadata") + private Map metadata; + + /** + * Get the workspaceId property: The workspace id for log analytics. + * + * @return the workspaceId value. + */ + public String workspaceId() { + return this.workspaceId; + } + + /** + * Set the workspaceId property: The workspace id for log analytics. + * + * @param workspaceId the workspaceId value to set. + * @return the LogAnalytics object itself. + */ + public LogAnalytics withWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * Get the workspaceKey property: The workspace key for log analytics. + * + * @return the workspaceKey value. + */ + public String workspaceKey() { + return this.workspaceKey; + } + + /** + * Set the workspaceKey property: The workspace key for log analytics. + * + * @param workspaceKey the workspaceKey value to set. + * @return the LogAnalytics object itself. + */ + public LogAnalytics withWorkspaceKey(String workspaceKey) { + this.workspaceKey = workspaceKey; + return this; + } + + /** + * Get the logType property: The log type to be used. + * + * @return the logType value. + */ + public LogAnalyticsLogType logType() { + return this.logType; + } + + /** + * Set the logType property: The log type to be used. + * + * @param logType the logType value to set. + * @return the LogAnalytics object itself. + */ + public LogAnalytics withLogType(LogAnalyticsLogType logType) { + this.logType = logType; + return this; + } + + /** + * Get the metadata property: Metadata for log analytics. + * + * @return the metadata value. + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata for log analytics. + * + * @param metadata the metadata value to set. + * @return the LogAnalytics object itself. + */ + public LogAnalytics withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (workspaceId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property workspaceId in model LogAnalytics")); + } + if (workspaceKey() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property workspaceKey in model LogAnalytics")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalyticsLogType.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalyticsLogType.java new file mode 100644 index 000000000000..f28fa01da429 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalyticsLogType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for LogAnalyticsLogType. */ +public final class LogAnalyticsLogType extends ExpandableStringEnum { + /** Static value ContainerInsights for LogAnalyticsLogType. */ + public static final LogAnalyticsLogType CONTAINER_INSIGHTS = fromString("ContainerInsights"); + + /** Static value ContainerInstanceLogs for LogAnalyticsLogType. */ + public static final LogAnalyticsLogType CONTAINER_INSTANCE_LOGS = fromString("ContainerInstanceLogs"); + + /** + * Creates or finds a LogAnalyticsLogType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogAnalyticsLogType. + */ + @JsonCreator + public static LogAnalyticsLogType fromString(String name) { + return fromString(name, LogAnalyticsLogType.class); + } + + /** @return known LogAnalyticsLogType values. */ + public static Collection values() { + return values(LogAnalyticsLogType.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/OperatingSystemTypes.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/OperatingSystemTypes.java new file mode 100644 index 000000000000..9dea6a2c67d1 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/OperatingSystemTypes.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OperatingSystemTypes. */ +public final class OperatingSystemTypes extends ExpandableStringEnum { + /** Static value Windows for OperatingSystemTypes. */ + public static final OperatingSystemTypes WINDOWS = fromString("Windows"); + + /** Static value Linux for OperatingSystemTypes. */ + public static final OperatingSystemTypes LINUX = fromString("Linux"); + + /** + * Creates or finds a OperatingSystemTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperatingSystemTypes. + */ + @JsonCreator + public static OperatingSystemTypes fromString(String name) { + return fromString(name, OperatingSystemTypes.class); + } + + /** @return known OperatingSystemTypes values. */ + public static Collection values() { + return values(OperatingSystemTypes.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Operation.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Operation.java new file mode 100644 index 000000000000..76ffdff26552 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Operation.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Operation model. */ +@Fluent +public final class Operation { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Operation.class); + + /* + * The name of the operation. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The display information of the operation. + */ + @JsonProperty(value = "display", required = true) + private OperationDisplay display; + + /* + * The additional properties. + */ + @JsonProperty(value = "properties") + private Object properties; + + /* + * The intended executor of the operation. + */ + @JsonProperty(value = "origin") + private ContainerInstanceOperationsOrigin origin; + + /** + * Get the name property: The name of the operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the operation. + * + * @param name the name value to set. + * @return the Operation object itself. + */ + public Operation withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display property: The display information of the operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: The display information of the operation. + * + * @param display the display value to set. + * @return the Operation object itself. + */ + public Operation withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the properties property: The additional properties. + * + * @return the properties value. + */ + public Object properties() { + return this.properties; + } + + /** + * Set the properties property: The additional properties. + * + * @param properties the properties value to set. + * @return the Operation object itself. + */ + public Operation withProperties(Object properties) { + this.properties = properties; + return this; + } + + /** + * Get the origin property: The intended executor of the operation. + * + * @return the origin value. + */ + public ContainerInstanceOperationsOrigin origin() { + return this.origin; + } + + /** + * Set the origin property: The intended executor of the operation. + * + * @param origin the origin value to set. + * @return the Operation object itself. + */ + public Operation withOrigin(ContainerInstanceOperationsOrigin origin) { + this.origin = origin; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Operation")); + } + if (display() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property display in model Operation")); + } else { + display().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/OperationDisplay.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/OperationDisplay.java new file mode 100644 index 000000000000..6dbcfb163750 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/OperationDisplay.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OperationDisplay model. */ +@Fluent +public final class OperationDisplay { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); + + /* + * The name of the provider of the operation. + */ + @JsonProperty(value = "provider") + private String provider; + + /* + * The name of the resource type of the operation. + */ + @JsonProperty(value = "resource") + private String resource; + + /* + * The friendly name of the operation. + */ + @JsonProperty(value = "operation") + private String operation; + + /* + * The description of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the provider property: The name of the provider of the operation. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: The name of the provider of the operation. + * + * @param provider the provider value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource property: The name of the resource type of the operation. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource property: The name of the resource type of the operation. + * + * @param resource the resource value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the operation property: The friendly name of the operation. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation property: The friendly name of the operation. + * + * @param operation the operation value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description property: The description of the operation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the operation. + * + * @param description the description value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Port.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Port.java new file mode 100644 index 000000000000..16b07a98975d --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Port.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Port model. */ +@Fluent +public final class Port { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Port.class); + + /* + * The protocol associated with the port. + */ + @JsonProperty(value = "protocol") + private ContainerGroupNetworkProtocol protocol; + + /* + * The port number. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /** + * Get the protocol property: The protocol associated with the port. + * + * @return the protocol value. + */ + public ContainerGroupNetworkProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The protocol associated with the port. + * + * @param protocol the protocol value to set. + * @return the Port object itself. + */ + public Port withProtocol(ContainerGroupNetworkProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the port property: The port number. + * + * @return the port value. + */ + public int port() { + return this.port; + } + + /** + * Set the port property: The port number. + * + * @param port the port value to set. + * @return the Port object itself. + */ + public Port withPort(int port) { + this.port = port; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceIdentityType.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceIdentityType.java new file mode 100644 index 000000000000..bc02b3a1eb02 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceIdentityType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ResourceIdentityType. */ +public enum ResourceIdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** Enum value UserAssigned. */ + USER_ASSIGNED("UserAssigned"), + + /** Enum value SystemAssigned, UserAssigned. */ + SYSTEM_ASSIGNED__USER_ASSIGNED("SystemAssigned, UserAssigned"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a ResourceIdentityType instance. */ + private final String value; + + ResourceIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceIdentityType object, or null if unable to parse. + */ + @JsonCreator + public static ResourceIdentityType fromString(String value) { + ResourceIdentityType[] items = ResourceIdentityType.values(); + for (ResourceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceLimits.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceLimits.java new file mode 100644 index 000000000000..55588a6130a1 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceLimits.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceLimits model. */ +@Fluent +public final class ResourceLimits { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceLimits.class); + + /* + * The memory limit in GB of this container instance. + */ + @JsonProperty(value = "memoryInGB") + private Double memoryInGB; + + /* + * The CPU limit of this container instance. + */ + @JsonProperty(value = "cpu") + private Double cpu; + + /* + * The GPU limit of this container instance. + */ + @JsonProperty(value = "gpu") + private GpuResource gpu; + + /** + * Get the memoryInGB property: The memory limit in GB of this container instance. + * + * @return the memoryInGB value. + */ + public Double memoryInGB() { + return this.memoryInGB; + } + + /** + * Set the memoryInGB property: The memory limit in GB of this container instance. + * + * @param memoryInGB the memoryInGB value to set. + * @return the ResourceLimits object itself. + */ + public ResourceLimits withMemoryInGB(Double memoryInGB) { + this.memoryInGB = memoryInGB; + return this; + } + + /** + * Get the cpu property: The CPU limit of this container instance. + * + * @return the cpu value. + */ + public Double cpu() { + return this.cpu; + } + + /** + * Set the cpu property: The CPU limit of this container instance. + * + * @param cpu the cpu value to set. + * @return the ResourceLimits object itself. + */ + public ResourceLimits withCpu(Double cpu) { + this.cpu = cpu; + return this; + } + + /** + * Get the gpu property: The GPU limit of this container instance. + * + * @return the gpu value. + */ + public GpuResource gpu() { + return this.gpu; + } + + /** + * Set the gpu property: The GPU limit of this container instance. + * + * @param gpu the gpu value to set. + * @return the ResourceLimits object itself. + */ + public ResourceLimits withGpu(GpuResource gpu) { + this.gpu = gpu; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (gpu() != null) { + gpu().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequests.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequests.java new file mode 100644 index 000000000000..e8807b085e3a --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequests.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceRequests model. */ +@Fluent +public final class ResourceRequests { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceRequests.class); + + /* + * The memory request in GB of this container instance. + */ + @JsonProperty(value = "memoryInGB", required = true) + private double memoryInGB; + + /* + * The CPU request of this container instance. + */ + @JsonProperty(value = "cpu", required = true) + private double cpu; + + /* + * The GPU request of this container instance. + */ + @JsonProperty(value = "gpu") + private GpuResource gpu; + + /** + * Get the memoryInGB property: The memory request in GB of this container instance. + * + * @return the memoryInGB value. + */ + public double memoryInGB() { + return this.memoryInGB; + } + + /** + * Set the memoryInGB property: The memory request in GB of this container instance. + * + * @param memoryInGB the memoryInGB value to set. + * @return the ResourceRequests object itself. + */ + public ResourceRequests withMemoryInGB(double memoryInGB) { + this.memoryInGB = memoryInGB; + return this; + } + + /** + * Get the cpu property: The CPU request of this container instance. + * + * @return the cpu value. + */ + public double cpu() { + return this.cpu; + } + + /** + * Set the cpu property: The CPU request of this container instance. + * + * @param cpu the cpu value to set. + * @return the ResourceRequests object itself. + */ + public ResourceRequests withCpu(double cpu) { + this.cpu = cpu; + return this; + } + + /** + * Get the gpu property: The GPU request of this container instance. + * + * @return the gpu value. + */ + public GpuResource gpu() { + return this.gpu; + } + + /** + * Set the gpu property: The GPU request of this container instance. + * + * @param gpu the gpu value to set. + * @return the ResourceRequests object itself. + */ + public ResourceRequests withGpu(GpuResource gpu) { + this.gpu = gpu; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (gpu() != null) { + gpu().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequirements.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequirements.java new file mode 100644 index 000000000000..0ca931dfc83d --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequirements.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResourceRequirements model. */ +@Fluent +public final class ResourceRequirements { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceRequirements.class); + + /* + * The resource requests of this container instance. + */ + @JsonProperty(value = "requests", required = true) + private ResourceRequests requests; + + /* + * The resource limits of this container instance. + */ + @JsonProperty(value = "limits") + private ResourceLimits limits; + + /** + * Get the requests property: The resource requests of this container instance. + * + * @return the requests value. + */ + public ResourceRequests requests() { + return this.requests; + } + + /** + * Set the requests property: The resource requests of this container instance. + * + * @param requests the requests value to set. + * @return the ResourceRequirements object itself. + */ + public ResourceRequirements withRequests(ResourceRequests requests) { + this.requests = requests; + return this; + } + + /** + * Get the limits property: The resource limits of this container instance. + * + * @return the limits value. + */ + public ResourceLimits limits() { + return this.limits; + } + + /** + * Set the limits property: The resource limits of this container instance. + * + * @param limits the limits value to set. + * @return the ResourceRequirements object itself. + */ + public ResourceRequirements withLimits(ResourceLimits limits) { + this.limits = limits; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (requests() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property requests in model ResourceRequirements")); + } else { + requests().validate(); + } + if (limits() != null) { + limits().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Scheme.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Scheme.java new file mode 100644 index 000000000000..002a6bda1f60 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Scheme.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Scheme. */ +public final class Scheme extends ExpandableStringEnum { + /** Static value http for Scheme. */ + public static final Scheme HTTP = fromString("http"); + + /** Static value https for Scheme. */ + public static final Scheme HTTPS = fromString("https"); + + /** + * Creates or finds a Scheme from its string representation. + * + * @param name a name to look for. + * @return the corresponding Scheme. + */ + @JsonCreator + public static Scheme fromString(String name) { + return fromString(name, Scheme.class); + } + + /** @return known Scheme values. */ + public static Collection values() { + return values(Scheme.class); + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageName.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageName.java new file mode 100644 index 000000000000..d481aded732b --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageName.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The UsageName model. */ +@Immutable +public final class UsageName { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageName.class); + + /* + * The name of the resource + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /* + * The localized name of the resource + */ + @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) + private String localizedValue; + + /** + * Get the value property: The name of the resource. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Get the localizedValue property: The localized name of the resource. + * + * @return the localizedValue value. + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Volume.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Volume.java new file mode 100644 index 000000000000..dbe2af0cb81f --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/Volume.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The Volume model. */ +@Fluent +public final class Volume { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Volume.class); + + /* + * The name of the volume. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The Azure File volume. + */ + @JsonProperty(value = "azureFile") + private AzureFileVolume azureFile; + + /* + * The empty directory volume. + */ + @JsonProperty(value = "emptyDir") + private Object emptyDir; + + /* + * The secret volume. + */ + @JsonProperty(value = "secret") + private Map secret; + + /* + * The git repo volume. + */ + @JsonProperty(value = "gitRepo") + private GitRepoVolume gitRepo; + + /** + * Get the name property: The name of the volume. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the volume. + * + * @param name the name value to set. + * @return the Volume object itself. + */ + public Volume withName(String name) { + this.name = name; + return this; + } + + /** + * Get the azureFile property: The Azure File volume. + * + * @return the azureFile value. + */ + public AzureFileVolume azureFile() { + return this.azureFile; + } + + /** + * Set the azureFile property: The Azure File volume. + * + * @param azureFile the azureFile value to set. + * @return the Volume object itself. + */ + public Volume withAzureFile(AzureFileVolume azureFile) { + this.azureFile = azureFile; + return this; + } + + /** + * Get the emptyDir property: The empty directory volume. + * + * @return the emptyDir value. + */ + public Object emptyDir() { + return this.emptyDir; + } + + /** + * Set the emptyDir property: The empty directory volume. + * + * @param emptyDir the emptyDir value to set. + * @return the Volume object itself. + */ + public Volume withEmptyDir(Object emptyDir) { + this.emptyDir = emptyDir; + return this; + } + + /** + * Get the secret property: The secret volume. + * + * @return the secret value. + */ + public Map secret() { + return this.secret; + } + + /** + * Set the secret property: The secret volume. + * + * @param secret the secret value to set. + * @return the Volume object itself. + */ + public Volume withSecret(Map secret) { + this.secret = secret; + return this; + } + + /** + * Get the gitRepo property: The git repo volume. + * + * @return the gitRepo value. + */ + public GitRepoVolume gitRepo() { + return this.gitRepo; + } + + /** + * Set the gitRepo property: The git repo volume. + * + * @param gitRepo the gitRepo value to set. + * @return the Volume object itself. + */ + public Volume withGitRepo(GitRepoVolume gitRepo) { + this.gitRepo = gitRepo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Volume")); + } + if (azureFile() != null) { + azureFile().validate(); + } + if (gitRepo() != null) { + gitRepo().validate(); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/VolumeMount.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/VolumeMount.java new file mode 100644 index 000000000000..6eb15fe59545 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/VolumeMount.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerinstance.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The VolumeMount model. */ +@Fluent +public final class VolumeMount { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeMount.class); + + /* + * The name of the volume mount. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The path within the container where the volume should be mounted. Must + * not contain colon (:). + */ + @JsonProperty(value = "mountPath", required = true) + private String mountPath; + + /* + * The flag indicating whether the volume mount is read-only. + */ + @JsonProperty(value = "readOnly") + private Boolean readOnly; + + /** + * Get the name property: The name of the volume mount. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the volume mount. + * + * @param name the name value to set. + * @return the VolumeMount object itself. + */ + public VolumeMount withName(String name) { + this.name = name; + return this; + } + + /** + * Get the mountPath property: The path within the container where the volume should be mounted. Must not contain + * colon (:). + * + * @return the mountPath value. + */ + public String mountPath() { + return this.mountPath; + } + + /** + * Set the mountPath property: The path within the container where the volume should be mounted. Must not contain + * colon (:). + * + * @param mountPath the mountPath value to set. + * @return the VolumeMount object itself. + */ + public VolumeMount withMountPath(String mountPath) { + this.mountPath = mountPath; + return this; + } + + /** + * Get the readOnly property: The flag indicating whether the volume mount is read-only. + * + * @return the readOnly value. + */ + public Boolean readOnly() { + return this.readOnly; + } + + /** + * Set the readOnly property: The flag indicating whether the volume mount is read-only. + * + * @param readOnly the readOnly value to set. + * @return the VolumeMount object itself. + */ + public VolumeMount withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model VolumeMount")); + } + if (mountPath() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property mountPath in model VolumeMount")); + } + } +} diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/package-info.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/package-info.java new file mode 100644 index 000000000000..de9958a137c0 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for ContainerInstanceManagementClient. null. */ +package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/package-info.java b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/package-info.java new file mode 100644 index 000000000000..20e3e792a731 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/main/java/com/azure/resourcemanager/containerinstance/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for ContainerInstanceManagementClient. null. */ +package com.azure.resourcemanager.containerinstance; diff --git a/sdk/containerinstance/mgmt/src/test/java/com/azure/resourcemanager/containerinstance/ContainerGroupTest.java b/sdk/containerinstance/mgmt/src/test/java/com/azure/resourcemanager/containerinstance/ContainerGroupTest.java new file mode 100644 index 000000000000..f04e800fe679 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/test/java/com/azure/resourcemanager/containerinstance/ContainerGroupTest.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance; + +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class ContainerGroupTest extends ContainerInstanceManagementTest { + @Test + public void testContainerGroupWithVirtualNetwork() { + String containerGroupName = generateRandomResourceName("container", 20); + Region region = Region.US_EAST; + + ContainerGroup containerGroup = + containerInstanceManager + .containerGroups() + .define(containerGroupName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withLinux() + .withPublicImageRegistryOnly() + .withoutVolume() + .withContainerInstance("nginx", 80) + .withNewVirtualNetwork("10.0.0.0/24") + .create(); + + Assertions.assertNotNull(containerGroup.networkProfileId()); + } +} diff --git a/sdk/containerinstance/mgmt/src/test/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementTest.java b/sdk/containerinstance/mgmt/src/test/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementTest.java new file mode 100644 index 000000000000..71335df27ad0 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/test/java/com/azure/resourcemanager/containerinstance/ContainerInstanceManagementTest.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance; + +import com.azure.core.http.HttpPipeline; +import com.azure.resourcemanager.resources.core.TestBase; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import java.io.IOException; + +public class ContainerInstanceManagementTest extends TestBase { + protected ContainerInstanceManager containerInstanceManager; + protected String rgName = ""; + + public ContainerInstanceManagementTest() { + } + + ContainerInstanceManagementTest(RunCondition runCondition) { + super(runCondition); + } + + @Override + protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) throws IOException { + rgName = generateRandomResourceName("rg", 20); + containerInstanceManager = ContainerInstanceManager.authenticate(httpPipeline, profile, sdkContext); + } + + @Override + protected void cleanUpResources() { + try { + containerInstanceManager.resourceManager().resourceGroups().beginDeleteByName(rgName); + } catch (Exception e) { + } + } +} diff --git a/sdk/containerinstance/mgmt/src/test/resources/session-records/testContainerGroupWithVirtualNetwork.json b/sdk/containerinstance/mgmt/src/test/resources/session-records/testContainerGroupWithVirtualNetwork.json new file mode 100644 index 000000000000..7bb182d8e256 --- /dev/null +++ b/sdk/containerinstance/mgmt/src/test/resources/session-records/testContainerGroupWithVirtualNetwork.json @@ -0,0 +1,343 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rga3e86299acf1b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (11.0.3; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:33:03 GMT", + "content-length" : "317", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "fe26eeb2-29ee-4371-a0b3-3f9ee4bc5e15", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083304Z:fe26eeb2-29ee-4371-a0b3-3f9ee4bc5e15", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "fe26eeb2-29ee-4371-a0b3-3f9ee4bc5e15", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b\",\"name\":\"rga3e86299acf1b\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-07-20T08:33:02.138118300Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a?api-version=2019-11-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-SNAPSHOT (11.0.3; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:33:12 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "azure-asyncnotification" : "Enabled", + "content-length" : "2144", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "e932bca6-7940-41e7-b4ce-0aad4a686a41", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-arm-service-request-id" : "de2e179c-2f45-4342-a304-11fb1f082bf2", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083313Z:e932bca6-7940-41e7-b4ce-0aad4a686a41", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "37104314-572c-490c-bc67-9b1a12ede49e", + "Body" : "{\r\n \"name\": \"net79a48466711a\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a\",\r\n \"etag\": \"W/\\\"dd45d9c6-9da4-4962-91a4-695ce2614ff5\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"0ae8bb12-5616-47ba-807d-081efa111738\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/24\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a/subnets/subnet0\",\r\n \"etag\": \"W/\\\"dd45d9c6-9da4-4962-91a4-695ce2614ff5\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [\r\n {\r\n \"name\": \"Microsoft.ContainerInstance/containerGroups\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a/subnets/subnet0/delegations/Microsoft.ContainerInstance/containerGroups\",\r\n \"etag\": \"W/\\\"dd45d9c6-9da4-4962-91a4-695ce2614ff5\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceName\": \"Microsoft.ContainerInstance/containerGroups\",\r\n \"actions\": [\r\n \"Microsoft.Network/virtualNetworks/subnets/action\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets/delegations\"\r\n }\r\n ],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}", + "azure-asyncoperation" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/37104314-572c-490c-bc67-9b1a12ede49e?api-version=2019-11-01" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/37104314-572c-490c-bc67-9b1a12ede49e?api-version=2019-11-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10 10.0)" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:33:17 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "29", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "effbd702-0324-471e-a79e-a1e4c65a4fc1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-arm-service-request-id" : "568d3a79-6781-48f3-ad5a-ba951aaa8d61", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083317Z:effbd702-0324-471e-a79e-a1e4c65a4fc1", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "0fc30f76-f72f-49b8-bce9-fbc7a7a67d75", + "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a?api-version=2019-11-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10 10.0)" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:33:17 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "2146", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "aaf7a613-d3d9-4f03-a980-79a086936d54", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-arm-service-request-id" : "297ed786-eb80-457b-bcf4-4ca32cc4d2bc", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083318Z:aaf7a613-d3d9-4f03-a980-79a086936d54", + "connection" : "keep-alive", + "etag" : "W/\"fc718555-26b5-43a4-a832-89467899fc5f\"", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "b9eaf56c-a2fb-41ff-8dc8-fdd733f58a71", + "Body" : "{\r\n \"name\": \"net79a48466711a\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a\",\r\n \"etag\": \"W/\\\"fc718555-26b5-43a4-a832-89467899fc5f\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"0ae8bb12-5616-47ba-807d-081efa111738\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/24\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a/subnets/subnet0\",\r\n \"etag\": \"W/\\\"fc718555-26b5-43a4-a832-89467899fc5f\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [\r\n {\r\n \"name\": \"Microsoft.ContainerInstance/containerGroups\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a/subnets/subnet0/delegations/Microsoft.ContainerInstance/containerGroups\",\r\n \"etag\": \"W/\\\"fc718555-26b5-43a4-a832-89467899fc5f\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceName\": \"Microsoft.ContainerInstance/containerGroups\",\r\n \"actions\": [\r\n \"Microsoft.Network/virtualNetworks/subnets/action\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets/delegations\"\r\n }\r\n ],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\": false\r\n }\r\n}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/networkProfiles/aci-profile-25703f?api-version=2019-11-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.network/2.0.0-SNAPSHOT (11.0.3; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:33:26 GMT", + "server" : "Microsoft-HTTPAPI/2.0", + "azure-asyncnotification" : "Enabled", + "content-length" : "1908", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "28117c74-43f4-44bd-8f80-7dcba91d9f8e", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-arm-service-request-id" : "91bff89e-8a69-4c9d-ad3a-b10594fd7cf4", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083326Z:28117c74-43f4-44bd-8f80-7dcba91d9f8e", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "65556a0b-1772-483b-8035-7953b419fee1", + "Body" : "{\r\n \"name\": \"aci-profile-25703f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/networkProfiles/aci-profile-25703f\",\r\n \"etag\": \"W/\\\"7c9453c5-66cf-4a1c-9858-d3d57a70fd84\\\"\",\r\n \"type\": \"Microsoft.Network/networkProfiles\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"70229eea-9d47-437c-b146-53318260a13f\",\r\n \"containerNetworkInterfaceConfigurations\": [\r\n {\r\n \"name\": \"eth0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/networkProfiles/aci-profile-25703f/containerNetworkInterfaceConfigurations/eth0\",\r\n \"etag\": \"W/\\\"7c9453c5-66cf-4a1c-9858-d3d57a70fd84\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfig0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/networkProfiles/aci-profile-25703f/containerNetworkInterfaceConfigurations/eth0/ipConfigurations/ipconfig0\",\r\n \"etag\": \"W/\\\"7c9453c5-66cf-4a1c-9858-d3d57a70fd84\\\"\",\r\n \"type\": \"Microsoft.Network/networkProfiles/containerNetworkInterfaceConfigurations/ipConfigurations\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/virtualNetworks/net79a48466711a/subnets/subnet0\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/networkProfiles/containerNetworkInterfaceConfigurations\"\r\n }\r\n ],\r\n \"containerNetworkInterfaces\": []\r\n }\r\n}", + "azure-asyncoperation" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/65556a0b-1772-483b-8035-7953b419fee1?api-version=2019-11-01" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (11.0.3; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:33:39 GMT", + "content-length" : "788", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "299", + "x-ms-correlation-request-id" : "65cf2fbe-cb34-4440-acd9-4bd3500e4465", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "99", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083339Z:65cf2fbe-cb34-4440-acd9-4bd3500e4465", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus:2d082004-e5e4-412e-a65f-541175ae0036", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Pending\",\"containers\":[{\"name\":\"container228205354\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"osType\":\"Linux\",\"instanceView\":{\"events\":[],\"state\":\"Pending\"},\"networkProfile\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/networkProfiles/aci-profile-25703f\"}},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354\",\"name\":\"container228205354\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus\",\"tags\":{}}", + "azure-asyncoperation" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus/operations/2d082004-e5e4-412e-a65f-541175ae0036?api-version=2018-06-01" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus/operations/2d082004-e5e4-412e-a65f-541175ae0036?api-version=2018-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10 10.0)" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:34:10 GMT", + "content-length" : "253", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4eee5d6a-530a-47a2-ae31-ffab7fd9e4a7", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083411Z:4eee5d6a-530a-47a2-ae31-ffab7fd9e4a7", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus:da189c43-2f44-44ca-ac26-c87d80b970d3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354\",\"status\":\"Pending\",\"startTime\":\"2020-07-20T08:33:36.9066788Z\",\"properties\":{\"events\":[]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus/operations/2d082004-e5e4-412e-a65f-541175ae0036?api-version=2018-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10 10.0)" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:34:43 GMT", + "content-length" : "253", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7ea5ec8c-4ea0-4790-8fdf-99b1cccd79d1", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083443Z:7ea5ec8c-4ea0-4790-8fdf-99b1cccd79d1", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus:f0f319fd-1b10-4b52-975d-9f4f40cf4c9d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354\",\"status\":\"Pending\",\"startTime\":\"2020-07-20T08:33:36.9066788Z\",\"properties\":{\"events\":[]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus/operations/2d082004-e5e4-412e-a65f-541175ae0036?api-version=2018-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10 10.0)" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:35:14 GMT", + "content-length" : "253", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cf2997f0-e3e2-4d13-a9da-edaa4e0a409b", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083515Z:cf2997f0-e3e2-4d13-a9da-edaa4e0a409b", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus:7d58a34d-0d6a-4c00-bd0b-696e719b642c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354\",\"status\":\"Pending\",\"startTime\":\"2020-07-20T08:33:36.9066788Z\",\"properties\":{\"events\":[]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus/operations/2d082004-e5e4-412e-a65f-541175ae0036?api-version=2018-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10 10.0)" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:35:47 GMT", + "content-length" : "1166", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5e6b5559-8ef8-4163-8b2a-61298a9aa142", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083548Z:5e6b5559-8ef8-4163-8b2a-61298a9aa142", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus:b3f5fd15-33b6-4f9c-af62-d697f520e2d3", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354\",\"status\":\"Creating\",\"startTime\":\"2020-07-20T08:33:36.9066788Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:33:37Z\",\"lastTimestamp\":\"2020-07-20T08:33:37Z\",\"name\":\"PrepareNetwork\",\"message\":\"Prepare network succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:22Z\",\"lastTimestamp\":\"2020-07-20T08:34:22Z\",\"name\":\"JoinNetwork\",\"message\":\"Join network failed for \\\"0ae8bb12-5616-47ba-807d-081efa111738\\\": Timeout.\",\"type\":\"Warning\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:45Z\",\"lastTimestamp\":\"2020-07-20T08:34:45Z\",\"name\":\"JoinNetwork\",\"message\":\"Join network succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:46Z\",\"lastTimestamp\":\"2020-07-20T08:34:46Z\",\"name\":\"DelegateSubnet\",\"message\":\"Delegate subnet succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:47Z\",\"lastTimestamp\":\"2020-07-20T08:34:47Z\",\"name\":\"ProvisionNetworkInterface\",\"message\":\"Provision network interface succeeded.\",\"type\":\"Normal\"}]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus/operations/2d082004-e5e4-412e-a65f-541175ae0036?api-version=2018-06-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10 10.0)" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:36:18 GMT", + "content-length" : "1806", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "532dc0be-9c2f-45bb-b4f3-3f3b08f36517", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083619Z:532dc0be-9c2f-45bb-b4f3-3f3b08f36517", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus:25e1a79b-fef8-4435-9dee-e65b639fe554", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354\",\"status\":\"Succeeded\",\"startTime\":\"2020-07-20T08:33:36.9066788Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:35:50Z\",\"lastTimestamp\":\"2020-07-20T08:35:50Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:35:54Z\",\"lastTimestamp\":\"2020-07-20T08:35:54Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:35:58Z\",\"lastTimestamp\":\"2020-07-20T08:35:58Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:35:58Z\",\"lastTimestamp\":\"2020-07-20T08:35:58Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:33:37Z\",\"lastTimestamp\":\"2020-07-20T08:33:37Z\",\"name\":\"PrepareNetwork\",\"message\":\"Prepare network succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:22Z\",\"lastTimestamp\":\"2020-07-20T08:34:22Z\",\"name\":\"JoinNetwork\",\"message\":\"Join network failed for \\\"0ae8bb12-5616-47ba-807d-081efa111738\\\": Timeout.\",\"type\":\"Warning\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:45Z\",\"lastTimestamp\":\"2020-07-20T08:34:45Z\",\"name\":\"JoinNetwork\",\"message\":\"Join network succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:46Z\",\"lastTimestamp\":\"2020-07-20T08:34:46Z\",\"name\":\"DelegateSubnet\",\"message\":\"Delegate subnet succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:47Z\",\"lastTimestamp\":\"2020-07-20T08:34:47Z\",\"name\":\"ProvisionNetworkInterface\",\"message\":\"Provision network interface succeeded.\",\"type\":\"Normal\"}]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354?api-version=2019-12-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (11.0.3; Windows 10 10.0)" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:36:19 GMT", + "content-length" : "2560", + "expires" : "-1", + "vary" : "Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d94b1fe9-d6ae-4370-8814-bcff4e826569", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083619Z:d94b1fe9-d6ae-4370-8814-bcff4e826569", + "connection" : "keep-alive", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus:d76717f2-0710-4ab8-9d1e-57e7305d503d", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"container228205354\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-20T08:35:58Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:35:50Z\",\"lastTimestamp\":\"2020-07-20T08:35:50Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:35:54Z\",\"lastTimestamp\":\"2020-07-20T08:35:54Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:35:58Z\",\"lastTimestamp\":\"2020-07-20T08:35:58Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:35:58Z\",\"lastTimestamp\":\"2020-07-20T08:35:58Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"10.0.0.4\",\"type\":\"Private\"},\"osType\":\"Linux\",\"instanceView\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:33:37Z\",\"lastTimestamp\":\"2020-07-20T08:33:37Z\",\"name\":\"PrepareNetwork\",\"message\":\"Prepare network succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:22Z\",\"lastTimestamp\":\"2020-07-20T08:34:22Z\",\"name\":\"JoinNetwork\",\"message\":\"Join network failed for \\\"0ae8bb12-5616-47ba-807d-081efa111738\\\": Timeout.\",\"type\":\"Warning\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:45Z\",\"lastTimestamp\":\"2020-07-20T08:34:45Z\",\"name\":\"JoinNetwork\",\"message\":\"Join network succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:46Z\",\"lastTimestamp\":\"2020-07-20T08:34:46Z\",\"name\":\"DelegateSubnet\",\"message\":\"Delegate subnet succeeded.\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-20T08:34:47Z\",\"lastTimestamp\":\"2020-07-20T08:34:47Z\",\"name\":\"ProvisionNetworkInterface\",\"message\":\"Provision network interface succeeded.\",\"type\":\"Normal\"}],\"state\":\"Running\"},\"networkProfile\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.Network/networkProfiles/aci-profile-25703f\"}},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rga3e86299acf1b/providers/Microsoft.ContainerInstance/containerGroups/container228205354\",\"name\":\"container228205354\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus\",\"tags\":{}}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rga3e86299acf1b?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (11.0.3; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Mon, 20 Jul 2020 08:36:24 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "08359ae6-ea0e-479c-9997-6cb083fc7137", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200720T083625Z:08359ae6-ea0e-479c-9997-6cb083fc7137", + "connection" : "keep-alive", + "location" : "http://localhost/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0EzRTg2Mjk5QUNGMUItRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2019-08-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "08359ae6-ea0e-479c-9997-6cb083fc7137", + "Body" : "" + } + } ], + "variables" : [ "rga3e86299acf1b", "container228205354", "net79a48466711a", "aci-profile-25703f" ] +} \ No newline at end of file diff --git a/sdk/containerregistry/mgmt/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java b/sdk/containerregistry/mgmt/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java index 87bc0e2df227..a738f860d392 100644 --- a/sdk/containerregistry/mgmt/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java +++ b/sdk/containerregistry/mgmt/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java @@ -5,7 +5,6 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; -import com.azure.core.implementation.annotation.Beta; import com.azure.resourcemanager.containerregistry.implementation.RegistriesImpl; import com.azure.resourcemanager.containerregistry.implementation.RegistryTaskRunsImpl; import com.azure.resourcemanager.containerregistry.implementation.RegistryTasksImpl; @@ -126,7 +125,6 @@ public Registries containerRegistries() { * * @return the tasks of the current instance of ContainerRegistryManager. */ - @Beta public RegistryTasks containerRegistryTasks() { if (this.tasks == null) { this.tasks = new RegistryTasksImpl(this); @@ -139,7 +137,6 @@ public RegistryTasks containerRegistryTasks() { * * @return the registry task runs of the current instance of ContainerRegistryManager. */ - @Beta public RegistryTaskRuns registryTaskRuns() { if (this.registryTaskRuns == null) { this.registryTaskRuns = new RegistryTaskRunsImpl(this); diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml index 52cbd49021fc..cf81692d58f0 100644 --- a/sdk/core/azure-core-amqp/pom.xml +++ b/sdk/core/azure-core-amqp/pom.xml @@ -114,7 +114,6 @@ - com.azure:* com.microsoft.azure:qpid-proton-j-extensions:[1.2.3] org.apache.qpid:proton-j:[0.33.4] diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml index b72986cae435..ade756d314e1 100644 --- a/sdk/core/azure-core-http-netty/pom.xml +++ b/sdk/core/azure-core-http-netty/pom.xml @@ -184,7 +184,6 @@ - com.azure:* io.netty:netty-buffer:[4.1.49.Final] io.netty:netty-codec-http:[4.1.49.Final] io.netty:netty-codec-http2:[4.1.49.Final] @@ -193,7 +192,7 @@ io.netty:netty-transport-native-unix-common:[4.1.49.Final] io.netty:netty-transport-native-epoll:[4.1.49.Final] io.projectreactor.netty:reactor-netty:[0.9.7.RELEASE] - io.netty:netty-transport-native-kqueue:[4.1.49.Final] + io.netty:netty-transport-native-kqueue:[4.1.49.Final] @@ -201,4 +200,28 @@ + + + + java-lts + + [11,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.http.netty/com.azure.core.http.netty=ALL-UNNAMED + --add-opens com.azure.http.netty/com.azure.core.http.netty.implementation=ALL-UNNAMED + + + + + + + diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClient.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClient.java index ea761ac28651..db66085a66c1 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClient.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClient.java @@ -9,31 +9,24 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; import com.azure.core.http.ProxyOptions; -import com.azure.core.http.netty.implementation.HttpProxyExceptionHandler; import com.azure.core.util.CoreUtils; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.EventLoopGroup; import io.netty.handler.codec.http.HttpMethod; -import io.netty.handler.proxy.ProxyHandler; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.netty.ByteBufFlux; import reactor.netty.Connection; import reactor.netty.NettyOutbound; -import reactor.netty.NettyPipeline; -import reactor.netty.channel.BootstrapHandlers; import reactor.netty.http.client.HttpClientRequest; import reactor.netty.http.client.HttpClientResponse; -import reactor.netty.tcp.TcpClient; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.Objects; import java.util.function.BiFunction; -import java.util.function.Supplier; -import java.util.regex.Pattern; /** * This class provides a Netty-based implementation for the {@link HttpClient} interface. Creating an instance of this @@ -46,11 +39,6 @@ * @see NettyAsyncHttpClientBuilder */ class NettyAsyncHttpClient implements HttpClient { - private static final Pattern CHARSET_PATTERN = Pattern.compile("charset=(\\S+)\\b", Pattern.CASE_INSENSITIVE); - - private final EventLoopGroup eventLoopGroup; - private final Supplier proxyHandlerSupplier; - private final Pattern nonProxyHostsPattern; private final boolean disableBufferCopy; final reactor.netty.http.client.HttpClient nettyClient; @@ -59,25 +47,17 @@ class NettyAsyncHttpClient implements HttpClient { * Creates default NettyAsyncHttpClient. */ NettyAsyncHttpClient() { - this(reactor.netty.http.client.HttpClient.create(), null, null, null, false); + this(reactor.netty.http.client.HttpClient.create(), false); } /** * Creates NettyAsyncHttpClient with provided http client. * * @param nettyClient the reactor-netty http client - * @param eventLoopGroup {@link EventLoopGroup} that processes requests. - * @param proxyHandlerSupplier Supplier that returns the {@link ProxyHandler} that connects to the configured - * proxy. + * @param disableBufferCopy Determines whether deep cloning of response buffers should be disabled. */ - NettyAsyncHttpClient(reactor.netty.http.client.HttpClient nettyClient, EventLoopGroup eventLoopGroup, - Supplier proxyHandlerSupplier, String nonProxyHosts, boolean disableBufferCopy) { + NettyAsyncHttpClient(reactor.netty.http.client.HttpClient nettyClient, boolean disableBufferCopy) { this.nettyClient = nettyClient; - this.eventLoopGroup = eventLoopGroup; - this.proxyHandlerSupplier = proxyHandlerSupplier; - this.nonProxyHostsPattern = (nonProxyHosts == null) - ? null - : Pattern.compile(nonProxyHosts, Pattern.CASE_INSENSITIVE); this.disableBufferCopy = disableBufferCopy; } @@ -90,7 +70,6 @@ public Mono send(final HttpRequest request) { Objects.requireNonNull(request.getUrl(), "'request.getUrl()' cannot be null."); Objects.requireNonNull(request.getUrl().getProtocol(), "'request.getUrl().getProtocol()' cannot be null."); return nettyClient - .tcpConfiguration(tcpClient -> configureTcpClient(tcpClient, request.getUrl().getHost())) .request(HttpMethod.valueOf(request.getHttpMethod().toString())) .uri(request.getUrl().toString()) .send(bodySendDelegate(request)) @@ -98,33 +77,6 @@ public Mono send(final HttpRequest request) { .single(); } - /* - * Configures the underlying TcpClient that sends the request. - */ - private TcpClient configureTcpClient(TcpClient tcpClient, String host) { - if (eventLoopGroup != null) { - tcpClient = tcpClient.runOn(eventLoopGroup); - } - - // Validate that the request should be proxied. - if (nonProxyHostsPattern == null || !nonProxyHostsPattern.matcher(host).matches()) { - ProxyHandler proxyHandler = (proxyHandlerSupplier == null) ? null : proxyHandlerSupplier.get(); - if (proxyHandler != null) { - /* - * Configure the request Channel to be initialized with a ProxyHandler. The ProxyHandler is the first - * operation in the pipeline as it needs to handle sending a CONNECT request to the proxy before any - * request data is sent. - */ - tcpClient = tcpClient.bootstrap(bootstrap -> BootstrapHandlers - .updateConfiguration(bootstrap, NettyPipeline.ProxyHandler, (connectionObserver, channel) -> - channel.pipeline().addFirst(NettyPipeline.ProxyHandler, proxyHandler) - .addLast("azure.proxy.exceptionHandler", new HttpProxyExceptionHandler()))); - } - } - - return tcpClient; - } - /** * Delegate to send the request content. * diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java index c3ca478fe4ce..743968cce7d4 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java @@ -5,17 +5,17 @@ import com.azure.core.http.ProxyOptions; import com.azure.core.http.netty.implementation.ChallengeHolder; -import com.azure.core.http.netty.implementation.HttpProxyHandler; +import com.azure.core.http.netty.implementation.DeferredHttpProxyProvider; import com.azure.core.util.AuthorizationChallengeHandler; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.handler.proxy.ProxyHandler; -import io.netty.handler.proxy.Socks4ProxyHandler; -import io.netty.handler.proxy.Socks5ProxyHandler; +import reactor.netty.NettyPipeline; +import reactor.netty.channel.BootstrapHandlers; import reactor.netty.http.client.HttpClient; import reactor.netty.resources.ConnectionProvider; +import reactor.netty.tcp.ProxyProvider; import java.nio.ByteBuffer; import java.util.Objects; @@ -32,8 +32,6 @@ * @see HttpClient */ public class NettyAsyncHttpClientBuilder { - private static final String INVALID_PROXY_MESSAGE = "Unknown Proxy type '%s' in use. Not configuring Netty proxy."; - private final ClientLogger logger = new ClientLogger(NettyAsyncHttpClientBuilder.class); private final HttpClient baseHttpClient; @@ -94,14 +92,47 @@ public com.azure.core.http.HttpClient build() { ? ProxyOptions.fromConfiguration(buildConfiguration) : proxyOptions; - String nonProxyHosts = (buildProxyOptions == null) ? null : buildProxyOptions.getNonProxyHosts(); - AuthorizationChallengeHandler handler = (buildProxyOptions == null || buildProxyOptions.getUsername() == null) - ? null - : new AuthorizationChallengeHandler(buildProxyOptions.getUsername(), buildProxyOptions.getPassword()); - AtomicReference proxyChallengeHolder = new AtomicReference<>(); + /* + * Only configure the custom authorization challenge handler and challenge holder when using an authenticated + * HTTP proxy. All other proxying such as SOCKS4, SOCKS5, and anonymous HTTP will use Netty's built-in handlers. + */ + boolean useCustomProxyHandler = shouldUseCustomProxyHandler(buildProxyOptions); + AuthorizationChallengeHandler handler = useCustomProxyHandler + ? new AuthorizationChallengeHandler(buildProxyOptions.getUsername(), buildProxyOptions.getPassword()) + : null; + AtomicReference proxyChallengeHolder = useCustomProxyHandler ? new AtomicReference<>() : null; + + nettyHttpClient = nettyHttpClient.tcpConfiguration(tcpClient -> { + if (eventLoopGroup != null) { + tcpClient = tcpClient.runOn(eventLoopGroup); + } + + // Proxy configurations are present, setup a proxy in Netty. + if (buildProxyOptions != null) { + // Determine if custom handling will be used, otherwise use Netty's built-in handlers. + if (handler != null) { + /* + * Configure the request Channel to be initialized with a ProxyHandler. The ProxyHandler is the + * first operation in the pipeline as it needs to handle sending a CONNECT request to the proxy + * before any request data is sent. + */ + tcpClient = tcpClient.bootstrap(bootstrap -> BootstrapHandlers.updateConfiguration(bootstrap, + NettyPipeline.ProxyHandler, new DeferredHttpProxyProvider(handler, proxyChallengeHolder, + buildProxyOptions))); + } else { + tcpClient = tcpClient.proxy(proxy -> + proxy.type(toReactorNettyProxyType(buildProxyOptions.getType(), logger)) + .address(buildProxyOptions.getAddress()) + .username(buildProxyOptions.getUsername()) + .password(ignored -> buildProxyOptions.getPassword()) + .nonProxyHosts(buildProxyOptions.getNonProxyHosts())); + } + } - return new NettyAsyncHttpClient(nettyHttpClient, eventLoopGroup, - () -> getProxyHandler(buildProxyOptions, handler, proxyChallengeHolder), nonProxyHosts, disableBufferCopy); + return tcpClient; + }); + + return new NettyAsyncHttpClient(nettyHttpClient, disableBufferCopy); } /** @@ -153,9 +184,9 @@ public NettyAsyncHttpClientBuilder port(int port) { /** * Sets the NIO event loop group that will be used to run IO loops. * - * @deprecated deprecated in favor of {@link #eventLoopGroup(EventLoopGroup)}. * @param nioEventLoopGroup The {@link NioEventLoopGroup} that will run IO loops. * @return the updated NettyAsyncHttpClientBuilder object. + * @deprecated deprecated in favor of {@link #eventLoopGroup(EventLoopGroup)}. */ @Deprecated public NettyAsyncHttpClientBuilder nioEventLoopGroup(NioEventLoopGroup nioEventLoopGroup) { @@ -193,21 +224,21 @@ public NettyAsyncHttpClientBuilder configuration(Configuration configuration) { } /** - * Disables deep copy of response {@link ByteBuffer} into a heap location that is managed by this client as - * opposed to the underlying netty library which may use direct buffer pool. + * Disables deep copy of response {@link ByteBuffer} into a heap location that is managed by this client as opposed + * to the underlying netty library which may use direct buffer pool. *
* - * Caution: Disabling this is not recommended as it can lead to data corruption if the downstream consumers - * of the response do not handle the byte buffers before netty releases them. + * Caution: Disabling this is not recommended as it can lead to data corruption if the downstream consumers of the + * response do not handle the byte buffers before netty releases them. * * If copy is disabled, underlying Netty layer can potentially reclaim byte array backed by the {@code ByteBuffer} - * upon the return of {@code onNext()}. So, users should ensure they process the {@link ByteBuffer} immediately - * and then return. + * upon the return of {@code onNext()}. So, users should ensure they process the {@link ByteBuffer} immediately and + * then return. * - * {@codesnippet com.azure.core.http.netty.disabled-buffer-copy} + * {@codesnippet com.azure.core.http.netty.disabled-buffer-copy} * - * @param disableBufferCopy If set to {@code true}, the client built from this builder will not deep-copy - * response {@link ByteBuffer ByteBuffers}. + * @param disableBufferCopy If set to {@code true}, the client built from this builder will not deep-copy response + * {@link ByteBuffer ByteBuffers}. * @return The updated {@link NettyAsyncHttpClientBuilder} object. */ public NettyAsyncHttpClientBuilder disableBufferCopy(boolean disableBufferCopy) { @@ -215,27 +246,21 @@ public NettyAsyncHttpClientBuilder disableBufferCopy(boolean disableBufferCopy) return this; } - /* - * Creates a proxy handler based on the passed ProxyOptions. - */ - private ProxyHandler getProxyHandler(ProxyOptions proxyOptions, AuthorizationChallengeHandler challengeHandler, - AtomicReference proxyChallengeHolder) { - if (proxyOptions == null) { - return null; - } + private static boolean shouldUseCustomProxyHandler(ProxyOptions options) { + return options != null && options.getUsername() != null && options.getType() == ProxyOptions.Type.HTTP; + } - switch (proxyOptions.getType()) { + private static ProxyProvider.Proxy toReactorNettyProxyType(ProxyOptions.Type azureProxyType, ClientLogger logger) { + switch (azureProxyType) { case HTTP: - return new HttpProxyHandler(proxyOptions.getAddress(), challengeHandler, - proxyChallengeHolder); + return ProxyProvider.Proxy.HTTP; case SOCKS4: - return new Socks4ProxyHandler(proxyOptions.getAddress(), proxyOptions.getUsername()); + return ProxyProvider.Proxy.SOCKS4; case SOCKS5: - return new Socks5ProxyHandler(proxyOptions.getAddress(), proxyOptions.getUsername(), - proxyOptions.getPassword()); + return ProxyProvider.Proxy.SOCKS5; default: - throw logger.logExceptionAsError(new IllegalStateException( - String.format(INVALID_PROXY_MESSAGE, proxyOptions.getType()))); + throw logger.logExceptionAsError( + new IllegalArgumentException("Unknown 'ProxyOptions.Type' enum value")); } } } diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/DeferredHttpProxyProvider.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/DeferredHttpProxyProvider.java new file mode 100644 index 000000000000..30e7aabf91d9 --- /dev/null +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/DeferredHttpProxyProvider.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.netty.implementation; + +import com.azure.core.http.ProxyOptions; +import com.azure.core.util.AuthorizationChallengeHandler; +import io.netty.bootstrap.Bootstrap; +import io.netty.channel.Channel; +import reactor.netty.ConnectionObserver; +import reactor.netty.NettyPipeline; + +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.regex.Pattern; + +/** + * This class defers supplying a channel pipeline with a proxy handler. + */ +public class DeferredHttpProxyProvider implements Function> { + private final AuthorizationChallengeHandler challengeHandler; + private final AtomicReference proxyChallengeHolderReference; + private final InetSocketAddress proxyAddress; + private final String username; + private final String password; + private final String nonProxyHosts; + + private final Pattern nonProxyHostsPattern; + + public DeferredHttpProxyProvider(AuthorizationChallengeHandler challengeHandler, + AtomicReference proxyChallengeHolderReference, ProxyOptions proxyOptions) { + this.challengeHandler = challengeHandler; + this.proxyChallengeHolderReference = proxyChallengeHolderReference; + this.proxyAddress = proxyOptions.getAddress(); + this.username = proxyOptions.getUsername(); + this.password = proxyOptions.getPassword(); + this.nonProxyHosts = proxyOptions.getNonProxyHosts(); + + this.nonProxyHostsPattern = (nonProxyHosts == null) + ? null + : Pattern.compile(nonProxyHosts, Pattern.CASE_INSENSITIVE); + } + + @Override + public BiConsumer apply(Bootstrap bootstrap) { + return ((connectionObserver, channel) -> { + if (shouldApplyProxy(bootstrap.config().remoteAddress())) { + channel.pipeline() + .addFirst(NettyPipeline.ProxyHandler, new HttpProxyHandler(proxyAddress, challengeHandler, + proxyChallengeHolderReference)) + .addLast("azure.proxy.exceptionHandler", new HttpProxyExceptionHandler()); + } + }); + } + + private boolean shouldApplyProxy(SocketAddress socketAddress) { + if (nonProxyHostsPattern == null) { + return true; + } + + if (!(socketAddress instanceof InetSocketAddress)) { + return true; + } + + InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress; + + return !nonProxyHostsPattern.matcher(inetSocketAddress.getHostName()).matches(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + + if (!(o instanceof DeferredHttpProxyProvider)) { + return false; + } + + DeferredHttpProxyProvider other = (DeferredHttpProxyProvider) o; + + return Objects.equals(username, other.username) + && Objects.equals(password, other.password) + && Objects.equals(proxyAddress, other.proxyAddress) + && Objects.equals(nonProxyHosts, other.nonProxyHosts); + } + + @Override + public int hashCode() { + return Objects.hash(proxyAddress, password, proxyAddress, nonProxyHosts); + } +} diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/HttpProxyHandler.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/HttpProxyHandler.java index bf1f2ce9e80c..93d63606b755 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/HttpProxyHandler.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/HttpProxyHandler.java @@ -103,7 +103,6 @@ public HttpProxyHandler(InetSocketAddress proxyAddress, AuthorizationChallengeHa this.challengeHandler = challengeHandler; this.proxyChallengeHolderReference = proxyChallengeHolderReference; - this.codec = new HttpClientCodec(); } @@ -139,7 +138,7 @@ protected Object newInitialMessage(ChannelHandlerContext ctx) { String hostString = HttpUtil.formatHostnameForHttp(destinationAddress); int port = destinationAddress.getPort(); String url = hostString + ":" + port; - String hostHeader = (port != 80 && port != 443) ? url : hostString; + String hostHeader = (port == 80 || port == 443) ? url : hostString; FullHttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.CONNECT, url, Unpooled.EMPTY_BUFFER, false); diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderTests.java index 812d2dd3ef1c..16aa5ef3590d 100644 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderTests.java +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderTests.java @@ -140,6 +140,24 @@ public void buildWithProxy(ProxyOptions.Type proxyType) { .verifyError(); } + @Test + public void buildWithAuthenticatedProxy() { + HttpClient validatorClient = HttpClient.create().tcpConfiguration(tcpClient -> tcpClient + .bootstrap(bootstrap -> BootstrapHandlers.updateConfiguration(bootstrap, "TestProxyHandler", + (connectionObserver, channel) -> + channel.pipeline().addFirst("TestProxyHandler", new TestProxyValidator(ProxyOptions.Type.HTTP))))); + + ProxyOptions proxyOptions = new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 12345)) + .setCredentials("1", "1"); + + NettyAsyncHttpClient nettyClient = (NettyAsyncHttpClient) new NettyAsyncHttpClientBuilder(validatorClient) + .proxy(proxyOptions) + .build(); + + StepVerifier.create(nettyClient.send(new HttpRequest(HttpMethod.GET, defaultUrl))) + .verifyError(); + } + @Test public void buildWithConfigurationNone() { NettyAsyncHttpClient nettyClient = (NettyAsyncHttpClient) new NettyAsyncHttpClientBuilder() @@ -184,11 +202,32 @@ public void buildWithNonProxyConfigurationProxy() { .verifyComplete(); } + @Test + public void buildWithAuthenticatedNonProxyConfigurationProxy() { + Configuration configuration = new Configuration() + .put(Configuration.PROPERTY_HTTP_PROXY, "http://1:1@localhost:8888") + .put(Configuration.PROPERTY_NO_PROXY, "localhost"); + + NettyAsyncHttpClient nettyClient = (NettyAsyncHttpClient) new NettyAsyncHttpClientBuilder() + .configuration(configuration) + .build(); + + StepVerifier.create(nettyClient.send(new HttpRequest(HttpMethod.GET, defaultUrl))) + .assertNext(response -> assertEquals(200, response.getStatusCode())) + .verifyComplete(); + } + private static final class TestProxyValidator extends ChannelDuplexHandler { private final ProxyOptions.Type proxyType; + private final boolean isAuthenticated; private TestProxyValidator(ProxyOptions.Type proxyType) { + this(proxyType, false); + } + + private TestProxyValidator(ProxyOptions.Type proxyType, boolean isAuthenticated) { this.proxyType = proxyType; + this.isAuthenticated = isAuthenticated; } @Override @@ -199,7 +238,11 @@ public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, Sock switch (proxyType) { case HTTP: - assertTrue(proxyHandler instanceof HttpProxyHandler); + if (isAuthenticated) { + assertTrue(proxyHandler instanceof com.azure.core.http.netty.implementation.HttpProxyHandler); + } else { + assertTrue(proxyHandler instanceof HttpProxyHandler); + } break; case SOCKS5: diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientResponseTransformer.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientResponseTransformer.java new file mode 100644 index 000000000000..f7f4969274e2 --- /dev/null +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientResponseTransformer.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.netty; + +import com.github.tomakehurst.wiremock.common.FileSource; +import com.github.tomakehurst.wiremock.extension.Parameters; +import com.github.tomakehurst.wiremock.extension.ResponseTransformer; +import com.github.tomakehurst.wiremock.http.HttpHeader; +import com.github.tomakehurst.wiremock.http.HttpHeaders; +import com.github.tomakehurst.wiremock.http.Request; +import com.github.tomakehurst.wiremock.http.Response; + +/** + * Mock response transformer used to test {@link NettyAsyncHttpClient}. + */ +public final class ReactorNettyClientResponseTransformer extends ResponseTransformer { + public static final String NAME = "reactor-netty-client-response-transformer"; + public static final String NULL_REPLACEMENT = "null"; + + @Override + public Response transform(Request request, Response response, FileSource fileSource, Parameters parameters) { + String url = request.getUrl(); + + if ("/httpHeaders".equalsIgnoreCase(url)) { + return httpHeadersResponseHandler(request, response); + } + + return response; + } + + @Override + public String getName() { + return NAME; + } + + @Override + public boolean applyGlobally() { + return false; + } + + private static Response httpHeadersResponseHandler(Request request, Response response) { + String responseTestHeaderValue = request.containsHeader(ReactorNettyClientTests.TEST_HEADER) + ? request.getHeaders().getHeader(ReactorNettyClientTests.TEST_HEADER).firstValue() + : NULL_REPLACEMENT; + + return new Response.Builder() + .status(response.getStatus()) + .headers(new HttpHeaders(new HttpHeader(ReactorNettyClientTests.TEST_HEADER, responseTestHeaderValue))) + .build(); + } +} diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java index 3c2fb0401fe7..934fee96fb84 100644 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyClientTests.java @@ -4,19 +4,22 @@ package com.azure.core.http.netty; import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpMethod; import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; import com.azure.core.http.netty.implementation.ReactorNettyClientProvider; import com.azure.core.util.Context; import com.github.tomakehurst.wiremock.WireMockServer; -import com.github.tomakehurst.wiremock.client.WireMock; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -35,8 +38,12 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; +import java.util.stream.Stream; import static com.azure.core.http.netty.NettyAsyncHttpClient.ReactorNettyHttpResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.get; +import static com.github.tomakehurst.wiremock.client.WireMock.post; import static java.time.Duration.ofMillis; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; @@ -50,18 +57,24 @@ public class ReactorNettyClientTests { private static final String SHORT_BODY = "hi there"; private static final String LONG_BODY = createLongBody(); + static final String TEST_HEADER = "testHeader"; + private static WireMockServer server; @BeforeAll public static void beforeClass() { - server = new WireMockServer(WireMockConfiguration.options().dynamicPort().disableRequestJournal()); - server.stubFor( - WireMock.get(SHORT_BODY_PATH).willReturn(WireMock.aResponse().withBody(SHORT_BODY))); - server.stubFor(WireMock.get(LONG_BODY_PATH).willReturn(WireMock.aResponse().withBody(LONG_BODY))); - server.stubFor(WireMock.get("/error") - .willReturn(WireMock.aResponse().withBody("error").withStatus(500))); - server.stubFor( - WireMock.post("/shortPost").willReturn(WireMock.aResponse().withBody(SHORT_BODY))); + server = new WireMockServer(WireMockConfiguration.options() + .extensions(new ReactorNettyClientResponseTransformer()) + .dynamicPort() + .disableRequestJournal() + .gzipDisabled(true)); + + server.stubFor(get(SHORT_BODY_PATH).willReturn(aResponse().withBody(SHORT_BODY))); + server.stubFor(get(LONG_BODY_PATH).willReturn(aResponse().withBody(LONG_BODY))); + server.stubFor(get("/error").willReturn(aResponse().withBody("error").withStatus(500))); + server.stubFor(post("/shortPost").willReturn(aResponse().withBody(SHORT_BODY))); + server.stubFor(post("/httpHeaders").willReturn(aResponse() + .withTransformers(ReactorNettyClientResponseTransformer.NAME))); server.start(); // ResourceLeakDetector.setLevel(Level.PARANOID); } @@ -348,6 +361,27 @@ public void deepCopyBufferConfiguredByContext() { assertEquals(LONG_BODY, delayWriteStream.aggregateAsString()); } + @ParameterizedTest + @MethodSource("requestHeaderSupplier") + public void requestHeader(String headerValue, String expectedValue) { + HttpClient client = new ReactorNettyClientProvider().createInstance(); + + HttpHeaders headers = new HttpHeaders().put(TEST_HEADER, headerValue); + HttpRequest request = new HttpRequest(HttpMethod.POST, url(server, "/httpHeaders"), headers, Flux.empty()); + + StepVerifier.create(client.send(request)) + .assertNext(response -> assertEquals(expectedValue, response.getHeaderValue(TEST_HEADER))) + .verifyComplete(); + } + + private static Stream requestHeaderSupplier() { + return Stream.of( + Arguments.of(null, ReactorNettyClientResponseTransformer.NULL_REPLACEMENT), + Arguments.of("", ""), + Arguments.of("aValue", "aValue") + ); + } + private static ReactorNettyHttpResponse getResponse(String path) { NettyAsyncHttpClient client = new NettyAsyncHttpClient(); return getResponse(client, path); diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyHttpResponseTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyHttpResponseTests.java new file mode 100644 index 000000000000..1398e7084632 --- /dev/null +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/ReactorNettyHttpResponseTests.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.netty; + +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpRequest; +import com.azure.core.util.FluxUtil; +import io.netty.buffer.ByteBufAllocator; +import io.netty.channel.Channel; +import io.netty.channel.EventLoop; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpResponseStatus; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; +import reactor.netty.Connection; +import reactor.netty.NettyInbound; +import reactor.netty.http.client.HttpClientResponse; +import reactor.test.StepVerifier; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +/** + * Tests {@link NettyAsyncHttpClient.ReactorNettyHttpResponse}. + */ +public class ReactorNettyHttpResponseTests { + private static final HttpRequest REQUEST = new HttpRequest(HttpMethod.GET, "https://example.com"); + private static final String HELLO = "hello"; + private static final byte[] HELLO_BYTES = HELLO.getBytes(StandardCharsets.UTF_8); + + @Test + public void getStatusCode() { + HttpClientResponse reactorNettyResponse = mock(HttpClientResponse.class); + when(reactorNettyResponse.status()).thenReturn(HttpResponseStatus.OK); + + NettyAsyncHttpClient.ReactorNettyHttpResponse response = new NettyAsyncHttpClient.ReactorNettyHttpResponse( + reactorNettyResponse, null, REQUEST, false); + + assertEquals(200, response.getStatusCode()); + } + + @Test + public void getHeaders() { + HttpHeaders headers = new DefaultHttpHeaders() + .add("aHeader", "aValue") + .add("anotherHeader", "anotherValue"); + + HttpClientResponse reactorNettyResponse = mock(HttpClientResponse.class); + when(reactorNettyResponse.responseHeaders()).thenReturn(headers); + + com.azure.core.http.HttpHeaders actualHeaders = new NettyAsyncHttpClient.ReactorNettyHttpResponse( + reactorNettyResponse, null, REQUEST, false) + .getHeaders(); + + assertEquals("aValue", actualHeaders.getValue("aHeader")); + assertEquals("anotherValue", actualHeaders.getValue("anotherHeader")); + } + + @Test + public void getBody() { + ByteBufFlux byteBufFlux = ByteBufFlux.fromString(Mono.just("hello"), StandardCharsets.UTF_8, + ByteBufAllocator.DEFAULT); + + NettyInbound nettyInbound = mock(NettyInbound.class); + when(nettyInbound.receive()).thenReturn(byteBufFlux); + + Connection connection = mock(Connection.class); + when(connection.inbound()).thenReturn(nettyInbound); + when(connection.isDisposed()).thenReturn(true); + + NettyAsyncHttpClient.ReactorNettyHttpResponse response = new NettyAsyncHttpClient.ReactorNettyHttpResponse( + null, connection, REQUEST, false); + + StepVerifier.create(FluxUtil.collectBytesInByteBufferStream(response.getBody())) + .assertNext(actual -> assertArrayEquals(HELLO_BYTES, actual)) + .verifyComplete(); + } + + @Test + public void getBodyAsByteArray() { + ByteBufFlux byteBufFlux = ByteBufFlux.fromString(Mono.just("hello"), StandardCharsets.UTF_8, + ByteBufAllocator.DEFAULT); + + NettyInbound nettyInbound = mock(NettyInbound.class); + when(nettyInbound.receive()).thenReturn(byteBufFlux); + + Connection connection = mock(Connection.class); + when(connection.inbound()).thenReturn(nettyInbound); + when(connection.isDisposed()).thenReturn(true); + + NettyAsyncHttpClient.ReactorNettyHttpResponse response = new NettyAsyncHttpClient.ReactorNettyHttpResponse( + null, connection, REQUEST, false); + + StepVerifier.create(response.getBodyAsByteArray()) + .assertNext(actual -> assertArrayEquals(HELLO_BYTES, actual)) + .verifyComplete(); + } + + @Test + public void getBodyAsString() { + ByteBufFlux byteBufFlux = ByteBufFlux.fromString(Mono.just("hello"), StandardCharsets.UTF_8, + ByteBufAllocator.DEFAULT); + HttpHeaders headers = new DefaultHttpHeaders() + .add("aHeader", "aValue") + .add("anotherHeader", "anotherValue"); + + HttpClientResponse reactorNettyResponse = mock(HttpClientResponse.class); + when(reactorNettyResponse.responseHeaders()).thenReturn(headers); + + NettyInbound nettyInbound = mock(NettyInbound.class); + when(nettyInbound.receive()).thenReturn(byteBufFlux); + + Connection connection = mock(Connection.class); + when(connection.inbound()).thenReturn(nettyInbound); + when(connection.isDisposed()).thenReturn(true); + + NettyAsyncHttpClient.ReactorNettyHttpResponse response = new NettyAsyncHttpClient.ReactorNettyHttpResponse( + reactorNettyResponse, connection, REQUEST, false); + + StepVerifier.create(response.getBodyAsString()) + .assertNext(actual -> assertEquals(HELLO, actual)) + .verifyComplete(); + } + + @Test + public void getBodyAsStringWithCharset() { + ByteBufFlux byteBufFlux = ByteBufFlux.fromString(Mono.just("hello"), StandardCharsets.UTF_8, + ByteBufAllocator.DEFAULT); + + NettyInbound nettyInbound = mock(NettyInbound.class); + when(nettyInbound.receive()).thenReturn(byteBufFlux); + + Connection connection = mock(Connection.class); + when(connection.inbound()).thenReturn(nettyInbound); + when(connection.isDisposed()).thenReturn(true); + + NettyAsyncHttpClient.ReactorNettyHttpResponse response = new NettyAsyncHttpClient.ReactorNettyHttpResponse( + null, connection, REQUEST, false); + + StepVerifier.create(response.getBodyAsString(StandardCharsets.UTF_8)) + .assertNext(actual -> assertEquals(HELLO, actual)) + .verifyComplete(); + } + + @Test + public void close() { + Connection connection = mock(Connection.class); + when(connection.isDisposed()).thenReturn(true); + + new NettyAsyncHttpClient.ReactorNettyHttpResponse(null, connection, REQUEST, false).close(); + + verify(connection, times(1)).isDisposed(); + } + + @ParameterizedTest + @MethodSource("verifyDisposalSupplier") + public void verifyDisposal(String methodName, Class[] argumentTypes, Object[] argumentValues) + throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { + Method method = NettyAsyncHttpClient.ReactorNettyHttpResponse.class.getMethod(methodName, argumentTypes); + ByteBufFlux byteBufFlux = ByteBufFlux.fromString(Mono.just("hello"), StandardCharsets.UTF_8, + ByteBufAllocator.DEFAULT); + HttpHeaders headers = new DefaultHttpHeaders() + .add("aHeader", "aValue") + .add("anotherHeader", "anotherValue"); + + HttpClientResponse reactorNettyResponse = mock(HttpClientResponse.class); + when(reactorNettyResponse.responseHeaders()).thenReturn(headers); + + NettyInbound nettyInbound = mock(NettyInbound.class); + when(nettyInbound.receive()).thenReturn(byteBufFlux); + + EventLoop eventLoop = mock(EventLoop.class); + doNothing().when(eventLoop).execute(any()); + + Channel channel = mock(Channel.class); + when(channel.eventLoop()).thenReturn(eventLoop); + + Connection connection = mock(Connection.class); + when(connection.inbound()).thenReturn(nettyInbound); + when(connection.isDisposed()).thenReturn(false); + when(connection.channel()).thenReturn(channel); + + NettyAsyncHttpClient.ReactorNettyHttpResponse response = + new NettyAsyncHttpClient.ReactorNettyHttpResponse(reactorNettyResponse, connection, REQUEST, false); + + Object object = method.invoke(response, argumentValues); + if (object instanceof Mono) { + ((Mono) object).block(); + } else if (object instanceof Flux) { + ((Flux) object).blockLast(); + } + + verify(connection, times(1)).isDisposed(); + verify(eventLoop, times(1)).execute(any()); + } + + private static Stream verifyDisposalSupplier() { + return Stream.of( + Arguments.of("getBody", null, null), + Arguments.of("getBodyAsByteArray", null, null), + Arguments.of("getBodyAsString", null, null), + Arguments.of("getBodyAsString", new Class[] { Charset.class }, new Object[] { StandardCharsets.UTF_8 }), + Arguments.of("close", null, null) + ); + } +} diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/DeferredHttpProxyProviderTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/DeferredHttpProxyProviderTests.java new file mode 100644 index 000000000000..17c4b8a70ec1 --- /dev/null +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/DeferredHttpProxyProviderTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.netty.implementation; + +import com.azure.core.http.ProxyOptions; +import com.azure.core.util.AuthorizationChallengeHandler; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import java.net.InetSocketAddress; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * Tests {@link DeferredHttpProxyProvider}. + */ +public class DeferredHttpProxyProviderTests { + @ParameterizedTest + @MethodSource("testEqualsSupplier") + public void testEquals(DeferredHttpProxyProvider provider, Object other, boolean expected) { + assertEquals(expected, provider.equals(other)); + } + + private static Stream testEqualsSupplier() { + AuthorizationChallengeHandler handler1 = new AuthorizationChallengeHandler("1", "1"); + AuthorizationChallengeHandler handler2 = new AuthorizationChallengeHandler("2", "2"); + + ProxyOptions options1 = new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888)) + .setCredentials("1", "1"); + ProxyOptions options2 = new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8080)) + .setCredentials("2", "2"); + + AtomicReference challengeHolder = new AtomicReference<>(); + + DeferredHttpProxyProvider provider1 = new DeferredHttpProxyProvider(handler1, challengeHolder, options1); + DeferredHttpProxyProvider provider2 = new DeferredHttpProxyProvider(handler2, challengeHolder, options2); + return Stream.of( + // Other is itself. + Arguments.of(provider1, provider1, true), + Arguments.of(provider2, provider2, true), + + // Other is a different type. + Arguments.of(provider1, 1, false), + Arguments.of(provider2, 2, false), + + // Other has different values. + Arguments.of(provider1, provider2, false), + Arguments.of(provider2, provider1, false), + + // Other has same values. + Arguments.of(provider1, new DeferredHttpProxyProvider(handler1, challengeHolder, options1), true), + Arguments.of(provider2, new DeferredHttpProxyProvider(handler2, challengeHolder, options2), true) + ); + } +} diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml index 7a320cc73089..68d95e019ecf 100644 --- a/sdk/core/azure-core-http-okhttp/pom.xml +++ b/sdk/core/azure-core-http-okhttp/pom.xml @@ -140,7 +140,6 @@ - com.azure:* com.squareup.okhttp3:okhttp:[4.2.2] diff --git a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md index 4144f75694a0..148d9840f5ca 100644 --- a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md @@ -1,3 +1,8 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.2 (Unreleased) + + +## 1.0.0-beta.1 (2020-07-16) + +- Initial release. Please see the README and wiki for information on the new design. diff --git a/sdk/core/azure-core-serializer-avro-apache/pom.xml b/sdk/core/azure-core-serializer-avro-apache/pom.xml index cdc26f0ca952..887543336393 100644 --- a/sdk/core/azure-core-serializer-avro-apache/pom.xml +++ b/sdk/core/azure-core-serializer-avro-apache/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-serializer-avro-apache jar - 1.0.0-beta.1 + 1.0.0-beta.2 Microsoft Azure Apache Avro Serializer Library This package contains the Apache Avro serializer client plugin for azure-core. @@ -108,7 +108,6 @@ - com.azure:* org.apache.avro:avro:[1.9.2] diff --git a/sdk/core/azure-core-serializer-avro-jackson/CHANGELOG.md b/sdk/core/azure-core-serializer-avro-jackson/CHANGELOG.md index 4144f75694a0..148d9840f5ca 100644 --- a/sdk/core/azure-core-serializer-avro-jackson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-avro-jackson/CHANGELOG.md @@ -1,3 +1,8 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.2 (Unreleased) + + +## 1.0.0-beta.1 (2020-07-16) + +- Initial release. Please see the README and wiki for information on the new design. diff --git a/sdk/core/azure-core-serializer-avro-jackson/pom.xml b/sdk/core/azure-core-serializer-avro-jackson/pom.xml index c1fc1800e024..19a9cde2460c 100644 --- a/sdk/core/azure-core-serializer-avro-jackson/pom.xml +++ b/sdk/core/azure-core-serializer-avro-jackson/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-serializer-avro-jackson jar - 1.0.0-beta.1 + 1.0.0-beta.2 Microsoft Azure Jackson Avro Serializer Library This package contains the Jackson Avro serializer client plugin for azure-core. @@ -108,7 +108,6 @@ - com.azure:* com.fasterxml.jackson.dataformat:jackson-dataformat-avro:[2.10.1] diff --git a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md index 2eadb1c6038f..7ea9495bd650 100644 --- a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md @@ -1,8 +1,13 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.2 (2020-07-16) + +- `GsonJsonSerializer` implements `JsonSerializer` instead of `ObjectSerializer`. +- Added implementations for `JsonNode` and its subclasses. + ## 1.0.0-beta.1 (2020-05-04) - Initial release. Please see the README and wiki for information on the new design. diff --git a/sdk/core/azure-core-serializer-json-gson/README.md b/sdk/core/azure-core-serializer-json-gson/README.md index b6a6caeb2997..3dfe3af6ad99 100644 --- a/sdk/core/azure-core-serializer-json-gson/README.md +++ b/sdk/core/azure-core-serializer-json-gson/README.md @@ -15,7 +15,7 @@ Azure Core Gson JSON Serializer is a plugin for the `azure-core` `JsonSerializer com.azure azure-core-serializer-json-gson - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-serializer-json-gson/pom.xml b/sdk/core/azure-core-serializer-json-gson/pom.xml index 4e83fcebd97d..2e88f1442b49 100644 --- a/sdk/core/azure-core-serializer-json-gson/pom.xml +++ b/sdk/core/azure-core-serializer-json-gson/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-serializer-json-gson jar - 1.0.0-beta.2 + 1.0.0-beta.3 Microsoft Azure Gson JSON Serializer Library This package contains the Gson JSON serializer client plugin for azure-core. @@ -114,7 +114,6 @@ - com.azure:* com.google.code.gson:gson:[2.8.5] diff --git a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md index 2eadb1c6038f..fd2ca9d418ab 100644 --- a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md @@ -1,8 +1,13 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.2 (2020-07-16) + +- `JacksonJsonSerializer` implements `JsonSerializer` instead of `ObjectSerializer`. +- Added implementations for `JsonNode` and its subclasses. + ## 1.0.0-beta.1 (2020-05-04) - Initial release. Please see the README and wiki for information on the new design. diff --git a/sdk/core/azure-core-serializer-json-jackson/README.md b/sdk/core/azure-core-serializer-json-jackson/README.md index 12539da9988e..b34dcd2c4ecb 100644 --- a/sdk/core/azure-core-serializer-json-jackson/README.md +++ b/sdk/core/azure-core-serializer-json-jackson/README.md @@ -15,7 +15,7 @@ Azure Core Jackson JSON Serializer is a plugin for the `azure-core` `JsonSeriali com.azure azure-core-serializer-json-jackson - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/core/azure-core-serializer-json-jackson/pom.xml b/sdk/core/azure-core-serializer-json-jackson/pom.xml index e6207c7420b2..d191ac687b56 100644 --- a/sdk/core/azure-core-serializer-json-jackson/pom.xml +++ b/sdk/core/azure-core-serializer-json-jackson/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-serializer-json-jackson jar - 1.0.0-beta.2 + 1.0.0-beta.3 Microsoft Azure Jackson JSON Serializer Library This package contains the Jackson JSON serializer client plugin for azure-core. diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index 8364cdb34d29..444413eeb6a7 100644 --- a/sdk/core/azure-core-test/pom.xml +++ b/sdk/core/azure-core-test/pom.xml @@ -107,7 +107,6 @@ - com.azure:* io.projectreactor:reactor-test:[3.3.5.RELEASE] org.junit.jupiter:junit-jupiter-api:[5.6.2] diff --git a/common/azure-test-watcher/src/main/java/com/azure/testing/AzureTestWatcher.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/AzureTestWatcher.java similarity index 98% rename from common/azure-test-watcher/src/main/java/com/azure/testing/AzureTestWatcher.java rename to sdk/core/azure-core-test/src/main/java/com/azure/core/test/AzureTestWatcher.java index ee79b7040665..551c6abc5b43 100644 --- a/common/azure-test-watcher/src/main/java/com/azure/testing/AzureTestWatcher.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/AzureTestWatcher.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.testing; +package com.azure.core.test; import org.junit.jupiter.api.extension.AfterTestExecutionCallback; import org.junit.jupiter.api.extension.BeforeTestExecutionCallback; diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/models/RecordingRedactor.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/models/RecordingRedactor.java index 7c52a1843429..2876917c480d 100644 --- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/models/RecordingRedactor.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/models/RecordingRedactor.java @@ -17,7 +17,7 @@ */ public class RecordingRedactor { private static final String REDACTED = "REDACTED"; - private static final String REDACTED_UTF_8 = Base64.getEncoder().encodeToString("REDACTED".getBytes(StandardCharsets.UTF_8)); + private static final String REDACTED_UTF_8 = Base64.getEncoder().encodeToString(REDACTED.getBytes(StandardCharsets.UTF_8)); private static final Pattern ACCESS_TOKEN_KEY_PATTERN = Pattern.compile("(?:\"accessToken\":\")(.*?)(?:\",|\"})"); private static final Pattern DELEGATIONKEY_KEY_PATTERN = Pattern.compile("(?:)(.*)(?:)"); @@ -53,9 +53,12 @@ private static String redactAccessToken(String content) { } private static String redactUserDelegationKey(String content) { - content = redactionReplacement(content, DELEGATIONKEY_KEY_PATTERN.matcher(content), REDACTED_UTF_8); - content = redactionReplacement(content, DELEGATIONKEY_CLIENTID_PATTERN.matcher(content), UUID.randomUUID().toString()); - content = redactionReplacement(content, DELEGATIONKEY_TENANTID_PATTERN.matcher(content), UUID.randomUUID().toString()); + if (content.contains("")) { + content = redactionReplacement(content, DELEGATIONKEY_KEY_PATTERN.matcher(content), REDACTED_UTF_8); + content = redactionReplacement(content, DELEGATIONKEY_CLIENTID_PATTERN.matcher(content), UUID.randomUUID().toString()); + content = redactionReplacement(content, DELEGATIONKEY_TENANTID_PATTERN.matcher(content), UUID.randomUUID().toString()); + } + return content; } diff --git a/sdk/core/azure-core-test/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension b/sdk/core/azure-core-test/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension new file mode 100644 index 000000000000..19d1b79f06c1 --- /dev/null +++ b/sdk/core/azure-core-test/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension @@ -0,0 +1 @@ +com.azure.core.test.AzureTestWatcher diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml index 0b06941e1d5c..588fb1208cf8 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml +++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml @@ -80,7 +80,6 @@ - com.azure:* io.opentelemetry:opentelemetry-api:[0.2.4] diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 45e38e20fcf5..b31f80174602 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -6,10 +6,6 @@ - Added `TokenRefreshOptions()` to `TokenCredential`, with a default token refresh offset of 2 minutes, and a default token refresh retry timeout of 30 seconds. -## 1.7.0-beta.1 (2020-07-08) - -- Added `TokenRefreshOptions()` to `TokenCredential`, with a default token refresh offset of 2 minutes, and a default token refresh retry timeout of 30 seconds. - ## 1.6.0 (2020-07-02) - Added utility class `UserAgentUtil` which constructs `User-Agent` headers following SDK guidelines. diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index e085c9e8a879..086085b9ccd0 100644 --- a/sdk/core/azure-core/pom.xml +++ b/sdk/core/azure-core/pom.xml @@ -180,7 +180,6 @@ com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.10.1] - com.google.code.findbugs:jsr305:[3.0.2] org.slf4j:slf4j-api:[1.7.28] diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/DateTimeDeserializer.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/DateTimeDeserializer.java new file mode 100644 index 000000000000..1725fb02c2cd --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/DateTimeDeserializer.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.util.serializer; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.module.SimpleModule; + +import java.io.IOException; +import java.time.LocalDateTime; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQueries; + +/** + * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. + */ +class DateTimeDeserializer extends JsonDeserializer { + private static final SimpleModule MODULE; + + static { + MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); + } + + /** + * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. + * + * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. + */ + public static SimpleModule getModule() { + return MODULE; + } + + @Override + public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { + TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME + .parseBest(parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); + + if (temporal.query(TemporalQueries.offset()) == null) { + return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); + } else { + return OffsetDateTime.from(temporal); + } + } +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/DateTimeSerializer.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/DateTimeSerializer.java index e3a958e6bee9..6a5851f089c6 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/DateTimeSerializer.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/DateTimeSerializer.java @@ -18,16 +18,19 @@ * Custom serializer for serializing {@link OffsetDateTime} object into ISO8601 formats. */ final class DateTimeSerializer extends JsonSerializer { + private static final SimpleModule MODULE; + + static { + MODULE = new SimpleModule().addSerializer(OffsetDateTime.class, new DateTimeSerializer()); + } + /** - * Gets a module wrapping this serializer as an adapter for the Jackson - * ObjectMapper. + * Gets a module wrapping this serializer as an adapter for the Jackson ObjectMapper. * * @return a simple module to be plugged onto Jackson ObjectMapper. */ public static SimpleModule getModule() { - SimpleModule module = new SimpleModule(); - module.addSerializer(OffsetDateTime.class, new DateTimeSerializer()); - return module; + return MODULE; } @Override @@ -41,6 +44,7 @@ public void serialize(OffsetDateTime value, JsonGenerator jgen, SerializerProvid /** * Convert the provided OffsetDateTime to its String representation. + * * @param offsetDateTime The OffsetDateTime to convert. * @return The String representation of the provided offsetDateTime. */ diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/JacksonAdapter.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/JacksonAdapter.java index 63e0ea198513..a8a51ddc04e4 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/JacksonAdapter.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/JacksonAdapter.java @@ -250,6 +250,7 @@ private static T initializeObjectMapper(T mapper) { .registerModule(ByteArraySerializer.getModule()) .registerModule(Base64UrlSerializer.getModule()) .registerModule(DateTimeSerializer.getModule()) + .registerModule(DateTimeDeserializer.getModule()) .registerModule(DateTimeRfc1123Serializer.getModule()) .registerModule(DurationSerializer.getModule()) .registerModule(HttpHeadersSerializer.getModule()) diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedFluxBaseJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedFluxBaseJavaDocCodeSnippets.java index 2f08fa7dd1d8..1d05c5af7780 100644 --- a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedFluxBaseJavaDocCodeSnippets.java +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/PagedFluxBaseJavaDocCodeSnippets.java @@ -3,13 +3,20 @@ package com.azure.core.http.rest; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpRequest; import org.reactivestreams.Subscription; import reactor.core.CoreSubscriber; import reactor.core.publisher.BaseSubscriber; import reactor.core.publisher.Mono; +import java.util.List; +import java.util.UUID; import java.util.function.Function; import java.util.function.Supplier; +import java.util.stream.Collectors; +import java.util.stream.IntStream; /** * Code snippets for {@link PagedFluxBase} @@ -24,18 +31,19 @@ public void classDocSnippet() { // BEGIN: com.azure.core.http.rest.pagedfluxbase.items pagedFluxBase .log() - .subscribe(item -> System.out.println("Processing item " + item), - error -> System.err.println("Error occurred " + error), - () -> System.out.println("Completed processing.")); + .subscribe(item -> System.out.println("Processing item with value: " + item), + error -> System.err.println("An error occurred: " + error), + () -> System.out.println("Processing complete.")); // END: com.azure.core.http.rest.pagedfluxbase.items // BEGIN: com.azure.core.http.rest.pagedfluxbase.pages pagedFluxBase .byPage() .log() - .subscribe(page -> System.out.println("Processing page containing " + page.getItems()), - error -> System.err.println("Error occurred " + error), - () -> System.out.println("Completed processing.")); + .subscribe(page -> System.out.printf("Processing page containing item values: %s%n", + page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))), + error -> System.err.println("An error occurred: " + error), + () -> System.out.println("Processing complete.")); // END: com.azure.core.http.rest.pagedfluxbase.pages // BEGIN: com.azure.core.http.rest.pagedfluxbase.pagesWithContinuationToken @@ -45,9 +53,10 @@ public void classDocSnippet() { .log() .doOnSubscribe(ignored -> System.out.println( "Subscribed to paged flux processing pages starting from: " + continuationToken)) - .subscribe(page -> System.out.println("Processing page containing " + page.getItems()), - error -> System.err.println("Error occurred " + error), - () -> System.out.println("Completed processing.")); + .subscribe(page -> System.out.printf("Processing page containing item values: %s%n", + page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))), + error -> System.err.println("An error occurred: " + error), + () -> System.out.println("Processing complete.")); // END: com.azure.core.http.rest.pagedfluxbase.pagesWithContinuationToken } @@ -91,9 +100,10 @@ public void byPageSnippet() { .log() .doOnSubscribe(ignoredVal -> System.out.println( "Subscribed to paged flux processing pages starting from first page")) - .subscribe(page -> System.out.println("Processing page containing " + page.getItems()), - error -> System.err.println("Error occurred " + error), - () -> System.out.println("Completed processing.")); + .subscribe(page -> System.out.printf("Processing page containing item values: %s%n", + page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))), + error -> System.err.println("An error occurred: " + error), + () -> System.out.println("Processing complete.")); // END: com.azure.core.http.rest.pagedfluxbase.bypage // BEGIN: com.azure.core.http.rest.pagedfluxbase.bypage#String @@ -103,9 +113,10 @@ public void byPageSnippet() { .log() .doOnSubscribe(ignoredVal -> System.out.println( "Subscribed to paged flux processing page starting from " + continuationToken)) - .subscribe(page -> System.out.println("Processing page containing " + page.getItems()), - error -> System.err.println("Error occurred " + error), - () -> System.out.println("Completed processing.")); + .subscribe(page -> System.out.printf("Processing page containing item values: %s%n", + page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))), + error -> System.err.println("An error occurred: " + error), + () -> System.out.println("Processing complete.")); // END: com.azure.core.http.rest.pagedfluxbase.bypage#String } @@ -142,25 +153,50 @@ protected void hookOnComplete() { * @return A continuation token */ private String getContinuationToken() { - return null; + return UUID.randomUUID().toString(); } /** - * Implementation not provided + * Retrieves the next page from a paged API. * * @param continuationToken Token to fetch the next page * @return A {@link Mono} of {@link PagedResponse} containing items of type {@code Integer} */ private Mono> getNextPage(String continuationToken) { - return null; + return getPage(continuationToken); } /** - * Implementation not provided + * Retrieves the initial page from a paged API. * * @return A {@link Mono} of {@link PagedResponse} containing items of type {@code Integer} */ private Mono> getFirstPage() { - return null; + return getPage(null); + } + + /** + * Retrieves a page from a paged API. + * + * @param continuationToken Token to fetch the next page, if {@code null} the first page is retrieved. + * @return A {@link Mono} of {@link PagedResponse} containing items of type {@code Integer} + */ + private Mono> getPage(String continuationToken) { + // Given this isn't calling an actual API we will arbitrarily generate a continuation token or end paging. + boolean lastPage = Math.random() > 0.5; + + // If it is the last page there should be no additional continuation tokens returned. + String nextContinuationToken = lastPage ? null : UUID.randomUUID().toString(); + + // Arbitrarily begin the next page of integers. + int elementCount = (int) Math.ceil(Math.random() * 15); + List elements = IntStream.range(elementCount, elementCount + elementCount) + .map(val -> (int) (Math.random() * val)) + .boxed() + .collect(Collectors.toList()); + + // This is a rough approximation of a service response. + return Mono.just(new PagedResponseBase(new HttpRequest(HttpMethod.GET, "https://requestUrl.com"), + 200, new HttpHeaders(), elements, nextContinuationToken, null)); } } diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/util/serializer/DateTimeDeserializerTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/util/serializer/DateTimeDeserializerTests.java new file mode 100644 index 000000000000..a5cfb614dbff --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/util/serializer/DateTimeDeserializerTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.util.serializer; + +import com.fasterxml.jackson.core.JsonParser; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +/** + * Tests for {@link DateTimeDeserializer}. + */ +public class DateTimeDeserializerTests { + @ParameterizedTest + @MethodSource("deserializeOffsetDateTimeSupplier") + public void deserializeJson(String offsetDateTimeString, OffsetDateTime expected) throws IOException { + JsonParser parser = mock(JsonParser.class); + when(parser.getValueAsString()).thenReturn(offsetDateTimeString); + + assertEquals(expected, new DateTimeDeserializer().deserialize(parser, null)); + } + + private static Stream deserializeOffsetDateTimeSupplier() { + OffsetDateTime minValue = OffsetDateTime.of(1, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC); + OffsetDateTime unixEpoch = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC); + + return Stream.of( + Arguments.of("0001-01-01T00:00:00", minValue), + Arguments.of("0001-01-01T00:00:00Z", minValue), + Arguments.of("1970-01-01T00:00:00", unixEpoch), + Arguments.of("1970-01-01T00:00:00Z", unixEpoch) + ); + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/util/serializer/JacksonAdapterTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/util/serializer/JacksonAdapterTests.java index a4fbbff76c63..feb60e01431d 100644 --- a/sdk/core/azure-core/src/test/java/com/azure/core/util/serializer/JacksonAdapterTests.java +++ b/sdk/core/azure-core/src/test/java/com/azure/core/util/serializer/JacksonAdapterTests.java @@ -7,10 +7,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.HashMap; import java.util.Map; +import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -79,4 +85,63 @@ public String getValue() { return value; } } + + @ParameterizedTest + @MethodSource("deserializeJsonSupplier") + public void deserializeJson(String json, OffsetDateTime expected) throws IOException { + DateTimeWrapper wrapper = JacksonAdapter.createDefaultSerializerAdapter() + .deserialize(json, DateTimeWrapper.class, SerializerEncoding.JSON); + + assertEquals(expected, wrapper.getOffsetDateTime()); + } + + private static Stream deserializeJsonSupplier() { + final String jsonFormat = "{\"OffsetDateTime\":\"%s\"}"; + OffsetDateTime minValue = OffsetDateTime.of(1, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC); + OffsetDateTime unixEpoch = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC); + + return Stream.of( + Arguments.of(String.format(jsonFormat, "0001-01-01T00:00:00"), minValue), + Arguments.of(String.format(jsonFormat, "0001-01-01T00:00:00Z"), minValue), + Arguments.of(String.format(jsonFormat, "1970-01-01T00:00:00"), unixEpoch), + Arguments.of(String.format(jsonFormat, "1970-01-01T00:00:00Z"), unixEpoch) + ); + } + + @ParameterizedTest + @MethodSource("deserializeXmlSupplier") + public void deserializeXml(String xml, OffsetDateTime expected) throws IOException { + DateTimeWrapper wrapper = JacksonAdapter.createDefaultSerializerAdapter() + .deserialize(xml, DateTimeWrapper.class, SerializerEncoding.XML); + + assertEquals(expected, wrapper.getOffsetDateTime()); + } + + private static Stream deserializeXmlSupplier() { + final String xmlFormat = "%s"; + OffsetDateTime minValue = OffsetDateTime.of(1, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC); + OffsetDateTime unixEpoch = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC); + + return Stream.of( + Arguments.of(String.format(xmlFormat, "0001-01-01T00:00:00"), minValue), + Arguments.of(String.format(xmlFormat, "0001-01-01T00:00:00Z"), minValue), + Arguments.of(String.format(xmlFormat, "1970-01-01T00:00:00"), unixEpoch), + Arguments.of(String.format(xmlFormat, "1970-01-01T00:00:00Z"), unixEpoch) + ); + } + + @JacksonXmlRootElement(localName = "Wrapper") + private static class DateTimeWrapper { + @JsonProperty(value = "OffsetDateTime", required = true) + private OffsetDateTime offsetDateTime; + + public DateTimeWrapper setOffsetDateTime(OffsetDateTime offsetDateTime) { + this.offsetDateTime = offsetDateTime; + return this; + } + + public OffsetDateTime getOffsetDateTime() { + return offsetDateTime; + } + } } diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index e03999434041..1627837d640e 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -58,9 +58,6 @@ extends: - name: azure-core-serializer-avro-apache groupId: com.azure safeName: azurecoreserializeravroapache - - name: azure-core-serializer-avro-jackson - groupId: com.azure - safeName: azurecoreserializeravrojackson - name: azure-core-serializer-json-gson groupId: com.azure safeName: azurecoreserializerjsongson diff --git a/sdk/core/pom.xml b/sdk/core/pom.xml index 7943b2d4e6e7..50a3b1d0ebb5 100644 --- a/sdk/core/pom.xml +++ b/sdk/core/pom.xml @@ -17,7 +17,6 @@ azure-core-http-okhttp azure-core-management azure-core-serializer-avro-apache - azure-core-serializer-avro-jackson azure-core-serializer-json-gson azure-core-serializer-json-jackson azure-core-test diff --git a/sdk/cosmos/azure-cosmos-benchmark/CHANGELOG.md b/sdk/cosmos/azure-cosmos-benchmark/CHANGELOG.md new file mode 100644 index 000000000000..7a7191c9999f --- /dev/null +++ b/sdk/cosmos/azure-cosmos-benchmark/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + +## 4.0.1-beta.1 (Unreleased) + diff --git a/sdk/cosmos/azure-cosmos-benchmark/pom.xml b/sdk/cosmos/azure-cosmos-benchmark/pom.xml index 60b596f4909a..4a12a4f607a4 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/azure-cosmos-benchmark/pom.xml @@ -43,7 +43,7 @@ Licensed under the MIT License. com.azure azure-cosmos - 4.2.0-beta.1 + 4.3.0-beta.1 @@ -223,7 +223,6 @@ Licensed under the MIT License. - com.azure:* com.beust:jcommander:[1.58] io.dropwizard.metrics:metrics-core:[4.1.0] org.slf4j:slf4j-api:[1.7.28] diff --git a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md new file mode 100644 index 000000000000..c9a78334999c --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + diff --git a/sdk/cosmos/azure-cosmos-encryption/README.md b/sdk/cosmos/azure-cosmos-encryption/README.md new file mode 100644 index 000000000000..05f45bb79799 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/README.md @@ -0,0 +1,69 @@ +# Encryption plugin library for Azure Cosmos DB Java SDK for Java +The encryption plugin is under development and not ready to be consumed yet. + +## Getting started +### Include the package + +[//]: # ({x-version-update-start;com.azure:azure-cosmos-encryption;current}) +```xml + + com.azure + azure-cosmos-encryption + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + + +### Prerequisites +TODO + +## Key concepts +TODO + +## Examples +TODO + +## Troubleshooting +TODO + +## Next steps +TODO + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +[Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights +to use your contribution. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate +the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to +do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] +or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[source_code]: src +[cosmos_introduction]: https://docs.microsoft.com/en-us/azure/cosmos-db/ +[api_documentation]: https://azuresdkdocs.blob.core.windows.net/$web/java/azure-cosmos/latest/index.html +[cosmos_docs]: https://docs.microsoft.com/en-us/azure/cosmos-db/introduction +[jdk]: https://docs.microsoft.com/java/azure/java-supported-jdk-runtime?view=azure-java-stable +[maven]: https://maven.apache.org/ +[cosmos_maven]: https://search.maven.org/artifact/com.azure/azure-cosmos +[cosmos_maven_svg]: https://img.shields.io/maven-central/v/com.azure/azure-cosmos.svg +[cla]: https://cla.microsoft.com +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[azure_subscription]: https://azure.microsoft.com/free/ +[samples]: https://github.com/Azure-Samples/azure-cosmos-java-sql-api-samples +[samples_readme]: https://github.com/Azure-Samples/azure-cosmos-java-sql-api-samples/blob/master/README.md +[troubleshooting]: https://docs.microsoft.com/en-us/azure/cosmos-db/troubleshoot-java-sdk-v4-sql +[perf_guide]: https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips-java-sdk-v4-sql?tabs=api-async +[sql_api_query]: https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-sql-query +[getting_started]: https://github.com/Azure-Samples/azure-cosmos-java-getting-started +[quickstart]: https://docs.microsoft.com/en-us/azure/cosmos-db/create-sql-api-java?tabs=sync +[project_reactor_schedulers]: https://projectreactor.io/docs/core/release/api/reactor/core/scheduler/Schedulers.html + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcosmos%2FREADME.png) diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml new file mode 100644 index 000000000000..3447105d62bb --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml @@ -0,0 +1,270 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-cosmos-encryption + 1.0.0-beta.1 + Encryption Plugin for Azure Cosmos DB SDK + This Package contains Encryption Plugin for Microsoft Azure Cosmos SDK + jar + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + 0.10 + 0.10 + + + + + + com.azure + azure-cosmos + 4.3.0-beta.1 + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + provided + + + + org.apache.commons + commons-collections4 + test + 4.2 + + + + org.apache.commons + commons-text + test + 1.6 + + + + org.testng + testng + 6.14.3 + test + + + + org.assertj + assertj-core + 3.11.1 + test + + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.13.0 + test + + + + org.apache.logging.log4j + log4j-api + 2.11.1 + test + + + + org.apache.logging.log4j + log4j-core + 2.11.1 + test + + + + com.google.guava + guava + 25.0-jre + test + + + + io.projectreactor + reactor-test + 3.3.5.RELEASE + test + + + + io.reactivex.rxjava2 + rxjava + 2.2.4 + test + + + + org.mockito + mockito-core + 1.10.19 + test + + + + org.bouncycastle + bcprov-jdk15on + 1.60 + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + false + + + + + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + unit + + %regex[.*] + + + + surefire.testng.verbose + 2 + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + + + com.azure:* + com.fasterxml.jackson.core:jackson-core:[2.10.1] + com.fasterxml.jackson.core:jackson-annotations:[2.10.1] + com.fasterxml.jackson.core:jackson-databind:[2.10.1] + com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.10.1] + com.fasterxml.jackson.module:jackson-module-afterburner:[2.10.1] + io.dropwizard.metrics:metrics-core:[4.1.0] + io.micrometer:micrometer-core:[1.2.0] + io.netty:netty-codec-http:[4.1.49.Final] + io.netty:netty-codec-http2:[4.1.49.Final] + io.netty:netty-handler:[4.1.49.Final] + io.netty:netty-handler-proxy:[4.1.49.Final] + io.netty:netty-transport-native-epoll:[4.1.49.Final] + io.projectreactor:reactor-core:[3.3.5.RELEASE] + io.projectreactor.netty:reactor-netty:[0.9.7.RELEASE] + org.slf4j:slf4j-api:[1.7.28] + org.slf4j:slf4j-api:[1.7.28] + org.bouncycastle:bcprov-jdk15on:[1.60] + + + + + + + + + + + + unit + + default + unit + + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + + + + + + + encryption-integration + + encryption + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.22.0 + + + src/test/resources/encryption-testng.xml + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256Algorithm.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256Algorithm.java new file mode 100644 index 000000000000..7f99fa5ce5be --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256Algorithm.java @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.EncryptionType; + + +import java.util.concurrent.ConcurrentLinkedQueue; + +/** + * This class implements authenticated encryption algorithm with associated data as described in + * http://tools.ietf.org/html/draft-mcgrew-aead-aes-cbc-hmac-sha2-05 - specifically this implements + * AEAD_AES_256_CBC_HMAC_SHA256 algorithm. + * This (and AeadAes256CbcHmac256EncryptionKey) implementation for Cosmos DB is same as the existing + * SQL client implementation with StyleCop related changes - also, we restrict to randomized encryption to start with. + */ +class AeadAes256CbcHmac256Algorithm implements DataEncryptionKey { + // TODO: moderakh is there any other library which we can use? + public final static String ALGORITHM_NAME = "AEAD_AES_256_CBC_HMAC_SHA256"; + + /** + * Key size in bytes + */ + private static final int KEY_SIZE_IN_BYTES = AeadAes256CbcHmac256EncryptionKey.KEY_SIZE / 8; + + /** + * Block size in bytes. AES uses 16 byte blocks. + */ + private static final int BLOCK_SIZE_IN_BYTES = 16; + + /** + * Minimum Length of cipherText without authentication tag. This value is 1 (version byte) + 16 (IV) + 16 (minimum of 1 block of cipher Text) + */ + private static final int MINIMUM_CIPHER_TEXT_LENGTH_IN_BYTES_NO_AUTHENTICATION_TAG = Bytes.ONE_BYTE_SIZE + BLOCK_SIZE_IN_BYTES + BLOCK_SIZE_IN_BYTES; + + /** + * Minimum Length of cipherText. This value is 1 (version byte) + 32 (authentication tag) + 16 (IV) + 16 (minimum of 1 block of cipher Text) + */ + private static final int MINIMUM_CIPHER_TEXT_LENGTH_IN_BYTES_WITH_AUTHENTICATION_TAG = MINIMUM_CIPHER_TEXT_LENGTH_IN_BYTES_NO_AUTHENTICATION_TAG + KEY_SIZE_IN_BYTES; + + /** + * Cipher Mode. For this algorithm, we only use CBC mode. + */ + private static final AesCryptoServiceProvider.CipherMode CIPHER_MODE = AesCryptoServiceProvider.CipherMode.CBC; + + /** + * Padding mode. This algorithm uses PKCS7. // TODO: + */ + private static final AesCryptoServiceProvider.PaddingMode PADDING_MODE = AesCryptoServiceProvider.PaddingMode.PKCS7; + + /** + * Byte array with algorithm version used for authentication tag computation. + */ + private static final byte[] VERSION = new byte[]{0x01}; + + /** + * Byte array with algorithm version size used for authentication tag computation. + */ + private static final byte[] VERSION_SIZE = new byte[]{Bytes.ONE_BYTE_SIZE}; + + /** + * Variable indicating whether this algorithm should work in Deterministic mode or Randomized mode. + * For deterministic encryption, we derive an IV from the plaintext data. + * For randomized encryption, we generate a cryptographically random IV. + */ + private final boolean isDeterministic; + + /** + * Algorithm Version. + */ + private final byte algorithmVersion; + + /** + * Data Encryption Key. This has a root key and three derived keys. + */ + private final AeadAes256CbcHmac256EncryptionKey dataEncryptionKey; + + /** + * The pool of crypto providers to use for encrypt/decrypt operations. + */ + private final ConcurrentLinkedQueue cryptoProviderPool; + + @Override + public byte[] getRawKey() { + return this.dataEncryptionKey.getRootKey(); + } + + + @Override + public String getEncryptionAlgorithm() { + return CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED; + } + + /** + * Initializes a new instance of AeadAes256CbcHmac256Algorithm algorithm with a given key and encryption type + * + * @param encryptionKey Root encryption key from which three other keys will be derived + * @param encryptionType Encryption Type, accepted values are Deterministic and Randomized. + * For Deterministic encryption, a synthetic IV will be genenrated during encryption + * For Randomized encryption, a random IV will be generated during encryption. + * @param algorithmVersion Algorithm version + */ + public AeadAes256CbcHmac256Algorithm(AeadAes256CbcHmac256EncryptionKey encryptionKey, EncryptionType encryptionType, byte algorithmVersion) { + this.dataEncryptionKey = encryptionKey; + this.algorithmVersion = algorithmVersion; + + VERSION[0] = algorithmVersion; + + assert encryptionKey != null : "Null encryption key detected in AeadAes256CbcHmac256 algorithm"; + assert algorithmVersion == 0x01 : "Unknown algorithm version passed to AeadAes256CbcHmac256"; + + // Validate encryption type for this algorithm + // This algorithm can only provide randomized or deterministic encryption types. + // Right now, we support only randomized encryption for Cosmos DB client side encryption. + assert encryptionType == EncryptionType.RANDOMIZED : "Invalid Encryption Type detected in AeadAes256CbcHmac256Algorithm"; + this.isDeterministic = false; + + this.cryptoProviderPool = new ConcurrentLinkedQueue<>(); + } + + /** + * Encryption Algorithm + *

+ * cell_iv = HMAC_SHA-2-256(iv_key, cell_data) truncated to 128 bits + * cell_ciphertext = AES-CBC-256(enc_key, cell_iv, cell_data) with PKCS7 padding. + * cell_tag = HMAC_SHA-2-256(mac_key, versionbyte + cell_iv + cell_ciphertext + versionbyte_length) + * cell_blob = versionbyte + cell_tag + cell_iv + cell_ciphertext + * + * @param plainText Plain text value to be encrypted. + * @return Returns the ciphertext corresponding to the plaintext. + */ + @Override + public byte[] encryptData(byte[] plainText) { + return this.encryptData(plainText, true); + } + + /** + * Encryption Algorithm + *

+ * cell_iv = HMAC_SHA-2-256(iv_key, cell_data) truncated to 128 bits + * cell_ciphertext = AES-CBC-256(enc_key, cell_iv, cell_data) with PKCS7 padding. + * (optional) cell_tag = HMAC_SHA-2-256(mac_key, versionbyte + cell_iv + cell_ciphertext + versionbyte_length) + * cell_blob = versionbyte + [cell_tag] + cell_iv + cell_ciphertext + * + * @param plainText Plaintext data to be encrypted + * @param hasAuthenticationTag Does the algorithm require authentication tag. + * @return Returns the ciphertext corresponding to the plaintext. + */ + private byte[] encryptData(byte[] plainText, boolean hasAuthenticationTag) { + // Empty values get encrypted and decrypted properly for both Deterministic and Randomized encryptions. + assert (plainText != null); + + byte[] iv = new byte[BLOCK_SIZE_IN_BYTES]; + + // Prepare IV + // Should be 1 single block (16 bytes) + if (this.isDeterministic) { + SecurityUtility.getHMACWithSHA256(plainText, this.dataEncryptionKey.getIVKey(), iv); + } else { + SecurityUtility.generateRandomBytes(iv); + } + + int numBlocks = (plainText.length / BLOCK_SIZE_IN_BYTES) + 1; + + // Final blob we return = version + HMAC + iv + cipherText + final int hmacStartIndex = 1; + int authenticationTagLen = hasAuthenticationTag ? KEY_SIZE_IN_BYTES : 0; + int ivStartIndex = hmacStartIndex + authenticationTagLen; + int cipherStartIndex = ivStartIndex + BLOCK_SIZE_IN_BYTES; // this is where hmac starts. + + // Output buffer size = size of VersionByte + Authentication Tag + IV + cipher Text blocks. + int outputBufSize = Bytes.ONE_BYTE_SIZE + authenticationTagLen + iv.length + (numBlocks * BLOCK_SIZE_IN_BYTES); + byte[] outBuffer = new byte[outputBufSize]; + + // Store the version and IV rightaway + outBuffer[0] = this.algorithmVersion; + System.arraycopy(iv, 0, outBuffer, ivStartIndex, iv.length); + + AesCryptoServiceProvider aesAlg = this.cryptoProviderPool.poll(); + + // Try to get a provider from the pool. + // If no provider is available, create a new one. + if (aesAlg == null) { + aesAlg = new AesCryptoServiceProvider(this.dataEncryptionKey.getEncryptionKey(), PADDING_MODE, CIPHER_MODE); + } + + try { + // Always set the IV since it changes from cell to cell. + aesAlg.setIv(iv); + + // Compute CipherText and authentication tag in a single pass + try (AesCryptoServiceProvider.ICryptoTransform encryptor = aesAlg.createEncryptor()) { + // TODO: assert encryptor.CanTransformMultipleBlocks : "AES Encryptor can transform multiple blocks"; + int count = 0; + int cipherIndex = cipherStartIndex; // this is where cipherText starts + if (numBlocks > 1) { + count = (numBlocks - 1) * BLOCK_SIZE_IN_BYTES; + cipherIndex += encryptor.transformBlock(plainText, 0, count, outBuffer, cipherIndex); + } + + byte[] buffTmp = encryptor.transformFinalBlock(plainText, count, plainText.length - count); // done encrypting + System.arraycopy(buffTmp, 0, outBuffer, cipherIndex, buffTmp.length); + cipherIndex += buffTmp.length; + } + + if (hasAuthenticationTag) { + try (HMACSHA256 hmac = new HMACSHA256(this.dataEncryptionKey.getMACKey())) { + // TODO: always true assert(hmac.CanTransformMultipleBlocks, "HMAC can't transform multiple blocks"); + hmac.transformBlock(VERSION, 0, VERSION.length, VERSION, 0); + hmac.transformBlock(iv, 0, iv.length, iv, 0); + + // Compute HMAC on final block + hmac.transformBlock(outBuffer, cipherStartIndex, numBlocks * BLOCK_SIZE_IN_BYTES, outBuffer, cipherStartIndex); + hmac.transformFinalBlock(VERSION_SIZE, 0, VERSION_SIZE.length); + byte[] hash = hmac.getHash(); + assert hash.length >= authenticationTagLen : "Unexpected hash size"; + System.arraycopy(hash, 0, outBuffer, hmacStartIndex, authenticationTagLen); + } + } + } finally { + // Return the provider to the pool. + this.cryptoProviderPool.add(aesAlg); + } + + return outBuffer; + } + + /** + * Decryption steps + * 1. Validate version byte + * 2. Validate Authentication tag + * 3. Decrypt the message + * + * @param cipherText Ciphertext value to be decrypted. + * @return + */ + @Override + public byte[] decryptData(byte[] cipherText) { + return this.decryptData(cipherText, /** hasAuthenticationTag */true); + } + + /** + * Decryption steps + * 1. Validate version byte + * 2. (optional) Validate Authentication tag + * 3. Decrypt the message + * + * @param cipherText + * @param hasAuthenticationTag + * @return + */ + private byte[] decryptData(byte[] cipherText, boolean hasAuthenticationTag) { + assert cipherText != null; + + byte[] iv = new byte[BLOCK_SIZE_IN_BYTES]; + + int minimumCipherTextLength = hasAuthenticationTag ? MINIMUM_CIPHER_TEXT_LENGTH_IN_BYTES_WITH_AUTHENTICATION_TAG : MINIMUM_CIPHER_TEXT_LENGTH_IN_BYTES_NO_AUTHENTICATION_TAG; + if (cipherText.length < minimumCipherTextLength) { + throw EncryptionExceptionFactory.invalidCipherTextSize(cipherText.length, minimumCipherTextLength); + } + + // Validate the version byte + int startIndex = 0; + if (cipherText[startIndex] != this.algorithmVersion) { + // Cipher text was computed with a different algorithm version than this. + throw EncryptionExceptionFactory.invalidAlgorithmVersion(cipherText[startIndex], this.algorithmVersion); + } + + startIndex += 1; + int authenticationTagOffset = 0; + + // Read authentication tag + if (hasAuthenticationTag) { + authenticationTagOffset = startIndex; + startIndex += KEY_SIZE_IN_BYTES; // authentication tag size is KeySizeInBytes + } + + // Read cell IV + System.arraycopy(cipherText, startIndex, iv, 0, iv.length); + startIndex += iv.length; + + // Read encrypted text + int cipherTextOffset = startIndex; + int cipherTextCount = cipherText.length - startIndex; + + if (hasAuthenticationTag) { + // Compute authentication tag + byte[] authenticationTag = this.prepareAuthenticationTag(iv, cipherText, cipherTextOffset, cipherTextCount); + if (!SecurityUtility.compareBytes(authenticationTag, cipherText, authenticationTagOffset, authenticationTag.length)) { + // Potentially tampered data, throw an exception + throw EncryptionExceptionFactory.invalidAuthenticationTag(); + } + } + + // Decrypt the text and return + return this.decryptData(iv, cipherText, cipherTextOffset, cipherTextCount); + } + + /** + * Decrypts plain text data using AES in CBC mode + * + * @param iv + * @param cipherText + * @param offset + * @param count + * @return + */ + private byte[] decryptData(byte[] iv, byte[] cipherText, int offset, int count) { + assert ((iv != null) && (cipherText != null)); + assert (offset > -1 && count > -1); + assert ((count + offset) <= cipherText.length); + + byte[] plainText; + + AesCryptoServiceProvider aesAlg = this.cryptoProviderPool.poll(); + + // Try to get a provider from the pool. + // If no provider is available, create a new one. + if (aesAlg == null) { + aesAlg = new AesCryptoServiceProvider(this.dataEncryptionKey.getEncryptionKey(), PADDING_MODE, CIPHER_MODE); + + } + + try { + // Always set the IV since it changes from cell to cell. + aesAlg.setIv(iv); + + // Create the streams used for decryption. + + try (AesCryptoServiceProvider.ICryptoTransform decryptor = aesAlg.createDecryptor()) { + plainText = decryptor.transformFinalBlock(cipherText, offset, count); + } + } finally { + // Return the provider to the pool. + this.cryptoProviderPool.add(aesAlg); + } + + return plainText; + } + + /** + * Prepares an authentication tag. + * Authentication Tag = HMAC_SHA-2-256(mac_key, versionbyte + cell_iv + cell_ciphertext + versionbyte_length) + * + * @param iv + * @param cipherText + * @param offset + * @param length + * @return + */ + private byte[] prepareAuthenticationTag(byte[] iv, byte[] cipherText, int offset, int length) { + assert (cipherText != null); + + byte[] computedHash; + byte[] authenticationTag = new byte[KEY_SIZE_IN_BYTES]; + + // Raw Tag Length: + // 1 for the version byte + // 1 block for IV (16 bytes) + // cipherText.Length + // 1 byte for version byte length + try (HMACSHA256 hmac = new HMACSHA256(this.dataEncryptionKey.getMACKey())) { + int retVal = 0; + retVal = hmac.transformBlock(VERSION, 0, VERSION.length, VERSION, 0); + assert (retVal == VERSION.length); + retVal = hmac.transformBlock(iv, 0, iv.length, iv, 0); + assert (retVal == iv.length); + retVal = hmac.transformBlock(cipherText, offset, length, cipherText, offset); + assert (retVal == length); + hmac.transformFinalBlock(VERSION_SIZE, 0, VERSION_SIZE.length); + computedHash = hmac.getHash(); + } + + assert (computedHash.length >= authenticationTag.length); + System.arraycopy(computedHash, 0, authenticationTag, 0, authenticationTag.length); + return authenticationTag; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256AlgorithmProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256AlgorithmProvider.java new file mode 100644 index 000000000000..eafa53cbd54b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256AlgorithmProvider.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.encryption.api.EncryptionType; + +public class AeadAes256CbcHmac256AlgorithmProvider { + public static void generateRandomBytes(byte[] randomBytes) { + SecurityUtility.generateRandomBytes(randomBytes); + } + + public static AeadAes256CbcHmac256Algorithm createAlgorithm(byte[] encryptionKey, EncryptionType encryptionType, byte algorithmVersion) { + AeadAes256CbcHmac256EncryptionKey dataEncryptionKey = new AeadAes256CbcHmac256EncryptionKey(encryptionKey, AeadAes256CbcHmac256Algorithm.ALGORITHM_NAME); + return new AeadAes256CbcHmac256Algorithm(dataEncryptionKey, encryptionType, algorithmVersion); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256EncryptionKey.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256EncryptionKey.java new file mode 100644 index 000000000000..a21c42ea050b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AeadAes256CbcHmac256EncryptionKey.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.guava27.Strings; + + +/** + * Encryption key class containing 4 keys. This class is used by AeadAes256CbcHmac256Algorithm + * 1) root key - Main key that is used to derive the keys used in the encryption algorithm + * 2) encryption key - A derived key that is used to encrypt the plain text and generate cipher text + * 3) mac_key - A derived key that is used to compute HMAC of the cipher text + * 4) iv_key - A derived key that is used to generate a synthetic IV from plain text data. + */ +class AeadAes256CbcHmac256EncryptionKey extends SymmetricKey { + + /** + * Key size in bits + */ + static final int KEY_SIZE = 256; + + /** + * Encryption Key Salt format. This is used to derive the encryption key from the root key. + */ + private static final String ENCRYPTION_KEY_SALT_FORMAT = "Microsoft Azure Cosmos DB encryption key with encryption algorithm:%s and key length:%s"; + + /** + * MAC Key Salt format. This is used to derive the MAC key from the root key. + */ + private static final String MAC_KEY_SALT_FORMAT = "Microsoft Azure Cosmos DB MAC key with encryption algorithm:%s and key length:%s"; + + /** + * IV Key Salt format. This is used to derive the IV key from the root key. This is only used for Deterministic encryption. + */ + private static final String IV_KEY_SALT_FORMAT = "Microsoft Azure Cosmos DB IV key with encryption algorithm:%s and key length:%s"; + + /** + * Encryption Key + */ + private final SymmetricKey encryptionKey; + + /** + * MAC key + */ + private final SymmetricKey macKey; + + /** + * IV Key + */ + private final SymmetricKey ivKey; + + /** + * The name of the algorithm this key will be used with. + */ + private final String algorithmName; + + /** + * Derives all the required keys from the given root key + * + * @param rootKey + * @param algorithmName + */ + public AeadAes256CbcHmac256EncryptionKey(byte[] rootKey, String algorithmName) { + super(rootKey); + this.algorithmName = algorithmName; + + int keySizeInBytes = KEY_SIZE / 8; + + // Key validation + if (rootKey.length != keySizeInBytes) { + throw EncryptionExceptionFactory.invalidKeySize( + this.algorithmName, + rootKey.length, + keySizeInBytes); + } + + // Derive keys from the root key + // + // Derive encryption key + String encryptionKeySalt = Strings.lenientFormat(ENCRYPTION_KEY_SALT_FORMAT, + this.algorithmName, + KEY_SIZE); + byte[] buff1 = new byte[keySizeInBytes]; + SecurityUtility.getHMACWithSHA256(Utils.getUtf16Bytes(encryptionKeySalt), this.getRootKey(), buff1); + this.encryptionKey = new SymmetricKey(buff1); + + // Derive mac key + String macKeySalt = Strings.lenientFormat(MAC_KEY_SALT_FORMAT, this.algorithmName, KEY_SIZE); + byte[] buff2 = new byte[keySizeInBytes]; + SecurityUtility.getHMACWithSHA256(Utils.getUtf16Bytes(macKeySalt), this.getRootKey(), buff2); + this.macKey = new SymmetricKey(buff2); + + // Derive iv key + String ivKeySalt = Strings.lenientFormat(IV_KEY_SALT_FORMAT, this.algorithmName, KEY_SIZE); + byte[] buff3 = new byte[keySizeInBytes]; + SecurityUtility.getHMACWithSHA256(Utils.getUtf16Bytes(ivKeySalt), this.getRootKey(), buff3); + this.ivKey = new SymmetricKey(buff3); + } + + /** + * Gets Encryption key should be used for encryption and decryption + * + * @return encryption key + */ + byte[] getEncryptionKey() { + return this.encryptionKey.getRootKey(); + } + + /** + * Gets MAC key should be used to compute and validate HMAC + * + * @return mac key + */ + byte[] getMACKey() { + return this.macKey.getRootKey(); + } + + /** + * Gets IV key should be used to compute synthetic IV from a given plain text + * + * @return IV key + */ + byte[] getIVKey() { + return this.ivKey.getRootKey(); + } + +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AesCryptoServiceProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AesCryptoServiceProvider.java new file mode 100644 index 000000000000..59479149aa7b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/AesCryptoServiceProvider.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import javax.crypto.ShortBufferException; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.io.Closeable; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; + +class AesCryptoServiceProvider { + private static final String ALGO_NAME = "AES"; + + private final Cipher cipher; + private final SecretKeySpec secretKeySpec; + private IvParameterSpec ivspec; + + enum PaddingMode { + PKCS5("PKCS5Padding"), + PKCS7("PKCS7Padding"); + + String value; + + PaddingMode(String value) { + this.value = value; + } + } + + enum CipherMode { + CBC("CBC"); + + String value; + + CipherMode(String value) { + this.value = value; + } + } + + public AesCryptoServiceProvider(byte[] key, PaddingMode padding, CipherMode mode) { + try { + secretKeySpec = new SecretKeySpec(key, ALGO_NAME); + + cipher = Cipher.getInstance(String.format("%s/%s/%s", ALGO_NAME, mode.value, padding.value)); + } catch (NoSuchAlgorithmException | NoSuchPaddingException e) { + throw new IllegalStateException(e); + } + } + + public static class ICryptoTransform implements Closeable { + private final Cipher cipher; + + public ICryptoTransform(Cipher cipher) { + this.cipher = cipher; + } + + @Override + public void close() { + + } + + public int transformBlock( + byte[] inputBuffer, + int inputOffset, + int inputCount, + byte[] outputBuffer, + int outputOffset) { + + try { + return cipher.update(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset); + } catch (ShortBufferException e) { + throw new IllegalStateException(e); + } + } + + public byte[] transformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) { + try { + return cipher.doFinal(inputBuffer, inputOffset, inputCount); + } catch (IllegalBlockSizeException | BadPaddingException e) { + throw new IllegalStateException(e); + } + } + } + + public ICryptoTransform createDecryptor() { + try { + cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, ivspec); + return new ICryptoTransform(cipher); + } catch (InvalidKeyException | InvalidAlgorithmParameterException e) { + throw new IllegalStateException(e); + } + } + + public ICryptoTransform createEncryptor() { + try { + cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivspec); + return new ICryptoTransform(cipher); + } catch (InvalidKeyException | InvalidAlgorithmParameterException e) { + throw new IllegalStateException(e); + } + } + + public void setIv(byte[] iv) { + ivspec = new IvParameterSpec(iv); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/Bytes.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/Bytes.java new file mode 100644 index 000000000000..dab3efadb8e6 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/Bytes.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +class Bytes { + + public static final int ONE_BYTE_SIZE = 1; + + public static String toHex(byte[] input) { + StringBuilder str = new StringBuilder(); + for (byte b : input) { + str.append(toHex(b)); + } + return str.toString(); + } + + public static String toHex(byte b) { + return String.format("%02X", b); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CachedDekProperties.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CachedDekProperties.java new file mode 100644 index 000000000000..9a7446210715 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CachedDekProperties.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import java.time.Instant; + +class CachedDekProperties { + private final DataEncryptionKeyProperties ServerProperties ; + private final Instant ServerPropertiesExpiryUtc; + + public CachedDekProperties( + DataEncryptionKeyProperties serverProperties, + Instant serverPropertiesExpiryUtc) { + assert(serverProperties != null); + + this.ServerProperties = serverProperties; + this.ServerPropertiesExpiryUtc = serverPropertiesExpiryUtc; + } + + public DataEncryptionKeyProperties getServerProperties() { + return ServerProperties; + } + public Instant getServerPropertiesExpiryUtc() { + return ServerPropertiesExpiryUtc; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosDataEncryptionKeyProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosDataEncryptionKeyProvider.java new file mode 100644 index 000000000000..848d048ebb27 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/CosmosDataEncryptionKeyProvider.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; +import com.azure.cosmos.implementation.guava25.base.Preconditions; +import com.azure.cosmos.models.CosmosContainerResponse; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuple2; + +import java.time.Duration; +import java.util.List; + +/** + * Default implementation for a provider to get a data encryption key - wrapped keys are stored in a Cosmos DB container. + * See https://aka.ms/CosmosClientEncryption for more information on client-side encryption support in Azure Cosmos DB. + */ +public class CosmosDataEncryptionKeyProvider implements DataEncryptionKeyProvider { + // TODO: proper sample and documentation on container + private static final String ContainerPartitionKeyPath = "/id"; + // TODO: moderakh + // Is it a requirement on container definition? + //Then the code-docs and samples needs to explicit cover it. + private final DataEncryptionKeyContainerCore dataEncryptionKeyContainerCore; + private final DekCache DekCache; + private final EncryptionKeyWrapProvider EncryptionKeyWrapProvider; + private CosmosAsyncContainer container; + + public CosmosDataEncryptionKeyProvider(EncryptionKeyWrapProvider encryptionKeyWrapProvider) { + this(encryptionKeyWrapProvider, null); + } + + /** + * Initializes a new instance of the {@link CosmosDataEncryptionKeyProvider} + * @param encryptionKeyWrapProvider A provider that will be used to wrap (encrypt) and unwrap (decrypt) data encryption keys for envelope based encryption + * @param dekPropertiesTimeToLive Time to live for DEK properties before having to refresh. + */ + public CosmosDataEncryptionKeyProvider(EncryptionKeyWrapProvider encryptionKeyWrapProvider, + Duration dekPropertiesTimeToLive) { + this.EncryptionKeyWrapProvider = encryptionKeyWrapProvider; + this.dataEncryptionKeyContainerCore = new DataEncryptionKeyContainerCore(this); + this.DekCache = new DekCache(dekPropertiesTimeToLive); + } + + CosmosAsyncContainer getContainer() { + if (this.container != null) { + return this.container; + } + + throw new IllegalStateException("The CosmosDataEncryptionKeyProvider was not initialized."); + } + + /** + * Gets a provider that will be used to wrap (encrypt) and unwrap (decrypt) data encryption keys for envelope based encryption. + * @return EncryptionKeyWrapProvider + */ + EncryptionKeyWrapProvider getEncryptionKeyWrapProvider() { + return EncryptionKeyWrapProvider; + } + + /** + * Gets Container for data encryption keys. + * @return DataEncryptionKeyContainer + */ + DataEncryptionKeyContainer getDataEncryptionKeyContainer() { + return dataEncryptionKeyContainerCore; + } + + DekCache getDekCache() { + return DekCache; + } + + // TODO: @moderakh look into if this method needs to be async. + /** + * Initialize Cosmos DB container for CosmosDataEncryptionKeyProvider to store wrapped DEKs + * @param database Database + * @param containerId ontainer id + */ + void initialize(CosmosAsyncDatabase database, + String containerId) { + Preconditions.checkNotNull(database, "database"); + Preconditions.checkNotNull(containerId, "containerId"); + + Preconditions.checkState(this.container == null, "CosmosDataEncryptionKeyProvider has already been initialized."); + Preconditions.checkNotNull(database, "database is null"); + + CosmosContainerResponse containerResponse = database.createContainerIfNotExists(containerId, CosmosDataEncryptionKeyProvider.ContainerPartitionKeyPath).block(); + List partitionKeyPath = containerResponse.getProperties().getPartitionKeyDefinition().getPaths(); + + if (partitionKeyPath.size() != 1 || !StringUtils.equals(partitionKeyPath.get(0), CosmosDataEncryptionKeyProvider.ContainerPartitionKeyPath)) { + throw new IllegalArgumentException(String.format("Provided container %s did not have the appropriate partition key definition. " + + "The container needs to be created with PartitionKeyPath set to %s.", + containerId, ContainerPartitionKeyPath)); + } + + this.container = database.getContainer(containerId); + } + + @Override + public DataEncryptionKey getDataEncryptionKey(String id, + String encryptionAlgorithm) { + Mono> fetchUnwrapMono = this + .dataEncryptionKeyContainerCore.fetchUnwrappedAsync(id); + + return fetchUnwrapMono + .map(fetchUnwrap -> fetchUnwrap.getT2().getDataEncryptionKey()) + .block(); // TODO: @moderakh I will be looking at if we should do this API async or non async. + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainer.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainer.java new file mode 100644 index 000000000000..188f8fd47328 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainer.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosItemResponse; +import reactor.core.publisher.Mono; + + +/** + * TODO: moderakh add read-feed/query apis for data encryption key + * Container for data encryption keys. Provides methods to create, re-wrap, read and enumerate data encryption keys. + * See https://aka.ms/CosmosClientEncryption for more information on client-side encryption support in Azure Cosmos DB. + */ +public interface DataEncryptionKeyContainer { + /** + * Generates a data encryption key, wraps it using the key wrap metadata provided + * with the key wrapping provider in the EncryptionSerializer configured on the client via , + * and saves the wrapped data encryption key as an asynchronous operation in the Azure Cosmos service. + * + * @param id Unique identifier for the data encryption key. + * @param encryptionAlgorithm Encryption algorithm that will be used along with this data encryption key to encrypt/decrypt data. + * @param encryptionKeyWrapMetadata Metadata used by the configured key wrapping provider in order to wrap the key. + * @param requestOptions (Optional) The options for the request. + * @return A Mono response which wraps a {@link DataEncryptionKeyProperties} containing the read resource record. + *

+ * on Failure: {@link com.azure.cosmos.CosmosException} indicating the failure reason. + * + *

  • BadRequest - This means something was wrong with the request supplied. It is likely that an id was not supplied for the new encryption key.
  • + *
  • Conflict - This means an {@link DataEncryptionKeyProperties} with an id matching the id you supplied already existed.
  • + * + */ + Mono> createDataEncryptionKeyAsync( + String id, + String encryptionAlgorithm, + EncryptionKeyWrapMetadata encryptionKeyWrapMetadata, + CosmosItemRequestOptions requestOptions); + + /// + /// Wraps the raw data encryption key (after unwrapping using the old metadata if needed) using the provided + /// metadata with the help of the key wrapping provider in the EncryptionSerializer configured on the client via + /// , and saves the re-wrapped data encryption key as an asynchronous + /// operation in the Azure Cosmos service. + /// + /// Unique identifier of the data encryption key. + /// The metadata using which the data encryption key needs to now be wrapped. + /// (Optional) The options for the request. + /// (Optional) Token representing request cancellation. + /// An awaitable response which wraps a containing details of the data encryption key that was re-wrapped. + /// + /// This exception can encapsulate many different types of errors. + /// To determine the specific error always look at the StatusCode property. + /// Some common codes you may get when re-wrapping a data encryption key are: + /// + /// + /// StatusCode + /// Reason for exception + /// + /// + /// 404 + /// + /// NotFound - This means the resource or parent resource you tried to replace did not exist. + /// + /// + /// + /// 429 + /// + /// TooManyRequests - This means you have exceeded the number of request units per second. + /// Consult the CosmosException.RetryAfter value to see how long you should wait before retrying this operation. + /// + /// + /// + /// + /// + /// + /// + /// + /// + + /** + * + * @param id + * @param newWrapMetadata + * @param requestOptions + * @return + */ + Mono> rewrapDataEncryptionKeyAsync( + String id, + EncryptionKeyWrapMetadata newWrapMetadata, + CosmosItemRequestOptions requestOptions); + + /** + * Reads the properties of a data encryption key from the Azure Cosmos service as an asynchronous operation. + * + * @param id Unique identifier of the data encryption key. + * @param requestOptions (Optional) The options for the request. + * @return An Mono response which wraps a {@link DataEncryptionKeyProperties} containing details of the data encryption key that was read. + *

    + * on Failure: {@link com.azure.cosmos.CosmosException} indicating the failure reason. + * This exception can encapsulate many different types of errors. + * To determine the specific error always look at the StatusCode property. + * Some common codes you may get when reading a data encryption key are: + * + *

      + *
    • + * NotFound - This means the resource or parent resource you tried to read did not exist. + *
    • + * + *
    • + * TooManyRequests - This means you have exceeded the number of request units per second. + * Consult the CosmosException.RetryAfter value to see how long you should wait before retrying this operation. + *
    • + *
    + */ + Mono> readDataEncryptionKeyAsync( + String id, + CosmosItemRequestOptions requestOptions); +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainerCore.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainerCore.java new file mode 100644 index 000000000000..a1a4fe80ed84 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyContainerCore.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.guava25.base.Preconditions; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.PartitionKey; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuple2; + +import java.time.Instant; +import java.util.Arrays; + +class DataEncryptionKeyContainerCore implements DataEncryptionKeyContainer { + private final CosmosDataEncryptionKeyProvider DekProvider; + + public DataEncryptionKeyContainerCore(CosmosDataEncryptionKeyProvider dekProvider) { + this.DekProvider = dekProvider; + } + + public Mono> createDataEncryptionKeyAsync(String id, + String encryptionAlgorithm, + EncryptionKeyWrapMetadata encryptionKeyWrapMetadata, + CosmosItemRequestOptions requestOptions) { + + Preconditions.checkArgument(StringUtils.isNotEmpty(id), "id is missing"); + Preconditions.checkArgument(StringUtils.equals(encryptionAlgorithm, + CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED), "Unsupported Encryption Algorithm " + encryptionAlgorithm); + Preconditions.checkNotNull(encryptionKeyWrapMetadata, "encryptionKeyWrapMetadata is missing"); + + byte[] rawDek = DataEncryptionKey.generate(encryptionAlgorithm); + + Tuple3 wrapResult = + this.wrapAsync( + id, + rawDek, + encryptionAlgorithm, + encryptionKeyWrapMetadata); + + byte[] wrappedDek = wrapResult.getLeft(); + EncryptionKeyWrapMetadata updatedMetadata = wrapResult.getMiddle(); + InMemoryRawDek inMemoryRawDek = wrapResult.getRight(); + + DataEncryptionKeyProperties dekProperties = new DataEncryptionKeyProperties(id, encryptionAlgorithm, wrappedDek, updatedMetadata, Instant.now()); + + Mono> dekResponseMono = + this.DekProvider.getContainer().createItem(dekProperties, new PartitionKey(dekProperties.id), requestOptions); + + return dekResponseMono.flatMap( + dekResponse -> { + + this.DekProvider.getDekCache().setDekProperties(id, dekResponse.getItem()); + this.DekProvider.getDekCache().setRawDek(id, inMemoryRawDek); + return Mono.just(dekResponse); + } + ); + } + + @Override + public Mono> readDataEncryptionKeyAsync( + String id, + CosmosItemRequestOptions requestOptions) { + Mono> responseMono = this.readInternalAsync( + id, + requestOptions); + + return responseMono.flatMap( + response -> { + + this.DekProvider.getDekCache().setDekProperties(id, response.getItem()); + return Mono.just(response); + } + ); + } + + @Override + public Mono> rewrapDataEncryptionKeyAsync( + String id, + EncryptionKeyWrapMetadata newWrapMetadata, + final CosmosItemRequestOptions requestOptions) { + + Preconditions.checkNotNull(newWrapMetadata, "newWrapMetadata is missing"); + Mono> resultMono = this.fetchUnwrappedAsync( + id); + + return resultMono.flatMap( + result -> { + DataEncryptionKeyProperties dekProperties = result.getT1(); + InMemoryRawDek inMemoryRawDek = result.getT2(); + + Tuple3 wrapResult = + this.wrapAsync( + id, + inMemoryRawDek.getDataEncryptionKey().getRawKey(), + dekProperties.encryptionAlgorithm, + newWrapMetadata); + + byte[] wrappedDek = wrapResult.getLeft(); + EncryptionKeyWrapMetadata updatedMetadata = wrapResult.getMiddle(); + InMemoryRawDek updatedRawDek = wrapResult.getRight(); + + CosmosItemRequestOptions effectiveRequestOptions = requestOptions != null ? requestOptions : new CosmosItemRequestOptions(); + + effectiveRequestOptions.setIfMatchETag(dekProperties.eTag); + + DataEncryptionKeyProperties newDekProperties = new DataEncryptionKeyProperties(dekProperties); + newDekProperties.wrappedDataEncryptionKey = wrappedDek; + newDekProperties.encryptionKeyWrapMetadata = updatedMetadata; + + Mono> responseMono = this.DekProvider.getContainer().replaceItem( + newDekProperties, + newDekProperties.id, + new PartitionKey(newDekProperties.id), + effectiveRequestOptions); + + return responseMono.flatMap( + response -> { + DataEncryptionKeyProperties item = response.getItem(); + + assert (item != null); + this.DekProvider.getDekCache().setDekProperties(id, item); + this.DekProvider.getDekCache().setRawDek(id, updatedRawDek); + return Mono.just(response); + } + ); + }); + } + + Mono> fetchUnwrappedAsync( + String id) { + Mono dekPropertiesMono = this.DekProvider.getDekCache().getOrAddDekPropertiesAsync( + id, + this::readResourceAsync); + + return dekPropertiesMono.flatMap( + dekProperties -> { + Mono inMemoryRawDek = this.DekProvider.getDekCache().getOrAddRawDekAsync( + dekProperties, + dp -> Mono.just(this.unwrapAsync(dp))); + + return Mono.zip(Mono.just(dekProperties), inMemoryRawDek); + } + ); + } + + static class Tuple3 { + private A a; + private B b; + private C c; + + public Tuple3(A a, B b, C c) { + this.a = a; + this.b = b; + this.c = c; + } + + public A getLeft() { + return this.a; + } + public B getMiddle() { + return this.b; + } + public C getRight() { + return this.c; + } + } + + Tuple3 wrapAsync( + String id, + byte[] key, + String encryptionAlgorithm, + EncryptionKeyWrapMetadata metadata) { + EncryptionKeyWrapResult keyWrapResponse; + + keyWrapResponse = this.DekProvider.getEncryptionKeyWrapProvider().wrapKey(key, metadata); + + // Verify + DataEncryptionKeyProperties tempDekProperties = new DataEncryptionKeyProperties(id, encryptionAlgorithm, keyWrapResponse.getWrappedDataEncryptionKey(), keyWrapResponse.getEncryptionKeyWrapMetadata(), Instant.now()); + InMemoryRawDek roundTripResponse = this.unwrapAsync(tempDekProperties); + if (!Arrays.equals(roundTripResponse.getDataEncryptionKey().getRawKey(), key)) { + throw new IllegalStateException("The key wrapping provider configured was unable to unwrap the wrapped key correctly."); + } + + return new Tuple3<>(keyWrapResponse.getWrappedDataEncryptionKey(), keyWrapResponse.getEncryptionKeyWrapMetadata(), roundTripResponse); + } + + InMemoryRawDek unwrapAsync( + DataEncryptionKeyProperties dekProperties) { + EncryptionKeyUnwrapResult unwrapResult; + + unwrapResult = this.DekProvider.getEncryptionKeyWrapProvider().unwrapKey( + dekProperties.wrappedDataEncryptionKey, + dekProperties.encryptionKeyWrapMetadata); + + DataEncryptionKey dek = DataEncryptionKey.create(unwrapResult.getDataEncryptionKey(), dekProperties.encryptionAlgorithm); + return new InMemoryRawDek(dek, unwrapResult.getClientCacheTimeToLive()); + } + + private Mono readResourceAsync( + String id) { + return this.readInternalAsync( + id, + null).map(CosmosItemResponse::getItem); + } + + private Mono> readInternalAsync( + String id, + CosmosItemRequestOptions requestOptions) { + return this.DekProvider.getContainer() + .readItem( + id, + new PartitionKey(id), + requestOptions, + DataEncryptionKeyProperties.class); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyProperties.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyProperties.java new file mode 100644 index 000000000000..f479cc18f1ab --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyProperties.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.guava25.base.Preconditions; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +import java.time.Instant; +import java.util.Arrays; +import java.util.Objects; + +/** + * Details of an encryption key for use with the Azure Cosmos DB service. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"id", "encryptionAlgorithm", "wrappedDataEncryptionKey", "keyWrapMetadata", "createTime", "_rid", "_self", "_etag", "_ts"}) +class DataEncryptionKeyProperties { + + /** + * Initializes a new instance of {@link DataEncryptionKeyProperties} + * + * @param id Unique identifier for the data encryption key. + * @param encryptionAlgorithm Encryption algorithm that will be used along with this data encryption key to encrypt/decrypt data. + * @param wrappedDataEncryptionKey Wrapped (encrypted) form of the data encryption key. + * @param encryptionKeyWrapMetadata Metadata used by the configured key wrapping provider in order to unwrap the key. + * @param createdTime created time + */ + public DataEncryptionKeyProperties(String id, + String encryptionAlgorithm, + byte[] wrappedDataEncryptionKey, + EncryptionKeyWrapMetadata encryptionKeyWrapMetadata, + Instant createdTime) { + + Preconditions.checkArgument(StringUtils.isNotEmpty(id), "id is null"); + Preconditions.checkNotNull(wrappedDataEncryptionKey, "wrappedDataEncryptionKey is null"); + Preconditions.checkNotNull(encryptionKeyWrapMetadata, "encryptionKeyWrapMetadata is null"); + + this.id = id; + this.encryptionAlgorithm = encryptionAlgorithm; + this.wrappedDataEncryptionKey = wrappedDataEncryptionKey; + this.encryptionKeyWrapMetadata = encryptionKeyWrapMetadata; + this.createdTime = createdTime; + } + + protected DataEncryptionKeyProperties() { + } + + DataEncryptionKeyProperties(DataEncryptionKeyProperties source) { + this.createdTime = source.createdTime; + this.eTag = source.eTag; + this.id = source.id; + this.encryptionAlgorithm = source.encryptionAlgorithm; + this.encryptionKeyWrapMetadata = new EncryptionKeyWrapMetadata(source.encryptionKeyWrapMetadata); + this.lastModified = source.lastModified; + this.resourceId = source.resourceId; + this.selfLink = source.selfLink; + if (source.wrappedDataEncryptionKey != null) { + this.wrappedDataEncryptionKey = new byte[source.wrappedDataEncryptionKey.length]; + + System.arraycopy(source.wrappedDataEncryptionKey, 0, this.wrappedDataEncryptionKey, 0, this.wrappedDataEncryptionKey.length); + } + } + + /** + * The identifier of the resource. + *

    + * Every resource within an Azure Cosmos DB database account needs to have a unique identifier. + * The following characters are restricted and cannot be used in the Id property: + * '/', '\\', '?', '#' + */ + @JsonProperty(value = "id", required = true) + public String id; + + /** + * Encryption algorithm that will be used along with this data encryption key to encrypt/decrypt data. + */ + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonProperty("encryptionAlgorithm") + public String encryptionAlgorithm; + + /** + * Wrapped form of the data encryption key. + */ + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonProperty(value = "wrappedDataEncryptionKey") + public byte[] wrappedDataEncryptionKey; + + /** + * Metadata for the wrapping provider that can be used to unwrap the wrapped data encryption key. + */ + @JsonProperty("keyWrapMetadata") + @JsonInclude(JsonInclude.Include.NON_NULL) + public EncryptionKeyWrapMetadata encryptionKeyWrapMetadata; + + /** + * Gets the creation time of the resource from the Azure Cosmos DB service. + */ + @JsonProperty("createTime") + @JsonDeserialize(using = UnixTimestampDeserializer.class) + @JsonSerialize(using = UnixTimestampSerializer.class) + @JsonInclude(JsonInclude.Include.NON_NULL) + public Instant createdTime; + + /** + * Gets the entity tag associated with the resource from the Azure Cosmos DB service. + *

    + * The entity tag associated with the resource. + * ETags are used for concurrency checking when updating resources. + */ + @JsonProperty("_etag") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String eTag; + + /** + * Gets the last modified time stamp associated with the resource from the Azure Cosmos DB service. + * The last modified time stamp associated with the resource. + */ + @JsonProperty("_ts") + @JsonDeserialize(using = UnixTimestampDeserializer.class) + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = UnixTimestampSerializer.class) + public Instant lastModified; + + /** + * Gets the self-link associated with the resource from the Azure Cosmos DB service. + *

    + * The self-link associated with the resource. + *

    + * A self-link is a static addressable Uri for each resource within a database account and follows the Azure Cosmos DB resource model. + * E.g. a self-link for a document could be dbs/db_resourceid/colls/coll_resourceid/documents/doc_resourceid + */ + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonProperty("_self") + public String selfLink; + + /** + * Gets the Resource Id associated with the resource in the Azure Cosmos DB service. + *

    + * The Resource Id associated with the resource. + * A Resource Id is the unique, immutable, identifier assigned to each Azure Cosmos DB + *

    + * A Resource Id is the unique, immutable, identifier assigned to each Azure Cosmos DB + * resource whether that is a database, a collection or a document. + * These resource ids are used when building up SelfLinks, a static addressable Uri for each resource within a database account. + */ + @JsonProperty("_rid") + @JsonInclude(JsonInclude.Include.NON_NULL) + String resourceId; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DataEncryptionKeyProperties that = (DataEncryptionKeyProperties) o; + return Objects.equals(id, that.id) && + Objects.equals(encryptionAlgorithm, that.encryptionAlgorithm) && + Arrays.equals(wrappedDataEncryptionKey, that.wrappedDataEncryptionKey) && + Objects.equals(encryptionKeyWrapMetadata, that.encryptionKeyWrapMetadata) && + Objects.equals(createdTime, that.createdTime) && + Objects.equals(eTag, that.eTag) && + Objects.equals(lastModified, that.lastModified) && + Objects.equals(selfLink, that.selfLink) && + Objects.equals(resourceId, that.resourceId); + } + + @Override + public int hashCode() { + int result = Objects.hash(id, encryptionAlgorithm, encryptionKeyWrapMetadata, createdTime, eTag, lastModified, selfLink, resourceId); + result = 31 * result + Arrays.hashCode(wrappedDataEncryptionKey); + return result; + } + + public static boolean equals(byte[] x, byte[] y) { + return (x == null && y == null) + || (x != null && y != null && Arrays.equals(x, y)); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DekCache.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DekCache.java new file mode 100644 index 000000000000..1e3754756f57 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/DekCache.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.caches.AsyncCache; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.time.Instant; +import java.util.function.Function; + +class DekCache { + private final AsyncCache DekPropertiesCache = new AsyncCache<>(); + private final AsyncCache RawDekCache = new AsyncCache<>(); + private final Duration dekPropertiesTimeToLive; + + public DekCache() { + this(null); + } + + public DekCache(Duration dekPropertiesTimeToLive) { + if (dekPropertiesTimeToLive != null) { + this.dekPropertiesTimeToLive = dekPropertiesTimeToLive; + } else { + this.dekPropertiesTimeToLive = Duration.ofMinutes(30); + } + } + + public Mono getOrAddDekPropertiesAsync( + String dekId, + Function> fetcher) { + Mono cachedDekPropertiesMono = this.DekPropertiesCache.getAsync( + dekId, + null, + () -> this.fetchAsync(dekId, fetcher)); + + return cachedDekPropertiesMono.flatMap(cachedDekProperties -> { + if (cachedDekProperties.getServerPropertiesExpiryUtc().isBefore(Instant.now())) { + return this.DekPropertiesCache.getAsync( + dekId, + null, + () -> this.fetchAsync(dekId, fetcher)); + } else { + return Mono.just(cachedDekProperties); + } + + } + ).map(CachedDekProperties::getServerProperties); + } + + public Mono getOrAddRawDekAsync( + DataEncryptionKeyProperties dekProperties, + Function> unwrapper) { + Mono inMemoryRawDekMono = this.RawDekCache.getAsync( + dekProperties.selfLink, + null, + () -> unwrapper.apply(dekProperties)); + + return inMemoryRawDekMono.flatMap( + inMemoryRawDek -> { + if (inMemoryRawDek.getRawDekExpiry().isBefore(Instant.now())) { + + return this.RawDekCache.getAsync( + dekProperties.selfLink, + null, + () -> unwrapper.apply(dekProperties) + /* forceRefresh: true */); + } else { + return Mono.just(inMemoryRawDek); + } + } + ); + } + + public void setDekProperties(String dekId, DataEncryptionKeyProperties dekProperties) { + CachedDekProperties cachedDekProperties = new CachedDekProperties(dekProperties, Instant.now().plus(this.dekPropertiesTimeToLive)); + this.DekPropertiesCache.set(dekId, cachedDekProperties); + } + + public void setRawDek(String dekId, InMemoryRawDek inMemoryRawDek) { + this.RawDekCache.set(dekId, inMemoryRawDek); + } + + public Mono removeAsync(String dekId) { + Mono cachedDekPropertiesMono = this.DekPropertiesCache.removeAsync(dekId); + + return cachedDekPropertiesMono.flatMap(cachedDekProperties -> this.RawDekCache.removeAsync(dekId)).then(); + } + + private Mono fetchAsync( + String dekId, + Function> fetcher) { + Mono serverPropertiesMono = fetcher.apply(dekId); + return serverPropertiesMono.map(serverProperties -> new CachedDekProperties(serverProperties, Instant.now().plus(this.dekPropertiesTimeToLive))); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionExceptionFactory.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionExceptionFactory.java new file mode 100644 index 000000000000..7f85e4f5e193 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionExceptionFactory.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.guava27.Strings; + +class EncryptionExceptionFactory { + + static class InvalidArgumentException extends IllegalArgumentException { + public InvalidArgumentException(String msg, String argName) { + super(Strings.lenientFormat("argName: %s, details: %s", argName, msg)); + } + } + + static IllegalArgumentException invalidKeySize(String algorithmName, int actualKeylength, int expectedLength) { + return new InvalidArgumentException( + Strings.lenientFormat("Invalid key size for %s; actual: %s, expected: %s", + algorithmName, actualKeylength, expectedLength), "dataEncryptionKey"); + } + + static IllegalArgumentException invalidCipherTextSize(int actualSize, int minimumSize) { + return new InvalidArgumentException( + Strings.lenientFormat("Invalid cipher text size; actual: %s, minimum expected: %s.", + actualSize, minimumSize), "cipherText"); + } + + static IllegalArgumentException invalidAlgorithmVersion(byte actual, byte expected) { + return new InvalidArgumentException( + Strings.lenientFormat("Invalid encryption algorithm version; actual: %s, expected: %s.", + Bytes.toHex(actual), Bytes.toHex(expected)), "cipherText"); + } + + static RuntimeException invalidAuthenticationTag() { + return new InvalidArgumentException( + "Invalid authentication tag in cipher text.", + "cipherText"); + } + + static Exception exceptionKeyNotFoundException( + String message, + Exception innerException) { + return new IllegalArgumentException(message, innerException); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyUnwrapResult.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyUnwrapResult.java new file mode 100644 index 000000000000..f942baef1a8a --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyUnwrapResult.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.guava25.base.Preconditions; + +import java.time.Duration; + +public class EncryptionKeyUnwrapResult { + + /** + * Initializes a new instance of the result of unwrapping a wrapped data encryption key. + * + * @param dataEncryptionKey Raw form of data encryption key. + * The byte array passed in must not be modified after this call by the {@link EncryptionKeyWrapProvider} + * @param clientCacheTimeToLive Amount of time after which the raw data encryption key must not be used + * without invoking the {@link EncryptionKeyWrapProvider#unwrapKey(byte[], EncryptionKeyWrapMetadata)} + * + */ + public EncryptionKeyUnwrapResult(byte[] dataEncryptionKey, Duration clientCacheTimeToLive) { + Preconditions.checkNotNull(dataEncryptionKey, "dataEncryptionKey is null"); + this.dataEncryptionKey = dataEncryptionKey; + this.clientCacheTimeToLive = clientCacheTimeToLive; + } + + /** + * Gets raw form of the data encryption key. + * @return encrypted key. + */ + public byte[] getDataEncryptionKey() { + return dataEncryptionKey; + } + + /** + * Gets amount of time after which the raw data encryption key must not be used + * without invoking the {@link EncryptionKeyWrapProvider#unwrapKey(byte[], EncryptionKeyWrapMetadata)} + * @return client cache time to live. + */ + public Duration getClientCacheTimeToLive() { + return clientCacheTimeToLive; + } + + private final byte[] dataEncryptionKey; + private final Duration clientCacheTimeToLive; +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapMetadata.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapMetadata.java new file mode 100644 index 000000000000..c22f0fb79691 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapMetadata.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.guava25.base.Preconditions; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Objects; + + +/** + * Metadata that a key wrapping provider can use to wrap/unwrap data encryption keys. + * {@link EncryptionKeyWrapProvider} + */ +public class EncryptionKeyWrapMetadata { + /** + * For JSON deserialize + */ + EncryptionKeyWrapMetadata() { + } + + /** + * Creates a new instance of key wrap metadata. + * + * @param value Value of the metadata + */ + public EncryptionKeyWrapMetadata(String value) { + this("custom", value); + } + + /** + * Creates a new instance of key wrap metadata based on an existing instance. + * + * @param source Existing instance from which to initialize. + */ + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source) { + this.type = source.type; + this.algorithm = source.algorithm; + this.value = source.value; + } + + EncryptionKeyWrapMetadata(String type, String value) { + this(type, value, null); + } + + EncryptionKeyWrapMetadata(String type, String value, String algorithm) { + Preconditions.checkNotNull(type, "type is null"); + Preconditions.checkNotNull(value, "value is null"); + this.type = type; + this.value = value; + this.algorithm = algorithm; + } + + @JsonProperty("type") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String type; + + @JsonProperty("algorithm") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String algorithm; + + /** + * Serialized form of metadata. + * Note: This value is saved in the Cosmos DB service. + * implementors of derived implementations should ensure that this does not have (private) key material or credential information. + */ + @JsonProperty("value") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String value; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EncryptionKeyWrapMetadata that = (EncryptionKeyWrapMetadata) o; + return Objects.equals(type, that.type) && + Objects.equals(algorithm, that.algorithm) && + Objects.equals(value, that.value); + } + + @Override + public int hashCode() { + return Objects.hash(type, algorithm, value); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapProvider.java new file mode 100644 index 000000000000..d280b5b8067f --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapProvider.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +/** + * TODO: @moderakh look into if this class needs to be async + * Interface for interacting with a provider that can be used to wrap (encrypt) and unwrap (decrypt) data encryption keys for envelope based encryption. + * Implementations are expected to ensure that master keys are highly available and protected against accidental deletion. + * See https://aka.ms/CosmosClientEncryption for more information on client-side encryption support in Azure Cosmos DB. + */ +public interface EncryptionKeyWrapProvider { + + /** + * Wraps (i.e. encrypts) the provided data encryption key. + * @param key Data encryption key that needs to be wrapped. + * @param metadata Metadata for the wrap provider that should be used to wrap / unwrap the key.< + * @return Wrapped (i.e. encrypted) version of data encryption key passed in possibly with updated metadata. + */ + EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata); + + /** + * Unwraps (i.e. decrypts) the provided wrapped data encryption key. + * @param wrappedKey Wrapped form of data encryption key that needs to be unwrapped. + * @param metadata Metadata for the wrap provider that should be used to wrap / unwrap the key. + * @return unwrapped (i.e. unencrypted) version of data encryption key passed in and how long the raw data encryption key can be cached on the client. + */ + EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata); +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapResult.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapResult.java new file mode 100644 index 000000000000..acbb46e31c3b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionKeyWrapResult.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.guava25.base.Preconditions; + + +/** + * Result from a {@link EncryptionKeyWrapProvider} on wrapping a data encryption key. + */ +public class EncryptionKeyWrapResult { + + private final byte[] wrappedDataEncryptionKey; + private final EncryptionKeyWrapMetadata encryptionKeyWrapMetadata; + + /** + * Initializes a new instance of the result of wrapping a data encryption key. + * + * @param wrappedDataEncryptionKey Wrapped form of data encryption key. + * The byte array passed in must not be modified after this call by the {@link EncryptionKeyWrapResult} + * @param encryptionKeyWrapMetadata Metadata that can be used by the wrap provider to unwrap the data encryption key. + */ + public EncryptionKeyWrapResult(byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata) { + Preconditions.checkNotNull(wrappedDataEncryptionKey, "wrappedDataEncryptionKey is null"); + Preconditions.checkNotNull(encryptionKeyWrapMetadata, "encryptionKeyWrapMetadata is null"); + + this.wrappedDataEncryptionKey = wrappedDataEncryptionKey; + this.encryptionKeyWrapMetadata = encryptionKeyWrapMetadata; + } + + /** + * Gets wrapped form of the data encryption key. + * @return wrapped data encryption key. + */ + public byte[] getWrappedDataEncryptionKey() { + return wrappedDataEncryptionKey; + } + + /** + * Gets metadata that can be used by the wrap provider to unwrap the key. + * @return encryption key wrap metadata. + */ + public EncryptionKeyWrapMetadata getEncryptionKeyWrapMetadata() { + return encryptionKeyWrapMetadata; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/HMACSHA256.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/HMACSHA256.java new file mode 100644 index 000000000000..a21f3ee1c529 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/HMACSHA256.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import javax.crypto.Mac; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import java.io.Closeable; +import java.io.IOException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; + +class HMACSHA256 implements Closeable { + private static final String ALGO_NAME = "HMACSHA256"; + private final Mac mac; + private byte[] hashValue; + + public HMACSHA256(byte[] key) { + mac = getMac(ALGO_NAME); + SecretKey secretKey = new SecretKeySpec(key, ALGO_NAME); + try { + mac.init(secretKey); + } catch (InvalidKeyException e) { + throw new IllegalArgumentException(e); + } + } + + private static Mac getMac(String algo) { + try { + return Mac.getInstance(algo); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException(e); + } + } + + @Override + public void close() { + // No op + } + + public byte[] computeHash(byte[] plainText) { + return mac.doFinal(plainText); + } + + /** + * Computes the hash value for the specified region of the input byte array and copies the specified region of the input byte array to the specified region of the output byte array. + * + * @param inputBuffer + * @param inputOffset + * @param inputCount + * @param outputBuffer + * @param outputOffset + * @return + */ + public int transformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) { + mac.update(inputBuffer, inputOffset, inputCount); + if ((outputBuffer != null) && ((inputBuffer != outputBuffer) || (inputOffset != outputOffset))) { + // We let BlockCopy do the destination array validation + System.arraycopy(inputBuffer, inputOffset, outputBuffer, outputOffset, inputCount); + } + return inputCount; + } + + /** + * Computes the hash value for the specified region of the specified byte array. + * + * @param inputBuffer + * @param inputOffset + * @param inputCount + * @return + */ + public byte[] transformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) { + mac.update(inputBuffer, inputOffset, inputCount); + hashValue = mac.doFinal(); + return hashValue; + } + + public byte[] getHash() { + return hashValue; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/InMemoryRawDek.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/InMemoryRawDek.java new file mode 100644 index 000000000000..7b8593063f8f --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/InMemoryRawDek.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; + +import java.time.Duration; +import java.time.Instant; + +class InMemoryRawDek { + private final DataEncryptionKey DataEncryptionKey; + private final Instant RawDekExpiry; + + public InMemoryRawDek(DataEncryptionKey dataEncryptionKey, Duration clientCacheTimeToLive) { + this.DataEncryptionKey = dataEncryptionKey; + this.RawDekExpiry = Instant.now().plus(clientCacheTimeToLive); + } + + public DataEncryptionKey getDataEncryptionKey() { + return DataEncryptionKey; + } + public Instant getRawDekExpiry() { + return RawDekExpiry; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/RNGCryptoServiceProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/RNGCryptoServiceProvider.java new file mode 100644 index 000000000000..b6ba349e3639 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/RNGCryptoServiceProvider.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import java.io.Closeable; +import java.io.IOException; +import java.security.SecureRandom; + +class RNGCryptoServiceProvider implements Closeable { + // TODO: is this thread safe? efficient, etc? + private SecureRandom random = new SecureRandom(); + + public void getBytes(byte[] randomBytes) { + random.nextBytes(randomBytes); + } + + @Override + public void close() { + + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SHA256.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SHA256.java new file mode 100644 index 000000000000..6fb76b8b679d --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SHA256.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import java.io.Closeable; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +class SHA256 implements Closeable { + private final MessageDigest digest; + + private SHA256() { + digest = getMessageDigest(); + } + + public static SHA256 create() { + return new SHA256(); + } + + public static MessageDigest getMessageDigest() { + try { + return MessageDigest.getInstance("SHA-256"); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException(e); + } + } + + @Override + public void close() { + + } + + public byte[] computeHash(byte[] input) { + return digest.digest(input); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SecurityUtility.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SecurityUtility.java new file mode 100644 index 000000000000..3bc9e415709d --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SecurityUtility.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +class SecurityUtility { + final static int MAX_SHA_256_HASH_BYTES = 32; + + /** + * Computes a keyed hash of a given text and returns. It fills the buffer "hash" with computed hash value. + * + * @param plainText Plain text bytes whose hash has to be computed. + * @param key key used for the HMAC. + * @param hash Output buffer where the computed hash value is stored. If it is less than 32 bytes, the hash is truncated. + */ + static void getHMACWithSHA256(byte[] plainText, byte[] key, byte[] hash) { + + assert (key != null && plainText != null); + assert (hash.length != 0 && hash.length <= MAX_SHA_256_HASH_BYTES); + + try (HMACSHA256 hmac = new HMACSHA256(key)) { + byte[] computedHash = hmac.computeHash(plainText); + + // Truncate the hash if needed + System.arraycopy(computedHash, 0, hash, 0, hash.length); + } + } + + /** + * Computes SHA256 hash of a given input. + * + * @param input input byte array which needs to be hashed. + * @return Returns SHA256 hash in a string form. + */ + static String getSHA256Hash(byte[] input) { + assert (input != null); + + try (SHA256 sha256 = SHA256.create()) { + byte[] hashValue = sha256.computeHash(input); + return getHexString(hashValue); + } + } + + /** + * Generates cryptographically random bytes. + * + * @param randomBytes Buffer into which cryptographically random bytes are to be generated. + */ + public static void generateRandomBytes(byte[] randomBytes) { + // Generate random bytes cryptographically. + try (RNGCryptoServiceProvider rngCsp = new RNGCryptoServiceProvider()) { + rngCsp.getBytes(randomBytes); + } + } + + /** + * Compares two byte arrays and returns true if all bytes are equal. + * + * @param buffer1 input buffer + * @param buffer2 another buffer to be compared against + * @param buffer2Index + * @param lengthToCompare + * @return returns true if both the arrays have the same byte values else returns false + */ + static boolean compareBytes(byte[] buffer1, byte[] buffer2, int buffer2Index, int lengthToCompare) { + if (buffer1 == null || buffer2 == null) { + return false; + } + + assert buffer1.length >= lengthToCompare : "invalid lengthToCompare"; + assert buffer2Index > -1 && buffer2Index < buffer2.length : "invalid index"; + if ((buffer2.length - buffer2Index) < lengthToCompare) { + return false; + } + + for (int index = 0; index < buffer1.length && index < lengthToCompare; ++index) { + if (buffer1[index] != buffer2[buffer2Index + index]) { + return false; + } + } + + return true; + } + + /** + * Gets hex representation of byte array. + * + * @param input input byte array + * @return + */ + private static String getHexString(byte[] input) { + assert (input != null); + + return Bytes.toHex(input); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SymmetricKey.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SymmetricKey.java new file mode 100644 index 000000000000..583b1463d5de --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/SymmetricKey.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +/** + * Base class containing raw key bytes for symmetric key algorithms. Some encryption algorithms can use the key directly while others derive sub keys from this. + * If an algorithm needs to derive more keys, have a derived class from this and use it in the corresponding encryption algorithm. + */ +class SymmetricKey { + + /** + * The underlying key material + */ + protected final byte[] rootKey; + + /** + * Constructor that initializes the root key. + * + * @param rootKey root key + */ + SymmetricKey(byte[] rootKey) { + // Key validation + if (rootKey == null || rootKey.length == 0) { + throw new IllegalArgumentException("rootKey"); + } + + this.rootKey = rootKey; + } + + /** + * Gets a copy of the plain text key + * This is needed for actual encryption/decryption. + * + * @return root key byte array + */ + protected byte[] getRootKey() { + return this.rootKey; + } + + /** + * Computes SHA256 value of the plain text key bytes + * + * @return A string containing SHA256 hash of the root key + */ + protected String getKeyHash() { + return SecurityUtility.getSHA256Hash(this.getRootKey()); + } + + /** + * Gets the length of the root key + * + * @return Returns the length of the root key + */ + int getLength() { + return this.rootKey.length; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UnixTimestampDeserializer.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UnixTimestampDeserializer.java new file mode 100644 index 000000000000..1a264d5754a1 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UnixTimestampDeserializer.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.ObjectCodec; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +import java.io.IOException; +import java.time.Instant; + +class UnixTimestampDeserializer extends JsonDeserializer { + @Override + public Instant deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + ObjectCodec codec = jsonParser.getCodec(); + Long seconds = codec.readValue(jsonParser, Long.class); + + if (seconds == null) { + return null; + } + + return Instant.ofEpochSecond(seconds); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UnixTimestampSerializer.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UnixTimestampSerializer.java new file mode 100644 index 000000000000..c81153f54a07 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/implementation/encryption/UnixTimestampSerializer.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +import java.io.IOException; +import java.time.Instant; + +class UnixTimestampSerializer extends JsonSerializer { + @Override + public void serialize(Instant instant, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { + jsonGenerator.writeNumber(instant.getEpochSecond()); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java new file mode 100644 index 000000000000..7d856c2be4b2 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos; + +import com.azure.cosmos.implementation.ConnectionPolicy; +import com.azure.cosmos.implementation.guava27.Strings; +import org.testng.ITest; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; + +import java.lang.reflect.Method; + +public abstract class CosmosAsyncClientTest implements ITest { + + private final CosmosClientBuilder clientBuilder; + private String testName; + + public CosmosAsyncClientTest() { + this(new CosmosClientBuilder()); + } + + public CosmosAsyncClientTest(CosmosClientBuilder clientBuilder) { + this.clientBuilder = clientBuilder; + } + + public final CosmosClientBuilder getClientBuilder() { + return this.clientBuilder; + } + + public final ConnectionPolicy getConnectionPolicy() { + return this.clientBuilder.getConnectionPolicy(); + } + + @Override + public final String getTestName() { + return this.testName; + } + + @BeforeMethod(alwaysRun = true) + public final void setTestName(Method method) { + String testClassAndMethodName = Strings.lenientFormat("%s::%s", + method.getDeclaringClass().getSimpleName(), + method.getName()); + + if (this.clientBuilder.getConnectionPolicy() != null && this.clientBuilder.configs() != null) { + String connectionMode = this.clientBuilder.getConnectionPolicy().getConnectionMode() == ConnectionMode.DIRECT + ? "Direct " + this.clientBuilder.configs().getProtocol() + : "Gateway"; + + this.testName = Strings.lenientFormat("%s[%s with %s consistency]", + testClassAndMethodName, + connectionMode, + clientBuilder.getConsistencyLevel()); + } else { + this.testName = testClassAndMethodName; + } + } + + @AfterMethod(alwaysRun = true) + public final void unsetTestName() { + this.testName = null; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/CosmosDatabaseForTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/CosmosDatabaseForTest.java new file mode 100644 index 000000000000..d5d8a9076519 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/CosmosDatabaseForTest.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos; + +import com.azure.cosmos.models.CosmosDatabaseResponse; +import com.azure.cosmos.models.CosmosDatabaseProperties; +import com.azure.cosmos.models.SqlParameter; +import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.cosmos.util.CosmosPagedFlux; +import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +public class CosmosDatabaseForTest { + private static Logger logger = LoggerFactory.getLogger(CosmosDatabaseForTest.class); + public static final String SHARED_DB_ID_PREFIX = "RxJava.SDKTest.SharedDatabase"; + private static final Duration CLEANUP_THRESHOLD_DURATION = Duration.ofHours(2); + private static final String DELIMITER = "_"; + private static DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss"); + + public LocalDateTime createdTime; + public CosmosAsyncDatabase createdDatabase; + + private CosmosDatabaseForTest(CosmosAsyncDatabase db, LocalDateTime createdTime) { + this.createdDatabase = db; + this.createdTime = createdTime; + } + + private boolean isStale() { + return isOlderThan(CLEANUP_THRESHOLD_DURATION); + } + + private boolean isOlderThan(Duration dur) { + return createdTime.isBefore(LocalDateTime.now().minus(dur)); + } + + public static String generateId() { + return SHARED_DB_ID_PREFIX + DELIMITER + TIME_FORMATTER.format(LocalDateTime.now()) + DELIMITER + RandomStringUtils.randomAlphabetic(3); + } + + private static CosmosDatabaseForTest from(CosmosAsyncDatabase db) { + if (db == null || db.getId() == null || db.getLink() == null) { + return null; + } + + String id = db.getId(); + if (id == null) { + return null; + } + + String[] parts = StringUtils.split(id, DELIMITER); + if (parts.length != 3) { + return null; + } + if (!StringUtils.equals(parts[0], SHARED_DB_ID_PREFIX)) { + return null; + } + + try { + LocalDateTime parsedTime = LocalDateTime.parse(parts[1], TIME_FORMATTER); + return new CosmosDatabaseForTest(db, parsedTime); + } catch (Exception e) { + return null; + } + } + + public static CosmosDatabaseForTest create(DatabaseManager client) { + CosmosDatabaseProperties dbDef = new CosmosDatabaseProperties(generateId()); + + client.createDatabase(dbDef).block(); + CosmosAsyncDatabase db = client.getDatabase(dbDef.getId()); + CosmosDatabaseForTest dbForTest = CosmosDatabaseForTest.from(db); + assertThat(dbForTest).isNotNull(); + return dbForTest; + } + + public static void cleanupStaleTestDatabases(DatabaseManager client) { + logger.info("Cleaning stale test databases ..."); + List sqlParameterList = new ArrayList<>(); + sqlParameterList.add(new SqlParameter("@PREFIX", CosmosDatabaseForTest.SHARED_DB_ID_PREFIX)); + List dbs = client.queryDatabases( + new SqlQuerySpec("SELECT * FROM c WHERE STARTSWITH(c.id, @PREFIX)", sqlParameterList)).collectList().block(); + + for (CosmosDatabaseProperties db : dbs) { + assertThat(db.getId()).startsWith(CosmosDatabaseForTest.SHARED_DB_ID_PREFIX); + + CosmosDatabaseForTest dbForTest = CosmosDatabaseForTest.from(client.getDatabase(db.getId())); + + if (db != null && dbForTest.isStale()) { + logger.info("Deleting database {}", db.getId()); + dbForTest.deleteDatabase(db.getId()); + } + } + } + + private void deleteDatabase(String id) { + this.createdDatabase.delete().block(); + } + + public interface DatabaseManager { + CosmosPagedFlux queryDatabases(SqlQuerySpec query); + Mono createDatabase(CosmosDatabaseProperties databaseDefinition); + CosmosAsyncDatabase getDatabase(String id); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/EncryptionCodeSnippet.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/EncryptionCodeSnippet.java new file mode 100644 index 000000000000..e2952326babc --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/EncryptionCodeSnippet.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; +import com.azure.cosmos.implementation.guava25.collect.ImmutableList; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.ModelBridgeInternal; +import com.azure.cosmos.models.PartitionKey; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.UUID; + +/** + * Code snippets for {@link ChangeFeedProcessor} + */ +public class EncryptionCodeSnippet { + + public void encryptionSample() { + CosmosClientBuilder builder = new CosmosClientBuilder(); + + CosmosClient client = builder.key("key") + .endpoint("endpoint") + .dataEncryptionKeyProvider(naiveDataEncryptionKeyProvider()) + .buildClient(); + + CosmosContainer container = client.getDatabase("myDb").getContainer("myCol"); + + Pojo pojo = new Pojo(); + pojo.id = UUID.randomUUID().toString(); + pojo.mypk = UUID.randomUUID().toString(); + pojo.nonSensitive = UUID.randomUUID().toString(); + pojo.sensitive1 = "this is a secret to be encrypted"; + pojo.sensitive2 = "this is a another secret to be encrypted"; + + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + EncryptionOptions encryptionOptions = new EncryptionOptions(); + encryptionOptions.setPathsToEncrypt(ImmutableList.of("/sensitive1", "/sensitive2")); + ModelBridgeInternal.setEncryptionOptions(options, encryptionOptions); + + CosmosItemResponse response = container.createItem(pojo, options); + + assert response.getItem().nonSensitive != null; + assert response.getItem().sensitive1 == null; + assert response.getItem().sensitive2 == null; + + + CosmosItemResponse readResponse = container.readItem(pojo.id, new PartitionKey(pojo.mypk), Pojo.class); + + assert response.getItem().nonSensitive != null; + assert response.getItem().sensitive1 != null; + assert response.getItem().sensitive2 != null; + } + + private DataEncryptionKeyProvider naiveDataEncryptionKeyProvider() { + // this is a naive data encryption key provider which always uses the same data encryption key in memory. + // the user should implement DataEncryptionKeyProvider as per use case; + // storing data encryption keys should happen on the app side. + DataEncryptionKey key = createDataEncryptionKey(); + + return new DataEncryptionKeyProvider() { + @Override + public DataEncryptionKey getDataEncryptionKey(String id, String algorithm) { + return key; + } + }; + } + + public static class Pojo { + @JsonProperty + private String id; + @JsonProperty + private String mypk; + @JsonProperty + private String nonSensitive; + @JsonProperty + private String sensitive1; + @JsonProperty + private String sensitive2; + } + + private DataEncryptionKey createDataEncryptionKey() { + byte[] key = DataEncryptionKey.generate("AEAes256CbcHmacSha256Randomized"); + return DataEncryptionKey.create(key, "AEAes256CbcHmacSha256Randomized"); + } +} + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/EncryptionTest2.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/EncryptionTest2.java new file mode 100644 index 000000000000..a6787a240507 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/EncryptionTest2.java @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos; + +import com.azure.cosmos.implementation.encryption.SimpleInMemoryProvider; +import com.azure.cosmos.implementation.encryption.TestUtils; +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; +import com.azure.cosmos.implementation.guava25.collect.ImmutableList; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.FeedResponse; +import com.azure.cosmos.models.ModelBridgeInternal; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.cosmos.rx.TestSuiteBase; +import com.azure.cosmos.util.CosmosPagedIterable; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Factory; +import org.testng.annotations.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; + +public class EncryptionTest2 extends TestSuiteBase { + static SimpleInMemoryProvider simpleInMemoryProvider = new SimpleInMemoryProvider(); + + private CosmosClient client; + private CosmosContainer container; + private static final int TIMEOUT = 60_000; + + @Factory(dataProvider = "clientBuilders") + public EncryptionTest2(CosmosClientBuilder clientBuilder) { + super(CosmosBridgeInternal.setDateKeyProvider(clientBuilder, simpleInMemoryProvider)); + } + + @BeforeClass(groups = {"encryption"}, timeOut = SETUP_TIMEOUT) + public void before_CosmosItemTest() { + assertThat(this.client).isNull(); + this.client = getClientBuilder().buildClient(); + CosmosAsyncContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); + container = client.getDatabase(asyncContainer.getDatabase().getId()).getContainer(asyncContainer.getId()); + } + + @BeforeClass(groups = "encryption") + public void beforeClass() { + TestUtils.initialized(); + } + + @AfterClass(groups = {"encryption"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) + public void afterClass() { + assertThat(this.client).isNotNull(); + this.client.close(); + } + + @Test(groups = {"encryption"}, timeOut = TIMEOUT) + public void createItemEncrypt_readItemDecrypt() throws Exception { + CosmosItemRequestOptions requestOptions = new CosmosItemRequestOptions(); + EncryptionOptions encryptionOptions = new EncryptionOptions(); + encryptionOptions.setPathsToEncrypt(ImmutableList.of("/sensitive")); + + String keyId = UUID.randomUUID().toString(); + + DataEncryptionKey dataEncryptionKey = createDataEncryptionKey(); + simpleInMemoryProvider.addKey(keyId, dataEncryptionKey); + + encryptionOptions.setDataEncryptionKeyId(keyId); + encryptionOptions.setEncryptionAlgorithm(CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED); + ModelBridgeInternal.setEncryptionOptions(requestOptions, encryptionOptions); + + Pojo properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse itemResponse = container.createItem(properties, requestOptions); + assertThat(itemResponse.getRequestCharge()).isGreaterThan(0); + + Pojo responseItem = itemResponse.getItem(); + validateWriteResponseIsValid(properties, responseItem); + + Pojo readItem = container.readItem(properties.id, new PartitionKey(properties.mypk), requestOptions, Pojo.class).getItem(); + validateReadResponseIsValid(properties, readItem); + } + + @Test(groups = {"encryption"}, timeOut = TIMEOUT) + public void upsertItem_readItem() throws Exception { + CosmosItemRequestOptions requestOptions = new CosmosItemRequestOptions(); + EncryptionOptions encryptionOptions = new EncryptionOptions(); + encryptionOptions.setPathsToEncrypt(ImmutableList.of("/sensitive")); + + String keyId = UUID.randomUUID().toString(); + DataEncryptionKey dataEncryptionKey = createDataEncryptionKey(); + simpleInMemoryProvider.addKey(keyId, dataEncryptionKey); + + encryptionOptions.setDataEncryptionKeyId(keyId); + ModelBridgeInternal.setEncryptionOptions(requestOptions, encryptionOptions); + encryptionOptions.setEncryptionAlgorithm(CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED); + + Pojo properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse itemResponse = container.upsertItem(properties, requestOptions); + assertThat(itemResponse.getRequestCharge()).isGreaterThan(0); + + Pojo responseItem = itemResponse.getItem(); + validateWriteResponseIsValid(properties, responseItem); + + Pojo readItem = container.readItem(properties.id, new PartitionKey(properties.mypk), requestOptions, Pojo.class).getItem(); + validateReadResponseIsValid(properties, readItem); + } + + + private void validateWriteResponseIsValid(Pojo originalItem, Pojo result) { + assertThat(result.sensitive).isEqualTo(originalItem.sensitive); + assertThat(result.id).isEqualTo(originalItem.id); + assertThat(result.mypk).isEqualTo(originalItem.mypk); + assertThat(result.nonSensitive).isEqualTo(originalItem.nonSensitive); + } + + private void validateReadResponseIsValid(Pojo originalItem, Pojo result) { + assertThat(result.id).isEqualTo(originalItem.id); + assertThat(result.mypk).isEqualTo(originalItem.mypk); + assertThat(result.nonSensitive).isEqualTo(originalItem.nonSensitive); + assertThat(result.sensitive).isEqualTo(originalItem.sensitive); + } + + private void validateQueryResponseIsValid(Pojo originalItem, Pojo result) { + assertThat(result.id).isEqualTo(originalItem.id); + assertThat(result.mypk).isEqualTo(originalItem.mypk); + assertThat(result.nonSensitive).isEqualTo(originalItem.nonSensitive); + assertThat(result.sensitive).isNull(); + } + + @Test(groups = {"encryption"}, timeOut = TIMEOUT) + public void readItem() throws Exception { + Pojo properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse itemResponse = container.createItem(properties); + + CosmosItemResponse readResponse1 = container.readItem(properties.id, + new PartitionKey(properties.mypk), + new CosmosItemRequestOptions(), + Pojo.class); + validateItemResponse(properties, readResponse1); + } + + @Test(groups = {"encryption"}, timeOut = TIMEOUT) + public void readAllItems() throws Exception { + Pojo properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse itemResponse = container.createItem(properties); + + CosmosQueryRequestOptions CosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + + CosmosPagedIterable feedResponseIterator3 = + container.readAllItems(CosmosQueryRequestOptions, Pojo.class); + assertThat(feedResponseIterator3.iterator().hasNext()).isTrue(); + } + + + @Test(groups = {"encryption"}, timeOut = TIMEOUT) + public void queryItems() throws Exception { + Pojo properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse itemResponse = container.createItem(properties); + + String query = String.format("SELECT * from c where c.id = '%s'", properties.id); + CosmosQueryRequestOptions CosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + + CosmosPagedIterable feedResponseIterator1 = + container.queryItems(query, CosmosQueryRequestOptions, Pojo.class); + // Very basic validation + assertThat(feedResponseIterator1.iterator().hasNext()).isTrue(); + + SqlQuerySpec querySpec = new SqlQuerySpec(query); + CosmosPagedIterable feedResponseIterator3 = + container.queryItems(querySpec, CosmosQueryRequestOptions, Pojo.class); + assertThat(feedResponseIterator3.iterator().hasNext()).isTrue(); + } + + @Test(groups = {"encryption"}, timeOut = TIMEOUT) + public void queryItemsWithContinuationTokenAndPageSize() throws Exception { + List actualIds = new ArrayList<>(); + Pojo properties = getItem(UUID.randomUUID().toString()); + container.createItem(properties); + actualIds.add(properties.id); + properties = getItem(UUID.randomUUID().toString()); + container.createItem(properties); + actualIds.add(properties.id); + properties = getItem(UUID.randomUUID().toString()); + container.createItem(properties); + actualIds.add(properties.id); + + + String query = String.format("SELECT * from c where c.id in ('%s', '%s', '%s')", actualIds.get(0), actualIds.get(1), actualIds.get(2)); + CosmosQueryRequestOptions CosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + String continuationToken = null; + int pageSize = 1; + + int initialDocumentCount = 3; + int finalDocumentCount = 0; + + CosmosPagedIterable feedResponseIterator1 = + container.queryItems(query, CosmosQueryRequestOptions, Pojo.class); + + do { + Iterable> feedResponseIterable = + feedResponseIterator1.iterableByPage(continuationToken, pageSize); + for (FeedResponse fr : feedResponseIterable) { + int resultSize = fr.getResults().size(); + assertThat(resultSize).isEqualTo(pageSize); + finalDocumentCount += fr.getResults().size(); + continuationToken = fr.getContinuationToken(); + } + } while (continuationToken != null); + + assertThat(finalDocumentCount).isEqualTo(initialDocumentCount); + + } + + + private Pojo getItem(String documentId) { + final String uuid = UUID.randomUUID().toString(); + + Pojo pojo = new Pojo(); + pojo.id = uuid; + pojo.mypk = uuid; + pojo.nonSensitive = UUID.randomUUID().toString(); + pojo.sensitive = UUID.randomUUID().toString(); + + return pojo; + } + + private void validateItemResponse(Pojo containerProperties, + CosmosItemResponse createResponse) { + // Basic validation + assertThat(BridgeInternal.getProperties(createResponse).getId()).isNotNull(); + assertThat(BridgeInternal.getProperties(createResponse).getId()) + .as("check Resource Id") + .isEqualTo(containerProperties.id); + } + + public static class Pojo { + public String id; + @JsonProperty + public String mypk; + @JsonProperty + public String sensitive; + @JsonProperty + public String nonSensitive; + } + + private DataEncryptionKey createDataEncryptionKey() throws Exception { + return TestUtils.createDataEncryptionKey(); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/TestNGLogListener.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/TestNGLogListener.java new file mode 100644 index 000000000000..f6ccfd2d2a2d --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/TestNGLogListener.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.IInvokedMethod; +import org.testng.IInvokedMethodListener; +import org.testng.ITestResult; +import org.testng.SkipException; + +public class TestNGLogListener implements IInvokedMethodListener { + private final Logger logger = LoggerFactory.getLogger(TestNGLogListener.class); + + @Override + public void beforeInvocation(IInvokedMethod iInvokedMethod, ITestResult iTestResult) { + logger.info("beforeInvocation: {}", methodName(iInvokedMethod)); + } + + @Override + public void afterInvocation(IInvokedMethod iInvokedMethod, ITestResult iTestResult) { + logger.info("afterInvocation: {}, total time {}ms, result {}", + methodName(iInvokedMethod), + iTestResult.getEndMillis() - iTestResult.getStartMillis(), + resultDetails(iTestResult) + ); + } + + private String resultDetails(ITestResult iTestResult) { + if (iTestResult.isSuccess()) { + return "success"; + } + + if (iTestResult.getThrowable() instanceof SkipException) { + return "skipped. reason: " + failureDetails(iTestResult); + } + + return "failed. reason: " + failureDetails(iTestResult); + } + + private String failureDetails(ITestResult iTestResult) { + if (iTestResult.isSuccess()) { + return null; + } + + if (iTestResult.getThrowable() == null) { + logger.error("throwable is null"); + return null; + } + + return iTestResult.getThrowable().getClass().getName() + ": " + iTestResult.getThrowable().getMessage(); + } + + private String methodName(IInvokedMethod iInvokedMethod) { + return iInvokedMethod.getTestMethod().getRealClass().getSimpleName() + "#" + iInvokedMethod.getTestMethod().getMethodName(); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/AesCryptoServiceProviderTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/AesCryptoServiceProviderTest.java new file mode 100644 index 000000000000..71fee35dafd9 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/AesCryptoServiceProviderTest.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.encryption.api.EncryptionType; +import org.apache.commons.lang3.RandomStringUtils; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.nio.charset.StandardCharsets; + +import static org.assertj.core.api.Assertions.assertThat; + +public class AesCryptoServiceProviderTest { + private byte[] key; + + @BeforeClass(groups = "unit") + public void beforeClass() throws Exception { + key = TestUtils.generatePBEKeySpec("myPassword"); + } + + @Test(groups = "unit", dataProvider = "encryptionInput") + public void aesEncryptThenDecrypt(byte[] input) { + AeadAes256CbcHmac256EncryptionKey aeadAesKey = new AeadAes256CbcHmac256EncryptionKey(key, "AES"); + AeadAes256CbcHmac256Algorithm encryptionAlgorithm = new AeadAes256CbcHmac256Algorithm(aeadAesKey, EncryptionType.RANDOMIZED, (byte) 0x01); + byte[] encrypted = encryptionAlgorithm.encryptData(input); + + assertThat(encrypted).isNotEqualTo(input); + assertThat(encrypted.length).isGreaterThan(input.length); + + byte[] decrypted = encryptionAlgorithm.decryptData(encrypted); + assertThat(decrypted).isEqualTo(input); + } + + @DataProvider(name = "encryptionInput") + public Object[][] encryptionInput() { + return new Object[][]{ + { new byte[] {} }, + {"secret".getBytes(StandardCharsets.UTF_8) }, + {"محرمانه".getBytes(StandardCharsets.UTF_8) }, + { RandomStringUtils.randomAlphabetic(100_000).getBytes(StandardCharsets.UTF_8) } + }; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyPropertiesTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyPropertiesTest.java new file mode 100644 index 000000000000..8a40f7775656 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DataEncryptionKeyPropertiesTest.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.apachecommons.lang.RandomStringUtils; +import com.azure.cosmos.implementation.apachecommons.lang.RandomUtils; +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.google.common.collect.ImmutableList; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.nio.charset.StandardCharsets; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; + +public class DataEncryptionKeyPropertiesTest { + + @Test(groups = "unit") + public void sameSerializationAsDotNet() throws Exception { + byte[] bytes = TestUtils.getResourceAsByteArray("./encryption/dotnet/DataEncryptionKeyProperties.json"); + + ObjectMapper objectMapper = new ObjectMapper(); + ObjectNode objectNode = objectMapper.readValue(bytes, ObjectNode.class); + + DataEncryptionKeyProperties dataEncryptionKeyProperties = Utils.getSimpleObjectMapper().readValue(bytes, DataEncryptionKeyProperties.class); + objectNode.remove("_attachments"); + String expected = objectMapper.writeValueAsString(objectNode); + String actual = objectMapper.writeValueAsString(dataEncryptionKeyProperties); + assertThat(actual).isEqualTo(expected); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DecryptDataEncryptedByDotNetTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DecryptDataEncryptedByDotNetTest.java new file mode 100644 index 000000000000..310dfccf18af --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/DecryptDataEncryptedByDotNetTest.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.CosmosBridgeInternal; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.implementation.DatabaseForTest; +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.guava25.collect.Streams; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.ThroughputProperties; +import com.azure.cosmos.rx.TestSuiteBase; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Factory; +import org.testng.annotations.Test; + +import java.time.Duration; +import java.util.Objects; +import java.util.UUID; +import java.util.stream.Collectors; + +import static org.assertj.core.api.Assertions.assertThat; + +public class DecryptDataEncryptedByDotNetTest extends TestSuiteBase { + + private final static EncryptionKeyWrapMetadata METADATA_1 = new EncryptionKeyWrapMetadata("metadata1"); + private final static EncryptionKeyWrapMetadata METADATA_2 = new EncryptionKeyWrapMetadata("metadata2"); + private final static String METADATA_UPDATE_SUFFIX = "updated"; + private final static Duration CACHE_TTL = Duration.ofDays(1); + + private final String databaseForTestId = DatabaseForTest.generateId(); + private final String itemContainerId = UUID.randomUUID().toString(); + private final String keyContainerId = UUID.randomUUID().toString(); + private CosmosAsyncClient client; + private CosmosAsyncDatabase databaseCore; + private CosmosAsyncContainer itemContainer; + private CosmosAsyncContainer keyContainer; + private CosmosDataEncryptionKeyProvider dekProvider; + private TestKeyWrapProvider keyWrapProvider; + + @Factory(dataProvider = "clientBuilders") + public DecryptDataEncryptedByDotNetTest(CosmosClientBuilder clientBuilder) { + super(clientBuilder); + } + + @BeforeClass(groups = "encryption") + public void beforeClass() { + TestUtils.initialized(); + } + + @AfterClass(groups = "encryption") + public void afterClass() { + safeDeleteDatabase(databaseCore); + } + + @AfterMethod(groups = "encryption") + public void afterMethod() { + safeClose(client); + } + + @BeforeMethod(groups = "encryption") + public void beforeMethod() { + keyWrapProvider = new TestKeyWrapProvider(); + dekProvider = new CosmosDataEncryptionKeyProvider(keyWrapProvider); + client = CosmosBridgeInternal.setDateKeyProvider(getClientBuilder(), dekProvider).buildAsyncClient(); + client.createDatabaseIfNotExists(databaseForTestId).block(); + databaseCore = client.getDatabase(databaseForTestId); + databaseCore.createContainerIfNotExists(keyContainerId, "/id", ThroughputProperties.createManualThroughput(400)).block(); + keyContainer = databaseCore.getContainer(keyContainerId); + databaseCore.createContainerIfNotExists(itemContainerId, "/PK", ThroughputProperties.createManualThroughput(400)).block(); + itemContainer = databaseCore.getContainer(itemContainerId); + + truncateCollection(itemContainer); + truncateCollection(keyContainer); + + dekProvider.initialize(databaseCore, keyContainer.getId()); + } + + @Test(groups = "encryption") + public void canReadKeyEncryptionKeyGeneratedByDotNet() throws Exception { + // add key generated by dotnet + ObjectNode dataEncryptionKeyProperties = TestUtils.loadPojo("./encryption/dotnet/DataEncryptionKeyProperties.json", ObjectNode.class); + keyContainer.createItem(dataEncryptionKeyProperties).block(); + + DataEncryptionKey loadedKey = dekProvider.getDataEncryptionKey(dataEncryptionKeyProperties.get("id").asText(), CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED); + + assertThat(loadedKey.getEncryptionAlgorithm()).isEqualTo(CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED); + assertThat(loadedKey.getEncryptionAlgorithm()).isEqualTo(CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED); + + EncryptionKeyWrapMetadata keyWrapMetadata = Utils.getSimpleObjectMapper().convertValue(dataEncryptionKeyProperties.get("keyWrapMetadata"), EncryptionKeyWrapMetadata.class); + byte[] expectedWrappedKey = dataEncryptionKeyProperties.get("wrappedDataEncryptionKey").binaryValue(); + EncryptionKeyUnwrapResult expectedUnWrappedKey = keyWrapProvider.unwrapKey(expectedWrappedKey, keyWrapMetadata); + + assertThat(loadedKey.getRawKey()).isEqualTo(expectedUnWrappedKey.getDataEncryptionKey()); + } + + @Test(groups = "encryption") + public void canDecryptDataEncryptedByDotNet() throws Exception { + // add key generated by dotnet + DataEncryptionKeyProperties dataEncryptionKeyProperties = TestUtils.loadPojo("./encryption/dotnet/DataEncryptionKeyProperties.json", DataEncryptionKeyProperties.class); + keyContainer.createItem(dataEncryptionKeyProperties).block(); + + // add data encrypted by dotnet + ObjectNode objectNode = TestUtils.loadPojo("./encryption/dotnet/EncryptedPOCO.json", ObjectNode.class); + Streams.stream(objectNode.fieldNames()).filter(fieldName -> fieldName.startsWith("_") && !fieldName.equals("_ei")).collect(Collectors.toList()).forEach(filedName -> objectNode.remove(filedName)); + itemContainer.createItem(objectNode).block(); + TestDoc expectedTestDoc = TestUtils.loadPojo("./encryption/dotnet/POCO.json", TestDoc.class); + assertThat(expectedTestDoc.sensitive).isNotNull(); + + TestDoc testDoc = itemContainer.readItem(objectNode.get("id").asText(), new PartitionKey(objectNode.get("PK").asText()), TestDoc.class).block().getItem(); + assertThat(testDoc.sensitive).isNotNull(); + assertThat(testDoc).isEqualTo(expectedTestDoc); + } + + static public class TestDoc { + @JsonProperty("id") + public String id; + @JsonProperty("PK") + public String pk; + @JsonProperty("NonSensitive") + public String nonSensitive; + @JsonProperty("Sensitive") + public String sensitive; + + public TestDoc() { + } + + public TestDoc(TestDoc other) { + this.id = other.id; + this.pk = other.pk; + this.nonSensitive = other.nonSensitive; + this.sensitive = other.sensitive; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TestDoc testDoc = (TestDoc) o; + return Objects.equals(id, testDoc.id) && + Objects.equals(pk, testDoc.pk) && + Objects.equals(nonSensitive, testDoc.nonSensitive) && + Objects.equals(sensitive, testDoc.sensitive); + } + + @Override + public int hashCode() { + return Objects.hash(id, pk, nonSensitive, sensitive); + } + } + + private class TestKeyWrapProvider implements EncryptionKeyWrapProvider { + public EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata) { + int moveBy = StringUtils.equals(metadata.value, DecryptDataEncryptedByDotNetTest.METADATA_1.value + DecryptDataEncryptedByDotNetTest.METADATA_UPDATE_SUFFIX) ? 1 : 2; + + for (int i = 0; i < wrappedKey.length; i++) { + wrappedKey[i] = (byte) (wrappedKey[i] - moveBy); + } + + return new EncryptionKeyUnwrapResult(wrappedKey, CACHE_TTL); + } + + public EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata) { + EncryptionKeyWrapMetadata responseMetadata = new EncryptionKeyWrapMetadata(metadata.value + DecryptDataEncryptedByDotNetTest.METADATA_UPDATE_SUFFIX); + int moveBy = StringUtils.equals(metadata.value, DecryptDataEncryptedByDotNetTest.METADATA_1.value) ? 1 : 2; + + for (int i = 0; i < key.length; i++) { + key[i] = (byte) (key[i] + moveBy); + } + + return new EncryptionKeyWrapResult(key, responseMetadata); + } + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionProcessorTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionProcessorTest.java new file mode 100644 index 000000000000..05c478bb159c --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionProcessorTest.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; +import com.azure.cosmos.implementation.encryption.api.EncryptionType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.google.common.collect.ImmutableList; +import org.apache.commons.lang3.RandomStringUtils; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.nio.charset.StandardCharsets; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; + +public class EncryptionProcessorTest { + public EncryptionProcessorTest() {} + private byte[] key; + + @BeforeClass(groups = "unit") + public void beforeClass() throws Exception { + key = TestUtils.generatePBEKeySpec("myPassword"); + } + + public static class TestPojo { + @JsonProperty + public String id; + @JsonProperty + public String pk; + @JsonProperty + public String nonSensitive; + @JsonProperty + public String sensitive; + } + + private TestPojo getTestDate() { + + TestPojo test = new TestPojo(); + test.id = UUID.randomUUID().toString(); + test.pk = UUID.randomUUID().toString(); + test.nonSensitive = UUID.randomUUID().toString(); + test.sensitive = UUID.randomUUID().toString(); + + return test; + } + + @Test(groups = "unit") + public void aesEncryptThenDecrypt() { + AeadAes256CbcHmac256EncryptionKey aeadAesKey = new AeadAes256CbcHmac256EncryptionKey(key, "AES"); + AeadAes256CbcHmac256Algorithm encryptionAlgorithm = new AeadAes256CbcHmac256Algorithm(aeadAesKey, EncryptionType.RANDOMIZED, (byte) 0x01); + String keyId = UUID.randomUUID().toString(); + + DataEncryptionKey javaDataEncryptionKey = new DataEncryptionKey() { + @Override + public byte[] getRawKey() { + return key; + } + + @Override + public String getEncryptionAlgorithm() { + return CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED; + } + + @Override + public byte[] encryptData(byte[] plainText) { + return encryptionAlgorithm.encryptData(plainText); + } + + @Override + public byte[] decryptData(byte[] cipherText) { + return encryptionAlgorithm.decryptData(cipherText); + } + }; + + SimpleInMemoryProvider keyProvider = new SimpleInMemoryProvider(); + keyProvider.addKey(keyId, javaDataEncryptionKey); + + EncryptionProcessor encryptionProcessor = new EncryptionProcessor(); + com.azure.cosmos.implementation.encryption.api.EncryptionOptions encryptionOptions = new EncryptionOptions(); + encryptionOptions.setPathsToEncrypt(ImmutableList.of("/sensitive")); + encryptionOptions.setDataEncryptionKeyId(keyId); + encryptionOptions.setEncryptionAlgorithm(CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED); + + TestPojo testDate = getTestDate(); + byte[] inputAsByteArray = toByteArray(testDate); + + ObjectNode objectNode = Utils.getSimpleObjectMapper().convertValue(testDate, ObjectNode.class); + ObjectNode itemObjectWithEncryptedSensitiveData = encryptionProcessor.encryptAsync(objectNode, encryptionOptions, keyProvider); + ObjectNode itemObjectWithDecryptedSensitiveData = encryptionProcessor.decryptAsync(itemObjectWithEncryptedSensitiveData, keyProvider); + + assertThat(serializeToByteArray(Utils.getSimpleObjectMapper(), itemObjectWithDecryptedSensitiveData)).isEqualTo(inputAsByteArray); + } + + @DataProvider(name = "encryptionInput") + public Object[][] encryptionInput() { + return new Object[][]{ + { new byte[] {} }, + {"secret".getBytes(StandardCharsets.UTF_8) }, + {"محرمانه".getBytes(StandardCharsets.UTF_8) }, + { RandomStringUtils.randomAlphabetic(100_000).getBytes(StandardCharsets.UTF_8) } + }; + } + + private static byte[] toByteArray(Object object) { + return serializeToByteArray(Utils.getSimpleObjectMapper(), object); + } + + public static byte[] serializeToByteArray(ObjectMapper mapper, Object object) { + try { + return mapper.writeValueAsBytes(object); + } catch (JsonProcessingException e) { + throw new IllegalStateException("Unable to convert JSON to byte[]", e); + } + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionPropertiesTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionPropertiesTest.java new file mode 100644 index 000000000000..6111575fb675 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionPropertiesTest.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.apachecommons.lang.RandomStringUtils; +import com.azure.cosmos.implementation.apachecommons.lang.RandomUtils; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.testng.annotations.Test; + +import java.nio.charset.StandardCharsets; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; + +public class EncryptionPropertiesTest { + + @Test(groups = "unit") + public void fromJsonNode() throws Exception { + ObjectMapper objectMapper = new ObjectMapper(); + ObjectNode objectNode = objectMapper.createObjectNode(); + + objectNode.put("_ef", 1); + objectNode.put("_ea", "myAlgo"); + objectNode.put("_en", "keyId"); + objectNode.put("_ed", "AwQ="); + + EncryptionProperties encryptionProperties = EncryptionProperties.fromObjectNode(objectNode); + + assertThat(encryptionProperties.getEncryptionFormatVersion()).isEqualTo(1); + assertThat(encryptionProperties.getDataEncryptionKeyId()).isEqualTo("keyId"); + assertThat(encryptionProperties.getEncryptionAlgorithm()).isEqualTo("myAlgo"); + assertThat(encryptionProperties.getEncryptedData()).isEqualTo(new byte[]{3, 4}); + } + + @Test(groups = "unit") + public void toJsonNode() throws Exception { + EncryptionProperties encryptionProperties = new EncryptionProperties(1, "myAlgo", "keyId", new byte[]{3, 4}); + ObjectNode objectNode = encryptionProperties.toObjectNode(); + + assertThat(objectNode.get("_ef").isInt()).isTrue(); + assertThat(objectNode.get("_ef").asInt()).isEqualTo(1); + + assertThat(objectNode.get("_en").isTextual()).isTrue(); + assertThat(objectNode.get("_en").asText()).isEqualTo("keyId"); + + + assertThat(objectNode.get("_ea").isTextual()).isTrue(); + assertThat(objectNode.get("_ea").asText()).isEqualTo("myAlgo"); + + + assertThat(objectNode.get("_ed").isBinary()).isTrue(); + assertThat(objectNode.get("_ed").binaryValue()).isEqualTo(new byte[] {3, 4}); + + assertThat(objectNode.fieldNames()).hasSize(4); + } + + @Test(groups = "unit") + public void serialize() throws Exception { + EncryptionProperties encryptionProperties = new EncryptionProperties(1, "myAlgo", "2", new byte[]{3, 4}); + String encryptionPropertiesAsString = EncryptionProperties.getObjectWriter().writeValueAsString(encryptionProperties); + + assertThat(encryptionPropertiesAsString).isEqualTo("{\"_ef\":1,\"_ea\":\"myAlgo\",\"_en\":\"2\",\"_ed\":\"AwQ=\"}"); + } + + @Test(groups = "unit") + public void deserialize() throws Exception { + EncryptionProperties parsedEncryptionProperties = EncryptionProperties.getObjectReader().readValue("{\"_ef\":1,\"_en\":\"2\",\"_ea\":\"myAlgo\",\"_ed\":\"AwQ=\"}"); + + assertThat(parsedEncryptionProperties.getEncryptionFormatVersion()).isEqualTo(1); + assertThat(parsedEncryptionProperties.getDataEncryptionKeyId()).isEqualTo("2"); + assertThat(parsedEncryptionProperties.getEncryptedData()).isEqualTo(new byte[]{3, 4}); + } + + @Test(groups = "unit") + public void e2e() throws Exception { + EncryptionProperties encryptionProperties = new EncryptionProperties( + RandomUtils.nextInt(), + UUID.randomUUID().toString(), + UUID.randomUUID().toString(), + RandomStringUtils.randomAlphabetic(10).getBytes(StandardCharsets.UTF_8)); + + byte[] encryptionPropertiesAsBytes = EncryptionProperties.getObjectWriter().writeValueAsBytes(encryptionProperties); + EncryptionProperties parsedEncryptionProperties = EncryptionProperties.getObjectReader().readValue(encryptionPropertiesAsBytes); + + assertThat(parsedEncryptionProperties.getEncryptionFormatVersion()).isEqualTo(encryptionProperties.getEncryptionFormatVersion()); + assertThat(parsedEncryptionProperties.getDataEncryptionKeyId()).isEqualTo(encryptionProperties.getDataEncryptionKeyId()); + assertThat(parsedEncryptionProperties.getEncryptedData()).isEqualTo(encryptionProperties.getEncryptedData()); + } +} + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionTests.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionTests.java new file mode 100644 index 000000000000..bd653798c106 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/EncryptionTests.java @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.CosmosBridgeInternal; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.implementation.DatabaseForTest; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; +import com.azure.cosmos.implementation.guava25.collect.ImmutableList; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.ModelBridgeInternal; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.ThroughputProperties; +import com.azure.cosmos.rx.TestSuiteBase; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Factory; +import org.testng.annotations.Test; + +import java.time.Duration; +import java.util.Objects; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; + +public class EncryptionTests extends TestSuiteBase { + + private static EncryptionKeyWrapMetadata metadata1 = new EncryptionKeyWrapMetadata("metadata1"); + private static EncryptionKeyWrapMetadata metadata2 = new EncryptionKeyWrapMetadata("metadata2"); + private final static String metadataUpdateSuffix = "updated"; + private static Duration cacheTTL = Duration.ofDays(1); + + private final String databaseForTestId = DatabaseForTest.generateId(); + private final String itemContainerId = UUID.randomUUID().toString(); + private final String keyContainerId = UUID.randomUUID().toString(); + + private final String dekId = "mydek"; + + private static CosmosAsyncClient client; + + private static CosmosAsyncDatabase databaseCore; + private static DataEncryptionKeyProperties dekProperties; + // private static ContainerCore itemContainerCore; + private static CosmosAsyncContainer itemContainer; + private static CosmosAsyncContainer keyContainer; + private static CosmosDataEncryptionKeyProvider dekProvider; +// private static TestEncryptor encryptor; + + @Factory(dataProvider = "clientBuilders") + public EncryptionTests(CosmosClientBuilder clientBuilder) { + super(clientBuilder); + } + + @BeforeTest(groups = {"encryption"}) + public void beforeTest() { + TestKeyWrapProvider keyWrapProvider = new TestKeyWrapProvider(); + dekProvider = new CosmosDataEncryptionKeyProvider(keyWrapProvider); + client = CosmosBridgeInternal.setDateKeyProvider(getClientBuilder(), dekProvider).buildAsyncClient(); + +// EncryptionTests.encryptor = new TestEncryptor(EncryptionTests.dekProvider); + +// EncryptionTests.client = EncryptionTests.GetClient(EncryptionTests.encryptor); + + client.createDatabaseIfNotExists(databaseForTestId).block(); + databaseCore = client.getDatabase(databaseForTestId); + databaseCore.createContainerIfNotExists(keyContainerId, "/id", ThroughputProperties.createManualThroughput(400)).block(); + keyContainer = databaseCore.getContainer(keyContainerId); + databaseCore.createContainerIfNotExists(itemContainerId, "/PK", ThroughputProperties.createManualThroughput(400)).block(); + itemContainer = databaseCore.getContainer(itemContainerId); + + dekProvider.initialize(databaseCore, EncryptionTests.keyContainer.getId()); + + EncryptionTests.dekProperties = EncryptionTests.createDek(EncryptionTests.dekProvider, dekId); + } + + @BeforeClass(groups = {"encryption"}) + public void beforeClass() { + TestUtils.initialized(); + client = getClientBuilder().buildAsyncClient(); + } + + @AfterMethod(groups = {"encryption"}) + public void afterTest() { + safeClose(client); + } + + @AfterClass(groups = {"encryption"}) + public void afterClass() { + safeDeleteDatabase(databaseCore); + } + + static public class TestDoc { + + @JsonProperty("id") + public String id; + @JsonProperty("PK") + public String pk; + @JsonProperty("NonSensitive") + public String nonSensitive; + @JsonProperty("Sensitive") + public String sensitive; + + public TestDoc() { + } + + public TestDoc(TestDoc other) { + this.id = other.id; + this.pk = other.pk; + this.nonSensitive = other.nonSensitive; + this.sensitive = other.sensitive; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TestDoc testDoc = (TestDoc) o; + return Objects.equals(id, testDoc.id) && + Objects.equals(pk, testDoc.pk) && + Objects.equals(nonSensitive, testDoc.nonSensitive) && + Objects.equals(sensitive, testDoc.sensitive); + } + + @Override + public int hashCode() { + return Objects.hash(id, pk, nonSensitive, sensitive); + } + } + + @Test(groups = {"encryption"}) + public void encryptionCreateDek() { + String dekId = "anotherDek"; + DataEncryptionKeyProperties dekProperties = EncryptionTests.createDek(EncryptionTests.dekProvider, dekId); + + assertThat(dekProperties).isNotNull(); + assertThat(dekProperties.createdTime).isNotNull(); + assertThat(dekProperties.lastModified).isNotNull(); + assertThat(dekProperties.selfLink).isNotNull(); + assertThat(dekProperties).isNotNull(); + + assertThat(dekProperties.resourceId).isNotNull(); + + assertThat(dekProperties.lastModified).isEqualTo(dekProperties.lastModified); + + assertThat( + new EncryptionKeyWrapMetadata(EncryptionTests.metadata1.value + EncryptionTests.metadataUpdateSuffix)).isEqualTo( + dekProperties.encryptionKeyWrapMetadata); + + // Use different DEK provider to avoid (unintentional) cache impact + CosmosDataEncryptionKeyProvider dekProvider = new CosmosDataEncryptionKeyProvider(new TestKeyWrapProvider()); + + + dekProvider.initialize(databaseCore, EncryptionTests.keyContainer.getId()); + + DataEncryptionKeyProperties readProperties = dekProvider.getDataEncryptionKeyContainer().readDataEncryptionKeyAsync(dekId, null).block().getItem(); + assertThat(dekProperties).isEqualTo(readProperties); + } + + @Test(groups = {"encryption"}, timeOut = TIMEOUT) + public void createItemEncrypt_readItemDecrypt() throws Exception { + CosmosItemRequestOptions requestOptions = new CosmosItemRequestOptions(); + EncryptionOptions encryptionOptions = new EncryptionOptions(); + encryptionOptions.setPathsToEncrypt(ImmutableList.of("/Sensitive")); + + encryptionOptions.setDataEncryptionKeyId(dekId); + encryptionOptions.setEncryptionAlgorithm(CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED); + ModelBridgeInternal.setEncryptionOptions(requestOptions, encryptionOptions); + + TestDoc properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse itemResponse = itemContainer.createItem(properties, requestOptions).block(); + assertThat(itemResponse.getRequestCharge()).isGreaterThan(0); + + TestDoc responseItem = itemResponse.getItem(); + validateWriteResponseIsValid(properties, responseItem); + + TestDoc readItem = itemContainer.readItem(properties.id, new PartitionKey(properties.pk), requestOptions, TestDoc.class).block().getItem(); + validateReadResponseIsValid(properties, readItem); + } + + private void validateWriteResponseIsValid(TestDoc originalItem, TestDoc result) { + assertThat(result.sensitive).isEqualTo(originalItem.sensitive); + assertThat(result.id).isEqualTo(originalItem.id); + assertThat(result.pk).isEqualTo(originalItem.pk); + assertThat(result.nonSensitive).isEqualTo(originalItem.nonSensitive); + } + + private void validateReadResponseIsValid(TestDoc originalItem, TestDoc result) { + assertThat(result.id).isEqualTo(originalItem.id); + assertThat(result.pk).isEqualTo(originalItem.pk); + assertThat(result.nonSensitive).isEqualTo(originalItem.nonSensitive); + assertThat(result.sensitive).isEqualTo(originalItem.sensitive); + } + + private void validateQueryResponseIsValid(TestDoc originalItem, TestDoc result) { + assertThat(result.id).isEqualTo(originalItem.id); + assertThat(result.pk).isEqualTo(originalItem.pk); + assertThat(result.nonSensitive).isEqualTo(originalItem.nonSensitive); + assertThat(result.sensitive).isNull(); + } + + private TestDoc getItem(String documentId) { + final String uuid = UUID.randomUUID().toString(); + + TestDoc pojo = new TestDoc(); + pojo.id = uuid; + pojo.pk = uuid; + pojo.nonSensitive = UUID.randomUUID().toString(); + pojo.sensitive = UUID.randomUUID().toString(); + + return pojo; + } + + private static DataEncryptionKeyProperties createDek(CosmosDataEncryptionKeyProvider dekProvider, String dekId) { + CosmosItemResponse dekResponse = dekProvider.getDataEncryptionKeyContainer().createDataEncryptionKeyAsync( + dekId, + CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED, + EncryptionTests.metadata1, null).block(); + + assertThat(dekResponse.getRequestCharge()).isGreaterThan(0); + assertThat(dekResponse.getResponseHeaders().get(HttpConstants.HttpHeaders.E_TAG)).isNotNull(); + + DataEncryptionKeyProperties dekProperties = dekResponse.getItem(); + assertThat(dekResponse.getResponseHeaders().get(HttpConstants.HttpHeaders.E_TAG)).isEqualTo(dekProperties.eTag); + assertThat(dekId).isEqualTo(dekProperties.id); + return dekProperties; + } + + private class TestKeyWrapProvider implements EncryptionKeyWrapProvider { + public EncryptionKeyUnwrapResult unwrapKey(byte[] wrappedKey, EncryptionKeyWrapMetadata metadata) { + int moveBy = StringUtils.equals(metadata.value, EncryptionTests.metadata1.value + EncryptionTests.metadataUpdateSuffix) ? 1 : 2; + + for (int i = 0; i < wrappedKey.length; i++) { + wrappedKey[i] = (byte) (wrappedKey[i] - moveBy); + } + + return new EncryptionKeyUnwrapResult(wrappedKey, EncryptionTests.cacheTTL); + } + + public EncryptionKeyWrapResult wrapKey(byte[] key, EncryptionKeyWrapMetadata metadata) { + EncryptionKeyWrapMetadata responseMetadata = new EncryptionKeyWrapMetadata(metadata.value + EncryptionTests.metadataUpdateSuffix); + int moveBy = StringUtils.equals(metadata.value, EncryptionTests.metadata1.value) ? 1 : 2; + + for (int i = 0; i < key.length; i++) { + key[i] = (byte) (key[i] + moveBy); + } + + return new EncryptionKeyWrapResult(key, responseMetadata); + } + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/SecurityUtilityTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/SecurityUtilityTest.java new file mode 100644 index 000000000000..f2e8102b52d2 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/SecurityUtilityTest.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.google.common.io.BaseEncoding; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.StandardCharsets; + +import static org.assertj.core.api.Assertions.assertThat; + +public class SecurityUtilityTest { + byte[] secretSha256Key; + + @BeforeClass(groups = "unit") + public void beforeClass() throws Exception { + secretSha256Key = generateKey(); + } + + @Test(groups = "unit", dataProvider = "sha256KeyHashInputProvider") + public void getHMACWithSHA256(byte[] input, String expectedHashAsHex) throws Exception { + byte[] expectedHash = hexToByteArray(expectedHashAsHex); + byte[] output = new byte[expectedHashAsHex.length() / 2]; + + SecurityUtility.getHMACWithSHA256(input, secretSha256Key, output); + assertThat(output).isEqualTo(expectedHash); + } + + @Test(groups = "unit", dataProvider = "sha256InputProvider") + public void getSHA256Hash(byte[] input, String expectedHash) throws Exception { + String hash = SecurityUtility.getSHA256Hash(input); + assertThat(hash).isEqualTo(expectedHash); + } + + @Test(groups = "unit") + public void generateRandomBytes() { + ShanonEntropyGauge entropy = new ShanonEntropyGauge(); + int numberOfRandomBytes = 2; + byte[] output = new byte[numberOfRandomBytes]; + + for (int i = 0; i < 1_000_000; i++) { + SecurityUtility.generateRandomBytes(output); + entropy.add(output); + } + + double entropyValue = entropy.calculate(); + + // a smoke test validating shannon entropy + assertThat(entropyValue).isGreaterThan(numberOfRandomBytes * 8 - 1); + assertThat(entropyValue).isLessThan(numberOfRandomBytes * 8); + } + + @DataProvider(name = "sha256KeyHashInputProvider") + public Object[][] sha256KeyHashInputProvider() { + return new Object[][]{ + // byte array plain text, hex of hmac byte array + {"".getBytes(StandardCharsets.UTF_8), "BE360B09127711ED4E"}, + {"test".getBytes(StandardCharsets.UTF_8), "9BC3AF5A"}, + {"تست".getBytes(StandardCharsets.UTF_8), "1A66670142D26FAE72"}, + }; + } + + @DataProvider(name = "sha256InputProvider") + public Object[][] sha256InputProvider() { + return new Object[][]{ + {"".getBytes(StandardCharsets.UTF_8), "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"}, + {"good morning".getBytes(StandardCharsets.UTF_8), "CDF71DEA7D7741A2B6F021F3DD344F75C8333988F547866A8FBF28F064CF7C78"}, + {"صبح بخیر".getBytes(StandardCharsets.UTF_8), "5D504A5D6F1946209EDD3B99FB52AB77A60310675C8FDE03726112796893A650"}, + {"शुभ प्रभात".getBytes(StandardCharsets.UTF_8), "C033E4FD4691F0AD6422FB2B91BB64644C6F56D962DF206D60A0A1FEF23297F8"}, + }; + } + + private static byte[] generateKey() throws Exception { + final SecretKeySpec keyspec = new javax.crypto.spec.SecretKeySpec("کلید".getBytes(StandardCharsets.UTF_8), "HmacSHA256"); + return keyspec.getEncoded(); + } + + private static byte[] hexToByteArray(String hex) { + return BaseEncoding.base16().decode(hex); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/ShanonEntropyGauge.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/ShanonEntropyGauge.java new file mode 100644 index 000000000000..df4640cfc69a --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/ShanonEntropyGauge.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import java.math.BigInteger; +import java.util.HashMap; +import java.util.Map; + +public class ShanonEntropyGauge { + private final Map freq; + private int cnt = 0; + + public ShanonEntropyGauge() { + this.freq = new HashMap<>(); + } + + public void add(byte[] input) { + BigInteger number = new BigInteger(1, input); + freq.compute(number, (bigInteger, cnt) -> { + if (cnt == null) { + return 1; + } else { + return cnt + 1; + } + }); + cnt++; + } + + public double calculate() { + // compute Shannon entropy + double entropy = 0.0; + for (Map.Entry entry: freq.entrySet()) { + double p = 1.0 * entry.getValue() / cnt; + entropy -= p * Math.log(p) / Math.log(2); + } + + return entropy; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/SimpleInMemoryProvider.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/SimpleInMemoryProvider.java new file mode 100644 index 000000000000..db045862a8bf --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/SimpleInMemoryProvider.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; + +import java.util.HashMap; +import java.util.Map; + +public class SimpleInMemoryProvider implements DataEncryptionKeyProvider { + private final Map keyMap = new HashMap<>(); + + public void addKey(String keyId, DataEncryptionKey key) { + keyMap.put(keyId, key); + } + + @Override + public DataEncryptionKey getDataEncryptionKey(String id, String algorithm) { + return keyMap.get(id); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/TestUtils.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/TestUtils.java new file mode 100644 index 000000000000..7543e12e265f --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/TestUtils.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.EncryptionType; +import com.google.common.io.BaseEncoding; +import com.google.common.io.ByteStreams; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.PBEKeySpec; +import javax.crypto.spec.SecretKeySpec; +import java.io.IOException; +import java.io.InputStream; +import java.security.NoSuchAlgorithmException; +import java.security.Security; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.KeySpec; +import java.util.Random; + +public class TestUtils { + static { + Security.addProvider(new BouncyCastleProvider()); + } + + public static void initialized() {} + + public static AeadAes256CbcHmac256EncryptionKey instantiateAeadAes256CbcHmac256EncryptionKey(byte[] key) { + return new AeadAes256CbcHmac256EncryptionKey(key, "AES"); + } + + public static AeadAes256CbcHmac256Algorithm instantiateAeadAes256CbcHmac256Algorithm(AeadAes256CbcHmac256EncryptionKey aeadAesKey, + EncryptionType encryptionType, + byte version) { + return new AeadAes256CbcHmac256Algorithm(aeadAesKey, EncryptionType.RANDOMIZED, version); + } + + private static byte[] hexToByteArray(String hex) { + return BaseEncoding.base16().decode(hex); + } + + public static byte[] generatePBEKeySpec(String password) throws NoSuchAlgorithmException, InvalidKeySpecException { + Random random = new Random(); + byte[] salt = new byte[16]; + random.nextBytes(salt); + KeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 65536, 256); // AES-256 + SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"); + byte[] key = secretKeyFactory.generateSecret(spec).getEncoded(); + SecretKeySpec keySpec = new SecretKeySpec(key, "AES"); + return keySpec.getEncoded(); + } + + public static InputStream getResourceAsInputStream(String path) { + return TestUtils.class.getClassLoader().getResourceAsStream(path); + } + + public static byte[] getResourceAsByteArray(String path) { + try { + return ByteStreams.toByteArray(getResourceAsInputStream(path)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static T loadPojo(String path, Class classType) { + try { + return Utils.getSimpleObjectMapper().readValue(getResourceAsByteArray(path), classType); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static DataEncryptionKey createDataEncryptionKey() throws Exception { + byte[] key = TestUtils.generatePBEKeySpec("testPass"); + + AeadAes256CbcHmac256EncryptionKey aeadAesKey = TestUtils.instantiateAeadAes256CbcHmac256EncryptionKey(key); + AeadAes256CbcHmac256Algorithm encryptionAlgorithm = TestUtils.instantiateAeadAes256CbcHmac256Algorithm(aeadAesKey, EncryptionType.RANDOMIZED, (byte) 0x01); + DataEncryptionKey javaDataEncryptionKey = new DataEncryptionKey() { + + @Override + public byte[] getRawKey() { + return key; + } + + @Override + public String getEncryptionAlgorithm() { + return CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED; + } + + @Override + public byte[] encryptData(byte[] plainText) { + return encryptionAlgorithm.encryptData(plainText); + } + + @Override + public byte[] decryptData(byte[] cipherText) { + return encryptionAlgorithm.decryptData(cipherText); + } + }; + return javaDataEncryptionKey; + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/UnixTimestampSerializationTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/UnixTimestampSerializationTest.java new file mode 100644 index 000000000000..39d2258886e7 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/implementation/encryption/UnixTimestampSerializationTest.java @@ -0,0 +1,49 @@ +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.guava27.Strings; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.testng.annotations.Test; + +import java.time.Instant; +import java.util.Objects; + +import static org.assertj.core.api.Assertions.assertThat; + +public class UnixTimestampSerializationTest { + public static class TestDoc { + @JsonProperty("time") + @JsonSerialize(using = UnixTimestampSerializer.class) + @JsonDeserialize(using = UnixTimestampDeserializer.class) + public Instant time; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TestDoc testDoc = (TestDoc) o; + return Objects.equals(time, testDoc.time); + } + + @Override + public int hashCode() { + return Objects.hash(time); + } + } + + @Test(groups = "unit") + public void serialization() throws Exception { + TestDoc testDoc = new TestDoc(); + int epochSeconds = 1587157090; + testDoc.time = Instant.ofEpochSecond(epochSeconds); + + ObjectMapper objectMapper = new ObjectMapper(); + String json = objectMapper.writeValueAsString(testDoc); + assertThat(json).isEqualTo(Strings.lenientFormat("{\"time\":%s}", epochSeconds)); + + TestDoc deserializedTestDoc = objectMapper.readValue(json, TestDoc.class); + assertThat(deserializedTestDoc).isEqualTo(testDoc); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java new file mode 100644 index 000000000000..df2a4fb567a4 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java @@ -0,0 +1,1123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.rx; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.cosmos.BridgeInternal; +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncClientTest; +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.CosmosAsyncUser; +import com.azure.cosmos.CosmosBridgeInternal; +import com.azure.cosmos.CosmosClient; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.CosmosDatabase; +import com.azure.cosmos.CosmosDatabaseForTest; +import com.azure.cosmos.CosmosException; +import com.azure.cosmos.DirectConnectionConfig; +import com.azure.cosmos.GatewayConnectionConfig; +import com.azure.cosmos.TestNGLogListener; +import com.azure.cosmos.ThrottlingRetryOptions; +import com.azure.cosmos.implementation.Configs; +import com.azure.cosmos.implementation.ConnectionPolicy; +import com.azure.cosmos.implementation.InternalObjectNode; +import com.azure.cosmos.implementation.PathParser; +import com.azure.cosmos.implementation.TestConfigurations; +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.directconnectivity.Protocol; +import com.azure.cosmos.implementation.guava25.base.CaseFormat; +import com.azure.cosmos.implementation.guava25.collect.ImmutableList; +import com.azure.cosmos.models.CompositePath; +import com.azure.cosmos.models.CompositePathSortOrder; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.CosmosContainerRequestOptions; +import com.azure.cosmos.models.CosmosDatabaseProperties; +import com.azure.cosmos.models.CosmosDatabaseResponse; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.CosmosStoredProcedureRequestOptions; +import com.azure.cosmos.models.CosmosUserProperties; +import com.azure.cosmos.models.CosmosUserResponse; +import com.azure.cosmos.models.IncludedPath; +import com.azure.cosmos.models.IndexingPolicy; +import com.azure.cosmos.models.ModelBridgeInternal; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.PartitionKeyDefinition; +import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.cosmos.models.ThroughputProperties; +import com.azure.cosmos.util.CosmosPagedFlux; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.mockito.stubbing.Answer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterSuite; +import org.testng.annotations.BeforeSuite; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Listeners; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +import static com.azure.cosmos.BridgeInternal.extractConfigs; +import static com.azure.cosmos.BridgeInternal.injectConfigs; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.spy; + +@Listeners({TestNGLogListener.class}) +public class TestSuiteBase extends CosmosAsyncClientTest { + + private static final int DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL = 500; + private static final ObjectMapper objectMapper = new ObjectMapper(); + + protected static Logger logger = LoggerFactory.getLogger(TestSuiteBase.class.getSimpleName()); + protected static final int TIMEOUT = 40000; + protected static final int FEED_TIMEOUT = 40000; + protected static final int SETUP_TIMEOUT = 60000; + protected static final int SHUTDOWN_TIMEOUT = 24000; + + protected static final int SUITE_SETUP_TIMEOUT = 120000; + protected static final int SUITE_SHUTDOWN_TIMEOUT = 60000; + + protected static final int WAIT_REPLICA_CATCH_UP_IN_MILLIS = 4000; + + protected final static ConsistencyLevel accountConsistency; + protected static final ImmutableList preferredLocations; + private static final ImmutableList desiredConsistencies; + private static final ImmutableList protocols; + + protected static final AzureKeyCredential credential; + + protected int subscriberValidationTimeout = TIMEOUT; + + private static CosmosAsyncDatabase SHARED_DATABASE; + private static CosmosAsyncContainer SHARED_MULTI_PARTITION_COLLECTION_WITH_ID_AS_PARTITION_KEY; + private static CosmosAsyncContainer SHARED_MULTI_PARTITION_COLLECTION; + private static CosmosAsyncContainer SHARED_MULTI_PARTITION_COLLECTION_WITH_COMPOSITE_AND_SPATIAL_INDEXES; + private static CosmosAsyncContainer SHARED_SINGLE_PARTITION_COLLECTION; + + public TestSuiteBase(CosmosClientBuilder clientBuilder) { + super(clientBuilder); + } + + protected static CosmosAsyncDatabase getSharedCosmosDatabase(CosmosAsyncClient client) { + return CosmosBridgeInternal.getCosmosDatabaseWithNewClient(SHARED_DATABASE, client); + } + + protected static CosmosAsyncContainer getSharedMultiPartitionCosmosContainerWithIdAsPartitionKey(CosmosAsyncClient client) { + return CosmosBridgeInternal.getCosmosContainerWithNewClient(SHARED_MULTI_PARTITION_COLLECTION_WITH_ID_AS_PARTITION_KEY, SHARED_DATABASE, client); + } + + protected static CosmosAsyncContainer getSharedMultiPartitionCosmosContainer(CosmosAsyncClient client) { + return CosmosBridgeInternal.getCosmosContainerWithNewClient(SHARED_MULTI_PARTITION_COLLECTION, SHARED_DATABASE, client); + } + + protected static CosmosAsyncContainer getSharedMultiPartitionCosmosContainerWithCompositeAndSpatialIndexes(CosmosAsyncClient client) { + return CosmosBridgeInternal.getCosmosContainerWithNewClient(SHARED_MULTI_PARTITION_COLLECTION_WITH_COMPOSITE_AND_SPATIAL_INDEXES, SHARED_DATABASE, client); + } + + protected static CosmosAsyncContainer getSharedSinglePartitionCosmosContainer(CosmosAsyncClient client) { + return CosmosBridgeInternal.getCosmosContainerWithNewClient(SHARED_SINGLE_PARTITION_COLLECTION, SHARED_DATABASE, client); + } + + static { + accountConsistency = parseConsistency(TestConfigurations.CONSISTENCY); + desiredConsistencies = immutableListOrNull( + ObjectUtils.defaultIfNull(parseDesiredConsistencies(TestConfigurations.DESIRED_CONSISTENCIES), + allEqualOrLowerConsistencies(accountConsistency))); + preferredLocations = immutableListOrNull(parsePreferredLocation(TestConfigurations.PREFERRED_LOCATIONS)); + protocols = ObjectUtils.defaultIfNull(immutableListOrNull(parseProtocols(TestConfigurations.PROTOCOLS)), + ImmutableList.of(Protocol.HTTPS, Protocol.TCP)); + + // Object mapper configurations + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); + objectMapper.configure(JsonParser.Feature.ALLOW_TRAILING_COMMA, true); + objectMapper.configure(JsonParser.Feature.STRICT_DUPLICATE_DETECTION, true); + + credential = new AzureKeyCredential(TestConfigurations.MASTER_KEY); + } + + protected TestSuiteBase() { + logger.debug("Initializing {} ...", this.getClass().getSimpleName()); + } + + private static ImmutableList immutableListOrNull(List list) { + return list != null ? ImmutableList.copyOf(list) : null; + } + + private static class DatabaseManagerImpl implements CosmosDatabaseForTest.DatabaseManager { + public static DatabaseManagerImpl getInstance(CosmosAsyncClient client) { + return new DatabaseManagerImpl(client); + } + + private final CosmosAsyncClient client; + + private DatabaseManagerImpl(CosmosAsyncClient client) { + this.client = client; + } + + @Override + public CosmosPagedFlux queryDatabases(SqlQuerySpec query) { + return client.queryDatabases(query, null); + } + + @Override + public Mono createDatabase(CosmosDatabaseProperties databaseDefinition) { + return client.createDatabase(databaseDefinition); + } + + @Override + public CosmosAsyncDatabase getDatabase(String id) { + return client.getDatabase(id); + } + } + + @BeforeSuite(groups = {"simple", "long", "direct", "multi-master", "encryption", "non-emulator"}, timeOut = SUITE_SETUP_TIMEOUT) + public static void beforeSuite() { + + logger.info("beforeSuite Started"); + + try (CosmosAsyncClient houseKeepingClient = createGatewayHouseKeepingDocumentClient(true).buildAsyncClient()) { + CosmosDatabaseForTest dbForTest = CosmosDatabaseForTest.create(DatabaseManagerImpl.getInstance(houseKeepingClient)); + SHARED_DATABASE = dbForTest.createdDatabase; + CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); + SHARED_MULTI_PARTITION_COLLECTION = createCollection(SHARED_DATABASE, getCollectionDefinitionWithRangeRangeIndex(), options, 10100); + SHARED_MULTI_PARTITION_COLLECTION_WITH_ID_AS_PARTITION_KEY = createCollection(SHARED_DATABASE, getCollectionDefinitionWithRangeRangeIndexWithIdAsPartitionKey(), options, 10100); + SHARED_MULTI_PARTITION_COLLECTION_WITH_COMPOSITE_AND_SPATIAL_INDEXES = createCollection(SHARED_DATABASE, getCollectionDefinitionMultiPartitionWithCompositeAndSpatialIndexes(), options); + SHARED_SINGLE_PARTITION_COLLECTION = createCollection(SHARED_DATABASE, getCollectionDefinitionWithRangeRangeIndex(), options, 6000); + } + } + + @AfterSuite(groups = {"simple", "long", "direct", "multi-master", "encryption", "non-emulator"}, timeOut = SUITE_SHUTDOWN_TIMEOUT) + public static void afterSuite() { + + logger.info("afterSuite Started"); + + try (CosmosAsyncClient houseKeepingClient = createGatewayHouseKeepingDocumentClient(true).buildAsyncClient()) { + safeDeleteDatabase(SHARED_DATABASE); + CosmosDatabaseForTest.cleanupStaleTestDatabases(DatabaseManagerImpl.getInstance(houseKeepingClient)); + } + } + + protected static void truncateCollection(CosmosAsyncContainer cosmosContainer) { + CosmosContainerProperties cosmosContainerProperties = cosmosContainer.read().block().getProperties(); + String cosmosContainerId = cosmosContainerProperties.getId(); + logger.info("Truncating collection {} ...", cosmosContainerId); + List paths = cosmosContainerProperties.getPartitionKeyDefinition().getPaths(); + CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setMaxDegreeOfParallelism(-1); + int maxItemCount = 100; + + logger.info("Truncating collection {} documents ...", cosmosContainer.getId()); + + cosmosContainer.queryItems("SELECT * FROM root", options, InternalObjectNode.class) + .byPage(maxItemCount) + .publishOn(Schedulers.parallel()) + .flatMap(page -> Flux.fromIterable(page.getResults())) + .flatMap(doc -> { + + PartitionKey partitionKey = null; + + Object propertyValue = null; + if (paths != null && !paths.isEmpty()) { + List pkPath = PathParser.getPathParts(paths.get(0)); + propertyValue = ModelBridgeInternal.getObjectByPathFromJsonSerializable(doc, pkPath); + if (propertyValue == null) { + partitionKey = PartitionKey.NONE; + } else { + partitionKey = new PartitionKey(propertyValue); + } + } else { + partitionKey = new PartitionKey(null); + } + + return cosmosContainer.deleteItem(doc.getId(), partitionKey); + }).then().block(); + logger.info("Truncating collection {} triggers ...", cosmosContainerId); + + cosmosContainer.getScripts().queryTriggers("SELECT * FROM root", options) + .byPage(maxItemCount) + .publishOn(Schedulers.parallel()) + .flatMap(page -> Flux.fromIterable(page.getResults())) + .flatMap(trigger -> { +// if (paths != null && !paths.isEmpty()) { +// Object propertyValue = trigger.getObjectByPath(PathParser.getPathParts(paths.get(0))); +// requestOptions.partitionKey(new PartitionKey(propertyValue)); +// Object propertyValue = getTrigger.getObjectByPath(PathParser.getPathParts(getPaths.get(0))); +// requestOptions.getPartitionKey(new PartitionKey(propertyValue)); +// } + + return cosmosContainer.getScripts().getTrigger(trigger.getId()).delete(); + }).then().block(); + + logger.info("Truncating collection {} storedProcedures ...", cosmosContainerId); + + cosmosContainer.getScripts().queryStoredProcedures("SELECT * FROM root", options) + .byPage(maxItemCount) + .publishOn(Schedulers.parallel()) + .flatMap(page -> Flux.fromIterable(page.getResults())) + .flatMap(storedProcedure -> { + +// if (getPaths != null && !getPaths.isEmpty()) { +// if (paths != null && !paths.isEmpty()) { +// Object propertyValue = storedProcedure.getObjectByPath(PathParser.getPathParts(paths.get(0))); +// requestOptions.partitionKey(new PartitionKey(propertyValue)); +// requestOptions.getPartitionKey(new PartitionKey(propertyValue)); +// } + + return cosmosContainer.getScripts().getStoredProcedure(storedProcedure.getId()).delete(new CosmosStoredProcedureRequestOptions()); + }).then().block(); + + logger.info("Truncating collection {} udfs ...", cosmosContainerId); + + cosmosContainer.getScripts().queryUserDefinedFunctions("SELECT * FROM root", options) + .byPage(maxItemCount) + .publishOn(Schedulers.parallel()) + .flatMap(page -> Flux.fromIterable(page.getResults())) + .flatMap(udf -> { + +// if (getPaths != null && !getPaths.isEmpty()) { +// if (paths != null && !paths.isEmpty()) { +// Object propertyValue = udf.getObjectByPath(PathParser.getPathParts(paths.get(0))); +// requestOptions.partitionKey(new PartitionKey(propertyValue)); +// requestOptions.getPartitionKey(new PartitionKey(propertyValue)); +// } + + return cosmosContainer.getScripts().getUserDefinedFunction(udf.getId()).delete(); + }).then().block(); + + logger.info("Finished truncating collection {}.", cosmosContainerId); + } + + @SuppressWarnings({"fallthrough"}) + protected static void waitIfNeededForReplicasToCatchUp(CosmosClientBuilder clientBuilder) { + switch (CosmosBridgeInternal.getConsistencyLevel(clientBuilder)) { + case EVENTUAL: + case CONSISTENT_PREFIX: + logger.info(" additional wait in EVENTUAL mode so the replica catch up"); + // give times to replicas to catch up after a write + try { + TimeUnit.MILLISECONDS.sleep(WAIT_REPLICA_CATCH_UP_IN_MILLIS); + } catch (Exception e) { + logger.error("unexpected failure", e); + } + + case SESSION: + case BOUNDED_STALENESS: + case STRONG: + default: + break; + } + } + + public static CosmosAsyncContainer createCollection(CosmosAsyncDatabase database, CosmosContainerProperties cosmosContainerProperties, + CosmosContainerRequestOptions options, int throughput) { + database.createContainer(cosmosContainerProperties, ThroughputProperties.createManualThroughput(throughput), options).block(); + return database.getContainer(cosmosContainerProperties.getId()); + } + + public static CosmosAsyncContainer createCollection(CosmosAsyncDatabase database, CosmosContainerProperties cosmosContainerProperties, + CosmosContainerRequestOptions options) { + database.createContainer(cosmosContainerProperties, options).block(); + return database.getContainer(cosmosContainerProperties.getId()); + } + + private static CosmosContainerProperties getCollectionDefinitionMultiPartitionWithCompositeAndSpatialIndexes() { + final String NUMBER_FIELD = "numberField"; + final String STRING_FIELD = "stringField"; + final String NUMBER_FIELD_2 = "numberField2"; + final String STRING_FIELD_2 = "stringField2"; + final String BOOL_FIELD = "boolField"; + final String NULL_FIELD = "nullField"; + final String OBJECT_FIELD = "objectField"; + final String ARRAY_FIELD = "arrayField"; + final String SHORT_STRING_FIELD = "shortStringField"; + final String MEDIUM_STRING_FIELD = "mediumStringField"; + final String LONG_STRING_FIELD = "longStringField"; + final String PARTITION_KEY = "pk"; + + PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); + ArrayList partitionKeyPaths = new ArrayList(); + partitionKeyPaths.add("/" + PARTITION_KEY); + partitionKeyDefinition.setPaths(partitionKeyPaths); + + CosmosContainerProperties cosmosContainerProperties = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDefinition); + + IndexingPolicy indexingPolicy = new IndexingPolicy(); + List> compositeIndexes = new ArrayList<>(); + + //Simple + ArrayList compositeIndexSimple = new ArrayList(); + CompositePath compositePath1 = new CompositePath(); + compositePath1.setPath("/" + NUMBER_FIELD); + compositePath1.setOrder(CompositePathSortOrder.ASCENDING); + + CompositePath compositePath2 = new CompositePath(); + compositePath2.setPath("/" + STRING_FIELD); + compositePath2.setOrder(CompositePathSortOrder.DESCENDING); + + compositeIndexSimple.add(compositePath1); + compositeIndexSimple.add(compositePath2); + + //Max Columns + ArrayList compositeIndexMaxColumns = new ArrayList(); + CompositePath compositePath3 = new CompositePath(); + compositePath3.setPath("/" + NUMBER_FIELD); + compositePath3.setOrder(CompositePathSortOrder.DESCENDING); + + CompositePath compositePath4 = new CompositePath(); + compositePath4.setPath("/" + STRING_FIELD); + compositePath4.setOrder(CompositePathSortOrder.ASCENDING); + + CompositePath compositePath5 = new CompositePath(); + compositePath5.setPath("/" + NUMBER_FIELD_2); + compositePath5.setOrder(CompositePathSortOrder.DESCENDING); + + CompositePath compositePath6 = new CompositePath(); + compositePath6.setPath("/" + STRING_FIELD_2); + compositePath6.setOrder(CompositePathSortOrder.ASCENDING); + + compositeIndexMaxColumns.add(compositePath3); + compositeIndexMaxColumns.add(compositePath4); + compositeIndexMaxColumns.add(compositePath5); + compositeIndexMaxColumns.add(compositePath6); + + //Primitive Values + ArrayList compositeIndexPrimitiveValues = new ArrayList(); + CompositePath compositePath7 = new CompositePath(); + compositePath7.setPath("/" + NUMBER_FIELD); + compositePath7.setOrder(CompositePathSortOrder.DESCENDING); + + CompositePath compositePath8 = new CompositePath(); + compositePath8.setPath("/" + STRING_FIELD); + compositePath8.setOrder(CompositePathSortOrder.ASCENDING); + + CompositePath compositePath9 = new CompositePath(); + compositePath9.setPath("/" + BOOL_FIELD); + compositePath9.setOrder(CompositePathSortOrder.DESCENDING); + + CompositePath compositePath10 = new CompositePath(); + compositePath10.setPath("/" + NULL_FIELD); + compositePath10.setOrder(CompositePathSortOrder.ASCENDING); + + compositeIndexPrimitiveValues.add(compositePath7); + compositeIndexPrimitiveValues.add(compositePath8); + compositeIndexPrimitiveValues.add(compositePath9); + compositeIndexPrimitiveValues.add(compositePath10); + + //Long Strings + ArrayList compositeIndexLongStrings = new ArrayList(); + CompositePath compositePath11 = new CompositePath(); + compositePath11.setPath("/" + STRING_FIELD); + + CompositePath compositePath12 = new CompositePath(); + compositePath12.setPath("/" + SHORT_STRING_FIELD); + + CompositePath compositePath13 = new CompositePath(); + compositePath13.setPath("/" + MEDIUM_STRING_FIELD); + + CompositePath compositePath14 = new CompositePath(); + compositePath14.setPath("/" + LONG_STRING_FIELD); + + compositeIndexLongStrings.add(compositePath11); + compositeIndexLongStrings.add(compositePath12); + compositeIndexLongStrings.add(compositePath13); + compositeIndexLongStrings.add(compositePath14); + + compositeIndexes.add(compositeIndexSimple); + compositeIndexes.add(compositeIndexMaxColumns); + compositeIndexes.add(compositeIndexPrimitiveValues); + compositeIndexes.add(compositeIndexLongStrings); + + indexingPolicy.setCompositeIndexes(compositeIndexes); + cosmosContainerProperties.setIndexingPolicy(indexingPolicy); + + return cosmosContainerProperties; + } + + public static CosmosAsyncContainer createCollection(CosmosAsyncClient client, String dbId, CosmosContainerProperties collectionDefinition) { + CosmosAsyncDatabase database = client.getDatabase(dbId); + database.createContainer(collectionDefinition).block(); + return database.getContainer(collectionDefinition.getId()); + } + + public static void deleteCollection(CosmosAsyncClient client, String dbId, String collectionId) { + client.getDatabase(dbId).getContainer(collectionId).delete().block(); + } + + public static InternalObjectNode createDocument(CosmosAsyncContainer cosmosContainer, InternalObjectNode item) { + return BridgeInternal.getProperties(cosmosContainer.createItem(item).block()); + } + + public Flux> bulkInsert(CosmosAsyncContainer cosmosContainer, + List documentDefinitionList, + int concurrencyLevel) { + List>> result = + new ArrayList<>(documentDefinitionList.size()); + for (T docDef : documentDefinitionList) { + result.add(cosmosContainer.createItem(docDef)); + } + + return Flux.merge(Flux.fromIterable(result), concurrencyLevel); + } + public List bulkInsertBlocking(CosmosAsyncContainer cosmosContainer, + List documentDefinitionList) { + return bulkInsert(cosmosContainer, documentDefinitionList, DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL) + .publishOn(Schedulers.parallel()) + .map(itemResponse -> itemResponse.getItem()) + .collectList() + .block(); + } + + public void voidBulkInsertBlocking(CosmosAsyncContainer cosmosContainer, + List documentDefinitionList) { + bulkInsert(cosmosContainer, documentDefinitionList, DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL) + .publishOn(Schedulers.parallel()) + .map(itemResponse -> BridgeInternal.getProperties(itemResponse)) + .then() + .block(); + } + + public static CosmosAsyncUser createUser(CosmosAsyncClient client, String databaseId, CosmosUserProperties userSettings) { + CosmosAsyncDatabase database = client.getDatabase(databaseId); + CosmosUserResponse userResponse = database.createUser(userSettings).block(); + return database.getUser(userResponse.getProperties().getId()); + } + + public static CosmosAsyncUser safeCreateUser(CosmosAsyncClient client, String databaseId, CosmosUserProperties user) { + deleteUserIfExists(client, databaseId, user.getId()); + return createUser(client, databaseId, user); + } + + private static CosmosAsyncContainer safeCreateCollection(CosmosAsyncClient client, String databaseId, CosmosContainerProperties collection, CosmosContainerRequestOptions options) { + deleteCollectionIfExists(client, databaseId, collection.getId()); + return createCollection(client.getDatabase(databaseId), collection, options); + } + + static protected CosmosContainerProperties getCollectionDefinition() { + PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); + ArrayList paths = new ArrayList(); + paths.add("/mypk"); + partitionKeyDef.setPaths(paths); + + CosmosContainerProperties collectionDefinition = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); + + return collectionDefinition; + } + + static protected CosmosContainerProperties getCollectionDefinitionWithRangeRangeIndexWithIdAsPartitionKey() { + return getCollectionDefinitionWithRangeRangeIndex(Collections.singletonList("/id")); + } + + static protected CosmosContainerProperties getCollectionDefinitionWithRangeRangeIndex() { + return getCollectionDefinitionWithRangeRangeIndex(Collections.singletonList("/mypk")); + } + + static protected CosmosContainerProperties getCollectionDefinitionWithRangeRangeIndex(List partitionKeyPath) { + PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); + + partitionKeyDef.setPaths(partitionKeyPath); + IndexingPolicy indexingPolicy = new IndexingPolicy(); + List includedPaths = new ArrayList<>(); + IncludedPath includedPath = new IncludedPath("/*"); + includedPaths.add(includedPath); + indexingPolicy.setIncludedPaths(includedPaths); + + CosmosContainerProperties cosmosContainerProperties = new CosmosContainerProperties(UUID.randomUUID().toString(), partitionKeyDef); + cosmosContainerProperties.setIndexingPolicy(indexingPolicy); + + return cosmosContainerProperties; + } + + public static void deleteCollectionIfExists(CosmosAsyncClient client, String databaseId, String collectionId) { + CosmosAsyncDatabase database = client.getDatabase(databaseId); + database.read().block(); + List res = database.queryContainers(String.format("SELECT * FROM root r where r.id = '%s'", collectionId), null) + .collectList() + .block(); + + if (!res.isEmpty()) { + deleteCollection(database, collectionId); + } + } + + public static void deleteCollection(CosmosAsyncDatabase cosmosDatabase, String collectionId) { + cosmosDatabase.getContainer(collectionId).delete().block(); + } + + public static void deleteCollection(CosmosAsyncContainer cosmosContainer) { + cosmosContainer.delete().block(); + } + + public static void deleteDocumentIfExists(CosmosAsyncClient client, String databaseId, String collectionId, String docId) { + CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setPartitionKey(new PartitionKey(docId)); + CosmosAsyncContainer cosmosContainer = client.getDatabase(databaseId).getContainer(collectionId); + + List res = cosmosContainer + .queryItems(String.format("SELECT * FROM root r where r.id = '%s'", docId), options, InternalObjectNode.class) + .byPage() + .flatMap(page -> Flux.fromIterable(page.getResults())) + .collectList().block(); + + if (!res.isEmpty()) { + deleteDocument(cosmosContainer, docId); + } + } + + public static void safeDeleteDocument(CosmosAsyncContainer cosmosContainer, String documentId, Object partitionKey) { + if (cosmosContainer != null && documentId != null) { + try { + cosmosContainer.deleteItem(documentId, new PartitionKey(partitionKey)).block(); + } catch (Exception e) { + CosmosException dce = Utils.as(e, CosmosException.class); + if (dce == null || dce.getStatusCode() != 404) { + throw e; + } + } + } + } + + public static void deleteDocument(CosmosAsyncContainer cosmosContainer, String documentId) { + cosmosContainer.deleteItem(documentId, PartitionKey.NONE).block(); + } + + public static void deleteUserIfExists(CosmosAsyncClient client, String databaseId, String userId) { + CosmosAsyncDatabase database = client.getDatabase(databaseId); + client.getDatabase(databaseId).read().block(); + List res = database + .queryUsers(String.format("SELECT * FROM root r where r.id = '%s'", userId), null) + .collectList().block(); + if (!res.isEmpty()) { + deleteUser(database, userId); + } + } + + public static void deleteUser(CosmosAsyncDatabase database, String userId) { + database.getUser(userId).delete().block(); + } + + static private CosmosAsyncDatabase safeCreateDatabase(CosmosAsyncClient client, CosmosDatabaseProperties databaseSettings) { + safeDeleteDatabase(client.getDatabase(databaseSettings.getId())); + client.createDatabase(databaseSettings).block(); + return client.getDatabase(databaseSettings.getId()); + } + + static protected CosmosAsyncDatabase createDatabase(CosmosAsyncClient client, String databaseId) { + CosmosDatabaseProperties databaseSettings = new CosmosDatabaseProperties(databaseId); + client.createDatabase(databaseSettings).block(); + return client.getDatabase(databaseSettings.getId()); + } + + static protected CosmosDatabase createSyncDatabase(CosmosClient client, String databaseId) { + CosmosDatabaseProperties databaseSettings = new CosmosDatabaseProperties(databaseId); + try { + client.createDatabase(databaseSettings); + return client.getDatabase(databaseSettings.getId()); + } catch (CosmosException e) { + e.printStackTrace(); + } + return null; + } + + static protected CosmosAsyncDatabase createDatabaseIfNotExists(CosmosAsyncClient client, String databaseId) { + List res = client.queryDatabases(String.format("SELECT * FROM r where r.id = '%s'", databaseId), null) + .collectList() + .block(); + if (res.size() != 0) { + CosmosAsyncDatabase database = client.getDatabase(databaseId); + database.read().block(); + return database; + } else { + CosmosDatabaseProperties databaseSettings = new CosmosDatabaseProperties(databaseId); + client.createDatabase(databaseSettings).block(); + return client.getDatabase(databaseSettings.getId()); + } + } + + static protected void safeDeleteDatabase(CosmosAsyncDatabase database) { + if (database != null) { + try { + database.delete().block(); + } catch (Exception e) { + } + } + } + + static protected void safeDeleteSyncDatabase(CosmosDatabase database) { + if (database != null) { + try { + logger.info("attempting to delete database ...."); + database.delete(); + logger.info("database deletion completed"); + } catch (Exception e) { + logger.error("failed to delete sync database", e); + } + } + } + + static protected void safeDeleteAllCollections(CosmosAsyncDatabase database) { + if (database != null) { + List collections = database.readAllContainers() + .collectList() + .block(); + + for(CosmosContainerProperties collection: collections) { + database.getContainer(collection.getId()).delete().block(); + } + } + } + + static protected void safeDeleteCollection(CosmosAsyncContainer collection) { + if (collection != null) { + try { + collection.delete().block(); + } catch (Exception e) { + } + } + } + + static protected void safeDeleteCollection(CosmosAsyncDatabase database, String collectionId) { + if (database != null && collectionId != null) { + try { + database.getContainer(collectionId).delete().block(); + } catch (Exception e) { + } + } + } + + static protected void safeCloseAsync(CosmosAsyncClient client) { + if (client != null) { + new Thread(() -> { + try { + client.close(); + } catch (Exception e) { + logger.error("failed to close client", e); + } + }).start(); + } + } + + static protected void safeClose(CosmosAsyncClient client) { + if (client != null) { + try { + client.close(); + } catch (Exception e) { + logger.error("failed to close client", e); + } + } + } + + static protected void safeCloseSyncClient(CosmosClient client) { + if (client != null) { + try { + logger.info("closing client ..."); + client.close(); + logger.info("closing client completed"); + } catch (Exception e) { + logger.error("failed to close client", e); + } + } + } + +// @SuppressWarnings("rawtypes") +// public void validateSuccess(Mono single, CosmosResponseValidator validator) { +// validateSuccess(single, validator, subscriberValidationTimeout); +// } +// +// @SuppressWarnings("rawtypes") +// public void validateSuccess(Mono single, CosmosResponseValidator validator, long timeout) { +// validateSuccess(single.flux(), validator, timeout); +// } +// +// @SuppressWarnings("rawtypes") +// public static void validateSuccess(Flux flowable, +// CosmosResponseValidator validator, long timeout) { +// +// TestSubscriber testSubscriber = new TestSubscriber<>(); +// +// flowable.subscribe(testSubscriber); +// testSubscriber.awaitTerminalEvent(timeout, TimeUnit.MILLISECONDS); +// testSubscriber.assertNoErrors(); +// testSubscriber.assertComplete(); +// testSubscriber.assertValueCount(1); +// validator.validate(testSubscriber.values().get(0)); +// } +// +// @SuppressWarnings("rawtypes") +// public void validateFailure(Mono mono, FailureValidator validator) +// throws InterruptedException { +// validateFailure(mono.flux(), validator, subscriberValidationTimeout); +// } +// +// @SuppressWarnings("rawtypes") +// public static void validateFailure(Flux flowable, +// FailureValidator validator, long timeout) throws InterruptedException { +// +// TestSubscriber testSubscriber = new TestSubscriber<>(); +// +// flowable.subscribe(testSubscriber); +// testSubscriber.awaitTerminalEvent(timeout, TimeUnit.MILLISECONDS); +// testSubscriber.assertNotComplete(); +// testSubscriber.assertTerminated(); +// assertThat(testSubscriber.errors()).hasSize(1); +// validator.validate((Throwable) testSubscriber.getEvents().get(1).get(0)); +// } +// +// @SuppressWarnings("rawtypes") +// public void validateItemSuccess( +// Mono responseMono, CosmosItemResponseValidator validator) { +// +// TestSubscriber testSubscriber = new TestSubscriber<>(); +// responseMono.subscribe(testSubscriber); +// testSubscriber.awaitTerminalEvent(subscriberValidationTimeout, TimeUnit.MILLISECONDS); +// testSubscriber.assertNoErrors(); +// testSubscriber.assertComplete(); +// testSubscriber.assertValueCount(1); +// validator.validate(testSubscriber.values().get(0)); +// } +// +// @SuppressWarnings("rawtypes") +// public void validateItemFailure( +// Mono responseMono, FailureValidator validator) { +// TestSubscriber testSubscriber = new TestSubscriber<>(); +// responseMono.subscribe(testSubscriber); +// testSubscriber.awaitTerminalEvent(subscriberValidationTimeout, TimeUnit.MILLISECONDS); +// testSubscriber.assertNotComplete(); +// testSubscriber.assertTerminated(); +// assertThat(testSubscriber.errors()).hasSize(1); +// validator.validate((Throwable) testSubscriber.getEvents().get(1).get(0)); +// } +// +// public void validateQuerySuccess(Flux> flowable, +// FeedResponseListValidator validator) { +// validateQuerySuccess(flowable, validator, subscriberValidationTimeout); +// } +// +// public static void validateQuerySuccess(Flux> flowable, +// FeedResponseListValidator validator, long timeout) { +// +// TestSubscriber> testSubscriber = new TestSubscriber<>(); +// +// flowable.subscribe(testSubscriber); +// testSubscriber.awaitTerminalEvent(timeout, TimeUnit.MILLISECONDS); +// testSubscriber.assertNoErrors(); +// testSubscriber.assertComplete(); +// validator.validate(testSubscriber.values()); +// } +// +// public void validateQueryFailure(Flux> flowable, FailureValidator validator) { +// validateQueryFailure(flowable, validator, subscriberValidationTimeout); +// } +// +// public static void validateQueryFailure(Flux> flowable, +// FailureValidator validator, long timeout) { +// +// TestSubscriber> testSubscriber = new TestSubscriber<>(); +// +// flowable.subscribe(testSubscriber); +// testSubscriber.awaitTerminalEvent(timeout, TimeUnit.MILLISECONDS); +// testSubscriber.assertNotComplete(); +// testSubscriber.assertTerminated(); +// assertThat(testSubscriber.getEvents().get(1)).hasSize(1); +// validator.validate((Throwable) testSubscriber.getEvents().get(1).get(0)); +// } + + @DataProvider + public static Object[][] clientBuilders() { + return new Object[][]{{createGatewayRxDocumentClient(ConsistencyLevel.SESSION, false, null, true)}}; + } + + @DataProvider + public static Object[][] clientBuildersWithSessionConsistency() { + return new Object[][]{ + {createDirectRxDocumentClient(ConsistencyLevel.SESSION, Protocol.HTTPS, false, null, true)}, + {createDirectRxDocumentClient(ConsistencyLevel.SESSION, Protocol.TCP, false, null, true)}, + {createGatewayRxDocumentClient(ConsistencyLevel.SESSION, false, null, true)} + }; + } + + static ConsistencyLevel parseConsistency(String consistency) { + if (consistency != null) { + consistency = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, consistency).trim(); + return ConsistencyLevel.valueOf(consistency); + } + + logger.error("INVALID configured test consistency [{}].", consistency); + throw new IllegalStateException("INVALID configured test consistency " + consistency); + } + + static List parsePreferredLocation(String preferredLocations) { + if (StringUtils.isEmpty(preferredLocations)) { + return null; + } + + try { + return objectMapper.readValue(preferredLocations, new TypeReference>() { + }); + } catch (Exception e) { + logger.error("INVALID configured test preferredLocations [{}].", preferredLocations); + throw new IllegalStateException("INVALID configured test preferredLocations " + preferredLocations); + } + } + + static List parseProtocols(String protocols) { + if (StringUtils.isEmpty(protocols)) { + return null; + } + List protocolList = new ArrayList<>(); + try { + List protocolStrings = objectMapper.readValue(protocols, new TypeReference>() { + }); + for(String protocol : protocolStrings) { + protocolList.add(Protocol.valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, protocol))); + } + return protocolList; + } catch (Exception e) { + logger.error("INVALID configured test protocols [{}].", protocols); + throw new IllegalStateException("INVALID configured test protocols " + protocols); + } + } + + @DataProvider + public static Object[][] simpleClientBuildersWithDirect() { + return simpleClientBuildersWithDirect(true, toArray(protocols)); + } + + @DataProvider + public static Object[][] simpleClientBuildersWithDirectHttps() { + return simpleClientBuildersWithDirect(true, Protocol.HTTPS); + } + + @DataProvider + public static Object[][] simpleClientBuildersWithDirectTcp() { + return simpleClientBuildersWithDirect(true, Protocol.TCP); + } + + @DataProvider + public static Object[][] simpleClientBuildersWithDirectTcpWithContentResponseOnWriteDisabled() { + return simpleClientBuildersWithDirect(false, Protocol.TCP); + } + + private static Object[][] simpleClientBuildersWithDirect(boolean contentResponseOnWriteEnabled, Protocol... protocols) { + logger.info("Max test consistency to use is [{}]", accountConsistency); + List testConsistencies = ImmutableList.of(ConsistencyLevel.EVENTUAL); + + boolean isMultiMasterEnabled = preferredLocations != null && accountConsistency == ConsistencyLevel.SESSION; + + List cosmosConfigurations = new ArrayList<>(); + + for (Protocol protocol : protocols) { + testConsistencies.forEach(consistencyLevel -> cosmosConfigurations.add(createDirectRxDocumentClient( + consistencyLevel, + protocol, + isMultiMasterEnabled, + preferredLocations, + contentResponseOnWriteEnabled))); + } + + cosmosConfigurations.forEach(c -> { + ConnectionPolicy connectionPolicy = CosmosBridgeInternal.getConnectionPolicy(c); + ConsistencyLevel consistencyLevel = CosmosBridgeInternal.getConsistencyLevel(c); + logger.info("Will Use ConnectionMode [{}], Consistency [{}], Protocol [{}]", + connectionPolicy.getConnectionMode(), + consistencyLevel, + extractConfigs(c).getProtocol() + ); + }); + + cosmosConfigurations.add(createGatewayRxDocumentClient(ConsistencyLevel.SESSION, false, null, contentResponseOnWriteEnabled)); + + return cosmosConfigurations.stream().map(b -> new Object[]{b}).collect(Collectors.toList()).toArray(new Object[0][]); + } + + @DataProvider + public static Object[][] clientBuildersWithDirect() { + return clientBuildersWithDirectAllConsistencies(true, toArray(protocols)); + } + + @DataProvider + public static Object[][] clientBuildersWithDirectHttps() { + return clientBuildersWithDirectAllConsistencies(true, Protocol.HTTPS); + } + + @DataProvider + public static Object[][] clientBuildersWithDirectTcp() { + return clientBuildersWithDirectAllConsistencies(true, Protocol.TCP); + } + + @DataProvider + public static Object[][] clientBuildersWithDirectTcpWithContentResponseOnWriteDisabled() { + return clientBuildersWithDirectAllConsistencies(false, Protocol.TCP); + } + + @DataProvider + public static Object[][] clientBuildersWithDirectSession() { + return clientBuildersWithDirectSession(true, toArray(protocols)); + } + + static Protocol[] toArray(List protocols) { + return protocols.toArray(new Protocol[protocols.size()]); + } + + private static Object[][] clientBuildersWithDirectSession(boolean contentResponseOnWriteEnabled, Protocol... protocols) { + return clientBuildersWithDirect(new ArrayList() {{ + add(ConsistencyLevel.SESSION); + }}, contentResponseOnWriteEnabled, protocols); + } + + private static Object[][] clientBuildersWithDirectAllConsistencies(boolean contentResponseOnWriteEnabled, Protocol... protocols) { + logger.info("Max test consistency to use is [{}]", accountConsistency); + return clientBuildersWithDirect(desiredConsistencies, contentResponseOnWriteEnabled, protocols); + } + + static List parseDesiredConsistencies(String consistencies) { + if (StringUtils.isEmpty(consistencies)) { + return null; + } + List consistencyLevels = new ArrayList<>(); + try { + List consistencyStrings = objectMapper.readValue(consistencies, new TypeReference>() {}); + for(String consistency : consistencyStrings) { + consistencyLevels.add(ConsistencyLevel.valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, consistency))); + } + return consistencyLevels; + } catch (Exception e) { + logger.error("INVALID consistency test desiredConsistencies [{}].", consistencies); + throw new IllegalStateException("INVALID configured test desiredConsistencies " + consistencies); + } + } + + @SuppressWarnings("fallthrough") + static List allEqualOrLowerConsistencies(ConsistencyLevel accountConsistency) { + List testConsistencies = new ArrayList<>(); + switch (accountConsistency) { + + case STRONG: + testConsistencies.add(ConsistencyLevel.STRONG); + case BOUNDED_STALENESS: + testConsistencies.add(ConsistencyLevel.BOUNDED_STALENESS); + case SESSION: + testConsistencies.add(ConsistencyLevel.SESSION); + case CONSISTENT_PREFIX: + testConsistencies.add(ConsistencyLevel.CONSISTENT_PREFIX); + case EVENTUAL: + testConsistencies.add(ConsistencyLevel.EVENTUAL); + break; + default: + throw new IllegalStateException("INVALID configured test consistency " + accountConsistency); + } + return testConsistencies; + } + + private static Object[][] clientBuildersWithDirect(List testConsistencies, boolean contentResponseOnWriteEnabled, Protocol... protocols) { + boolean isMultiMasterEnabled = preferredLocations != null && accountConsistency == ConsistencyLevel.SESSION; + + List cosmosConfigurations = new ArrayList<>(); + + for (Protocol protocol : protocols) { + testConsistencies.forEach(consistencyLevel -> cosmosConfigurations.add(createDirectRxDocumentClient(consistencyLevel, + protocol, + isMultiMasterEnabled, + preferredLocations, + contentResponseOnWriteEnabled))); + } + + cosmosConfigurations.forEach(c -> { + ConnectionPolicy connectionPolicy = CosmosBridgeInternal.getConnectionPolicy(c); + ConsistencyLevel consistencyLevel = CosmosBridgeInternal.getConsistencyLevel(c); + logger.info("Will Use ConnectionMode [{}], Consistency [{}], Protocol [{}]", + connectionPolicy.getConnectionMode(), + consistencyLevel, + extractConfigs(c).getProtocol() + ); + }); + + cosmosConfigurations.add(createGatewayRxDocumentClient(ConsistencyLevel.SESSION, isMultiMasterEnabled, preferredLocations, contentResponseOnWriteEnabled)); + + return cosmosConfigurations.stream().map(c -> new Object[]{c}).collect(Collectors.toList()).toArray(new Object[0][]); + } + + static protected CosmosClientBuilder createGatewayHouseKeepingDocumentClient(boolean contentResponseOnWriteEnabled) { + ThrottlingRetryOptions options = new ThrottlingRetryOptions(); + options.setMaxRetryWaitTime(Duration.ofSeconds(SUITE_SETUP_TIMEOUT)); + GatewayConnectionConfig gatewayConnectionConfig = new GatewayConnectionConfig(); + return new CosmosClientBuilder().endpoint(TestConfigurations.HOST) + .credential(credential) + .gatewayMode(gatewayConnectionConfig) + .throttlingRetryOptions(options) + .contentResponseOnWriteEnabled(contentResponseOnWriteEnabled) + .consistencyLevel(ConsistencyLevel.SESSION); + } + + static protected CosmosClientBuilder createGatewayRxDocumentClient(ConsistencyLevel consistencyLevel, boolean multiMasterEnabled, + List preferredRegions, boolean contentResponseOnWriteEnabled) { + GatewayConnectionConfig gatewayConnectionConfig = new GatewayConnectionConfig(); + return new CosmosClientBuilder().endpoint(TestConfigurations.HOST) + .credential(credential) + .gatewayMode(gatewayConnectionConfig) + .multipleWriteRegionsEnabled(multiMasterEnabled) + .preferredRegions(preferredRegions) + .contentResponseOnWriteEnabled(contentResponseOnWriteEnabled) + .consistencyLevel(consistencyLevel); + } + + static protected CosmosClientBuilder createGatewayRxDocumentClient() { + return createGatewayRxDocumentClient(ConsistencyLevel.SESSION, false, null, true); + } + + static protected CosmosClientBuilder createDirectRxDocumentClient(ConsistencyLevel consistencyLevel, + Protocol protocol, + boolean multiMasterEnabled, + List preferredRegions, + boolean contentResponseOnWriteEnabled) { + CosmosClientBuilder builder = new CosmosClientBuilder().endpoint(TestConfigurations.HOST) + .credential(credential) + .directMode(DirectConnectionConfig.getDefaultConfig()) + .contentResponseOnWriteEnabled(contentResponseOnWriteEnabled) + .consistencyLevel(consistencyLevel); + if (preferredRegions != null) { + builder.preferredRegions(preferredRegions); + } + + if (multiMasterEnabled && consistencyLevel == ConsistencyLevel.SESSION) { + builder.multipleWriteRegionsEnabled(true); + } + + Configs configs = spy(new Configs()); + doAnswer((Answer)invocation -> protocol).when(configs).getProtocol(); + + return injectConfigs(builder, configs); + } + + protected int expectedNumberOfPages(int totalExpectedResult, int maxPageSize) { + return Math.max((totalExpectedResult + maxPageSize - 1 ) / maxPageSize, 1); + } + + @DataProvider(name = "queryMetricsArgProvider") + public Object[][] queryMetricsArgProvider() { + return new Object[][]{ + {true}, + {false}, + }; + } + + public static CosmosClientBuilder copyCosmosClientBuilder(CosmosClientBuilder builder) { + return CosmosBridgeInternal.cloneCosmosClientBuilder(builder); + } +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/direct-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/direct-testng.xml new file mode 100644 index 000000000000..ab1bebd6701e --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/direct-testng.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/e2e-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/e2e-testng.xml new file mode 100644 index 000000000000..5a882b76bc62 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/e2e-testng.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/emulator-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/emulator-testng.xml new file mode 100644 index 000000000000..042b8527fef4 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/emulator-testng.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption-testng.xml new file mode 100644 index 000000000000..bd1c2ac785a2 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption-testng.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/DataEncryptionKeyProperties.json b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/DataEncryptionKeyProperties.json new file mode 100644 index 000000000000..1b3b95bb17f4 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/DataEncryptionKeyProperties.json @@ -0,0 +1,15 @@ +{ + "id": "mydek", + "encryptionAlgorithm": "AEAes256CbcHmacSha256Randomized", + "wrappedDataEncryptionKey": "6JA4qWfHgxVYZlrFlM6ol5kdYzQC8pzHZ2cJF17dZf4=", + "keyWrapMetadata": { + "type": "custom", + "value": "metadata1updated" + }, + "createTime": 1587096167, + "_rid": "YJIgAPkqHVYBAAAAAAAAAA==", + "_self": "dbs/YJIgAA==/colls/YJIgAPkqHVY=/docs/YJIgAPkqHVYBAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-146d-0e494cde01d6\"", + "_attachments": "attachments/", + "_ts": 1587096167 +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/EncryptedPOCO.json b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/EncryptedPOCO.json new file mode 100644 index 000000000000..06d64adbd150 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/EncryptedPOCO.json @@ -0,0 +1,16 @@ +{ + "id": "46df58fe-0781-4c8c-b844-1cd49c9f41a6", + "PK": "652a5b30-bdfa-4ae7-b62c-4a528736cd4a", + "NonSensitive": "502a226d-1dd2-4107-8bb0-570f0aa1bdcf", + "_ei": { + "_ef": 2, + "_en": "mydek", + "_ea": "AEAes256CbcHmacSha256Randomized", + "_ed": "ASM9gn6FvVWdU5r2SCkqeugzGz04/ZkOEQNLBOcmYsbCclkRXPAasSNfrta5WZ+9BB6hNOlODTTbg4qNYILRkg8Fj8xHaQiYbKD1G9Sepvpy4HqkSTERJOMnuP/BSPT8KBX3ihEdE51QtZw4iwaQ1BPHP9R8Mr4yTnrak7NNAjYfunLUMpdojm6fob/NUFb+S3EMqUjZS/tVLLOhm510tCdK520W4RFEauPEZTVKXgR3lj4+BkYrbn2wpY6Y+s6CAc/e+rf31SGWRWzlWinA7AxAkPxRGN1nfNQxs+rxjK/yZLh3kVlFbc11RuFP8UZOeyQ+nSZ1b6GesddsUCgyYjIe/JE/hQvNgN5FQJs7xxV3Csd4qWXvBnN57hgdsQ/ynOrNLZjnumJhSOufhqOCHLxpYSZktR76fgl75QDiyK39" + }, + "_rid": "YJIgAL2lPHkBAAAAAAAAAA==", + "_self": "dbs/YJIgAA==/colls/YJIgAL2lPHk=/docs/YJIgAL2lPHkBAAAAAAAAAA==/", + "_etag": "\"00000000-0000-0000-146f-cc7fe12b01d6\"", + "_attachments": "attachments/", + "_ts": 1587097345 +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/POCO.json b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/POCO.json new file mode 100644 index 000000000000..d2bd3c771363 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/encryption/dotnet/POCO.json @@ -0,0 +1,6 @@ +{ + "id": "46df58fe-0781-4c8c-b844-1cd49c9f41a6", + "PK": "652a5b30-bdfa-4ae7-b62c-4a528736cd4a", + "NonSensitive": "502a226d-1dd2-4107-8bb0-570f0aa1bdcf", + "Sensitive": "d47ea50f-b671-4227-890b-4f38251d4f0c" +} diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/examples-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/examples-testng.xml new file mode 100644 index 000000000000..f9ba695377b7 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/examples-testng.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/fast-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/fast-testng.xml new file mode 100644 index 000000000000..10c2c47b59b7 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/fast-testng.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/log4j2.properties b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/log4j2.properties new file mode 100644 index 000000000000..b68efa3afd76 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/log4j2.properties @@ -0,0 +1,24 @@ +# Set root logger level to INFO and its default appender to be 'STDOUT'. +rootLogger.level = info +rootLogger.appenderRef.stdout.ref = STDOUT + +# Uncomment here and lines 21 - 25 to enable logging to a file as well. +# rootLogger.appenderRef.logFile.ref = FILE + +property.logDirectory = $${sys:azure.cosmos.logger.directory} +property.hostName = $${sys:azure.cosmos.hostname} + +logger.netty.name = io.netty +logger.netty.level = off + +# STDOUT is a ConsoleAppender and uses PatternLayout. +appender.console.name = STDOUT +appender.console.type = Console +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d %5X{pid} [%t] %-5p %c - %m%n + +# appender.logfile.name = FILE +# appender.logfile.type = File +# appender.logfile.filename = ${logDirectory}/azure-cosmos-benchmark.log +# appender.logfile.layout.type = PatternLayout +# appender.logfile.layout.pattern = [%d][%p][${hostName}][thread:%t][logger:%c] %m%n diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/long-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/long-testng.xml new file mode 100644 index 000000000000..3bb293f53fb8 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/long-testng.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/multi-master-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/multi-master-testng.xml new file mode 100644 index 000000000000..ffc341c5b07a --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/multi-master-testng.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/resources/non-emulator-testng.xml b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/non-emulator-testng.xml new file mode 100644 index 000000000000..b1ea939fbbba --- /dev/null +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/resources/non-emulator-testng.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index b0da674c5186..a3ae24c7918c 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -1,8 +1,20 @@ # Release History -## 4.2.0-beta.1 (Unreleased) +## 4.3.0-beta.1 (Unreleased) +## 4.2.0 (2020-07-14) +### New Features +* Added script logging enabled API to `CosmosStoredProcedureRequestOptions`. +* Updated `DirectConnectionConfig` default `idleEndpointTimeout` to 1h and default `connectTimeout` to 5s. +### Key Bug Fixes +* Fixed issue where `GatewayConnectionConfig` `idleConnectionTimeout` was overriding `DirectConnectionConfig` `idleConnectionTimeout`. +* Fixed `responseContinuationTokenLimitInKb` get and set APIs in `CosmosQueryRequestOptions`. +* Fixed issue in query and change feed when recreating the collection with same name. +* Fixed issue with top query throwing ClassCastException. +* Fixed issue with order by query throwing NullPointerException. +* Fixed issue in handling of cancelled requests in direct mode causing reactor `onErrorDropped` being called. + ## 4.1.0 (2020-06-25) ### New Features * Added support for `GROUP BY` query. diff --git a/sdk/cosmos/azure-cosmos/README.md b/sdk/cosmos/azure-cosmos/README.md index 14339f753b03..f36b2d212394 100644 --- a/sdk/cosmos/azure-cosmos/README.md +++ b/sdk/cosmos/azure-cosmos/README.md @@ -14,7 +14,7 @@ This project provides SDK library in Java for interacting with [SQL API][sql_api com.azure azure-cosmos - 4.1.0 + 4.2.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index e64311be2eeb..e1faa14186fd 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. com.azure azure-cosmos - 4.2.0-beta.1 + 4.3.0-beta.1 Microsoft Azure SDK for SQL API of Azure Cosmos DB Service This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension Reactor support) for Azure Cosmos DB SQL API jar @@ -128,7 +128,6 @@ Licensed under the MIT License. - com.fasterxml.jackson.module jackson-module-afterburner @@ -277,13 +276,8 @@ Licensed under the MIT License. - com.azure:* - com.fasterxml.jackson.core:jackson-core:[2.10.1] - com.fasterxml.jackson.core:jackson-annotations:[2.10.1] - com.fasterxml.jackson.core:jackson-databind:[2.10.1] com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.10.1] com.fasterxml.jackson.module:jackson-module-afterburner:[2.10.1] - com.google.code.findbugs:jsr305:[3.0.2] io.dropwizard.metrics:metrics-core:[4.1.0] io.micrometer:micrometer-core:[1.2.0] io.netty:netty-codec-http:[4.1.49.Final] diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/BridgeInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/BridgeInternal.java index 5e3a47527f8e..53cb2ec1b098 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/BridgeInternal.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/BridgeInternal.java @@ -9,6 +9,8 @@ import com.azure.cosmos.implementation.InternalObjectNode; import com.azure.cosmos.implementation.DatabaseAccount; import com.azure.cosmos.implementation.Document; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.ItemSerializer; import com.azure.cosmos.implementation.FeedResponseDiagnostics; import com.azure.cosmos.implementation.JsonSerializable; import com.azure.cosmos.implementation.MetadataDiagnosticsContext; @@ -26,6 +28,8 @@ import com.azure.cosmos.implementation.directconnectivity.StoreResponse; import com.azure.cosmos.implementation.directconnectivity.StoreResult; import com.azure.cosmos.implementation.directconnectivity.Uri; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; import com.azure.cosmos.implementation.query.metrics.ClientSideMetrics; import com.azure.cosmos.implementation.routing.PartitionKeyInternal; import com.azure.cosmos.models.CosmosItemResponse; @@ -65,6 +69,12 @@ public static Document documentFromObject(Object document, ObjectMapper mapper) return Document.fromObject(document, mapper); } + @Warning(value = INTERNAL_USE_ONLY_WARNING) + public static ByteBuffer serializeJsonToByteBuffer(Object document, ObjectMapper mapper, DataEncryptionKeyProvider dataEncryptionKeyProvider, EncryptionOptions encryptionOptions) { + ItemSerializer.CosmosSerializer cosmosSerializer = new ItemSerializer.CosmosSerializer(dataEncryptionKeyProvider, encryptionOptions); + return cosmosSerializer.serializeTo(document); + } + @Warning(value = INTERNAL_USE_ONLY_WARNING) public static ByteBuffer serializeJsonToByteBuffer(Object document, ObjectMapper mapper) { return InternalObjectNode.serializeJsonToByteBuffer(document, mapper); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncClient.java index bbe989db8e80..c326b1095806 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncClient.java @@ -4,13 +4,17 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.Context; +import com.azure.core.util.tracing.Tracer; import com.azure.cosmos.implementation.AsyncDocumentClient; import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.ConnectionPolicy; import com.azure.cosmos.implementation.CosmosAuthorizationTokenResolver; import com.azure.cosmos.implementation.Database; import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.TracerProvider; import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdMetrics; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; import com.azure.cosmos.models.CosmosDatabaseResponse; import com.azure.cosmos.models.CosmosDatabaseProperties; import com.azure.cosmos.models.CosmosDatabaseRequestOptions; @@ -26,8 +30,11 @@ import reactor.core.publisher.Mono; import java.io.Closeable; +import java.util.Iterator; import java.util.List; +import java.util.ServiceLoader; +import static com.azure.core.util.FluxUtil.withContext; import static com.azure.cosmos.implementation.Utils.setContinuationTokenAndMaxItemCount; /** @@ -51,7 +58,20 @@ public final class CosmosAsyncClient implements Closeable { private final AzureKeyCredential credential; private final boolean sessionCapturingOverride; private final boolean enableTransportClientSharing; + private final TracerProvider tracerProvider; + private final DataEncryptionKeyProvider dataEncryptionKeyProvider; private final boolean contentResponseOnWriteEnabled; + private static final Tracer TRACER; + + static { + ServiceLoader serviceLoader = ServiceLoader.load(Tracer.class); + Iterator iterator = serviceLoader.iterator(); + if (iterator.hasNext()) { + TRACER = serviceLoader.iterator().next(); + } else { + TRACER = null; + } + } CosmosAsyncClient(CosmosClientBuilder builder) { this.configs = builder.configs(); @@ -63,8 +83,10 @@ public final class CosmosAsyncClient implements Closeable { this.cosmosAuthorizationTokenResolver = builder.getAuthorizationTokenResolver(); this.credential = builder.getCredential(); this.sessionCapturingOverride = builder.isSessionCapturingOverrideEnabled(); + this.dataEncryptionKeyProvider = builder.getDataEncryptionKeyProvider(); this.enableTransportClientSharing = builder.isConnectionSharingAcrossClientsEnabled(); this.contentResponseOnWriteEnabled = builder.isContentResponseOnWriteEnabled(); + this.tracerProvider = new TracerProvider(TRACER); this.asyncDocumentClient = new AsyncDocumentClient.Builder() .withServiceEndpoint(this.serviceEndpoint) .withMasterKeyOrResourceToken(this.keyOrResourceToken) @@ -75,6 +97,7 @@ public final class CosmosAsyncClient implements Closeable { .withTokenResolver(this.cosmosAuthorizationTokenResolver) .withCredential(this.credential) .withTransportClientSharing(this.enableTransportClientSharing) + .withDataEncryptionKeyProvider(this.dataEncryptionKeyProvider) .withContentResponseOnWriteEnabled(this.contentResponseOnWriteEnabled) .build(); } @@ -194,8 +217,9 @@ boolean isContentResponseOnWriteEnabled() { * @return a {@link Mono} containing the cosmos database response with the created or existing database or * an error. */ - Mono createDatabaseIfNotExists(CosmosDatabaseProperties databaseProperties) { - return createDatabaseIfNotExistsInternal(getDatabase(databaseProperties.getId())); + public Mono createDatabaseIfNotExists(CosmosDatabaseProperties databaseProperties) { + return withContext(context -> createDatabaseIfNotExistsInternal(getDatabase(databaseProperties.getId()), + null, context)); } /** @@ -209,21 +233,7 @@ Mono createDatabaseIfNotExists(CosmosDatabaseProperties * an error. */ public Mono createDatabaseIfNotExists(String id) { - return createDatabaseIfNotExistsInternal(getDatabase(id)); - } - - private Mono createDatabaseIfNotExistsInternal(CosmosAsyncDatabase database) { - return database.read().onErrorResume(exception -> { - final Throwable unwrappedException = Exceptions.unwrap(exception); - if (unwrappedException instanceof CosmosException) { - final CosmosException cosmosException = (CosmosException) unwrappedException; - if (cosmosException.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) { - return createDatabase(new CosmosDatabaseProperties(database.getId()), - new CosmosDatabaseRequestOptions()); - } - } - return Mono.error(unwrappedException); - }); + return withContext(context -> createDatabaseIfNotExistsInternal(getDatabase(id), null, context)); } /** @@ -240,19 +250,8 @@ private Mono createDatabaseIfNotExistsInternal(CosmosAsy * @return the mono. */ public Mono createDatabaseIfNotExists(String id, ThroughputProperties throughputProperties) { - return this.getDatabase(id).read().onErrorResume(exception -> { - final Throwable unwrappedException = Exceptions.unwrap(exception); - if (unwrappedException instanceof CosmosException) { - final CosmosException cosmosException = (CosmosException) unwrappedException; - if (cosmosException.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) { - CosmosDatabaseRequestOptions options = new CosmosDatabaseRequestOptions(); - ModelBridgeInternal.setThroughputProperties(options, throughputProperties); - return createDatabase(new CosmosDatabaseProperties(id), - options); - } - } - return Mono.error(unwrappedException); - }); + return withContext(context -> createDatabaseIfNotExistsInternal(getDatabase(id), + throughputProperties, context)); } /** @@ -269,14 +268,10 @@ public Mono createDatabaseIfNotExists(String id, Through */ public Mono createDatabase(CosmosDatabaseProperties databaseProperties, CosmosDatabaseRequestOptions options) { - if (options == null) { - options = new CosmosDatabaseRequestOptions(); - } + final CosmosDatabaseRequestOptions requestOptions = options == null ? new CosmosDatabaseRequestOptions() : options; Database wrappedDatabase = new Database(); wrappedDatabase.setId(databaseProperties.getId()); - return asyncDocumentClient.createDatabase(wrappedDatabase, ModelBridgeInternal.toRequestOptions(options)) - .map(databaseResourceResponse -> ModelBridgeInternal.createCosmosDatabaseResponse(databaseResourceResponse)) - .single(); + return withContext(context -> createDatabaseInternal(wrappedDatabase, requestOptions, context)); } /** @@ -328,12 +323,12 @@ public Mono createDatabase(CosmosDatabaseProperties data if (options == null) { options = new CosmosDatabaseRequestOptions(); } + ModelBridgeInternal.setThroughputProperties(options, throughputProperties); Database wrappedDatabase = new Database(); wrappedDatabase.setId(databaseProperties.getId()); - return asyncDocumentClient.createDatabase(wrappedDatabase, ModelBridgeInternal.toRequestOptions(options)) - .map(databaseResourceResponse -> ModelBridgeInternal.createCosmosDatabaseResponse(databaseResourceResponse)) - .single(); + final CosmosDatabaseRequestOptions requestOptions = options; + return withContext(context -> createDatabaseInternal(wrappedDatabase, requestOptions, context)); } /** @@ -354,24 +349,6 @@ public Mono createDatabase(CosmosDatabaseProperties data return createDatabase(databaseProperties, options); } - /** - * Creates a database. - *

    - * After subscription the operation will be performed. - * The {@link Mono} upon successful completion will contain a single resource response with the - * created database. - * In case of failure the {@link Mono} will error. - * - * @param id id of the database. - * @param throughput the throughput for the database. - * @return a {@link Mono} containing the single cosmos database response with the created database or an error. - */ - Mono createDatabase(String id, int throughput) { - CosmosDatabaseRequestOptions options = new CosmosDatabaseRequestOptions(); - ModelBridgeInternal.setThroughputProperties(options, ThroughputProperties.createManualThroughput(throughput)); - return createDatabase(new CosmosDatabaseProperties(id), options); - } - /** * Creates a database. * @@ -397,12 +374,13 @@ public Mono createDatabase(String id, ThroughputProperti */ CosmosPagedFlux readAllDatabases(CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + pagedFluxOptions.setTracerInformation(this.tracerProvider, "readAllDatabases", this.serviceEndpoint, null); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return getDocClientWrapper().readDatabases(options) - .map(response -> - BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosDatabasePropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); + .map(response -> + BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosDatabasePropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); }); } @@ -432,7 +410,7 @@ public CosmosPagedFlux readAllDatabases() { * @return a {@link CosmosPagedFlux} containing one or several feed response pages of read databases or an error. */ public CosmosPagedFlux queryDatabases(String query, CosmosQueryRequestOptions options) { - return queryDatabases(new SqlQuerySpec(query), options); + return queryDatabasesInternal(new SqlQuerySpec(query), options); } /** @@ -447,13 +425,7 @@ public CosmosPagedFlux queryDatabases(String query, Co * @return a {@link CosmosPagedFlux} containing one or several feed response pages of read databases or an error. */ public CosmosPagedFlux queryDatabases(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) { - return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { - setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); - return getDocClientWrapper().queryDatabases(querySpec, options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosDatabasePropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); - }); + return queryDatabasesInternal(querySpec, options); } /** @@ -473,4 +445,63 @@ public CosmosAsyncDatabase getDatabase(String id) { public void close() { asyncDocumentClient.close(); } + + TracerProvider getTracerProvider(){ + return this.tracerProvider; + } + + private CosmosPagedFlux queryDatabasesInternal(SqlQuerySpec querySpec, CosmosQueryRequestOptions options){ + return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + pagedFluxOptions.setTracerInformation(this.tracerProvider, "queryDatabases", this.serviceEndpoint, null); + setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); + return getDocClientWrapper().queryDatabases(querySpec, options) + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosDatabasePropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); + }); + } + + + private Mono createDatabaseIfNotExistsInternal(CosmosAsyncDatabase database, + ThroughputProperties throughputProperties, Context context) { + String spanName = "createDatabaseIfNotExists." + database.getId(); + Context nestedContext = context.addData(TracerProvider.COSMOS_CALL_DEPTH, TracerProvider.COSMOS_CALL_DEPTH_VAL); + Mono responseMono = database.readInternal(new CosmosDatabaseRequestOptions(), + nestedContext).onErrorResume(exception -> { + final Throwable unwrappedException = Exceptions.unwrap(exception); + if (unwrappedException instanceof CosmosException) { + final CosmosException cosmosException = (CosmosException) unwrappedException; + if (cosmosException.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) { + CosmosDatabaseRequestOptions requestOptions = new CosmosDatabaseRequestOptions(); + if (throughputProperties != null) { + ModelBridgeInternal.setThroughputProperties(requestOptions, throughputProperties); + } + + Database wrappedDatabase = new Database(); + wrappedDatabase.setId(database.getId()); + return createDatabaseInternal(wrappedDatabase, + requestOptions, nestedContext); + } + } + return Mono.error(unwrappedException); + }); + return tracerProvider.traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + database.getId(), + this.serviceEndpoint); + } + + private Mono createDatabaseInternal(Database database, CosmosDatabaseRequestOptions options, + Context context) { + String spanName = "createDatabase." + database.getId(); + Mono responseMono = asyncDocumentClient.createDatabase(database, ModelBridgeInternal.toRequestOptions(options)) + .map(databaseResourceResponse -> ModelBridgeInternal.createCosmosDatabaseResponse(databaseResourceResponse)) + .single(); + return tracerProvider.traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + database.getId(), + this.serviceEndpoint); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncConflict.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncConflict.java index 9e7a336e782f..7a69191a459a 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncConflict.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncConflict.java @@ -2,13 +2,16 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.Paths; import com.azure.cosmos.implementation.RequestOptions; -import com.azure.cosmos.models.CosmosConflictResponse; import com.azure.cosmos.models.CosmosConflictRequestOptions; +import com.azure.cosmos.models.CosmosConflictResponse; import com.azure.cosmos.models.ModelBridgeInternal; import reactor.core.publisher.Mono; +import static com.azure.core.util.FluxUtil.withContext; + /** * Read and delete conflicts */ @@ -64,9 +67,7 @@ public Mono read(CosmosConflictRequestOptions options) { options = new CosmosConflictRequestOptions(); } RequestOptions requestOptions = ModelBridgeInternal.toRequestOptions(options); - return this.container.getDatabase().getDocClientWrapper().readConflict(getLink(), requestOptions) - .map(response -> ModelBridgeInternal.createCosmosConflictResponse(response)).single(); - + return withContext(context -> readInternal(requestOptions, context)); } /** @@ -85,8 +86,7 @@ public Mono delete(CosmosConflictRequestOptions options) options = new CosmosConflictRequestOptions(); } RequestOptions requestOptions = ModelBridgeInternal.toRequestOptions(options); - return this.container.getDatabase().getDocClientWrapper().deleteConflict(getLink(), requestOptions) - .map(response -> ModelBridgeInternal.createCosmosConflictResponse(response)).single(); + return withContext(context -> deleteInternal(requestOptions, context)); } String getURIPathSegment() { @@ -106,4 +106,27 @@ String getLink() { builder.append(getId()); return builder.toString(); } + + private Mono readInternal(RequestOptions options, Context context) { + String spanName = "readConflict." + getId(); + Mono responseMono = + this.container.getDatabase().getDocClientWrapper().readConflict(getLink(), options) + .map(response -> ModelBridgeInternal.createCosmosConflictResponse(response)).single(); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + this.container.getDatabase().getId(), + this.container.getDatabase().getClient().getServiceEndpoint()); + + } + + private Mono deleteInternal(RequestOptions options, Context context) { + String spanName = "deleteConflict." + getId(); + Mono responseMono = + this.container.getDatabase().getDocClientWrapper().deleteConflict(getLink(), options) + .map(response -> ModelBridgeInternal.createCosmosConflictResponse(response)).single(); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + this.container.getDatabase().getId(), + this.container.getDatabase().getClient().getServiceEndpoint()); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncContainer.java index 3c1c0bca8c88..38f558c29868 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncContainer.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncContainer.java @@ -2,21 +2,24 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.Constants; -import com.azure.cosmos.implementation.InternalObjectNode; import com.azure.cosmos.implementation.Document; import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.InternalObjectNode; import com.azure.cosmos.implementation.Offer; import com.azure.cosmos.implementation.Paths; import com.azure.cosmos.implementation.RequestOptions; +import com.azure.cosmos.implementation.TracerProvider; +import com.azure.cosmos.implementation.ItemDeserializer; import com.azure.cosmos.implementation.Utils; import com.azure.cosmos.implementation.query.QueryInfo; -import com.azure.cosmos.models.CosmosContainerResponse; -import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosConflictProperties; import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.CosmosContainerRequestOptions; +import com.azure.cosmos.models.CosmosContainerResponse; import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.ModelBridgeInternal; @@ -32,6 +35,7 @@ import java.util.List; import java.util.stream.Collectors; +import static com.azure.core.util.FluxUtil.withContext; import static com.azure.cosmos.implementation.Utils.setContinuationTokenAndMaxItemCount; /** @@ -43,12 +47,40 @@ public class CosmosAsyncContainer { private final CosmosAsyncDatabase database; private final String id; private final String link; + private final String replaceContainerSpanName; + private final String deleteContainerSpanName; + private final String replaceThroughputSpanName; + private final String readThroughputSpanName; + private final String readContainerSpanName; + private final String readItemSpanName; + private final String upsertItemSpanName; + private final String deleteItemSpanName; + private final String replaceItemSpanName; + private final String createItemSpanName; + private final String readAllItemsSpanName; + private final String queryItemsSpanName; + private final String readAllConflictsSpanName; + private final String queryConflictsSpanName; private CosmosAsyncScripts scripts; CosmosAsyncContainer(String id, CosmosAsyncDatabase database) { this.id = id; this.database = database; this.link = getParentLink() + "/" + getURIPathSegment() + "/" + getId(); + this.replaceContainerSpanName = "replaceContainer." + this.id; + this.deleteContainerSpanName = "deleteContainer." + this.id; + this.replaceThroughputSpanName = "replaceThroughput." + this.id; + this.readThroughputSpanName = "readThroughput." + this.id; + this.readContainerSpanName = "readContainer." + this.id; + this.readItemSpanName = "readItem." + this.id; + this.upsertItemSpanName = "upsertItem." + this.id; + this.deleteItemSpanName = "deleteItem." + this.id; + this.replaceItemSpanName = "replaceItem." + this.id; + this.createItemSpanName = "createItem." + this.id; + this.readAllItemsSpanName = "readAllItems." + this.id; + this.queryItemsSpanName = "queryItems." + this.id; + this.readAllConflictsSpanName = "readAllConflicts." + this.id; + this.queryConflictsSpanName = "queryConflicts." + this.id; } /** @@ -86,11 +118,8 @@ public Mono read() { * the read container or an error. */ public Mono read(CosmosContainerRequestOptions options) { - if (options == null) { - options = new CosmosContainerRequestOptions(); - } - return database.getDocClientWrapper().readCollection(getLink(), ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosContainerResponse(response)).single(); + final CosmosContainerRequestOptions requestOptions = options == null ? new CosmosContainerRequestOptions() : options; + return withContext(context -> read(requestOptions, context)); } /** @@ -105,11 +134,8 @@ public Mono read(CosmosContainerRequestOptions options) * the deleted database or an error. */ public Mono delete(CosmosContainerRequestOptions options) { - if (options == null) { - options = new CosmosContainerRequestOptions(); - } - return database.getDocClientWrapper().deleteCollection(getLink(), ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosContainerResponse(response)).single(); + final CosmosContainerRequestOptions requestOptions = options == null ? new CosmosContainerRequestOptions() : options; + return withContext(context -> deleteInternal(requestOptions, context)); } /** @@ -158,12 +184,8 @@ public Mono replace(CosmosContainerProperties container public Mono replace( CosmosContainerProperties containerProperties, CosmosContainerRequestOptions options) { - if (options == null) { - options = new CosmosContainerRequestOptions(); - } - return database.getDocClientWrapper() - .replaceCollection(ModelBridgeInternal.getV2Collection(containerProperties), ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosContainerResponse(response)).single(); + final CosmosContainerRequestOptions requestOptions = options == null ? new CosmosContainerRequestOptions() : options; + return withContext(context -> replaceInternal(containerProperties, requestOptions, context)); } /* CosmosAsyncItem operations */ @@ -208,7 +230,6 @@ public Mono> createItem( return createItem(item, options); } - /** * Creates a Cosmos item. * @@ -221,6 +242,21 @@ public Mono> createItem(T item, CosmosItemRequestOptio if (options == null) { options = new CosmosItemRequestOptions(); } + + final CosmosItemRequestOptions requestOptions = options; + return withContext(context -> createItemInternal(item, requestOptions, context)); + } + + private Mono> createItemInternal(T item, CosmosItemRequestOptions options, Context context) { + Mono> responseMono = createItemInternal(item, options); + return database.getClient().getTracerProvider().traceEnabledCosmosItemResponsePublisher(responseMono, + context, + this.createItemSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono> createItemInternal(T item, CosmosItemRequestOptions options) { @SuppressWarnings("unchecked") Class itemType = (Class) item.getClass(); RequestOptions requestOptions = ModelBridgeInternal.toRequestOptions(options); @@ -229,7 +265,7 @@ public Mono> createItem(T item, CosmosItemRequestOptio item, requestOptions, true) - .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponse(response, itemType)) + .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponse(response, itemType, getItemDeserializer())) .single(); } @@ -261,17 +297,8 @@ public Mono> upsertItem(T item) { * @return an {@link Mono} containing the single resource response with the upserted item or an error. */ public Mono> upsertItem(T item, CosmosItemRequestOptions options) { - if (options == null) { - options = new CosmosItemRequestOptions(); - } - @SuppressWarnings("unchecked") - Class itemType = (Class) item.getClass(); - return this.getDatabase().getDocClientWrapper() - .upsertDocument(this.getLink(), item, - ModelBridgeInternal.toRequestOptions(options), - true) - .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponse(response, itemType)) - .single(); + final CosmosItemRequestOptions requestOptions = options == null ? new CosmosItemRequestOptions() : options; + return withContext(context -> upsertItemInternal(item, requestOptions, context)); } /** @@ -305,6 +332,9 @@ CosmosPagedFlux readAllItems(Class classType) { */ CosmosPagedFlux readAllItems(CosmosQueryRequestOptions options, Class classType) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + pagedFluxOptions.setTracerInformation(this.getDatabase().getClient().getTracerProvider(), + this.readAllItemsSpanName, + this.getDatabase().getClient().getServiceEndpoint(), database.getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return getDatabase().getDocClientWrapper().readDocuments(getLink(), options).map( response -> prepareFeedResponse(response, classType)); @@ -325,7 +355,7 @@ CosmosPagedFlux readAllItems(CosmosQueryRequestOptions options, Class * error. */ public CosmosPagedFlux queryItems(String query, Class classType) { - return queryItems(new SqlQuerySpec(query), classType); + return queryItemsInternal(new SqlQuerySpec(query), new CosmosQueryRequestOptions(), classType); } /** @@ -343,7 +373,7 @@ public CosmosPagedFlux queryItems(String query, Class classType) { * error. */ public CosmosPagedFlux queryItems(String query, CosmosQueryRequestOptions options, Class classType) { - return queryItems(new SqlQuerySpec(query), options, classType); + return queryItemsInternal(new SqlQuerySpec(query), options, classType); } /** @@ -360,7 +390,7 @@ public CosmosPagedFlux queryItems(String query, CosmosQueryRequestOptions * error. */ public CosmosPagedFlux queryItems(SqlQuerySpec querySpec, Class classType) { - return queryItems(querySpec, new CosmosQueryRequestOptions(), classType); + return queryItemsInternal(querySpec, new CosmosQueryRequestOptions(), classType); } /** @@ -382,13 +412,16 @@ public CosmosPagedFlux queryItems(SqlQuerySpec querySpec, CosmosQueryRequ } private CosmosPagedFlux queryItemsInternal( - SqlQuerySpec sqlQuerySpec, CosmosQueryRequestOptions cosmosQueryRequestOptions, Class classType) { + SqlQuerySpec sqlQuerySpec, CosmosQueryRequestOptions cosmosQueryRequestOptions, Class classType) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = this.queryItemsSpanName; + pagedFluxOptions.setTracerInformation(this.getDatabase().getClient().getTracerProvider(), spanName, + this.getDatabase().getClient().getServiceEndpoint(), database.getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, cosmosQueryRequestOptions); return getDatabase().getDocClientWrapper() - .queryDocuments(CosmosAsyncContainer.this.getLink(), sqlQuerySpec, cosmosQueryRequestOptions) - .map(response -> - prepareFeedResponse(response, classType)); + .queryDocuments(CosmosAsyncContainer.this.getLink(), sqlQuerySpec, cosmosQueryRequestOptions) + .map(response -> + prepareFeedResponse(response, classType)); }); } @@ -453,12 +486,10 @@ public Mono> readItem( if (options == null) { options = new CosmosItemRequestOptions(); } + ModelBridgeInternal.setPartitionKey(options, partitionKey); RequestOptions requestOptions = ModelBridgeInternal.toRequestOptions(options); - return this.getDatabase().getDocClientWrapper() - .readDocument(getItemLink(itemId), requestOptions) - .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponse(response, itemType)) - .single(); + return withContext(context -> readItemInternal(itemId, requestOptions, itemType, context)); } /** @@ -500,11 +531,8 @@ public Mono> replaceItem( ModelBridgeInternal.setPartitionKey(options, partitionKey); @SuppressWarnings("unchecked") Class itemType = (Class) item.getClass(); - return this.getDatabase() - .getDocClientWrapper() - .replaceDocument(getItemLink(itemId), doc, ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponse(response, itemType)) - .single(); + final CosmosItemRequestOptions requestOptions = options; + return withContext(context -> replaceItemInternal(itemType, itemId, doc, requestOptions, context)); } /** @@ -540,11 +568,7 @@ public Mono> deleteItem( } ModelBridgeInternal.setPartitionKey(options, partitionKey); RequestOptions requestOptions = ModelBridgeInternal.toRequestOptions(options); - return this.getDatabase() - .getDocClientWrapper() - .deleteDocument(getItemLink(itemId), requestOptions) - .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponseWithObjectType(response)) - .single(); + return withContext(context -> deleteItemInternal(itemId, requestOptions, context)); } private String getItemLink(String itemId) { @@ -580,11 +604,14 @@ public CosmosAsyncScripts getScripts() { */ public CosmosPagedFlux readAllConflicts(CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + pagedFluxOptions.setTracerInformation(this.getDatabase().getClient().getTracerProvider(), + this.readAllConflictsSpanName, + this.getDatabase().getClient().getServiceEndpoint(), database.getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return database.getDocClientWrapper().readConflicts(getLink(), options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosConflictPropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosConflictPropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); }); } @@ -609,11 +636,14 @@ public CosmosPagedFlux queryConflicts(String query) { */ public CosmosPagedFlux queryConflicts(String query, CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + pagedFluxOptions.setTracerInformation(this.getDatabase().getClient().getTracerProvider(), + this.queryConflictsSpanName, + this.getDatabase().getClient().getServiceEndpoint(), database.getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return database.getDocClientWrapper().queryConflicts(getLink(), query, options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosConflictPropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosConflictPropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); }); } @@ -628,35 +658,13 @@ public CosmosAsyncConflict getConflict(String id) { } /** - * Replace the throughput provisioned for the current container. + * Replace the throughput. * * @param throughputProperties the throughput properties. * @return the mono containing throughput response. */ public Mono replaceThroughput(ThroughputProperties throughputProperties) { - return this.read() - .flatMap(response -> this.database.getDocClientWrapper() - .queryOffers(database.getOfferQuerySpecFromResourceId(response.getProperties() - .getResourceId()) - , new CosmosQueryRequestOptions()) - .single() - .flatMap(offerFeedResponse -> { - if (offerFeedResponse.getResults().isEmpty()) { - return Mono.error(BridgeInternal - .createCosmosException( - HttpConstants.StatusCodes.BADREQUEST, - "No offers found for the " + - "resource " + this.getId())); - } - - Offer existingOffer = offerFeedResponse.getResults().get(0); - Offer updatedOffer = - ModelBridgeInternal.updateOfferFromProperties(existingOffer, - throughputProperties); - return this.database.getDocClientWrapper() - .replaceOffer(updatedOffer) - .single(); - }).map(ModelBridgeInternal::createThroughputRespose)); + return withContext(context -> replaceThroughputInternal(throughputProperties, context)); } /** @@ -665,30 +673,9 @@ public Mono replaceThroughput(ThroughputProperties throughpu * @return the mono containing throughput response. */ public Mono readThroughput() { - return this.read() - .flatMap(response -> this.database.getDocClientWrapper() - .queryOffers(database.getOfferQuerySpecFromResourceId(response.getProperties() - .getResourceId()) - , new CosmosQueryRequestOptions()) - .single() - .flatMap(offerFeedResponse -> { - if (offerFeedResponse.getResults().isEmpty()) { - return Mono.error(BridgeInternal - .createCosmosException( - HttpConstants.StatusCodes.BADREQUEST, - "No offers found for the resource " - + this.getId())); - } - return this.database.getDocClientWrapper() - .readOffer(offerFeedResponse.getResults() - .get(0) - .getSelfLink()) - .single(); - }) - .map(ModelBridgeInternal::createThroughputRespose)); + return withContext(context -> readThroughputInternal(context)); } - /** * Gets the parent {@link CosmosAsyncDatabase} for the current container. * @@ -709,4 +696,181 @@ String getParentLink() { String getLink() { return this.link; } + + private Mono> deleteItemInternal( + String itemId, + RequestOptions requestOptions, + Context context) { + Mono> responseMono = this.getDatabase() + .getDocClientWrapper() + .deleteDocument(getItemLink(itemId), requestOptions) + .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponseWithObjectType(response)) + .single(); + return database.getClient().getTracerProvider().traceEnabledCosmosItemResponsePublisher(responseMono, + context, + this.deleteItemSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono> replaceItemInternal( + Class itemType, + String itemId, + Document doc, + CosmosItemRequestOptions options, + Context context) { + Mono> responseMono = this.getDatabase() + .getDocClientWrapper() + .replaceDocument(getItemLink(itemId), doc, ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponse(response, itemType, getItemDeserializer())) + .single(); + return database.getClient().getTracerProvider().traceEnabledCosmosItemResponsePublisher(responseMono, + context, this.replaceItemSpanName, database.getId(), database.getClient().getServiceEndpoint()); + } + + private Mono> upsertItemInternal(T item, CosmosItemRequestOptions options, Context context) { + @SuppressWarnings("unchecked") + Class itemType = (Class) item.getClass(); + Mono> responseMono = this.getDatabase().getDocClientWrapper() + .upsertDocument(this.getLink(), item, + ModelBridgeInternal.toRequestOptions(options), + true) + .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponse(response, itemType, getItemDeserializer())) + .single(); + return database.getClient().getTracerProvider().traceEnabledCosmosItemResponsePublisher(responseMono, + context, + this.upsertItemSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono> readItemInternal( + String itemId, + RequestOptions requestOptions, Class itemType, + Context context) { + Mono> responseMono = this.getDatabase().getDocClientWrapper() + .readDocument(getItemLink(itemId), requestOptions) + .map(response -> ModelBridgeInternal.createCosmosAsyncItemResponse(response, itemType, getItemDeserializer())) + .single(); + return database.getClient().getTracerProvider().traceEnabledCosmosItemResponsePublisher(responseMono, + context, + this.readItemSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + Mono read(CosmosContainerRequestOptions options, Context context) { + Mono responseMono = database.getDocClientWrapper().readCollection(getLink(), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosContainerResponse(response)).single(); + return database.getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + this.readContainerSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono deleteInternal(CosmosContainerRequestOptions options, Context context) { + Mono responseMono = database.getDocClientWrapper().deleteCollection(getLink(), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosContainerResponse(response)).single(); + return database.getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + this.deleteContainerSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono replaceInternal(CosmosContainerProperties containerProperties, + CosmosContainerRequestOptions options, + Context context) { + Mono responseMono = database.getDocClientWrapper() + .replaceCollection(ModelBridgeInternal.getV2Collection(containerProperties), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosContainerResponse(response)).single(); + return database.getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + this.replaceContainerSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono readThroughputInternal(Context context) { + Context nestedContext = context.addData(TracerProvider.COSMOS_CALL_DEPTH, TracerProvider.COSMOS_CALL_DEPTH_VAL); + Mono responseMono = readThroughputInternal(this.read(new CosmosContainerRequestOptions(), + nestedContext)); + return this.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + this.readThroughputSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono readThroughputInternal(Mono responseMono) { + return responseMono + .flatMap(response -> this.database.getDocClientWrapper() + .queryOffers(database.getOfferQuerySpecFromResourceId(response.getProperties() + .getResourceId()) + , new CosmosQueryRequestOptions()) + .single() + .flatMap(offerFeedResponse -> { + if (offerFeedResponse.getResults().isEmpty()) { + return Mono.error(BridgeInternal + .createCosmosException( + HttpConstants.StatusCodes.BADREQUEST, + "No offers found for the resource " + + this.getId())); + } + return this.database.getDocClientWrapper() + .readOffer(offerFeedResponse.getResults() + .get(0) + .getSelfLink()) + .single(); + }) + .map(ModelBridgeInternal::createThroughputRespose)); + } + + private Mono replaceThroughputInternal(ThroughputProperties throughputProperties, + Context context) { + Context nestedContext = context.addData(TracerProvider.COSMOS_CALL_DEPTH, TracerProvider.COSMOS_CALL_DEPTH_VAL); + Mono responseMono = + replaceThroughputInternal(this.read(new CosmosContainerRequestOptions(), nestedContext), + throughputProperties); + return this.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + this.replaceThroughputSpanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono replaceThroughputInternal(Mono responseMono, + ThroughputProperties throughputProperties) { + return responseMono + .flatMap(response -> this.database.getDocClientWrapper() + .queryOffers(database.getOfferQuerySpecFromResourceId(response.getProperties() + .getResourceId()) + , new CosmosQueryRequestOptions()) + .single() + .flatMap(offerFeedResponse -> { + if (offerFeedResponse.getResults().isEmpty()) { + return Mono.error(BridgeInternal + .createCosmosException( + HttpConstants.StatusCodes.BADREQUEST, + "No offers found for the " + + "resource " + this.getId())); + } + + Offer existingOffer = offerFeedResponse.getResults().get(0); + Offer updatedOffer = + ModelBridgeInternal.updateOfferFromProperties(existingOffer, + throughputProperties); + return this.database.getDocClientWrapper() + .replaceOffer(updatedOffer) + .single(); + }).map(ModelBridgeInternal::createThroughputRespose)); + } + + ItemDeserializer getItemDeserializer() { + return getDatabase().getDocClientWrapper().getItemDeserializer(); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncDatabase.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncDatabase.java index 7d495d715b45..dc956b9318a4 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncDatabase.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncDatabase.java @@ -2,22 +2,24 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.AsyncDocumentClient; import com.azure.cosmos.implementation.HttpConstants; import com.azure.cosmos.implementation.Offer; import com.azure.cosmos.implementation.Paths; -import com.azure.cosmos.models.CosmosContainerResponse; -import com.azure.cosmos.models.CosmosDatabaseResponse; -import com.azure.cosmos.models.CosmosUserResponse; +import com.azure.cosmos.implementation.TracerProvider; +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.CosmosContainerRequestOptions; +import com.azure.cosmos.models.CosmosContainerResponse; import com.azure.cosmos.models.CosmosDatabaseRequestOptions; -import com.azure.cosmos.models.CosmosUserProperties; +import com.azure.cosmos.models.CosmosDatabaseResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.CosmosUserProperties; +import com.azure.cosmos.models.CosmosUserResponse; import com.azure.cosmos.models.ModelBridgeInternal; import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; -import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import com.azure.cosmos.models.ThroughputProperties; import com.azure.cosmos.models.ThroughputResponse; import com.azure.cosmos.util.CosmosPagedFlux; @@ -28,6 +30,7 @@ import java.util.Collections; import java.util.List; +import static com.azure.core.util.FluxUtil.withContext; import static com.azure.cosmos.implementation.Utils.setContinuationTokenAndMaxItemCount; /** @@ -79,11 +82,8 @@ public Mono read() { * the read database or an error. */ public Mono read(CosmosDatabaseRequestOptions options) { - if (options == null) { - options = new CosmosDatabaseRequestOptions(); - } - return getDocClientWrapper().readDatabase(getLink(), ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosDatabaseResponse(response)).single(); + final CosmosDatabaseRequestOptions requestOptions = options == null ? new CosmosDatabaseRequestOptions() : options; + return withContext(context -> readInternal(requestOptions, context)); } /** @@ -110,11 +110,8 @@ public Mono delete() { * @return an {@link Mono} containing the single cosmos database response. */ public Mono delete(CosmosDatabaseRequestOptions options) { - if (options == null) { - options = new CosmosDatabaseRequestOptions(); - } - return getDocClientWrapper().deleteDatabase(getLink(), ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosDatabaseResponse(response)).single(); + final CosmosDatabaseRequestOptions requestOptions = options == null ? new CosmosDatabaseRequestOptions() : options; + return withContext(context -> deleteInternal(requestOptions, context)); } /* CosmosAsyncContainer operations */ @@ -194,13 +191,9 @@ public Mono createContainer( if (containerProperties == null) { throw new IllegalArgumentException("containerProperties"); } - if (options == null) { - options = new CosmosContainerRequestOptions(); - } - return getDocClientWrapper() - .createCollection(this.getLink(), ModelBridgeInternal.getV2Collection(containerProperties), - ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosContainerResponse(response)).single(); + + final CosmosContainerRequestOptions requestOptions = options == null ? new CosmosContainerRequestOptions() : options; + return withContext(context -> createContainerInternal(containerProperties, requestOptions, context)); } /** @@ -278,14 +271,15 @@ public Mono createContainer(String id, String partition public Mono createContainerIfNotExists( CosmosContainerProperties containerProperties) { CosmosAsyncContainer container = getContainer(containerProperties.getId()); - return createContainerIfNotExistsInternal(containerProperties, container, null); + return withContext(context -> createContainerIfNotExistsInternal(containerProperties, container, null, + context)); } /** * Creates a Cosmos container if it does not exist on the service. *

    * The throughput setting will only be used if the specified container - * does not exist and therefor a new container will be created. + * does not exist and therefore a new container will be created. * * After subscription the operation will be performed. The {@link Mono} upon * successful completion will contain a cosmos container response with the @@ -303,7 +297,8 @@ Mono createContainerIfNotExists( CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); ModelBridgeInternal.setThroughputProperties(options, ThroughputProperties.createManualThroughput(throughput)); CosmosAsyncContainer container = getContainer(containerProperties.getId()); - return createContainerIfNotExistsInternal(containerProperties, container, options); + return withContext(context -> createContainerIfNotExistsInternal(containerProperties, container, options, + context)); } /** @@ -328,7 +323,8 @@ public Mono createContainerIfNotExists( CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); ModelBridgeInternal.setThroughputProperties(options, throughputProperties); CosmosAsyncContainer container = getContainer(containerProperties.getId()); - return createContainerIfNotExistsInternal(containerProperties, container, options); + return withContext(context -> createContainerIfNotExistsInternal(containerProperties, container, options, + context)); } /** @@ -345,16 +341,16 @@ public Mono createContainerIfNotExists( */ public Mono createContainerIfNotExists(String id, String partitionKeyPath) { CosmosAsyncContainer container = getContainer(id); - return createContainerIfNotExistsInternal(new CosmosContainerProperties(id, partitionKeyPath), - container, - null); + return withContext(context -> createContainerIfNotExistsInternal(new CosmosContainerProperties(id, + partitionKeyPath), container, null, + context)); } /** * Creates a Cosmos container if it does not exist on the service. *

    - * The throughput setting will only be used if the specified container - * does not exist and a new container will be created. + * The throughput properties will only be used if the specified container + * does not exist and therefor a new container will be created. * * After subscription the operation will be performed. The {@link Mono} upon * successful completion will contain a cosmos container response with the @@ -362,25 +358,25 @@ public Mono createContainerIfNotExists(String id, Strin * * @param id the cosmos container id. * @param partitionKeyPath the partition key path. - * @param throughput the throughput for the container. + * @param throughputProperties the throughput properties for the container. * @return a {@link Mono} containing the cosmos container response with the * created container or an error. */ - Mono createContainerIfNotExists( + public Mono createContainerIfNotExists( String id, String partitionKeyPath, - int throughput) { + ThroughputProperties throughputProperties) { CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - ModelBridgeInternal.setThroughputProperties(options, ThroughputProperties.createManualThroughput(throughput)); + ModelBridgeInternal.setThroughputProperties(options, throughputProperties); CosmosAsyncContainer container = getContainer(id); - return createContainerIfNotExistsInternal(new CosmosContainerProperties(id, partitionKeyPath), container, - options); + return withContext(context -> createContainerIfNotExistsInternal(new CosmosContainerProperties(id, + partitionKeyPath), container, options, context)); } /** * Creates a Cosmos container if it does not exist on the service. *

    - * The throughput properties will only be used if the specified container - * does not exist and therefor a new container will be created. + * The throughput setting will only be used if the specified container + * does not exist and a new container will be created. * * After subscription the operation will be performed. The {@link Mono} upon * successful completion will contain a cosmos container response with the @@ -388,33 +384,18 @@ Mono createContainerIfNotExists( * * @param id the cosmos container id. * @param partitionKeyPath the partition key path. - * @param throughputProperties the throughput properties for the container. + * @param throughput the throughput for the container. * @return a {@link Mono} containing the cosmos container response with the * created container or an error. */ - public Mono createContainerIfNotExists( + Mono createContainerIfNotExists( String id, String partitionKeyPath, - ThroughputProperties throughputProperties) { + int throughput) { CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); - ModelBridgeInternal.setThroughputProperties(options, throughputProperties); + ModelBridgeInternal.setThroughputProperties(options, ThroughputProperties.createManualThroughput(throughput)); CosmosAsyncContainer container = getContainer(id); - return createContainerIfNotExistsInternal(new CosmosContainerProperties(id, partitionKeyPath), container, - options); - } - - private Mono createContainerIfNotExistsInternal( - CosmosContainerProperties containerProperties, CosmosAsyncContainer container, - CosmosContainerRequestOptions options) { - return container.read(options).onErrorResume(exception -> { - final Throwable unwrappedException = Exceptions.unwrap(exception); - if (unwrappedException instanceof CosmosException) { - final CosmosException cosmosException = (CosmosException) unwrappedException; - if (cosmosException.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) { - return createContainer(containerProperties, options); - } - } - return Mono.error(unwrappedException); - }); + return withContext(context -> createContainerIfNotExistsInternal(new CosmosContainerProperties(id, + partitionKeyPath), container, options, context)); } /** @@ -430,11 +411,14 @@ private Mono createContainerIfNotExistsInternal( */ public CosmosPagedFlux readAllContainers(CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "readAllContainers." + this.getId(); + pagedFluxOptions.setTracerInformation(this.getClient().getTracerProvider(), spanName, + this.getClient().getServiceEndpoint(), getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return getDocClientWrapper().readCollections(getLink(), options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosContainerPropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosContainerPropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); }); } @@ -464,7 +448,7 @@ public CosmosPagedFlux readAllContainers() { * obtained containers or an error. */ public CosmosPagedFlux queryContainers(String query) { - return queryContainers(new SqlQuerySpec(query)); + return queryContainersInternal(new SqlQuerySpec(query), new CosmosQueryRequestOptions()); } /** @@ -480,7 +464,7 @@ public CosmosPagedFlux queryContainers(String query) * obtained containers or an error. */ public CosmosPagedFlux queryContainers(String query, CosmosQueryRequestOptions options) { - return queryContainers(new SqlQuerySpec(query), options); + return queryContainersInternal(new SqlQuerySpec(query), options); } /** @@ -495,7 +479,7 @@ public CosmosPagedFlux queryContainers(String query, * obtained containers or an error. */ public CosmosPagedFlux queryContainers(SqlQuerySpec querySpec) { - return queryContainers(querySpec, new CosmosQueryRequestOptions()); + return queryContainersInternal(querySpec, new CosmosQueryRequestOptions()); } /** @@ -510,14 +494,9 @@ public CosmosPagedFlux queryContainers(SqlQuerySpec q * @return a {@link CosmosPagedFlux} containing one or several feed response pages of the * obtained containers or an error. */ - public CosmosPagedFlux queryContainers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) { - return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { - setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); - return getDocClientWrapper().queryCollections(getLink(), querySpec, options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosContainerPropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); - }); + public CosmosPagedFlux queryContainers(SqlQuerySpec querySpec + , CosmosQueryRequestOptions options) { + return queryContainersInternal(querySpec, options); } /** @@ -530,8 +509,6 @@ public CosmosAsyncContainer getContainer(String id) { return new CosmosAsyncContainer(id, this); } - /** User operations **/ - /** * Creates a user After subscription the operation will be performed. The * {@link Mono} upon successful completion will contain a single resource @@ -543,11 +520,9 @@ public CosmosAsyncContainer getContainer(String id) { * created cosmos user or an error. */ public Mono createUser(CosmosUserProperties userProperties) { - return getDocClientWrapper().createUser(this.getLink(), ModelBridgeInternal.getV2User(userProperties), null) - .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return withContext(context -> createUserInternal(userProperties, context)); } - /** * Upsert a user. Upsert will create a new user if it doesn't exist, or replace * the existing one if it does. After subscription the operation will be @@ -560,8 +535,7 @@ public Mono createUser(CosmosUserProperties userProperties) * upserted user or an error. */ public Mono upsertUser(CosmosUserProperties userProperties) { - return getDocClientWrapper().upsertUser(this.getLink(), ModelBridgeInternal.getV2User(userProperties), null) - .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return withContext(context -> upsertUserInternal(userProperties, context)); } /** @@ -591,11 +565,14 @@ public CosmosPagedFlux readAllUsers() { */ CosmosPagedFlux readAllUsers(CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "readAllUsers." + this.getId(); + pagedFluxOptions.setTracerInformation(this.getClient().getTracerProvider(), spanName, + this.getClient().getServiceEndpoint(), getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return getDocClientWrapper().readUsers(getLink(), options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosUserPropertiesFromV2Results(response.getResults()), response - .getResponseHeaders())); + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosUserPropertiesFromV2Results(response.getResults()), response + .getResponseHeaders())); }); } @@ -627,7 +604,7 @@ public CosmosPagedFlux queryUsers(String query) { * obtained users or an error. */ public CosmosPagedFlux queryUsers(String query, CosmosQueryRequestOptions options) { - return queryUsers(new SqlQuerySpec(query), options); + return queryUsersInternal(new SqlQuerySpec(query), options); } /** @@ -642,7 +619,7 @@ public CosmosPagedFlux queryUsers(String query, CosmosQuer * obtained users or an error. */ public CosmosPagedFlux queryUsers(SqlQuerySpec querySpec) { - return queryUsers(querySpec, new CosmosQueryRequestOptions()); + return queryUsersInternal(querySpec, new CosmosQueryRequestOptions()); } /** @@ -658,13 +635,7 @@ public CosmosPagedFlux queryUsers(SqlQuerySpec querySpec) * obtained users or an error. */ public CosmosPagedFlux queryUsers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) { - return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { - setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); - return getDocClientWrapper().queryUsers(getLink(), querySpec, options) - .map(response -> BridgeInternal.createFeedResponseWithQueryMetrics( - ModelBridgeInternal.getCosmosUserPropertiesFromV2Results(response.getResults()), response.getResponseHeaders(), - ModelBridgeInternal.queryMetrics(response))); - }); + return queryUsersInternal(querySpec, options); } /** @@ -685,30 +656,7 @@ public CosmosAsyncUser getUser(String id) { * @return the mono. */ public Mono replaceThroughput(ThroughputProperties throughputProperties) { - return this.read() - .flatMap(response -> this.getDocClientWrapper() - .queryOffers(getOfferQuerySpecFromResourceId(response.getProperties().getResourceId()), - new CosmosQueryRequestOptions()) - .single() - .flatMap(offerFeedResponse -> { - if (offerFeedResponse.getResults().isEmpty()) { - return Mono.error(BridgeInternal - .createCosmosException( - HttpConstants.StatusCodes.BADREQUEST, - "No offers found for the " + - "resource " + this.getId())); - } - - Offer existingOffer = offerFeedResponse.getResults().get(0); - Offer updatedOffer = - ModelBridgeInternal.updateOfferFromProperties(existingOffer, - throughputProperties); - - return this.getDocClientWrapper() - .replaceOffer(updatedOffer) - .single(); - }) - .map(ModelBridgeInternal::createThroughputRespose)); + return withContext(context -> replaceThroughputInternal(throughputProperties, context)); } /** @@ -717,26 +665,7 @@ public Mono replaceThroughput(ThroughputProperties throughpu * @return the mono containing throughput response. */ public Mono readThroughput() { - return this.read() - .flatMap(response -> getDocClientWrapper() - .queryOffers(getOfferQuerySpecFromResourceId(response.getProperties().getResourceId()), - new CosmosQueryRequestOptions()) - .single() - .flatMap(offerFeedResponse -> { - if (offerFeedResponse.getResults().isEmpty()) { - return Mono.error(BridgeInternal - .createCosmosException( - HttpConstants.StatusCodes.BADREQUEST, - "No offers found for the " + - "resource " + this.getId())); - } - return getDocClientWrapper() - .readOffer(offerFeedResponse.getResults() - .get(0) - .getSelfLink()) - .single(); - }) - .map(ModelBridgeInternal::createThroughputRespose)); + return withContext(context -> readThroughputInternal(context)); } SqlQuerySpec getOfferQuerySpecFromResourceId(String resourceId) { @@ -768,4 +697,184 @@ String getLink() { return this.link; } + private CosmosPagedFlux queryContainersInternal(SqlQuerySpec querySpec + , CosmosQueryRequestOptions options) { + return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "queryContainers." + this.getId(); + pagedFluxOptions.setTracerInformation(this.getClient().getTracerProvider(), spanName, + this.getClient().getServiceEndpoint(), getId()); + setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); + return getDocClientWrapper().queryCollections(getLink(), querySpec, options) + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosContainerPropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); + }); + } + + private CosmosPagedFlux queryUsersInternal(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) { + return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "queryUsers." + this.getId(); + pagedFluxOptions.setTracerInformation(this.getClient().getTracerProvider(), spanName, + this.getClient().getServiceEndpoint(), getId()); + setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); + return getDocClientWrapper().queryUsers(getLink(), querySpec, options) + .map(response -> BridgeInternal.createFeedResponseWithQueryMetrics( + ModelBridgeInternal.getCosmosUserPropertiesFromV2Results(response.getResults()), + response.getResponseHeaders(), + ModelBridgeInternal.queryMetrics(response))); + }); + } + + private Mono createContainerIfNotExistsInternal( + CosmosContainerProperties containerProperties, + CosmosAsyncContainer container, + CosmosContainerRequestOptions options, + Context context) { + String spanName = "createContainerIfNotExists." + containerProperties.getId(); + Context nestedContext = context.addData(TracerProvider.COSMOS_CALL_DEPTH, TracerProvider.COSMOS_CALL_DEPTH_VAL); + final CosmosContainerRequestOptions requestOptions = options == null ? new CosmosContainerRequestOptions() : + options; + Mono responseMono = + container.read(requestOptions, nestedContext).onErrorResume(exception -> { + final Throwable unwrappedException = Exceptions.unwrap(exception); + if (unwrappedException instanceof CosmosException) { + final CosmosException cosmosException = (CosmosException) unwrappedException; + if (cosmosException.getStatusCode() == HttpConstants.StatusCodes.NOTFOUND) { + return createContainerInternal(containerProperties, requestOptions, nestedContext); + } + } + return Mono.error(unwrappedException); + }); + return this.client.getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + getId(), + getClient().getServiceEndpoint()); + } + + private Mono createContainerInternal( + CosmosContainerProperties containerProperties, + CosmosContainerRequestOptions options, + Context context) { + String spanName = "createContainer." + containerProperties.getId(); + Mono responseMono = getDocClientWrapper() + .createCollection(this.getLink(), ModelBridgeInternal.getV2Collection(containerProperties), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosContainerResponse(response)).single(); + return this.client.getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + getId(), + getClient().getServiceEndpoint()); + } + + Mono readInternal(CosmosDatabaseRequestOptions options, Context context) { + String spanName = "readDatabase." + this.getId(); + Mono responseMono = getDocClientWrapper().readDatabase(getLink(), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosDatabaseResponse(response)).single(); + return this.client.getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + getId(), + getClient().getServiceEndpoint()); + } + + private Mono deleteInternal(CosmosDatabaseRequestOptions options, Context context) { + String spanName = "deleteDatabase." + this.getId(); + Mono responseMono = getDocClientWrapper().deleteDatabase(getLink(), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosDatabaseResponse(response)).single(); + return this.client.getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + getId(), + getClient().getServiceEndpoint()); + } + + private Mono createUserInternal(CosmosUserProperties userProperties, Context context) { + String spanName = "createUser." + this.getId(); + Mono responseMono = getDocClientWrapper().createUser(this.getLink(), ModelBridgeInternal.getV2User(userProperties), null) + .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return this.client.getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + getId(), + getClient().getServiceEndpoint()); + } + + private Mono upsertUserInternal(CosmosUserProperties userProperties, Context context) { + String spanName = "upsertUser." + this.getId(); + Mono responseMono = getDocClientWrapper().upsertUser(this.getLink(), ModelBridgeInternal.getV2User(userProperties), null) + .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return this.client.getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, getId(), getClient().getServiceEndpoint()); + } + + private Mono replaceThroughputInternal(ThroughputProperties throughputProperties, Context context){ + String spanName = "replaceThroughput." + this.getId(); + Context nestedContext = context.addData(TracerProvider.COSMOS_CALL_DEPTH, TracerProvider.COSMOS_CALL_DEPTH_VAL); + Mono responseMono = replaceThroughputInternal(this.readInternal(new CosmosDatabaseRequestOptions(), nestedContext), throughputProperties); + return this.client.getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + getId(), + getClient().getServiceEndpoint()); + } + + private Mono replaceThroughputInternal(Mono responseMono, ThroughputProperties throughputProperties) { + return responseMono + .flatMap(response -> this.getDocClientWrapper() + .queryOffers(getOfferQuerySpecFromResourceId(response.getProperties().getResourceId()), + new CosmosQueryRequestOptions()) + .single() + .flatMap(offerFeedResponse -> { + if (offerFeedResponse.getResults().isEmpty()) { + return Mono.error(BridgeInternal + .createCosmosException( + HttpConstants.StatusCodes.BADREQUEST, + "No offers found for the " + + "resource " + this.getId())); + } + + Offer existingOffer = offerFeedResponse.getResults().get(0); + Offer updatedOffer = + ModelBridgeInternal.updateOfferFromProperties(existingOffer, + throughputProperties); + + return this.getDocClientWrapper() + .replaceOffer(updatedOffer) + .single(); + }) + .map(ModelBridgeInternal::createThroughputRespose)); + } + + private Mono readThroughputInternal(Context context){ + String spanName = "readThroughput." + this.getId(); + Context nestedContext = context.addData(TracerProvider.COSMOS_CALL_DEPTH, TracerProvider.COSMOS_CALL_DEPTH_VAL); + Mono responseMono = readThroughputInternal(this.readInternal(new CosmosDatabaseRequestOptions(), nestedContext)); + return this.client.getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + getId(), + getClient().getServiceEndpoint()); + } + + private Mono readThroughputInternal(Mono responseMono) { + return responseMono + .flatMap(response -> getDocClientWrapper() + .queryOffers(getOfferQuerySpecFromResourceId(response.getProperties().getResourceId()), + new CosmosQueryRequestOptions()) + .single() + .flatMap(offerFeedResponse -> { + if (offerFeedResponse.getResults().isEmpty()) { + return Mono.error(BridgeInternal + .createCosmosException( + HttpConstants.StatusCodes.BADREQUEST, + "No offers found for the " + + "resource " + this.getId())); + } + return getDocClientWrapper() + .readOffer(offerFeedResponse.getResults() + .get(0) + .getSelfLink()) + .single(); + }) + .map(ModelBridgeInternal::createThroughputRespose)); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncPermission.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncPermission.java index f01a52766820..5628f5a48a6b 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncPermission.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncPermission.java @@ -2,13 +2,16 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.Paths; -import com.azure.cosmos.models.CosmosPermissionResponse; import com.azure.cosmos.models.CosmosPermissionProperties; import com.azure.cosmos.models.CosmosPermissionRequestOptions; +import com.azure.cosmos.models.CosmosPermissionResponse; import com.azure.cosmos.models.ModelBridgeInternal; import reactor.core.publisher.Mono; +import static com.azure.core.util.FluxUtil.withContext; + /** * Has methods to operate on a per-User Permission to access a specific resource */ @@ -56,11 +59,9 @@ public Mono read(CosmosPermissionRequestOptions option if (options == null) { options = new CosmosPermissionRequestOptions(); } - return cosmosUser.getDatabase() - .getDocClientWrapper() - .readPermission(getLink(), ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) - .single(); + + final CosmosPermissionRequestOptions requestOptions = options; + return withContext(context -> readInternal(requestOptions, context)); } /** @@ -79,13 +80,9 @@ public Mono replace(CosmosPermissionProperties permiss if (options == null) { options = new CosmosPermissionRequestOptions(); } - CosmosAsyncDatabase databaseContext = cosmosUser.getDatabase(); - return databaseContext - .getDocClientWrapper() - .replacePermission(ModelBridgeInternal.getPermission(permissionProperties, databaseContext.getId()), - ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) - .single(); + + final CosmosPermissionRequestOptions requestOptions = options; + return withContext(context -> replaceInternal(permissionProperties, requestOptions, context)); } /** @@ -102,11 +99,9 @@ public Mono delete(CosmosPermissionRequestOptions opti if (options == null) { options = new CosmosPermissionRequestOptions(); } - return cosmosUser.getDatabase() - .getDocClientWrapper() - .deletePermission(getLink(), ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) - .single(); + + final CosmosPermissionRequestOptions requestOptions = options; + return withContext(context -> deleteInternal(requestOptions, context)); } String getURIPathSegment() { @@ -126,4 +121,51 @@ String getLink() { builder.append(getId()); return builder.toString(); } + + private Mono readInternal(CosmosPermissionRequestOptions options, Context context) { + + String spanName = "readPermission." + cosmosUser.getId(); + Mono responseMono = cosmosUser.getDatabase() + .getDocClientWrapper() + .readPermission(getLink(), ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) + .single(); + return cosmosUser.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + cosmosUser.getDatabase().getId(), + cosmosUser.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono replaceInternal(CosmosPermissionProperties permissionProperties, + CosmosPermissionRequestOptions options, + Context context) { + + String spanName = "replacePermission." + cosmosUser.getId(); + CosmosAsyncDatabase databaseContext = cosmosUser.getDatabase(); + Mono responseMono = cosmosUser.getDatabase() + .getDocClientWrapper() + .replacePermission(ModelBridgeInternal.getPermission(permissionProperties, databaseContext.getId()), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) + .single(); + return cosmosUser.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + cosmosUser.getDatabase().getId(), + cosmosUser.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono deleteInternal(CosmosPermissionRequestOptions options, + Context context) { + + String spanName = "deletePermission." + cosmosUser.getId(); + Mono responseMono = cosmosUser.getDatabase() + .getDocClientWrapper() + .deletePermission(getLink(), ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) + .single(); + return cosmosUser.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + cosmosUser.getDatabase().getId(), + cosmosUser.getDatabase().getClient().getServiceEndpoint()); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncScripts.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncScripts.java index 7ea5249b8b70..7079baa3e225 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncScripts.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncScripts.java @@ -2,23 +2,25 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.StoredProcedure; import com.azure.cosmos.implementation.Trigger; import com.azure.cosmos.implementation.UserDefinedFunction; -import com.azure.cosmos.models.CosmosStoredProcedureResponse; -import com.azure.cosmos.models.CosmosTriggerResponse; -import com.azure.cosmos.models.CosmosUserDefinedFunctionResponse; +import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.CosmosStoredProcedureProperties; import com.azure.cosmos.models.CosmosStoredProcedureRequestOptions; +import com.azure.cosmos.models.CosmosStoredProcedureResponse; import com.azure.cosmos.models.CosmosTriggerProperties; +import com.azure.cosmos.models.CosmosTriggerResponse; import com.azure.cosmos.models.CosmosUserDefinedFunctionProperties; -import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.CosmosUserDefinedFunctionResponse; import com.azure.cosmos.models.ModelBridgeInternal; import com.azure.cosmos.models.SqlQuerySpec; import com.azure.cosmos.util.CosmosPagedFlux; import com.azure.cosmos.util.UtilBridgeInternal; import reactor.core.publisher.Mono; +import static com.azure.core.util.FluxUtil.withContext; import static com.azure.cosmos.implementation.Utils.setContinuationTokenAndMaxItemCount; /** @@ -71,10 +73,8 @@ public Mono createStoredProcedure( StoredProcedure sProc = new StoredProcedure(); sProc.setId(properties.getId()); sProc.setBody(properties.getBody()); - return database.getDocClientWrapper() - .createStoredProcedure(container.getLink(), sProc, ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)) - .single(); + final CosmosStoredProcedureRequestOptions requestOptions = options; + return withContext(context -> createStoredProcedureInternal(sProc, requestOptions, context)); } /** @@ -108,6 +108,11 @@ public CosmosPagedFlux readAllStoredProcedures( */ CosmosPagedFlux readAllStoredProcedures(CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "readAllStoredProcedures." + this.container.getId(); + pagedFluxOptions.setTracerInformation(this.container.getDatabase().getClient().getTracerProvider(), + spanName, + this.container.getDatabase().getClient().getServiceEndpoint(), + this.container.getDatabase().getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return database.getDocClientWrapper() .readStoredProcedures(container.getLink(), options) @@ -132,8 +137,8 @@ CosmosPagedFlux readAllStoredProcedures(CosmosQ */ public CosmosPagedFlux queryStoredProcedures( String query, - CosmosQueryRequestOptions options) { - return queryStoredProcedures(new SqlQuerySpec(query), options); + CosmosQueryRequestOptions options) { + return queryStoredProceduresInternal(new SqlQuerySpec(query), options); } /** @@ -152,14 +157,7 @@ public CosmosPagedFlux queryStoredProcedures( public CosmosPagedFlux queryStoredProcedures( SqlQuerySpec querySpec, CosmosQueryRequestOptions options) { - return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { - setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); - return database.getDocClientWrapper() - .queryStoredProcedures(container.getLink(), querySpec, options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosStoredProcedurePropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); - }); + return queryStoredProceduresInternal(querySpec, options); } /** @@ -172,7 +170,6 @@ public CosmosAsyncStoredProcedure getStoredProcedure(String id) { return new CosmosAsyncStoredProcedure(id, this.container); } - /* UDF Operations */ /** @@ -191,10 +188,7 @@ public Mono createUserDefinedFunction( UserDefinedFunction udf = new UserDefinedFunction(); udf.setId(properties.getId()); udf.setBody(properties.getBody()); - - return database.getDocClientWrapper() - .createUserDefinedFunction(container.getLink(), udf, null) - .map(response -> ModelBridgeInternal.createCosmosUserDefinedFunctionResponse(response)).single(); + return withContext(context -> createUserDefinedFunctionInternal(udf, context)); } /** @@ -226,12 +220,17 @@ public CosmosPagedFlux readAllUserDefinedFu */ CosmosPagedFlux readAllUserDefinedFunctions(CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "readAllUserDefinedFunctions." + this.container.getId(); + pagedFluxOptions.setTracerInformation(this.container.getDatabase().getClient().getTracerProvider(), + spanName, + this.container.getDatabase().getClient().getServiceEndpoint(), + this.container.getDatabase().getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return database.getDocClientWrapper() - .readUserDefinedFunctions(container.getLink(), options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosUserDefinedFunctionPropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); + .readUserDefinedFunctions(container.getLink(), options) + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosUserDefinedFunctionPropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); }); } @@ -272,14 +271,7 @@ public CosmosPagedFlux queryUserDefinedFunc public CosmosPagedFlux queryUserDefinedFunctions( SqlQuerySpec querySpec, CosmosQueryRequestOptions options) { - return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { - setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); - return database.getDocClientWrapper() - .queryUserDefinedFunctions(container.getLink(), querySpec, options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosUserDefinedFunctionPropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); - }); + return queryUserDefinedFunctionsInternal(querySpec, options); } /** @@ -305,12 +297,7 @@ public CosmosAsyncUserDefinedFunction getUserDefinedFunction(String id) { * @return an {@link Mono} containing the single resource response with the created trigger or an error. */ public Mono createTrigger(CosmosTriggerProperties properties) { - Trigger trigger = new Trigger(ModelBridgeInternal.toJsonFromJsonSerializable(ModelBridgeInternal.getResource(properties))); - - return database.getDocClientWrapper() - .createTrigger(container.getLink(), trigger, null) - .map(response -> ModelBridgeInternal.createCosmosTriggerResponse(response)) - .single(); + return withContext(context -> createTriggerInternal(properties, context)); } /** @@ -344,6 +331,11 @@ public CosmosPagedFlux readAllTriggers() { */ CosmosPagedFlux readAllTriggers(CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "readAllTriggers." + this.container.getId(); + pagedFluxOptions.setTracerInformation(this.container.getDatabase().getClient().getTracerProvider(), + spanName, + this.container.getDatabase().getClient().getServiceEndpoint(), + this.container.getDatabase().getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return database.getDocClientWrapper() .readTriggers(container.getLink(), options) @@ -366,7 +358,7 @@ CosmosPagedFlux readAllTriggers(CosmosQueryRequestOptio * error. */ public CosmosPagedFlux queryTriggers(String query, CosmosQueryRequestOptions options) { - return queryTriggers(new SqlQuerySpec(query), options); + return queryTriggersInternal(false, new SqlQuerySpec(query), options); } /** @@ -384,14 +376,7 @@ public CosmosPagedFlux queryTriggers(String query, Cosm public CosmosPagedFlux queryTriggers( SqlQuerySpec querySpec, CosmosQueryRequestOptions options) { - return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { - setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); - return database.getDocClientWrapper() - .queryTriggers(container.getLink(), querySpec, options) - .map(response -> BridgeInternal.createFeedResponse( - ModelBridgeInternal.getCosmosTriggerPropertiesFromV2Results(response.getResults()), - response.getResponseHeaders())); - }); + return queryTriggersInternal(true, querySpec, options); } /** @@ -404,4 +389,120 @@ public CosmosAsyncTrigger getTrigger(String id) { return new CosmosAsyncTrigger(id, this.container); } + private CosmosPagedFlux queryStoredProceduresInternal( + SqlQuerySpec querySpec, + CosmosQueryRequestOptions options) { + return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "queryStoredProcedures." + this.container.getId(); + pagedFluxOptions.setTracerInformation(this.container.getDatabase().getClient().getTracerProvider(), + spanName, + this.container.getDatabase().getClient().getServiceEndpoint(), + this.container.getDatabase().getId()); + setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); + return database.getDocClientWrapper() + .queryStoredProcedures(container.getLink(), querySpec, options) + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosStoredProcedurePropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); + }); + } + + private CosmosPagedFlux queryUserDefinedFunctionsInternal( + SqlQuerySpec querySpec, + CosmosQueryRequestOptions options) { + return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "queryUserDefinedFunctions." + this.container.getId(); + pagedFluxOptions.setTracerInformation(this.container.getDatabase().getClient().getTracerProvider(), + spanName, + this.container.getDatabase().getClient().getServiceEndpoint(), + this.container.getDatabase().getId()); + setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); + return database.getDocClientWrapper() + .queryUserDefinedFunctions(container.getLink(), querySpec, options) + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosUserDefinedFunctionPropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); + }); + } + + private CosmosPagedFlux queryTriggersInternal( + boolean isParameterised, + SqlQuerySpec querySpec, + CosmosQueryRequestOptions options) { + return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName; + if (isParameterised) { + spanName = "queryTriggers." + this.container.getId() + "." + querySpec.getQueryText(); + } else { + spanName = "queryTriggers." + this.container.getId(); + } + + pagedFluxOptions.setTracerInformation(this.container.getDatabase().getClient().getTracerProvider(), + spanName, + this.container.getDatabase().getClient().getServiceEndpoint(), + this.container.getDatabase().getId()); + setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); + return database.getDocClientWrapper() + .queryTriggers(container.getLink(), querySpec, options) + .map(response -> BridgeInternal.createFeedResponse( + ModelBridgeInternal.getCosmosTriggerPropertiesFromV2Results(response.getResults()), + response.getResponseHeaders())); + }); + } + + private Mono createStoredProcedureInternal(StoredProcedure sProc, + CosmosStoredProcedureRequestOptions options, + Context context) { + String spanName = "createStoredProcedure." + container.getId(); + Mono responseMono = createStoredProcedureInternal(sProc, options); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono createStoredProcedureInternal(StoredProcedure sProc, + CosmosStoredProcedureRequestOptions options) { + return database.getDocClientWrapper() + .createStoredProcedure(container.getLink(), sProc, ModelBridgeInternal.toRequestOptions(options)).map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)) + .single(); + } + + private Mono createUserDefinedFunctionInternal( + UserDefinedFunction udf, + Context context) { + String spanName = "createUserDefinedFunction." + container.getId(); + Mono responseMono = createUserDefinedFunctionInternal(udf); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono createUserDefinedFunctionInternal( + UserDefinedFunction udf) { + return database.getDocClientWrapper() + .createUserDefinedFunction(container.getLink(), udf, null).map(response -> ModelBridgeInternal.createCosmosUserDefinedFunctionResponse(response)).single(); + } + + private Mono createTriggerInternal(CosmosTriggerProperties properties, Context context) { + String spanName = "createTrigger." + container.getId(); + Mono responseMono = createTriggerInternal(properties); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono createTriggerInternal(CosmosTriggerProperties properties) { + Trigger trigger = new Trigger(ModelBridgeInternal.toJsonFromJsonSerializable(ModelBridgeInternal.getResource(properties))); + return database.getDocClientWrapper() + .createTrigger(container.getLink(), trigger, null) + .map(response -> ModelBridgeInternal.createCosmosTriggerResponse(response)) + .single(); + } + } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncStoredProcedure.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncStoredProcedure.java index 8e0a51768818..788aa4befa9e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncStoredProcedure.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncStoredProcedure.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.Paths; import com.azure.cosmos.implementation.StoredProcedure; import com.azure.cosmos.models.CosmosStoredProcedureResponse; @@ -10,6 +11,7 @@ import com.azure.cosmos.models.ModelBridgeInternal; import reactor.core.publisher.Mono; +import static com.azure.core.util.FluxUtil.withContext; import java.util.List; /** @@ -72,12 +74,7 @@ public Mono read() { * @return an {@link Mono} containing the single resource response with the read stored procedure or an error. */ public Mono read(CosmosStoredProcedureRequestOptions options) { - if (options == null) { - options = new CosmosStoredProcedureRequestOptions(); - } - return cosmosContainer.getDatabase().getDocClientWrapper().readStoredProcedure(getLink(), - ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)).single(); + return withContext(context -> readInternal(options, context)); } /** @@ -106,14 +103,7 @@ public Mono delete() { * @return an {@link Mono} containing the single resource response for the deleted stored procedure or an error. */ public Mono delete(CosmosStoredProcedureRequestOptions options) { - if (options == null) { - options = new CosmosStoredProcedureRequestOptions(); - } - return cosmosContainer.getDatabase() - .getDocClientWrapper() - .deleteStoredProcedure(getLink(), ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)) - .single(); + return withContext(context -> deleteInternal(options, context)); } /** @@ -129,15 +119,8 @@ public Mono delete(CosmosStoredProcedureRequestOp * @return an {@link Mono} containing the single resource response with the stored procedure response or an error. */ public Mono execute(List procedureParams, - CosmosStoredProcedureRequestOptions options) { - if (options == null) { - options = new CosmosStoredProcedureRequestOptions(); - } - return cosmosContainer.getDatabase() - .getDocClientWrapper() - .executeStoredProcedure(getLink(), ModelBridgeInternal.toRequestOptions(options), procedureParams) - .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)) - .single(); + CosmosStoredProcedureRequestOptions options) { + return withContext(context -> executeInternal(procedureParams, options, context)); } /** @@ -168,17 +151,9 @@ public Mono replace(CosmosStoredProcedureProperti * @return an {@link Mono} containing the single resource response with the replaced stored procedure or an error. */ public Mono replace(CosmosStoredProcedureProperties storedProcedureProperties, - CosmosStoredProcedureRequestOptions options) { - if (options == null) { - options = new CosmosStoredProcedureRequestOptions(); - } - return cosmosContainer.getDatabase() - .getDocClientWrapper() - .replaceStoredProcedure(new StoredProcedure(ModelBridgeInternal.toJsonFromJsonSerializable( - ModelBridgeInternal.getResource(storedProcedureProperties))), - ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)) - .single(); + CosmosStoredProcedureRequestOptions options) { + return withContext(context -> replaceInternal(storedProcedureProperties, options, + context)); } String getURIPathSegment() { @@ -198,4 +173,74 @@ String getLink() { builder.append(getId()); return builder.toString(); } + + private Mono readInternal(CosmosStoredProcedureRequestOptions options, + Context context) { + if (options == null) { + options = new CosmosStoredProcedureRequestOptions(); + } + + String spanName = "readStoredProcedure." + cosmosContainer.getId(); + Mono responseMono = cosmosContainer.getDatabase().getDocClientWrapper().readStoredProcedure(getLink(), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)).single(); + return this.cosmosContainer.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + cosmosContainer.getDatabase().getId(), + cosmosContainer.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono deleteInternal(CosmosStoredProcedureRequestOptions options, + Context context) { + if (options == null) { + options = new CosmosStoredProcedureRequestOptions(); + } + + String spanName = "deleteStoredProcedure." + cosmosContainer.getId(); + Mono responseMono = cosmosContainer.getDatabase() + .getDocClientWrapper() + .deleteStoredProcedure(getLink(), ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)) + .single(); + return this.cosmosContainer.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + cosmosContainer.getDatabase().getId(), + cosmosContainer.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono executeInternal(List procedureParams, + CosmosStoredProcedureRequestOptions options, + Context context) { + if (options == null) { + options = new CosmosStoredProcedureRequestOptions(); + } + + String spanName = "executeStoredProcedure." + cosmosContainer.getId(); + Mono responseMono = cosmosContainer.getDatabase() + .getDocClientWrapper() + .executeStoredProcedure(getLink(), ModelBridgeInternal.toRequestOptions(options), procedureParams) + .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)) + .single(); + return this.cosmosContainer.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, spanName, cosmosContainer.getDatabase().getId(), cosmosContainer.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono replaceInternal(CosmosStoredProcedureProperties storedProcedureSettings, + CosmosStoredProcedureRequestOptions options, + Context context) { + if (options == null) { + options = new CosmosStoredProcedureRequestOptions(); + } + + String spanName = "replaceStoredProcedure." + cosmosContainer.getId(); + Mono responseMono = cosmosContainer.getDatabase() + .getDocClientWrapper() + .replaceStoredProcedure(new StoredProcedure(ModelBridgeInternal.toJsonFromJsonSerializable( + ModelBridgeInternal.getResource(storedProcedureSettings))), + ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosStoredProcedureResponse(response)) + .single(); + return this.cosmosContainer.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, spanName, cosmosContainer.getDatabase().getId(), cosmosContainer.getDatabase().getClient().getServiceEndpoint()); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncTrigger.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncTrigger.java index ae06eb230079..cba93102874d 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncTrigger.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncTrigger.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.Paths; import com.azure.cosmos.implementation.Trigger; import com.azure.cosmos.models.CosmosTriggerResponse; @@ -9,6 +10,8 @@ import com.azure.cosmos.models.ModelBridgeInternal; import reactor.core.publisher.Mono; +import static com.azure.core.util.FluxUtil.withContext; + /** * The type Cosmos async trigger. This contains methods to operate on a cosmos trigger asynchronously */ @@ -52,14 +55,9 @@ CosmosAsyncTrigger setId(String id) { * @return an {@link Mono} containing the single resource response for the read cosmos trigger or an error. */ public Mono read() { - return container.getDatabase() - .getDocClientWrapper() - .readTrigger(getLink(), null) - .map(response -> ModelBridgeInternal.createCosmosTriggerResponse(response)) - .single(); + return withContext(context -> readInternal(context)); } - /** * Replaces a cosmos trigger. *

    @@ -71,12 +69,7 @@ public Mono read() { * @return an {@link Mono} containing the single resource response with the replaced cosmos trigger or an error. */ public Mono replace(CosmosTriggerProperties triggerProperties) { - return container.getDatabase() - .getDocClientWrapper() - .replaceTrigger(new Trigger(ModelBridgeInternal.toJsonFromJsonSerializable( - ModelBridgeInternal.getResource(triggerProperties))), null) - .map(response -> ModelBridgeInternal.createCosmosTriggerResponse(response)) - .single(); + return withContext(context -> replaceInternal(triggerProperties, context)); } /** @@ -89,11 +82,7 @@ public Mono replace(CosmosTriggerProperties triggerProper * @return an {@link Mono} containing the single resource response for the deleted cosmos trigger or an error. */ public Mono delete() { - return container.getDatabase() - .getDocClientWrapper() - .deleteTrigger(getLink(), null) - .map(response -> ModelBridgeInternal.createCosmosTriggerResponse(response)) - .single(); + return withContext(context -> deleteInternal(context)); } String getURIPathSegment() { @@ -114,4 +103,46 @@ String getLink() { return builder.toString(); } + private Mono readInternal(Context context) { + String spanName = "readTrigger." + container.getId(); + Mono responseMono = container.getDatabase() + .getDocClientWrapper() + .readTrigger(getLink(), null) + .map(response -> ModelBridgeInternal.createCosmosTriggerResponse(response)) + .single(); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + container.getDatabase().getId(), + container.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono replaceInternal(CosmosTriggerProperties triggerSettings, Context context) { + String spanName = "replaceTrigger." + container.getId(); + Mono responseMono = container.getDatabase() + .getDocClientWrapper() + .replaceTrigger(new Trigger(ModelBridgeInternal.toJsonFromJsonSerializable( + ModelBridgeInternal.getResource(triggerSettings))), null) + .map(response -> ModelBridgeInternal.createCosmosTriggerResponse(response)) + .single(); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + container.getDatabase().getId(), + container.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono deleteInternal(Context context) { + String spanName = "deleteTrigger." + container.getId(); + Mono responseMono = container.getDatabase() + .getDocClientWrapper() + .deleteTrigger(getLink(), null) + .map(response -> ModelBridgeInternal.createCosmosTriggerResponse(response)) + .single(); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + container.getDatabase().getId(), + container.getDatabase().getClient().getServiceEndpoint()); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncUser.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncUser.java index d23e239e2969..ea879a5ff899 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncUser.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncUser.java @@ -3,7 +3,9 @@ package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.Paths; +import com.azure.cosmos.implementation.Permission; import com.azure.cosmos.models.CosmosPermissionResponse; import com.azure.cosmos.models.CosmosUserResponse; import com.azure.cosmos.models.CosmosPermissionProperties; @@ -11,11 +13,11 @@ import com.azure.cosmos.models.CosmosUserProperties; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.ModelBridgeInternal; -import com.azure.cosmos.implementation.Permission; import com.azure.cosmos.util.CosmosPagedFlux; import com.azure.cosmos.util.UtilBridgeInternal; import reactor.core.publisher.Mono; +import static com.azure.core.util.FluxUtil.withContext; import static com.azure.cosmos.implementation.Utils.setContinuationTokenAndMaxItemCount; /** @@ -56,9 +58,7 @@ CosmosAsyncUser setId(String id) { * @return a {@link Mono} containing the single resource response with the read user or an error. */ public Mono read() { - return this.database.getDocClientWrapper() - .readUser(getLink(), null) - .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return withContext(context -> readInternal(context)); } /** @@ -68,9 +68,7 @@ public Mono read() { * @return a {@link Mono} containing the single resource response with the replaced user or an error. */ public Mono replace(CosmosUserProperties userProperties) { - return this.database.getDocClientWrapper() - .replaceUser(ModelBridgeInternal.getV2User(userProperties), null) - .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return withContext(context -> replaceInternal(userProperties, context)); } /** @@ -79,9 +77,7 @@ public Mono replace(CosmosUserProperties userProperties) { * @return a {@link Mono} containing the single resource response with the deleted user or an error. */ public Mono delete() { - return this.database.getDocClientWrapper() - .deleteUser(getLink(), null) - .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return withContext(context -> deleteInternal(context)); } /** @@ -98,14 +94,9 @@ public Mono delete() { public Mono createPermission( CosmosPermissionProperties permissionProperties, CosmosPermissionRequestOptions options) { - if (options == null) { - options = new CosmosPermissionRequestOptions(); - } + final CosmosPermissionRequestOptions requestOptions = options == null ? new CosmosPermissionRequestOptions() : options; Permission permission = ModelBridgeInternal.getPermission(permissionProperties, database.getId()); - return database.getDocClientWrapper() - .createPermission(getLink(), permission, ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) - .single(); + return withContext(context -> createPermissionInternal(permission, requestOptions, context)); } /** @@ -123,13 +114,8 @@ public Mono upsertPermission( CosmosPermissionProperties permissionProperties, CosmosPermissionRequestOptions options) { Permission permission = ModelBridgeInternal.getPermission(permissionProperties, database.getId()); - if (options == null) { - options = new CosmosPermissionRequestOptions(); - } - return database.getDocClientWrapper() - .upsertPermission(getLink(), permission, ModelBridgeInternal.toRequestOptions(options)) - .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) - .single(); + final CosmosPermissionRequestOptions requestOptions = options == null ? new CosmosPermissionRequestOptions() : options; + return withContext(context -> upsertPermissionInternal(permission, requestOptions, context)); } @@ -160,6 +146,11 @@ public CosmosPagedFlux readAllPermissions() { */ CosmosPagedFlux readAllPermissions(CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "readAllPermissions." + this.getId(); + pagedFluxOptions.setTracerInformation(this.getDatabase().getClient().getTracerProvider(), + spanName, + this.getDatabase().getClient().getServiceEndpoint(), + this.getDatabase().getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return getDatabase().getDocClientWrapper() .readPermissions(getLink(), options) @@ -198,6 +189,11 @@ public CosmosPagedFlux queryPermissions(String query */ public CosmosPagedFlux queryPermissions(String query, CosmosQueryRequestOptions options) { return UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + String spanName = "queryPermissions." + this.getId(); + pagedFluxOptions.setTracerInformation(this.getDatabase().getClient().getTracerProvider(), + spanName, + this.getDatabase().getClient().getServiceEndpoint(), + this.getDatabase().getId()); setContinuationTokenAndMaxItemCount(pagedFluxOptions, options); return getDatabase().getDocClientWrapper() .queryPermissions(getLink(), query, options) @@ -243,4 +239,67 @@ String getLink() { CosmosAsyncDatabase getDatabase() { return database; } + + private Mono readInternal(Context context) { + String spanName = "readUser." + getId(); + Mono responseMono = this.database.getDocClientWrapper() + .readUser(getLink(), null) + .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return database.getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono replaceInternal(CosmosUserProperties userSettings, Context context) { + String spanName = "replaceUser." + getId(); + Mono responseMono = this.database.getDocClientWrapper() + .replaceUser(ModelBridgeInternal.getV2User(userSettings), null) + .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return database.getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono deleteInternal(Context context) { + String spanName = "deleteUser." + getId(); + Mono responseMono = this.database.getDocClientWrapper() + .deleteUser(getLink(), null) + .map(response -> ModelBridgeInternal.createCosmosUserResponse(response)).single(); + return database.getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono createPermissionInternal( + Permission permission, + CosmosPermissionRequestOptions options, + Context context) { + String spanName = "createPermission." + getId(); + Mono responseMono = database.getDocClientWrapper() + .createPermission(getLink(), permission, ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) + .single(); + return database.getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } + + private Mono upsertPermissionInternal( + Permission permission, + CosmosPermissionRequestOptions options, + Context context) { + String spanName = "upsertPermission." + getId(); + Mono responseMono = database.getDocClientWrapper() + .upsertPermission(getLink(), permission, ModelBridgeInternal.toRequestOptions(options)) + .map(response -> ModelBridgeInternal.createCosmosPermissionResponse(response)) + .single(); + return database.getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, context, + spanName, + database.getId(), + database.getClient().getServiceEndpoint()); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncUserDefinedFunction.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncUserDefinedFunction.java index 7710818dd0fb..457f912bc497 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncUserDefinedFunction.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncUserDefinedFunction.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.core.util.Context; import com.azure.cosmos.implementation.Paths; import com.azure.cosmos.implementation.UserDefinedFunction; import com.azure.cosmos.models.CosmosUserDefinedFunctionResponse; @@ -9,6 +10,8 @@ import com.azure.cosmos.models.ModelBridgeInternal; import reactor.core.publisher.Mono; +import static com.azure.core.util.FluxUtil.withContext; + /** * The type Cosmos async user defined function. */ @@ -54,8 +57,7 @@ CosmosAsyncUserDefinedFunction setId(String id) { * @return an {@link Mono} containing the single resource response for the read user defined function or an error. */ public Mono read() { - return container.getDatabase().getDocClientWrapper().readUserDefinedFunction(getLink(), null) - .map(response -> ModelBridgeInternal.createCosmosUserDefinedFunctionResponse(response)).single(); + return withContext(context -> readInternal(context)); } /** @@ -71,12 +73,7 @@ public Mono read() { * or an error. */ public Mono replace(CosmosUserDefinedFunctionProperties udfSettings) { - return container.getDatabase() - .getDocClientWrapper() - .replaceUserDefinedFunction(new UserDefinedFunction(ModelBridgeInternal.toJsonFromJsonSerializable( - ModelBridgeInternal.getResource(udfSettings))), null) - .map(response -> ModelBridgeInternal.createCosmosUserDefinedFunctionResponse(response)) - .single(); + return withContext(context -> replaceInternal(udfSettings, context)); } /** @@ -91,11 +88,7 @@ public Mono replace(CosmosUserDefinedFunction * an error. */ public Mono delete() { - return container.getDatabase() - .getDocClientWrapper() - .deleteUserDefinedFunction(this.getLink(), null) - .map(response -> ModelBridgeInternal.createCosmosUserDefinedFunctionResponse(response)) - .single(); + return withContext(context -> deleteInternal(context)); } String getURIPathSegment() { @@ -115,4 +108,45 @@ String getLink() { builder.append(getId()); return builder.toString(); } + + private Mono readInternal(Context context) { + String spanName = "readUserDefinedFunction." + container.getId(); + Mono responseMono = container.getDatabase().getDocClientWrapper().readUserDefinedFunction(getLink(), null) + .map(response -> ModelBridgeInternal.createCosmosUserDefinedFunctionResponse(response)).single(); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + container.getDatabase().getId(), + container.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono replaceInternal(CosmosUserDefinedFunctionProperties udfSettings, + Context context) { + String spanName = "replaceUserDefinedFunction." + container.getId(); + Mono responseMono = container.getDatabase() + .getDocClientWrapper() + .replaceUserDefinedFunction(new UserDefinedFunction(ModelBridgeInternal.toJsonFromJsonSerializable( + ModelBridgeInternal.getResource(udfSettings))), null) + .map(response -> ModelBridgeInternal.createCosmosUserDefinedFunctionResponse(response)) + .single(); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + container.getDatabase().getId(), + container.getDatabase().getClient().getServiceEndpoint()); + } + + private Mono deleteInternal(Context context) { + String spanName = "deleteUserDefinedFunction." + container.getId(); + Mono responseMono = container.getDatabase() + .getDocClientWrapper() + .deleteUserDefinedFunction(this.getLink(), null) + .map(response -> ModelBridgeInternal.createCosmosUserDefinedFunctionResponse(response)) + .single(); + return this.container.getDatabase().getClient().getTracerProvider().traceEnabledCosmosResponsePublisher(responseMono, + context, + spanName, + container.getDatabase().getId(), + container.getDatabase().getClient().getServiceEndpoint()); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosBridgeInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosBridgeInternal.java index 476939832026..e7c26c76e6f2 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosBridgeInternal.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosBridgeInternal.java @@ -6,6 +6,7 @@ import com.azure.cosmos.implementation.AsyncDocumentClient; import com.azure.cosmos.implementation.ConnectionPolicy; import com.azure.cosmos.implementation.Warning; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; import static com.azure.cosmos.implementation.Warning.INTERNAL_USE_ONLY_WARNING; @@ -94,4 +95,11 @@ public static CosmosClientBuilder cloneCosmosClientBuilder(CosmosClientBuilder b return copy; } + + @Warning(value = INTERNAL_USE_ONLY_WARNING) + public static CosmosClientBuilder setDateKeyProvider(CosmosClientBuilder cosmosClientBuilder, + DataEncryptionKeyProvider dataEncryptionKeyProvider) { + cosmosClientBuilder.dataEncryptionKeyProvider(dataEncryptionKeyProvider); + return cosmosClientBuilder; + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosClientBuilder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosClientBuilder.java index 13892748126c..3dfac4761233 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosClientBuilder.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosClientBuilder.java @@ -8,6 +8,7 @@ import com.azure.cosmos.implementation.ConnectionPolicy; import com.azure.cosmos.implementation.CosmosAuthorizationTokenResolver; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; import com.azure.cosmos.models.CosmosPermissionProperties; import java.util.Collections; @@ -22,7 +23,7 @@ * Though consistencyLevel is not mandatory, but we strongly suggest to pay attention to this API when building client. * By default, account consistency level is used if none is provided. *

    - * By default, direct connection mode is used if none specified. + * By default, direct connection mode is used if none specified. *

      *     Building Cosmos Async Client minimal APIs (without any customized configurations)
      * {@code
    @@ -88,6 +89,7 @@ public class CosmosClientBuilder {
         private CosmosAuthorizationTokenResolver cosmosAuthorizationTokenResolver;
         private AzureKeyCredential credential;
         private boolean sessionCapturingOverrideEnabled;
    +    private DataEncryptionKeyProvider dataEncryptionKeyProvider;
         private boolean connectionSharingAcrossClientsEnabled;
         private boolean contentResponseOnWriteEnabled;
         private String userAgentSuffix;
    @@ -490,6 +492,15 @@ public CosmosClientBuilder preferredRegions(List preferredRegions) {
             return this;
         }
     
    +    CosmosClientBuilder dataEncryptionKeyProvider(DataEncryptionKeyProvider dataEncryptionKeyProvider) {
    +        this.dataEncryptionKeyProvider = dataEncryptionKeyProvider;
    +        return this;
    +    }
    +
    +    DataEncryptionKeyProvider getDataEncryptionKeyProvider() {
    +        return this.dataEncryptionKeyProvider;
    +    }
    +
         /**
          * Sets the flag to enable endpoint discovery for geo-replicated database accounts.
          * 

    diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java index f1077bf084c0..b984d19cc0bd 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java @@ -5,6 +5,7 @@ import com.azure.core.credential.AzureKeyCredential; import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; @@ -74,6 +75,7 @@ class Builder { AzureKeyCredential credential; boolean sessionCapturingOverride; boolean transportClientSharing; + private DataEncryptionKeyProvider dataEncryptionKeyProvider; boolean contentResponseOnWriteEnabled; public Builder withServiceEndpoint(String serviceEndpoint) { @@ -148,6 +150,12 @@ public Builder withTransportClientSharing(boolean transportClientSharing) { return this; } + public Builder withDataEncryptionKeyProvider(DataEncryptionKeyProvider dataEncryptionKeyProvider) { + this.dataEncryptionKeyProvider = dataEncryptionKeyProvider; + return this; + } + + public Builder withCredential(AzureKeyCredential credential) { if (credential != null && StringUtils.isEmpty(credential.getKey())) { throw new IllegalArgumentException("Cannot buildAsyncClient client with empty key credential"); @@ -200,6 +208,11 @@ public AsyncDocumentClient build() { sessionCapturingOverride, transportClientSharing, contentResponseOnWriteEnabled); + + if (dataEncryptionKeyProvider != null) { + client.registerDataEncryptionKeyProvider(dataEncryptionKeyProvider); + } + client.init(); return client; } @@ -1372,4 +1385,7 @@ Mono> readMany( */ void close(); + ItemDeserializer getItemDeserializer(); + + ItemDeserializer getItemDeserializerWithoutDecryption(); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Constants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Constants.java index fea6a976cb21..e741416872a8 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Constants.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Constants.java @@ -191,6 +191,15 @@ public static final class Properties { public static final String SSL_COMPLETION_HANDLER_NAME = "ssl-completion-handler"; public static final String HTTP_PROXY_HANDLER_NAME = "http-proxy-handler"; public static final String LOGGING_HANDLER_NAME = "logging-handler"; + + // encryption + public static final String WrappedDataEncryptionKey = "wrappedDataEncryptionKey"; + public static final String EncryptionAlgorithmId = "encryptionAlgorithmId"; + public static final String KeyWrapMetadata = "keyWrapMetadata"; + public static final String KeyWrapMetadataType = "type"; + public static final String KeyWrapMetadataValue = "value"; + public static final String EncryptedInfo = "_ei"; + } public static final class UrlEncodingInfo { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosPagedFluxOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosPagedFluxOptions.java index c4407b68bfee..28b4054180dc 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosPagedFluxOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosPagedFluxOptions.java @@ -5,6 +5,8 @@ import com.azure.cosmos.util.CosmosPagedFlux; +import java.util.Map; + /** * Specifies paging options for Cosmos Paged Flux implementation. * @see CosmosPagedFlux @@ -13,6 +15,11 @@ public class CosmosPagedFluxOptions { private String requestContinuation; private Integer maxItemCount; + private TracerProvider tracerProvider; + private String tracerSpanName; + private String databaseId; + private String serviceEndpoint; + public CosmosPagedFluxOptions() {} @@ -57,4 +64,43 @@ public CosmosPagedFluxOptions setMaxItemCount(Integer maxItemCount) { this.maxItemCount = maxItemCount; return this; } + + /** + * Gets the tracer provider + * @return tracerProvider + */ + public TracerProvider getTracerProvider() { + return this.tracerProvider; + } + + /** + * Gets the tracer span name + * @return tracerSpanName + */ + public String getTracerSpanName() { + return tracerSpanName; + } + + /** + * Gets the databaseId + * @return databaseId + */ + public String getDatabaseId() { + return databaseId; + } + + /** + * Gets the service end point + * @return serviceEndpoint + */ + public String getServiceEndpoint() { + return serviceEndpoint; + } + + public void setTracerInformation(TracerProvider tracerProvider, String tracerSpanName, String serviceEndpoint, String databaseId) { + this.databaseId = databaseId; + this.serviceEndpoint = serviceEndpoint; + this.tracerSpanName = tracerSpanName; + this.tracerProvider = tracerProvider; + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.java index b14fce7394f8..70df4dfc7a0f 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.java @@ -265,6 +265,7 @@ public static class Versions { } public static class StatusCodes { + public static final int OK = 200; public static final int NOT_MODIFIED = 304; // Client error public static final int MINIMUM_STATUSCODE_AS_ERROR_GATEWAY = 400; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemDeserializer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemDeserializer.java new file mode 100644 index 000000000000..fd032bd6e396 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemDeserializer.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation; + +import com.azure.cosmos.implementation.encryption.EncryptionProcessor; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; +import com.fasterxml.jackson.databind.node.ObjectNode; + + +public interface ItemDeserializer { + T parseFrom(Class classType, byte[] bytes); + T convert(Class classType, ObjectNode objectNode); + + + class JsonDeserializer implements ItemDeserializer { + public T parseFrom(Class classType, byte[] bytes) { + if (bytes == null) { + return null; + } + + // TODO: does this handdle jackson ObjectNode? + return Utils.parse(bytes, classType); + } + + @Override + @SuppressWarnings("unchecked") + public T convert(Class classType, ObjectNode objectNode) { + if (classType == ObjectNode.class) { + return (T) objectNode; + } + + return Utils.getSimpleObjectMapper().convertValue(objectNode, classType); + } + } + + class EncryptionDeserializer implements ItemDeserializer { + private final DataEncryptionKeyProvider dataEncryptionKeyProvider; + private final JsonDeserializer jsonDeserializer; + + public EncryptionDeserializer(DataEncryptionKeyProvider dataEncryptionKeyProvider, JsonDeserializer jsonDeserializer) { + this.dataEncryptionKeyProvider = dataEncryptionKeyProvider; + this.jsonDeserializer = jsonDeserializer; + } + + @Override + public T parseFrom(Class classType, byte[] bytes) { + if (bytes == null) { + return null; + } + + ObjectNode objectNode = jsonDeserializer.parseFrom(ObjectNode.class, bytes); + return convert(classType, objectNode); + } + + @Override + public T convert(Class classType, ObjectNode objectNode) { + if (objectNode == null) { + return null; + } + + EncryptionProcessor encryptionProcessor = new EncryptionProcessor(); + ObjectNode objectNodeWithSensitiveDataDecrypted = encryptionProcessor.decryptAsync(objectNode, dataEncryptionKeyProvider); + + return Utils.getSimpleObjectMapper().convertValue(objectNodeWithSensitiveDataDecrypted, classType); + } + } +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemSerializer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemSerializer.java new file mode 100644 index 000000000000..848ba7944444 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ItemSerializer.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation; + +import com.azure.cosmos.implementation.encryption.EncryptionProcessor; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; +import com.fasterxml.jackson.databind.node.ObjectNode; + +import java.nio.ByteBuffer; + +public interface ItemSerializer { + ByteBuffer serializeTo(T item); + + class JsonSerializer implements ItemSerializer { + @Override + public ByteBuffer serializeTo(T item) { + return InternalObjectNode.serializeJsonToByteBuffer(item, Utils.getSimpleObjectMapper()); + } + } + + class CosmosSerializer implements ItemSerializer { + private final JsonSerializer jsonSerializer = new JsonSerializer(); + private final DataEncryptionKeyProvider dataEncryptionKeyProvider; + private final EncryptionOptions encryptionOptions; + + public CosmosSerializer(DataEncryptionKeyProvider dataEncryptionKeyProvider, EncryptionOptions encryptionOptions) { + this.dataEncryptionKeyProvider = dataEncryptionKeyProvider; + this.encryptionOptions = encryptionOptions; + } + + @Override + public ByteBuffer serializeTo(T item) { + if (dataEncryptionKeyProvider == null + || encryptionOptions == null + || encryptionOptions.getPathsToEncrypt() == null + || encryptionOptions.getPathsToEncrypt().isEmpty() + || item instanceof Document + || item instanceof InternalObjectNode) { + return jsonSerializer.serializeTo(item); + } else { + return new EncryptionSerializer(dataEncryptionKeyProvider, jsonSerializer, encryptionOptions).serializeTo(item); + } + } + + } + + class EncryptionSerializer implements ItemSerializer { + private final EncryptionOptions encryptionOptions; + private final DataEncryptionKeyProvider dataEncryptionKeyProvider; + + public EncryptionSerializer(DataEncryptionKeyProvider dataEncryptionKeyProvider, JsonSerializer jsonSerializer, EncryptionOptions encryptionOptions) { + this.encryptionOptions = encryptionOptions; + this.dataEncryptionKeyProvider = dataEncryptionKeyProvider; + } + + @Override + public ByteBuffer serializeTo(T item) { + ObjectNode objectNode = Utils.getSimpleObjectMapper().convertValue(item, ObjectNode.class); + EncryptionProcessor encryptionProcessor = new EncryptionProcessor(); + ObjectNode result = encryptionProcessor.encryptAsync(objectNode, encryptionOptions, dataEncryptionKeyProvider); + return Utils.serializeJsonToByteBuffer(Utils.getSimpleObjectMapper(), result); + } + } +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RMResources.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RMResources.java index 922bbbee04d3..5a638a932062 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RMResources.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RMResources.java @@ -49,4 +49,5 @@ public class RMResources { public static final String InvalidUrl = "InvalidUrl"; public static final String InvalidResourceUrlQuery = "The value %s specified for query %s is invalid."; public static final String PartitionKeyRangeIdAbsentInContext = "PartitionKeyRangeId is absent in the context."; + public static final String EncryptionKeyProviderNotConfigured = "Encryption Key Provider is not configured"; } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RequestOptions.java index f73e6624a131..98ceb5bc81f5 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RequestOptions.java @@ -3,6 +3,8 @@ package com.azure.cosmos.implementation; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; + import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.models.IndexingDirective; import com.azure.cosmos.models.PartitionKey; @@ -32,6 +34,7 @@ public class RequestOptions { private boolean scriptLoggingEnabled; private boolean quotaInfoEnabled; private Map properties; + private EncryptionOptions encryptionOptions; private ThroughputProperties throughputProperties; /** @@ -339,4 +342,12 @@ public void setProperties(Map properties) { this.properties = properties; } + + public void setEncryptionOptions(EncryptionOptions encryptionOptions) { + this.encryptionOptions = encryptionOptions; + } + + public EncryptionOptions getEncryptionOptions() { + return this.encryptionOptions; + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index 120f0efd21bc..1856ff826b6f 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -2,11 +2,15 @@ // Licensed under the MIT License. package com.azure.cosmos.implementation; +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; + import com.azure.core.credential.AzureKeyCredential; import com.azure.cosmos.BridgeInternal; import com.azure.cosmos.ConnectionMode; import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.DirectConnectionConfig; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; import com.azure.cosmos.implementation.query.PipelinedDocumentQueryExecutionContext; import com.azure.cosmos.implementation.query.QueryInfo; import com.azure.cosmos.models.CosmosQueryRequestOptions; @@ -16,7 +20,6 @@ import com.azure.cosmos.models.PartitionKeyDefinition; import com.azure.cosmos.models.SqlQuerySpec; import com.azure.cosmos.models.SqlParameter; -import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import com.azure.cosmos.implementation.caches.RxClientCollectionCache; import com.azure.cosmos.implementation.caches.RxCollectionCache; @@ -122,6 +125,7 @@ public class RxDocumentClientImpl implements AsyncDocumentClient, IAuthorization private StoreClientFactory storeClientFactory; private GatewayServiceConfigurationReader gatewayConfigurationReader; + public DataEncryptionKeyProvider dataEncryptionKeyProvider; public RxDocumentClientImpl(URI serviceEndpoint, String masterKeyOrResourceToken, @@ -254,6 +258,10 @@ private RxDocumentClientImpl(URI serviceEndpoint, this.resetSessionTokenRetryPolicy = retryPolicy; } + void registerDataEncryptionKeyProvider(DataEncryptionKeyProvider dataEncryptionKeyProvider) { + this.dataEncryptionKeyProvider = dataEncryptionKeyProvider; + } + private void initializeGatewayConfigurationReader() { this.gatewayConfigurationReader = new GatewayServiceConfigurationReader(this.globalEndpointManager); DatabaseAccount databaseAccount = this.globalEndpointManager.getLatestDatabaseAccount(); @@ -1110,8 +1118,9 @@ private Mono getCreateDocumentRequest(DocumentClientRe } Instant serializationStartTimeUTC = Instant.now(); - ByteBuffer content = BridgeInternal.serializeJsonToByteBuffer(document, mapper); + ByteBuffer content = BridgeInternal.serializeJsonToByteBuffer(document, mapper, dataEncryptionKeyProvider, options == null ? null : options.getEncryptionOptions()); Instant serializationEndTimeUTC = Instant.now(); + SerializationDiagnosticsContext.SerializationDiagnostics serializationDiagnostics = new SerializationDiagnosticsContext.SerializationDiagnostics( serializationStartTimeUTC, serializationEndTimeUTC, @@ -3185,4 +3194,18 @@ public void close() { } logger.info("Shutting down completed."); } + + @Override + public ItemDeserializer getItemDeserializer() { + if (dataEncryptionKeyProvider == null) { + return new ItemDeserializer.JsonDeserializer(); + } else { + return new ItemDeserializer.EncryptionDeserializer(dataEncryptionKeyProvider, new ItemDeserializer.JsonDeserializer()); + } + } + + @Override + public ItemDeserializer getItemDeserializerWithoutDecryption() { + return new ItemDeserializer.JsonDeserializer(); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/TracerProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/TracerProvider.java new file mode 100644 index 000000000000..87c51d14412a --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/TracerProvider.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.tracing.Tracer; +import com.azure.cosmos.CosmosException; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosResponse; +import reactor.core.publisher.Mono; +import reactor.core.publisher.Signal; + +import java.util.Objects; +import java.util.Optional; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; + +import static com.azure.core.util.tracing.Tracer.AZ_TRACING_NAMESPACE_KEY; + +public class TracerProvider { + private Tracer tracer; + public final static String DB_TYPE_VALUE = "Cosmos"; + public final static String DB_TYPE = "db.type"; + public final static String DB_INSTANCE = "db.instance"; + public final static String DB_URL = "db.url"; + public static final String DB_STATEMENT = "db.statement"; + public static final String ERROR_MSG = "error.msg"; + public static final String ERROR_TYPE = "error.type"; + public static final String COSMOS_CALL_DEPTH = "cosmosCallDepth"; + public static final String COSMOS_CALL_DEPTH_VAL = "nested"; + public static final int ERROR_CODE = 0; + public static final String RESOURCE_PROVIDER_NAME = "Microsoft.DocumentDB"; + + public TracerProvider(Tracer tracer) { + this.tracer = tracer; + } + + public boolean isEnabled() { + return tracer != null; + } + + /** + * For each tracer plugged into the SDK a new tracing span is created. + *

    + * The {@code context} will be checked for containing information about a parent span. If a parent span is found the + * new span will be added as a child, otherwise the span will be created and added to the context and any downstream + * start calls will use the created span as the parent. + * + * @param context Additional metadata that is passed through the call stack. + * @return An updated context object. + */ + public Context startSpan(String methodName, String databaseId, String endpoint, Context context) { + Context local = Objects.requireNonNull(context, "'context' cannot be null."); + local = local.addData(AZ_TRACING_NAMESPACE_KEY, RESOURCE_PROVIDER_NAME); + local = tracer.start(methodName, local); // start the span and return the started span + if (databaseId != null) { + tracer.setAttribute(TracerProvider.DB_INSTANCE, databaseId, local); + } + + tracer.setAttribute(TracerProvider.DB_TYPE, DB_TYPE_VALUE, local); + tracer.setAttribute(TracerProvider.DB_URL, endpoint, local); + tracer.setAttribute(TracerProvider.DB_STATEMENT, methodName, local); + return local; + } + + /** + * Given a context containing the current tracing span the span is marked completed with status info from + * {@link Signal}. For each tracer plugged into the SDK the current tracing span is marked as completed. + * + * @param context Additional metadata that is passed through the call stack. + * @param signal The signal indicates the status and contains the metadata we need to end the tracing span. + */ + public > void endSpan(Context context, + Signal signal, + int statusCode) { + Objects.requireNonNull(context, "'context' cannot be null."); + Objects.requireNonNull(signal, "'signal' cannot be null."); + + switch (signal.getType()) { + case ON_COMPLETE: + end(statusCode, null, context); + break; + case ON_ERROR: + Throwable throwable = null; + if (signal.hasError()) { + // The last status available is on error, this contains the thrown error. + throwable = signal.getThrowable(); + + if (throwable instanceof CosmosException) { + CosmosException exception = (CosmosException) throwable; + statusCode = exception.getStatusCode(); + } + } + end(statusCode, throwable, context); + break; + default: + // ON_SUBSCRIBE and ON_NEXT don't have the information to end the span so just return. + break; + } + } + + public > Mono traceEnabledCosmosResponsePublisher(Mono resultPublisher, + Context context, + String spanName, + String databaseId, + String endpoint) { + return traceEnabledPublisher(resultPublisher, context, spanName, databaseId, endpoint, + (T response) -> response.getStatusCode()); + } + + public Mono> traceEnabledCosmosItemResponsePublisher(Mono> resultPublisher, + Context context, + String spanName, + String databaseId, + String endpoint) { + return traceEnabledPublisher(resultPublisher, context, spanName, databaseId, endpoint, + CosmosItemResponse::getStatusCode); + } + + public Mono traceEnabledPublisher(Mono resultPublisher, + Context context, + String spanName, + String databaseId, + String endpoint, + Function statusCodeFunc) { + final AtomicReference parentContext = new AtomicReference<>(Context.NONE); + Optional callDepth = context.getData(COSMOS_CALL_DEPTH); + final boolean isNestedCall = callDepth.isPresent(); + return resultPublisher + .doOnSubscribe(ignoredValue -> { + if (isEnabled() && !isNestedCall) { + parentContext.set(this.startSpan(spanName, databaseId, endpoint, + context)); + } + }).doOnSuccess(response -> { + if (isEnabled() && !isNestedCall) { + this.endSpan(parentContext.get(), Signal.complete(), statusCodeFunc.apply(response)); + } + }).doOnError(throwable -> { + if (isEnabled() && !isNestedCall) { + this.endSpan(parentContext.get(), Signal.error(throwable), ERROR_CODE); + } + }); + } + + private void end(int statusCode, Throwable throwable, Context context) { + if (throwable != null) { + tracer.setAttribute(TracerProvider.ERROR_MSG, throwable.getMessage(), context); + tracer.setAttribute(TracerProvider.ERROR_TYPE, throwable.getClass().getName(), context); + } + tracer.end(statusCode, throwable, context); + } +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Utils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Utils.java index d91327ff08ed..6e9b2a2a7866 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Utils.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Utils.java @@ -4,6 +4,7 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; import com.azure.cosmos.implementation.uuid.EthernetAddress; import com.azure.cosmos.implementation.uuid.Generators; import com.azure.cosmos.implementation.uuid.impl.TimeBasedGenerator; @@ -91,6 +92,10 @@ public static byte[] getUTF8Bytes(String str) { } + public static byte[] getUtf16Bytes(String str) { + return str.getBytes(StandardCharsets.UTF_16LE); + } + public static String encodeBase64String(byte[] binaryData) { String encodedString = Base64Encoder.encodeToString(binaryData); @@ -597,12 +602,34 @@ public static T parse(byte[] item, Class itemClassType) { } } + public static T parse(byte[] item, Class itemClassType, ItemDeserializer itemDeserializer) { + if (Utils.isEmpty(item)) { + return null; + } + + if (itemDeserializer == null) { + return Utils.parse(item, itemClassType); + } + + return itemDeserializer.parseFrom(itemClassType, item); + } + + public static T parse(byte[] item, Class itemClassType, EncryptionOptions encryptionOptions) { + + try { + return getSimpleObjectMapper().readValue(item, itemClassType); + } catch (IOException e) { + throw new IllegalStateException("Failed to get POJO.", e); + } + } + public static ByteBuffer serializeJsonToByteBuffer(ObjectMapper objectMapper, Object object) { try { ByteBufferOutputStream byteBufferOutputStream = new ByteBufferOutputStream(ONE_KB); objectMapper.writeValue(byteBufferOutputStream, object); return byteBufferOutputStream.asByteBuffer(); } catch (IOException e) { + // TODO moderakh: on serialization/deserialization failure we should throw CosmosException here and elsewhere throw new IllegalArgumentException("Failed to serialize the object into json", e); } } @@ -657,12 +684,16 @@ static String escapeNonAscii(String partitionKeyJson) { } } - static byte[] toByteArray(ByteBuf buf) { + public static byte[] toByteArray(ByteBuf buf) { byte[] bytes = new byte[buf.readableBytes()]; buf.readBytes(bytes); return bytes; } + public static ByteBuffer toByteBuffer(byte[] bytes) { + return ByteBuffer.wrap(bytes); + } + public static String toJson(ObjectMapper mapper, ObjectNode object) { try { return mapper.writeValueAsString(object); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java index 837163ab5725..4a16686aa317 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java @@ -4,8 +4,10 @@ package com.azure.cosmos.implementation.directconnectivity; import com.azure.cosmos.BridgeInternal; +import com.azure.cosmos.CosmosException; import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.ConnectionPolicy; +import com.azure.cosmos.implementation.GoneException; import com.azure.cosmos.implementation.RequestTimeline; import com.azure.cosmos.implementation.RxDocumentServiceRequest; import com.azure.cosmos.implementation.UserAgentContainer; @@ -27,6 +29,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import reactor.core.publisher.Mono; +import reactor.core.publisher.SignalType; import java.io.File; import java.io.IOException; @@ -35,12 +38,15 @@ import java.time.Duration; import java.util.Iterator; import java.util.Locale; +import java.util.concurrent.CompletionException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; +import static com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdReporter.reportIssue; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkArgument; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkState; +import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; @JsonSerialize(using = RntbdTransportClient.JsonSerializer.class) public final class RntbdTransportClient extends TransportClient { @@ -116,15 +122,13 @@ public Mono invokeStoreAsync(final Uri addressUri, final RxDocume checkNotNull(request, "expected non-null request"); this.throwIfClosed(); - URI address = addressUri.getURI(); + final URI address = addressUri.getURI(); final RntbdRequestArgs requestArgs = new RntbdRequestArgs(request, address); final RntbdEndpoint endpoint = this.endpointProvider.get(address); final RntbdRequestRecord record = endpoint.request(requestArgs); - logger.debug("RntbdTransportClient.invokeStoreAsync({}, {}): {}", address, request, record); - - return Mono.fromFuture(record.whenComplete((response, throwable) -> { + final Mono result = Mono.fromFuture(record.whenComplete((response, throwable) -> { record.stage(RntbdRequestRecord.Stage.COMPLETED); @@ -136,8 +140,86 @@ public Mono invokeStoreAsync(final Uri addressUri, final RxDocume RequestTimeline timeline = record.takeTimelineSnapshot(); response.setRequestTimeline(timeline); } - })).doOnCancel(() -> { - logger.debug("REQUEST CANCELLED: {}", record); + + })).onErrorMap(throwable -> { + + Throwable error = throwable instanceof CompletionException ? throwable.getCause() : throwable; + + if (!(error instanceof CosmosException)) { + + String unexpectedError = RntbdObjectMapper.toJson(error); + + reportIssue(logger, endpoint, + "request completed with an unexpected {}: \\{\"record\":{},\"error\":{}}", + error.getClass(), + record, + unexpectedError); + + error = new GoneException( + lenientFormat("an unexpected %s occurred: %s", unexpectedError), + address.toString()); + } + + return error; + + }); + + return result.doFinally(signalType -> { + + // This lambda ensures that a pending Direct TCP request in a reactive stream dropped by an end user or the + // HA layer completes without bubbling up to reactor.core.publisher.Hooks#onErrorDropped as a + // CompletionException error. Pending requests may be left outstanding when, for example, an end user calls + // CosmosAsyncClient#close or the HA layer detects that a partition split has occurred. This code guarantees + // that each pending Mono in the stream will run to completion with a new subscriber. + // Consequently the default Hooks#onErrorDropped method will not be called thus preventing distracting error + // messages. + // + // This lambda does not prevent requests that complete exceptionally before the call to this lambda from + // bubbling up to Hooks#onErrorDropped as CompletionException errors. We will still see some onErrorDropped + // messages due to CompletionException errors. Anecdotal evidence shows that this is more likely to be seen + // in low latency environments on Azure cloud. + // + // One might be tempted to complete a pending request here, but that is ill advised. Testing and + // inspection of the reactor code shows that this does not prevent errors from bubbling up to + // reactor.core.publisher.Hooks#onErrorDropped. Worse than this it has been seen to cause failures in + // the HA layer: + // + // * Calling record.cancel or record.completeExceptionally causes failures in (low-latency) cloud + // environments and all errors bubble up Hooks#onErrorDropped. + // + // * Calling record.complete with a null value causes failures in all environments, depending on the + // operation being performed. In short: many of our tests fail. + // + // TODO (DANOBLE) verify the correctness of this statement: Fact: We still see some of these errors. Does + // reactor provide a mechanism other than Hooks#onErrorDropped(Consumer consumer) for + // doing this per Mono or must we, for example, rely on something like this in the consistency layer: + // https://www.codota.com/code/java/classes/reactor.core.publisher.Hooks + + if (signalType != SignalType.CANCEL) { + return; + } + + result.subscribe( + response -> { + if (logger.isDebugEnabled()) { + logger.debug( + "received response to cancelled request: {\"request\":{},\"response\":{\"type\":{}," + + "\"value\":{}}}}", + RntbdObjectMapper.toJson(record), + response.getClass().getSimpleName(), + RntbdObjectMapper.toJson(response)); + } + }, + throwable -> { + if (logger.isDebugEnabled()) { + logger.debug( + "received response to cancelled request: {\"request\":{},\"response\":{\"type\":{}," + + "\"value\":{}}}", + RntbdObjectMapper.toJson(record), + throwable.getClass().getSimpleName(), + RntbdObjectMapper.toJson(throwable)); + } + }); }); } @@ -159,7 +241,9 @@ private static Tag tag(long id) { // region Privates private void throwIfClosed() { - checkState(!this.closed.get(), "%s is closed", this); + if (this.closed.get()) { + throw new TransportException(lenientFormat("%s is closed", this), null); + } } // endregion @@ -255,7 +339,7 @@ private Options(final ConnectionPolicy connectionPolicy) { this.connectionAcquisitionTimeout = Duration.ZERO; this.connectTimeout = connectionPolicy.getConnectTimeout(); this.idleChannelTimeout = connectionPolicy.getIdleTcpConnectionTimeout(); - this.idleEndpointTimeout = Duration.ofSeconds(70L); + this.idleEndpointTimeout = connectionPolicy.getIdleEndpointTimeout(); this.maxBufferCapacity = 8192 << 10; this.maxChannelsPerEndpoint = connectionPolicy.getMaxConnectionsPerEndpoint(); this.maxRequestsPerChannel = connectionPolicy.getMaxRequestsPerConnection(); @@ -381,7 +465,7 @@ public String toString() { * "maxRequestsPerChannel": 30, * "receiveHangDetectionTime": "PT1M5S", * "requestExpiryInterval": "PT5S", - * "requestTimeout": "PT1M", + * "requestTimeout": "PT5S", * "requestTimerResolution": "PT0.5S", * "sendHangDetectionTime": "PT10S", * "shutdownTimeout": "PT15S", diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportException.java index ce39b5f5363e..7cb9bbd53eec 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportException.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportException.java @@ -20,6 +20,9 @@ // NOTES: // We throw a derivative in one place: RntbdContextException in RntbdContext.decode. This is a special case // that is handled by RntbdRequestManager.userEventTriggered. +// REFERENCES: +// * The Exceptional Performance of Lil' Exception +// https://shipilev.net/blog/2014/exceptional-performance/ public class TransportException extends RuntimeException { public TransportException(String message, Throwable cause) { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java index d53f5f290e78..4f493706de40 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java @@ -65,11 +65,11 @@ public final class RntbdClientChannelPool implements ChannelPool { new ClosedChannelException(), RntbdClientChannelPool.class, "acquire"); private static final IllegalStateException POOL_CLOSED_ON_ACQUIRE = ThrowableUtil.unknownStackTrace( - new StacklessIllegalStateException("service endpoint was closed"), + new StacklessIllegalStateException("service endpoint was closed while acquiring a channel"), RntbdClientChannelPool.class, "acquire"); private static final IllegalStateException POOL_CLOSED_ON_RELEASE = ThrowableUtil.unknownStackTrace( - new StacklessIllegalStateException("service endpoint was closed"), + new StacklessIllegalStateException("service endpoint was closed while releasing a channel"), RntbdClientChannelPool.class, "release"); private static final AttributeKey POOL_KEY = AttributeKey.newInstance( diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdMetrics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdMetrics.java index 3e7aaa18b8ee..2231e5a16a67 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdMetrics.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdMetrics.java @@ -4,11 +4,11 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; import com.azure.cosmos.implementation.directconnectivity.RntbdTransportClient; +import com.azure.cosmos.implementation.guava25.net.PercentEscaper; import com.codahale.metrics.ConsoleReporter; import com.codahale.metrics.MetricRegistry; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.azure.cosmos.implementation.guava25.net.PercentEscaper; import io.micrometer.core.instrument.Clock; import io.micrometer.core.instrument.DistributionSummary; import io.micrometer.core.instrument.Gauge; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequest.java index 9d562a0a4cbc..727cccb2bc51 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequest.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequest.java @@ -4,8 +4,8 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; import com.azure.cosmos.implementation.RxDocumentServiceRequest; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.azure.cosmos.implementation.guava27.Strings; +import com.fasterxml.jackson.annotation.JsonIgnore; import io.netty.buffer.ByteBuf; import java.util.UUID; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestArgs.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestArgs.java index b56c905de9ea..c15593898b69 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestArgs.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestArgs.java @@ -4,15 +4,15 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.guava25.base.Stopwatch; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import com.azure.cosmos.implementation.guava25.base.Stopwatch; import io.micrometer.core.instrument.Timer; import io.netty.channel.ChannelHandlerContext; -import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import org.slf4j.Logger; import java.net.URI; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java index 2738fc44ab8e..fc7e7f0c6906 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java @@ -27,8 +27,8 @@ import java.util.Map; import java.util.function.Supplier; -import static com.azure.cosmos.implementation.HttpConstants.HttpHeaders; import static com.azure.cosmos.implementation.HttpConstants.HeaderValues; +import static com.azure.cosmos.implementation.HttpConstants.HttpHeaders; import static com.azure.cosmos.implementation.directconnectivity.WFConstants.BackendHeaders; import static com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdConstants.RntbdConsistencyLevel; import static com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdConstants.RntbdContentSerializationFormat; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponse.java index 410d5f6c7a3e..b743b01b1f15 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponse.java @@ -29,7 +29,6 @@ import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkArgument; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkState; -import static java.lang.Integer.min; @JsonPropertyOrder({ "messageLength", "referenceCount", "frame", "headers", "content" }) public final class RntbdResponse implements ReferenceCounted { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseHeaders.java index acd1df01552d..920173ed0e46 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseHeaders.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseHeaders.java @@ -3,12 +3,12 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; +import com.azure.cosmos.implementation.guava25.collect.ImmutableList; +import com.azure.cosmos.implementation.guava25.collect.ImmutableMap; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectWriter; -import com.azure.cosmos.implementation.guava25.collect.ImmutableList; -import com.azure.cosmos.implementation.guava25.collect.ImmutableMap; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.handler.codec.CorruptedFrameException; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java index 0bf5122d67c0..41b07ed1de1f 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java @@ -213,7 +213,7 @@ private void releaseToPool(final Channel channel) { if (released.isDone()) { ensureSuccessWhenReleasedToPool(channel, released); } else { - this.channelPool.release(channel).addListener(ignored -> ensureSuccessWhenReleasedToPool(channel, released)); + released.addListener(ignored -> ensureSuccessWhenReleasedToPool(channel, released)); } } } @@ -314,7 +314,10 @@ public static final class Provider implements RntbdEndpoint.Provider { private final RntbdRequestTimer requestTimer; private final RntbdTransportClient transportClient; - public Provider(final RntbdTransportClient transportClient, final Options options, final SslContext sslContext) { + public Provider( + final RntbdTransportClient transportClient, + final Options options, + final SslContext sslContext) { checkNotNull(transportClient, "expected non-null provider"); checkNotNull(options, "expected non-null options"); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdThreadFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdThreadFactory.java index 1b58f32650a7..ee2e9a10b9c7 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdThreadFactory.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdThreadFactory.java @@ -14,7 +14,7 @@ */ class RntbdThreadFactory implements ThreadFactory { - private static final String NAME_TEMPLATE = "rntbd-%s[%s]"; + private static final String NAME_TEMPLATE = "cosmos-rntbd-%s[%s]"; private final boolean daemon; private final String name; private final int priority; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProcessor.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProcessor.java new file mode 100644 index 000000000000..a9b0dc663d9c --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProcessor.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.Constants; +import com.azure.cosmos.implementation.InternalServerErrorException; +import com.azure.cosmos.implementation.RMResources; +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.CosmosEncryptionAlgorithm; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKey; +import com.azure.cosmos.implementation.encryption.api.DataEncryptionKeyProvider; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; +import com.azure.cosmos.implementation.guava27.Strings; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.JsonNodeType; +import com.fasterxml.jackson.databind.node.ObjectNode; + +import java.io.IOException; +import java.util.Iterator; +import java.util.Map; + +// TODO: can this be moved to encryption package? +public class EncryptionProcessor { + + public ObjectNode encryptAsync( + ObjectNode itemJObj, + EncryptionOptions encryptionOptions, + DataEncryptionKeyProvider dataEncryptionKeyProvider) { + assert (itemJObj != null); + assert (encryptionOptions != null); + assert (encryptionOptions.getPathsToEncrypt() != null); + assert (!encryptionOptions.getPathsToEncrypt().isEmpty()); + + for (String path : encryptionOptions.getPathsToEncrypt()) { + if (StringUtils.isEmpty(path) || path.charAt(0) != '/' || path.lastIndexOf('/') != 0) { + throw new IllegalArgumentException("Invalid encryption path: " + path); + } + } + + if (encryptionOptions.getDataEncryptionKeyId() == null) { + throw new IllegalArgumentException("Invalid encryption options: encryptionOptions.getDataEncryptionKeyId." + encryptionOptions.getDataEncryptionKeyId()); + } + + if (encryptionOptions.getEncryptionAlgorithm() == null) { + throw new IllegalArgumentException("Invalid encryption options: encryptionOptions.getEncryptionAlgorithm." + encryptionOptions.getEncryptionAlgorithm()); + } + + if (dataEncryptionKeyProvider == null) { + throw new IllegalArgumentException(RMResources.EncryptionKeyProviderNotConfigured); + } + + ObjectNode toEncryptJObj = Utils.getSimpleObjectMapper().createObjectNode(); + + for (String pathToEncrypt : encryptionOptions.getPathsToEncrypt()) { + String propertyName = pathToEncrypt.substring(1); + // TODO: moderakh should support JPath + JsonNode propertyValueHolder = itemJObj.get(propertyName); + + // Even null in the JSON is a JToken with Type Null, this null check is just a sanity check + if (propertyValueHolder != null) { + toEncryptJObj.set(propertyName, itemJObj.get(propertyName)); + itemJObj.remove(propertyName); + } + } + + SensitiveDataTransformer serializer = new SensitiveDataTransformer(); + byte[] plainText = serializer.toByteArray(toEncryptJObj); + + DataEncryptionKey dataEncryptionKey = dataEncryptionKeyProvider.getDataEncryptionKey(encryptionOptions.getDataEncryptionKeyId(), encryptionOptions.getEncryptionAlgorithm()); + + EncryptionProperties encryptionProperties = new EncryptionProperties( + /* encryptionFormatVersion: */ 2, + encryptionOptions.getEncryptionAlgorithm(), + encryptionOptions.getDataEncryptionKeyId(), + dataEncryptionKey.encryptData(plainText)); + + itemJObj.set(Constants.Properties.EncryptedInfo, encryptionProperties.toObjectNode()); + + return itemJObj; + } + + + public ObjectNode decryptAsync( + ObjectNode itemJObj, + DataEncryptionKeyProvider keyProvider) { + assert (itemJObj != null); + assert (keyProvider != null); + + JsonNode encryptionPropertiesJProp = itemJObj.get(Constants.Properties.EncryptedInfo); + ObjectNode encryptionPropertiesJObj = null; + if (encryptionPropertiesJProp != null && !encryptionPropertiesJProp.isNull() && encryptionPropertiesJProp.getNodeType() == JsonNodeType.OBJECT) { + encryptionPropertiesJObj = (ObjectNode) encryptionPropertiesJProp; + } + + if (encryptionPropertiesJProp == null) { + return itemJObj; + } + + EncryptionProperties encryptionProperties = null; + try { + encryptionProperties = EncryptionProperties.fromObjectNode(encryptionPropertiesJObj); + } catch (IOException e) { + throw new IllegalArgumentException(e); + } + if (encryptionProperties.getEncryptionFormatVersion() != 2) { + throw new InternalServerErrorException(Strings.lenientFormat( + "Unknown encryption format version: %s. Please upgrade your SDK to the latest version.", encryptionProperties.getEncryptionFormatVersion())); + } + + // get key + DataEncryptionKey inMemoryRawDek = keyProvider.getDataEncryptionKey(encryptionProperties.getDataEncryptionKeyId(), CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED); + + byte[] plainText = inMemoryRawDek.decryptData(encryptionProperties.getEncryptedData()); + + SensitiveDataTransformer parser = new SensitiveDataTransformer(); + ObjectNode plainTextJObj = parser.toObjectNode(plainText); + + Iterator> it = plainTextJObj.fields(); + while (it.hasNext()) { + Map.Entry entry = it.next(); + itemJObj.set(entry.getKey(), entry.getValue()); + } + + itemJObj.remove(Constants.Properties.EncryptedInfo); + return itemJObj; + } + + static class SensitiveDataTransformer { + public ObjectNode toObjectNode(byte[] plainText) { + if (Utils.isEmpty(plainText)) { + return null; + } + try { + return (ObjectNode) Utils.getSimpleObjectMapper().readTree(plainText); + } catch (IOException e) { + throw new IllegalStateException("Failed to parse to ObjectNode.", e); + } + } + + public byte[] toByteArray(ObjectNode objectNode) { + try { + return Utils.getSimpleObjectMapper().writeValueAsBytes(objectNode); + } catch (JsonProcessingException e) { + throw new IllegalStateException("Unable to convert JSON to byte[]", e); + } + } + } +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProperties.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProperties.java new file mode 100644 index 000000000000..c8948ce76075 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/EncryptionProperties.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption; + +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.encryption.api.Constants; +import com.azure.cosmos.implementation.guava25.base.Preconditions; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.ObjectCodec; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectReader; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + +import java.io.IOException; + +@JsonSerialize(using = EncryptionProperties.JsonSerializer.class) +@JsonDeserialize(using = EncryptionProperties.JsonDeserializer.class) +class EncryptionProperties { + private final static ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + public static ObjectReader getObjectReader() { + return OBJECT_READER; + } + + public static ObjectWriter getObjectWriter() { + return OBJECT_WRITER; + } + + private final static ObjectReader OBJECT_READER = OBJECT_MAPPER.readerFor(EncryptionProperties.class); + private final static ObjectWriter OBJECT_WRITER = OBJECT_MAPPER.writerFor(EncryptionProperties.class); + + public ObjectNode toObjectNode() { + ObjectNode objectNode = OBJECT_MAPPER.createObjectNode(); + objectNode.put(Constants.ENCRYPTION_FORMAT_VERSION, this.encryptionFormatVersion); + objectNode.put(Constants.ENCRYPTION_ALGORITHM, this.encryptionAlgorithm); + objectNode.put(Constants.DATA_ENCRYPTION_KEY_ID, this.dataEncryptionKeyId); + objectNode.put(Constants.ENCRYPTED_DATA, this.encryptedData); + return objectNode; + } + + public static EncryptionProperties fromObjectNode(ObjectNode objectNode) throws IOException { + return EncryptionProperties.OBJECT_READER.readValue(objectNode); + } + + public EncryptionProperties() { + } + + public String getEncryptionAlgorithm() { + return this.encryptionAlgorithm; + } + + public int getEncryptionFormatVersion() { + return encryptionFormatVersion; + } + + public String getDataEncryptionKeyId() { + return dataEncryptionKeyId; + } + + public byte[] getEncryptedData() { + return encryptedData; + } + + private String encryptionAlgorithm; + + private int encryptionFormatVersion; + private String dataEncryptionKeyId; + private byte[] encryptedData; + + public EncryptionProperties( + int encryptionFormatVersion, + String encryptionAlgorithm, + String dataEncryptionKeyId, + byte[] encryptedData) { + + if (StringUtils.isEmpty(encryptionAlgorithm)) { + throw new IllegalArgumentException("encryptionAlgorithm is missing"); + } + + if (StringUtils.isEmpty(dataEncryptionKeyId)) { + throw new IllegalArgumentException("dataEncryptionKeyId is missing"); + } + + this.encryptionFormatVersion = encryptionFormatVersion; + this.encryptionAlgorithm = encryptionAlgorithm; + this.dataEncryptionKeyId = dataEncryptionKeyId; + this.encryptedData = encryptedData; + } + + static final class JsonSerializer extends StdSerializer { + private static final long serialVersionUID = 1L; + + JsonSerializer() { + super(EncryptionProperties.class); + } + + @Override + public void serialize(final EncryptionProperties value, final JsonGenerator generator, final SerializerProvider provider) throws IOException { + generator.writeStartObject(); + generator.writeNumberField(Constants.ENCRYPTION_FORMAT_VERSION, value.encryptionFormatVersion); + generator.writeStringField(Constants.ENCRYPTION_ALGORITHM, value.encryptionAlgorithm); + generator.writeStringField(Constants.DATA_ENCRYPTION_KEY_ID, value.dataEncryptionKeyId); + generator.writeBinaryField(Constants.ENCRYPTED_DATA, value.encryptedData); + generator.writeEndObject(); + } + } + + static final class JsonDeserializer extends StdDeserializer { + private static final long serialVersionUID = 4L; + + public JsonDeserializer() { + super(EncryptionProperties.class); + } + + @Override + public EncryptionProperties deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { + + ObjectCodec objectCodec = jsonParser.getCodec(); + JsonNode root; + try { + root = objectCodec.readTree(jsonParser); + } catch (IOException e) { + throw new IllegalArgumentException(e); + } + + validateOrThrow(jsonParser, root.isObject(), "can't deserialize"); + + EncryptionProperties encryptionProperties = new EncryptionProperties(); + + JsonNode node = root.get(Constants.ENCRYPTION_FORMAT_VERSION); + Preconditions.checkNotNull(node, Constants.ENCRYPTION_FORMAT_VERSION + "can't deserialize"); + validateOrThrow(jsonParser, node.isInt(), Constants.ENCRYPTION_FORMAT_VERSION, "can't deserialize"); + encryptionProperties.encryptionFormatVersion = node.asInt(); + + node = root.get(Constants.ENCRYPTION_ALGORITHM); + Preconditions.checkNotNull(node, Constants.ENCRYPTION_ALGORITHM + "can't deserialize"); + validateOrThrow(jsonParser, node.isTextual(), Constants.ENCRYPTION_ALGORITHM, "can't deserialize"); + encryptionProperties.encryptionAlgorithm = node.asText(); + + node = root.get(Constants.DATA_ENCRYPTION_KEY_ID); + Preconditions.checkNotNull(node, Constants.DATA_ENCRYPTION_KEY_ID + "can't deserialize"); + validateOrThrow(jsonParser, node.isTextual(), Constants.DATA_ENCRYPTION_KEY_ID, "can't deserialize"); + encryptionProperties.dataEncryptionKeyId = node.asText(); + + node = root.get(Constants.ENCRYPTED_DATA); + Preconditions.checkNotNull(node, Constants.ENCRYPTED_DATA + "can't deserialize"); + validateOrThrow(jsonParser, node.isBinary() || node.isTextual(), Constants.ENCRYPTED_DATA, "can't deserialize"); + encryptionProperties.encryptedData = node.binaryValue(); + + return encryptionProperties; + } + + private void validateOrThrow(JsonParser jsonParser, boolean expectedToBeTrue, String msg) throws JsonProcessingException { + validateOrThrow(jsonParser, expectedToBeTrue, null, msg); + } + + private void validateOrThrow(JsonParser jsonParser, boolean expectedToBeTrue, String fieldName, String msg) throws JsonProcessingException { + if (!expectedToBeTrue) { + if (fieldName == null) { + throw new JsonParseException(jsonParser, msg); + } else { + throw new JsonParseException(jsonParser, fieldName + " : " + msg); + } + } + } + } +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/Constants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/Constants.java new file mode 100644 index 000000000000..c3e6e0130448 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/Constants.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption.api; + +public class Constants { + public static final String DOCUMENT_RESOURCE_PROPERTY_NAME = "Documents"; + public static final String ENCRYPTION_FORMAT_VERSION = "_ef"; + public static final String ENCRYPTION_ALGORITHM = "_ea"; + public static final String DATA_ENCRYPTION_KEY_ID = "_en"; + public static final String ENCRYPTED_DATA = "_ed"; +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/CosmosEncryptionAlgorithm.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/CosmosEncryptionAlgorithm.java new file mode 100644 index 000000000000..4944ea40709f --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/CosmosEncryptionAlgorithm.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption.api; + +// TODO: moderakh enum string type? + +/** + * Algorithms for use with client-side encryption support in Azure Cosmos DB. + */ +public class CosmosEncryptionAlgorithm { + + /** + * Authenticated Encryption algorithm based on https://tools.ietf.org/html/draft-mcgrew-aead-aes-cbc-hmac-sha2-05 + */ + public static final String AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED = "AEAes256CbcHmacSha256Randomized"; + +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/DataEncryptionKey.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/DataEncryptionKey.java new file mode 100644 index 000000000000..e844c4a1c350 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/DataEncryptionKey.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption.api; + +import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; + +import java.lang.reflect.InvocationTargetException; + +/** + * Abstraction for a data encryption key for use in client-side encryption. + * See https://aka.ms/CosmosClientEncryption for more information on client-side encryption support in Azure Cosmos DB. + */ +public interface DataEncryptionKey { + + /** + * Gets Raw key bytes of the data encryption key. + * @return + */ + byte[] getRawKey(); + + /** + * Gets Encryption algorithm to be used with this data encryption key. + * @return encryption algorithm. + */ + String getEncryptionAlgorithm(); + + /** + * Encrypts the plainText with a data encryption key. + * @param plainText >Plain text value to be encrypted. + * @return encrypted data. + */ + byte[] encryptData(byte[] plainText); + + /** + * Decrypts the cipherText with a data encryption key. + * @param cipherText Ciphertext value to be decrypted. + * @return Plain text. + */ + byte[] decryptData(byte[] cipherText); + + /** + * Generates raw data encryption key bytes suitable for use with the provided encryption algorithm. + * @param encryptionAlgorithm Encryption algorithm the returned key is intended to be used with. + * @return New instance of data encryption key. + */ + static byte[] generate(String encryptionAlgorithm) { + if (!StringUtils.equals(encryptionAlgorithm, CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED)) { + throw new IllegalArgumentException(String.format("Encryption algorithm not supported: {%s}", encryptionAlgorithm)); + } + + byte[] rawKey = new byte[32]; + + try { + DataEncryptionKey.class.getClassLoader() + .loadClass("com.azure.cosmos.implementation.encryption.AeadAes256CbcHmac256AlgorithmProvider") + .getDeclaredMethod("generateRandomBytes", byte[].class) + .invoke(null, rawKey); + + } catch (IllegalAccessException|InvocationTargetException|NoSuchMethodException|ClassNotFoundException e) { + throw new IllegalStateException("azure-cosmos-encryption is not in the classpath"); + } + + return rawKey; + } + + /** + * Creates a new instance of data encryption key given the raw key bytes + * suitable for use with the provided encryption algorithm. + * @param rawKey Raw key bytes. + * @param encryptionAlgorithm Encryption algorithm the returned key is intended to be used with. + * @return New instance of data encryption key. + */ + static DataEncryptionKey create( + byte[] rawKey, + String encryptionAlgorithm) { + if (rawKey == null) { + throw new NullPointerException("rawKey"); + } + + if (!StringUtils.equals(encryptionAlgorithm, CosmosEncryptionAlgorithm.AEAES_256_CBC_HMAC_SHA_256_RANDOMIZED)) { + throw new IllegalArgumentException(String.format("Encryption algorithm not supported: {%s}", encryptionAlgorithm)); + } + + try { + return (DataEncryptionKey) DataEncryptionKey.class.getClassLoader() + .loadClass("com.azure.cosmos.implementation.encryption.AeadAes256CbcHmac256AlgorithmProvider") + .getDeclaredMethod("createAlgorithm", byte[].class, EncryptionType.class, byte.class) + .invoke(null, rawKey, EncryptionType.RANDOMIZED, /** algorithmVersion **/(byte) 1); + + } catch (IllegalAccessException|InvocationTargetException|NoSuchMethodException|ClassNotFoundException e) { + throw new IllegalStateException("azure-cosmos-encryption is not in the classpath"); + } + } +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/DataEncryptionKeyProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/DataEncryptionKeyProvider.java new file mode 100644 index 000000000000..15a8973d0a2b --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/DataEncryptionKeyProvider.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption.api; + +/** + * Abstraction for a provider to get data encryption keys for use in client-side encryption. + * See https://aka.ms/CosmosClientEncryption for more information on client-side encryption support in Azure Cosmos DB. + */ +public interface DataEncryptionKeyProvider { + + /** + * Retrieves the data encryption key for the given id. + * @param id Identifier of the data encryption key. + * @param encryptionAlgorithm Encryption algorithm that the retrieved key will be used with. + * @return Data encryption key bytes. + * TODO: @moderakh look into if this method needs to be async. + */ + DataEncryptionKey getDataEncryptionKey( + String id, + String encryptionAlgorithm); +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/EncryptionOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/EncryptionOptions.java new file mode 100644 index 000000000000..7f438ab16ffb --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/EncryptionOptions.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption.api; + +import java.util.List; + +/** + * Options for encryption of data. + */ +public class EncryptionOptions { + + /** + * Gets Algorithm to be used for encrypting the data in the request payload. + * @return + */ + public String getEncryptionAlgorithm() { + return encryptionAlgorithm; + } + + /** + * Sets Algorithm to be used for encrypting the data in the request payload. + * + * Authenticated Encryption algorithm based on https://tools.ietf.org/html/draft-mcgrew-aead-aes-cbc-hmac-sha2-05 + * is the only one supported and is represented by "AEAes256CbcHmacSha256Randomized" value. + * @param encryptionAlgorithm + * @return the encryptionOptions + */ + public EncryptionOptions setEncryptionAlgorithm(String encryptionAlgorithm) { + this.encryptionAlgorithm = encryptionAlgorithm; + return this; + } + + /** + * Gets Identifier of the data encryption key to be used for encrypting the data in the request payload. + * The data encryption key must be suitable for use with the EncryptionAlgorithm provided. + * @return data encryption key id. + */ + public String getDataEncryptionKeyId() { + return dataEncryptionKeyId; + } + + public EncryptionOptions setDataEncryptionKeyId(String dataEncryptionKeyId) { + this.dataEncryptionKeyId = dataEncryptionKeyId; + return this; + } + + public List getPathsToEncrypt() { + return pathsToEncrypt; + } + + public EncryptionOptions setPathsToEncrypt(List pathsToEncrypt) { + this.pathsToEncrypt = pathsToEncrypt; + return this; + } + + /** + * Identifier of the data encryption key to be used for encrypting the data in the request payload. + * The data encryption key must be suitable for use with the {@link com.azure.cosmos.implementation.encryption.api.DataEncryptionKey} provided. + *

    + * The {@link DataEncryptionKeyProvider} configured on the client is used to retrieve the actual data encryption key. + */ + private String dataEncryptionKeyId; + + /** + * For the request payload, list of JSON paths to encrypt. + * Only top level paths are supported. + * Example of a path specification: /sensitive + */ + private List pathsToEncrypt; + + /** + * Algorithm to be used for encrypting the data in the request payload. + */ + private String encryptionAlgorithm; +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/EncryptionType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/EncryptionType.java new file mode 100644 index 000000000000..0cedd828ef67 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/encryption/api/EncryptionType.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.encryption.api; + + +/** + * Encryption types that may be supported. + */ +public enum EncryptionType { + RANDOMIZED; +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java index 4f56ebcdb94a..d38952791701 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java @@ -4,6 +4,7 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.implementation.RequestOptions; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; import java.util.List; @@ -17,6 +18,7 @@ public final class CosmosItemRequestOptions { private List postTriggerInclude; private String sessionToken; private PartitionKey partitionKey; + private EncryptionOptions encryptionOptions; private String ifMatchETag; private String ifNoneMatchETag; @@ -209,6 +211,12 @@ RequestOptions toRequestOptions() { requestOptions.setPostTriggerInclude(postTriggerInclude); requestOptions.setSessionToken(sessionToken); requestOptions.setPartitionKey(partitionKey); + requestOptions.setEncryptionOptions(encryptionOptions); return requestOptions; } + + CosmosItemRequestOptions setEncryptionOptions(EncryptionOptions options) { + this.encryptionOptions = options; + return this; + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemResponse.java index 1149aee36953..74519217a18f 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemResponse.java @@ -6,6 +6,7 @@ import com.azure.cosmos.CosmosDiagnostics; import com.azure.cosmos.implementation.InternalObjectNode; import com.azure.cosmos.implementation.Document; +import com.azure.cosmos.implementation.ItemDeserializer; import com.azure.cosmos.implementation.ResourceResponse; import com.azure.cosmos.implementation.SerializationDiagnosticsContext; import com.azure.cosmos.implementation.Utils; @@ -22,14 +23,16 @@ public class CosmosItemResponse { private final Class itemClassType; private final byte[] responseBodyAsByteArray; + private final ItemDeserializer itemDeserializer; private T item; private final ResourceResponse resourceResponse; private InternalObjectNode props; - CosmosItemResponse(ResourceResponse response, Class classType) { + CosmosItemResponse(ResourceResponse response, Class classType, ItemDeserializer itemDeserializer) { this.itemClassType = classType; this.responseBodyAsByteArray = response.getBodyAsByteArray(); this.resourceResponse = response; + this.itemDeserializer = itemDeserializer; } /** @@ -61,7 +64,7 @@ public T getItem() { synchronized (this) { if (item == null && !Utils.isEmpty(responseBodyAsByteArray)) { Instant serializationStartTime = Instant.now(); - item = Utils.parse(responseBodyAsByteArray, itemClassType); + item = Utils.parse(responseBodyAsByteArray, itemClassType, itemDeserializer); Instant serializationEndTime = Instant.now(); SerializationDiagnosticsContext.SerializationDiagnostics diagnostics = new SerializationDiagnosticsContext.SerializationDiagnostics( serializationStartTime, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ModelBridgeInternal.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ModelBridgeInternal.java index 18b644710772..0f2d57605310 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ModelBridgeInternal.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ModelBridgeInternal.java @@ -33,6 +33,8 @@ import com.azure.cosmos.implementation.Utils; import com.azure.cosmos.implementation.Warning; import com.azure.cosmos.implementation.directconnectivity.Address; +import com.azure.cosmos.implementation.ItemDeserializer; +import com.azure.cosmos.implementation.encryption.api.EncryptionOptions; import com.azure.cosmos.implementation.query.PartitionedQueryExecutionInfoInternal; import com.azure.cosmos.implementation.query.QueryInfo; import com.azure.cosmos.implementation.query.QueryItem; @@ -79,13 +81,13 @@ public static CosmosDatabaseResponse createCosmosDatabaseResponse(ResourceRespon } @Warning(value = INTERNAL_USE_ONLY_WARNING) - public static CosmosItemResponse createCosmosAsyncItemResponse(ResourceResponse response, Class classType) { - return new CosmosItemResponse<>(response, classType); + public static CosmosItemResponse createCosmosAsyncItemResponse(ResourceResponse response, Class classType, ItemDeserializer itemDeserializer) { + return new CosmosItemResponse<>(response, classType, itemDeserializer); } @Warning(value = INTERNAL_USE_ONLY_WARNING) public static CosmosItemResponse createCosmosAsyncItemResponseWithObjectType(ResourceResponse response) { - return new CosmosItemResponse<>(response, Object.class); + return new CosmosItemResponse<>(response, Object.class, null); } @Warning(value = INTERNAL_USE_ONLY_WARNING) @@ -610,6 +612,13 @@ public static JsonSerializable getJsonSerializable(T t) { } } + @Warning(value = INTERNAL_USE_ONLY_WARNING) + public static CosmosItemRequestOptions setEncryptionOptions(CosmosItemRequestOptions options, + EncryptionOptions encryptionOptions) { + options.setEncryptionOptions(encryptionOptions); + return options; + } + @Warning(value = INTERNAL_USE_ONLY_WARNING) public static Resource getResource(T t) { if (t == null) { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/util/CosmosPagedFlux.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/util/CosmosPagedFlux.java index ca9f20352f3a..91b9c4af81d2 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/util/CosmosPagedFlux.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/util/CosmosPagedFlux.java @@ -3,13 +3,19 @@ package com.azure.cosmos.util; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; import com.azure.core.util.IterableStream; import com.azure.core.util.paging.ContinuablePagedFlux; import com.azure.cosmos.implementation.CosmosPagedFluxOptions; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.TracerProvider; import com.azure.cosmos.models.FeedResponse; import reactor.core.CoreSubscriber; import reactor.core.publisher.Flux; +import reactor.core.publisher.Signal; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; /** @@ -37,24 +43,21 @@ public final class CosmosPagedFlux extends ContinuablePagedFlux> byPage() { CosmosPagedFluxOptions cosmosPagedFluxOptions = new CosmosPagedFluxOptions(); - - return this.optionsFluxFunction.apply(cosmosPagedFluxOptions); + return FluxUtil.fluxContext(context -> byPage(cosmosPagedFluxOptions, context)); } @Override public Flux> byPage(String continuationToken) { CosmosPagedFluxOptions cosmosPagedFluxOptions = new CosmosPagedFluxOptions(); cosmosPagedFluxOptions.setRequestContinuation(continuationToken); - - return this.optionsFluxFunction.apply(cosmosPagedFluxOptions); + return FluxUtil.fluxContext(context -> byPage(cosmosPagedFluxOptions, context)); } @Override public Flux> byPage(int preferredPageSize) { CosmosPagedFluxOptions cosmosPagedFluxOptions = new CosmosPagedFluxOptions(); cosmosPagedFluxOptions.setMaxItemCount(preferredPageSize); - - return this.optionsFluxFunction.apply(cosmosPagedFluxOptions); + return FluxUtil.fluxContext(context -> byPage(cosmosPagedFluxOptions, context)); } @Override @@ -62,8 +65,7 @@ public Flux> byPage(String continuationToken, int preferredPageS CosmosPagedFluxOptions cosmosPagedFluxOptions = new CosmosPagedFluxOptions(); cosmosPagedFluxOptions.setRequestContinuation(continuationToken); cosmosPagedFluxOptions.setMaxItemCount(preferredPageSize); - - return this.optionsFluxFunction.apply(cosmosPagedFluxOptions); + return FluxUtil.fluxContext(context -> byPage(cosmosPagedFluxOptions, context)); } /** @@ -84,4 +86,25 @@ public void subscribe(CoreSubscriber coreSubscriber) { return Flux.fromIterable(elements); }).subscribe(coreSubscriber); } + + private Flux> byPage(CosmosPagedFluxOptions pagedFluxOptions, Context context) { + final AtomicReference parentContext = new AtomicReference<>(Context.NONE); + return this.optionsFluxFunction.apply(pagedFluxOptions).doOnSubscribe(ignoredValue -> { + if (pagedFluxOptions.getTracerProvider().isEnabled()) { + parentContext.set(pagedFluxOptions.getTracerProvider().startSpan(pagedFluxOptions.getTracerSpanName(), + pagedFluxOptions.getDatabaseId(), pagedFluxOptions.getServiceEndpoint(), + context)); + } + }).doOnComplete(() -> { + if (pagedFluxOptions.getTracerProvider().isEnabled()) { + pagedFluxOptions.getTracerProvider().endSpan(parentContext.get(), Signal.complete(), + HttpConstants.StatusCodes.OK); + } + }).doOnError(throwable -> { + if (pagedFluxOptions.getTracerProvider().isEnabled()) { + pagedFluxOptions.getTracerProvider().endSpan(parentContext.get(), Signal.error(throwable), + TracerProvider.ERROR_CODE); + } + }); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java index 553cca6bf71f..58e2692dd923 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. + module com.azure.cosmos { requires transitive com.azure.core; @@ -46,7 +47,9 @@ opens com.azure.cosmos.implementation.query.orderbyquery to com.fasterxml.jackson.databind; opens com.azure.cosmos.implementation.routing to com.fasterxml.jackson.databind; opens com.azure.cosmos.models to com.fasterxml.jackson.databind; + opens com.azure.cosmos.implementation.encryption to com.fasterxml.jackson.databind; opens com.azure.cosmos.util to com.fasterxml.jackson.databind; uses com.azure.cosmos.implementation.guava25.base.PatternCompiler; + uses com.azure.core.util.tracing.Tracer; } diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosDatabaseTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosDatabaseTest.java index 05a48f263026..893d1c029101 100644 --- a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosDatabaseTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosDatabaseTest.java @@ -93,6 +93,7 @@ public void createDatabase_alreadyExists() throws Exception { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_withId() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); + databases.add(databaseDefinition.getId()); CosmosDatabaseResponse createResponse = client.createDatabase(databaseDefinition.getId()); validateDatabaseResponse(databaseDefinition, createResponse); @@ -101,6 +102,7 @@ public void createDatabase_withId() throws Exception { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_withPropertiesThroughputAndOptions() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); + databases.add(databaseDefinition.getId()); CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); CosmosDatabaseRequestOptions requestOptions = new CosmosDatabaseRequestOptions(); int throughput = 400; @@ -115,6 +117,8 @@ public void createDatabase_withPropertiesThroughputAndOptions() throws Exception @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_withPropertiesAndThroughput() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); + databases.add(databaseDefinition.getId()); + CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); int throughput = 1000; try { @@ -132,6 +136,7 @@ public void createDatabase_withPropertiesAndThroughput() throws Exception { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void createDatabase_withIdAndThroughput() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); + databases.add(databaseDefinition.getId()); int throughput = 1000; try { CosmosDatabaseResponse createResponse = client.createDatabase(databaseDefinition.getId(), ThroughputProperties.createManualThroughput(throughput)); @@ -191,6 +196,7 @@ public void queryAllDatabases() throws Exception { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void deleteDatabase() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); + databases.add(databaseDefinition.getId()); CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); CosmosDatabaseResponse createResponse = client.createDatabase(databaseProperties); @@ -200,6 +206,7 @@ public void deleteDatabase() throws Exception { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void deleteDatabase_withOptions() throws Exception { CosmosDatabaseProperties databaseDefinition = new CosmosDatabaseProperties(CosmosDatabaseForTest.generateId()); + databases.add(databaseDefinition.getId()); CosmosDatabaseProperties databaseProperties = new CosmosDatabaseProperties(databaseDefinition.getId()); CosmosDatabaseResponse createResponse = client.createDatabase(databaseProperties); CosmosDatabaseRequestOptions options = new CosmosDatabaseRequestOptions(); diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosTracerTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosTracerTest.java new file mode 100644 index 000000000000..0ca321b280d6 --- /dev/null +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosTracerTest.java @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +import com.azure.core.util.Context; +import com.azure.core.util.tracing.Tracer; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.InternalObjectNode; +import com.azure.cosmos.implementation.LifeCycleUtils; +import com.azure.cosmos.implementation.TestConfigurations; +import com.azure.cosmos.implementation.TracerProvider; +import com.azure.cosmos.implementation.directconnectivity.ReflectionUtils; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.CosmosStoredProcedureProperties; +import com.azure.cosmos.models.CosmosTriggerProperties; +import com.azure.cosmos.models.CosmosUserDefinedFunctionProperties; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.ThroughputProperties; +import com.azure.cosmos.models.TriggerOperation; +import com.azure.cosmos.models.TriggerType; +import com.azure.cosmos.rx.TestSuiteBase; +import org.mockito.Matchers; +import org.mockito.Mockito; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +public class CosmosTracerTest extends TestSuiteBase { + private static final String ITEM_ID = "tracerDoc"; + CosmosAsyncClient client; + CosmosAsyncDatabase cosmosAsyncDatabase; + CosmosAsyncContainer cosmosAsyncContainer; + + @BeforeClass(groups = {"emulator"}, timeOut = SETUP_TIMEOUT) + public void beforeClass() { + client = new CosmosClientBuilder() + .endpoint(TestConfigurations.HOST) + .key(TestConfigurations.MASTER_KEY) + .directMode(DirectConnectionConfig.getDefaultConfig()) + .buildAsyncClient(); + cosmosAsyncDatabase = getSharedCosmosDatabase(client); + cosmosAsyncContainer = getSharedMultiPartitionCosmosContainer(client); + + } + + @Test(groups = {"emulator"}, timeOut = TIMEOUT) + public void cosmosAsyncClient() { + Tracer mockTracer = getMockTracer(); + TracerProvider tracerProvider = Mockito.spy(new TracerProvider(mockTracer)); + ReflectionUtils.setTracerProvider(client, tracerProvider); + int traceApiCounter = 1; + + TracerProviderCapture tracerProviderCapture = new TracerProviderCapture(); + Mockito.doAnswer(tracerProviderCapture).when(tracerProvider).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + + client.createDatabaseIfNotExists(cosmosAsyncDatabase.getId(), ThroughputProperties.createManualThroughput(5000)).block(); + Context context = tracerProviderCapture.getResult(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "createDatabaseIfNotExists." + cosmosAsyncDatabase.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + client.readAllDatabases(new CosmosQueryRequestOptions()).byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readAllDatabases", context, null, traceApiCounter, null); + traceApiCounter++; + + + String query = "select * from c where c.id = '" + cosmosAsyncDatabase.getId() + "'"; + client.queryDatabases(query, new CosmosQueryRequestOptions()).byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "queryDatabases", context, null, traceApiCounter, null); + } + + @Test(groups = {"emulator"}, timeOut = TIMEOUT) + public void cosmosAsyncDatabase() { + Tracer mockTracer = getMockTracer(); + TracerProvider tracerProvider = Mockito.spy(new TracerProvider(mockTracer)); + ReflectionUtils.setTracerProvider(client, tracerProvider); + TracerProviderCapture tracerProviderCapture = new TracerProviderCapture(); + Mockito.doAnswer(tracerProviderCapture).when(tracerProvider).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + int traceApiCounter = 1; + + cosmosAsyncDatabase.createContainerIfNotExists(cosmosAsyncContainer.getId(), + "/pk", 5000).block(); + Context context = tracerProviderCapture.getResult(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "createContainerIfNotExists." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncDatabase.readAllUsers().byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readAllUsers." + cosmosAsyncDatabase.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncDatabase.readAllContainers().byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readAllContainers." + cosmosAsyncDatabase.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + String errorType = null; + try { + cosmosAsyncDatabase.readThroughput().block(); + } catch (CosmosException ex) { + errorType = ex.getClass().getName(); + } + + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readThroughput." + cosmosAsyncDatabase.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, errorType); + } + + @Test(groups = {"emulator"}, timeOut = TIMEOUT) + public void cosmosAsyncContainer() { + Tracer mockTracer = getMockTracer(); + TracerProvider tracerProvider = Mockito.spy(new TracerProvider(mockTracer)); + ReflectionUtils.setTracerProvider(client, tracerProvider); + TracerProviderCapture tracerProviderCapture = new TracerProviderCapture(); + Mockito.doAnswer(tracerProviderCapture).when(tracerProvider).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + int traceApiCounter = 1; + + cosmosAsyncContainer.read().block(); + Context context = tracerProviderCapture.getResult(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readContainer." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + try { + cosmosAsyncContainer.readThroughput().block(); + } catch (CosmosException ex) { + //do nothing + } + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readThroughput." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + InternalObjectNode item = new InternalObjectNode(); + item.setId(ITEM_ID); + cosmosAsyncContainer.createItem(item).block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "createItem." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.upsertItem(item, + new CosmosItemRequestOptions()).block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "upsertItem." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + InternalObjectNode node = cosmosAsyncContainer.readItem(ITEM_ID, PartitionKey.NONE, + InternalObjectNode.class).block().getItem(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readItem." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.deleteItem(ITEM_ID, PartitionKey.NONE).block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "deleteItem." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.readAllItems(new CosmosQueryRequestOptions(), CosmosItemRequestOptions.class).byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readAllItems." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + String query = "select * from c where c.id = '" + ITEM_ID + "'"; + cosmosAsyncContainer.queryItems(query, new CosmosQueryRequestOptions(), CosmosItemRequestOptions.class).byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "queryItems." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + } + + @Test(groups = {"emulator"}, timeOut = TIMEOUT) + public void cosmosAsyncScripts() { + Tracer mockTracer = getMockTracer(); + TracerProvider tracerProvider = Mockito.spy(new TracerProvider(mockTracer)); + ReflectionUtils.setTracerProvider(client, tracerProvider); + TracerProviderCapture tracerProviderCapture = new TracerProviderCapture(); + Mockito.doAnswer(tracerProviderCapture).when(tracerProvider).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + int traceApiCounter = 1; + + cosmosAsyncContainer.getScripts().readAllStoredProcedures(new CosmosQueryRequestOptions()).byPage().single().block(); + Context context = tracerProviderCapture.getResult(); + + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readAllStoredProcedures." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().readAllTriggers(new CosmosQueryRequestOptions()).byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readAllTriggers." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().readAllUserDefinedFunctions(new CosmosQueryRequestOptions()).byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readAllUserDefinedFunctions." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + CosmosUserDefinedFunctionProperties cosmosUserDefinedFunctionProperties = + getCosmosUserDefinedFunctionProperties(); + CosmosUserDefinedFunctionProperties resultUdf = + cosmosAsyncContainer.getScripts().createUserDefinedFunction(cosmosUserDefinedFunctionProperties).block().getProperties(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "createUserDefinedFunction." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().getUserDefinedFunction(cosmosUserDefinedFunctionProperties.getId()).read().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readUserDefinedFunction." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosUserDefinedFunctionProperties.setBody("function() {var x = 15;}"); + cosmosAsyncContainer.getScripts().getUserDefinedFunction(resultUdf.getId()).replace(resultUdf).block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "replaceUserDefinedFunction." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().readAllUserDefinedFunctions(new CosmosQueryRequestOptions()).byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().getUserDefinedFunction(cosmosUserDefinedFunctionProperties.getId()).delete().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "deleteUserDefinedFunction." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + CosmosTriggerProperties cosmosTriggerProperties = getCosmosTriggerProperties(); + CosmosTriggerProperties resultTrigger = + cosmosAsyncContainer.getScripts().createTrigger(cosmosTriggerProperties).block().getProperties(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "createTrigger." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().getTrigger(cosmosTriggerProperties.getId()).read().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readTrigger." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().getTrigger(cosmosTriggerProperties.getId()).replace(resultTrigger).block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "replaceTrigger." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().readAllTriggers(new CosmosQueryRequestOptions()).byPage().single().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().getTrigger(cosmosTriggerProperties.getId()).delete().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "deleteTrigger." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + CosmosStoredProcedureProperties procedureProperties = getCosmosStoredProcedureProperties(); + CosmosStoredProcedureProperties resultSproc = + cosmosAsyncContainer.getScripts().createStoredProcedure(procedureProperties).block().getProperties(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "createStoredProcedure." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().getStoredProcedure(procedureProperties.getId()).read().block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readStoredProcedure." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().getStoredProcedure(procedureProperties.getId()).replace(resultSproc).block(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "replaceStoredProcedure." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + cosmosAsyncContainer.getScripts().readAllStoredProcedures(new CosmosQueryRequestOptions()).byPage().single().block(); + + cosmosAsyncContainer.getScripts().getStoredProcedure(procedureProperties.getId()).delete().block(); + traceApiCounter++; + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "deleteStoredProcedure." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + } + + @Test(groups = {"emulator"}, timeOut = TIMEOUT) + public void tracerExceptionSpan() { + Tracer mockTracer = getMockTracer(); + TracerProvider tracerProvider = Mockito.spy(new TracerProvider(mockTracer)); + ReflectionUtils.setTracerProvider(client, tracerProvider); + int traceApiCounter = 1; + + TracerProviderCapture tracerProviderCapture = new TracerProviderCapture(); + Mockito.doAnswer(tracerProviderCapture).when(tracerProvider).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + + InternalObjectNode item = new InternalObjectNode(); + item.setId("testDoc"); + cosmosAsyncContainer.createItem(item).block(); + Context context = tracerProviderCapture.getResult(); + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "createItem." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter, null); + traceApiCounter++; + + String errorType = null; + try { + PartitionKey partitionKey = new PartitionKey("wrongPk"); + cosmosAsyncContainer.readItem("testDoc", partitionKey, null, InternalObjectNode.class).block(); + fail("readItem should fail due to wrong pk"); + } catch (CosmosException ex) { + assertThat(ex.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.NOTFOUND); + errorType = ex.getClass().getName(); + } + Mockito.verify(tracerProvider, Mockito.times(traceApiCounter)).startSpan(Matchers.anyString(), + Matchers.anyString(), + Matchers.anyString(), Matchers.any(Context.class)); + verifyTracerAttributes(mockTracer, "readItem." + cosmosAsyncContainer.getId(), context, + cosmosAsyncDatabase.getId(), traceApiCounter + , errorType); + } + + @AfterClass(groups = {"emulator"}, timeOut = SETUP_TIMEOUT) + public void afterClass() { + LifeCycleUtils.closeQuietly(client); + } + + private static CosmosUserDefinedFunctionProperties getCosmosUserDefinedFunctionProperties() { + CosmosUserDefinedFunctionProperties udf = + new CosmosUserDefinedFunctionProperties(UUID.randomUUID().toString(), "function() {var x = 10;}"); + return udf; + } + + private static CosmosTriggerProperties getCosmosTriggerProperties() { + CosmosTriggerProperties trigger = new CosmosTriggerProperties(UUID.randomUUID().toString(), "function() {var " + + "x = 10;}"); + trigger.setTriggerOperation(TriggerOperation.CREATE); + trigger.setTriggerType(TriggerType.PRE); + return trigger; + } + + private static CosmosStoredProcedureProperties getCosmosStoredProcedureProperties() { + CosmosStoredProcedureProperties storedProcedureDef = + new CosmosStoredProcedureProperties(UUID.randomUUID().toString(), "function() {var x = 10;}"); + return storedProcedureDef; + } + + private Tracer getMockTracer() { + Tracer mockTracer = Mockito.mock(Tracer.class); + Mockito.when(mockTracer.start(Matchers.anyString(), Matchers.any(Context.class))).thenReturn(Context.NONE); + return mockTracer; + } + + private void verifyTracerAttributes(Tracer mockTracer, String methodName, Context context, String databaseName, + int numberOfTimesCalledWithinTest, String errorType) { + if (databaseName != null) { + Mockito.verify(mockTracer, Mockito.times(numberOfTimesCalledWithinTest)).setAttribute(TracerProvider.DB_INSTANCE, + databaseName, context); + } + Mockito.verify(mockTracer, Mockito.times(numberOfTimesCalledWithinTest)).setAttribute(TracerProvider.DB_TYPE, + TracerProvider.DB_TYPE_VALUE, context); + Mockito.verify(mockTracer, Mockito.times(numberOfTimesCalledWithinTest)).setAttribute(TracerProvider.DB_URL, + TestConfigurations.HOST, + context); + Mockito.verify(mockTracer, Mockito.times(1)).setAttribute(TracerProvider.DB_STATEMENT, methodName, context); + if (errorType == null) { + Mockito.verify(mockTracer, Mockito.times(0)).setAttribute(Mockito.eq(TracerProvider.ERROR_MSG) + , Matchers.anyString(), Mockito.eq(context)); + Mockito.verify(mockTracer, Mockito.times(0)).setAttribute(Mockito.eq(TracerProvider.ERROR_TYPE) + , Matchers.anyString(), Mockito.eq(context)); + } else { + Mockito.verify(mockTracer, Mockito.times(1)).setAttribute(Mockito.eq(TracerProvider.ERROR_TYPE) + , Mockito.eq(errorType), Mockito.eq(context)); + Mockito.verify(mockTracer, Mockito.times(1)).setAttribute(Mockito.eq(TracerProvider.ERROR_MSG) + , Matchers.anyString(), Mockito.eq(context)); + } + } + + private class TracerProviderCapture implements Answer { + private Context result = null; + + public Context getResult() { + return result; + } + + @Override + public Context answer(InvocationOnMock invocationOnMock) throws Throwable { + result = (Context) invocationOnMock.callRealMethod(); + return result; + } + } +} diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java index 9dbdc312ffcd..5a9063584e37 100644 --- a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java @@ -9,6 +9,7 @@ import com.azure.cosmos.implementation.AsyncDocumentClient; import com.azure.cosmos.implementation.GlobalEndpointManager; import com.azure.cosmos.implementation.RxDocumentClientImpl; +import com.azure.cosmos.implementation.TracerProvider; import com.azure.cosmos.implementation.http.HttpClient; import org.apache.commons.lang3.reflect.FieldUtils; @@ -104,4 +105,8 @@ public static GatewayServiceConfigurationReader getServiceConfigurationReader(Rx public static void setBackgroundRefreshLocationTimeIntervalInMS(GlobalEndpointManager globalEndPointManager, int millSec){ set(globalEndPointManager, millSec, "backgroundRefreshLocationTimeIntervalInMS"); } + + public static void setTracerProvider(CosmosAsyncClient cosmosAsyncClient, TracerProvider tracerProvider){ + set(cosmosAsyncClient, tracerProvider, "tracerProvider"); + } } diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/CollectionCrudTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/CollectionCrudTest.java index 1b05b05355b7..de0aeb006891 100644 --- a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/CollectionCrudTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/CollectionCrudTest.java @@ -361,10 +361,6 @@ public void sessionTokenConsistencyCollectionDeleteCreateSameName() { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void replaceProvisionedThroughput(){ - final String databaseName = CosmosDatabaseForTest.generateId(); - client.createDatabase(databaseName).block(); - CosmosAsyncDatabase database = client.getDatabase(databaseName); - CosmosContainerProperties containerProperties = new CosmosContainerProperties("testCol", "/myPk"); database.createContainer( containerProperties, diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ContainerCreateDeleteWithSameNameTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ContainerCreateDeleteWithSameNameTest.java index 24380fcdb4f3..6d1691d2e671 100644 --- a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ContainerCreateDeleteWithSameNameTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ContainerCreateDeleteWithSameNameTest.java @@ -46,7 +46,7 @@ public class ContainerCreateDeleteWithSameNameTest extends TestSuiteBase { private final static int TIMEOUT = 300000; // Delete collections in emulator is not instant, // so to avoid get 500 back, we are adding delay for creating the collection with same name, since in this case we want to test 410/1000 - private final static int COLLECTION_RECREATION_TIME_DELAY = 2000; + private final static int COLLECTION_RECREATION_TIME_DELAY = 5000; private CosmosAsyncClient client; private CosmosAsyncDatabase createdDatabase; @@ -146,7 +146,6 @@ public void upsertItem() throws Exception { @Test(groups = {"emulator"}, timeOut = TIMEOUT) public void changeFeed() throws Exception { - ObjectMapper objectMapper = Utils.getSimpleObjectMapper(); BiConsumer func = (feedContainer, leaseContainer) -> { String hostName = RandomStringUtils.randomAlphabetic(6); @@ -187,12 +186,8 @@ public void changeFeed() throws Exception { changeFeedProcessor.start().subscribeOn(Schedulers.elastic()) .timeout(Duration.ofMillis(2 * CHANGE_FEED_PROCESSOR_TIMEOUT)) .subscribe(); - } catch (Exception ex) { - throw ex; - } - // Wait for the feed processor to receive and process the documents. - try { + // Wait for the feed processor to receive and process the documents. Thread.sleep(2 * CHANGE_FEED_PROCESSOR_TIMEOUT); assertThat(changeFeedProcessor.isStarted()).as("Change Feed Processor instance is running").isTrue(); @@ -203,14 +198,16 @@ public void changeFeed() throws Exception { } assertThat(remainingWork >= 0).as("Failed to receive all the feed documents").isTrue(); - + } catch (InterruptedException e) { + throw new RuntimeException("Interrupted exception", e); + } finally { changeFeedProcessor.stop().subscribeOn(Schedulers.elastic()).timeout(Duration.ofMillis(CHANGE_FEED_PROCESSOR_TIMEOUT)).subscribe(); // Wait for the feed processor to shutdown. - Thread.sleep(CHANGE_FEED_PROCESSOR_TIMEOUT); - - } catch (InterruptedException e) { - throw new RuntimeException("Interrupted exception", e); + try { + Thread.sleep(CHANGE_FEED_PROCESSOR_TIMEOUT); + } catch (InterruptedException e) { + } } }; diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ReadFeedExceptionHandlingTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ReadFeedExceptionHandlingTest.java index b9424abd3d32..21d5a6680674 100644 --- a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ReadFeedExceptionHandlingTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ReadFeedExceptionHandlingTest.java @@ -2,12 +2,14 @@ // Licensed under the MIT License. package com.azure.cosmos.rx; +import com.azure.core.util.tracing.Tracer; import com.azure.cosmos.BridgeInternal; import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; -import com.azure.cosmos.util.CosmosPagedFlux; +import com.azure.cosmos.implementation.TracerProvider; import com.azure.cosmos.models.CosmosDatabaseProperties; import com.azure.cosmos.models.FeedResponse; +import com.azure.cosmos.util.CosmosPagedFlux; import com.azure.cosmos.util.UtilBridgeInternal; import io.reactivex.subscribers.TestSubscriber; import org.mockito.Mockito; @@ -18,6 +20,7 @@ import reactor.core.publisher.Flux; import java.util.ArrayList; +import java.util.ServiceLoader; import static org.assertj.core.api.Assertions.assertThat; @@ -46,7 +49,10 @@ public void readFeedException() throws Exception { .mergeWith(Flux.fromIterable(frps)); final CosmosAsyncClientWrapper mockedClientWrapper = Mockito.spy(new CosmosAsyncClientWrapper(client)); - Mockito.when(mockedClientWrapper.readAllDatabases()).thenReturn(UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> response)); + Mockito.when(mockedClientWrapper.readAllDatabases()).thenReturn(UtilBridgeInternal.createCosmosPagedFlux(pagedFluxOptions -> { + pagedFluxOptions.setTracerInformation(new TracerProvider(null), "testSpan", "testEndpoint,", "testDb"); + return response; + })); TestSubscriber> subscriber = new TestSubscriber<>(); mockedClientWrapper.readAllDatabases().byPage().subscribe(subscriber); assertThat(subscriber.valueCount()).isEqualTo(2); diff --git a/sdk/cosmos/azure-spring-data-cosmos/CONTRIBUTING.md b/sdk/cosmos/azure-spring-data-cosmos/CONTRIBUTING.md new file mode 100644 index 000000000000..89f375ad5188 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/CONTRIBUTING.md @@ -0,0 +1,69 @@ +# Contributing +This instruction is guideline for building and code contribution. + +## Prequisites +- JDK 1.8 and above +- [Maven](http://maven.apache.org/) 3.0 and above + +## Build from source +To build the project, run maven commands. + +```bash +git clone https://github.com/Azure/azure-sdk-for-java.git +cd sdk/cosmos/azure-spring-data-cosmos +mvnw clean install +``` + +## Test +There're integration tests on azure and on emulator to trigger integration test execution against Azure Cosmos DB and against [Azure Cosmos DB Emulator](https://docs.microsoft.com/azure/cosmos-db/local-emulator), you need to follow the link to setup emulator before test execution. + +- Run unit tests +```bash +mvn clean install -Dgpg.skip +``` + +- Run integration tests + - on Azure + >**NOTE** Please note that integration test against Azure requires Azure Cosmos DB Document API and will automatically create a Cosmos database in your Azure subscription, then there will be **Azure usage fee.** + + Integration tests will require a Azure Subscription. If you don't already have an Azure subscription, you can activate your [MSDN subscriber benefits](https://azure.microsoft.com/pricing/member-offers/msdn-benefits-details/) or sign up for a [free Azure account](https://azure.microsoft.com/free/). + + 1. Create an Azure Cosmos DB on Azure. + - Go to [Azure portal](https://portal.azure.com/) and click +New. + - Click Databases, and then click Azure Cosmos DB to create your database. + - Navigate to the database you have created, and click Access keys and copy your URI and access keys for your database. + + 2. Set environment variables ACCOUNT_HOST, ACCOUNT_KEY and SECONDARY_ACCOUNT_KEY, where value of them are Cosmos account URI, primary key and secondary key. + + `azure-spring-data-cosmos` also support multiple database configuration. So set the second group environment variables NEW_ACCOUNT_HOST, NEW_ACCOUNT_KEY and NEW_SECONDARY_ACCOUNT_KEY, the two group environment variables can be same. + 3. Run maven command with `integration-test-azure` profile. + + ```bash + set ACCOUNT_HOST=your-cosmos-account-uri + set ACCOUNT_KEY=your-cosmos-account-primary-key + set SECONDARY_ACCOUNT_KEY=your-cosmos-account-secondary-key + + set NEW_ACCOUNT_HOST=your-cosmos-account-uri + set NEW_ACCOUNT_KEY=your-cosmos-account-primary-key + set NEW_SECONDARY_ACCOUNT_KEY=your-cosmos-account-secondary-key + mvnw -P integration-test-azure clean install + ``` + + - on Emulator + + Setup Azure Cosmos DB Emulator by following [this instruction](https://docs.microsoft.com/azure/cosmos-db/local-emulator), and set associated environment variables. Then run test with: + ```bash + mvnw -P integration-test-emulator install + ``` + + +- Skip tests execution +```bash +mvn clean install -Dgpg.skip-DskipTests +``` + +## Version management +Developing version naming convention is like `0.1.2-beta.1`. Release version naming convention is like `0.1.2`. + +## Contribute to code +Contribution is welcome. Please follow [this instruction](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md) to contribute code. diff --git a/sdk/cosmos/azure-spring-data-cosmos/Contributing.md b/sdk/cosmos/azure-spring-data-cosmos/Contributing.md index daad18919bf4..89f375ad5188 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/Contributing.md +++ b/sdk/cosmos/azure-spring-data-cosmos/Contributing.md @@ -33,15 +33,22 @@ mvn clean install -Dgpg.skip - Click Databases, and then click Azure Cosmos DB to create your database. - Navigate to the database you have created, and click Access keys and copy your URI and access keys for your database. - 2. Set environment variables ACCOUNT_HOST, ACCOUNT_KEY and SECONDARY_ACCOUNT_KEY, where value of them are Cosmos account URI, primary key and secondary key. + 2. Set environment variables ACCOUNT_HOST, ACCOUNT_KEY and SECONDARY_ACCOUNT_KEY, where value of them are Cosmos account URI, primary key and secondary key. + + `azure-spring-data-cosmos` also support multiple database configuration. So set the second group environment variables NEW_ACCOUNT_HOST, NEW_ACCOUNT_KEY and NEW_SECONDARY_ACCOUNT_KEY, the two group environment variables can be same. 3. Run maven command with `integration-test-azure` profile. ```bash set ACCOUNT_HOST=your-cosmos-account-uri set ACCOUNT_KEY=your-cosmos-account-primary-key set SECONDARY_ACCOUNT_KEY=your-cosmos-account-secondary-key + + set NEW_ACCOUNT_HOST=your-cosmos-account-uri + set NEW_ACCOUNT_KEY=your-cosmos-account-primary-key + set NEW_SECONDARY_ACCOUNT_KEY=your-cosmos-account-secondary-key mvnw -P integration-test-azure clean install ``` + - on Emulator Setup Azure Cosmos DB Emulator by following [this instruction](https://docs.microsoft.com/azure/cosmos-db/local-emulator), and set associated environment variables. Then run test with: diff --git a/sdk/cosmos/azure-spring-data-cosmos/README.md b/sdk/cosmos/azure-spring-data-cosmos/README.md index c6e8f26a2772..7165d7f84b5c 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/README.md +++ b/sdk/cosmos/azure-spring-data-cosmos/README.md @@ -1,25 +1,499 @@ #Azure Cosmos DB client library for Java ## Getting started +[Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/introduction) is a globally-distributed database service that allows developers to work with data using a variety of standard APIs, such as SQL, MongoDB, Cassandra, Graph, and Table. + +**Spring Data Azure Cosmos DB** provides initial Spring Data support for Azure Cosmos DB using the [SQL API](https://docs.microsoft.com/azure/cosmos-db/sql-api-introduction), based on Spring Data framework. Currently it only supports SQL API, the other APIs are in the plan. ## TOC -## Examples +* [Examples](#Examples) +* [Spring data version support](#spring-data-version-support) +* [Feature List](#feature-list) +* [Quick Start](#quick-start) +* [Beta version package](#Beta version package) +* [Troubleshooting](#Troubleshooting) +* [Contributing](#Contributing) +* [Code of Conduct](#code-of-conduct) +* [Key concepts](#Key concepts) +* [Next steps](#Next steps) -## Spring Data Version Support +## Examples +Please refer to [sample project here](./samplecode). ## Feature List +- Spring Data ReactiveCrudRepository CrudRepository basic CRUD functionality + - save + - findAll + - findOne by Id + - deleteAll + - delete by Id + - delete entity +- Spring Data [@Id](https://github.com/spring-projects/spring-data-commons/blob/db62390de90c93a78743c97cc2cc9ccd964994a5/src/main/java/org/springframework/data/annotation/Id.java) annotation. + There're 2 ways to map a field in domain class to `id` field of Azure Cosmos DB document. + - annotate a field in domain class with `@Id`, this field will be mapped to document `id` in Cosmos DB. + - set name of this field to `id`, this field will be mapped to document `id` in Azure Cosmos DB. +- Custom container Name. + By default, container name will be class name of user domain class. To customize it, add the `@Document(container="myCustomContainerName")` annotation to the domain class. The container field also supports SpEL expressions (eg. `container = "${dynamic.container.name}"` or `container = "#{@someBean.getContainerName()}"`) in order to provide container names programmatically/via configuration properties. +- Custom IndexingPolicy + By default, IndexingPolicy will be set by azure service. To customize it add annotation `@DocumentIndexingPolicy` to domain class. This annotation has 4 attributes to customize, see following: + +```java +// Indicate if indexing policy use automatic or not +boolean automatic() default Constants.DEFAULT_INDEXING_POLICY_AUTOMATIC; + +// Indexing policy mode, option Consistent|Lazy|None. +IndexingMode mode() default IndexingMode.CONSISTENT; + +// Included paths for indexing +String[] includePaths() default {}; + +// Excluded paths for indexing +String[] excludePaths() default {}; +``` + +- Supports Optimistic Locking for specific containers, which means upserts/deletes by document will fail with an exception in case the document was modified by another process in the meanwhile. To enable Optimistic Locking for a container, just create a string `_etag` field and mark it with the `@Version` annotation. See the following: + + +```java +@Document(container = "myContainer") +public class MyDocument { + String id; + String data; + @Version + String _etag; +} +``` +- Supports [Azure Cosmos DB partition](https://docs.microsoft.com/azure/cosmos-db/partition-data). To specify a field of domain class to be partition key field, just annotate it with `@PartitionKey`. When you do CRUD operation, pls specify your partition value. For more sample on partition CRUD, pls refer to [test here](./src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java) +- Supports [Spring Data custom query](https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.query-methods.details) find operation, e.g., `findByAFieldAndBField` +- Supports [Spring Data pagable and sort](https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters). + - Based on available RUs on the database account, cosmosDB can return documents less than or equal to the requested size. + - Due to this variable number of returned documents in every iteration, user should not rely on the totalPageSize, and instead iterating over pageable should be done in this way. + +```java +private List findAllWithPageSize(int pageSize) { + + final CosmosPageRequest pageRequest = new CosmosPageRequest(0, pageSize, null); + Page page = repository.findAll(pageRequest); + List pageContent = page.getContent(); + while (page.hasNext()) { + Pageable nextPageable = page.nextPageable(); + page = repository.findAll(nextPageable); + pageContent = page.getContent(); + } + return pageContent; +} +``` +- Supports [spring-boot-starter-data-rest](https://projects.spring.io/spring-data-rest/). +- Supports List and nested type in domain class. +- Configurable ObjectMapper bean with unique name `cosmosObjectMapper`, only configure customized ObjectMapper if you really need to. e.g., + +```java +@Bean(name = "cosmosObjectMapper") +public ObjectMapper objectMapper() { + return new ObjectMapper(); // Do configuration to the ObjectMapper if required +} +``` ## Quick Start -## Snapshots +### Add the dependency +`azure-spring-data-cosmos` is published on Maven Central Repository. +If you are using Maven, add the following dependency. + +[//]: # "{x-version-update-start;com.azure:azure-spring-data-cosmos;current}" +```xml + + com.azure + azure-spring-data-cosmos + 3.0.0-beta.1 + +``` + +### Setup Configuration +Setup configuration class. + +CosmosKeyCredential feature provides capability to rotate keys on the fly. You can switch keys using switchToSecondaryKey(). +For more information on this, see the Sample Application code. + +### Sync and Reactive Repository support +2.2.x supports both sync and reactive repository support. + +Use `@EnableCosmosRepositories` to enable sync repository support. + +For reactive repository support, use `@EnableReactiveCosmosRepositories` + +### Response Diagnostics String and Query Metrics +2.2.x supports Response Diagnostics String and Query Metrics. +Set `queryMetricsEnabled` flag to true in application.properties to enable query metrics. +In addition to setting the flag, implement `ResponseDiagnosticsProcessor` to log diagnostics information. + + +```java +@Configuration +@EnableCosmosRepositories +public class AppConfiguration extends AbstractCosmosConfiguration { + + private static final Logger logger = LoggerFactory.getLogger(AppConfiguration.class); + + @Value("${azure.cosmos.uri}") + private String uri; + + @Value("${azure.cosmos.key}") + private String key; + + @Value("${azure.cosmos.secondaryKey}") + private String secondaryKey; + + @Value("${azure.cosmos.database}") + private String dbName; + + @Value("${azure.cosmos.queryMetricsEnabled}") + private boolean queryMetricsEnabled; + + private AzureKeyCredential azureKeyCredential; + + public CosmosConfig getConfig() { + this.azureKeyCredential = new AzureKeyCredential(key); + DirectConnectionConfig directConnectionConfig = new DirectConnectionConfig(); + GatewayConnectionConfig gatewayConnectionConfig = new GatewayConnectionConfig(); + CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder() + .endpoint(uri) + .credential(azureKeyCredential) + .directMode(directConnectionConfig, gatewayConnectionConfig); + return CosmosConfig.builder() + .database(dbName) + .enableQueryMetrics(queryMetricsEnabled) + .cosmosClientBuilder(cosmosClientBuilder) + .responseDiagnosticsProcessor(new ResponseDiagnosticsProcessorImplementation()) + .build(); + } + + public void switchToSecondaryKey() { + this.azureKeyCredential.update(secondaryKey); + } + + private static class ResponseDiagnosticsProcessorImplementation implements ResponseDiagnosticsProcessor { + + @Override + public void processResponseDiagnostics(@Nullable ResponseDiagnostics responseDiagnostics) { + logger.info("Response Diagnostics {}", responseDiagnostics); + } + } + +} +``` +Or if you want to customize your config: + +```java +public CosmosConfig getConfig() { + DirectConnectionConfig directConnectionConfig = new DirectConnectionConfig(); + GatewayConnectionConfig gatewayConnectionConfig = new GatewayConnectionConfig(); + CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder() + .endpoint(uri) + .directMode(directConnectionConfig, gatewayConnectionConfig); + return CosmosConfig.builder() + .database(dbName) + .enableQueryMetrics(queryMetricsEnabled) + .cosmosClientBuilder(cosmosClientBuilder) + .responseDiagnosticsProcessor(new ResponseDiagnosticsProcessorImplementation()) + .build(); +} +``` +By default, `@EnableCosmosRepositories` will scan the current package for any interfaces that extend one of Spring Data's repository interfaces. Using it to annotate your Configuration class to scan a different root package by `@EnableCosmosRepositories(basePackageClass=UserRepository.class)` if your project layout has multiple projects and it's not finding your repositories. + + +### Define an entity +Define a simple entity as Document in Azure Cosmos DB. + +You can define entities by adding the `@Document` annotation and specifying properties related to the container, such as the container name, request units (RUs), time to live, and auto-create container. + +Containers will be created automatically unless you don't want them to: Set `autoCreateContainer` to false in `@Document` annotation to disable auto creation of containers. + +Note: By default request units assigned to newly created containers is 4000. Specify different ru value to customize request units for the container created by the SDK (minimum RU value is 400). + +```java +@Document(container = "myContainer", ru = "400") +public class User { + private String id; + private String firstName; + + + @PartitionKey + private String lastName; + + public User() { + // If you do not want to create a default constructor, + // use annotation @JsonCreator and @JsonProperty in the full args constructor + } + + public User(String id, String firstName, String lastName) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + } + + @Override + public String toString() { + return String.format("User: %s %s, %s", firstName, lastName, id); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } +} +``` +`id` field will be used as document id in Azure Cosmos DB. If you want use another field like `emailAddress` as document `id`, just annotate that field with `@Id` annotation. + +Annotation `@Document(container="myContainer")` is used to specify container name in Azure Cosmos DB. +Annotation `@PartitionKey` on `lastName` field is used to specify this field be partition key in Azure Cosmos DB. + +```java +@Document(container = "myContainer") +public class UserSample { + @Id + private String emailAddress; + +} +``` + +### Create repositories +Extends CosmosRepository interface, which provides Spring Data repository support. + + +```java +@Repository +public interface UserRepository extends CosmosRepository { + List findByFirstName(String firstName); + User findOne(String id, String lastName); +} +``` + +`findByFirstName` method is custom query method, it will find documents per FirstName. + +### Create an Application class +Here create an application class with all the components + + +```java +@SpringBootApplication +public class SampleApplication implements CommandLineRunner { + + @Autowired + private UserRepository repository; + + @Autowired + private ApplicationContext applicationContext; + + public static void main(String[] args) { + SpringApplication.run(SampleApplication.class, args); + } + + public void run(String... var1) { + + final User testUser = new User("testId", "testFirstName", "testLastName"); + + repository.deleteAll(); + repository.save(testUser); + + // to find by Id, please specify partition key value if collection is partitioned + final User result = repository.findOne(testUser.getId(), testUser.getLastName()); + // if emailAddress is mapped to id, then + // final User result = respository.findOne(testUser.getEmailAddress(), testUser.getLastName()); + + // Switch to secondary key + UserRepositoryConfiguration bean = + applicationContext.getBean(UserRepositoryConfiguration.class); + bean.switchToSecondaryKey(); + + // Now repository will use secondary key + repository.save(testUser); + + } +} +``` +Autowired UserRepository interface, then can do save, delete and find operations. Spring Data Azure Cosmos DB uses the CosmosTemplate to execute the queries behind *find*, *save* methods. You can use the template yourself for more complex queries. + +## Support multi-database configuration +The `azure-spring-data-cosmos` support multi-database configuration, here is a sample to config multiple account database + +### Add the dependency +[//]: # ({x-version-update-start;com.azure:azure-spring-data-cosmos;current}) +```xml + + com.azure + azure-spring-data-cosmos + 3.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Config application properties +The example uses the `application.properties` file +```properties +azure.cosmos.primary.uri=your-primary-cosmosDb-uri +azure.cosmos.primary.key=your-primary-cosmosDb-key +azure.cosmos.primary.secondaryKey=your-primary-cosmosDb-secondary-key +azure.cosmos.primary.database=your-primary-cosmosDb-dbName +azure.cosmos.primary.populateQueryMetrics=if-populate-query-metrics + +azure.cosmos.secondary.uri=your-secondary-cosmosDb-uri +azure.cosmos.secondary.key=your-secondary-cosmosDb-key +azure.cosmos.secondary.secondaryKey=your-secondary-cosmosDb-secondary-key +azure.cosmos.secondary.database=your-secondary-cosmosDb-dbName +azure.cosmos.secondary.populateQueryMetrics=if-populate-query-metrics +``` + +### Define Entities and Repositories +The [Entity](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos#create-repositories) definition is same as above. +You can put different database entities into different packages. + +### Setup configuration +The `@EnableReactiveCosmosRepositories` or `@EnableCosmosRepositories` support user-define the cosmos template, use `reactiveCosmosTemplateRef` or `cosmosTemplateRef` to config the name of the `ReactiveCosmosTemplate` or `CosmosTemplate` bean to be used with the repositories detected. + +```java +@Configuration +@PropertySource("classpath:application.properties") +public class DatabaseConfiguration extends AbstractCosmosConfiguration { + + @Bean + @ConfigurationProperties(prefix = "azure.cosmos.primary") + public CosmosProperties primaryDataSourceConfiguration() { + return new CosmosProperties(); + } + + @Bean + @ConfigurationProperties(prefix = "azure.cosmos.secondary") + public CosmosProperties secondaryDataSourceConfiguration() { + return new CosmosProperties(); + } + + @EnableReactiveCosmosRepositories(basePackages = "com.azure.cosmos.multidatasource.primarydatasource") + public class PrimaryDataSourceConfiguration { + @Autowired + @Qualifier("primaryDataSourceConfiguration") + CosmosProperties properties; + @Bean + public CosmosConfig cosmosConfig() { + CosmosConfig cosmosConfig = CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .key(properties.getKey()).endpoint(properties.getUri())) + .database(properties.getDatabase()) + .enableQueryMetrics(properties.isQueryMetricsEnabled()) + .build(); + return cosmosConfig; + } + + } + + @EnableReactiveCosmosRepositories(basePackages = "com.azure.cosmos.multidatasource.secondarydatasource", reactiveCosmosTemplateRef = "secondaryReactiveCosmosTemplate") + public class SecondaryDataSourceConfiguration { + @Autowired + @Qualifier("secondaryDataSourceConfiguration") + CosmosProperties properties; + @Bean + public ReactiveCosmosTemplate secondaryReactiveCosmosTemplate(MappingCosmosConverter mappingCosmosConverter) { + CosmosConfig cosmosConfig = CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .key(properties.getKey()).endpoint(properties.getUri())) + .database(properties.getDatabase()) + .enableQueryMetrics(properties.isQueryMetricsEnabled()) + .build(); + + return new ReactiveCosmosTemplate(new CosmosFactory(cosmosConfig), mappingCosmosConverter, cosmosConfig.getDatabase()); + } + } +} +``` + +### Create an Application class + + +```java +@SpringBootApplication +public class MultiDatasourceApplication implements CommandLineRunner { + + @Autowired + private UserRepository userRepository; + + @Autowired + private BookRepository bookRepository; + + + private final User user = new User("1024", "1024@geek.com", "1k", "Mars"); + private final Book book = new Book("9780792745488", "Zen and the Art of Motorcycle Maintenance", "Robert M. Pirsig"); + + + public static void main(String[] args) { + SpringApplication.run(MultiDatasourceApplication.class, args); + } + + @Override + public void run(String... args) { + final List users = this.userRepository.findByEmailOrName(this.user.getEmail(), this.user.getName()).collectList().block(); + users.forEach(System.out::println); + final Book book = this.bookRepository.findById("9780792745488").block(); + System.out.println(book); + } + + @PostConstruct + public void setup() { + this.userRepository.save(user).block(); + this.bookRepository.save(book).block(); + + } + + @PreDestroy + public void cleanup() { + this.userRepository.deleteAll().block(); + this.bookRepository.deleteAll().block(); + } +} +``` + +## Beta version package + +Beta version built from `master` branch are available, you can refer to the [instruction](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md#nightly-package-builds) to use beta version packages. + ## Troubleshooting +If you encounter any bug, please file an issue [here](https://github.com/Azure/azure-sdk-for-java/issues/new). + +To suggest a new feature or changes that could be made, file an issue the same way you would for a bug. + ## Contributing +Contribution is welcome. Please follow [this instruction](./CONTRIBUTING.md) to contribute code. + ## Code of Conduct +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +### Data/Telemetry + + This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy](https://privacy.microsoft.com/privacystatement) statement to learn more. + ## Key concepts ## Next steps diff --git a/sdk/cosmos/azure-spring-data-cosmos/pom.xml b/sdk/cosmos/azure-spring-data-cosmos/pom.xml index c08922070a6e..dc96240c398d 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/pom.xml +++ b/sdk/cosmos/azure-spring-data-cosmos/pom.xml @@ -42,48 +42,41 @@ - org.springframework spring-web 5.2.6.RELEASE - org.springframework spring-beans 5.2.6.RELEASE - org.springframework spring-context 5.2.6.RELEASE - org.springframework spring-tx 5.2.6.RELEASE - org.springframework.data spring-data-commons 2.3.0.RELEASE - org.springframework spring-expression 5.2.6.RELEASE - com.microsoft.azure + com.azure azure-cosmos - 3.7.3 + 4.3.0-beta.1 - com.fasterxml.jackson.module jackson-module-parameter-names @@ -104,18 +97,21 @@ json 20140107 - org.javatuples javatuples 1.2 - javax.annotation javax.annotation-api 1.3.2 + + org.apache.commons + commons-lang3 + 3.8.1 + @@ -148,26 +144,29 @@ - io.projectreactor reactor-test 3.3.5.RELEASE test - org.slf4j slf4j-simple 1.7.25 test + - com.google.code.gson - gson - 2.8.5 - test + com.google.code.findbugs + jsr305 + 3.0.2 + provided @@ -191,7 +190,6 @@ - com.azure:* org.springframework:spring-beans:[5.2.6.RELEASE] org.springframework:spring-web:[5.2.6.RELEASE] org.springframework:spring-tx:[5.2.6.RELEASE] @@ -199,14 +197,13 @@ org.springframework:spring-core:[5.2.6.RELEASE] org.springframework:spring-context:[5.2.6.RELEASE] org.springframework.data:spring-data-commons:[2.3.0.RELEASE] - com.microsoft.azure:azure-cosmos:[3.7.3] org.javatuples:javatuples:[1.2] com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.10.0] com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.10.1] org.json:json:[20140107] com.fasterxml.jackson.module:jackson-module-parameter-names:[2.10.0] javax.annotation:javax.annotation-api:[1.3.2] - org.slf4j:slf4j-simple:[1.7.25] + org.apache.commons:commons-lang3:[3.8.1] diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/Constants.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/Constants.java index 58b945d2d507..5ab839e21c31 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/Constants.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/Constants.java @@ -2,30 +2,28 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos; -import com.azure.data.cosmos.IndexingMode; +import com.azure.cosmos.models.IndexingMode; /** * Constants class of CosmosDB properties */ public final class Constants { - public static final String DEFAULT_COLLECTION_NAME = ""; - public static final String DEFAULT_REQUEST_UNIT = "4000"; - public static final boolean DEFAULT_INDEXINGPOLICY_AUTOMATIC = true; - public static final IndexingMode DEFAULT_INDEXINGPOLICY_MODE = IndexingMode.CONSISTENT; + public static final String DEFAULT_CONTAINER_NAME = ""; + public static final boolean DEFAULT_INDEXING_POLICY_AUTOMATIC = true; + public static final IndexingMode DEFAULT_INDEXING_POLICY_MODE = IndexingMode.CONSISTENT; public static final String DEFAULT_REPOSITORY_IMPLEMENT_POSTFIX = "Impl"; public static final int DEFAULT_TIME_TO_LIVE = -1; // Indicates never expire public static final boolean DEFAULT_AUTO_CREATE_CONTAINER = true; public static final String ID_PROPERTY_NAME = "id"; - public static final String COSMOSDB_MODULE_NAME = "cosmosdb"; - public static final String COSMOSDB_MODULE_PREFIX = "cosmosdb"; - public static final String COSMOS_MAPPING_CONTEXT = "cosmosMappingContext"; + public static final String COSMOS_MODULE_NAME = "cosmos"; + public static final String COSMOS_MODULE_PREFIX = "cosmos"; public static final String USER_AGENT_SUFFIX = "spring-data/"; - public static final String OBJECTMAPPER_BEAN_NAME = "cosmosdbObjectMapper"; + public static final String OBJECT_MAPPER_BEAN_NAME = "cosmosObjectMapper"; public static final String ISO_8601_COMPATIBLE_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ss:SSSXXX"; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/CosmosDbFactory.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/CosmosDbFactory.java deleted file mode 100644 index 9c2d185320a2..000000000000 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/CosmosDbFactory.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.spring.data.cosmos; - -import com.azure.data.cosmos.ConnectionPolicy; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.sync.CosmosSyncClient; -import com.azure.spring.data.cosmos.common.MacAddress; -import com.azure.spring.data.cosmos.common.PropertyLoader; -import com.azure.spring.data.cosmos.common.TelemetrySender; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; -import org.springframework.lang.NonNull; - -import org.springframework.util.Assert; -import org.springframework.util.StringUtils; - -import javax.annotation.PostConstruct; - -/** - * Factory class for cosmosdb to create client - */ -public class CosmosDbFactory { - - private final CosmosDBConfig config; - - private static final boolean IS_TELEMETRY_ALLOWED = PropertyLoader.isApplicationTelemetryAllowed(); - - private static final String USER_AGENT_SUFFIX = Constants.USER_AGENT_SUFFIX + PropertyLoader.getProjectVersion(); - - private String getUserAgentSuffix() { - String suffix = ";" + USER_AGENT_SUFFIX; - - if (IS_TELEMETRY_ALLOWED || config.isAllowTelemetry()) { - suffix += ";" + MacAddress.getHashMac(); - } - - return suffix; - } - - /** - * Validate config and initialization - * - * @param config cosmosdb config - */ - public CosmosDbFactory(@NonNull CosmosDBConfig config) { - validateConfig(config); - - this.config = config; - } - - /** - * To create a CosmosClient - * - * @return CosmosClient - */ - public CosmosClient getCosmosClient() { - final ConnectionPolicy policy = config.getConnectionPolicy(); - final String userAgent = getUserAgentSuffix() + ";" + policy.userAgentSuffix(); - - policy.userAgentSuffix(userAgent); - return CosmosClient.builder() - .endpoint(config.getUri()) - .key(config.getKey()) - .cosmosKeyCredential(config.getCosmosKeyCredential()) - .connectionPolicy(policy) - .consistencyLevel(config.getConsistencyLevel()) - .build(); - } - - /** - * To create a CosmosSyncClient - * - * @return CosmosSyncClient - */ - public CosmosSyncClient getCosmosSyncClient() { - final ConnectionPolicy policy = config.getConnectionPolicy(); - final String userAgent = getUserAgentSuffix() + ";" + policy.userAgentSuffix(); - - policy.userAgentSuffix(userAgent); - return CosmosClient.builder() - .endpoint(config.getUri()) - .key(config.getKey()) - .cosmosKeyCredential(config.getCosmosKeyCredential()) - .connectionPolicy(policy) - .consistencyLevel(config.getConsistencyLevel()) - .buildSyncClient(); - } - - private void validateConfig(@NonNull CosmosDBConfig config) { - Assert.hasText(config.getUri(), "cosmosdb host url should have text!"); - if (config.getCosmosKeyCredential() == null) { - Assert.hasText(config.getKey(), "cosmosdb host key should have text!"); - } else if (StringUtils.isEmpty(config.getKey())) { - Assert.hasText(config.getCosmosKeyCredential().key(), - "cosmosdb credential host key should have text!"); - } - Assert.hasText(config.getDatabase(), "cosmosdb database should have text!"); - Assert.notNull(config.getConnectionPolicy(), "cosmosdb connection policy should not be null!"); - } - - @PostConstruct - private void sendTelemetry() { - // If any one of them is enabled, send telemetry data - if (IS_TELEMETRY_ALLOWED || config.isAllowTelemetry()) { - final TelemetrySender sender = new TelemetrySender(); - - sender.send(this.getClass().getSimpleName()); - } - } - - /** - * To get config object of cosmosdb - * - * @return CosmosDBConfig - */ - public CosmosDBConfig getConfig() { - return config; - } -} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java new file mode 100644 index 000000000000..ca15da64c989 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/CosmosFactory.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.data.cosmos; + +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosClient; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.spring.data.cosmos.common.MacAddress; +import com.azure.spring.data.cosmos.common.PropertyLoader; +import com.azure.spring.data.cosmos.common.TelemetrySender; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import javax.annotation.PostConstruct; +import java.lang.reflect.Field; + +/** + * Factory class for CosmosDb to create client + */ +public class CosmosFactory { + + private static final Logger LOGGER = LoggerFactory.getLogger(CosmosFactory.class); + + private final CosmosConfig config; + + private static final boolean IS_TELEMETRY_ALLOWED = + PropertyLoader.isApplicationTelemetryAllowed(); + + private static final String USER_AGENT_SUFFIX = + Constants.USER_AGENT_SUFFIX + PropertyLoader.getProjectVersion(); + + private String getUserAgentSuffix() { + String suffix = ";" + USER_AGENT_SUFFIX; + + if (IS_TELEMETRY_ALLOWED || config.isAllowTelemetry()) { + suffix += ";" + MacAddress.getHashMac(); + } + + return suffix; + } + + /** + * Validate config and initialization + * + * @param cosmosConfig cosmosConfig + */ + public CosmosFactory(@NonNull CosmosConfig cosmosConfig) { + validateConfig(cosmosConfig); + + this.config = cosmosConfig; + } + + /** + * To create a CosmosAsyncClient + * + * @return CosmosClient + */ + public CosmosAsyncClient getCosmosAsyncClient() { + final CosmosClientBuilder cosmosClientBuilderFromConfig = + getCosmosClientBuilderFromConfig(config); + return cosmosClientBuilderFromConfig.buildAsyncClient(); + } + + /** + * To create a CosmosClient + * + * @return CosmosSyncClient + */ + public CosmosClient getCosmosSyncClient() { + final CosmosClientBuilder cosmosClientBuilderFromConfig = + getCosmosClientBuilderFromConfig(config); + return cosmosClientBuilderFromConfig.buildClient(); + } + + private CosmosClientBuilder getCosmosClientBuilderFromConfig(CosmosConfig cosmosConfig) { + final CosmosClientBuilder cosmosClientBuilder = cosmosConfig.getCosmosClientBuilder(); + cosmosClientBuilder.contentResponseOnWriteEnabled(true); + final String userAgentSuffixValue = getUserAgentSuffixValue(cosmosClientBuilder); + String userAgentSuffix = getUserAgentSuffix(); + if (!userAgentSuffixValue.contains(userAgentSuffix)) { + userAgentSuffix += userAgentSuffixValue; + } + + return cosmosConfig.getCosmosClientBuilder().userAgentSuffix(userAgentSuffix); + } + + private String getUserAgentSuffixValue(CosmosClientBuilder cosmosClientBuilder) { + final Field userAgentSuffix = FieldUtils.getDeclaredField(CosmosClientBuilder.class, + "userAgentSuffix", true); + try { + return (String) userAgentSuffix.get(cosmosClientBuilder); + } catch (IllegalAccessException e) { + LOGGER.error("Error occurred while getting userAgentSuffix from CosmosClientBuilder", + e); + } + return ""; + } + + private void validateConfig(@NonNull CosmosConfig config) { + Assert.hasText(config.getDatabase(), "cosmos database should have text!"); + } + + @PostConstruct + private void sendTelemetry() { + // If any one of them is enabled, send telemetry data + if (IS_TELEMETRY_ALLOWED || config.isAllowTelemetry()) { + final TelemetrySender sender = new TelemetrySender(); + + sender.send(this.getClass().getSimpleName()); + } + } + + /** + * To get config object of Cosmos + * + * @return CosmosConfig + */ + public CosmosConfig getConfig() { + return config; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/CosmosUtils.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/CosmosUtils.java new file mode 100644 index 000000000000..9f6aaa694794 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/CosmosUtils.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.common; + +import com.azure.cosmos.CosmosDiagnostics; +import com.azure.cosmos.models.FeedResponse; +import com.azure.spring.data.cosmos.core.ResponseDiagnostics; +import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; +import com.azure.spring.data.cosmos.exception.IllegalQueryException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.util.Assert; + +/** + * Util class to fill and process response diagnostics + */ +public class CosmosUtils { + + private static final Logger LOGGER = LoggerFactory.getLogger(CosmosUtils.class); + + /** + * Generate ResponseDiagnostics with cosmos and feed response diagnostics + * + * @param type of cosmosResponse + * @param responseDiagnosticsProcessor collect Response Diagnostics from API responses and then set in {@link + * ResponseDiagnostics} object. + * @param cosmosDiagnostics response from cosmos + * @param feedResponse response from feed + */ + public static void fillAndProcessResponseDiagnostics( + ResponseDiagnosticsProcessor responseDiagnosticsProcessor, + CosmosDiagnostics cosmosDiagnostics, FeedResponse feedResponse) { + if (responseDiagnosticsProcessor == null) { + return; + } + ResponseDiagnostics.CosmosResponseStatistics cosmosResponseStatistics = null; + if (feedResponse != null) { + cosmosResponseStatistics = new ResponseDiagnostics.CosmosResponseStatistics(feedResponse); + } + if (cosmosDiagnostics == null && cosmosResponseStatistics == null) { + LOGGER.debug("Empty response diagnostics"); + return; + } + final ResponseDiagnostics responseDiagnostics = + new ResponseDiagnostics(cosmosDiagnostics, cosmosResponseStatistics); + + // Process response diagnostics + responseDiagnosticsProcessor.processResponseDiagnostics(responseDiagnostics); + } + + /** + * ID value should be string value, real id type will be String, Integer, Long, + * all of these must be converted to String type. + * @param idValue id value to find + * @throws IllegalArgumentException thrown if id value fail the validation. + * @throws IllegalQueryException thrown if id value fail the validation. + * @return String id value + */ + public static String getStringIDValue(Object idValue) { + Assert.notNull(idValue, "id should not be null"); + if (idValue instanceof String) { + Assert.hasText(idValue.toString(), "id should not be empty or only whitespaces."); + return (String) idValue; + } else if (idValue instanceof Integer) { + return Integer.toString((Integer) idValue); + } else if (idValue instanceof Long) { + return Long.toString((Long) idValue); + } else { + throw new IllegalQueryException("Type of id field must be String or Integer or Long"); + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/CosmosdbUtils.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/CosmosdbUtils.java deleted file mode 100644 index 6e0e052d8025..000000000000 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/CosmosdbUtils.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.spring.data.cosmos.common; - -import com.azure.data.cosmos.CosmosResponse; -import com.azure.data.cosmos.CosmosResponseDiagnostics; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.FeedResponseDiagnostics; -import com.azure.data.cosmos.Resource; -import com.azure.spring.data.cosmos.core.convert.ObjectMapperFactory; -import com.azure.spring.data.cosmos.exception.ConfigurationException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.azure.spring.data.cosmos.core.ResponseDiagnostics; -import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.lang.NonNull; - -import java.io.IOException; - -/** - * Util class to fill and process response diagnostics - */ -public class CosmosdbUtils { - - private static final Logger LOGGER = LoggerFactory.getLogger(CosmosdbUtils.class); - - /** - * Get a copy of an existing instance - * @param instance the known instance - * @param type of instance - * @return copy instance - * @throws ConfigurationException if the class type is invalid - */ - @SuppressWarnings("unchecked") - public static T getCopyFrom(@NonNull T instance) { - final ObjectMapper mapper = ObjectMapperFactory.getObjectMapper(); - - try { - final String s = mapper.writeValueAsString(instance); - return (T) mapper.readValue(s, instance.getClass()); - } catch (IOException e) { - throw new ConfigurationException("failed to get copy from " - + instance.getClass().getName(), e); - } - } - - /** - * Generate ResponseDiagnostics with cosmos and feed response diagnostics - * - * @param type of cosmosResponse - * @param responseDiagnosticsProcessor collect Response Diagnostics from API responses and - * then set in {@link ResponseDiagnostics} object. - * @param cosmosResponse response from cosmos - * @param feedResponse response from feed - */ - public static void fillAndProcessResponseDiagnostics( - ResponseDiagnosticsProcessor responseDiagnosticsProcessor, - CosmosResponse cosmosResponse, FeedResponse feedResponse) { - if (responseDiagnosticsProcessor == null) { - return; - } - CosmosResponseDiagnostics cosmosResponseDiagnostics = null; - if (cosmosResponse != null) { - cosmosResponseDiagnostics = cosmosResponse.cosmosResponseDiagnosticsString(); - } - FeedResponseDiagnostics feedResponseDiagnostics = null; - ResponseDiagnostics.CosmosResponseStatistics cosmosResponseStatistics = null; - if (feedResponse != null) { - feedResponseDiagnostics = feedResponse.feedResponseDiagnostics(); - cosmosResponseStatistics = new ResponseDiagnostics.CosmosResponseStatistics(feedResponse); - } - if (cosmosResponseDiagnostics == null - && (feedResponseDiagnostics == null || feedResponseDiagnostics.toString().isEmpty()) - && cosmosResponseStatistics == null) { - LOGGER.debug("Empty response diagnostics"); - return; - } - final ResponseDiagnostics responseDiagnostics = - new ResponseDiagnostics(cosmosResponseDiagnostics, feedResponseDiagnostics, cosmosResponseStatistics); - - // Process response diagnostics - responseDiagnosticsProcessor.processResponseDiagnostics(responseDiagnostics); - } -} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/TelemetrySender.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/TelemetrySender.java index c57df311ff78..96a34725b379 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/TelemetrySender.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/TelemetrySender.java @@ -4,17 +4,18 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.springframework.http.HttpStatus; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; +import org.springframework.lang.NonNull; import org.springframework.util.Assert; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.lang.NonNull; + import java.util.HashMap; import java.util.Map; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfiguration.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfiguration.java index cf9b204e4b2d..0885555ac540 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfiguration.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfiguration.java @@ -3,90 +3,101 @@ package com.azure.spring.data.cosmos.config; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.sync.CosmosSyncClient; -import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosClient; import com.azure.spring.data.cosmos.Constants; +import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; +import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; +import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; +import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** - * To configure cosmos with client, cosmoscdb factory and template + * To configure cosmos with client, cosmos factory and template */ @Configuration public abstract class AbstractCosmosConfiguration extends CosmosConfigurationSupport { /** - * Declare CosmosClient bean. + * Declare CosmosDbFactory bean. + * * @param config of cosmosDbFactory - * @return CosmosClient bean + * @return CosmosDbFactory bean */ @Bean - public CosmosClient cosmosClient(CosmosDBConfig config) { - return this.cosmosDbFactory(config).getCosmosClient(); + public CosmosFactory cosmosDBFactory(CosmosConfig config) { + return new CosmosFactory(config); } /** - * Declare CosmosSyncClient bean. - * @param config of cosmosDbFactory - * @return CosmosSyncClient bean + * Declare MappingCosmosConverter bean. + * + * @param cosmosMappingContext cosmosMappingContext + * @return MappingCosmosConverter bean + * @throws ClassNotFoundException if the class type is invalid */ @Bean - public CosmosSyncClient cosmosSyncClient(CosmosDBConfig config) { - return this.cosmosDbFactory(config).getCosmosSyncClient(); + public MappingCosmosConverter mappingCosmosConverter(CosmosMappingContext cosmosMappingContext) + throws ClassNotFoundException { + return new MappingCosmosConverter(cosmosMappingContext, objectMapper); } - @Qualifier(Constants.OBJECTMAPPER_BEAN_NAME) - @Autowired(required = false) - private ObjectMapper objectMapper; - /** - * Declare CosmosDbFactory bean. - * @param config of cosmosDbFactory - * @return CosmosDbFactory bean + * Declare CosmosClient bean. + * + * @param cosmosFactory cosmosDbFactory + * @return CosmosClient bean */ @Bean - public CosmosDbFactory cosmosDbFactory(CosmosDBConfig config) { - return new CosmosDbFactory(config); + public CosmosAsyncClient cosmosAsyncClient(CosmosFactory cosmosFactory) { + return cosmosFactory.getCosmosAsyncClient(); } /** - * Declare CosmosTemplate bean. - * @param config of cosmosDbFactory - * @return CosmosTemplate bean - * @throws ClassNotFoundException if the class type is invalid + * Declare CosmosSyncClient bean. + * + * @param cosmosFactory cosmosDBFactory + * @return CosmosSyncClient bean */ @Bean - public CosmosTemplate cosmosTemplate(CosmosDBConfig config) throws ClassNotFoundException { - return new CosmosTemplate(this.cosmosDbFactory(config), this.mappingCosmosConverter(), - config.getDatabase()); + public CosmosClient cosmosClient(CosmosFactory cosmosFactory) { + return cosmosFactory.getCosmosSyncClient(); } + @Qualifier(Constants.OBJECT_MAPPER_BEAN_NAME) + @Autowired(required = false) + private ObjectMapper objectMapper; + /** - * Declare ReactiveCosmosTemplate bean. - * @param config of cosmosDbFactory - * @return ReactiveCosmosTemplate bean - * @throws ClassNotFoundException if the class type is invalid + * Declare CosmosTemplate bean. + * + * @param cosmosFactory cosmosDbFactory + * @param mappingCosmosConverter mappingCosmosConverter + * @return CosmosTemplate bean */ @Bean - public ReactiveCosmosTemplate reactiveCosmosTemplate(CosmosDBConfig config) throws ClassNotFoundException { - return new ReactiveCosmosTemplate(this.cosmosDbFactory(config), this.mappingCosmosConverter(), - config.getDatabase()); + public CosmosTemplate cosmosTemplate(CosmosFactory cosmosFactory, + MappingCosmosConverter mappingCosmosConverter) { + return new CosmosTemplate(cosmosFactory, mappingCosmosConverter, + cosmosFactory.getConfig().getDatabase()); } /** - * Declare MappingCosmosConverter bean. - * @return MappingCosmosConverter bean - * @throws ClassNotFoundException if the class type is invalid + * Declare ReactiveCosmosTemplate bean. + * + * @param cosmosFactory cosmosDbFactory + * @param mappingCosmosConverter mappingCosmosConverter + * @return ReactiveCosmosTemplate bean */ @Bean - public MappingCosmosConverter mappingCosmosConverter() throws ClassNotFoundException { - return new MappingCosmosConverter(this.cosmosMappingContext(), objectMapper); + public ReactiveCosmosTemplate reactiveCosmosTemplate(CosmosFactory cosmosFactory, + MappingCosmosConverter mappingCosmosConverter) { + return new ReactiveCosmosTemplate(cosmosFactory, mappingCosmosConverter, + cosmosFactory.getConfig().getDatabase()); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfig.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfig.java new file mode 100644 index 000000000000..a89a83c0d02e --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfig.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.config; + +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; + +import java.beans.ConstructorProperties; + +/** + * Config properties of CosmosDB + */ +public class CosmosConfig { + + private final CosmosClientBuilder cosmosClientBuilder; + + private final String database; + + private final boolean allowTelemetry; + + private final ResponseDiagnosticsProcessor responseDiagnosticsProcessor; + + private final boolean queryMetricsEnabled; + + /** + * Initialization + * + * @param cosmosClientBuilder must not be {@literal null} + * @param database must not be {@literal null} + * @param allowTelemetry must not be {@literal null} + * @param responseDiagnosticsProcessor must not be {@literal null} + * @param queryMetricsEnabled must not be {@literal null} + */ + @ConstructorProperties({ "cosmosClientBuilder", "database", "allowTelemetry", + "responseDiagnosticsProcessor", "queryMetricsEnabled" }) + public CosmosConfig(CosmosClientBuilder cosmosClientBuilder, String database, boolean allowTelemetry, + ResponseDiagnosticsProcessor responseDiagnosticsProcessor, boolean queryMetricsEnabled) { + this.cosmosClientBuilder = cosmosClientBuilder; + this.database = database; + this.allowTelemetry = allowTelemetry; + this.responseDiagnosticsProcessor = responseDiagnosticsProcessor; + this.queryMetricsEnabled = queryMetricsEnabled; + } + + /** + * Gets the cosmos client builder used to build cosmos client + * + * @return cosmosClientBuilder + */ + public CosmosClientBuilder getCosmosClientBuilder() { + return cosmosClientBuilder; + } + + /** + * Checks if telemetry is allowed + * + * @return boolean + */ + public boolean isAllowTelemetry() { + return allowTelemetry; + } + + /** + * Gets response diagnostics processor + * + * @return ResponseDiagnosticsProcessor + */ + public ResponseDiagnosticsProcessor getResponseDiagnosticsProcessor() { + return responseDiagnosticsProcessor; + } + + /** + * Gets the option to enable query metrics + * + * @return boolean, whether to enable query metrics + */ + public boolean isQueryMetricsEnabled() { + return queryMetricsEnabled; + } + + /** + * Gets the database name + * + * @return database name + */ + public String getDatabase() { + return database; + } + + /** + * Create a CosmosConfigBuilder instance + * + * @return CosmosConfigBuilder + */ + public static CosmosConfigBuilder builder() { + return new CosmosConfigBuilder(); + } + + /** + * Builder class for cosmos config + */ + public static class CosmosConfigBuilder { + private String database; + private CosmosClientBuilder cosmosClientBuilder; + private boolean allowTelemetry; + private ResponseDiagnosticsProcessor responseDiagnosticsProcessor; + private boolean queryMetricsEnabled; + + CosmosConfigBuilder() { + } + + /** + * Set cosmosClientBuilder to use to build cosmos client + * + * @param cosmosClientBuilder cosmos client builder + * @return CosmosConfigBuilder + */ + public CosmosConfigBuilder cosmosClientBuilder(CosmosClientBuilder cosmosClientBuilder) { + this.cosmosClientBuilder = cosmosClientBuilder; + return this; + } + + /** + * Set allowTelemetry + * + * @param allowTelemetry value to initialize + * @return CosmosConfigBuilder + */ + public CosmosConfigBuilder allowTelemetry(boolean allowTelemetry) { + this.allowTelemetry = allowTelemetry; + return this; + } + + /** + * Set responseDiagnosticsProcessor + * + * @param responseDiagnosticsProcessor value to initialize + * @return CosmosConfigBuilder + */ + public CosmosConfigBuilder responseDiagnosticsProcessor(ResponseDiagnosticsProcessor + responseDiagnosticsProcessor) { + this.responseDiagnosticsProcessor = responseDiagnosticsProcessor; + return this; + } + + /** + * Set queryMetricsEnabled + * + * @param queryMetricsEnabled value to initialize + * @return CosmosConfigBuilder + */ + public CosmosConfigBuilder enableQueryMetrics(boolean queryMetricsEnabled) { + this.queryMetricsEnabled = queryMetricsEnabled; + return this; + } + + /** + * Sets the database + * + * @param database database name + * @return CosmosConfigBuilder + */ + public CosmosConfigBuilder database(String database) { + this.database = database; + return this; + } + + /** + * Build a CosmosConfig instance + * + * @return CosmosConfig + */ + public CosmosConfig build() { + return new CosmosConfig(this.cosmosClientBuilder, this.database, this.allowTelemetry, + this.responseDiagnosticsProcessor, this.queryMetricsEnabled); + } + + @Override + public String toString() { + return "CosmosConfigBuilder{" + + "database='" + database + '\'' + + ", cosmosClientBuilder=" + cosmosClientBuilder + + ", allowTelemetry=" + allowTelemetry + + ", responseDiagnosticsProcessor=" + responseDiagnosticsProcessor + + ", queryMetricsEnabled=" + queryMetricsEnabled + + '}'; + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfigurationSupport.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfigurationSupport.java index 07bd795e99fc..46b240aff9c4 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfigurationSupport.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfigurationSupport.java @@ -3,8 +3,8 @@ package com.azure.spring.data.cosmos.config; -import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; import com.azure.spring.data.cosmos.common.ExpressionResolver; +import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Bean; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosDBConfig.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosDBConfig.java deleted file mode 100644 index 2cab7cb3466c..000000000000 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosDBConfig.java +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.spring.data.cosmos.config; - -import com.azure.data.cosmos.ConnectionPolicy; -import com.azure.data.cosmos.ConsistencyLevel; -import com.azure.data.cosmos.CosmosKeyCredential; -import com.azure.data.cosmos.internal.RequestOptions; -import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; -import org.springframework.util.Assert; - -import java.beans.ConstructorProperties; - -/** - * Config properties of CosmosDB - */ -public class CosmosDBConfig { - private String uri; - - private String key; - - private String database; - - private ConnectionPolicy connectionPolicy; - - private ConsistencyLevel consistencyLevel; - - private boolean allowTelemetry; - - private RequestOptions requestOptions; - - private CosmosKeyCredential cosmosKeyCredential; - - private ResponseDiagnosticsProcessor responseDiagnosticsProcessor; - - private boolean populateQueryMetrics; - - /** - * Initialization - * @param uri must not be {@literal null} - * @param key must not be {@literal null} - * @param database must not be {@literal null} - * @param connectionPolicy must not be {@literal null} - * @param consistencyLevel must not be {@literal null} - * @param allowTelemetry must not be {@literal null} - * @param requestOptions must not be {@literal null} - * @param cosmosKeyCredential must not be {@literal null} - * @param responseDiagnosticsProcessor must not be {@literal null} - * @param populateQueryMetrics must not be {@literal null} - */ - @ConstructorProperties({"uri", "key", "database", "connectionPolicy", "consistencyLevel", "allowTelemetry", - "requestOptions", "cosmosKeyCredential", "responseDiagnosticsProcessor", - "populateQueryMetrics"}) - public CosmosDBConfig(String uri, String key, String database, ConnectionPolicy connectionPolicy, - ConsistencyLevel consistencyLevel, boolean allowTelemetry, RequestOptions requestOptions, - CosmosKeyCredential cosmosKeyCredential, - ResponseDiagnosticsProcessor responseDiagnosticsProcessor, boolean populateQueryMetrics) { - this.uri = uri; - this.key = key; - this.database = database; - this.connectionPolicy = connectionPolicy; - this.consistencyLevel = consistencyLevel; - this.allowTelemetry = allowTelemetry; - this.requestOptions = requestOptions; - this.cosmosKeyCredential = cosmosKeyCredential; - this.responseDiagnosticsProcessor = responseDiagnosticsProcessor; - this.populateQueryMetrics = populateQueryMetrics; - } - - /** - * Gets uri - * @return uri - */ - public String getUri() { - return uri; - } - - /** - * Gets key - * @return key - */ - public String getKey() { - return key; - } - - /** - * Gets database - * @return database - */ - public String getDatabase() { - return database; - } - - /** - * Gets connection policy - * @return connectionPolicy - */ - public ConnectionPolicy getConnectionPolicy() { - return connectionPolicy; - } - - /** - * Gets consistency level - * @return ConsistencyLevel - */ - public ConsistencyLevel getConsistencyLevel() { - return consistencyLevel; - } - - /** - * Checks if telemetry is allowed - * @return boolean - */ - public boolean isAllowTelemetry() { - return allowTelemetry; - } - - /** - * Gets request options - * @return RequestOptions - */ - public RequestOptions getRequestOptions() { - return requestOptions; - } - - /** - * Gets Cosmos key credential - * @return CosmosKeyCredential - */ - public CosmosKeyCredential getCosmosKeyCredential() { - return cosmosKeyCredential; - } - - /** - * Gets response diagnostics processor - * @return ResponseDiagnosticsProcessor - */ - public ResponseDiagnosticsProcessor getResponseDiagnosticsProcessor() { - return responseDiagnosticsProcessor; - } - - /** - * Checks if is populate query metrics - * @return boolean - */ - public boolean isPopulateQueryMetrics() { - return populateQueryMetrics; - } - - /** - * Sets response diagnostics processor - * @param responseDiagnosticsProcessor must not be {@literal null} - */ - public void setResponseDiagnosticsProcessor(ResponseDiagnosticsProcessor responseDiagnosticsProcessor) { - this.responseDiagnosticsProcessor = responseDiagnosticsProcessor; - } - - /** - * Sets populate query metrics - * @param populateQueryMetrics must not be {@literal null} - */ - public void setPopulateQueryMetrics(boolean populateQueryMetrics) { - this.populateQueryMetrics = populateQueryMetrics; - } - - /** - * create a CosmosDBConfigBuilder with cosmos uri, cosmosKeyCredential and database name - * @param uri must not be {@literal null} - * @param cosmosKeyCredential must not be {@literal null} - * @param database must not be {@literal null} - * @return CosmosDBConfigBuilder - */ - public static CosmosDBConfigBuilder builder(String uri, CosmosKeyCredential cosmosKeyCredential, - String database) { - return defaultBuilder() - .uri(uri) - .cosmosKeyCredential(cosmosKeyCredential) - .database(database) - .connectionPolicy(ConnectionPolicy.defaultPolicy()) - .consistencyLevel(ConsistencyLevel.SESSION) - .requestOptions(new RequestOptions()); - } - - /** - * create a CosmosDBConfigBuilder with cosmos uri, key and database name - * @param uri must not be {@literal null} - * @param key must not be {@literal null} - * @param database must not be {@literal null} - * @return CosmosDBConfigBuilder - */ - public static CosmosDBConfigBuilder builder(String uri, String key, String database) { - return defaultBuilder() - .uri(uri) - .key(key) - .database(database) - .connectionPolicy(ConnectionPolicy.defaultPolicy()) - .consistencyLevel(ConsistencyLevel.SESSION) - .requestOptions(new RequestOptions()); - } - - /** - * create a CosmosDBConfigBuilder with connection string and database name - * @param connectionString must not be {@literal null} - * @param database must not be {@literal null} - * @return CosmosDBConfigBuilder - * @throws CosmosDBAccessException for invalid connection string - */ - public static CosmosDBConfigBuilder builder(String connectionString, String database) { - Assert.hasText(connectionString, "connection string should have text!"); - try { - final String uri = connectionString.split(";")[0].split("=")[1]; - final String key = connectionString.split(";")[1].split("=")[1]; - return builder(uri, key, database); - } catch (ArrayIndexOutOfBoundsException e) { - throw new CosmosDBAccessException("could not parse connection string"); - } - } - - /** - * create a CosmosDBConfigBuilder instance - * @return CosmosDBConfigBuilder - */ - public static CosmosDBConfigBuilder defaultBuilder() { - return new CosmosDBConfigBuilder(); - } - - /** - * Builder class for cosmos db config - */ - public static class CosmosDBConfigBuilder { - private String uri; - private String key; - private String database; - private ConnectionPolicy connectionPolicy; - private ConsistencyLevel consistencyLevel; - private boolean allowTelemetry; - private RequestOptions requestOptions; - private CosmosKeyCredential cosmosKeyCredential; - private ResponseDiagnosticsProcessor responseDiagnosticsProcessor; - private boolean populateQueryMetrics; - - CosmosDBConfigBuilder() { - } - - /** - * Set uri - * - * @param uri value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder uri(String uri) { - this.uri = uri; - return this; - } - - /** - * Set key - * - * @param key value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder key(String key) { - this.key = key; - return this; - } - - /** - * Set database - * - * @param database value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder database(String database) { - this.database = database; - return this; - } - - /** - * Set connectionPolicy - * - * @param connectionPolicy value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder connectionPolicy(ConnectionPolicy connectionPolicy) { - this.connectionPolicy = connectionPolicy; - return this; - } - - /** - * Set consistencyLevel - * - * @param consistencyLevel value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder consistencyLevel(ConsistencyLevel consistencyLevel) { - this.consistencyLevel = consistencyLevel; - return this; - } - - /** - * Set allowTelemetry - * - * @param allowTelemetry value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder allowTelemetry(boolean allowTelemetry) { - this.allowTelemetry = allowTelemetry; - return this; - } - - /** - * Set requestOptions - * - * @param requestOptions value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder requestOptions(RequestOptions requestOptions) { - this.requestOptions = requestOptions; - return this; - } - - /** - * Set cosmosKeyCredential - * - * @param cosmosKeyCredential value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder cosmosKeyCredential(CosmosKeyCredential cosmosKeyCredential) { - this.cosmosKeyCredential = cosmosKeyCredential; - return this; - } - - /** - * Set responseDiagnosticsProcessor - * - * @param responseDiagnosticsProcessor value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder responseDiagnosticsProcessor(ResponseDiagnosticsProcessor - responseDiagnosticsProcessor) { - this.responseDiagnosticsProcessor = responseDiagnosticsProcessor; - return this; - } - - /** - * Set populateQueryMetrics - * - * @param populateQueryMetrics value to initialize - * @return CosmosDBConfigBuilder - */ - public CosmosDBConfigBuilder populateQueryMetrics(boolean populateQueryMetrics) { - this.populateQueryMetrics = populateQueryMetrics; - return this; - } - - /** - * Build a CosmosDBConfig instance - * - * @return CosmosDBConfig - */ - public CosmosDBConfig build() { - return new CosmosDBConfig(this.uri, this.key, this.database, this.connectionPolicy, this.consistencyLevel, - this.allowTelemetry, this.requestOptions, this.cosmosKeyCredential, this.responseDiagnosticsProcessor, - this.populateQueryMetrics); - } - - /** - * Generate string info of instance - * - * @return String - */ - public String toString() { - return "CosmosDBConfig.CosmosDBConfigBuilder(uri=" - + this.uri - + ", key=" - + this.key - + ", database=" - + this.database - + ", connectionPolicy=" - + this.connectionPolicy - + ", consistencyLevel=" - + this.consistencyLevel - + ", allowTelemetry=" - + this.allowTelemetry - + ", requestOptions=" - + this.requestOptions - + ", cosmosKeyCredential=" - + this.cosmosKeyCredential - + ", responseDiagnosticsProcessor=" - + this.responseDiagnosticsProcessor - + ", populateQueryMetrics=" - + this.populateQueryMetrics - + ")"; - } - } -} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosOperations.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosOperations.java index b723c4d9423e..452d288f2748 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosOperations.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosOperations.java @@ -3,8 +3,8 @@ package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.query.DocumentQuery; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; @@ -14,35 +14,17 @@ import java.util.List; /** - * Interface for cosmosdb operations + * Interface for cosmosDB operations */ public interface CosmosOperations { /** - * Use getContainerName() instead - * @param domainType class type - * @return container name - * @deprecated Use {@link #getContainerName(Class)} instead - */ - @Deprecated - String getCollectionName(Class domainType); - - /** - * To get container name by domaintype + * To get container name by domainType * @param domainType class type * @return String */ String getContainerName(Class domainType); - /** - * Use createContainerIfNotExists() instead - * @param information cosmos entity information - * @return created container properties - * @deprecated Use {@link #createContainerIfNotExists(CosmosEntityInformation)} instead - */ - @Deprecated - CosmosContainerProperties createCollectionIfNotExists(CosmosEntityInformation information); - /** * Creates container if not exists * @param information CosmosEntityInformation @@ -132,29 +114,26 @@ public interface CosmosOperations { /** * Upserts an item with partition key * @param object upsert object - * @param partitionKey the partition key * @param type of upsert object */ - void upsert(T object, PartitionKey partitionKey); + void upsert(T object); /** * Upserts an item into container with partition key * @param containerName the container name * @param object upsert object - * @param partitionKey the partition key * @param type of upsert object */ - void upsert(String containerName, T object, PartitionKey partitionKey); + void upsert(String containerName, T object); /** * Upserts an item and return item properties * @param containerName the container name * @param object upsert object - * @param partitionKey the partition key * @param type of upsert object * @return upsert object entity */ - T upsertAndReturnEntity(String containerName, T object, PartitionKey partitionKey); + T upsertAndReturnEntity(String containerName, T object); /** * Delete an item by id @@ -169,18 +148,10 @@ public interface CosmosOperations { * Delete all items in a container * * @param containerName the container name - * @param domainType the partition key path + * @param domainType the domainType */ void deleteAll(String containerName, Class domainType); - /** - * Use deleteContainer() instead - * @param containerName container name - * @deprecated Use {@link #deleteContainer(String)} instead. - */ - @Deprecated - void deleteCollection(String containerName); - /** * Delete container * @@ -194,7 +165,7 @@ public interface CosmosOperations { * @param query the document query * @param domainType type class * @param containerName the container name - * @param type class of domaintype + * @param type class of domainType * @return deleted items in a List */ List delete(DocumentQuery query, Class domainType, String containerName); @@ -205,7 +176,7 @@ public interface CosmosOperations { * @param query the document query * @param domainType type class * @param containerName the container name - * @param type class of domaintype + * @param type class of domainType * @return found results in a List */ List find(DocumentQuery query, Class domainType, String containerName); @@ -249,7 +220,7 @@ public interface CosmosOperations { * @param query the document query * @param domainType type class * @param containerName the container name - * @param type class of domaintype + * @param type class of domainType * @return Page */ Page paginationQuery(DocumentQuery query, Class domainType, String containerName); @@ -266,12 +237,11 @@ public interface CosmosOperations { * Count * * @param query the document query - * @param domainType the domain type * @param containerName the container name - * @param type class of domaintype + * @param type class of domainType * @return count result */ - long count(DocumentQuery query, Class domainType, String containerName); + long count(DocumentQuery query, String containerName); /** * To get converter diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java index 2fbe470dc45a..e0c748aa4197 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java @@ -3,19 +3,20 @@ package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.CosmosItemResponse; -import com.azure.data.cosmos.AccessCondition; -import com.azure.data.cosmos.AccessConditionType; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.SqlQuerySpec; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.PartitionKey; -import com.azure.spring.data.cosmos.common.CosmosdbUtils; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.CosmosContainerResponse; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.FeedResponse; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.cosmos.models.ThroughputProperties; +import com.azure.spring.data.cosmos.CosmosFactory; +import com.azure.spring.data.cosmos.common.CosmosUtils; import com.azure.spring.data.cosmos.common.Memoizer; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.generator.CountQueryGenerator; @@ -25,9 +26,9 @@ import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; -import com.azure.spring.data.cosmos.exception.CosmosDBExceptionUtils; +import com.azure.spring.data.cosmos.exception.CosmosExceptionUtils; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.fasterxml.jackson.databind.JsonNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; @@ -35,6 +36,7 @@ import org.springframework.context.ApplicationContextAware; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; +import org.springframework.data.repository.query.parser.Part; import org.springframework.lang.NonNull; import org.springframework.util.Assert; import org.springframework.util.StringUtils; @@ -55,39 +57,40 @@ public class CosmosTemplate implements CosmosOperations, ApplicationContextAware private static final Logger LOGGER = LoggerFactory.getLogger(CosmosTemplate.class); - private static final String COUNT_VALUE_KEY = "_aggregate"; - private final MappingCosmosConverter mappingCosmosConverter; private final String databaseName; private final ResponseDiagnosticsProcessor responseDiagnosticsProcessor; - private final boolean isPopulateQueryMetrics; + private final boolean enableQueryMetrics; - private final CosmosClient cosmosClient; + private final CosmosAsyncClient cosmosAsyncClient; private final Function, CosmosEntityInformation> entityInfoCreator = - Memoizer.memoize(this::getCosmosEntityInformation); + Memoizer.memoize(this::getCosmosEntityInformation); /** * Initialization - * @param cosmosDbFactory must not be {@literal null} + * + * @param cosmosFactory must not be {@literal null} * @param mappingCosmosConverter must not be {@literal null} * @param dbName must not be {@literal null} */ - public CosmosTemplate(CosmosDbFactory cosmosDbFactory, + public CosmosTemplate(CosmosFactory cosmosFactory, MappingCosmosConverter mappingCosmosConverter, String dbName) { - Assert.notNull(cosmosDbFactory, "CosmosDbFactory must not be null!"); + Assert.notNull(cosmosFactory, "CosmosDbFactory must not be null!"); Assert.notNull(mappingCosmosConverter, "MappingCosmosConverter must not be null!"); this.mappingCosmosConverter = mappingCosmosConverter; this.databaseName = dbName; - this.cosmosClient = cosmosDbFactory.getCosmosClient(); - this.responseDiagnosticsProcessor = cosmosDbFactory.getConfig().getResponseDiagnosticsProcessor(); - this.isPopulateQueryMetrics = cosmosDbFactory.getConfig().isPopulateQueryMetrics(); + this.cosmosAsyncClient = cosmosFactory.getCosmosAsyncClient(); + this.responseDiagnosticsProcessor = + cosmosFactory.getConfig().getResponseDiagnosticsProcessor(); + this.enableQueryMetrics = cosmosFactory.getConfig().isQueryMetricsEnabled(); } /** * Sets the application context + * * @param applicationContext must not be {@literal null} * @throws BeansException the bean exception */ @@ -95,8 +98,8 @@ public void setApplicationContext(ApplicationContext applicationContext) throws } /** - * * Inserts item + * * @param objectToSave must not be {@literal null} * @param partitionKey must not be {@literal null} * @param type class of domain type @@ -110,6 +113,7 @@ public T insert(T objectToSave, PartitionKey partitionKey) { /** * Inserts item into the given container + * * @param containerName must not be {@literal null} * @param objectToSave must not be {@literal null} * @param partitionKey must not be {@literal null} @@ -120,33 +124,33 @@ public T insert(String containerName, T objectToSave, PartitionKey partition Assert.hasText(containerName, "containerName should not be null, empty or only whitespaces"); Assert.notNull(objectToSave, "objectToSave should not be null"); - final CosmosItemProperties originalItem = mappingCosmosConverter.writeCosmosItemProperties(objectToSave); + final JsonNode originalItem = mappingCosmosConverter.writeJsonNode(objectToSave); - LOGGER.debug("execute createItem in database {} container {}", this.databaseName, containerName); + LOGGER.debug("execute createItem in database {} container {}", this.databaseName, + containerName); final CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(partitionKey); - @SuppressWarnings("unchecked") - final Class domainType = (Class) objectToSave.getClass(); + @SuppressWarnings("unchecked") final Class domainType = (Class) objectToSave.getClass(); - final CosmosItemResponse response = cosmosClient + final CosmosItemResponse response = cosmosAsyncClient .getDatabase(this.databaseName) .getContainer(containerName) - .createItem(originalItem, options) + .createItem(originalItem, partitionKey, options) .doOnNext(cosmosItemResponse -> - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null)) + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemResponse.getDiagnostics(), null)) .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to insert item", throwable)) + CosmosExceptionUtils.exceptionHandler("Failed to insert item", throwable)) .block(); assert response != null; - return mappingCosmosConverter.read(domainType, response.properties()); + return toDomainObject(domainType, response.getItem()); } /** * Finds item by id + * * @param id must not be {@literal null} * @param domainType must not be {@literal null} * @param type class of domain type @@ -162,27 +166,25 @@ public T findById(Object id, Class domainType) { public T findById(Object id, Class domainType, PartitionKey partitionKey) { Assert.notNull(domainType, "domainType should not be null"); Assert.notNull(partitionKey, "partitionKey should not be null"); - assertValidId(id); - + String idToQuery = CosmosUtils.getStringIDValue(id); final String containerName = getContainerName(domainType); - return cosmosClient + return cosmosAsyncClient .getDatabase(databaseName) .getContainer(containerName) - .getItem(id.toString(), partitionKey) - .read() + .readItem(idToQuery, partitionKey, JsonNode.class) .flatMap(cosmosItemResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null); - return Mono.justOrEmpty(toDomainObject(domainType, - cosmosItemResponse.properties())); + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemResponse.getDiagnostics(), null); + return Mono.justOrEmpty(toDomainObject(domainType, cosmosItemResponse.getItem())); }) .onErrorResume(throwable -> - CosmosDBExceptionUtils.findAPIExceptionHandler("Failed to find item", throwable)) + CosmosExceptionUtils.findAPIExceptionHandler("Failed to find item", throwable)) .block(); } /** * Finds item by id + * * @param containerName must not be {@literal null} * @param id must not be {@literal null} * @param domainType must not be {@literal null} @@ -192,87 +194,87 @@ public T findById(Object id, Class domainType, PartitionKey partitionKey) public T findById(String containerName, Object id, Class domainType) { Assert.hasText(containerName, "containerName should not be null, empty or only whitespaces"); Assert.notNull(domainType, "domainType should not be null"); - assertValidId(id); - final String query = String.format("select * from root where root.id = '%s'", id.toString()); - final FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); - options.populateQueryMetrics(isPopulateQueryMetrics); - return cosmosClient + final String query = String.format("select * from root where root.id = '%s'", + CosmosUtils.getStringIDValue(id)); + final CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setQueryMetricsEnabled(enableQueryMetrics); + return cosmosAsyncClient .getDatabase(databaseName) .getContainer(containerName) - .queryItems(query, options) + .queryItems(query, options, JsonNode.class) + .byPage() .flatMap(cosmosItemFeedResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, cosmosItemFeedResponse); + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemFeedResponse.getCosmosDiagnostics(), cosmosItemFeedResponse); return Mono.justOrEmpty(cosmosItemFeedResponse - .results() + .getResults() .stream() - .map(cosmosItem -> mappingCosmosConverter.read(domainType, cosmosItem)) + .map(cosmosItem -> toDomainObject(domainType, cosmosItem)) .findFirst()); }) .onErrorResume(throwable -> - CosmosDBExceptionUtils.findAPIExceptionHandler("Failed to find item", throwable)) + CosmosExceptionUtils.findAPIExceptionHandler("Failed to find item", throwable)) .blockFirst(); } /** * Upserts an item with partition key + * * @param object upsert object - * @param partitionKey the partition key * @param type of upsert object */ - public void upsert(T object, PartitionKey partitionKey) { + public void upsert(T object) { Assert.notNull(object, "Upsert object should not be null"); - upsert(getContainerName(object.getClass()), object, partitionKey); + upsert(getContainerName(object.getClass()), object); } /** * Upserts an item into container with partition key + * * @param containerName the container name * @param object upsert object - * @param partitionKey the partition key * @param type of upsert object */ - public void upsert(String containerName, T object, PartitionKey partitionKey) { - upsertAndReturnEntity(containerName, object, partitionKey); + public void upsert(String containerName, T object) { + upsertAndReturnEntity(containerName, object); } /** * Upserts an item and return item properties + * * @param containerName the container name * @param object upsert object - * @param partitionKey the partition key * @param type of upsert object * @return upsert object entity */ - public T upsertAndReturnEntity(String containerName, T object, PartitionKey partitionKey) { + public T upsertAndReturnEntity(String containerName, T object) { Assert.hasText(containerName, "containerName should not be null, empty or only whitespaces"); Assert.notNull(object, "Upsert object should not be null"); - final CosmosItemProperties originalItem = mappingCosmosConverter.writeCosmosItemProperties(object); + final JsonNode originalItem = mappingCosmosConverter.writeJsonNode(object); - LOGGER.debug("execute upsert item in database {} container {}", this.databaseName, containerName); + LOGGER.debug("execute upsert item in database {} container {}", this.databaseName, + containerName); - @SuppressWarnings("unchecked") - final Class domainType = (Class) object.getClass(); + @SuppressWarnings("unchecked") final Class domainType = (Class) object.getClass(); final CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(partitionKey); applyVersioning(domainType, originalItem, options); - final CosmosItemResponse cosmosItemResponse = cosmosClient + final CosmosItemResponse cosmosItemResponse = cosmosAsyncClient .getDatabase(this.databaseName) .getContainer(containerName) .upsertItem(originalItem, options) - .doOnNext(response -> CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - response, null)) - .onErrorResume(throwable -> CosmosDBExceptionUtils.exceptionHandler("Failed to upsert item", throwable)) + .doOnNext(response -> CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + response.getDiagnostics(), null)) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to upsert item", throwable)) .block(); assert cosmosItemResponse != null; - return mappingCosmosConverter.read(domainType, cosmosItemResponse.properties()); + return toDomainObject(domainType, cosmosItemResponse.getItem()); } /** @@ -302,10 +304,10 @@ public List findAll(String containerName, final Class domainType) { final DocumentQuery query = new DocumentQuery(Criteria.getInstance(CriteriaType.ALL)); - final List items = findItems(query, domainType, containerName); + final List items = findItems(query, containerName); return items.stream() - .map(d -> getConverter().read(domainType, d)) - .collect(Collectors.toList()); + .map(d -> toDomainObject(domainType, d)) + .collect(Collectors.toList()); } @Override @@ -315,22 +317,23 @@ public List findAll(PartitionKey partitionKey, final Class domainType) final String containerName = getContainerName(domainType); - final FeedOptions feedOptions = new FeedOptions(); - feedOptions.partitionKey(partitionKey); - feedOptions.populateQueryMetrics(isPopulateQueryMetrics); + final CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + cosmosQueryRequestOptions.setPartitionKey(partitionKey); + cosmosQueryRequestOptions.setQueryMetricsEnabled(enableQueryMetrics); - return cosmosClient + return cosmosAsyncClient .getDatabase(this.databaseName) .getContainer(containerName) - .readAllItems(feedOptions) + .queryItems("SELECT * FROM r", cosmosQueryRequestOptions, JsonNode.class) + .byPage() .flatMap(cosmosItemFeedResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, null, cosmosItemFeedResponse); - return Flux.fromIterable(cosmosItemFeedResponse.results()); + return Flux.fromIterable(cosmosItemFeedResponse.getResults()); }) - .map(cosmosItemProperties -> toDomainObject(domainType, cosmosItemProperties)) + .map(jsonNode -> toDomainObject(domainType, jsonNode)) .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to find items", throwable)) + CosmosExceptionUtils.exceptionHandler("Failed to find items", throwable)) .collectList() .block(); } @@ -349,31 +352,19 @@ public void deleteAll(@NonNull String containerName, @NonNull Class domainTyp this.delete(query, domainType, containerName); } - @Override - public void deleteCollection(@NonNull String containerName) { - deleteContainer(containerName); - } - @Override public void deleteContainer(@NonNull String containerName) { Assert.hasText(containerName, "containerName should have text."); - cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .delete() - .doOnNext(response -> CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - response, null)) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to delete container", throwable)) - .block(); - } - - /** - * To get collection name by domaintype - * @param domainType class type - * @return String - */ - public String getCollectionName(Class domainType) { - return getContainerName(domainType); + cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .delete() + .doOnNext(response -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + response.getDiagnostics(), null); + }) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to delete container", throwable)) + .block(); } @Override @@ -383,67 +374,76 @@ public String getContainerName(Class domainType) { return entityInfoCreator.apply(domainType).getContainerName(); } - @Override - public CosmosContainerProperties createCollectionIfNotExists(@NonNull CosmosEntityInformation information) { - return createContainerIfNotExists(information); - } - @Override public CosmosContainerProperties createContainerIfNotExists(CosmosEntityInformation information) { - final CosmosContainerResponse response = cosmosClient + final CosmosContainerResponse response = cosmosAsyncClient .createDatabaseIfNotExists(this.databaseName) .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to create database", throwable)) + CosmosExceptionUtils.exceptionHandler("Failed to create database", throwable)) .flatMap(cosmosDatabaseResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosDatabaseResponse, null); - final CosmosContainerProperties cosmosContainerProperties = new CosmosContainerProperties( - information.getContainerName(), "/" + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosDatabaseResponse.getDiagnostics(), null); + final CosmosContainerProperties cosmosContainerProperties = + new CosmosContainerProperties( + information.getContainerName(), "/" + information.getPartitionKeyFieldName()); - cosmosContainerProperties.defaultTimeToLive(information.getTimeToLive()); - cosmosContainerProperties.indexingPolicy(information.getIndexingPolicy()); - return cosmosDatabaseResponse - .database() - .createContainerIfNotExists(cosmosContainerProperties, information.getRequestUnit()) + cosmosContainerProperties.setDefaultTimeToLiveInSeconds(information.getTimeToLive()); + cosmosContainerProperties.setIndexingPolicy(information.getIndexingPolicy()); + + CosmosAsyncDatabase cosmosAsyncDatabase = cosmosAsyncClient + .getDatabase(cosmosDatabaseResponse.getProperties().getId()); + Mono cosmosContainerResponseMono; + + if (information.getRequestUnit() == null) { + cosmosContainerResponseMono = + cosmosAsyncDatabase.createContainerIfNotExists(cosmosContainerProperties); + } else { + ThroughputProperties throughputProperties = + ThroughputProperties.createManualThroughput(information.getRequestUnit()); + cosmosContainerResponseMono = + cosmosAsyncDatabase.createContainerIfNotExists(cosmosContainerProperties, + throughputProperties); + } + + return cosmosContainerResponseMono .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to create container", throwable)) + CosmosExceptionUtils.exceptionHandler("Failed to create container", + throwable)) .doOnNext(cosmosContainerResponse -> - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosContainerResponse, null)); + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosContainerResponse.getDiagnostics(), null)); }) .block(); assert response != null; - return response.properties(); + return response.getProperties(); } /** - * Delete the DocumentQuery, need to query by id at first, then delete the item - * from the result. + * Delete the DocumentQuery, need to query by id at first, then delete the item from the result. * * @param containerName Container name of database * @param id item id - * @param partitionKey the paritition key + * @param partitionKey the partition key */ public void deleteById(String containerName, Object id, PartitionKey partitionKey) { Assert.hasText(containerName, "containerName should not be null, empty or only whitespaces"); - assertValidId(id); - - LOGGER.debug("execute deleteById in database {} container {}", this.databaseName, containerName); + String idToDelete = CosmosUtils.getStringIDValue(id); + LOGGER.debug("execute deleteById in database {} container {}", this.databaseName, + containerName); if (partitionKey == null) { - partitionKey = PartitionKey.None; + partitionKey = PartitionKey.NONE; } - final CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(partitionKey); - cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .getItem(id.toString(), partitionKey) - .delete(options) - .doOnNext(response -> CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - response, null)) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to delete item", throwable)) - .block(); + cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .deleteItem(idToDelete, partitionKey) + .doOnNext(response -> + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + response.getDiagnostics(), null)) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to delete item", + throwable)) + .block(); } @Override @@ -451,47 +451,53 @@ public List findByIds(Iterable ids, Class domainType, String c Assert.notNull(ids, "Id list should not be null"); Assert.notNull(domainType, "domainType should not be null."); Assert.hasText(containerName, "container should not be null, empty or only whitespaces"); - + final List idList = new ArrayList<>(); + for (ID id : ids) { + idList.add(CosmosUtils.getStringIDValue(id)); + } final DocumentQuery query = new DocumentQuery(Criteria.getInstance(CriteriaType.IN, "id", - Collections.singletonList(ids))); + Collections.singletonList(idList), Part.IgnoreCaseType.NEVER)); return find(query, domainType, containerName); } /** * Finds the document query items + * * @param query The representation for query method. * @param domainType Class of domain * @param containerName Container name of database * @param class of domainType * @return All the found items as List. */ - public List find(@NonNull DocumentQuery query, @NonNull Class domainType, String containerName) { + public List find(@NonNull DocumentQuery query, @NonNull Class domainType, + String containerName) { Assert.notNull(query, "DocumentQuery should not be null."); Assert.notNull(domainType, "domainType should not be null."); Assert.hasText(containerName, "container should not be null, empty or only whitespaces"); - return findItems(query, domainType, containerName) - .stream() - .map(cosmosItemProperties -> toDomainObject(domainType, cosmosItemProperties)) - .collect(Collectors.toList()); + final List items = findItems(query, containerName); + return items.stream() + .map(d -> toDomainObject(domainType, d)) + .collect(Collectors.toList()); } /** * Checks if document query items exist + * * @param query The representation for query method. * @param domainType Class of domain * @param containerName Container name of database * @param class of domainType * @return if items exist */ - public Boolean exists(@NonNull DocumentQuery query, @NonNull Class domainType, String containerName) { - return this.find(query, domainType, containerName).size() > 0; + public Boolean exists(@NonNull DocumentQuery query, @NonNull Class domainType, + String containerName) { + return this.count(query, containerName) > 0; } /** - * Delete the DocumentQuery, need to query the domains at first, then delete the item - * from the result. - * The cosmosdb Sql API do _NOT_ support DELETE query, we cannot add one DeleteQueryGenerator. + * Delete the DocumentQuery, need to query the domains at first, then delete the item from the result. The cosmos db + * Sql API do _NOT_ support DELETE query, we cannot add one DeleteQueryGenerator. * * @param query The representation for query method. * @param domainType Class of domain @@ -501,24 +507,23 @@ public Boolean exists(@NonNull DocumentQuery query, @NonNull Class domain */ @Override public List delete(@NonNull DocumentQuery query, @NonNull Class domainType, - @NonNull String containerName) { + @NonNull String containerName) { Assert.notNull(query, "DocumentQuery should not be null."); Assert.notNull(domainType, "domainType should not be null."); Assert.hasText(containerName, "container should not be null, empty or only whitespaces"); - final List results = findItems(query, domainType, containerName); + final List results = findItems(query, containerName); final List partitionKeyName = getPartitionKeyNames(domainType); - return results.stream().map(cosmosItemProperties -> { - final CosmosItemResponse cosmosItemResponse = deleteItem(cosmosItemProperties, - partitionKeyName, containerName, domainType); - return getConverter().read(domainType, cosmosItemResponse.properties()); - }).collect(Collectors.toList()); + return results.stream() + .map(item -> deleteItem(item, partitionKeyName, containerName, domainType)) + .collect(Collectors.toList()); } @Override public Page findAll(Pageable pageable, Class domainType, String containerName) { - final DocumentQuery query = new DocumentQuery(Criteria.getInstance(CriteriaType.ALL)).with(pageable); + final DocumentQuery query = + new DocumentQuery(Criteria.getInstance(CriteriaType.ALL)).with(pageable); if (pageable.getSort().isSorted()) { query.with(pageable.getSort()); } @@ -527,56 +532,64 @@ public Page findAll(Pageable pageable, Class domainType, String contai } @Override - public Page paginationQuery(DocumentQuery query, Class domainType, String containerName) { - Assert.isTrue(query.getPageable().getPageSize() > 0, "pageable should have page size larger than 0"); + public Page paginationQuery(DocumentQuery query, Class domainType, + String containerName) { + Assert.isTrue(query.getPageable().getPageSize() > 0, + "pageable should have page size larger than 0"); Assert.hasText(containerName, "container should not be null, empty or only whitespaces"); final Pageable pageable = query.getPageable(); - final FeedOptions feedOptions = new FeedOptions(); + final CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + cosmosQueryRequestOptions.setQueryMetricsEnabled(enableQueryMetrics); + + CosmosAsyncContainer container = + cosmosAsyncClient.getDatabase(this.databaseName).getContainer(containerName); + final SqlQuerySpec sqlQuerySpec = new FindQuerySpecGenerator().generateCosmos(query); + + Flux> feedResponseFlux; if (pageable instanceof CosmosPageRequest) { - feedOptions.requestContinuation(((CosmosPageRequest) pageable).getRequestContinuation()); + feedResponseFlux = container + .queryItems(sqlQuerySpec, cosmosQueryRequestOptions, JsonNode.class) + .byPage(((CosmosPageRequest) pageable).getRequestContinuation(), + pageable.getPageSize()); + } else { + feedResponseFlux = container + .queryItems(sqlQuerySpec, cosmosQueryRequestOptions, JsonNode.class) + .byPage(pageable.getPageSize()); } - feedOptions.maxItemCount(pageable.getPageSize()); - feedOptions.enableCrossPartitionQuery(query.isCrossPartitionQuery(getPartitionKeyNames(domainType))); - feedOptions.populateQueryMetrics(isPopulateQueryMetrics); - - final SqlQuerySpec sqlQuerySpec = new FindQuerySpecGenerator().generateCosmos(query); - final FeedResponse feedResponse = cosmosClient - .getDatabase(this.databaseName) - .getContainer(containerName) - .queryItems(sqlQuerySpec, feedOptions) + final FeedResponse feedResponse = feedResponseFlux .doOnNext(propertiesFeedResponse -> - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, propertiesFeedResponse)) + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + propertiesFeedResponse.getCosmosDiagnostics(), propertiesFeedResponse)) .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to query items", throwable)) + CosmosExceptionUtils.exceptionHandler("Failed to query items", throwable)) .next() .block(); assert feedResponse != null; - final Iterator it = feedResponse.results().iterator(); + final Iterator it = feedResponse.getResults().iterator(); final List result = new ArrayList<>(); for (int index = 0; it.hasNext() - && index < pageable.getPageSize(); index++) { + && index < pageable.getPageSize(); index++) { - final CosmosItemProperties cosmosItemProperties = it.next(); - if (cosmosItemProperties == null) { + final JsonNode jsonNode = it.next(); + if (jsonNode == null) { continue; } - final T entity = mappingCosmosConverter.read(domainType, cosmosItemProperties); + final T entity = mappingCosmosConverter.read(domainType, jsonNode); result.add(entity); } - final long total = count(query, domainType, containerName); + final long total = count(query, containerName); final int contentSize = result.size(); int pageSize; if (contentSize < pageable.getPageSize() - && contentSize > 0) { + && contentSize > 0) { // If the content size is less than page size, // this means, cosmosDB is returning less items than page size, // because of either RU limit, or payload limit @@ -590,7 +603,7 @@ public Page paginationQuery(DocumentQuery query, Class domainType, Str final CosmosPageRequest pageRequest = CosmosPageRequest.of(pageable.getOffset(), pageable.getPageNumber(), pageSize, - feedResponse.continuationToken(), + feedResponse.getContinuationToken(), query.getSort()); return new CosmosPageImpl<>(result, pageRequest, total); @@ -601,19 +614,16 @@ public long count(String containerName) { Assert.hasText(containerName, "container name should not be empty"); final DocumentQuery query = new DocumentQuery(Criteria.getInstance(CriteriaType.ALL)); - final Long count = getCountValue(query, true, containerName); + final Long count = getCountValue(query, containerName); assert count != null; return count; } @Override - public long count(DocumentQuery query, Class domainType, String containerName) { - Assert.notNull(domainType, "domainType should not be null"); + public long count(DocumentQuery query, String containerName) { Assert.hasText(containerName, "container name should not be empty"); - final boolean isCrossPartitionQuery = - query.isCrossPartitionQuery(getPartitionKeyNames(domainType)); - final Long count = getCountValue(query, isCrossPartitionQuery, containerName); + final Long count = getCountValue(query, containerName); assert count != null; return count; } @@ -623,30 +633,31 @@ public MappingCosmosConverter getConverter() { return this.mappingCosmosConverter; } - private Long getCountValue(DocumentQuery query, boolean isCrossPartitionQuery, String containerName) { + private Long getCountValue(DocumentQuery query, String containerName) { final SqlQuerySpec querySpec = new CountQueryGenerator().generateCosmos(query); - final FeedOptions options = new FeedOptions(); - - options.enableCrossPartitionQuery(isCrossPartitionQuery); - options.populateQueryMetrics(isPopulateQueryMetrics); + final CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setQueryMetricsEnabled(enableQueryMetrics); return executeQuery(querySpec, containerName, options) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to get count value", throwable)) - .doOnNext(response -> CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, response)) - .next() - .map(r -> r.results().get(0).getLong(COUNT_VALUE_KEY)) - .block(); + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to get count value", throwable)) + .doOnNext(response -> CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + null, response)) + .next() + .map(r -> r.getResults().get(0).asLong()) + .block(); } - private Flux> executeQuery(SqlQuerySpec sqlQuerySpec, String containerName, - FeedOptions options) { - return cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .queryItems(sqlQuerySpec, options) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to execute query", throwable)); + private Flux> executeQuery(SqlQuerySpec sqlQuerySpec, + String containerName, + CosmosQueryRequestOptions options) { + return cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .queryItems(sqlQuerySpec, options, JsonNode.class) + .byPage() + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to execute query", + throwable)); } private List getPartitionKeyNames(Class domainType) { @@ -659,83 +670,70 @@ private List getPartitionKeyNames(Class domainType) { return Collections.singletonList(entityInfo.getPartitionKeyFieldName()); } - private void assertValidId(Object id) { - Assert.notNull(id, "id should not be null"); - if (id instanceof String) { - Assert.hasText(id.toString(), "id should not be empty or only whitespaces."); - } + private List findItems(@NonNull DocumentQuery query, + @NonNull String containerName) { + final SqlQuerySpec sqlQuerySpec = new FindQuerySpecGenerator().generateCosmos(query); + final CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + cosmosQueryRequestOptions.setQueryMetricsEnabled(enableQueryMetrics); + + return cosmosAsyncClient + .getDatabase(this.databaseName) + .getContainer(containerName) + .queryItems(sqlQuerySpec, cosmosQueryRequestOptions, JsonNode.class) + .byPage() + .flatMap(cosmosItemFeedResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemFeedResponse.getCosmosDiagnostics(), cosmosItemFeedResponse); + return Flux.fromIterable(cosmosItemFeedResponse.getResults()); + }) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to find items", throwable)) + .collectList() + .block(); } - private List findItems(@NonNull DocumentQuery query, - @NonNull Class domainType, - @NonNull String containerName) { - final SqlQuerySpec sqlQuerySpec = new FindQuerySpecGenerator().generateCosmos(query); - final boolean isCrossPartitionQuery = - query.isCrossPartitionQuery(getPartitionKeyNames(domainType)); - final FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(isCrossPartitionQuery); - feedOptions.populateQueryMetrics(isPopulateQueryMetrics); - - return cosmosClient - .getDatabase(this.databaseName) - .getContainer(containerName) - .queryItems(sqlQuerySpec, feedOptions) - .flatMap(cosmosItemFeedResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, cosmosItemFeedResponse); - return Flux.fromIterable(cosmosItemFeedResponse.results()); - }) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to find items", throwable)) - .collectList() - .block(); - } - - private CosmosItemResponse deleteItem(@NonNull CosmosItemProperties cosmosItemProperties, - @NonNull List partitionKeyNames, - String containerName, - @NonNull Class domainType) { + private T deleteItem(@NonNull JsonNode jsonNode, + @NonNull List partitionKeyNames, + String containerName, + @NonNull Class domainType) { Assert.isTrue(partitionKeyNames.size() <= 1, "Only one Partition is supported."); PartitionKey partitionKey = null; if (!partitionKeyNames.isEmpty() - && StringUtils.hasText(partitionKeyNames.get(0))) { - partitionKey = new PartitionKey(cosmosItemProperties.get(partitionKeyNames.get(0))); + && StringUtils.hasText(partitionKeyNames.get(0))) { + partitionKey = new PartitionKey(jsonNode.get(partitionKeyNames.get(0)).asText()); } if (partitionKey == null) { - partitionKey = PartitionKey.None; + partitionKey = PartitionKey.NONE; } - final CosmosItemRequestOptions options = new CosmosItemRequestOptions(partitionKey); - applyVersioning(domainType, cosmosItemProperties, options); + final CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + applyVersioning(domainType, jsonNode, options); - return cosmosClient + return cosmosAsyncClient .getDatabase(this.databaseName) .getContainer(containerName) - .getItem(cosmosItemProperties.id(), partitionKey) - .delete(options) - .doOnNext(response -> CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - response, null)) + .deleteItem(jsonNode.get("id").asText(), partitionKey) + .doOnNext(response -> CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + response.getDiagnostics(), null)) .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to delete item", throwable)) + CosmosExceptionUtils.exceptionHandler("Failed to delete item", throwable)) + .flatMap(objectCosmosItemResponse -> Mono.just(toDomainObject(domainType, jsonNode))) .block(); } - private T toDomainObject(@NonNull Class domainType, CosmosItemProperties cosmosItemProperties) { - return mappingCosmosConverter.read(domainType, cosmosItemProperties); + private T toDomainObject(@NonNull Class domainType, JsonNode responseJsonNode) { + return mappingCosmosConverter.read(domainType, responseJsonNode); } private void applyVersioning(Class domainType, - CosmosItemProperties cosmosItemProperties, - CosmosItemRequestOptions options) { + JsonNode jsonNode, + CosmosItemRequestOptions options) { if (entityInfoCreator.apply(domainType).isVersioned()) { - final AccessCondition accessCondition = new AccessCondition(); - accessCondition.type(AccessConditionType.IF_MATCH); - accessCondition.condition(cosmosItemProperties.etag()); - options.accessCondition(accessCondition); + options.setIfMatchETag(jsonNode.get("_etag").asText()); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosOperations.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosOperations.java index 04b4a447db3c..fd47cffba210 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosOperations.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosOperations.java @@ -3,8 +3,8 @@ package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.CosmosContainerResponse; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.query.DocumentQuery; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; @@ -24,15 +24,6 @@ public interface ReactiveCosmosOperations { */ String getContainerName(Class domainType); - /** - * Use createContainerIfNotExists() instead - * @param information cosmos entity information - * @return Mono of cosmos container response - * @deprecated use {@link #createContainerIfNotExists(CosmosEntityInformation)} instead. - */ - @Deprecated - Mono createCollectionIfNotExists(CosmosEntityInformation information); - /** * Creates a container if it doesn't already exist * @@ -124,25 +115,23 @@ public interface ReactiveCosmosOperations { Mono insert(String containerName, Object objectToSave, PartitionKey partitionKey); /** - * Upsert + * Upsert an item with partition key * * @param object the object to upsert - * @param partitionKey the partition key * @param type class of object * @return Mono */ - Mono upsert(T object, PartitionKey partitionKey); + Mono upsert(T object); /** - * Upsert + * Upsert an item to container with partition key * * @param containerName the container name * @param object the object to save - * @param partitionKey the partition key * @param type class of object * @return Mono */ - Mono upsert(String containerName, T object, PartitionKey partitionKey); + Mono upsert(String containerName, T object); /** * Delete an item by id @@ -158,10 +147,10 @@ public interface ReactiveCosmosOperations { * Delete all items in a container * * @param containerName the container name - * @param partitionKey the partition key path + * @param domainType the domainType * @return void Mono */ - Mono deleteAll(String containerName, String partitionKey); + Mono deleteAll(String containerName, Class domainType); /** * Delete container diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java index d7f5528d8c05..50a7d990d400 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java @@ -3,18 +3,18 @@ package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.AccessCondition; -import com.azure.data.cosmos.AccessConditionType; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.SqlQuerySpec; -import com.azure.data.cosmos.CosmosItemRequestOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.PartitionKey; -import com.azure.spring.data.cosmos.common.CosmosdbUtils; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.CosmosContainerResponse; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.FeedResponse; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.cosmos.models.ThroughputProperties; +import com.azure.spring.data.cosmos.CosmosFactory; +import com.azure.spring.data.cosmos.common.CosmosUtils; import com.azure.spring.data.cosmos.common.Memoizer; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.generator.CountQueryGenerator; @@ -22,9 +22,9 @@ import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; -import com.azure.spring.data.cosmos.exception.CosmosDBExceptionUtils; +import com.azure.spring.data.cosmos.exception.CosmosExceptionUtils; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.fasterxml.jackson.databind.JsonNode; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; @@ -44,40 +44,37 @@ */ @SuppressWarnings("unchecked") public class ReactiveCosmosTemplate implements ReactiveCosmosOperations, ApplicationContextAware { - private static final String COUNT_VALUE_KEY = "_aggregate"; private final MappingCosmosConverter mappingCosmosConverter; private final String databaseName; - private final CosmosClient cosmosClient; + private final CosmosAsyncClient cosmosAsyncClient; private final ResponseDiagnosticsProcessor responseDiagnosticsProcessor; private final boolean isPopulateQueryMetrics; private final Function, CosmosEntityInformation> entityInfoCreator = Memoizer.memoize(this::getCosmosEntityInformation); - private final List containerNameCache; - /** * Constructor * - * @param cosmosDbFactory the cosmosdbfactory + * @param cosmosFactory the cosmos db factory * @param mappingCosmosConverter the mappingCosmosConverter * @param dbName database name */ - public ReactiveCosmosTemplate(CosmosDbFactory cosmosDbFactory, + public ReactiveCosmosTemplate(CosmosFactory cosmosFactory, MappingCosmosConverter mappingCosmosConverter, String dbName) { - Assert.notNull(cosmosDbFactory, "CosmosDbFactory must not be null!"); + Assert.notNull(cosmosFactory, "CosmosDbFactory must not be null!"); Assert.notNull(mappingCosmosConverter, "MappingCosmosConverter must not be null!"); this.mappingCosmosConverter = mappingCosmosConverter; this.databaseName = dbName; - this.containerNameCache = new ArrayList<>(); - this.cosmosClient = cosmosDbFactory.getCosmosClient(); - this.responseDiagnosticsProcessor = cosmosDbFactory.getConfig().getResponseDiagnosticsProcessor(); - this.isPopulateQueryMetrics = cosmosDbFactory.getConfig().isPopulateQueryMetrics(); + this.cosmosAsyncClient = cosmosFactory.getCosmosAsyncClient(); + this.responseDiagnosticsProcessor = + cosmosFactory.getConfig().getResponseDiagnosticsProcessor(); + this.isPopulateQueryMetrics = cosmosFactory.getConfig().isQueryMetricsEnabled(); } /** @@ -88,17 +85,6 @@ public void setApplicationContext(@NonNull ApplicationContext applicationContext // NOTE: When application context instance variable gets introduced, assign it here. } - /** - * Creates a container if it doesn't already exist - * - * @param information the CosmosEntityInformation - * @return Mono containing CosmosContainerResponse - */ - @Override - public Mono createCollectionIfNotExists(CosmosEntityInformation information) { - return createContainerIfNotExists(information); - } - /** * Creates a container if it doesn't already exist * @@ -108,29 +94,44 @@ public Mono createCollectionIfNotExists(CosmosEntityInf @Override public Mono createContainerIfNotExists(CosmosEntityInformation information) { - return cosmosClient + return cosmosAsyncClient .createDatabaseIfNotExists(this.databaseName) .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to create database", throwable)) + CosmosExceptionUtils.exceptionHandler("Failed to create database", throwable)) .flatMap(cosmosDatabaseResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosDatabaseResponse, null); - final CosmosContainerProperties cosmosContainerProperties = new CosmosContainerProperties( - information.getContainerName(), - "/" + information.getPartitionKeyFieldName()); - cosmosContainerProperties.defaultTimeToLive(information.getTimeToLive()); - cosmosContainerProperties.indexingPolicy(information.getIndexingPolicy()); - return cosmosDatabaseResponse - .database() - .createContainerIfNotExists(cosmosContainerProperties, information.getRequestUnit()) + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosDatabaseResponse.getDiagnostics(), null); + final CosmosContainerProperties cosmosContainerProperties = + new CosmosContainerProperties( + information.getContainerName(), + "/" + information.getPartitionKeyFieldName()); + cosmosContainerProperties.setDefaultTimeToLiveInSeconds(information.getTimeToLive()); + cosmosContainerProperties.setIndexingPolicy(information.getIndexingPolicy()); + + CosmosAsyncDatabase database = + cosmosAsyncClient.getDatabase(cosmosDatabaseResponse.getProperties().getId()); + Mono cosmosContainerResponseMono; + + if (information.getRequestUnit() == null) { + cosmosContainerResponseMono = + database.createContainerIfNotExists(cosmosContainerProperties); + } else { + ThroughputProperties throughputProperties = + ThroughputProperties.createManualThroughput(information.getRequestUnit()); + cosmosContainerResponseMono = + database.createContainerIfNotExists(cosmosContainerProperties, + throughputProperties); + } + + return cosmosContainerResponseMono .map(cosmosContainerResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosContainerResponse, null); - this.containerNameCache.add(information.getContainerName()); + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosContainerResponse.getDiagnostics(), null); return cosmosContainerResponse; }) .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to create container", throwable)); + CosmosExceptionUtils.exceptionHandler("Failed to create container", + throwable)); }); } @@ -167,22 +168,23 @@ public Flux findAll(PartitionKey partitionKey, Class domainType) { final String containerName = getContainerName(domainType); - final FeedOptions feedOptions = new FeedOptions(); - feedOptions.partitionKey(partitionKey); - feedOptions.populateQueryMetrics(isPopulateQueryMetrics); + final CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + cosmosQueryRequestOptions.setPartitionKey(partitionKey); + cosmosQueryRequestOptions.setQueryMetricsEnabled(isPopulateQueryMetrics); - return cosmosClient + return cosmosAsyncClient .getDatabase(this.databaseName) .getContainer(containerName) - .readAllItems(feedOptions) + .queryItems("SELECT * FROM r", cosmosQueryRequestOptions, JsonNode.class) + .byPage() .flatMap(cosmosItemFeedResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, cosmosItemFeedResponse); - return Flux.fromIterable(cosmosItemFeedResponse.results()); + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemFeedResponse.getCosmosDiagnostics(), cosmosItemFeedResponse); + return Flux.fromIterable(cosmosItemFeedResponse.getResults()); }) .map(cosmosItemProperties -> toDomainObject(domainType, cosmosItemProperties)) .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to find items", throwable)); + CosmosExceptionUtils.exceptionHandler("Failed to find items", throwable)); } /** @@ -201,7 +203,7 @@ public Mono findById(Object id, Class domainType) { /** * Find by id * - * @param containerName the containername + * @param containerName the container name * @param id the id * @param domainType the entity class * @return Mono with the item or error @@ -210,28 +212,29 @@ public Mono findById(Object id, Class domainType) { public Mono findById(String containerName, Object id, Class domainType) { Assert.hasText(containerName, "containerName should not be null, empty or only whitespaces"); Assert.notNull(domainType, "domainType should not be null"); - assertValidId(id); - - final String query = String.format("select * from root where root.id = '%s'", id.toString()); - final FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); - options.populateQueryMetrics(isPopulateQueryMetrics); - - return cosmosClient.getDatabase(databaseName) - .getContainer(containerName) - .queryItems(query, options) - .flatMap(cosmosItemFeedResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, cosmosItemFeedResponse); - return Mono.justOrEmpty(cosmosItemFeedResponse - .results() - .stream() - .map(cosmosItem -> toDomainObject(domainType, cosmosItem)) - .findFirst()); - }) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.findAPIExceptionHandler("Failed to find item", throwable)) - .next(); + + final String query = String.format("select * from root where root.id = '%s'", + CosmosUtils.getStringIDValue(id)); + final CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setQueryMetricsEnabled(isPopulateQueryMetrics); + + return cosmosAsyncClient.getDatabase(databaseName) + .getContainer(containerName) + .queryItems(query, options, JsonNode.class) + .byPage() + .flatMap(cosmosItemFeedResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemFeedResponse.getCosmosDiagnostics(), + cosmosItemFeedResponse); + return Mono.justOrEmpty(cosmosItemFeedResponse + .getResults() + .stream() + .map(cosmosItem -> toDomainObject(domainType, cosmosItem)) + .findFirst()); + }) + .onErrorResume(throwable -> + CosmosExceptionUtils.findAPIExceptionHandler("Failed to find item", throwable)) + .next(); } /** @@ -245,21 +248,20 @@ public Mono findById(String containerName, Object id, Class domainType @Override public Mono findById(Object id, Class domainType, PartitionKey partitionKey) { Assert.notNull(domainType, "domainType should not be null"); - assertValidId(id); + String idToFind = CosmosUtils.getStringIDValue(id); final String containerName = getContainerName(domainType); - return cosmosClient.getDatabase(databaseName) - .getContainer(containerName) - .getItem(id.toString(), partitionKey) - .read() - .flatMap(cosmosItemResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null); - return Mono.justOrEmpty(toDomainObject(domainType, - cosmosItemResponse.properties())); - }) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.findAPIExceptionHandler("Failed to find item", throwable)); + return cosmosAsyncClient.getDatabase(databaseName) + .getContainer(containerName) + .readItem(idToFind, partitionKey, JsonNode.class) + .flatMap(cosmosItemResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemResponse.getDiagnostics(), null); + return Mono.justOrEmpty(toDomainObject(domainType, + cosmosItemResponse.getItem())); + }) + .onErrorResume(throwable -> + CosmosExceptionUtils.findAPIExceptionHandler("Failed to find item", throwable)); } /** @@ -287,17 +289,19 @@ public Mono insert(T objectToSave) { Assert.notNull(objectToSave, "objectToSave should not be null"); final Class domainType = (Class) objectToSave.getClass(); - final CosmosItemProperties originalItem = mappingCosmosConverter.writeCosmosItemProperties(objectToSave); - return cosmosClient.getDatabase(this.databaseName) - .getContainer(getContainerName(objectToSave.getClass())) - .createItem(originalItem, new CosmosItemRequestOptions()) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to insert item", throwable)) - .flatMap(cosmosItemResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null); - return Mono.just(toDomainObject(domainType, cosmosItemResponse.properties())); - }); + final JsonNode originalItem = + mappingCosmosConverter.writeJsonNode(objectToSave); + return cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(getContainerName(objectToSave.getClass())) + .createItem(originalItem, new CosmosItemRequestOptions()) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to insert item", throwable)) + .flatMap(cosmosItemResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemResponse.getDiagnostics(), null); + return Mono.just(toDomainObject(domainType, + cosmosItemResponse.getItem())); + }); } /** @@ -309,38 +313,40 @@ public Mono insert(T objectToSave) { * @param partitionKey the partition key * @return Mono with the item or error */ - public Mono insert(String containerName, Object objectToSave, PartitionKey partitionKey) { + public Mono insert(String containerName, Object objectToSave, + PartitionKey partitionKey) { Assert.hasText(containerName, "containerName should not be null, empty or only whitespaces"); Assert.notNull(objectToSave, "objectToSave should not be null"); final Class domainType = (Class) objectToSave.getClass(); - final CosmosItemProperties originalItem = mappingCosmosConverter.writeCosmosItemProperties(objectToSave); + final JsonNode originalItem = + mappingCosmosConverter.writeJsonNode(objectToSave); final CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - if (partitionKey != null) { - options.partitionKey(partitionKey); + if (partitionKey == null) { + partitionKey = PartitionKey.NONE; } - return cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .createItem(originalItem, options) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to insert item", throwable)) - .flatMap(cosmosItemResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null); - return Mono.just(toDomainObject(domainType, cosmosItemResponse.properties())); - }); + return cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .createItem(originalItem, partitionKey, options) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to insert item", throwable)) + .flatMap(cosmosItemResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemResponse.getDiagnostics(), null); + return Mono.just(toDomainObject(domainType, + cosmosItemResponse.getItem())); + }); } /** * Upsert * * @param object the object to upsert - * @param partitionKey the partition key * @return Mono with the item or error */ @Override - public Mono upsert(T object, PartitionKey partitionKey) { - return upsert(getContainerName(object.getClass()), object, partitionKey); + public Mono upsert(T object) { + return upsert(getContainerName(object.getClass()), object); } /** @@ -348,30 +354,28 @@ public Mono upsert(T object, PartitionKey partitionKey) { * * @param containerName the container name * @param object the object to save - * @param partitionKey the partition key * @return Mono with the item or error */ @Override - public Mono upsert(String containerName, T object, PartitionKey partitionKey) { + public Mono upsert(String containerName, T object) { final Class domainType = (Class) object.getClass(); - final CosmosItemProperties originalItem = mappingCosmosConverter.writeCosmosItemProperties(object); + final JsonNode originalItem = + mappingCosmosConverter.writeJsonNode(object); final CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - if (partitionKey != null) { - options.partitionKey(partitionKey); - } applyVersioning(object.getClass(), originalItem, options); - return cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .upsertItem(originalItem, options) - .flatMap(cosmosItemResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null); - return Mono.just(toDomainObject(domainType, cosmosItemResponse.properties())); - }) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to upsert item", throwable)); + return cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .upsertItem(originalItem, options) + .flatMap(cosmosItemResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemResponse.getDiagnostics(), null); + return Mono.just(toDomainObject(domainType, + cosmosItemResponse.getItem())); + }) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to upsert item", throwable)); } /** @@ -385,66 +389,37 @@ public Mono upsert(String containerName, T object, PartitionKey partition @Override public Mono deleteById(String containerName, Object id, PartitionKey partitionKey) { Assert.hasText(containerName, "container name should not be null, empty or only whitespaces"); - assertValidId(id); + String idToDelete = CosmosUtils.getStringIDValue(id); if (partitionKey == null) { - partitionKey = PartitionKey.None; + partitionKey = PartitionKey.NONE; } - final CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.partitionKey(partitionKey); - return cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .getItem(id.toString(), partitionKey) - .delete(options) - .doOnNext(cosmosItemResponse -> - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null)) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to delete item", throwable)) - .then(); + return cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .deleteItem(idToDelete, partitionKey) + .doOnNext(cosmosItemResponse -> + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemResponse.getDiagnostics(), null)) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to delete item", throwable)) + .then(); } /** * Delete all items in a container * * @param containerName the container name - * @param partitionKeyName the partition key path + * @param domainType the domainType * @return void Mono */ @Override - public Mono deleteAll(String containerName, String partitionKeyName) { + public Mono deleteAll(@NonNull String containerName, @NonNull Class domainType) { Assert.hasText(containerName, "container name should not be null, empty or only whitespaces"); - Assert.notNull(partitionKeyName, "partitionKeyName should not be null"); - final Criteria criteria = Criteria.getInstance(CriteriaType.ALL); - final DocumentQuery query = new DocumentQuery(criteria); - final SqlQuerySpec sqlQuerySpec = new FindQuerySpecGenerator().generateCosmos(query); - final FeedOptions options = new FeedOptions(); - final boolean isCrossPartitionQuery = query.isCrossPartitionQuery(Collections.singletonList(partitionKeyName)); - options.enableCrossPartitionQuery(isCrossPartitionQuery); - options.populateQueryMetrics(isPopulateQueryMetrics); - return cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .queryItems(sqlQuerySpec, options) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to query items", throwable)) - .flatMap(cosmosItemFeedResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, cosmosItemFeedResponse); - return Flux.fromIterable(cosmosItemFeedResponse.results()); - }) - .flatMap(cosmosItemProperties -> cosmosClient - .getDatabase(this.databaseName) - .getContainer(containerName) - .getItem(cosmosItemProperties.id(), cosmosItemProperties.get(partitionKeyName)) - .delete() - .doOnNext(cosmosItemResponse -> - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null)) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to delete items", throwable))) - .then(); + final DocumentQuery query = new DocumentQuery(Criteria.getInstance(CriteriaType.ALL)); + + return this.delete(query, domainType, containerName).then(); } /** @@ -461,11 +436,10 @@ public Flux delete(DocumentQuery query, Class domainType, String conta Assert.notNull(domainType, "domainType should not be null."); Assert.hasText(containerName, "container name should not be null, empty or only whitespaces"); - final Flux results = findItems(query, domainType, containerName); + final Flux results = findItems(query, containerName); final List partitionKeyName = getPartitionKeyNames(domainType); - return results.flatMap(d -> deleteItem(d, partitionKeyName, containerName, domainType)) - .flatMap(cosmosItemProperties -> Mono.just(toDomainObject(domainType, cosmosItemProperties))); + return results.flatMap(d -> deleteItem(d, partitionKeyName, containerName, domainType)); } /** @@ -478,8 +452,8 @@ public Flux delete(DocumentQuery query, Class domainType, String conta */ @Override public Flux find(DocumentQuery query, Class domainType, String containerName) { - return findItems(query, domainType, containerName) - .map(cosmosItemProperties -> toDomainObject(domainType, cosmosItemProperties)); + return findItems(query, containerName) + .map(cosmosItemProperties -> toDomainObject(domainType, cosmosItemProperties)); } /** @@ -492,19 +466,20 @@ public Flux find(DocumentQuery query, Class domainType, String contain */ @Override public Mono exists(DocumentQuery query, Class domainType, String containerName) { - return count(query, true, containerName).flatMap(count -> Mono.just(count > 0)); + return count(query, containerName).flatMap(count -> Mono.just(count > 0)); } /** * Exists + * * @param id the id * @param domainType the entity class - * @param containerName the containercontainer nam,e + * @param containerName the container name * @return Mono with a boolean or error */ public Mono existsById(Object id, Class domainType, String containerName) { return findById(containerName, id, domainType) - .flatMap(o -> Mono.just(o != null)); + .flatMap(o -> Mono.just(o != null)); } /** @@ -516,7 +491,7 @@ public Mono existsById(Object id, Class domainType, String container @Override public Mono count(String containerName) { final DocumentQuery query = new DocumentQuery(Criteria.getInstance(CriteriaType.ALL)); - return count(query, true, containerName); + return count(query, containerName); } /** @@ -528,7 +503,7 @@ public Mono count(String containerName) { */ @Override public Mono count(DocumentQuery query, String containerName) { - return count(query, true, containerName); + return getCountValue(query, containerName); } @Override @@ -536,42 +511,31 @@ public MappingCosmosConverter getConverter() { return mappingCosmosConverter; } - /** - *Count - * - * @param query the document query - * @param isCrossPartitionQuery flag of cross partition - * @param containerName the container name - * @return Mono - */ - public Mono count(DocumentQuery query, boolean isCrossPartitionQuery, String containerName) { - return getCountValue(query, isCrossPartitionQuery, containerName); - } - - private Mono getCountValue(DocumentQuery query, boolean isCrossPartitionQuery, String containerName) { + private Mono getCountValue(DocumentQuery query, String containerName) { final SqlQuerySpec querySpec = new CountQueryGenerator().generateCosmos(query); - final FeedOptions options = new FeedOptions(); + final CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); - options.enableCrossPartitionQuery(isCrossPartitionQuery); - options.populateQueryMetrics(isPopulateQueryMetrics); + options.setQueryMetricsEnabled(isPopulateQueryMetrics); return executeQuery(querySpec, containerName, options) - .doOnNext(feedResponse -> CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, feedResponse)) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to get count value", throwable)) - .next() - .map(r -> r.results().get(0).getLong(COUNT_VALUE_KEY)); + .doOnNext(feedResponse -> CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + null, feedResponse)) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to get count value", throwable)) + .next() + .map(r -> r.getResults().get(0).asLong()); } - private Flux> executeQuery(SqlQuerySpec sqlQuerySpec, String containerName, - FeedOptions options) { + private Flux> executeQuery(SqlQuerySpec sqlQuerySpec, + String containerName, + CosmosQueryRequestOptions options) { - return cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .queryItems(sqlQuerySpec, options) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to execute query", throwable)); + return cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .queryItems(sqlQuerySpec, options, JsonNode.class) + .byPage() + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to execute query", throwable)); } /** @@ -582,16 +546,16 @@ private Flux> executeQuery(SqlQuerySpec sqlQu @Override public void deleteContainer(@NonNull String containerName) { Assert.hasText(containerName, "containerName should have text."); - cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .delete() - .doOnNext(cosmosContainerResponse -> - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosContainerResponse, null)) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to delete container", throwable)) - .block(); - this.containerNameCache.remove(containerName); + cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .delete() + .doOnNext(cosmosContainerResponse -> + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosContainerResponse.getDiagnostics(), null)) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to delete container", + throwable)) + .block(); } /** @@ -604,32 +568,24 @@ public String getContainerName(Class domainType) { return entityInfoCreator.apply(domainType).getContainerName(); } - private Flux findItems(@NonNull DocumentQuery query, @NonNull Class domainType, - @NonNull String containerName) { + private Flux findItems(@NonNull DocumentQuery query, + @NonNull String containerName) { final SqlQuerySpec sqlQuerySpec = new FindQuerySpecGenerator().generateCosmos(query); - final boolean isCrossPartitionQuery = query.isCrossPartitionQuery(getPartitionKeyNames(domainType)); - final FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(isCrossPartitionQuery); - feedOptions.populateQueryMetrics(isPopulateQueryMetrics); - - return cosmosClient - .getDatabase(this.databaseName) - .getContainer(containerName) - .queryItems(sqlQuerySpec, feedOptions) - .flatMap(cosmosItemFeedResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - null, cosmosItemFeedResponse); - return Flux.fromIterable(cosmosItemFeedResponse.results()); - }) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to query items", throwable)); - } - - private void assertValidId(Object id) { - Assert.notNull(id, "id should not be null"); - if (id instanceof String) { - Assert.hasText(id.toString(), "id should not be empty or only whitespaces."); - } + final CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions(); + cosmosQueryRequestOptions.setQueryMetricsEnabled(isPopulateQueryMetrics); + + return cosmosAsyncClient + .getDatabase(this.databaseName) + .getContainer(containerName) + .queryItems(sqlQuerySpec, cosmosQueryRequestOptions, JsonNode.class) + .byPage() + .flatMap(cosmosItemFeedResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + null, cosmosItemFeedResponse); + return Flux.fromIterable(cosmosItemFeedResponse.getResults()); + }) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to query items", throwable)); } private List getPartitionKeyNames(Class domainType) { @@ -642,48 +598,45 @@ private List getPartitionKeyNames(Class domainType) { return Collections.singletonList(entityInfo.getPartitionKeyFieldName()); } - private Mono deleteItem(@NonNull CosmosItemProperties cosmosItemProperties, - @NonNull List partitionKeyNames, - String containerName, - @NonNull Class domainType) { + private Mono deleteItem(@NonNull JsonNode jsonNode, + @NonNull List partitionKeyNames, + String containerName, + @NonNull Class domainType) { Assert.isTrue(partitionKeyNames.size() <= 1, "Only one Partition is supported."); PartitionKey partitionKey = null; if (!partitionKeyNames.isEmpty() - && StringUtils.hasText(partitionKeyNames.get(0))) { - partitionKey = new PartitionKey(cosmosItemProperties.get(partitionKeyNames.get(0))); + && StringUtils.hasText(partitionKeyNames.get(0))) { + partitionKey = new PartitionKey(jsonNode.get(partitionKeyNames.get(0)).asText()); } - final CosmosItemRequestOptions options = new CosmosItemRequestOptions(partitionKey); - applyVersioning(domainType, cosmosItemProperties, options); + final CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + applyVersioning(domainType, jsonNode, options); - return cosmosClient.getDatabase(this.databaseName) - .getContainer(containerName) - .getItem(cosmosItemProperties.id(), partitionKey) - .delete(options) - .map(cosmosItemResponse -> { - CosmosdbUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, - cosmosItemResponse, null); - return cosmosItemProperties; - }) - .onErrorResume(throwable -> - CosmosDBExceptionUtils.exceptionHandler("Failed to delete item", throwable)); + return cosmosAsyncClient.getDatabase(this.databaseName) + .getContainer(containerName) + .deleteItem(jsonNode.get("id").asText(), partitionKey) + .map(cosmosItemResponse -> { + CosmosUtils.fillAndProcessResponseDiagnostics(responseDiagnosticsProcessor, + cosmosItemResponse.getDiagnostics(), null); + return cosmosItemResponse; + }) + .flatMap(objectCosmosItemResponse -> Mono.just(toDomainObject(domainType, jsonNode))) + .onErrorResume(throwable -> + CosmosExceptionUtils.exceptionHandler("Failed to delete item", throwable)); } - private T toDomainObject(@NonNull Class domainType, CosmosItemProperties cosmosItemProperties) { - return mappingCosmosConverter.read(domainType, cosmosItemProperties); + private T toDomainObject(@NonNull Class domainType, JsonNode jsonNode) { + return mappingCosmosConverter.read(domainType, jsonNode); } private void applyVersioning(Class domainType, - CosmosItemProperties cosmosItemProperties, + JsonNode jsonNode, CosmosItemRequestOptions options) { if (entityInfoCreator.apply(domainType).isVersioned()) { - final AccessCondition accessCondition = new AccessCondition(); - accessCondition.type(AccessConditionType.IF_MATCH); - accessCondition.condition(cosmosItemProperties.etag()); - options.accessCondition(accessCondition); + options.setIfMatchETag(jsonNode.get("_etag").asText()); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnostics.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnostics.java index c5c990c6b66d..251eb6b40251 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnostics.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnostics.java @@ -3,81 +3,50 @@ package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.CosmosResponseDiagnostics; -import com.azure.data.cosmos.FeedResponse; -import com.azure.data.cosmos.FeedResponseDiagnostics; -import com.azure.data.cosmos.Resource; +import com.azure.cosmos.CosmosDiagnostics; +import com.azure.cosmos.models.FeedResponse; /** * Diagnostics class of cosmos and feed response */ public class ResponseDiagnostics { - private CosmosResponseDiagnostics cosmosResponseDiagnostics; - private FeedResponseDiagnostics feedResponseDiagnostics; + private CosmosDiagnostics cosmosDiagnostics; private CosmosResponseStatistics cosmosResponseStatistics; /** * Initialization * - * @param cosmosResponseDiagnostics cannot be null - * @param feedResponseDiagnostics cannot be null - */ - public ResponseDiagnostics(CosmosResponseDiagnostics cosmosResponseDiagnostics, - FeedResponseDiagnostics feedResponseDiagnostics) { - this.cosmosResponseDiagnostics = cosmosResponseDiagnostics; - this.feedResponseDiagnostics = feedResponseDiagnostics; - } - - /** - * Initialization - * - * @param cosmosResponseDiagnostics cannot be null - * @param feedResponseDiagnostics cannot be null + * @param cosmosDiagnostics cannot be null * @param cosmosResponseStatistics cannot be null */ - public ResponseDiagnostics(CosmosResponseDiagnostics cosmosResponseDiagnostics, - FeedResponseDiagnostics feedResponseDiagnostics, + public ResponseDiagnostics(CosmosDiagnostics cosmosDiagnostics, CosmosResponseStatistics cosmosResponseStatistics) { - this.cosmosResponseDiagnostics = cosmosResponseDiagnostics; - this.feedResponseDiagnostics = feedResponseDiagnostics; + this.cosmosDiagnostics = cosmosDiagnostics; this.cosmosResponseStatistics = cosmosResponseStatistics; } /** * To get diagnostics of cosmos response + * * @return CosmosResponseDiagnostics */ - public CosmosResponseDiagnostics getCosmosResponseDiagnostics() { - return cosmosResponseDiagnostics; + public CosmosDiagnostics getCosmosDiagnostics() { + return cosmosDiagnostics; } /** * To set diagnostics of cosmos response - * @param cosmosResponseDiagnostics cannot be null - */ - public void setCosmosResponseDiagnostics(CosmosResponseDiagnostics cosmosResponseDiagnostics) { - this.cosmosResponseDiagnostics = cosmosResponseDiagnostics; - } - - /** - * To get diagnostics of feed response - * @return FeedResponseDiagnostics - */ - public FeedResponseDiagnostics getFeedResponseDiagnostics() { - return feedResponseDiagnostics; - } - - /** - * To set diagnostics of feed response - * @param feedResponseDiagnostics cannot be null + * + * @param cosmosDiagnostics cannot be null */ - public void setFeedResponseDiagnostics(FeedResponseDiagnostics feedResponseDiagnostics) { - this.feedResponseDiagnostics = feedResponseDiagnostics; + public void setCosmosDiagnostics(CosmosDiagnostics cosmosDiagnostics) { + this.cosmosDiagnostics = cosmosDiagnostics; } /** * To get the statistics value of cosmos response + * * @return CosmosResponseStatistics */ public CosmosResponseStatistics getCosmosResponseStatistics() { @@ -86,6 +55,7 @@ public CosmosResponseStatistics getCosmosResponseStatistics() { /** * To set statistics of cosmos response + * * @param cosmosResponseStatistics cannot be null */ public void setCosmosResponseStatistics(CosmosResponseStatistics cosmosResponseStatistics) { @@ -95,17 +65,9 @@ public void setCosmosResponseStatistics(CosmosResponseStatistics cosmosResponseS @Override public String toString() { final StringBuilder diagnostics = new StringBuilder(); - if (cosmosResponseDiagnostics != null) { + if (cosmosDiagnostics != null) { diagnostics.append("cosmosResponseDiagnostics={") - .append(cosmosResponseDiagnostics) - .append("}"); - } - if (feedResponseDiagnostics != null) { - if (diagnostics.length() != 0) { - diagnostics.append(", "); - } - diagnostics.append("feedResponseDiagnostics={") - .append(feedResponseDiagnostics) + .append(cosmosDiagnostics) .append("}"); } if (cosmosResponseStatistics != null) { @@ -133,13 +95,14 @@ public static class CosmosResponseStatistics { * @param feedResponse response from feed * @param type of cosmosResponse */ - public CosmosResponseStatistics(FeedResponse feedResponse) { - this.requestCharge = feedResponse.requestCharge(); - this.activityId = feedResponse.activityId(); + public CosmosResponseStatistics(FeedResponse feedResponse) { + this.requestCharge = feedResponse.getRequestCharge(); + this.activityId = feedResponse.getActivityId(); } /** * To get the charge value of request + * * @return double */ public double getRequestCharge() { @@ -148,6 +111,7 @@ public double getRequestCharge() { /** * To get the activity id + * * @return String */ public String getActivityId() { @@ -157,11 +121,8 @@ public String getActivityId() { @Override public String toString() { return "CosmosResponseStatistics{" - + "requestCharge=" - + requestCharge - + ", activityId='" - + activityId - + '\'' + + "requestCharge=" + requestCharge + "," + + "activityId='" + activityId + '\'' + '}'; } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnosticsProcessor.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnosticsProcessor.java index 1eb96b409809..577dc47e2a16 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnosticsProcessor.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnosticsProcessor.java @@ -3,10 +3,10 @@ package com.azure.spring.data.cosmos.core; -import javax.annotation.Nullable; +import org.springframework.lang.Nullable; /** - * Interface for processing cosmosdb response + * Interface for processing cosmosDB response */ public interface ResponseDiagnosticsProcessor { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/convert/MappingCosmosConverter.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/convert/MappingCosmosConverter.java index 8fae263e43d5..260adf81ceb9 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/convert/MappingCosmosConverter.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/convert/MappingCosmosConverter.java @@ -2,14 +2,14 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.convert; -import com.azure.data.cosmos.CosmosItemProperties; +import com.azure.spring.data.cosmos.Constants; +import com.azure.spring.data.cosmos.core.mapping.CosmosPersistentEntity; import com.azure.spring.data.cosmos.core.mapping.CosmosPersistentProperty; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.azure.spring.data.cosmos.Constants; -import com.azure.spring.data.cosmos.core.mapping.CosmosPersistentEntity; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; -import org.json.JSONObject; +import com.fasterxml.jackson.databind.node.ObjectNode; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; @@ -22,7 +22,6 @@ import org.springframework.data.mapping.model.ConvertingPropertyAccessor; import org.springframework.util.Assert; -import java.io.IOException; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.Date; @@ -32,26 +31,26 @@ /** * A converter class between common types and cosmosItemProperties */ -@SuppressWarnings("unchecked") public class MappingCosmosConverter - implements EntityConverter, CosmosPersistentProperty, - Object, CosmosItemProperties>, + implements EntityConverter, CosmosPersistentProperty, Object, + JsonNode>, ApplicationContextAware { protected final MappingContext, - CosmosPersistentProperty> mappingContext; + CosmosPersistentProperty> mappingContext; protected GenericConversionService conversionService; private ApplicationContext applicationContext; private final ObjectMapper objectMapper; /** * Initialization + * * @param mappingContext must not be {@literal null} * @param objectMapper must not be {@literal null} */ public MappingCosmosConverter( MappingContext, CosmosPersistentProperty> mappingContext, - @Qualifier(Constants.OBJECTMAPPER_BEAN_NAME) ObjectMapper objectMapper) { + @Qualifier(Constants.OBJECT_MAPPER_BEAN_NAME) ObjectMapper objectMapper) { this.mappingContext = mappingContext; this.conversionService = new GenericConversionService(); this.objectMapper = objectMapper == null ? ObjectMapperFactory.getObjectMapper() @@ -59,54 +58,48 @@ public MappingCosmosConverter( } @Override - public R read(Class type, CosmosItemProperties cosmosItemProperties) { - if (cosmosItemProperties == null) { - return null; - } + public R read(Class type, JsonNode jsonNode) { final CosmosPersistentEntity entity = mappingContext.getPersistentEntity(type); Assert.notNull(entity, "Entity is null."); - return readInternal(entity, type, cosmosItemProperties); + return readInternal(entity, type, jsonNode); } - private R readInternal(final CosmosPersistentEntity entity, Class type, - final CosmosItemProperties cosmosItemProperties) { + @Override + public void write(Object source, JsonNode sink) { + throw new UnsupportedOperationException("The feature is not implemented yet"); + } + private R readInternal(final CosmosPersistentEntity entity, Class type, + final JsonNode jsonNode) { + final ObjectNode objectNode = jsonNode.deepCopy(); try { final CosmosPersistentProperty idProperty = entity.getIdProperty(); - final Object idValue = cosmosItemProperties.id(); - final JSONObject jsonObject = new JSONObject(cosmosItemProperties.toJson()); - + final JsonNode idValue = jsonNode.get("id"); if (idProperty != null) { // Replace the key id to the actual id field name in domain - jsonObject.remove(Constants.ID_PROPERTY_NAME); - jsonObject.put(idProperty.getName(), idValue); + objectNode.remove(Constants.ID_PROPERTY_NAME); + objectNode.set(idProperty.getName(), idValue); } - - return objectMapper.readValue(jsonObject.toString(), type); - } catch (IOException e) { + return objectMapper.treeToValue(objectNode, type); + } catch (JsonProcessingException e) { throw new IllegalStateException("Failed to read the source document " - + cosmosItemProperties.toJson() + + objectNode.toPrettyString() + " to target type " + type, e); } } - @Override - @Deprecated - public void write(Object sourceEntity, CosmosItemProperties document) { - throw new UnsupportedOperationException("The feature is not implemented yet"); - } - /** * To write source entity as a cosmos item + * * @param sourceEntity must not be {@literal null} * @return CosmosItemProperties * @throws MappingException no mapping metadata for entity type - * @throws CosmosDBAccessException fail to map document value + * @throws CosmosAccessException fail to map document value */ - public CosmosItemProperties writeCosmosItemProperties(Object sourceEntity) { + public JsonNode writeJsonNode(Object sourceEntity) { if (sourceEntity == null) { return null; } @@ -121,26 +114,26 @@ public CosmosItemProperties writeCosmosItemProperties(Object sourceEntity) { final ConvertingPropertyAccessor accessor = getPropertyAccessor(sourceEntity); final CosmosPersistentProperty idProperty = persistentEntity.getIdProperty(); - final CosmosItemProperties cosmosItemProperties; + final ObjectNode cosmosObjectNode; try { - cosmosItemProperties = - new CosmosItemProperties(objectMapper.writeValueAsString(sourceEntity)); + cosmosObjectNode = (ObjectNode) objectMapper.readTree(objectMapper.writeValueAsString(sourceEntity)); } catch (JsonProcessingException e) { - throw new CosmosDBAccessException("Failed to map document value.", e); + throw new CosmosAccessException("Failed to map document value.", e); } if (idProperty != null) { final Object value = accessor.getProperty(idProperty); final String id = value == null ? null : value.toString(); - cosmosItemProperties.id(id); + cosmosObjectNode.put("id", id); } - return cosmosItemProperties; + return cosmosObjectNode; } /** * To get application context + * * @return ApplicationContext */ public ApplicationContext getApplicationContext() { @@ -159,6 +152,7 @@ public ConversionService getConversionService() { /** * To get mapping context + * * @return MappingContext */ public MappingContext, CosmosPersistentProperty> getMappingContext() { @@ -171,7 +165,8 @@ private ConvertingPropertyAccessor getPropertyAccessor(Object entity) { mappingContext.getPersistentEntity(entity.getClass()); Assert.notNull(entityInformation, "EntityInformation should not be null."); - final PersistentPropertyAccessor accessor = entityInformation.getPropertyAccessor(entity); + final PersistentPropertyAccessor accessor = + entityInformation.getPropertyAccessor(entity); return new ConvertingPropertyAccessor<>(accessor, conversionService); } @@ -186,13 +181,14 @@ public static Object toCosmosDbValue(Object fromPropertyValue) { return null; } - // com.microsoft.azure.data.cosmos.JsonSerializable#set(String, T) cannot set values for Date and Enum correctly + // com.microsoft.azure.data.cosmos.JsonSerializable#set(String, T) cannot set values for + // Date and Enum correctly if (fromPropertyValue instanceof Date) { fromPropertyValue = ((Date) fromPropertyValue).getTime(); } else if (fromPropertyValue instanceof ZonedDateTime) { fromPropertyValue = ((ZonedDateTime) fromPropertyValue) - .format(DateTimeFormatter.ofPattern(ISO_8601_COMPATIBLE_DATE_PATTERN)); + .format(DateTimeFormatter.ofPattern(ISO_8601_COMPATIBLE_DATE_PATTERN)); } else if (fromPropertyValue instanceof Enum) { fromPropertyValue = fromPropertyValue.toString(); } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java index 680ec4045ac5..bb20f8a3ed59 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java @@ -2,14 +2,15 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.generator; -import com.azure.data.cosmos.SqlParameterList; -import com.azure.data.cosmos.SqlQuerySpec; +import com.azure.cosmos.models.SqlParameter; +import com.azure.cosmos.models.SqlQuerySpec; import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; import com.azure.spring.data.cosmos.exception.IllegalQueryException; import org.javatuples.Pair; import org.springframework.data.domain.Sort; +import org.springframework.data.repository.query.parser.Part; import org.springframework.lang.NonNull; import org.springframework.util.Assert; import org.springframework.util.StringUtils; @@ -53,13 +54,50 @@ private String generateBinaryQuery(@NonNull Criteria criteria, @NonNull List> parameters) { Assert.isTrue(criteria.getSubjectValues().size() == 1, "Criteria should have only one subject value"); if (!(criteria.getSubjectValues().get(0) instanceof Collection)) { throw new IllegalQueryException("IN keyword requires Collection type in parameters"); } - final List inRangeValues = new ArrayList<>(); + final Collection values = (Collection) criteria.getSubjectValues().get(0); - values.forEach(o -> { - if (o instanceof Integer || o instanceof Long) { - inRangeValues.add(String.format("%d", o)); - } else if (o instanceof String) { - inRangeValues.add(String.format("'%s'", (String) o)); - } else if (o instanceof Boolean) { - inRangeValues.add(String.format("%b", (Boolean) o)); + final List paras = new ArrayList<>(); + for (Object o : values) { + if (o instanceof String || o instanceof Integer || o instanceof Long || o instanceof Boolean) { + String key = "p" + parameters.size(); + paras.add("@" + key); + parameters.add(Pair.with(key, o)); } else { throw new IllegalQueryException("IN keyword Range only support Number and String type."); } - }); + } - final String inRange = String.join(",", inRangeValues); - return String.format("r.%s %s (%s)", criteria.getSubject(), criteria.getType().getSqlKeyword(), inRange); + return String.format("r.%s %s (%s)", criteria.getSubject(), criteria.getType().getSqlKeyword(), + String.join(",", paras)); } private String generateQueryBody(@NonNull Criteria criteria, @NonNull List> parameters) { @@ -121,7 +158,7 @@ private String generateQueryBody(@NonNull Criteria criteria, @NonNull List subjects = sort.stream().map(this::getParameter).collect(Collectors.toList()); return queryTail - + " " - + String.join(",", subjects); + + " " + + String.join(",", subjects); } @NonNull @@ -208,19 +244,15 @@ private String generateQueryTail(@NonNull DocumentQuery query) { protected SqlQuerySpec generateCosmosQuery(@NonNull DocumentQuery query, - @NonNull String queryHead) { + @NonNull String queryHead) { final Pair>> queryBody = generateQueryBody(query); final String queryString = String.join(" ", queryHead, queryBody.getValue0(), generateQueryTail(query)); final List> parameters = queryBody.getValue1(); - final SqlParameterList sqlParameters = - new SqlParameterList(); - - sqlParameters.addAll( - parameters.stream() - .map(p -> new com.azure.data.cosmos.SqlParameter("@" - + p.getValue0(), toCosmosDbValue(p.getValue1()))) - .collect(Collectors.toList()) - ); + + List sqlParameters = parameters.stream() + .map(p -> new SqlParameter("@" + p.getValue0(), + toCosmosDbValue(p.getValue1()))) + .collect(Collectors.toList()); return new SqlQuerySpec(queryString, sqlParameters); } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/CountQueryGenerator.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/CountQueryGenerator.java index c8f0d25d928f..20f87b5fecf5 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/CountQueryGenerator.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/CountQueryGenerator.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.generator; -import com.azure.data.cosmos.SqlQuerySpec; +import com.azure.cosmos.models.SqlQuerySpec; import com.azure.spring.data.cosmos.core.query.DocumentQuery; /** diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/FindQuerySpecGenerator.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/FindQuerySpecGenerator.java index ff5e128bead1..fb0e53a75222 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/FindQuerySpecGenerator.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/FindQuerySpecGenerator.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.generator; -import com.azure.data.cosmos.SqlQuerySpec; +import com.azure.cosmos.models.SqlQuerySpec; import com.azure.spring.data.cosmos.core.query.DocumentQuery; /** diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/QuerySpecGenerator.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/QuerySpecGenerator.java index d460d2e266b3..22f92b367d10 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/QuerySpecGenerator.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/QuerySpecGenerator.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.generator; -import com.azure.data.cosmos.SqlQuerySpec; +import com.azure.cosmos.models.SqlQuerySpec; import com.azure.spring.data.cosmos.core.query.DocumentQuery; /** diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/CosmosPersistentEntity.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/CosmosPersistentEntity.java index 189febbf8ce3..570a12ed79ee 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/CosmosPersistentEntity.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/CosmosPersistentEntity.java @@ -9,13 +9,6 @@ * Represents a cosmos persistent entity. */ public interface CosmosPersistentEntity extends PersistentEntity { - /** - * To get collection - * @return String - * @deprecated use {@link #getContainer()} instead - */ - @Deprecated - String getCollection(); /** * To get container of entity diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/Document.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/Document.java index 3a1740610df5..3df927d705a3 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/Document.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/Document.java @@ -5,11 +5,11 @@ import com.azure.spring.data.cosmos.Constants; import org.springframework.data.annotation.Persistent; +import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import java.lang.annotation.ElementType; /** * Annotation of cosmos document @@ -20,16 +20,16 @@ @Target({ElementType.TYPE}) public @interface Document { /** - * To set collection name + * To set container name * @return String */ - String collection() default Constants.DEFAULT_COLLECTION_NAME; + String container() default Constants.DEFAULT_CONTAINER_NAME; /** * To set request unit - * @return default as 4000 + * @return default as "" */ - String ru() default Constants.DEFAULT_REQUEST_UNIT; + String ru() default ""; /** * To set the ttl of container level @@ -38,8 +38,8 @@ int timeToLive() default Constants.DEFAULT_TIME_TO_LIVE; /** - * To set if create collection automatically + * To set if create container automatically * @return default as true */ - boolean autoCreateCollection() default Constants.DEFAULT_AUTO_CREATE_CONTAINER; + boolean autoCreateContainer() default Constants.DEFAULT_AUTO_CREATE_CONTAINER; } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/DocumentIndexingPolicy.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/DocumentIndexingPolicy.java index 1e794e2d14e6..12f9386c16d0 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/DocumentIndexingPolicy.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/DocumentIndexingPolicy.java @@ -2,15 +2,15 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.mapping; -import com.azure.data.cosmos.IndexingMode; +import com.azure.cosmos.models.IndexingMode; import com.azure.spring.data.cosmos.Constants; import org.springframework.data.annotation.Persistent; +import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import java.lang.annotation.ElementType; /** * Annotation for document indexing policy @@ -24,7 +24,7 @@ * To set automatic indexing * @return default as true */ - boolean automatic() default Constants.DEFAULT_INDEXINGPOLICY_AUTOMATIC; + boolean automatic() default Constants.DEFAULT_INDEXING_POLICY_AUTOMATIC; /** * To set indexing mode diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/PartitionKey.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/PartitionKey.java index 680b06ec2471..937d70201aa5 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/PartitionKey.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/PartitionKey.java @@ -2,11 +2,11 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.mapping; +import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import java.lang.annotation.ElementType; /** * Interface for type partition key diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CosmosPageRequest.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CosmosPageRequest.java index 5f42092af3c3..7ae26c79f335 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CosmosPageRequest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CosmosPageRequest.java @@ -2,14 +2,16 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.query; -import com.azure.data.cosmos.FeedResponse; +import com.azure.cosmos.models.FeedResponse; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; +import java.util.Objects; + /** * CosmosPageRequest representing page request during pagination query, field - * {@link FeedResponse#continuationToken()} response continuation token} is saved + * {@link FeedResponse#getContinuationToken()} response continuation token} is saved * to help query next page. *

    * The requestContinuation token should be saved after each request and reused in later queries. @@ -128,8 +130,7 @@ public boolean equals(Object obj) { final CosmosPageRequest that = (CosmosPageRequest) obj; - final boolean continuationTokenEquals = requestContinuation != null - ? requestContinuation.equals(that.requestContinuation) : that.requestContinuation == null; + final boolean continuationTokenEquals = Objects.equals(requestContinuation, that.requestContinuation); return continuationTokenEquals && super.equals(that); diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/Criteria.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/Criteria.java index 0028d67f5379..d95ad67a4130 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/Criteria.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/Criteria.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.query; +import org.springframework.data.repository.query.parser.Part; import org.springframework.lang.NonNull; import java.util.ArrayList; @@ -16,6 +17,15 @@ public final class Criteria { private List subjectValues; private final CriteriaType type; private final List subCriteria; + private Part.IgnoreCaseType ignoreCase; + + /** + * Ignore case flag + * @return ignore case flag + */ + public Part.IgnoreCaseType getIgnoreCase() { + return ignoreCase; + } /** * To get subject @@ -55,18 +65,20 @@ private Criteria(CriteriaType type) { } /** - * To get a criteria instance with subject + * To get a criteria instance with subject and ignore case * @param type CriteriaType * @param subject subject * @param values subject value + * @param ignoreCase ignore case flag * @return Criteria instance */ - public static Criteria getInstance(CriteriaType type, @NonNull String subject, @NonNull List values) { + public static Criteria getInstance(CriteriaType type, @NonNull String subject, + @NonNull List values, @NonNull Part.IgnoreCaseType ignoreCase) { final Criteria criteria = new Criteria(type); criteria.subject = subject; criteria.subjectValues = values; - + criteria.ignoreCase = ignoreCase; return criteria; } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CriteriaType.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CriteriaType.java index 153a76b94909..577be6de20c8 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CriteriaType.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CriteriaType.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.query; -import org.springframework.lang.NonNull; import org.springframework.data.repository.query.parser.Part; +import org.springframework.lang.NonNull; import java.beans.ConstructorProperties; import java.util.Collections; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosAccessException.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosAccessException.java new file mode 100644 index 000000000000..6f5b420d2cd7 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosAccessException.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.exception; + +import com.azure.cosmos.CosmosException; +import com.azure.spring.data.cosmos.repository.CosmosRepository; +import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; +import org.springframework.dao.DataAccessException; +import org.springframework.lang.Nullable; + +/** + * Public class extending DataAccessException, exposes innerException. + * Every API in {@link CosmosRepository} + * and {@link ReactiveCosmosRepository} + * should throw {@link CosmosAccessException}. + * innerException refers to the exception thrown by CosmosDB SDK. Callers of repository APIs can + * rely on innerException for any retriable logic, or for more details on the failure of + * the operation. + */ +public class CosmosAccessException extends DataAccessException { + + protected final CosmosException cosmosException; + + /** + * Construct a {@code CosmosDBAccessException} with the specified detail message. + * @param msg the detail message + */ + public CosmosAccessException(String msg) { + super(msg); + this.cosmosException = null; + } + + /** + * Construct a {@code CosmosDBAccessException} with the specified detail message. + * and nested exception. + * @param msg the detail message + * @param cause the nested Throwable + */ + public CosmosAccessException(@Nullable String msg, @Nullable Throwable cause) { + super(msg, cause); + if (cause instanceof CosmosException) { + this.cosmosException = (CosmosException) cause; + } else { + this.cosmosException = null; + } + } + + /** + * Construct a {@code CosmosDBAccessException} with the specified detail message + * and nested exception. + * + * @param msg the detail message + * @param cause the nested exception + */ + public CosmosAccessException(@Nullable String msg, @Nullable Exception cause) { + super(msg, cause); + this.cosmosException = cause instanceof CosmosException + ? (CosmosException) cause + : null; + } + + /** + * To get exception object for cosmos client + * @return CosmosException + */ + public CosmosException getCosmosException() { + return cosmosException; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosDBAccessException.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosDBAccessException.java deleted file mode 100644 index 0a0d29725f39..000000000000 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosDBAccessException.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.spring.data.cosmos.exception; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.spring.data.cosmos.repository.CosmosRepository; -import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; -import org.springframework.dao.DataAccessException; -import org.springframework.lang.Nullable; - -/** - * Public class extending DataAccessException, exposes innerException. - * Every API in {@link CosmosRepository} - * and {@link ReactiveCosmosRepository} - * should throw {@link CosmosDBAccessException}. - * innerException refers to the exception thrown by CosmosDB SDK. Callers of repository APIs can - * rely on innerException for any retriable logic, or for more details on the failure of - * the operation. - */ -public class CosmosDBAccessException extends DataAccessException { - - protected final CosmosClientException cosmosClientException; - - /** - * Construct a {@code CosmosDBAccessException} with the specified detail message. - * @param msg the detail message - */ - public CosmosDBAccessException(String msg) { - super(msg); - this.cosmosClientException = null; - } - - /** - * Construct a {@code CosmosDBAccessException} with the specified detail message. - * and nested exception. - * @param msg the detail message - * @param cause the nested Throwable - */ - public CosmosDBAccessException(@Nullable String msg, @Nullable Throwable cause) { - super(msg, cause); - if (cause instanceof CosmosClientException) { - this.cosmosClientException = (CosmosClientException) cause; - } else { - this.cosmosClientException = null; - } - } - - /** - * Construct a {@code CosmosDBAccessException} with the specified detail message - * and nested exception. - * - * @param msg the detail message - * @param cause the nested exception - */ - public CosmosDBAccessException(@Nullable String msg, @Nullable Exception cause) { - super(msg, cause); - this.cosmosClientException = cause instanceof CosmosClientException - ? (CosmosClientException) cause - : null; - } - - /** - * To get exception object for cosmos client - * @return CosmosClientException - */ - public CosmosClientException getCosmosClientException() { - return cosmosClientException; - } -} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosDBExceptionUtils.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosDBExceptionUtils.java deleted file mode 100644 index 84c1dfae68ca..000000000000 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosDBExceptionUtils.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.spring.data.cosmos.exception; - -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.internal.HttpConstants; -import org.springframework.util.StringUtils; -import reactor.core.Exceptions; -import reactor.core.publisher.Mono; - -/** - * To handle and throw a cosmosdb exception when access the database - */ -public class CosmosDBExceptionUtils { - - /** - * To throw a CosmosDBAccessException - * - * @param message the detail message - * @param throwable exception - * @param type class of Mono - * @return Mono instance - * @throws CosmosDBAccessException for operations on cosmosdb - */ - public static Mono exceptionHandler(String message, Throwable throwable) { - if (StringUtils.isEmpty(message)) { - message = "Failed to access cosmosdb database"; - } - // Unwrap the exception in case if it is a reactive exception - final Throwable unwrappedThrowable = Exceptions.unwrap(throwable); - throw new CosmosDBAccessException(message, unwrappedThrowable); - } - - /** - * To find an exceptionHandler for a excetption and return empty Mono if the exception status code is not found - * - * @param message the detail message - * @param throwable exception - * @param type class of Mono - * @return Mono instance - */ - public static Mono findAPIExceptionHandler(String message, Throwable throwable) { - // Unwrap the exception in case if it is a reactive exception - final Throwable unwrappedThrowable = Exceptions.unwrap(throwable); - if (unwrappedThrowable instanceof CosmosClientException) { - final CosmosClientException cosmosClientException = (CosmosClientException) unwrappedThrowable; - if (cosmosClientException.statusCode() == HttpConstants.StatusCodes.NOTFOUND) { - return Mono.empty(); - } - } - return exceptionHandler(message, unwrappedThrowable); - } -} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtils.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtils.java new file mode 100644 index 000000000000..98ce049271ca --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtils.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.exception; + +import com.azure.cosmos.CosmosException; +import org.springframework.util.StringUtils; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; + +/** + * To handle and throw a cosmos db exception when access the database + */ +public class CosmosExceptionUtils { + + /** + * To throw a CosmosDBAccessException + * + * @param message the detail message + * @param throwable exception + * @param type class of Mono + * @return Mono instance + * @throws CosmosAccessException for operations on cosmos db + */ + public static Mono exceptionHandler(String message, Throwable throwable) { + if (StringUtils.isEmpty(message)) { + message = "Failed to access cosmos db database"; + } + // Unwrap the exception in case if it is a reactive exception + final Throwable unwrappedThrowable = Exceptions.unwrap(throwable); + throw new CosmosAccessException(message, unwrappedThrowable); + } + + /** + * To find an exceptionHandler for a exception and return empty Mono if the exception status code is not found + * + * @param message the detail message + * @param throwable exception + * @param type class of Mono + * @return Mono instance + */ + public static Mono findAPIExceptionHandler(String message, Throwable throwable) { + // Unwrap the exception in case if it is a reactive exception + final Throwable unwrappedThrowable = Exceptions.unwrap(throwable); + if (unwrappedThrowable instanceof CosmosException) { + final CosmosException cosmosClientException = (CosmosException) unwrappedThrowable; + if (cosmosClientException.getStatusCode() == 404) { + return Mono.empty(); + } + } + return exceptionHandler(message, unwrappedThrowable); + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/DatabaseCreationException.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/DatabaseCreationException.java index 0e3968dc4770..6b42de838600 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/DatabaseCreationException.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/DatabaseCreationException.java @@ -6,7 +6,7 @@ import org.springframework.lang.Nullable; /** - * General exception for illegal creation of cosmosdb + * General exception for illegal creation of cosmos db */ public class DatabaseCreationException extends DataAccessException { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalCollectionException.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalCollectionException.java index 0344ff842f50..991338998643 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalCollectionException.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalCollectionException.java @@ -6,7 +6,7 @@ import org.springframework.lang.Nullable; /** - * General exception for illegal collection of cosmosdb + * General exception for illegal collection of cosmos db */ public class IllegalCollectionException extends DataAccessException { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalQueryException.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalQueryException.java index 59c95cb9c5af..e1027f879cc3 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalQueryException.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalQueryException.java @@ -6,7 +6,7 @@ import org.springframework.lang.Nullable; /** - * General exception for illegal query of cosmosdb + * General exception for illegal query of cosmos db */ public class IllegalQueryException extends DataAccessException { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/CosmosRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/CosmosRepository.java index 2591d8502cda..170604c72d5a 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/CosmosRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/CosmosRepository.java @@ -3,7 +3,7 @@ package com.azure.spring.data.cosmos.repository; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.PartitionKey; import org.springframework.data.repository.NoRepositoryBean; import org.springframework.data.repository.PagingAndSortingRepository; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/ReactiveCosmosRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/ReactiveCosmosRepository.java index 4b35604e0f3a..60a28bec9397 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/ReactiveCosmosRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/ReactiveCosmosRepository.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.PartitionKey; import org.springframework.data.repository.NoRepositoryBean; import org.springframework.data.repository.reactive.ReactiveSortingRepository; import reactor.core.publisher.Flux; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtension.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtension.java index 20466b923177..732dea8fcdbf 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtension.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtension.java @@ -3,14 +3,13 @@ package com.azure.spring.data.cosmos.repository.config; -import com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactoryBean; import com.azure.spring.data.cosmos.Constants; -import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; import com.azure.spring.data.cosmos.repository.CosmosRepository; -import org.springframework.beans.factory.support.AbstractBeanDefinition; +import com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactoryBean; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; -import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.core.annotation.AnnotationAttributes; +import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; import org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport; import org.springframework.data.repository.config.RepositoryConfigurationSource; import org.springframework.data.repository.core.RepositoryMetadata; @@ -27,12 +26,12 @@ public class CosmosRepositoryConfigurationExtension extends RepositoryConfigurat @Override public String getModuleName() { - return Constants.COSMOSDB_MODULE_NAME; + return Constants.COSMOS_MODULE_NAME; } @Override public String getModulePrefix() { - return Constants.COSMOSDB_MODULE_PREFIX; + return Constants.COSMOS_MODULE_PREFIX; } /** @@ -57,19 +56,12 @@ protected Collection> getIdentifyingAnnotations() { @Override public void registerBeansForRoot(BeanDefinitionRegistry registry, RepositoryConfigurationSource config) { super.registerBeansForRoot(registry, config); - - if (!registry.containsBeanDefinition(Constants.COSMOS_MAPPING_CONTEXT)) { - final RootBeanDefinition definition = new RootBeanDefinition(CosmosMappingContext.class); - definition.setRole(AbstractBeanDefinition.ROLE_INFRASTRUCTURE); - definition.setSource(config.getSource()); - - registry.registerBeanDefinition(Constants.COSMOS_MAPPING_CONTEXT, definition); - } } @Override - public void postProcess(BeanDefinitionBuilder builder, RepositoryConfigurationSource source) { - super.postProcess(builder, source); + public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource source) { + final AnnotationAttributes attributes = source.getAttributes(); + builder.addPropertyReference("cosmosOperations", attributes.getString("cosmosTemplateRef")); } // Overriding this to provide reactive repository support. diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/EnableCosmosRepositories.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/EnableCosmosRepositories.java index 5ac564c4aac2..c399f5c1fef9 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/EnableCosmosRepositories.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/EnableCosmosRepositories.java @@ -3,8 +3,9 @@ package com.azure.spring.data.cosmos.repository.config; -import com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactoryBean; import com.azure.spring.data.cosmos.Constants; +import com.azure.spring.data.cosmos.core.CosmosTemplate; +import com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactoryBean; import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.Import; import org.springframework.data.repository.config.DefaultRepositoryBaseClass; @@ -28,7 +29,7 @@ public @interface EnableCosmosRepositories { /** - * Toset repo value + * To set repo value * @return default as {} */ String[] value() default {}; @@ -92,5 +93,12 @@ * @return default value is false */ boolean considerNestedRepositories() default false; + + /** + * Configures the name of the {@link CosmosTemplate} bean to be used with the repositories detected. + * + * @return {@literal cosmosTemplate} by default. + */ + String cosmosTemplateRef() default "cosmosTemplate"; } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/EnableReactiveCosmosRepositories.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/EnableReactiveCosmosRepositories.java index c1c9d5aae91b..7ab04879b6e5 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/EnableReactiveCosmosRepositories.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/EnableReactiveCosmosRepositories.java @@ -3,8 +3,9 @@ package com.azure.spring.data.cosmos.repository.config; -import com.azure.spring.data.cosmos.repository.support.ReactiveCosmosRepositoryFactoryBean; import com.azure.spring.data.cosmos.Constants; +import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; +import com.azure.spring.data.cosmos.repository.support.ReactiveCosmosRepositoryFactoryBean; import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.Import; import org.springframework.data.repository.config.DefaultRepositoryBaseClass; @@ -28,7 +29,7 @@ public @interface EnableReactiveCosmosRepositories { /** - * Toset repo value + * To set repo value * @return default as {} */ String[] value() default {}; @@ -92,5 +93,12 @@ * @return default value is false */ boolean considerNestedRepositories() default false; + + /** + * Configures the name of the {@link ReactiveCosmosTemplate} bean to be used with the repositories detected. + * + * @return {@literal reactiveCosmosTemplate} by default. + */ + String reactiveCosmosTemplateRef() default "reactiveCosmosTemplate"; } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtension.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtension.java index c195bc1339f9..dfc7327fdcaf 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtension.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtension.java @@ -3,14 +3,13 @@ package com.azure.spring.data.cosmos.repository.config; -import com.azure.spring.data.cosmos.repository.support.ReactiveCosmosRepositoryFactoryBean; import com.azure.spring.data.cosmos.Constants; -import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; -import org.springframework.beans.factory.support.AbstractBeanDefinition; +import com.azure.spring.data.cosmos.repository.support.ReactiveCosmosRepositoryFactoryBean; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; -import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.core.annotation.AnnotationAttributes; +import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; import org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport; import org.springframework.data.repository.config.RepositoryConfigurationSource; import org.springframework.data.repository.core.RepositoryMetadata; @@ -27,12 +26,12 @@ public class ReactiveCosmosRepositoryConfigurationExtension extends RepositoryCo @Override public String getModuleName() { - return Constants.COSMOSDB_MODULE_NAME; + return Constants.COSMOS_MODULE_NAME; } @Override public String getModulePrefix() { - return Constants.COSMOSDB_MODULE_PREFIX; + return Constants.COSMOS_MODULE_PREFIX; } /** @@ -57,19 +56,12 @@ protected Collection> getIdentifyingAnnotations() { @Override public void registerBeansForRoot(BeanDefinitionRegistry registry, RepositoryConfigurationSource config) { super.registerBeansForRoot(registry, config); - - if (!registry.containsBeanDefinition(Constants.COSMOS_MAPPING_CONTEXT)) { - final RootBeanDefinition definition = new RootBeanDefinition(CosmosMappingContext.class); - definition.setRole(AbstractBeanDefinition.ROLE_INFRASTRUCTURE); - definition.setSource(config.getSource()); - - registry.registerBeanDefinition(Constants.COSMOS_MAPPING_CONTEXT, definition); - } } @Override - public void postProcess(BeanDefinitionBuilder builder, RepositoryConfigurationSource source) { - super.postProcess(builder, source); + public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource source) { + final AnnotationAttributes attributes = source.getAttributes(); + builder.addPropertyReference("reactiveCosmosOperations", attributes.getString("reactiveCosmosTemplateRef")); } // Overriding this to provide reactive repository support. diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQuery.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQuery.java index 36090a3653f4..cde75935161a 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQuery.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQuery.java @@ -6,6 +6,7 @@ import com.azure.spring.data.cosmos.core.query.DocumentQuery; import org.springframework.data.repository.query.RepositoryQuery; import org.springframework.data.repository.query.ResultProcessor; +import org.springframework.data.repository.query.ReturnedType; /** * Abstract class for cosmos query. @@ -39,20 +40,30 @@ public Object execute(Object[] parameters) { final ResultProcessor processor = method.getResultProcessor().withDynamicProjection(accessor); final String container = ((CosmosEntityMetadata) method.getEntityInformation()).getContainerName(); - final CosmosQueryExecution execution = getExecution(accessor); + final CosmosQueryExecution execution = getExecution(accessor, processor.getReturnedType()); + return execution.execute(query, processor.getReturnedType().getDomainType(), container); } - private CosmosQueryExecution getExecution(CosmosParameterAccessor accessor) { + /** + * Determines the appropriate execution path for a query + * + * @param returnedType The return type of the method + * @param accessor Object for accessing method parameters + * @return the execution type needed to handle the query + */ + protected CosmosQueryExecution getExecution(CosmosParameterAccessor accessor, ReturnedType returnedType) { if (isDeleteQuery()) { return new CosmosQueryExecution.DeleteExecution(operations); - } else if (method.isPageQuery()) { + } else if (isPageQuery()) { return new CosmosQueryExecution.PagedExecution(operations, accessor.getPageable()); } else if (isExistsQuery()) { return new CosmosQueryExecution.ExistsExecution(operations); - } else { + } else if (isCollectionQuery()) { return new CosmosQueryExecution.MultiEntityExecution(operations); + } else { + return new CosmosQueryExecution.SingleEntityExecution(operations, returnedType); } } @@ -71,4 +82,12 @@ public CosmosQueryMethod getQueryMethod() { protected abstract boolean isExistsQuery(); + protected boolean isPageQuery() { + return method.isPageQuery(); + } + + protected boolean isCollectionQuery() { + return method.isCollectionQuery(); + } + } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQuery.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQuery.java index 5d98980e2357..aaf2018d29bc 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQuery.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQuery.java @@ -6,6 +6,8 @@ import com.azure.spring.data.cosmos.core.query.DocumentQuery; import org.springframework.data.repository.query.RepositoryQuery; import org.springframework.data.repository.query.ResultProcessor; +import org.springframework.data.repository.query.ReturnedType; +import reactor.core.publisher.Mono; /** * Abstract class for reactive cosmos query. @@ -43,19 +45,27 @@ public Object execute(Object[] parameters) { final String containerName = ((ReactiveCosmosEntityMetadata) method.getEntityInformation()).getContainerName(); - final ReactiveCosmosQueryExecution execution = getExecution(accessor); + final ReactiveCosmosQueryExecution execution = getExecution(processor.getReturnedType()); return execution.execute(query, processor.getReturnedType().getDomainType(), containerName); } - - private ReactiveCosmosQueryExecution getExecution(ReactiveCosmosParameterAccessor accessor) { + /** + * Determines the appropriate execution path for a reactive query + * + * @throws IllegalArgumentException if execution requires paging + * @param returnedType The return type of the method + * @return the execution type needed to handle the query + */ + protected ReactiveCosmosQueryExecution getExecution(ReturnedType returnedType) { if (isDeleteQuery()) { return new ReactiveCosmosQueryExecution.DeleteExecution(operations); - } else if (method.isPageQuery()) { + } else if (isPageQuery()) { throw new IllegalArgumentException("Paged Query is not supported by reactive cosmos " + "db"); } else if (isExistsQuery()) { return new ReactiveCosmosQueryExecution.ExistsExecution(operations); + } else if (isReactiveSingleResultQuery()) { + return new ReactiveCosmosQueryExecution.SingleEntityExecution(operations, returnedType); } else { return new ReactiveCosmosQueryExecution.MultiEntityExecution(operations); } @@ -76,4 +86,12 @@ public ReactiveCosmosQueryMethod getQueryMethod() { protected abstract boolean isExistsQuery(); + protected boolean isPageQuery() { + return method.isPageQuery(); + } + + private boolean isReactiveSingleResultQuery() { + return method.getReactiveWrapper() != null && method.getReactiveWrapper().equals(Mono.class); + } + } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosEntityMetadata.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosEntityMetadata.java index db59937c5738..204c69d55b3a 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosEntityMetadata.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosEntityMetadata.java @@ -9,14 +9,6 @@ */ public interface CosmosEntityMetadata extends EntityMetadata { - /** - * Get collection name from the given entity - * @return String - * @deprecated use {@link #getContainerName()} instead - */ - @Deprecated - String getCollectionName(); - /** * Get container name from the given entity * @return String diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryCreator.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryCreator.java index ceafd6096c32..72ea2667d7f6 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryCreator.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryCreator.java @@ -2,12 +2,12 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.query; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.Constants; import com.azure.spring.data.cosmos.core.mapping.CosmosPersistentProperty; import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.springframework.data.domain.Sort; import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.repository.query.parser.AbstractQueryCreator; @@ -20,7 +20,7 @@ import java.util.Iterator; import java.util.List; /** - * TODO: String based query, based on how cosmosdb provides. + * TODO: String based query, based on how cosmosDB provides. * StringCosmosQuery class, * How to bind values to the query. if CosmosDb already has binding capability, if not we would have to do it here in * some creative way.query creator are associated with part tree queries, @@ -74,7 +74,7 @@ protected Criteria create(Part part, Iterator parameters) { values.add(parameters.next()); } - return Criteria.getInstance(CriteriaType.toCriteriaType(type), subject, values); + return Criteria.getInstance(CriteriaType.toCriteriaType(type), subject, values, part.shouldIgnoreCase()); } @Override diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryExecution.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryExecution.java index 0306e8c2e4c3..671a5d2fb4d1 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryExecution.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryExecution.java @@ -5,7 +5,12 @@ import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; import com.azure.spring.data.cosmos.core.query.DocumentQuery; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; import org.springframework.data.domain.Pageable; +import org.springframework.data.repository.query.ReturnedType; + +import java.util.List; +import java.util.Optional; /** * Interface to execute cosmos query operations @@ -40,7 +45,7 @@ public Object execute(DocumentQuery query, Class type, String container) { } /** - * Find operation implementation to execute a find query + * Find operation implementation to execute a find query for multiple items */ final class MultiEntityExecution implements CosmosQueryExecution { @@ -56,6 +61,43 @@ public Object execute(DocumentQuery query, Class type, String container) { } } + /** + * Find operation implementation to execute a find query for a single item + */ + final class SingleEntityExecution implements CosmosQueryExecution { + + private final CosmosOperations operations; + private final ReturnedType returnedType; + + public SingleEntityExecution(CosmosOperations operations, ReturnedType returnedType) { + this.operations = operations; + this.returnedType = returnedType; + } + + @Override + public Object execute(DocumentQuery query, Class type, String collection) { + final List results = operations.find(query, type, collection); + final Object result; + if (results == null || results.isEmpty()) { + result = null; + } else if (results.size() == 1) { + result = results.get(0); + } else { + throw new CosmosAccessException("Too many results - return type " + + returnedType.getReturnedType() + + " is not of type Iterable but find returned " + + results.size() + + " results"); + } + + if (returnedType.getReturnedType() == Optional.class) { + return result == null ? Optional.empty() : Optional.of(result); + } else { + return result; + } + } + } + /** * exist operation implementation to execute a exists query */ diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/PartTreeCosmosQuery.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/PartTreeCosmosQuery.java index ad4d06a2c777..de43a7bbf557 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/PartTreeCosmosQuery.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/PartTreeCosmosQuery.java @@ -3,8 +3,8 @@ package com.azure.spring.data.cosmos.repository.query; import com.azure.spring.data.cosmos.core.CosmosOperations; -import com.azure.spring.data.cosmos.core.query.DocumentQuery; import com.azure.spring.data.cosmos.core.mapping.CosmosPersistentProperty; +import com.azure.spring.data.cosmos.core.query.DocumentQuery; import org.apache.commons.lang3.NotImplementedException; import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.repository.query.ResultProcessor; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/PartTreeReactiveCosmosQuery.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/PartTreeReactiveCosmosQuery.java index 0611a21b5cc7..71e29ed82583 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/PartTreeReactiveCosmosQuery.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/PartTreeReactiveCosmosQuery.java @@ -5,7 +5,6 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.core.mapping.CosmosPersistentProperty; import com.azure.spring.data.cosmos.core.query.DocumentQuery; -import org.apache.commons.lang3.NotImplementedException; import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.repository.query.ResultProcessor; import org.springframework.data.repository.query.parser.Part; @@ -41,7 +40,7 @@ protected DocumentQuery createQuery(ReactiveCosmosParameterAccessor accessor) { final DocumentQuery query = creator.createQuery(); if (tree.isLimiting()) { - throw new NotImplementedException("Limiting is not supported."); + throw new UnsupportedOperationException("Limiting is not supported."); } return query; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosEntityMetadata.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosEntityMetadata.java index d7adefad76fc..91e2505dd262 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosEntityMetadata.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosEntityMetadata.java @@ -9,14 +9,6 @@ */ public interface ReactiveCosmosEntityMetadata extends EntityMetadata { - /** - * Get collection name from the given entity - * @return String - * @deprecated use {@link #getContainerName()} instead - */ - @Deprecated - String getCollectionName(); - /** * Get container name from the given entity * @return String diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryCreator.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryCreator.java index 300651feefff..59ea8b6b0b92 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryCreator.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryCreator.java @@ -2,12 +2,12 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.query; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.Constants; import com.azure.spring.data.cosmos.core.mapping.CosmosPersistentProperty; import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.springframework.data.domain.Sort; import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.repository.query.parser.AbstractQueryCreator; @@ -72,7 +72,7 @@ protected Criteria create(Part part, Iterator parameters) { values.add(parameters.next()); } - return Criteria.getInstance(CriteriaType.toCriteriaType(type), subject, values); + return Criteria.getInstance(CriteriaType.toCriteriaType(type), subject, values, part.shouldIgnoreCase()); } @Override diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryExecution.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryExecution.java index ec1546046c3f..c4ea5db1a42c 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryExecution.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryExecution.java @@ -4,6 +4,8 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.core.query.DocumentQuery; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; +import org.springframework.data.repository.query.ReturnedType; /** * Interface to execute reactive cosmos query operations @@ -38,7 +40,7 @@ public Object execute(DocumentQuery query, Class type, String container) { } /** - * Find operation implementation to execute a find query + * Find operation implementation to execute a find query for multiple items */ final class MultiEntityExecution implements ReactiveCosmosQueryExecution { @@ -54,6 +56,34 @@ public Object execute(DocumentQuery query, Class type, String container) { } } + /** + * Find operation implementation to execute a find query for a single item + */ + final class SingleEntityExecution implements ReactiveCosmosQueryExecution { + + private final ReactiveCosmosOperations operations; + private final ReturnedType returnedType; + + public SingleEntityExecution(ReactiveCosmosOperations operations, ReturnedType returnedType) { + this.operations = operations; + this.returnedType = returnedType; + } + + @Override + public Object execute(DocumentQuery query, Class type, String container) { + return operations.find(query, type, container) + .buffer(2) + .map((vals) -> { + if (vals.size() > 1) { + throw new CosmosAccessException("Too many results - Expected Mono<" + + returnedType.getReturnedType() + + "> but query returned multiple results"); + } + return vals.iterator().next(); + }); + } + } + /** * Exist operation implementation to execute a exist query */ diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java index 9ef769b4c9ad..2102e988b795 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java @@ -7,6 +7,8 @@ import org.springframework.data.repository.core.EntityMetadata; import org.springframework.data.repository.core.RepositoryMetadata; import org.springframework.data.repository.query.QueryMethod; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; import java.lang.reflect.Method; @@ -16,6 +18,7 @@ public class ReactiveCosmosQueryMethod extends QueryMethod { private ReactiveCosmosEntityMetadata metadata; + private final Method method; /** * Creates a new {@link QueryMethod} from the given parameters. Looks up the correct query to use for following @@ -27,6 +30,7 @@ public class ReactiveCosmosQueryMethod extends QueryMethod { */ public ReactiveCosmosQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory) { super(method, metadata, factory); + this.method = method; } @Override @@ -39,4 +43,17 @@ public EntityMetadata getEntityInformation() { this.metadata = new SimpleReactiveCosmosEntityMetadata(domainType, entityInformation); return this.metadata; } + + /** + * Returns the reactive wrapper class type if it exists or null otherwise + * + * @return Reactive wrapper class (Flux or Mono) + */ + public Class getReactiveWrapper() { + return isReactiveWrapperClass(method.getReturnType()) ? method.getReturnType() : null; + } + + private static boolean isReactiveWrapperClass(Class clazz) { + return clazz.equals(Flux.class) || clazz.equals(Mono.class); + } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformation.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformation.java index 940e9e91b751..8243e6f3795a 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformation.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformation.java @@ -3,31 +3,29 @@ package com.azure.spring.data.cosmos.repository.support; -import com.azure.data.cosmos.ExcludedPath; -import com.azure.data.cosmos.IncludedPath; -import com.azure.data.cosmos.IndexingMode; -import com.azure.data.cosmos.IndexingPolicy; +import com.azure.cosmos.models.ExcludedPath; +import com.azure.cosmos.models.IncludedPath; +import com.azure.cosmos.models.IndexingMode; +import com.azure.cosmos.models.IndexingPolicy; import com.azure.spring.data.cosmos.Constants; import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; import org.apache.commons.lang3.reflect.FieldUtils; - -import org.json.JSONObject; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Version; import org.springframework.data.repository.core.support.AbstractEntityInformation; import org.springframework.lang.NonNull; import org.springframework.util.ReflectionUtils; -import static com.azure.spring.data.cosmos.common.ExpressionResolver.resolveExpression; - import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; +import static com.azure.spring.data.cosmos.common.ExpressionResolver.resolveExpression; + /** - * Class to describe cosmosdb entity + * Class to describe cosmosDb entity */ public class CosmosEntityInformation extends AbstractEntityInformation { @@ -39,7 +37,7 @@ public class CosmosEntityInformation extends AbstractEntityInformation getIdType() { return (Class) id.getType(); } - /** - * Get collection name - * - * @return collection name - * @deprecated Use {@link #getContainerName()} instead - */ - @Deprecated - public String getCollectionName() { - return this.containerName; - } - /** * Get container name * @@ -178,17 +165,6 @@ public String getPartitionKeyFieldValue(T entity) { return partitionKeyField == null ? null : (String) ReflectionUtils.getField(partitionKeyField, entity); } - /** - * Check if auto creating collection is allowed - * - * @return boolean - * @deprecated Use {@link #isAutoCreateContainer()} instead. - */ - @Deprecated - public boolean isAutoCreateCollection() { - return autoCreateContainer; - } - /** * Check if auto creating container is allowed * @@ -201,10 +177,10 @@ public boolean isAutoCreateContainer() { private IndexingPolicy getIndexingPolicy(Class domainType) { final IndexingPolicy policy = new IndexingPolicy(); - policy.automatic(this.getIndexingPolicyAutomatic(domainType)); - policy.indexingMode(this.getIndexingPolicyMode(domainType)); + policy.setAutomatic(this.getIndexingPolicyAutomatic(domainType)); + policy.setIndexingMode(this.getIndexingPolicyMode(domainType)); policy.setIncludedPaths(this.getIndexingPolicyIncludePaths(domainType)); - policy.excludedPaths(this.getIndexingPolicyExcludePaths(domainType)); + policy.setExcludedPaths(this.getIndexingPolicyExcludePaths(domainType)); return policy; } @@ -225,8 +201,10 @@ private Field getIdField(Class domainType) { throw new IllegalArgumentException("domain should contain @Id field or field named id"); } else if (idField.getType() != String.class && idField.getType() != Integer.class - && idField.getType() != int.class) { - throw new IllegalArgumentException("type of id field must be String or Integer"); + && idField.getType() != int.class + && idField.getType() != Long.class + && idField.getType() != long.class) { + throw new IllegalArgumentException("type of id field must be String, Integer or Long"); } return idField; @@ -238,9 +216,9 @@ private String getContainerName(Class domainType) { final Document annotation = domainType.getAnnotation(Document.class); if (annotation != null - && annotation.collection() != null - && !annotation.collection().isEmpty()) { - customContainerName = resolveExpression(annotation.collection()); + && annotation.container() != null + && !annotation.container().isEmpty()) { + customContainerName = resolveExpression(annotation.container()); } return customContainerName; @@ -266,7 +244,7 @@ private Field getPartitionKeyField(Class domainType) { } private Integer getRequestUnit(Class domainType) { - Integer ru = Integer.parseInt(Constants.DEFAULT_REQUEST_UNIT); + Integer ru = null; final Document annotation = domainType.getAnnotation(Document.class); if (annotation != null @@ -290,7 +268,7 @@ private Integer getTimeToLive(Class domainType) { private Boolean getIndexingPolicyAutomatic(Class domainType) { - Boolean isAutomatic = Boolean.valueOf(Constants.DEFAULT_INDEXINGPOLICY_AUTOMATIC); + Boolean isAutomatic = Boolean.valueOf(Constants.DEFAULT_INDEXING_POLICY_AUTOMATIC); final DocumentIndexingPolicy annotation = domainType.getAnnotation(DocumentIndexingPolicy.class); if (annotation != null) { @@ -301,7 +279,7 @@ private Boolean getIndexingPolicyAutomatic(Class domainType) { } private IndexingMode getIndexingPolicyMode(Class domainType) { - IndexingMode mode = Constants.DEFAULT_INDEXINGPOLICY_MODE; + IndexingMode mode = Constants.DEFAULT_INDEXING_POLICY_MODE; final DocumentIndexingPolicy annotation = domainType.getAnnotation(DocumentIndexingPolicy.class); if (annotation != null) { @@ -315,7 +293,7 @@ private List getIndexingPolicyIncludePaths(Class domainType) { final List pathArrayList = new ArrayList<>(); final DocumentIndexingPolicy annotation = domainType.getAnnotation(DocumentIndexingPolicy.class); - if (annotation == null || annotation.includePaths() == null || annotation.includePaths().length == 0) { + if (annotation == null || annotation.includePaths().length == 0) { return null; // Align the default value of IndexingPolicy } @@ -338,8 +316,7 @@ private List getIndexingPolicyExcludePaths(Class domainType) { final String[] rawPaths = annotation.excludePaths(); for (final String path : rawPaths) { - final JSONObject obj = new JSONObject(path); - pathArrayList.add(new ExcludedPath().path(obj.get("path").toString())); + pathArrayList.add(new ExcludedPath(path)); } return pathArrayList; @@ -357,7 +334,7 @@ private boolean getIsAutoCreateContainer(Class domainType) { boolean autoCreateContainer = Constants.DEFAULT_AUTO_CREATE_CONTAINER; if (annotation != null) { - autoCreateContainer = annotation.autoCreateCollection(); + autoCreateContainer = annotation.autoCreateContainer(); } return autoCreateContainer; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java index 924aa773ed49..ac495642ec7d 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java @@ -6,7 +6,6 @@ import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.repository.query.CosmosQueryMethod; import com.azure.spring.data.cosmos.repository.query.PartTreeCosmosQuery; -import org.springframework.context.ApplicationContext; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.repository.core.EntityInformation; import org.springframework.data.repository.core.NamedQueries; @@ -27,18 +26,15 @@ */ public class CosmosRepositoryFactory extends RepositoryFactorySupport { - private final ApplicationContext applicationContext; private final CosmosOperations cosmosOperations; /** * Initialization * - * @param cosmosOperations for cosmosdb operations - * @param applicationContext for the context + * @param cosmosOperations for cosmosDb operations */ - public CosmosRepositoryFactory(CosmosOperations cosmosOperations, ApplicationContext applicationContext) { + public CosmosRepositoryFactory(CosmosOperations cosmosOperations) { this.cosmosOperations = cosmosOperations; - this.applicationContext = applicationContext; } @Override @@ -49,7 +45,7 @@ protected Class getRepositoryBaseClass(RepositoryMetadata metadata) { @Override protected Object getTargetRepository(RepositoryInformation information) { final EntityInformation entityInformation = getEntityInformation(information.getDomainType()); - return getTargetRepositoryViaReflection(information, entityInformation, this.applicationContext); + return getTargetRepositoryViaReflection(information, entityInformation, this.cosmosOperations); } @Override diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBean.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBean.java index 93c62e6294e2..0692a3a2c1e8 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBean.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBean.java @@ -4,11 +4,7 @@ import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; -import org.springframework.beans.BeansException; import org.springframework.beans.factory.FactoryBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.repository.Repository; import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport; @@ -21,10 +17,8 @@ * configuration. */ public class CosmosRepositoryFactoryBean, S, ID extends Serializable> - extends RepositoryFactoryBeanSupport - implements ApplicationContextAware { + extends RepositoryFactoryBeanSupport { - private ApplicationContext applicationContext; private CosmosOperations operations; private boolean mappingContextConfigured = false; @@ -42,23 +36,17 @@ public CosmosRepositoryFactoryBean(Class repositoryInterface) { * * @param operations for cosmos operations */ - @Autowired public void setCosmosOperations(CosmosOperations operations) { this.operations = operations; } @Override protected final RepositoryFactorySupport createRepositoryFactory() { - return getFactoryInstance(applicationContext); + return getFactoryInstance(); } - protected RepositoryFactorySupport getFactoryInstance(ApplicationContext applicationContext) { - return new CosmosRepositoryFactory(operations, applicationContext); - } - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - this.applicationContext = applicationContext; + protected RepositoryFactorySupport getFactoryInstance() { + return new CosmosRepositoryFactory(operations); } @Override diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java index 6b13c5f98c00..a949964eb463 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java @@ -5,7 +5,6 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.repository.query.PartTreeReactiveCosmosQuery; import com.azure.spring.data.cosmos.repository.query.ReactiveCosmosQueryMethod; -import org.springframework.context.ApplicationContext; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.repository.core.EntityInformation; import org.springframework.data.repository.core.NamedQueries; @@ -26,18 +25,14 @@ */ public class ReactiveCosmosRepositoryFactory extends ReactiveRepositoryFactorySupport { - private final ApplicationContext applicationContext; private final ReactiveCosmosOperations cosmosOperations; /** * Initialization * - * @param cosmosOperations for cosmosdb operations - * @param applicationContext for the context + * @param cosmosOperations for cosmosDB operations */ - public ReactiveCosmosRepositoryFactory(ReactiveCosmosOperations cosmosOperations, - ApplicationContext applicationContext) { - this.applicationContext = applicationContext; + public ReactiveCosmosRepositoryFactory(ReactiveCosmosOperations cosmosOperations) { this.cosmosOperations = cosmosOperations; } @@ -50,8 +45,7 @@ public EntityInformation getEntityInformation(Class domainType protected Object getTargetRepository(RepositoryInformation information) { final EntityInformation entityInformation = getEntityInformation(information.getDomainType()); - return getTargetRepositoryViaReflection(information, entityInformation, - this.applicationContext); + return getTargetRepositoryViaReflection(information, entityInformation, this.cosmosOperations); } @Override diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactoryBean.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactoryBean.java index 20b191d066f2..4657a9077050 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactoryBean.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactoryBean.java @@ -4,11 +4,7 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; -import org.springframework.beans.BeansException; import org.springframework.beans.factory.FactoryBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.repository.Repository; import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport; @@ -22,10 +18,8 @@ */ public class ReactiveCosmosRepositoryFactoryBean, S, K extends Serializable> - extends RepositoryFactoryBeanSupport - implements ApplicationContextAware { + extends RepositoryFactoryBeanSupport { - private ApplicationContext applicationContext; private ReactiveCosmosOperations cosmosOperations; private boolean mappingContextConfigured = false; @@ -39,27 +33,21 @@ public ReactiveCosmosRepositoryFactoryBean(Class repositoryInterfac } /** - * Set reactive Cosmosdb operations + * Set reactive CosmosDB operations * * @param operations contains cosmos operations */ - @Autowired public void setReactiveCosmosOperations(ReactiveCosmosOperations operations) { this.cosmosOperations = operations; } @Override protected final RepositoryFactorySupport createRepositoryFactory() { - return getFactoryInstance(applicationContext); + return getFactoryInstance(); } - protected RepositoryFactorySupport getFactoryInstance(ApplicationContext applicationContext) { - return new ReactiveCosmosRepositoryFactory(cosmosOperations, applicationContext); - } - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - this.applicationContext = applicationContext; + protected RepositoryFactorySupport getFactoryInstance() { + return new ReactiveCosmosRepositoryFactory(cosmosOperations); } @Override diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleCosmosRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleCosmosRepository.java index ecf21da9d110..41043a602579 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleCosmosRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleCosmosRepository.java @@ -3,14 +3,13 @@ package com.azure.spring.data.cosmos.repository.support; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; import com.azure.spring.data.cosmos.repository.CosmosRepository; -import org.springframework.context.ApplicationContext; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; @@ -36,23 +35,7 @@ public class SimpleCosmosRepository implements Cosmo * Initialization * * @param metadata for cosmos entity information - * @param applicationContext to get bean of CosmosOperations class - */ - public SimpleCosmosRepository(CosmosEntityInformation metadata, - ApplicationContext applicationContext) { - this.operation = applicationContext.getBean(CosmosOperations.class); - this.information = metadata; - - if (this.information.isAutoCreateContainer()) { - createContainerIfNotExists(); - } - } - - /** - * Initialization - * - * @param metadata for cosmos entity information - * @param dbOperations for cosmosdb operation + * @param dbOperations for cosmosDB operation */ public SimpleCosmosRepository(CosmosEntityInformation metadata, CosmosOperations dbOperations) { @@ -82,17 +65,16 @@ public S save(S entity) { // save entity if (information.isNew(entity)) { return operation.insert(information.getContainerName(), - entity, - createKey(information.getPartitionKeyFieldValue(entity))); + entity, + createKey(information.getPartitionKeyFieldValue(entity))); } else { - return operation.upsertAndReturnEntity(information.getContainerName(), - entity, createKey(information.getPartitionKeyFieldValue(entity))); + return operation.upsertAndReturnEntity(information.getContainerName(), entity); } } private PartitionKey createKey(String partitionKeyValue) { if (StringUtils.isEmpty(partitionKeyValue)) { - return PartitionKey.None; + return PartitionKey.NONE; } return new PartitionKey(partitionKeyValue); @@ -152,11 +134,12 @@ public Optional findById(ID id) { Assert.notNull(id, "id must not be null"); if (id instanceof String - && !StringUtils.hasText((String) id)) { + && !StringUtils.hasText((String) id)) { return Optional.empty(); } - return Optional.ofNullable(operation.findById(information.getContainerName(), id, information.getJavaType())); + return Optional.ofNullable(operation.findById(information.getContainerName(), id, + information.getJavaType())); } @Override @@ -164,7 +147,7 @@ public Optional findById(ID id, PartitionKey partitionKey) { Assert.notNull(id, "id must not be null"); if (id instanceof String - && !StringUtils.hasText((String) id)) { + && !StringUtils.hasText((String) id)) { return Optional.empty(); } @@ -213,8 +196,8 @@ public void delete(T entity) { final String partitionKeyValue = information.getPartitionKeyFieldValue(entity); operation.deleteById(information.getContainerName(), - information.getId(entity), - partitionKeyValue == null ? null : new PartitionKey(partitionKeyValue)); + information.getId(entity), + partitionKeyValue == null ? null : new PartitionKey(partitionKeyValue)); } /** @@ -259,7 +242,8 @@ public boolean existsById(ID primaryKey) { @Override public Iterable findAll(@NonNull Sort sort) { Assert.notNull(sort, "sort of findAll should not be null"); - final DocumentQuery query = new DocumentQuery(Criteria.getInstance(CriteriaType.ALL)).with(sort); + final DocumentQuery query = + new DocumentQuery(Criteria.getInstance(CriteriaType.ALL)).with(sort); return operation.find(query, information.getJavaType(), information.getContainerName()); } @@ -275,7 +259,8 @@ public Iterable findAll(@NonNull Sort sort) { public Page findAll(Pageable pageable) { Assert.notNull(pageable, "pageable should not be null"); - return operation.findAll(pageable, information.getJavaType(), information.getContainerName()); + return operation.findAll(pageable, information.getJavaType(), + information.getContainerName()); } @Override diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleReactiveCosmosRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleReactiveCosmosRepository.java index 27bfe9652107..e48609d5f917 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleReactiveCosmosRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleReactiveCosmosRepository.java @@ -2,15 +2,14 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.support; -import com.azure.data.cosmos.CosmosContainerResponse; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.CosmosContainerResponse; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; import org.reactivestreams.Publisher; -import org.springframework.context.ApplicationContext; import org.springframework.data.domain.Sort; import org.springframework.lang.NonNull; import org.springframework.util.Assert; @@ -28,22 +27,6 @@ public class SimpleReactiveCosmosRepository implement private final CosmosEntityInformation entityInformation; private final ReactiveCosmosOperations cosmosOperations; - /** - * Initialization with metadata and applicationContext will create container if required - * - * @param metadata for entityInformation - * @param applicationContext for cosmosOperations - */ - public SimpleReactiveCosmosRepository(CosmosEntityInformation metadata, - ApplicationContext applicationContext) { - this.cosmosOperations = applicationContext.getBean(ReactiveCosmosOperations.class); - this.entityInformation = metadata; - - if (this.entityInformation.isAutoCreateContainer()) { - createContainerIfNotExists(); - } - } - /** * Initialization with metadata and reactiveCosmosOperations * @@ -90,8 +73,7 @@ public Mono save(S entity) { entity, createKey(entityInformation.getPartitionKeyFieldValue(entity))); } else { - return cosmosOperations.upsert(entityInformation.getContainerName(), - entity, createKey(entityInformation.getPartitionKeyFieldValue(entity))); + return cosmosOperations.upsert(entityInformation.getContainerName(), entity); } } @@ -228,8 +210,7 @@ public Mono deleteAll(Publisher entityStream) { @Override public Mono deleteAll() { - return cosmosOperations.deleteAll(entityInformation.getContainerName(), - entityInformation.getPartitionKeyFieldName()); + return cosmosOperations.deleteAll(entityInformation.getContainerName(), entityInformation.getJavaType()); } private PartitionKey createKey(String partitionKeyValue) { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/AppConfiguration.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/AppConfiguration.java new file mode 100644 index 000000000000..979e44fa3358 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/AppConfiguration.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.core.ResponseDiagnostics; +import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; +import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories; +import io.micrometer.core.lang.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; + +@Configuration +@EnableCosmosRepositories +public class AppConfiguration extends AbstractCosmosConfiguration { + + private static final Logger logger = LoggerFactory.getLogger(AppConfiguration.class); + + @Value("${azure.cosmos.uri}") + private String uri; + + @Value("${azure.cosmos.key}") + private String key; + + @Value("${azure.cosmos.secondaryKey}") + private String secondaryKey; + + @Value("${azure.cosmos.database}") + private String dbName; + + @Value("${azure.cosmos.queryMetricsEnabled}") + private boolean queryMetricsEnabled; + + private AzureKeyCredential azureKeyCredential; + + public CosmosConfig getConfig() { + this.azureKeyCredential = new AzureKeyCredential(key); + DirectConnectionConfig directConnectionConfig = new DirectConnectionConfig(); + GatewayConnectionConfig gatewayConnectionConfig = new GatewayConnectionConfig(); + CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder() + .endpoint(uri) + .credential(azureKeyCredential) + .directMode(directConnectionConfig, gatewayConnectionConfig); + return CosmosConfig.builder() + .database(dbName) + .enableQueryMetrics(queryMetricsEnabled) + .cosmosClientBuilder(cosmosClientBuilder) + .responseDiagnosticsProcessor(new ResponseDiagnosticsProcessorImplementation()) + .build(); + } + + public void switchToSecondaryKey() { + this.azureKeyCredential.update(secondaryKey); + } + + private static class ResponseDiagnosticsProcessorImplementation implements ResponseDiagnosticsProcessor { + + @Override + public void processResponseDiagnostics(@Nullable ResponseDiagnostics responseDiagnostics) { + logger.info("Response Diagnostics {}", responseDiagnostics); + } + } + +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/AppConfigurationCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/AppConfigurationCodeSnippet.java new file mode 100644 index 000000000000..985ea5c45175 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/AppConfigurationCodeSnippet.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.core.ResponseDiagnostics; +import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; +import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.lang.Nullable; + +@Configuration +@EnableCosmosRepositories +public class AppConfigurationCodeSnippet extends AbstractCosmosConfiguration { + + private static final Logger logger = LoggerFactory.getLogger(AppConfigurationCodeSnippet.class); + + // configuration code + @Value("${azure.cosmos.uri}") + private String uri; + + @Value("${azure.cosmos.key}") + private String key; + + @Value("${azure.cosmos.secondaryKey}") + private String secondaryKey; + + @Value("${azure.cosmos.database}") + private String dbName; + + @Value("${azure.cosmos.queryMetricsEnabled}") + private boolean queryMetricsEnabled; + + public CosmosConfig getConfig() { + DirectConnectionConfig directConnectionConfig = new DirectConnectionConfig(); + GatewayConnectionConfig gatewayConnectionConfig = new GatewayConnectionConfig(); + CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder() + .endpoint(uri) + .directMode(directConnectionConfig, gatewayConnectionConfig); + return CosmosConfig.builder() + .database(dbName) + .enableQueryMetrics(queryMetricsEnabled) + .cosmosClientBuilder(cosmosClientBuilder) + .responseDiagnosticsProcessor(new ResponseDiagnosticsProcessorImplementation()) + .build(); + } + + private static class ResponseDiagnosticsProcessorImplementation implements ResponseDiagnosticsProcessor { + + @Override + public void processResponseDiagnostics(@Nullable ResponseDiagnostics responseDiagnostics) { + logger.info("Response Diagnostics {}", responseDiagnostics); + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/CosmosProperties.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/CosmosProperties.java new file mode 100644 index 000000000000..b073a18479a4 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/CosmosProperties.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import org.springframework.boot.context.properties.ConfigurationProperties; + +@ConfigurationProperties(prefix = "azure.cosmos") +public class CosmosProperties { + + private String uri; + + private String key; + + private String secondaryKey; + + private String database; + + private boolean queryMetricsEnabled; + + public String getUri() { + return uri; + } + + public void setUri(String uri) { + this.uri = uri; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getSecondaryKey() { + return secondaryKey; + } + + public void setSecondaryKey(String secondaryKey) { + this.secondaryKey = secondaryKey; + } + + public String getDatabase() { + return database; + } + + public void setDatabase(String database) { + this.database = database; + } + + public boolean isQueryMetricsEnabled() { + return queryMetricsEnabled; + } + + public void setQueryMetricsEnabled(boolean enableQueryMetrics) { + this.queryMetricsEnabled = enableQueryMetrics; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/DocumentIndexingPolicyCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/DocumentIndexingPolicyCodeSnippet.java new file mode 100644 index 000000000000..0b28a7cad7fe --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/DocumentIndexingPolicyCodeSnippet.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import com.azure.cosmos.models.IndexingMode; +import com.azure.spring.data.cosmos.Constants; + +public @interface DocumentIndexingPolicyCodeSnippet { + + // Indicate if indexing policy use automatic or not + boolean automatic() default Constants.DEFAULT_INDEXING_POLICY_AUTOMATIC; + + // Indexing policy mode, option Consistent|Lazy|None. + IndexingMode mode() default IndexingMode.CONSISTENT; + + // Included paths for indexing + String[] includePaths() default {}; + + // Excluded paths for indexing + String[] excludePaths() default {}; +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/MyDocument.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/MyDocument.java new file mode 100644 index 000000000000..0251436588c2 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/MyDocument.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import com.azure.spring.data.cosmos.core.mapping.Document; +import org.springframework.data.annotation.Version; + +@Document(container = "myContainer") +public class MyDocument { + String id; + String data; + @Version + String _etag; +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/ObjectMapperConfigurationCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/ObjectMapperConfigurationCodeSnippet.java new file mode 100644 index 000000000000..37737913b7b8 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/ObjectMapperConfigurationCodeSnippet.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ +@Configuration +public class ObjectMapperConfigurationCodeSnippet { + + @Bean(name = "cosmosObjectMapper") + public ObjectMapper objectMapper() { + return new ObjectMapper(); // Do configuration to the ObjectMapper if required + } + +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/PageableRepositoryCodeSnippet.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/PageableRepositoryCodeSnippet.java new file mode 100644 index 000000000000..457d3bea66b9 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/PageableRepositoryCodeSnippet.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; +import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.test.context.ContextConfiguration; + +import java.util.List; + +@ContextConfiguration(classes = TestRepositoryConfig.class) +public class PageableRepositoryCodeSnippet { + + @Autowired + private PagingAndSortingRepository repository; + + private List findAllWithPageSize(int pageSize) { + + final CosmosPageRequest pageRequest = new CosmosPageRequest(0, pageSize, null); + Page page = repository.findAll(pageRequest); + List pageContent = page.getContent(); + while (page.hasNext()) { + Pageable nextPageable = page.nextPageable(); + page = repository.findAll(nextPageable); + pageContent = page.getContent(); + } + return pageContent; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/SampleApplication.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/SampleApplication.java new file mode 100644 index 000000000000..34f408063d3a --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/SampleApplication.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.ApplicationContext; + +@SpringBootApplication +public class SampleApplication implements CommandLineRunner { + + @Autowired + private UserRepository repository; + + @Autowired + private ApplicationContext applicationContext; + + public static void main(String[] args) { + SpringApplication.run(SampleApplication.class, args); + } + + public void run(String... var1) { + + final User testUser = new User("testId", "testFirstName", "testLastName"); + + repository.deleteAll(); + repository.save(testUser); + + // to find by Id, please specify partition key value if collection is partitioned + final User result = repository.findOne(testUser.getId(), testUser.getLastName()); + // if emailAddress is mapped to id, then + // final User result = respository.findOne(testUser.getEmailAddress(), testUser.getLastName()); + + // Switch to secondary key + UserRepositoryConfiguration bean = + applicationContext.getBean(UserRepositoryConfiguration.class); + bean.switchToSecondaryKey(); + + // Now repository will use secondary key + repository.save(testUser); + + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/User.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/User.java new file mode 100644 index 000000000000..946dfcb6c761 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/User.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import com.azure.spring.data.cosmos.core.mapping.Document; +import com.azure.spring.data.cosmos.core.mapping.PartitionKey; + +@Document(container = "myContainer", ru = "400") +public class User { + private String id; + private String firstName; + + + @PartitionKey + private String lastName; + + public User() { + // If you do not want to create a default constructor, + // use annotation @JsonCreator and @JsonProperty in the full args constructor + } + + public User(String id, String firstName, String lastName) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + } + + @Override + public String toString() { + return String.format("User: %s %s, %s", firstName, lastName, id); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserRepository.java new file mode 100644 index 000000000000..e89d1e2dac87 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserRepository.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +import com.azure.spring.data.cosmos.repository.CosmosRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + + +@Repository +public interface UserRepository extends CosmosRepository { + List findByFirstName(String firstName); + User findOne(String id, String lastName); +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserRepositoryConfiguration.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserRepositoryConfiguration.java new file mode 100644 index 000000000000..727758ef6888 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserRepositoryConfiguration.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ +import com.azure.core.credential.AzureKeyCredential; +import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.core.ResponseDiagnostics; +import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; +import com.azure.spring.data.cosmos.repository.config.EnableReactiveCosmosRepositories; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.lang.Nullable; + +@Configuration +@EnableConfigurationProperties(CosmosProperties.class) +@EnableReactiveCosmosRepositories +@PropertySource("classpath:application.properties") +public class UserRepositoryConfiguration extends AbstractCosmosConfiguration { + private static final Logger logger = LoggerFactory.getLogger(AppConfiguration.class); + + @Autowired + private CosmosProperties properties; + + private AzureKeyCredential azureKeyCredential; + + @Bean + public CosmosConfig cosmosConfig() { + this.azureKeyCredential = new AzureKeyCredential(properties.getKey()); + return CosmosConfig.builder() + .database(properties.getDatabase()) + .cosmosClientBuilder(new CosmosClientBuilder().credential(azureKeyCredential)) + .enableQueryMetrics(properties.isQueryMetricsEnabled()) + .responseDiagnosticsProcessor(new ResponseDiagnosticsProcessorImplementation()) + .build(); + } + + public void switchToSecondaryKey() { + this.azureKeyCredential.update(properties.getSecondaryKey()); + } + + public void switchToPrimaryKey() { + this.azureKeyCredential.update(properties.getKey()); + } + + public void switchKey(String key) { + this.azureKeyCredential.update(key); + } + + private static class ResponseDiagnosticsProcessorImplementation implements ResponseDiagnosticsProcessor { + + @Override + public void processResponseDiagnostics(@Nullable ResponseDiagnostics responseDiagnostics) { + logger.info("Response Diagnostics {}", responseDiagnostics); + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserSample.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserSample.java new file mode 100644 index 000000000000..3fcf775a27e8 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/UserSample.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +import com.azure.spring.data.cosmos.core.mapping.Document; +import org.springframework.data.annotation.Id; + +@Document(container = "myContainer") +public class UserSample { + @Id + private String emailAddress; + +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/DatabaseConfiguration.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/DatabaseConfiguration.java new file mode 100644 index 000000000000..258e6bd8ff9c --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/DatabaseConfiguration.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.multidatasource; + +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.CosmosProperties; +import com.azure.spring.data.cosmos.CosmosFactory; +import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; +import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; +import com.azure.spring.data.cosmos.repository.config.EnableReactiveCosmosRepositories; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ +@Configuration +@PropertySource("classpath:application.properties") +public class DatabaseConfiguration extends AbstractCosmosConfiguration { + + @Bean + @ConfigurationProperties(prefix = "azure.cosmos.primary") + public CosmosProperties primaryDataSourceConfiguration() { + return new CosmosProperties(); + } + + @Bean + @ConfigurationProperties(prefix = "azure.cosmos.secondary") + public CosmosProperties secondaryDataSourceConfiguration() { + return new CosmosProperties(); + } + + @EnableReactiveCosmosRepositories(basePackages = "com.azure.cosmos.multidatasource.primarydatasource") + public class PrimaryDataSourceConfiguration { + @Autowired + @Qualifier("primaryDataSourceConfiguration") + CosmosProperties properties; + @Bean + public CosmosConfig cosmosConfig() { + CosmosConfig cosmosConfig = CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .key(properties.getKey()).endpoint(properties.getUri())) + .database(properties.getDatabase()) + .enableQueryMetrics(properties.isQueryMetricsEnabled()) + .build(); + return cosmosConfig; + } + + } + + @EnableReactiveCosmosRepositories(basePackages = "com.azure.cosmos.multidatasource.secondarydatasource", reactiveCosmosTemplateRef = "secondaryReactiveCosmosTemplate") + public class SecondaryDataSourceConfiguration { + @Autowired + @Qualifier("secondaryDataSourceConfiguration") + CosmosProperties properties; + @Bean + public ReactiveCosmosTemplate secondaryReactiveCosmosTemplate(MappingCosmosConverter mappingCosmosConverter) { + CosmosConfig cosmosConfig = CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .key(properties.getKey()).endpoint(properties.getUri())) + .database(properties.getDatabase()) + .enableQueryMetrics(properties.isQueryMetricsEnabled()) + .build(); + + return new ReactiveCosmosTemplate(new CosmosFactory(cosmosConfig), mappingCosmosConverter, cosmosConfig.getDatabase()); + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/MultiDatasourceApplication.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/MultiDatasourceApplication.java new file mode 100644 index 000000000000..85e8d4ae484b --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/MultiDatasourceApplication.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.multidatasource; + +import com.azure.cosmos.multidatasource.primarydatasource.User; +import com.azure.cosmos.multidatasource.primarydatasource.UserRepository; +import com.azure.cosmos.multidatasource.secondarydatasource.Book; +import com.azure.cosmos.multidatasource.secondarydatasource.BookRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import java.util.List; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ +@SpringBootApplication +public class MultiDatasourceApplication implements CommandLineRunner { + + @Autowired + private UserRepository userRepository; + + @Autowired + private BookRepository bookRepository; + + + private final User user = new User("1024", "1024@geek.com", "1k", "Mars"); + private final Book book = new Book("9780792745488", "Zen and the Art of Motorcycle Maintenance", "Robert M. Pirsig"); + + + public static void main(String[] args) { + SpringApplication.run(MultiDatasourceApplication.class, args); + } + + @Override + public void run(String... args) { + final List users = this.userRepository.findByEmailOrName(this.user.getEmail(), this.user.getName()).collectList().block(); + users.forEach(System.out::println); + final Book book = this.bookRepository.findById("9780792745488").block(); + System.out.println(book); + } + + @PostConstruct + public void setup() { + this.userRepository.save(user).block(); + this.bookRepository.save(book).block(); + + } + + @PreDestroy + public void cleanup() { + this.userRepository.deleteAll().block(); + this.bookRepository.deleteAll().block(); + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/User.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/User.java new file mode 100644 index 000000000000..b75ac9a1546d --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/User.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.multidatasource.primarydatasource; + +import com.azure.spring.data.cosmos.core.mapping.Document; +import com.azure.spring.data.cosmos.core.mapping.PartitionKey; +import org.springframework.data.annotation.Id; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +@Document(container = "users-container", ru = "400") +public class User { + + @Id + private String id; + + private String email; + + @PartitionKey + private String name; + + private String address; + + public User(String id, String email, String name, String address) { + this.id = id; + this.email = email; + this.name = name; + this.address = address; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String toString() { + return String.format("%s: %s %s %s", this.id, this.email, this.name, this.address); + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/UserRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/UserRepository.java new file mode 100644 index 000000000000..5e64f41369d4 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/primarydatasource/UserRepository.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.multidatasource.primarydatasource; + +import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; +import reactor.core.publisher.Flux; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ +public interface UserRepository extends ReactiveCosmosRepository { + + Flux findByName(String firstName); + + + Flux findByEmailOrName(String email, String name); + +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/Book.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/Book.java new file mode 100644 index 000000000000..8f1db812033c --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/Book.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.multidatasource.secondarydatasource; + +import com.azure.spring.data.cosmos.core.mapping.Document; +import org.springframework.data.annotation.Id; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ + +@Document(container = "book-container", ru = "400") +public class Book { + @Id + private String ibsn; + + private String name; + + private String author; + + public Book(String ibsn, String name, String author) { + this.ibsn = ibsn; + this.name = name; + this.author = author; + } + + public String getIbsn() { + return ibsn; + } + + public void setIbsn(String ibsn) { + this.ibsn = ibsn; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + @Override + public String toString() { + return String.format("%s: %s %s", this.ibsn, this.name, this.author); + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/BookRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/BookRepository.java new file mode 100644 index 000000000000..80907ac19b83 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/cosmos/multidatasource/secondarydatasource/BookRepository.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.multidatasource.secondarydatasource; + +import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + */ +public interface BookRepository extends ReactiveCosmosRepository { +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosDbFactoryTestIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosDbFactoryTestIT.java deleted file mode 100644 index b1f853dbe403..000000000000 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosDbFactoryTestIT.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.spring.data.cosmos; - -import com.azure.spring.data.cosmos.common.TestConstants; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; -import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import static org.assertj.core.api.Assertions.assertThat; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = TestRepositoryConfig.class) -public class CosmosDbFactoryTestIT { - - @Value("${cosmosdb.uri:}") - private String cosmosDbUri; - - @Value("${cosmosdb.key:}") - private String cosmosDbKey; - - @Test(expected = IllegalArgumentException.class) - public void testEmptyKey() { - final CosmosDBConfig dbConfig = CosmosDBConfig.builder(TestConstants.COSMOSDB_FAKE_HOST, - "", TestConstants.DB_NAME).build(); - new CosmosDbFactory(dbConfig); - } - - @Test - public void testInvalidEndpoint() { - final CosmosDBConfig dbConfig = - CosmosDBConfig.builder(TestConstants.COSMOSDB_FAKE_HOST, TestConstants.COSMOSDB_FAKE_KEY, TestConstants.DB_NAME).build(); - final CosmosDbFactory factory = new CosmosDbFactory(dbConfig); - - assertThat(factory).isNotNull(); - } - - @Test - public void testConnectWithConnectionString() { - final CosmosDBConfig dbConfig = - CosmosDBConfig.builder(TestConstants.COSMOSDB_FAKE_CONNECTION_STRING, TestConstants.DB_NAME).build(); - final CosmosDbFactory factory = new CosmosDbFactory(dbConfig); - - assertThat(factory).isNotNull(); - } - - @Test(expected = CosmosDBAccessException.class) - public void testInvalidConnectionString() { - CosmosDBConfig.builder(TestConstants.COSMOSDB_INVALID_FAKE_CONNECTION_STRING, TestConstants.DB_NAME).build(); - } - - @Test - public void testConnectionPolicyUserAgentKept() { - final CosmosDBConfig dbConfig = - CosmosDBConfig.builder(cosmosDbUri, cosmosDbKey, TestConstants.DB_NAME).build(); - final CosmosDbFactory factory = new CosmosDbFactory(dbConfig); - factory.getCosmosClient(); - - final String uaSuffix = factory.getConfig().getConnectionPolicy().userAgentSuffix(); - assertThat(uaSuffix).contains("spring-data"); - } -} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java new file mode 100644 index 000000000000..0b33eb9bf9bf --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos; + +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.spring.data.cosmos.common.TestConstants; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.lang.reflect.Field; + +import static org.assertj.core.api.Assertions.assertThat; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfig.class) +public class CosmosFactoryTestIT { + + @Value("${cosmos.uri:}") + private String cosmosDbUri; + + @Value("${cosmos.key:}") + private String cosmosDbKey; + + @Test(expected = IllegalArgumentException.class) + public void testEmptyKey() { + final CosmosConfig cosmosConfig = CosmosConfig.builder() + .database(TestConstants.DB_NAME) + .cosmosClientBuilder(new CosmosClientBuilder() + .endpoint(TestConstants.COSMOSDB_FAKE_HOST) + .key("")) + .build(); + new CosmosFactory(cosmosConfig).getCosmosSyncClient(); + } + + @Test + public void testInvalidEndpoint() { + final CosmosConfig cosmosConfig = CosmosConfig.builder() + .database(TestConstants.DB_NAME) + .cosmosClientBuilder(new CosmosClientBuilder() + .endpoint(TestConstants.COSMOSDB_FAKE_HOST) + .key(TestConstants.COSMOSDB_FAKE_KEY)) + .build(); + final CosmosFactory factory = new CosmosFactory(cosmosConfig); + + assertThat(factory).isNotNull(); + } + + @Test + public void testConnectionPolicyUserAgentKept() throws IllegalAccessException { + final CosmosConfig cosmosConfig = CosmosConfig.builder() + .database(TestConstants.DB_NAME) + .cosmosClientBuilder(new CosmosClientBuilder() + .endpoint(cosmosDbUri) + .key(cosmosDbKey)) + .build(); + + new CosmosFactory(cosmosConfig).getCosmosAsyncClient(); + + final String uaSuffix = getUserAgentSuffixValue(cosmosConfig.getCosmosClientBuilder()); + assertThat(uaSuffix).contains("spring-data"); + } + + private String getUserAgentSuffixValue(CosmosClientBuilder cosmosClientBuilder) throws IllegalAccessException { + final Field userAgentSuffix = FieldUtils.getDeclaredField(CosmosClientBuilder.class, + "userAgentSuffix", true); + return (String) userAgentSuffix.get(cosmosClientBuilder); + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/UserAgentTestIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/UserAgentTestIT.java deleted file mode 100644 index ba64a333b303..000000000000 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/UserAgentTestIT.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.spring.data.cosmos; - -import com.azure.spring.data.cosmos.common.PropertyLoader; -import com.azure.spring.data.cosmos.common.TestConstants; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; -import org.assertj.core.api.Assertions; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mockito; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; -import org.springframework.context.annotation.PropertySource; - -@Ignore("Cannot use fake uri and key with CosmosDbFactory as it tries the connection on new creation." - + "At the same time, cannot use mockito with real values, because it won't prepare PropertyLoader class for mocking") -@RunWith(PowerMockRunner.class) -@PrepareForTest(PropertyLoader.class) -@PropertySource(value = {"classpath:application.properties"}) -public class UserAgentTestIT { - - private static final String TEST_VERSION = "1.0.0-FOR-TEST"; - - @Test - public void testUserAgentSuffixAppended() { - PowerMockito.mockStatic(PropertyLoader.class); - Mockito.doReturn(TEST_VERSION).when(PropertyLoader.getProjectVersion()); - final CosmosDBConfig dbConfig = CosmosDBConfig.builder(TestConstants.COSMOSDB_FAKE_HOST, - TestConstants.COSMOSDB_FAKE_KEY, TestConstants.DB_NAME).build(); - final CosmosDbFactory factory = new CosmosDbFactory(dbConfig); - factory.getCosmosClient(); - Assertions.assertThat(factory.getConfig().getConnectionPolicy().userAgentSuffix()).contains(TEST_VERSION); - } - -} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/DynamicContainer.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/DynamicContainer.java index 40eb9e50e07f..f7e486aa23b9 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/DynamicContainer.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/DynamicContainer.java @@ -4,7 +4,7 @@ package com.azure.spring.data.cosmos.common; public class DynamicContainer { - private String containerName; + private final String containerName; public DynamicContainer(String containerName) { this.containerName = containerName; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java index 652657597662..40bf96bfa513 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java @@ -12,11 +12,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -/** - * - * @author Domenico Sibilio - * - */ public class ExpressionResolverUnitTest { private static final String LITERAL_EXPRESSION = "literal expression"; private static final String SPEL_EXPRESSION = "#{@environment.getProperty('dynamic.collection.name')}"; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java index e29aeed50175..21000da50a2b 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java @@ -13,11 +13,6 @@ import static org.junit.Assert.assertEquals; -/** - * - * @author Domenico Sibilio - * - */ public class MemoizerUnitTest { private static final String KEY = "key_1"; private static final Map countMap = new HashMap<>(); diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ResponseDiagnosticsTestUtils.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ResponseDiagnosticsTestUtils.java index af5f731364b2..03d12c2048ee 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ResponseDiagnosticsTestUtils.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ResponseDiagnosticsTestUtils.java @@ -3,8 +3,7 @@ package com.azure.spring.data.cosmos.common; -import com.azure.data.cosmos.CosmosResponseDiagnostics; -import com.azure.data.cosmos.FeedResponseDiagnostics; +import com.azure.cosmos.CosmosDiagnostics; import com.azure.spring.data.cosmos.core.ResponseDiagnostics; import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; @@ -20,12 +19,8 @@ public ResponseDiagnosticsTestUtils() { }; } - public CosmosResponseDiagnostics getCosmosResponseDiagnostics() { - return diagnostics == null ? null : diagnostics.getCosmosResponseDiagnostics(); - } - - public FeedResponseDiagnostics getFeedResponseDiagnostics() { - return diagnostics == null ? null : diagnostics.getFeedResponseDiagnostics(); + public CosmosDiagnostics getCosmosDiagnostics() { + return diagnostics == null ? null : diagnostics.getCosmosDiagnostics(); } public ResponseDiagnostics.CosmosResponseStatistics getCosmosResponseStatistics() { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/TestConstants.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/TestConstants.java index 477e0a75fa64..026b42aaccbf 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/TestConstants.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/TestConstants.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.common; -import com.azure.data.cosmos.IndexingMode; +import com.azure.cosmos.models.IndexingMode; import com.azure.spring.data.cosmos.domain.Address; import java.util.Arrays; @@ -18,12 +18,10 @@ public final class TestConstants { public static final List
    ADDRESSES = Arrays.asList(ADDRESS_1, ADDRESS_2); public static final int DEFAULT_TIME_TO_LIVE = -1; - public static final String DEFAULT_COLLECTION_NAME = "Person"; - public static final int DEFAULT_REQUEST_UNIT = 4000; - public static final boolean DEFAULT_INDEXINGPOLICY_AUTOMATIC = true; - public static final IndexingMode DEFAULT_INDEXINGPOLICY_MODE = IndexingMode.CONSISTENT; - public static final String[] DEFAULT_EXCLUDEDPATHS = {}; - public static final String[] DEFAULT_INCLUDEDPATHS = { + public static final boolean DEFAULT_INDEXING_POLICY_AUTOMATIC = true; + public static final IndexingMode DEFAULT_INDEXING_POLICY_MODE = IndexingMode.CONSISTENT; + public static final String[] DEFAULT_EXCLUDED_PATHS = {}; + public static final String[] DEFAULT_INCLUDED_PATHS = { "{\"path\":\"/*\",\"indexes\":[" + "{\"kind\":\"Range\",\"dataType\":\"Number\",\"precision\":-1}," + "{\"kind\":\"Hash\",\"dataType\":\"String\",\"precision\":3}" @@ -31,52 +29,52 @@ public final class TestConstants { }; public static final String ROLE_COLLECTION_NAME = "RoleCollectionName"; - public static final int REQUEST_UNIT = 4000; public static final int TIME_TO_LIVE = 5; - public static final boolean INDEXINGPOLICY_AUTOMATIC = false; - public static final IndexingMode INDEXINGPOLICY_MODE = IndexingMode.LAZY; - public static final String INCLUDEDPATH_0 = "{\"path\":\"/*\",\"indexes\":[" + public static final boolean INDEXING_POLICY_AUTOMATIC = false; + public static final IndexingMode INDEXING_POLICY_MODE = IndexingMode.CONSISTENT; + public static final String INCLUDED_PATH_0 = "{\"path\":\"/*\",\"indexes\":[" + "{\"kind\":\"Range\",\"dataType\":\"Number\",\"precision\":2}," + "{\"kind\":\"Hash\",\"dataType\":\"String\",\"precision\":2}," + "{\"kind\":\"Spatial\",\"dataType\":\"Point\"}" + "]}"; - public static final String INCLUDEDPATH_1 = "{\"path\":\"/cache/*\",\"indexes\":[" + public static final String INCLUDED_PATH_1 = "{\"path\":\"/cache/*\",\"indexes\":[" + "{\"kind\":\"Range\",\"dataType\":\"Number\",\"precision\":3}," + "{\"kind\":\"Hash\",\"dataType\":\"String\",\"precision\":3}," + "{\"kind\":\"Spatial\",\"dataType\":\"LineString\"}" + "]}"; - public static final String INCLUDEDPATH_2 = "{\"path\":\"/entities/*\",\"indexes\":[" + public static final String INCLUDED_PATH_2 = "{\"path\":\"/entities/*\",\"indexes\":[" + "{\"kind\":\"Range\",\"dataType\":\"Number\",\"precision\":4}," + "{\"kind\":\"Hash\",\"dataType\":\"String\",\"precision\":4}," + "{\"kind\":\"Spatial\",\"dataType\":\"Polygon\"}" + "]}"; - public static final String[] INCLUDEDPATHS = { - INCLUDEDPATH_0, - INCLUDEDPATH_1, - INCLUDEDPATH_2, + public static final String[] INCLUDED_PATHS = { + INCLUDED_PATH_0, + INCLUDED_PATH_1, + INCLUDED_PATH_2, }; - public static final String EXCLUDEDPATH_0 = "{\"path\":\"/excluded/*\"}"; - public static final String EXCLUDEDPATH_1 = "{\"path\":\"/props/*\"}"; - public static final String[] EXCLUDEDPATHS = { - EXCLUDEDPATH_0, - EXCLUDEDPATH_1, + public static final String EXCLUDED_PATH_0 = "{\"path\":\"/excluded/*\"}"; + public static final String EXCLUDED_PATH_1 = "{\"path\":\"/props/*\"}"; + public static final String[] EXCLUDED_PATHS = { + EXCLUDED_PATH_0, + EXCLUDED_PATH_1, }; public static final String ORDER_BY_STRING_PATH = "{\"path\":\"/*\",\"indexes\":[" + "{\"kind\":\"Range\",\"dataType\":\"String\",\"precision\":-1}," + "]}"; - public static final String STARTSWITH_INCLUDEDPATH = + public static final String STARTS_WITH_INCLUDED_PATH = "{\"path\":\"/*\",\"indexes\":[" + "{\"kind\":\"Range\",\"dataType\":\"Number\",\"precision\":-1}," + "{\"kind\":\"Range\",\"dataType\":\"String\",\"precision\":3}" + "]}"; - public static final String[] PERSON_INCLUDEDPATHS = { - STARTSWITH_INCLUDEDPATH + public static final String[] PERSON_INCLUDED_PATHS = { + STARTS_WITH_INCLUDED_PATH }; public static final String DB_NAME = "testdb"; + public static final String SECONDARY_DB_NAME = "second_testdb"; public static final String FIRST_NAME = "first_name_li"; public static final String LAST_NAME = "last_name_p"; public static final String ID_1 = "id-1"; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java index 734a73707973..77fc5dc99785 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java @@ -3,14 +3,15 @@ package com.azure.spring.data.cosmos.config; -import com.azure.data.cosmos.ConsistencyLevel; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.internal.RequestOptions; +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.Constants; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.ExpressionResolver; -import com.fasterxml.jackson.databind.ObjectMapper; import com.azure.spring.data.cosmos.common.TestConstants; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.lang3.reflect.FieldUtils; import org.assertj.core.api.Assertions; import org.junit.Rule; import org.junit.Test; @@ -25,10 +26,11 @@ import org.springframework.context.support.AbstractApplicationContext; import org.springframework.util.StringUtils; +import java.lang.reflect.Field; + import static org.junit.Assert.assertNotNull; public class AbstractCosmosConfigurationIT { - private static final String OBJECTMAPPER_BEAN_NAME = Constants.OBJECTMAPPER_BEAN_NAME; @Rule public ExpectedException exception = ExpectedException.none(); @@ -36,7 +38,7 @@ public class AbstractCosmosConfigurationIT { @Test public void containsExpressionResolver() { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( - TestCosmosConfiguration.class); + TestCosmosConfiguration.class); assertNotNull(context.getBean(ExpressionResolver.class)); } @@ -44,15 +46,15 @@ public void containsExpressionResolver() { @Test public void containsCosmosDbFactory() { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( - TestCosmosConfiguration.class); + TestCosmosConfiguration.class); - Assertions.assertThat(context.getBean(CosmosDbFactory.class)).isNotNull(); + Assertions.assertThat(context.getBean(CosmosFactory.class)).isNotNull(); } @Test(expected = NoSuchBeanDefinitionException.class) public void defaultObjectMapperBeanNotExists() { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( - TestCosmosConfiguration.class); + TestCosmosConfiguration.class); context.getBean(ObjectMapper.class); } @@ -60,92 +62,95 @@ public void defaultObjectMapperBeanNotExists() { @Test public void objectMapperIsConfigurable() { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( - ObjectMapperConfiguration.class); + ObjectMapperConfiguration.class); Assertions.assertThat(context.getBean(ObjectMapper.class)).isNotNull(); - Assertions.assertThat(context.getBean(OBJECTMAPPER_BEAN_NAME)).isNotNull(); + Assertions.assertThat(context.getBean(Constants.OBJECT_MAPPER_BEAN_NAME)).isNotNull(); } @Test - public void testRequestOptionsConfigurable() { + public void testCosmosClientBuilderConfigurable() throws IllegalAccessException { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( - RequestOptionsConfiguration.class); - final CosmosDbFactory factory = context.getBean(CosmosDbFactory.class); + RequestOptionsConfiguration.class); + final CosmosFactory factory = context.getBean(CosmosFactory.class); Assertions.assertThat(factory).isNotNull(); - final RequestOptions options = factory.getConfig().getRequestOptions(); + final CosmosClientBuilder cosmosClientBuilder = factory.getConfig().getCosmosClientBuilder(); - Assertions.assertThat(options).isNotNull(); - Assertions.assertThat(options.getConsistencyLevel()).isEqualTo(ConsistencyLevel.CONSISTENT_PREFIX); - Assertions.assertThat(options.isScriptLoggingEnabled()).isTrue(); + Assertions.assertThat(cosmosClientBuilder).isNotNull(); + final Field consistencyLevelField = FieldUtils.getDeclaredField(CosmosClientBuilder.class, + "desiredConsistencyLevel", true); + ConsistencyLevel consistencyLevel = + (ConsistencyLevel) consistencyLevelField.get(cosmosClientBuilder); + Assertions.assertThat(consistencyLevel).isEqualTo(ConsistencyLevel.CONSISTENT_PREFIX); } @Configuration - @PropertySource(value = {"classpath:application.properties"}) + @PropertySource(value = { "classpath:application.properties" }) static class TestCosmosConfiguration extends AbstractCosmosConfiguration { - @Value("${cosmosdb.uri:}") + @Value("${cosmos.uri:}") private String cosmosDbUri; - @Value("${cosmosdb.key:}") + @Value("${cosmos.key:}") private String cosmosDbKey; @Value("${cosmosdb.database:}") private String database; @Mock - private CosmosClient mockClient; + private CosmosAsyncClient mockClient; @Bean - public CosmosDBConfig getConfig() { + public CosmosConfig getConfig() { final String dbName = StringUtils.hasText(this.database) ? this.database : TestConstants.DB_NAME; - return CosmosDBConfig.builder(cosmosDbUri, cosmosDbKey, dbName).build(); + return CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .endpoint(cosmosDbUri) + .key(cosmosDbKey)) + .database(dbName) + .build(); } @Override - public CosmosClient cosmosClient(CosmosDBConfig config) { + public CosmosAsyncClient cosmosAsyncClient(CosmosFactory cosmosFactory) { return mockClient; } } @Configuration static class ObjectMapperConfiguration extends TestCosmosConfiguration { - @Bean(name = OBJECTMAPPER_BEAN_NAME) + @Bean(name = Constants.OBJECT_MAPPER_BEAN_NAME) public ObjectMapper objectMapper() { return new ObjectMapper(); } } @Configuration - @PropertySource(value = {"classpath:application.properties"}) + @PropertySource(value = { "classpath:application.properties" }) static class RequestOptionsConfiguration extends AbstractCosmosConfiguration { - @Value("${cosmosdb.uri:}") + @Value("${cosmos.uri:}") private String cosmosDbUri; - @Value("${cosmosdb.key:}") + @Value("${cosmos.key:}") private String cosmosDbKey; @Value("${cosmosdb.database:}") private String database; - private RequestOptions getRequestOptions() { - final RequestOptions options = new RequestOptions(); - - options.setConsistencyLevel(ConsistencyLevel.CONSISTENT_PREFIX); - options.setScriptLoggingEnabled(true); - - return options; - } - @Bean - public CosmosDBConfig getConfig() { + public CosmosConfig getConfig() { final String dbName = StringUtils.hasText(this.database) ? this.database : TestConstants.DB_NAME; - final RequestOptions options = getRequestOptions(); - return CosmosDBConfig.builder(cosmosDbUri, cosmosDbKey, dbName) - .requestOptions(options) - .build(); + final CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder() + .key(cosmosDbKey) + .endpoint(cosmosDbUri) + .consistencyLevel(ConsistencyLevel.CONSISTENT_PREFIX); + return CosmosConfig.builder() + .database(dbName) + .cosmosClientBuilder(cosmosClientBuilder) + .build(); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java index c445b25be9ce..c8c3c5fff883 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java @@ -2,12 +2,12 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.PartitionKey; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.azure.cosmos.CosmosException; +import com.azure.cosmos.models.PartitionKey; +import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.PageTestUtils; import com.azure.spring.data.cosmos.common.ResponseDiagnosticsTestUtils; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; +import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; @@ -15,7 +15,7 @@ import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; import com.azure.spring.data.cosmos.domain.Person; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.assertj.core.util.Lists; @@ -31,6 +31,7 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; +import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -38,7 +39,20 @@ import java.util.List; import java.util.UUID; -import static com.azure.spring.data.cosmos.common.TestConstants.*; +import static com.azure.spring.data.cosmos.common.TestConstants.ADDRESSES; +import static com.azure.spring.data.cosmos.common.TestConstants.FIRST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.HOBBIES; +import static com.azure.spring.data.cosmos.common.TestConstants.ID_1; +import static com.azure.spring.data.cosmos.common.TestConstants.ID_2; +import static com.azure.spring.data.cosmos.common.TestConstants.ID_3; +import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.NEW_FIRST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.NEW_LAST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.NOT_EXIST_ID; +import static com.azure.spring.data.cosmos.common.TestConstants.PAGE_SIZE_1; +import static com.azure.spring.data.cosmos.common.TestConstants.PAGE_SIZE_2; +import static com.azure.spring.data.cosmos.common.TestConstants.PAGE_SIZE_3; +import static com.azure.spring.data.cosmos.common.TestConstants.UPDATED_FIRST_NAME; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -71,14 +85,14 @@ public class CosmosTemplateIT { @Autowired private ApplicationContext applicationContext; @Autowired - private CosmosDBConfig dbConfig; + private CosmosConfig cosmosConfig; @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; @Before public void setUp() throws ClassNotFoundException { if (!initialized) { - final CosmosDbFactory cosmosDbFactory = new CosmosDbFactory(dbConfig); + final CosmosFactory cosmosFactory = new CosmosFactory(cosmosConfig); final CosmosMappingContext mappingContext = new CosmosMappingContext(); personInfo = new CosmosEntityInformation<>(Person.class); @@ -88,12 +102,12 @@ public void setUp() throws ClassNotFoundException { final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); - cosmosTemplate = new CosmosTemplate(cosmosDbFactory, cosmosConverter, dbConfig.getDatabase()); + cosmosTemplate = new CosmosTemplate(cosmosFactory, cosmosConverter, cosmosConfig.getDatabase()); cosmosTemplate.createContainerIfNotExists(personInfo); initialized = true; } - insertedPerson = cosmosTemplate.insert(Person.class.getSimpleName(), TEST_PERSON, null); + insertedPerson = cosmosTemplate.insert(Person.class.getSimpleName(), TEST_PERSON, new PartitionKey(TEST_PERSON.getLastName())); } @After @@ -106,7 +120,7 @@ public static void afterClassCleanup() { cosmosTemplate.deleteContainer(personInfo.getContainerName()); } - @Test(expected = CosmosDBAccessException.class) + @Test(expected = CosmosAccessException.class) public void testInsertDuplicateId() { cosmosTemplate.insert(Person.class.getSimpleName(), TEST_PERSON, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON))); @@ -117,7 +131,7 @@ public void testFindAll() { final List result = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); assertThat(result.size()).isEqualTo(1); assertThat(result.get(0)).isEqualTo(TEST_PERSON); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -127,7 +141,7 @@ public void testFindById() { final Person result = cosmosTemplate.findById(Person.class.getSimpleName(), TEST_PERSON.getId(), Person.class); assertEquals(result, TEST_PERSON); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); @@ -146,7 +160,7 @@ public void testFindByMultiIds() { final List ids = Lists.newArrayList(ID_1, ID_2, ID_3); final List result = cosmosTemplate.findByIds(ids, Person.class, containerName); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); @@ -167,12 +181,9 @@ public void testUpsertNewDocument() { final Person newPerson = new Person(TEST_PERSON.getId(), firstName, NEW_FIRST_NAME, null, null); - final Person person = cosmosTemplate.upsertAndReturnEntity(Person.class.getSimpleName(), - newPerson, - new PartitionKey(personInfo.getPartitionKeyFieldValue(newPerson))); + final Person person = cosmosTemplate.upsertAndReturnEntity(Person.class.getSimpleName(), newPerson); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertEquals(person.getFirstName(), firstName); @@ -184,8 +195,7 @@ public void testUpdateWithReturnEntity() { TEST_PERSON.getLastName(), TEST_PERSON.getHobbies(), TEST_PERSON.getShippingAddresses()); updated.set_etag(insertedPerson.get_etag()); - final Person updatedPerson = cosmosTemplate.upsertAndReturnEntity(Person.class.getSimpleName(), - updated, null); + final Person updatedPerson = cosmosTemplate.upsertAndReturnEntity(Person.class.getSimpleName(), updated); final Person findPersonById = cosmosTemplate.findById(Person.class.getSimpleName(), updatedPerson.getId(), Person.class); @@ -200,11 +210,9 @@ public void testUpdate() { TEST_PERSON.getLastName(), TEST_PERSON.getHobbies(), TEST_PERSON.getShippingAddresses()); updated.set_etag(insertedPerson.get_etag()); - final Person person = cosmosTemplate.upsertAndReturnEntity(Person.class.getSimpleName(), - updated, null); + final Person person = cosmosTemplate.upsertAndReturnEntity(Person.class.getSimpleName(), updated); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertEquals(person, updated); @@ -217,11 +225,11 @@ public void testOptimisticLockWhenUpdatingWithWrongEtag() { updated.set_etag(WRONG_ETAG); try { - cosmosTemplate.upsert(Person.class.getSimpleName(), updated, null); - } catch (CosmosDBAccessException e) { - assertThat(e.getCosmosClientException()).isNotNull(); - final Throwable cosmosClientException = e.getCosmosClientException(); - assertThat(cosmosClientException).isInstanceOf(CosmosClientException.class); + cosmosTemplate.upsert(Person.class.getSimpleName(), updated); + } catch (CosmosAccessException e) { + assertThat(e.getCosmosException()).isNotNull(); + final Throwable cosmosClientException = e.getCosmosException(); + assertThat(cosmosClientException).isInstanceOf(CosmosException.class); assertThat(cosmosClientException.getMessage()).contains(PRECONDITION_IS_NOT_MET); final Person unmodifiedPerson = cosmosTemplate.findById(Person.class.getSimpleName(), @@ -241,13 +249,12 @@ public void testDeleteById() { cosmosTemplate.deleteById(Person.class.getSimpleName(), TEST_PERSON.getId(), new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON))); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); final List result = cosmosTemplate.findAll(Person.class); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); assertThat(result.size()).isEqualTo(1); @@ -259,20 +266,19 @@ public void testCountByContainer() { final long prevCount = cosmosTemplate.count(containerName); assertThat(prevCount).isEqualTo(1); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_2))); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final long newCount = cosmosTemplate.count(containerName); assertThat(newCount).isEqualTo(2); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -282,18 +288,25 @@ public void testCountByQuery() { cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_2))); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", - Collections.singletonList(TEST_PERSON_2.getFirstName())); + Collections.singletonList(TEST_PERSON_2.getFirstName()), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); - final long count = cosmosTemplate.count(query, Person.class, containerName); + final long count = cosmosTemplate.count(query, containerName); assertThat(count).isEqualTo(1); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + // add ignoreCase testing + final Criteria criteriaIgnoreCase = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", + Collections.singletonList(TEST_PERSON_2.getFirstName().toUpperCase()), Part.IgnoreCaseType.ALWAYS); + final DocumentQuery queryIgnoreCase = new DocumentQuery(criteriaIgnoreCase); + + final long countIgnoreCase = cosmosTemplate.count(queryIgnoreCase, containerName); + assertThat(countIgnoreCase).isEqualTo(1); + + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -303,8 +316,7 @@ public void testFindAllPageableMultiPages() { cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_2))); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); final CosmosPageRequest pageRequest = new CosmosPageRequest(0, PAGE_SIZE_1, null); @@ -313,8 +325,7 @@ public void testFindAllPageableMultiPages() { assertThat(page1.getContent().size()).isEqualTo(PAGE_SIZE_1); PageTestUtils.validateNonLastPage(page1, PAGE_SIZE_1); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); @@ -323,8 +334,7 @@ public void testFindAllPageableMultiPages() { assertThat(page2.getContent().size()).isEqualTo(1); PageTestUtils.validateLastPage(page2, PAGE_SIZE_1); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -334,12 +344,11 @@ public void testPaginationQuery() { cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_2))); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", - Collections.singletonList(FIRST_NAME)); + Collections.singletonList(FIRST_NAME), Part.IgnoreCaseType.NEVER); final PageRequest pageRequest = new CosmosPageRequest(0, PAGE_SIZE_2, null); final DocumentQuery query = new DocumentQuery(criteria).with(pageRequest); @@ -347,8 +356,16 @@ public void testPaginationQuery() { assertThat(page.getContent().size()).isEqualTo(1); PageTestUtils.validateLastPage(page, page.getContent().size()); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + // add ignore case testing + final Criteria criteriaIgnoreCase = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", + Collections.singletonList(FIRST_NAME.toUpperCase()), Part.IgnoreCaseType.ALWAYS); + final DocumentQuery queryIgnoreCase = new DocumentQuery(criteriaIgnoreCase).with(pageRequest); + + final Page pageIgnoreCase = cosmosTemplate.paginationQuery(queryIgnoreCase, Person.class, containerName); + assertThat(pageIgnoreCase.getContent().size()).isEqualTo(1); + PageTestUtils.validateLastPage(pageIgnoreCase, pageIgnoreCase.getContent().size()); + + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -360,8 +377,7 @@ public void testFindAllWithPageableAndSort() { cosmosTemplate.insert(TEST_PERSON_3, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_3))); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); final Sort sort = Sort.by(Sort.Direction.DESC, "firstName"); @@ -376,8 +392,7 @@ public void testFindAllWithPageableAndSort() { assertThat(result.get(1).getFirstName()).isEqualTo(NEW_FIRST_NAME); assertThat(result.get(2).getFirstName()).isEqualTo(FIRST_NAME); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java index b569f8d21159..18db0b5311f6 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; @@ -14,13 +14,13 @@ import org.mockito.Answers; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.data.repository.query.parser.Part; import org.springframework.util.Assert; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Arrays; -@SuppressWarnings("unchecked") @RunWith(MockitoJUnitRunner.class) public class CosmosTemplateIllegalTest { private static final String NULL_STR = null; @@ -42,8 +42,10 @@ public void setUp() { @Test public void deleteIllegalShouldFail() throws NoSuchMethodException { - final Method method = dbTemplateClass.getMethod("delete", DocumentQuery.class, Class.class, String.class); - final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "faker", Arrays.asList("faker-value")); + final Method method = dbTemplateClass.getMethod("delete", + DocumentQuery.class, Class.class, String.class); + final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, + "faker", Arrays.asList("faker-value"), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); checkIllegalArgument(method, null, Person.class, DUMMY_COLL); @@ -95,7 +97,7 @@ public void findByCollIdIllegalArgsShouldFail() throws NoSuchMethodException { /** * Check IllegalArgumentException is thrown for illegal parameters - * @param method + * @param method method type * @param args Method invocation parameters */ private void checkIllegalArgument(Method method, Object... args) { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java index b72787b917ca..487cdafaa0e8 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java @@ -3,10 +3,10 @@ package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.PartitionKey; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.azure.cosmos.models.PartitionKey; +import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.PageTestUtils; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; +import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; @@ -27,6 +27,7 @@ import org.springframework.data.annotation.Persistent; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; +import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -34,7 +35,20 @@ import java.util.List; import java.util.UUID; -import static com.azure.spring.data.cosmos.common.TestConstants.*; +import static com.azure.spring.data.cosmos.common.TestConstants.ADDRESSES; +import static com.azure.spring.data.cosmos.common.TestConstants.FIRST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.HOBBIES; +import static com.azure.spring.data.cosmos.common.TestConstants.ID_1; +import static com.azure.spring.data.cosmos.common.TestConstants.ID_2; +import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.NEW_FIRST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.NEW_LAST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.NOT_EXIST_ID; +import static com.azure.spring.data.cosmos.common.TestConstants.PAGE_SIZE_1; +import static com.azure.spring.data.cosmos.common.TestConstants.PAGE_SIZE_2; +import static com.azure.spring.data.cosmos.common.TestConstants.PROPERTY_ID; +import static com.azure.spring.data.cosmos.common.TestConstants.PROPERTY_LAST_NAME; +import static com.azure.spring.data.cosmos.common.TestConstants.UPDATED_FIRST_NAME; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; @@ -55,12 +69,12 @@ public class CosmosTemplatePartitionIT { @Autowired private ApplicationContext applicationContext; @Autowired - private CosmosDBConfig dbConfig; + private CosmosConfig cosmosConfig; @Before public void setUp() throws ClassNotFoundException { if (!initialized) { - final CosmosDbFactory cosmosDbFactory = new CosmosDbFactory(dbConfig); + final CosmosFactory cosmosFactory = new CosmosFactory(cosmosConfig); final CosmosMappingContext mappingContext = new CosmosMappingContext(); personInfo = new CosmosEntityInformation<>(PartitionPerson.class); @@ -68,7 +82,7 @@ public void setUp() throws ClassNotFoundException { final MappingCosmosConverter dbConverter = new MappingCosmosConverter(mappingContext, null); - cosmosTemplate = new CosmosTemplate(cosmosDbFactory, dbConverter, dbConfig.getDatabase()); + cosmosTemplate = new CosmosTemplate(cosmosFactory, dbConverter, cosmosConfig.getDatabase()); containerName = personInfo.getContainerName(); cosmosTemplate.createContainerIfNotExists(personInfo); @@ -91,7 +105,8 @@ public static void afterClassCleanup() { @Test public void testFindWithPartition() { - Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, PROPERTY_LAST_NAME, Arrays.asList(LAST_NAME)); + Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, PROPERTY_LAST_NAME, + Arrays.asList(LAST_NAME), Part.IgnoreCaseType.NEVER); DocumentQuery query = new DocumentQuery(criteria); List result = cosmosTemplate.find(query, PartitionPerson.class, PartitionPerson.class.getSimpleName()); @@ -99,9 +114,23 @@ public void testFindWithPartition() { assertThat(result.size()).isEqualTo(1); assertEquals(TEST_PERSON, result.get(0)); - criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, PROPERTY_ID, Arrays.asList(ID_1)); + criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, PROPERTY_ID, + Arrays.asList(ID_1), Part.IgnoreCaseType.NEVER); query = new DocumentQuery(criteria); - result = cosmosTemplate.find(query, PartitionPerson.class, PartitionPerson.class.getSimpleName()); + result = cosmosTemplate.find(query, PartitionPerson.class, + PartitionPerson.class.getSimpleName()); + + assertThat(result.size()).isEqualTo(1); + assertEquals(TEST_PERSON, result.get(0)); + } + + @Test + public void testFindIgnoreCaseWithPartition() { + Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, PROPERTY_LAST_NAME, + Arrays.asList(LAST_NAME.toUpperCase()), Part.IgnoreCaseType.ALWAYS); + DocumentQuery query = new DocumentQuery(criteria); + List result = cosmosTemplate.find(query, PartitionPerson.class, + PartitionPerson.class.getSimpleName()); assertThat(result.size()).isEqualTo(1); assertEquals(TEST_PERSON, result.get(0)); @@ -119,7 +148,8 @@ public void testFindByIdWithPartition() { @Test public void testFindByNonExistIdWithPartition() { - final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, PROPERTY_ID, Arrays.asList(NOT_EXIST_ID)); + final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, PROPERTY_ID, + Arrays.asList(NOT_EXIST_ID), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); final List result = cosmosTemplate.find(query, PartitionPerson.class, @@ -137,8 +167,7 @@ public void testUpsertNewDocumentPartition() { final String partitionKeyValue = newPerson.getLastName(); final PartitionPerson partitionPerson = - cosmosTemplate.upsertAndReturnEntity(PartitionPerson.class.getSimpleName(), newPerson, - new PartitionKey(partitionKeyValue)); + cosmosTemplate.upsertAndReturnEntity(PartitionPerson.class.getSimpleName(), newPerson); final List result = cosmosTemplate.findAll(PartitionPerson.class); @@ -151,8 +180,7 @@ public void testUpdatePartition() { final PartitionPerson updated = new PartitionPerson(TEST_PERSON.getId(), UPDATED_FIRST_NAME, TEST_PERSON.getLastName(), TEST_PERSON.getHobbies(), TEST_PERSON.getShippingAddresses()); final PartitionPerson partitionPerson = - cosmosTemplate.upsertAndReturnEntity(PartitionPerson.class.getSimpleName(), updated, - new PartitionKey(updated.getLastName())); + cosmosTemplate.upsertAndReturnEntity(PartitionPerson.class.getSimpleName(), updated); assertEquals(partitionPerson, updated); } @@ -191,20 +219,31 @@ public void testCountForPartitionedCollectionByQuery() { cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(TEST_PERSON_2.getLastName())); final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", - Arrays.asList(TEST_PERSON_2.getFirstName())); + Arrays.asList(TEST_PERSON_2.getFirstName()), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); - final long count = cosmosTemplate.count(query, PartitionPerson.class, containerName); + final long count = cosmosTemplate.count(query, containerName); assertThat(count).isEqualTo(1); } + @Test + public void testCountIgnoreCaseForPartitionedCollectionByQuery() { + cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(TEST_PERSON_2.getLastName())); + final Criteria criteriaIgnoreCase = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", + Arrays.asList(TEST_PERSON_2.getFirstName().toUpperCase()), Part.IgnoreCaseType.ALWAYS); + final DocumentQuery queryIgnoreCase = new DocumentQuery(criteriaIgnoreCase); + + final long countIgnoreCase = cosmosTemplate.count(queryIgnoreCase, containerName); + assertThat(countIgnoreCase).isEqualTo(1); + } + @Test public void testNonExistFieldValue() { final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", - Arrays.asList("non-exist-first-name")); + Arrays.asList("non-exist-first-name"), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); - final long count = cosmosTemplate.count(query, PartitionPerson.class, containerName); + final long count = cosmosTemplate.count(query, containerName); assertThat(count).isEqualTo(0); } @@ -229,7 +268,7 @@ public void testPartitionedPaginationQuery() { cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(TEST_PERSON_2.getLastName())); final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", - Arrays.asList(FIRST_NAME)); + Arrays.asList(FIRST_NAME), Part.IgnoreCaseType.NEVER); final PageRequest pageRequest = new CosmosPageRequest(0, PAGE_SIZE_2, null); final DocumentQuery query = new DocumentQuery(criteria).with(pageRequest); @@ -237,4 +276,18 @@ public void testPartitionedPaginationQuery() { assertThat(page.getContent().size()).isEqualTo(1); PageTestUtils.validateLastPage(page, page.getContent().size()); } + + @Test + public void testPartitionedPaginationQueryIgnoreCase() { + cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(TEST_PERSON_2.getLastName())); + final Criteria criteriaIgnoreCase = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", + Arrays.asList(FIRST_NAME.toUpperCase()), Part.IgnoreCaseType.ALWAYS); + final PageRequest pageRequest = new CosmosPageRequest(0, PAGE_SIZE_2, null); + final DocumentQuery queryIgnoreCase = new DocumentQuery(criteriaIgnoreCase).with(pageRequest); + + final Page pageIgnoreCase = cosmosTemplate + .paginationQuery(queryIgnoreCase, PartitionPerson.class, containerName); + assertThat(pageIgnoreCase.getContent().size()).isEqualTo(1); + PageTestUtils.validateLastPage(pageIgnoreCase, pageIgnoreCase.getContent().size()); + } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java index f183b45b3764..8b85701646f8 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java @@ -3,9 +3,10 @@ package com.azure.spring.data.cosmos.core; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.TestConstants; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; +import com.azure.spring.data.cosmos.config.CosmosConfig; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; @@ -15,9 +16,14 @@ public class CosmosTemplateUnitTest { @Test(expected = IllegalArgumentException.class) public void rejectNullDbFactory() { - final CosmosDBConfig dbConfig = CosmosDBConfig.builder("", "", TestConstants.DB_NAME).build(); - final CosmosDbFactory cosmosDbFactory = new CosmosDbFactory(dbConfig); + final CosmosConfig cosmosConfig = CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .endpoint("") + .key("")) + .database(TestConstants.DB_NAME) + .build(); + final CosmosFactory cosmosFactory = new CosmosFactory(cosmosConfig); - new CosmosTemplate(cosmosDbFactory, null, TestConstants.DB_NAME); + new CosmosTemplate(cosmosFactory, null, TestConstants.DB_NAME); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java index 46c056d6ac94..c476de0f39d0 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java @@ -2,31 +2,35 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.CosmosKeyCredential; -import com.azure.data.cosmos.PartitionKey; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.cosmos.CosmosException; +import com.azure.cosmos.models.PartitionKey; +import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.ResponseDiagnosticsTestUtils; import com.azure.spring.data.cosmos.common.TestConstants; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; +import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; import com.azure.spring.data.cosmos.core.query.Criteria; import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.core.query.DocumentQuery; import com.azure.spring.data.cosmos.domain.Person; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import io.reactivex.subscribers.TestSubscriber; import org.assertj.core.api.Assertions; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; +import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; @@ -34,15 +38,13 @@ import reactor.test.StepVerifier; import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; +import java.util.Collections; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.junit.Assert.fail; -@SuppressWarnings("unchecked") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCosmosTemplateIT { @@ -65,13 +67,16 @@ public class ReactiveCosmosTemplateIT { private static final String PRECONDITION_IS_NOT_MET = "is not met"; private static final String WRONG_ETAG = "WRONG_ETAG"; - @Value("${cosmosdb.secondaryKey}") + @Value("${cosmos.secondaryKey}") private String cosmosDbSecondaryKey; + @Value("${cosmos.key}") + private String cosmosDbKey; + private static ReactiveCosmosTemplate cosmosTemplate; private static String containerName; private static CosmosEntityInformation personInfo; - private static CosmosKeyCredential cosmosKeyCredential; + private static AzureKeyCredential azureKeyCredential; private static boolean initialized; @@ -80,15 +85,16 @@ public class ReactiveCosmosTemplateIT { @Autowired private ApplicationContext applicationContext; @Autowired - private CosmosDBConfig dbConfig; + private CosmosConfig cosmosConfig; @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; @Before public void setUp() throws ClassNotFoundException { if (!initialized) { - cosmosKeyCredential = new CosmosKeyCredential(dbConfig.getKey()); - final CosmosDbFactory dbFactory = new CosmosDbFactory(dbConfig); + azureKeyCredential = new AzureKeyCredential(cosmosDbKey); + cosmosConfig.getCosmosClientBuilder().credential(azureKeyCredential); + final CosmosFactory dbFactory = new CosmosFactory(cosmosConfig); final CosmosMappingContext mappingContext = new CosmosMappingContext(); personInfo = new CosmosEntityInformation<>(Person.class); @@ -98,8 +104,9 @@ public void setUp() throws ClassNotFoundException { final MappingCosmosConverter dbConverter = new MappingCosmosConverter(mappingContext, null); - cosmosTemplate = new ReactiveCosmosTemplate(dbFactory, dbConverter, dbConfig.getDatabase()); - cosmosTemplate.createContainerIfNotExists(personInfo).block().container(); + cosmosTemplate = new ReactiveCosmosTemplate(dbFactory, dbConverter, + cosmosConfig.getDatabase()); + cosmosTemplate.createContainerIfNotExists(personInfo).block(); initialized = true; } @@ -110,9 +117,8 @@ public void setUp() throws ClassNotFoundException { @After public void cleanup() { // Reset master key - cosmosKeyCredential.key(dbConfig.getKey()); - cosmosTemplate.deleteAll(Person.class.getSimpleName(), - personInfo.getPartitionKeyFieldName()).block(); + azureKeyCredential.update(cosmosDbKey); + cosmosTemplate.deleteAll(Person.class.getSimpleName(), Person.class).block(); } @AfterClass @@ -124,14 +130,9 @@ public static void afterClassCleanup() { public void testInsertDuplicateId() { final Mono insertMono = cosmosTemplate.insert(TEST_PERSON, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON))); - final TestSubscriber testSubscriber = new TestSubscriber<>(); - insertMono.subscribe(testSubscriber); - testSubscriber.awaitTerminalEvent(); - testSubscriber.assertNotComplete(); - testSubscriber.assertTerminated(); - assertThat(testSubscriber.errors()).hasSize(1); - assertThat(((List) testSubscriber.getEvents().get(1)).get(0)) - .isInstanceOf(CosmosDBAccessException.class); + StepVerifier.create(insertMono) + .expectError(CosmosAccessException.class) + .verify(); } @Test @@ -142,14 +143,14 @@ public void testFindByID() { StepVerifier.create(findById) .consumeNextWith(actual -> Assert.assertEquals(actual, TEST_PERSON)) .verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test public void testFindByIDBySecondaryKey() { - cosmosKeyCredential.key(cosmosDbSecondaryKey); + azureKeyCredential.update(cosmosDbSecondaryKey); final Mono findById = cosmosTemplate.findById(Person.class.getSimpleName(), TEST_PERSON.getId(), Person.class); @@ -158,7 +159,7 @@ public void testFindByIDBySecondaryKey() { Assert.assertThat(actual.getLastName(), is(equalTo(TEST_PERSON.getLastName()))); }).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -169,7 +170,7 @@ public void testFindAll() { Person.class); StepVerifier.create(flux).expectNextCount(1).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -181,7 +182,7 @@ public void testFindByIdWithContainerName() { .consumeNextWith(actual -> Assert.assertEquals(actual, TEST_PERSON)) .verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -192,21 +193,21 @@ public void testInsert() { new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_3)))) .expectNext(TEST_PERSON_3).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @Test public void testInsertBySecondaryKey() { - cosmosKeyCredential.key(cosmosDbSecondaryKey); + azureKeyCredential.update(cosmosDbSecondaryKey); StepVerifier.create(cosmosTemplate.insert(TEST_PERSON_3, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_3)))) .expectNext(TEST_PERSON_3).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @Test @@ -215,9 +216,9 @@ public void testInsertWithContainerName() { new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_2)))) .expectNext(TEST_PERSON_2).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @Test @@ -227,30 +228,31 @@ public void testUpsert() { final ArrayList hobbies = new ArrayList<>(p.getHobbies()); hobbies.add("more code"); p.setHobbies(hobbies); - final Mono upsert = cosmosTemplate.upsert(p, - new PartitionKey(personInfo.getPartitionKeyFieldValue(p))); + final Mono upsert = cosmosTemplate.upsert(p); StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @Test public void testOptimisticLockWhenUpdatingWithWrongEtag() { final Person updated = new Person(TEST_PERSON.getId(), TestConstants.UPDATED_FIRST_NAME, - TEST_PERSON.getLastName(), TEST_PERSON.getHobbies(), TEST_PERSON.getShippingAddresses()); + TEST_PERSON.getLastName(), TEST_PERSON.getHobbies(), + TEST_PERSON.getShippingAddresses()); updated.set_etag(WRONG_ETAG); try { - cosmosTemplate.upsert(updated, new PartitionKey(personInfo.getPartitionKeyFieldValue(updated))).block(); - } catch (CosmosDBAccessException cosmosDbAccessException) { - assertThat(cosmosDbAccessException.getCosmosClientException()).isNotNull(); - final Throwable cosmosClientException = cosmosDbAccessException.getCosmosClientException(); - assertThat(cosmosClientException).isInstanceOf(CosmosClientException.class); + cosmosTemplate.upsert(updated).block(); + } catch (CosmosAccessException cosmosAccessException) { + assertThat(cosmosAccessException.getCosmosException()).isNotNull(); + final Throwable cosmosClientException = cosmosAccessException.getCosmosException(); + assertThat(cosmosClientException).isInstanceOf(CosmosException.class); assertThat(cosmosClientException.getMessage()).contains(PRECONDITION_IS_NOT_MET); - final Mono unmodifiedPerson = cosmosTemplate.findById(Person.class.getSimpleName(), + final Mono unmodifiedPerson = + cosmosTemplate.findById(Person.class.getSimpleName(), TEST_PERSON.getId(), Person.class); StepVerifier.create(unmodifiedPerson).expectNextMatches(person -> person.getFirstName().equals(insertedPerson.getFirstName())).verifyComplete(); @@ -261,18 +263,17 @@ public void testOptimisticLockWhenUpdatingWithWrongEtag() { @Test public void testUpsertBySecondaryKey() { - cosmosKeyCredential.key(cosmosDbSecondaryKey); + azureKeyCredential.update(cosmosDbSecondaryKey); final Person p = TEST_PERSON_2; final ArrayList hobbies = new ArrayList<>(p.getHobbies()); hobbies.add("more code"); p.setHobbies(hobbies); - final Mono upsert = cosmosTemplate.upsert(p, - new PartitionKey(personInfo.getPartitionKeyFieldValue(p))); + final Mono upsert = cosmosTemplate.upsert(p); StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @Test @@ -281,13 +282,12 @@ public void testUpsertWithContainerName() { final ArrayList hobbies = new ArrayList<>(p.getHobbies()); hobbies.add("more code"); p.setHobbies(hobbies); - final Mono upsert = cosmosTemplate.upsert(Person.class.getSimpleName(), p, - new PartitionKey(personInfo.getPartitionKeyFieldValue(p))); + final Mono upsert = cosmosTemplate.upsert(Person.class.getSimpleName(), p); StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @Test @@ -295,39 +295,39 @@ public void testDeleteById() { cosmosTemplate.insert(TEST_PERSON_4, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))).block(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); Flux flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(2).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); + final Mono voidMono = cosmosTemplate.deleteById(Person.class.getSimpleName(), TEST_PERSON_4.getId(), new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))); StepVerifier.create(voidMono).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNull(); + Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(1).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); + } @Test public void testDeleteByIdBySecondaryKey() { - cosmosKeyCredential.key(cosmosDbSecondaryKey); + azureKeyCredential.update(cosmosDbSecondaryKey); cosmosTemplate.insert(TEST_PERSON_4, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))).block(); Flux flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); @@ -343,30 +343,43 @@ public void testDeleteByIdBySecondaryKey() { @Test public void testFind() { final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", - Arrays.asList(TEST_PERSON.getFirstName())); + Collections.singletonList(TEST_PERSON.getFirstName()), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); final Flux personFlux = cosmosTemplate.find(query, Person.class, Person.class.getSimpleName()); StepVerifier.create(personFlux).expectNextCount(1).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + // add ignore testing + final Criteria criteriaIgnoreCase = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", + Collections.singletonList(TEST_PERSON.getFirstName().toUpperCase()), Part.IgnoreCaseType.ALWAYS); + final DocumentQuery queryIgnoreCase = new DocumentQuery(criteriaIgnoreCase); + final Flux personFluxIgnoreCase = cosmosTemplate.find(queryIgnoreCase, Person.class, + Person.class.getSimpleName()); + StepVerifier.create(personFluxIgnoreCase).expectNextCount(1).verifyComplete(); + + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); } @Test public void testExists() { final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", - Arrays.asList(TEST_PERSON.getFirstName())); + Collections.singletonList(TEST_PERSON.getFirstName()), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); final Mono exists = cosmosTemplate.exists(query, Person.class, containerName); StepVerifier.create(exists).expectNext(true).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + // add ignore testing + final Criteria criteriaIgnoreCase = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", + Collections.singletonList(TEST_PERSON.getFirstName().toUpperCase()), Part.IgnoreCaseType.ALWAYS); + final DocumentQuery queryIgnoreCase = new DocumentQuery(criteriaIgnoreCase); + final Mono existsIgnoreCase = cosmosTemplate.exists(queryIgnoreCase, Person.class, containerName); + StepVerifier.create(existsIgnoreCase).expectNext(true).verifyComplete(); + + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); } @Test @@ -374,26 +387,27 @@ public void testCount() { final Mono count = cosmosTemplate.count(containerName); StepVerifier.create(count).expectNext((long) 1).verifyComplete(); - assertThat(responseDiagnosticsTestUtils.getFeedResponseDiagnostics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); - assertThat(responseDiagnosticsTestUtils.getCosmosResponseDiagnostics()).isNull(); } @Test public void testCountBySecondaryKey() { - cosmosKeyCredential.key(cosmosDbSecondaryKey); + azureKeyCredential.update(cosmosDbSecondaryKey); final Mono count = cosmosTemplate.count(containerName); StepVerifier.create(count).expectNext((long) 1).verifyComplete(); } @Test public void testInvalidSecondaryKey() { - cosmosKeyCredential.key("Invalid secondary key"); + azureKeyCredential.update("Invalid secondary key"); final Mono findById = cosmosTemplate.findById(Person.class.getSimpleName(), TEST_PERSON.getId(), Person.class); - StepVerifier.create(findById).expectError(IllegalArgumentException.class); + StepVerifier.create(findById) + .expectError(CosmosAccessException.class) + .verify(); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java index 934b6bb546fd..eda513baf86c 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java @@ -2,10 +2,10 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core; -import com.azure.data.cosmos.PartitionKey; -import com.azure.spring.data.cosmos.CosmosDbFactory; +import com.azure.cosmos.models.PartitionKey; +import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.TestConstants; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; +import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; import com.azure.spring.data.cosmos.core.query.Criteria; @@ -14,12 +14,17 @@ import com.azure.spring.data.cosmos.domain.PartitionPerson; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; +import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; @@ -51,12 +56,12 @@ public class ReactiveCosmosTemplatePartitionIT { @Autowired private ApplicationContext applicationContext; @Autowired - private CosmosDBConfig dbConfig; + private CosmosConfig cosmosConfig; @Before public void setUp() throws ClassNotFoundException { if (!initialized) { - final CosmosDbFactory dbFactory = new CosmosDbFactory(dbConfig); + final CosmosFactory dbFactory = new CosmosFactory(cosmosConfig); final CosmosMappingContext mappingContext = new CosmosMappingContext(); personInfo = @@ -67,7 +72,7 @@ public void setUp() throws ClassNotFoundException { final MappingCosmosConverter dbConverter = new MappingCosmosConverter(mappingContext, null); - cosmosTemplate = new ReactiveCosmosTemplate(dbFactory, dbConverter, dbConfig.getDatabase()); + cosmosTemplate = new ReactiveCosmosTemplate(dbFactory, dbConverter, cosmosConfig.getDatabase()); cosmosTemplate.createContainerIfNotExists(personInfo).block(); initialized = true; @@ -77,8 +82,7 @@ public void setUp() throws ClassNotFoundException { @After public void cleanup() { - cosmosTemplate.deleteAll(PartitionPerson.class.getSimpleName(), - personInfo.getPartitionKeyFieldName()).block(); + cosmosTemplate.deleteAll(PartitionPerson.class.getSimpleName(), PartitionPerson.class).block(); } @AfterClass @@ -89,7 +93,21 @@ public static void afterClassCleanup() { @Test public void testFindWithPartition() { final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, TestConstants.PROPERTY_LAST_NAME, - Arrays.asList(TestConstants.LAST_NAME)); + Arrays.asList(TestConstants.LAST_NAME), Part.IgnoreCaseType.NEVER); + final DocumentQuery query = new DocumentQuery(criteria); + final Flux partitionPersonFlux = cosmosTemplate.find(query, + PartitionPerson.class, + PartitionPerson.class.getSimpleName()); + StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { + Assert.assertThat(actual.getFirstName(), is(equalTo(TEST_PERSON.getFirstName()))); + Assert.assertThat(actual.getLastName(), is(equalTo(TEST_PERSON.getLastName()))); + }).verifyComplete(); + } + + @Test + public void testFindIgnoreCaseWithPartition() { + final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, TestConstants.PROPERTY_LAST_NAME, + Arrays.asList(TestConstants.LAST_NAME.toUpperCase()), Part.IgnoreCaseType.ALWAYS); final DocumentQuery query = new DocumentQuery(criteria); final Flux partitionPersonFlux = cosmosTemplate.find(query, PartitionPerson.class, @@ -124,8 +142,7 @@ public void testUpsertNewDocumentPartition() { firstName, TestConstants.NEW_LAST_NAME, null, null); final String partitionKeyValue = newPerson.getLastName(); - final Mono upsert = cosmosTemplate.upsert(newPerson, - new PartitionKey(partitionKeyValue)); + final Mono upsert = cosmosTemplate.upsert(newPerson); StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); } @@ -134,7 +151,7 @@ public void testUpdateWithPartition() { final PartitionPerson updated = new PartitionPerson(TEST_PERSON.getId(), TestConstants.UPDATED_FIRST_NAME, TEST_PERSON.getLastName(), TEST_PERSON.getHobbies(), TEST_PERSON.getShippingAddresses()); - cosmosTemplate.upsert(updated, new PartitionKey(updated.getLastName())).block(); + cosmosTemplate.upsert(updated).block(); final PartitionPerson person = cosmosTemplate .findAll(PartitionPerson.class.getSimpleName(), PartitionPerson.class) @@ -162,7 +179,7 @@ public void testDeleteAll() { StepVerifier.create(cosmosTemplate.findAll(PartitionPerson.class)).expectNextCount(2).verifyComplete(); final CosmosEntityInformation personInfo = new CosmosEntityInformation<>(PartitionPerson.class); - cosmosTemplate.deleteAll(containerName, personInfo.getPartitionKeyFieldName()).block(); + cosmosTemplate.deleteAll(containerName, PartitionPerson.class).block(); StepVerifier.create(cosmosTemplate.findAll(PartitionPerson.class)) .expectNextCount(0) .verifyComplete(); @@ -181,11 +198,20 @@ public void testCountForPartitionedCollection() { public void testCountForPartitionedCollectionByQuery() { cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(TEST_PERSON_2.getLastName())).block(); final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", - Arrays.asList(TEST_PERSON_2.getFirstName())); + Arrays.asList(TEST_PERSON_2.getFirstName()), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); StepVerifier.create(cosmosTemplate.count(query, containerName)) .expectNext((long) 1).verifyComplete(); + } + @Test + public void testCountIgnoreCaseForPartitionedCollectionByQuery() { + cosmosTemplate.insert(TEST_PERSON_2, new PartitionKey(TEST_PERSON_2.getLastName())).block(); + final Criteria criteriaIgnoreCase = Criteria.getInstance(CriteriaType.IS_EQUAL, "firstName", + Arrays.asList(TEST_PERSON_2.getFirstName().toUpperCase()), Part.IgnoreCaseType.ALWAYS); + final DocumentQuery queryIgnoreCase = new DocumentQuery(criteriaIgnoreCase); + StepVerifier.create(cosmosTemplate.count(queryIgnoreCase, containerName)) + .expectNext((long) 1).verifyComplete(); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java index 64e3478866ba..88b593f2fe95 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java @@ -9,7 +9,7 @@ import java.time.ZonedDateTime; import static java.time.format.DateTimeFormatter.ISO_OFFSET_DATE_TIME; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class ZonedDateTimeDeserializerTest { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java index b690633be817..dc02b2a1ffb6 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java @@ -2,15 +2,16 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.converter; -import com.azure.data.cosmos.CosmosItemProperties; +import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; +import com.azure.spring.data.cosmos.core.convert.ObjectMapperFactory; import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.domain.Address; import com.azure.spring.data.cosmos.domain.Importance; import com.azure.spring.data.cosmos.domain.Memo; -import org.json.JSONObject; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -49,23 +50,23 @@ public void setUp() { @Test public void covertAddressToDocumentCorrectly() { final Address testAddress = new Address(TestConstants.POSTAL_CODE, TestConstants.CITY, TestConstants.STREET); - final CosmosItemProperties cosmosItemProperties = mappingCosmosConverter.writeCosmosItemProperties(testAddress); + final JsonNode jsonNode = mappingCosmosConverter.writeJsonNode(testAddress); - assertThat(cosmosItemProperties.id()).isEqualTo(testAddress.getPostalCode()); - assertThat(cosmosItemProperties.getString(TestConstants.PROPERTY_CITY)).isEqualTo(testAddress.getCity()); - assertThat(cosmosItemProperties.getString(TestConstants.PROPERTY_STREET)).isEqualTo(testAddress.getStreet()); + assertThat(jsonNode.get("id").asText()).isEqualTo(testAddress.getPostalCode()); + assertThat(jsonNode.get(TestConstants.PROPERTY_CITY).asText()).isEqualTo(testAddress.getCity()); + assertThat(jsonNode.get(TestConstants.PROPERTY_STREET).asText()).isEqualTo(testAddress.getStreet()); } @Test public void convertDocumentToAddressCorrectly() { - final JSONObject jsonObject = new JSONObject(); - jsonObject.put(TestConstants.PROPERTY_CITY, TestConstants.CITY); - jsonObject.put(TestConstants.PROPERTY_STREET, TestConstants.STREET); + final ObjectNode objectNode = ObjectMapperFactory.getObjectMapper().createObjectNode(); + objectNode.put(TestConstants.PROPERTY_CITY, TestConstants.CITY); + objectNode.put(TestConstants.PROPERTY_STREET, TestConstants.STREET); + objectNode.put(TestConstants.PROPERTY_ID, TestConstants.POSTAL_CODE); - final CosmosItemProperties cosmosItemProperties = new CosmosItemProperties(jsonObject.toString()); - cosmosItemProperties.id(TestConstants.POSTAL_CODE); + final JsonNode jsonNode = mappingCosmosConverter.writeJsonNode(objectNode); - final Address address = mappingCosmosConverter.read(Address.class, cosmosItemProperties); + final Address address = mappingCosmosConverter.read(Address.class, jsonNode); assertThat(address.getPostalCode()).isEqualTo(TestConstants.POSTAL_CODE); assertThat(address.getCity()).isEqualTo(TestConstants.CITY); @@ -76,28 +77,28 @@ public void convertDocumentToAddressCorrectly() { public void canWritePojoWithDateToDocument() throws ParseException { final Memo memo = new Memo(TestConstants.ID_1, TestConstants.MESSAGE, DATE.parse(TestConstants.DATE_STRING), Importance.NORMAL); - final CosmosItemProperties cosmosItemProperties = mappingCosmosConverter.writeCosmosItemProperties(memo); + final JsonNode jsonNode = mappingCosmosConverter.writeJsonNode(memo); - assertThat(cosmosItemProperties.id()).isEqualTo(memo.getId()); - assertThat(cosmosItemProperties.getString(TestConstants.PROPERTY_MESSAGE)).isEqualTo(memo.getMessage()); - assertThat(cosmosItemProperties.getLong(TestConstants.PROPERTY_DATE)).isEqualTo(memo.getDate().getTime()); + assertThat(jsonNode.get(TestConstants.PROPERTY_ID).asText()).isEqualTo(memo.getId()); + assertThat(jsonNode.get(TestConstants.PROPERTY_MESSAGE).asText()).isEqualTo(memo.getMessage()); + assertThat(jsonNode.get(TestConstants.PROPERTY_DATE).asLong()).isEqualTo(memo.getDate().getTime()); } @Test public void canReadPojoWithDateFromDocument() throws ParseException { - final JSONObject jsonObject = new JSONObject(); + final ObjectNode jsonObject = ObjectMapperFactory.getObjectMapper().createObjectNode(); jsonObject.put(TestConstants.PROPERTY_MESSAGE, TestConstants.MESSAGE); final long date = DATE.parse(TestConstants.DATE_STRING).getTime(); jsonObject.put(TestConstants.PROPERTY_DATE, date); + jsonObject.put(TestConstants.PROPERTY_ID, TestConstants.ID_1); - final CosmosItemProperties cosmosItemProperties = new CosmosItemProperties(jsonObject.toString()); - cosmosItemProperties.id(TestConstants.ID_1); + final JsonNode jsonNode = mappingCosmosConverter.writeJsonNode(jsonObject); - final Memo memo = mappingCosmosConverter.read(Memo.class, cosmosItemProperties); - assertThat(cosmosItemProperties.id()).isEqualTo(memo.getId()); - assertThat(cosmosItemProperties.getString(TestConstants.PROPERTY_MESSAGE)).isEqualTo(TestConstants.MESSAGE); - assertThat(cosmosItemProperties.getLong(TestConstants.PROPERTY_DATE)).isEqualTo(date); + final Memo memo = mappingCosmosConverter.read(Memo.class, jsonNode); + assertThat(jsonNode.get("id").asText()).isEqualTo(memo.getId()); + assertThat(jsonNode.get(TestConstants.PROPERTY_MESSAGE).asText()).isEqualTo(TestConstants.MESSAGE); + assertThat(jsonNode.get(TestConstants.PROPERTY_DATE).asLong()).isEqualTo(date); } @Test diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java index 1128cefbf5a5..5ff98407b2de 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java @@ -6,6 +6,7 @@ import com.azure.spring.data.cosmos.exception.IllegalQueryException; import org.junit.Assert; import org.junit.Test; +import org.springframework.data.repository.query.parser.Part; import java.util.Arrays; import java.util.Collections; @@ -19,20 +20,24 @@ public class CriteriaUnitTest { @Test public void testUnaryCriteria() { final List values = Arrays.asList(CRITERIA_OBJECT); - final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, CRITERIA_KEY, values); + final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, + CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); Assert.assertTrue(criteria.getSubCriteria().isEmpty()); Assert.assertEquals(values, criteria.getSubjectValues()); Assert.assertEquals(CriteriaType.IS_EQUAL, criteria.getType()); Assert.assertEquals(CRITERIA_KEY, criteria.getSubject()); Assert.assertTrue(CriteriaType.isBinary(criteria.getType())); + Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); } @Test public void testBinaryCriteria() { final List values = Arrays.asList(CRITERIA_OBJECT); - final Criteria leftCriteria = Criteria.getInstance(CriteriaType.IS_EQUAL, CRITERIA_KEY, values); - final Criteria rightCriteria = Criteria.getInstance(CriteriaType.IS_EQUAL, CRITERIA_OBJECT, values); + final Criteria leftCriteria = Criteria.getInstance(CriteriaType.IS_EQUAL, + CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); + final Criteria rightCriteria = Criteria.getInstance(CriteriaType.IS_EQUAL, + CRITERIA_OBJECT, values, Part.IgnoreCaseType.NEVER); final Criteria criteria = Criteria.getInstance(CriteriaType.AND, leftCriteria, rightCriteria); Assert.assertNotNull(criteria.getSubCriteria()); @@ -44,12 +49,16 @@ public void testBinaryCriteria() { Assert.assertEquals(2, criteria.getSubCriteria().size()); Assert.assertEquals(leftCriteria, criteria.getSubCriteria().get(0)); Assert.assertEquals(rightCriteria, criteria.getSubCriteria().get(1)); + + Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(0).getIgnoreCase()); + Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(1).getIgnoreCase()); } @Test(expected = IllegalQueryException.class) public void testInvalidInKeywordParameter() { final List values = Collections.singletonList(CRITERIA_OBJECT); - final Criteria criteria = Criteria.getInstance(CriteriaType.IN, CRITERIA_KEY, values); + final Criteria criteria = Criteria.getInstance(CriteriaType.IN, + CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); new FindQuerySpecGenerator().generateCosmos(query); @@ -58,7 +67,8 @@ public void testInvalidInKeywordParameter() { @Test(expected = IllegalQueryException.class) public void testInvalidInKeywordType() { final List values = Collections.singletonList(new IllegalQueryException("")); - final Criteria criteria = Criteria.getInstance(CriteriaType.IN, CRITERIA_KEY, values); + final Criteria criteria = Criteria.getInstance(CriteriaType.IN, + CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); new FindQuerySpecGenerator().generateCosmos(query); diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/DocumentQueryUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/DocumentQueryUnitTest.java index 06cdf4370ac6..553e4e9acf75 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/DocumentQueryUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/DocumentQueryUnitTest.java @@ -6,6 +6,7 @@ import org.junit.Test; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; +import org.springframework.data.repository.query.parser.Part; import java.util.Arrays; @@ -17,12 +18,13 @@ public class DocumentQueryUnitTest { @Test public void testDocumentQueryCreate() { final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, CRITERIA_KEY, - Arrays.asList(CRITERIA_OBJECT)); + Arrays.asList(CRITERIA_OBJECT), Part.IgnoreCaseType.NEVER); final DocumentQuery query = new DocumentQuery(criteria); Assert.assertEquals(criteria, query.getCriteria()); Assert.assertEquals(Sort.unsorted(), query.getSort()); Assert.assertEquals(Pageable.unpaged(), query.getPageable()); + Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/LongIdDomain.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/LongIdDomain.java new file mode 100644 index 000000000000..5cf3fe2f3e2d --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/LongIdDomain.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.domain; + +import com.azure.spring.data.cosmos.core.mapping.Document; +import org.springframework.data.annotation.Id; + +import java.util.Objects; + +@Document +public class LongIdDomain { + + @Id + private Long number; + + private String name; + + public LongIdDomain(Long number, String name) { + this.number = number; + this.name = name; + } + + public LongIdDomain() { + } + + public Long getNumber() { + return number; + } + + public void setNumber(Long number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LongIdDomain that = (LongIdDomain) o; + return Objects.equals(number, that.number) + && Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(number, name); + } + + @Override + public String toString() { + return "LongIdDomain{" + + "number=" + + number + + ", name='" + + name + + '\'' + + '}'; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/LongIdDomainPartition.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/LongIdDomainPartition.java new file mode 100644 index 000000000000..17edcbd0da87 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/LongIdDomainPartition.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.domain; + +import com.azure.spring.data.cosmos.core.mapping.Document; +import com.azure.spring.data.cosmos.core.mapping.PartitionKey; +import org.springframework.data.annotation.Id; + +import java.util.Objects; + +@Document +public class LongIdDomainPartition { + + @Id + private Long number; + + @PartitionKey + private String name; + + public LongIdDomainPartition(Long number, String name) { + this.number = number; + this.name = name; + } + + public LongIdDomainPartition() { + } + + public Long getNumber() { + return number; + } + + public void setNumber(Long number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LongIdDomainPartition that = (LongIdDomainPartition) o; + return Objects.equals(number, that.number) + && Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(number, name); + } + + @Override + public String toString() { + return "LongIdDomain{" + + "number=" + + number + + ", name='" + + name + + '\'' + + '}'; + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/PageablePerson.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/PageablePerson.java index ad7d2197baf4..f1e0ac86acb7 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/PageablePerson.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/PageablePerson.java @@ -6,14 +6,13 @@ import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; -import com.azure.spring.data.cosmos.common.TestConstants; import org.springframework.data.annotation.Version; import java.util.List; import java.util.Objects; @Document() -@DocumentIndexingPolicy(includePaths = TestConstants.ORDER_BY_STRING_PATH) +@DocumentIndexingPolicy() public class PageablePerson { private String id; private String firstName; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Person.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Person.java index 3a4a64b55ed0..2fa20bf67bce 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Person.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Person.java @@ -6,14 +6,13 @@ import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; -import com.azure.spring.data.cosmos.common.TestConstants; import org.springframework.data.annotation.Version; import java.util.List; import java.util.Objects; @Document() -@DocumentIndexingPolicy(includePaths = TestConstants.ORDER_BY_STRING_PATH) +@DocumentIndexingPolicy() public class Person { private String id; private String firstName; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Project.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Project.java index 77b75e914258..e02dab6b3725 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Project.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Project.java @@ -5,13 +5,12 @@ import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; -import com.azure.spring.data.cosmos.common.TestConstants; import org.springframework.data.annotation.Id; import java.util.Objects; @Document() -@DocumentIndexingPolicy(includePaths = TestConstants.ORDER_BY_STRING_PATH) +@DocumentIndexingPolicy() public class Project { @Id diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Question.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Question.java index 2c1c9f6a6384..db7269e9830b 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Question.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Question.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.domain; -import com.azure.data.cosmos.IndexingMode; +import com.azure.cosmos.models.IndexingMode; import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; @@ -12,7 +12,7 @@ import java.util.UUID; @Document -@DocumentIndexingPolicy(mode = IndexingMode.LAZY) +@DocumentIndexingPolicy(mode = IndexingMode.CONSISTENT) public class Question { @Id diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Role.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Role.java index 1e04be72330f..b80304e172e0 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Role.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Role.java @@ -2,29 +2,20 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.domain; -import com.azure.data.cosmos.IndexingMode; +import com.azure.cosmos.models.IndexingMode; +import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; -import com.azure.spring.data.cosmos.common.TestConstants; import org.springframework.data.annotation.Id; import java.util.Objects; @DocumentIndexingPolicy( - mode = IndexingMode.LAZY, - automatic = TestConstants.INDEXINGPOLICY_AUTOMATIC, - includePaths = { - TestConstants.INCLUDEDPATH_0, - TestConstants.INCLUDEDPATH_1, - TestConstants.INCLUDEDPATH_2, - }, - excludePaths = { - TestConstants.EXCLUDEDPATH_0, - TestConstants.EXCLUDEDPATH_1, - }) -@Document(collection = TestConstants.ROLE_COLLECTION_NAME, - autoCreateCollection = false) + mode = IndexingMode.CONSISTENT, + automatic = TestConstants.INDEXING_POLICY_AUTOMATIC) +@Document(container = TestConstants.ROLE_COLLECTION_NAME, + autoCreateContainer = false) public class Role { @Id String id; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SortedProject.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SortedProject.java index 4bf8d7528f75..d1fa4472029e 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SortedProject.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SortedProject.java @@ -5,13 +5,12 @@ import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; -import com.azure.spring.data.cosmos.common.TestConstants; import org.springframework.data.annotation.Id; import java.util.Objects; @Document() -@DocumentIndexingPolicy(includePaths = TestConstants.ORDER_BY_STRING_PATH) +@DocumentIndexingPolicy() public class SortedProject { @Id diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SpELBeanStudent.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SpELBeanStudent.java index d426b7c241e7..c847ff289555 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SpELBeanStudent.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SpELBeanStudent.java @@ -7,7 +7,7 @@ import java.util.Objects; -@Document(collection = "#{@dynamicContainer.getContainerName()}") +@Document(container = "#{@dynamicContainer.getContainerName()}") public class SpELBeanStudent { private String id; private String firstName; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SpELPropertyStudent.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SpELPropertyStudent.java index 5d1a74296ad9..aab4c00198fb 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SpELPropertyStudent.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/SpELPropertyStudent.java @@ -7,7 +7,7 @@ import java.util.Objects; -@Document(collection = "${dynamic.collection.name}") +@Document(container = "${dynamic.collection.name}") public class SpELPropertyStudent { private String id; private String firstName; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Student.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Student.java index d3473617dcd7..82739641cc6a 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Student.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/Student.java @@ -4,11 +4,10 @@ package com.azure.spring.data.cosmos.domain; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; -import com.azure.spring.data.cosmos.common.TestConstants; import java.util.Objects; -@DocumentIndexingPolicy(includePaths = TestConstants.STARTSWITH_INCLUDEDPATH) +@DocumentIndexingPolicy() public class Student { private String id; private String firstName; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/TimeToLiveSample.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/TimeToLiveSample.java index 5c1a97acf7ab..581b546421e2 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/TimeToLiveSample.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/TimeToLiveSample.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.domain; -import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.common.TestConstants; +import com.azure.spring.data.cosmos.core.mapping.Document; @Document(timeToLive = TestConstants.TIME_TO_LIVE) public class TimeToLiveSample { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/PerfConfiguration.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/PerfConfiguration.java index d80a8c02da40..3bb9359ec445 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/PerfConfiguration.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/PerfConfiguration.java @@ -2,8 +2,9 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.performance; +import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; +import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.performance.utils.Constants; import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories; import org.springframework.beans.factory.annotation.Value; @@ -22,7 +23,12 @@ public class PerfConfiguration extends AbstractCosmosConfiguration { private String cosmosDbKey; @Bean - public CosmosDBConfig getConfig() { - return CosmosDBConfig.builder(cosmosDbUri, cosmosDbKey, Constants.PERF_DATABASE_NAME).build(); + public CosmosConfig getConfig() { + return CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .endpoint(cosmosDbUri) + .key(cosmosDbKey)) + .database(Constants.PERF_DATABASE_NAME) + .build(); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/PerformanceCompare.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/PerformanceCompare.java index 14256feed345..009da215e7f1 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/PerformanceCompare.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/PerformanceCompare.java @@ -2,9 +2,9 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.performance; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosClientException; -import com.azure.data.cosmos.sync.CosmosSyncClient; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosClient; +import com.azure.cosmos.CosmosException; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; import com.azure.spring.data.cosmos.performance.domain.PerfPerson; import com.azure.spring.data.cosmos.performance.repository.PerfPersonRepository; @@ -52,10 +52,10 @@ public class PerformanceCompare { private float acceptanceDiff; @Autowired - private CosmosSyncClient cosmosSyncClient; + private CosmosClient cosmosClient; @Autowired - private CosmosClient asyncClient; + private CosmosAsyncClient cosmosAsyncClient; @Autowired private PerfPersonRepository repository; @@ -65,16 +65,16 @@ public class PerformanceCompare { private static PerformanceReport report = new PerformanceReport(); @Before - public void setUp() throws CosmosClientException { + public void setUp() throws CosmosException { if (!hasInit) { - DatabaseUtils.createDatabase(cosmosSyncClient, Constants.PERF_DATABASE_NAME); - DatabaseUtils.createContainer(cosmosSyncClient, Constants.PERF_DATABASE_NAME, - Constants.SPRING_COLLECTION_NAME); - DatabaseUtils.createContainer(cosmosSyncClient, - Constants.PERF_DATABASE_NAME, Constants.SDK_COLLECTION_NAME); - - sdkService = new SdkService(cosmosSyncClient, Constants.PERF_DATABASE_NAME, - Constants.SDK_COLLECTION_NAME, asyncClient); + DatabaseUtils.createDatabase(cosmosClient, Constants.PERF_DATABASE_NAME); + DatabaseUtils.createContainer(cosmosClient, Constants.PERF_DATABASE_NAME, + Constants.SPRING_CONTAINER_NAME); + DatabaseUtils.createContainer(cosmosClient, + Constants.PERF_DATABASE_NAME, Constants.SDK_CONTAINER_NAME); + + sdkService = new SdkService(cosmosClient, Constants.PERF_DATABASE_NAME, + Constants.SDK_CONTAINER_NAME, cosmosAsyncClient); hasInit = true; } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/domain/PerfPerson.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/domain/PerfPerson.java index eb6e15ba1a07..12d5b4d425ba 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/domain/PerfPerson.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/domain/PerfPerson.java @@ -6,12 +6,11 @@ import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; import com.azure.spring.data.cosmos.performance.utils.Constants; -import com.azure.spring.data.cosmos.common.TestConstants; import java.util.Objects; -@Document(collection = Constants.SPRING_COLLECTION_NAME) -@DocumentIndexingPolicy(includePaths = TestConstants.ORDER_BY_STRING_PATH) +@Document(container = Constants.SPRING_CONTAINER_NAME) +@DocumentIndexingPolicy() public class PerfPerson { private String id; private String name; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/repository/PerfPersonRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/repository/PerfPersonRepository.java index 19cabb78bba7..510ff1696e3e 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/repository/PerfPersonRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/repository/PerfPersonRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.performance.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.performance.domain.PerfPerson; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Repository; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/service/SdkService.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/service/SdkService.java index b9fa8bb4d6b8..5cd8706cc51c 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/service/SdkService.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/service/SdkService.java @@ -2,11 +2,16 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.performance.service; -import com.azure.data.cosmos.*; -import com.azure.data.cosmos.sync.CosmosSyncClient; -import com.azure.spring.data.cosmos.performance.utils.DatabaseUtils; -import com.google.gson.Gson; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosClient; +import com.azure.cosmos.CosmosException; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.FeedResponse; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.performance.domain.PerfPerson; +import com.azure.spring.data.cosmos.performance.utils.DatabaseUtils; +import com.fasterxml.jackson.databind.JsonNode; import org.assertj.core.util.Lists; import org.springframework.data.domain.Sort; @@ -17,29 +22,25 @@ import java.util.stream.Collectors; public class SdkService { - private static Gson gson = new Gson(); - private final CosmosSyncClient cosmosSyncClient; + private final CosmosClient cosmosClient; private final String dbName; private final String containerName; - public SdkService(CosmosSyncClient client, String dbName, String containerName, CosmosClient asyncClient) { - this.cosmosSyncClient = client; + public SdkService(CosmosClient client, String dbName, String containerName, + CosmosAsyncClient cosmosAsyncClient) { + this.cosmosClient = client; this.dbName = dbName; this.containerName = containerName; } public PerfPerson save(PerfPerson person) { try { - final String personJson = gson.toJson(person); - final CosmosItemProperties personDoc = new CosmosItemProperties(personJson); - final CosmosItemProperties doc = cosmosSyncClient.getDatabase(dbName) - .getContainer(containerName) - .createItem(personDoc) - .properties(); - - return gson.fromJson(doc.toJson(), PerfPerson.class); + return cosmosClient.getDatabase(dbName) + .getContainer(containerName) + .createItem(person) + .getItem(); } catch (Exception e) { throw new IllegalStateException(e); // Runtime exception to fail directly } @@ -54,83 +55,85 @@ public List saveAll(Iterable personIterable) { public void delete(PerfPerson person) { try { - final String docLink = DatabaseUtils.getDocumentLink(dbName, containerName, person.getId()); - cosmosSyncClient.getDatabase(dbName) - .getContainer(containerName) - .getItem(person.getId(), PartitionKey.None) - .delete(new CosmosItemRequestOptions()); + final String docLink = DatabaseUtils.getDocumentLink(dbName, containerName, + person.getId()); + cosmosClient.getDatabase(dbName) + .getContainer(containerName) + .deleteItem(person.getId(), PartitionKey.NONE, + new CosmosItemRequestOptions()); - } catch (CosmosClientException e) { + } catch (CosmosException e) { throw new IllegalStateException(e); // Runtime exception to fail directly } } public void deleteAll(Iterable personIterable) { - personIterable.forEach(person -> delete(person)); + personIterable.forEach(this::delete); } - public CosmosItemProperties findById(String id) { - final Iterator> feedResponseIterator = - cosmosSyncClient.getDatabase(dbName) + public PerfPerson findById(String id) { + final Iterator> feedResponseIterator = + cosmosClient.getDatabase(dbName) .getContainer(containerName) .queryItems("SELECT * FROM " - + containerName - + " WHERE " - + containerName - + ".id='" - + id - + "'", new FeedOptions()); - CosmosItemProperties itemProperties = null; + + containerName + + " WHERE " + + containerName + + ".id='" + + id + + "'", new CosmosQueryRequestOptions(), PerfPerson.class) + .iterableByPage() + .iterator(); + PerfPerson perfPerson = null; if (feedResponseIterator.hasNext()) { - final List results = feedResponseIterator.next().results(); + final List results = feedResponseIterator.next().getResults(); if (!results.isEmpty()) { - itemProperties = results.get(0); + perfPerson = results.get(0); } } - return itemProperties; + return perfPerson; } public List findAllById(Iterable ids) { final String idsInList = String.join(",", - Arrays.asList(ids).stream().map(id -> "'" + id + "'").collect(Collectors.toList())); + Arrays.asList(ids).stream().map(id -> "'" + id + "'").collect(Collectors.toList())); final String sql = "SELECT * FROM " + containerName + " WHERE " + containerName + ".id IN (" - + idsInList + ")"; + + idsInList + ")"; - final FeedOptions feedOptions = new FeedOptions(); - feedOptions.enableCrossPartitionQuery(true); + final List docs = new ArrayList<>(); - final List docs = new ArrayList<>(); - - final Iterator> feedResponseIterator = cosmosSyncClient.getDatabase(dbName) - .getContainer(containerName) - .queryItems(sql, feedOptions); + final Iterator> feedResponseIterator = + cosmosClient.getDatabase(dbName) + .getContainer(containerName) + .queryItems(sql, new CosmosQueryRequestOptions(), PerfPerson.class) + .iterableByPage() + .iterator(); while (feedResponseIterator.hasNext()) { - final FeedResponse next = feedResponseIterator.next(); - docs.addAll(next.results()); + final FeedResponse next = feedResponseIterator.next(); + docs.addAll(next.getResults()); } - return fromDocuments(docs); + return docs; } public List findAll() { final String sql = "SELECT * FROM " + containerName; - final List docs = getCosmosItemPropertiesList(sql); - return fromDocuments(docs); + return getPerfPersonList(sql); } public boolean deleteAll() { final String sql = "SELECT * FROM " + containerName; - final List documents = getCosmosItemPropertiesList(sql); + final List documents = getPerfPersonList(sql); documents.forEach(document -> { try { - cosmosSyncClient.getDatabase(dbName) - .getContainer(containerName) - .getItem(document.id(), PartitionKey.None) - .delete(new CosmosItemRequestOptions().partitionKey(PartitionKey.None)); - } catch (CosmosClientException e) { + cosmosClient.getDatabase(dbName) + .getContainer(containerName) + .deleteItem(document.getId(), PartitionKey.NONE, + new CosmosItemRequestOptions()); + } catch (CosmosException e) { throw new IllegalStateException(e); } }); @@ -138,76 +141,70 @@ public boolean deleteAll() { return true; } - private List getCosmosItemPropertiesList(String sql) { - final List documents = new ArrayList<>(); - final Iterator> feedResponseIterator = - cosmosSyncClient.getDatabase(dbName) + private List getPerfPersonList(String sql, int size) { + final List documents = new ArrayList<>(); + final Iterator> feedResponseIterator = + cosmosClient.getDatabase(dbName) .getContainer(containerName) - .queryItems(sql, new FeedOptions().enableCrossPartitionQuery(true)); + .queryItems(sql, new CosmosQueryRequestOptions(), PerfPerson.class) + .iterableByPage(size) + .iterator(); while (feedResponseIterator.hasNext()) { - final FeedResponse next = feedResponseIterator.next(); - documents.addAll(next.results()); + final FeedResponse next = feedResponseIterator.next(); + documents.addAll(next.getResults()); } return documents; } + private List getPerfPersonList(String sql) { + // Pass default page size, which is 100 + return getPerfPersonList(sql, 100); + } + public List searchDocuments(Sort sort) { final Sort.Order order = sort.iterator().next(); // Only one Order supported final String sql = "SELECT * FROM " + containerName + " ORDER BY " + containerName + "." - + order.getProperty() + " " + order.getDirection().name(); - final List docs = getCosmosItemPropertiesList(sql); - - return fromDocuments(docs); + + order.getProperty() + " " + order.getDirection().name(); + return getPerfPersonList(sql); } public long count() { final String sql = "SELECT VALUE COUNT(1) FROM " + containerName; - final Iterator> feedResponseIterator = cosmosSyncClient.getDatabase(dbName) - .getContainer(containerName) - .queryItems(sql, new FeedOptions()); - final Object result = feedResponseIterator.next().results().get(0).get("_aggregate"); + final Iterator> feedResponseIterator = + cosmosClient.getDatabase(dbName) + .getContainer(containerName) + .queryItems(sql, new CosmosQueryRequestOptions(), JsonNode.class) + .iterableByPage() + .iterator(); - return result instanceof Integer ? Long.valueOf((Integer) result) : (Long) result; + return feedResponseIterator.next().getResults().get(0).get("_aggregate").asLong(); } public List findByName(String name) { final String sql = "SELECT * FROM " + containerName + " WHERE " + containerName + ".name='" - + name + "'"; - final Iterator result = getCosmosItemPropertiesList(sql).iterator(); - return fromDocuments(Lists.newArrayList(result)); + + name + "'"; + final Iterator result = getPerfPersonList(sql).iterator(); + return Lists.newArrayList(result); } public void queryTwoPages(int pageSize) { - final FeedOptions options = new FeedOptions(); - options.maxItemCount(pageSize); - options.requestContinuation(null); - - searchBySize(pageSize, options); - searchBySize(pageSize, options); + searchBySize(pageSize); + searchBySize(pageSize); } - private List searchBySize(int size, FeedOptions options) { + private List searchBySize(int size) { final String sql = "SELECT * FROM " + containerName; - final Iterator it = getCosmosItemPropertiesList(sql).iterator(); + final Iterator it = getPerfPersonList(sql, size).iterator(); final List entities = new ArrayList<>(); int i = 0; - while (it.hasNext() - && i++ < size) { - // This convert here is in order to mock data conversion in real use case, in order to compare with - // Spring Data mapping - final CosmosItemProperties d = it.next(); - final PerfPerson entity = gson.fromJson(d.toJson(), PerfPerson.class); - entities.add(entity); + while (it.hasNext() && i++ < size) { + final PerfPerson perfPerson = it.next(); + entities.add(perfPerson); } count(); // Mock same behavior with Spring pageable query, requires total elements count return entities; } - - private List fromDocuments(List documents) { - return documents.stream().map(d -> gson.fromJson(d.toJson(), PerfPerson.class)) - .collect(Collectors.toList()); - } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/utils/Constants.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/utils/Constants.java index 24061701bdb9..904e399372e2 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/utils/Constants.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/utils/Constants.java @@ -4,6 +4,6 @@ public class Constants { public static final String PERF_DATABASE_NAME = "perf_database"; - public static final String SPRING_COLLECTION_NAME = "spring_perf_coll"; - public static final String SDK_COLLECTION_NAME = "sdk_perf_coll"; + public static final String SPRING_CONTAINER_NAME = "spring_perf_container"; + public static final String SDK_CONTAINER_NAME = "sdk_perf_container"; } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/utils/DatabaseUtils.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/utils/DatabaseUtils.java index 14ced00fcd8f..bc210f9e1f32 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/utils/DatabaseUtils.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/performance/utils/DatabaseUtils.java @@ -2,45 +2,45 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.performance.utils; -import com.azure.data.cosmos.*; -import com.azure.data.cosmos.internal.RequestOptions; -import com.azure.data.cosmos.sync.CosmosSyncClient; +import com.azure.cosmos.CosmosClient; +import com.azure.cosmos.CosmosException; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.IncludedPath; +import com.azure.cosmos.models.IndexingPolicy; +import com.azure.cosmos.models.PartitionKeyDefinition; import java.util.Collections; import static com.azure.spring.data.cosmos.common.TestConstants.ORDER_BY_STRING_PATH; public class DatabaseUtils { - public static void createDatabase(CosmosSyncClient documentClient, String databaseName) - throws CosmosClientException { + public static void createDatabase(CosmosClient cosmosClient, String databaseName) + throws CosmosException { try { // Can use sync api once ready - documentClient.getDatabase(databaseName).delete(); + cosmosClient.getDatabase(databaseName).delete(); } catch (Exception e) { // Ignore delete failure } - documentClient.createDatabase(databaseName); + cosmosClient.createDatabase(databaseName); } - public static void deleteContainer(CosmosSyncClient documentClient, String databaseName, String containerName) - throws CosmosClientException { - final RequestOptions requestOptions = new RequestOptions(); - requestOptions.setOfferThroughput(1000); - - documentClient.getDatabase(databaseName).getContainer(containerName).delete(); + public static void deleteContainer(CosmosClient cosmosClient, String databaseName, String containerName) + throws CosmosException { + cosmosClient.getDatabase(databaseName).getContainer(containerName).delete(); } - public static void createContainer(CosmosSyncClient documentClient, String databaseName, String containerName) - throws CosmosClientException { + public static void createContainer(CosmosClient cosmosClient, String databaseName, String containerName) + throws CosmosException { final CosmosContainerProperties containerProperties = new CosmosContainerProperties(containerName, - new PartitionKeyDefinition().paths(Collections.singletonList("/mypk"))); + new PartitionKeyDefinition().setPaths(Collections.singletonList("/mypk"))); final IndexingPolicy policy = new IndexingPolicy(); policy.setIncludedPaths(Collections.singletonList(new IncludedPath(ORDER_BY_STRING_PATH))); - containerProperties.indexingPolicy(policy); + containerProperties.setIndexingPolicy(policy); - documentClient.getDatabase(databaseName).createContainer(containerProperties); + cosmosClient.getDatabase(databaseName).createContainer(containerProperties); } public static String getDocumentLink(String databaseName, String containerName, Object documentId) { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java index 0ffa19fb7a73..e8c055618b8b 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java @@ -2,15 +2,14 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository; -import com.azure.data.cosmos.IndexingPolicy; +import com.azure.cosmos.models.IndexingPolicy; +import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.DocumentIndexingPolicy; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import com.azure.spring.data.cosmos.common.TestConstants; -import com.azure.spring.data.cosmos.common.TestUtils; import com.azure.spring.data.cosmos.domain.NoDBAnnotationPerson; import com.azure.spring.data.cosmos.domain.Role; import com.azure.spring.data.cosmos.domain.TimeToLiveSample; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.junit.Before; import org.junit.Test; import org.springframework.util.Assert; @@ -40,11 +39,9 @@ public void testDefaultIndexingPolicyAnnotation() { // ContainerName, RequestUnit, Automatic and IndexingMode Assert.isTrue(personInfo.getContainerName().equals(NoDBAnnotationPerson.class.getSimpleName()), "should be default collection name"); - Assert.isTrue(personInfo.getRequestUnit() == TestConstants.DEFAULT_REQUEST_UNIT, - "should be default request unit"); - Assert.isTrue(policy.automatic() == TestConstants.DEFAULT_INDEXINGPOLICY_AUTOMATIC, + Assert.isTrue(policy.isAutomatic() == TestConstants.DEFAULT_INDEXING_POLICY_AUTOMATIC, "should be default indexing policy automatic"); - Assert.isTrue(policy.indexingMode() == TestConstants.DEFAULT_INDEXINGPOLICY_MODE, + Assert.isTrue(policy.getIndexingMode() == TestConstants.DEFAULT_INDEXING_POLICY_MODE, "should be default indexing policy mode"); // IncludedPaths and ExcludedPaths @@ -52,8 +49,8 @@ public void testDefaultIndexingPolicyAnnotation() { // and the paths of policy will never be set from azure service. // testIndexingPolicyPathsEquals(policy.getIncludedPaths(), TestConstants.DEFAULT_INCLUDEDPATHS); // testIndexingPolicyPathsEquals(policy.getExcludedPaths(), TestConstants.DEFAULT_EXCLUDEDPATHS); - Assert.isTrue(policy.includedPaths().isEmpty(), "default includedpaths size must be 0"); - Assert.isTrue(policy.excludedPaths().isEmpty(), "default excludedpaths size must be 0"); + Assert.isTrue(policy.getIncludedPaths().isEmpty(), "default includedpaths size must be 0"); + Assert.isTrue(policy.getExcludedPaths().isEmpty(), "default excludedpaths size must be 0"); } @Test @@ -69,16 +66,14 @@ public void testIndexingPolicyAnnotation() { Assert.isTrue(roleInfo.getContainerName().equals(TestConstants.ROLE_COLLECTION_NAME), "should be Role(class) collection name"); - Assert.isTrue(roleInfo.getRequestUnit() == TestConstants.REQUEST_UNIT, - "should be Role(class) request unit"); - Assert.isTrue(policy.automatic() == TestConstants.INDEXINGPOLICY_AUTOMATIC, + Assert.isTrue(policy.isAutomatic() == TestConstants.INDEXING_POLICY_AUTOMATIC, "should be Role(class) indexing policy automatic"); - Assert.isTrue(policy.indexingMode() == TestConstants.INDEXINGPOLICY_MODE, + Assert.isTrue(policy.getIndexingMode() == TestConstants.INDEXING_POLICY_MODE, "should be Role(class) indexing policy mode"); // IncludedPaths and ExcludedPaths - TestUtils.testIndexingPolicyPathsEquals(policy.includedPaths(), TestConstants.INCLUDEDPATHS); - TestUtils.testIndexingPolicyPathsEquals(policy.excludedPaths(), TestConstants.EXCLUDEDPATHS); +// TestUtils.testIndexingPolicyPathsEquals(policy.getIncludedPaths(), TestConstants.INCLUDED_PATHS); +// TestUtils.testIndexingPolicyPathsEquals(policy.getExcludedPaths(), TestConstants.EXCLUDED_PATHS); } @Test diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java new file mode 100644 index 000000000000..d852de82373a --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository; + +import com.azure.cosmos.models.PartitionKey; +import com.azure.spring.data.cosmos.common.TestConstants; +import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; +import com.azure.spring.data.cosmos.domain.Person; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.assertj.core.api.Assertions; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import reactor.core.publisher.Mono; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = {TestRepositoryConfig.class, SecondaryTestRepositoryConfig.class}) +public class MultiCosmosTemplateIT { + private static final Person PRIMARY_TEST_PERSON = new Person(TestConstants.ID_1, + TestConstants.FIRST_NAME, + TestConstants.LAST_NAME, TestConstants.HOBBIES, TestConstants.ADDRESSES); + private static final Person SECONDARY_TEST_PERSON = new Person(TestConstants.ID_2, + TestConstants.NEW_FIRST_NAME, + TestConstants.NEW_LAST_NAME, TestConstants.HOBBIES, TestConstants.ADDRESSES); + private static CosmosEntityInformation personInfo; + private static boolean initialized; + @Autowired + @Qualifier("secondaryReactiveCosmosTemplate") + private ReactiveCosmosTemplate secondaryReactiveCosmosTemplate; + @Autowired + @Qualifier("reactiveCosmosTemplate") + private ReactiveCosmosTemplate primaryReactiveCosmosTemplate; + + @Before + public void setUp() throws ClassNotFoundException { + if (!initialized) { + personInfo = new CosmosEntityInformation<>(Person.class); + initialized = true; + } + } + + @After + public void cleanup() { + } + + @AfterClass + public static void afterClassCleanup() { + } + + @Test + public void testPrimaryTemplate() { + primaryReactiveCosmosTemplate.createContainerIfNotExists(personInfo).block(); + primaryReactiveCosmosTemplate.insert(PRIMARY_TEST_PERSON, + new PartitionKey(personInfo.getPartitionKeyFieldValue(PRIMARY_TEST_PERSON))).block(); + final Mono findById = primaryReactiveCosmosTemplate.findById(PRIMARY_TEST_PERSON.getId(), Person.class); + Assertions.assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.FIRST_NAME); + primaryReactiveCosmosTemplate.deleteAll(Person.class.getSimpleName(), Person.class).block(); + primaryReactiveCosmosTemplate.deleteContainer(personInfo.getContainerName()); + } + + @Test + public void testSecondaryTemplate() { + secondaryReactiveCosmosTemplate.createContainerIfNotExists(personInfo).block(); + secondaryReactiveCosmosTemplate.insert(SECONDARY_TEST_PERSON, + new PartitionKey(personInfo.getPartitionKeyFieldValue(SECONDARY_TEST_PERSON))).block(); + final Mono findById = secondaryReactiveCosmosTemplate.findById(SECONDARY_TEST_PERSON.getId(), Person.class); + Assertions.assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); + secondaryReactiveCosmosTemplate.deleteAll(Person.class.getSimpleName(), Person.class).block(); + secondaryReactiveCosmosTemplate.deleteContainer(personInfo.getContainerName()); + } + +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SecondaryTestRepositoryConfig.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SecondaryTestRepositoryConfig.java new file mode 100644 index 000000000000..dc18fbcb180c --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SecondaryTestRepositoryConfig.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository; + +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.spring.data.cosmos.CosmosFactory; +import com.azure.spring.data.cosmos.common.TestConstants; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; +import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; +import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories; +import com.azure.spring.data.cosmos.repository.config.EnableReactiveCosmosRepositories; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.util.StringUtils; + +@Configuration +@PropertySource(value = {"classpath:application.properties"}) +@EnableCosmosRepositories +@EnableReactiveCosmosRepositories(reactiveCosmosTemplateRef = "secondaryReactiveCosmosTemplate") +public class SecondaryTestRepositoryConfig { + @Value("${cosmos.secondary.uri:}") + private String cosmosDbUri; + + @Value("${cosmos.secondary.key:}") + private String cosmosDbKey; + + @Value("${cosmos.secondary.database:}") + private String database; + + @Value("${cosmos.secondary.queryMetricsEnabled}") + private boolean queryMetricsEnabled; + + @Bean + public ReactiveCosmosTemplate secondaryReactiveCosmosTemplate(MappingCosmosConverter mappingCosmosConverter) { + final String dbName = StringUtils.hasText(this.database) ? this.database : TestConstants.SECONDARY_DB_NAME; + CosmosConfig config = CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .key(cosmosDbKey) + .endpoint(cosmosDbUri) + .contentResponseOnWriteEnabled(true)) + .database(dbName) + .enableQueryMetrics(queryMetricsEnabled) + .build(); + return new ReactiveCosmosTemplate(new CosmosFactory(config), mappingCosmosConverter, config.getDatabase()); + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java index 39291c39e1cd..044efdfbbc89 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java @@ -3,9 +3,9 @@ package com.azure.spring.data.cosmos.repository; import com.azure.spring.data.cosmos.core.CosmosOperations; +import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; -import com.azure.spring.data.cosmos.domain.Person; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java index 80cb570fe988..b59dce650977 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java @@ -3,12 +3,12 @@ package com.azure.spring.data.cosmos.repository; -import com.azure.spring.data.cosmos.core.CosmosOperations; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; import com.azure.spring.data.cosmos.common.TestConstants; +import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.domain.Address; import com.azure.spring.data.cosmos.domain.Person; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; import org.assertj.core.util.Lists; import org.junit.Before; import org.junit.Rule; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/TestRepositoryConfig.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/TestRepositoryConfig.java index 2556f379aa8e..0fa81fed704f 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/TestRepositoryConfig.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/TestRepositoryConfig.java @@ -2,15 +2,14 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository; -import com.azure.data.cosmos.ConsistencyLevel; -import com.azure.data.cosmos.internal.RequestOptions; -import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; -import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories; -import com.azure.spring.data.cosmos.repository.config.EnableReactiveCosmosRepositories; +import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.common.DynamicContainer; import com.azure.spring.data.cosmos.common.ResponseDiagnosticsTestUtils; import com.azure.spring.data.cosmos.common.TestConstants; +import com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories; +import com.azure.spring.data.cosmos.repository.config.EnableReactiveCosmosRepositories; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -18,34 +17,21 @@ import org.springframework.util.StringUtils; @Configuration -@PropertySource(value = {"classpath:application.properties"}) +@PropertySource(value = { "classpath:application.properties" }) @EnableCosmosRepositories @EnableReactiveCosmosRepositories public class TestRepositoryConfig extends AbstractCosmosConfiguration { - @Value("${cosmosdb.uri:}") + @Value("${cosmos.uri:}") private String cosmosDbUri; - @Value("${cosmosdb.key:}") + @Value("${cosmos.key:}") private String cosmosDbKey; - @Value("${cosmosdb.connection-string:}") - private String connectionString; - - @Value("${cosmosdb.database:}") + @Value("${cosmos.database:}") private String database; - @Value("${cosmosdb.populateQueryMetrics}") - private boolean populateQueryMetrics; - - private RequestOptions getRequestOptions() { - final RequestOptions options = new RequestOptions(); - - options.setConsistencyLevel(ConsistencyLevel.SESSION); -// options.setDisableRUPerMinuteUsage(true); - options.setScriptLoggingEnabled(true); - - return options; - } + @Value("${cosmos.queryMetricsEnabled}") + private boolean queryMetricsEnabled; @Bean public ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils() { @@ -53,21 +39,17 @@ public ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils() { } @Bean - public CosmosDBConfig getConfig() { + public CosmosConfig getConfig() { final String dbName = StringUtils.hasText(this.database) ? this.database : TestConstants.DB_NAME; - final RequestOptions options = getRequestOptions(); - final CosmosDBConfig.CosmosDBConfigBuilder builder; - - if (StringUtils.hasText(this.cosmosDbUri) - && StringUtils.hasText(this.cosmosDbKey)) { - builder = CosmosDBConfig.builder(cosmosDbUri, cosmosDbKey, dbName); - } else { - builder = CosmosDBConfig.builder(connectionString, dbName); - } - return builder.requestOptions(options) - .populateQueryMetrics(populateQueryMetrics) - .responseDiagnosticsProcessor(responseDiagnosticsTestUtils().getResponseDiagnosticsProcessor()) - .build(); + return CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .key(cosmosDbKey) + .endpoint(cosmosDbUri) + .contentResponseOnWriteEnabled(true)) + .database(dbName) + .enableQueryMetrics(queryMetricsEnabled) + .responseDiagnosticsProcessor(responseDiagnosticsTestUtils().getResponseDiagnosticsProcessor()) + .build(); } @Bean diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java index 440cc1d93be9..73945c6eeee2 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java @@ -10,7 +10,7 @@ import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ResourceLoader; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; -import org.springframework.core.type.StandardAnnotationMetadata; +import org.springframework.core.type.AnnotationMetadata; import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; import org.springframework.data.repository.config.RepositoryConfiguration; import org.springframework.data.repository.config.RepositoryConfigurationSource; @@ -21,11 +21,11 @@ public class CosmosRepositoryConfigurationExtensionUnitTest { - StandardAnnotationMetadata metadata = new StandardAnnotationMetadata(Config.class, true); + AnnotationMetadata metadata = AnnotationMetadata.introspect(Config.class); ResourceLoader loader = new PathMatchingResourcePatternResolver(); Environment environment = new StandardEnvironment(); RepositoryConfigurationSource configurationSource = new AnnotationRepositoryConfigurationSource(metadata, - EnableCosmosRepositories.class, loader, environment, new DefaultListableBeanFactory()); + EnableCosmosRepositories.class, loader, environment, new DefaultListableBeanFactory(), null); private static void assertHashRepo(Class repositoryInterface, Collection> configs) { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java index 30b78a63900e..57e518e03ef6 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java @@ -10,7 +10,7 @@ import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ResourceLoader; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; -import org.springframework.core.type.StandardAnnotationMetadata; +import org.springframework.core.type.AnnotationMetadata; import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; import org.springframework.data.repository.config.RepositoryConfiguration; import org.springframework.data.repository.config.RepositoryConfigurationSource; @@ -21,11 +21,11 @@ public class ReactiveCosmosRepositoryConfigurationExtensionUnitTest { - StandardAnnotationMetadata metadata = new StandardAnnotationMetadata(Config.class, true); + AnnotationMetadata metadata = AnnotationMetadata.introspect(Config.class); ResourceLoader loader = new PathMatchingResourcePatternResolver(); Environment environment = new StandardEnvironment(); RepositoryConfigurationSource configurationSource = new AnnotationRepositoryConfigurationSource(metadata, - EnableReactiveCosmosRepositories.class, loader, environment, new DefaultListableBeanFactory()); + EnableReactiveCosmosRepositories.class, loader, environment, new DefaultListableBeanFactory(), null); private static void assertHashRepo(Class repositoryInterface, Collection> configs) { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java index 0a78bfebcbe8..024d38ad5e91 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java @@ -2,16 +2,21 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.data.cosmos.PartitionKey; -import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.common.TestUtils; +import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.domain.Address; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.assertj.core.util.Lists; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java index bbcb0aedadfc..7c256d9a8e03 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java @@ -2,14 +2,19 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.common.TestUtils; +import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.domain.Contact; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ContactRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.assertj.core.util.Lists; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java index 7c5253e0c118..40fb7e95f3b1 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java @@ -2,19 +2,19 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.data.cosmos.CosmosContainerProperties; -import com.azure.data.cosmos.IndexingPolicy; -import com.azure.spring.data.cosmos.CosmosDbFactory; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.IndexingPolicy; +import com.azure.spring.data.cosmos.CosmosFactory; +import com.azure.spring.data.cosmos.common.TestConstants; +import com.azure.spring.data.cosmos.common.TestUtils; +import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import com.azure.spring.data.cosmos.common.TestConstants; -import com.azure.spring.data.cosmos.common.TestUtils; import com.azure.spring.data.cosmos.domain.Role; import com.azure.spring.data.cosmos.domain.TimeToLiveSample; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.junit.AfterClass; import org.junit.Before; import org.junit.Ignore; @@ -39,7 +39,7 @@ public class CosmosAnnotationIT { @Autowired private ApplicationContext applicationContext; @Autowired - private CosmosDBConfig dbConfig; + private CosmosConfig cosmosConfig; private static CosmosTemplate cosmosTemplate; private static CosmosContainerProperties collectionRole; @@ -52,7 +52,7 @@ public class CosmosAnnotationIT { @Before public void setUp() throws ClassNotFoundException { if (!initialized) { - final CosmosDbFactory cosmosDbFactory = new CosmosDbFactory(dbConfig); + final CosmosFactory cosmosFactory = new CosmosFactory(cosmosConfig); roleInfo = new CosmosEntityInformation<>(Role.class); sampleInfo = new CosmosEntityInformation<>(TimeToLiveSample.class); @@ -62,7 +62,7 @@ public void setUp() throws ClassNotFoundException { final MappingCosmosConverter mappingConverter = new MappingCosmosConverter(dbContext, null); - cosmosTemplate = new CosmosTemplate(cosmosDbFactory, mappingConverter, dbConfig.getDatabase()); + cosmosTemplate = new CosmosTemplate(cosmosFactory, mappingConverter, cosmosConfig.getDatabase()); initialized = true; } collectionRole = cosmosTemplate.createContainerIfNotExists(roleInfo); @@ -81,24 +81,24 @@ public static void afterClassCleanup() { @Test public void testTimeToLiveAnnotation() { Integer timeToLive = sampleInfo.getTimeToLive(); - assertThat(timeToLive).isEqualTo(collectionSample.defaultTimeToLive()); + assertThat(timeToLive).isEqualTo(collectionSample.getDefaultTimeToLiveInSeconds()); timeToLive = roleInfo.getTimeToLive(); - assertThat(timeToLive).isEqualTo(collectionRole.defaultTimeToLive()); + assertThat(timeToLive).isEqualTo(collectionRole.getDefaultTimeToLiveInSeconds()); } @Test @Ignore // TODO(kuthapar): Ignore this test case for now, will update this from service update. public void testIndexingPolicyAnnotation() { - final IndexingPolicy policy = collectionRole.indexingPolicy(); + final IndexingPolicy policy = collectionRole.getIndexingPolicy(); - Assert.isTrue(policy.indexingMode() == TestConstants.INDEXINGPOLICY_MODE, + Assert.isTrue(policy.getIndexingMode() == TestConstants.INDEXING_POLICY_MODE, "unmatched collection policy indexing mode of class Role"); - Assert.isTrue(policy.automatic() == TestConstants.INDEXINGPOLICY_AUTOMATIC, + Assert.isTrue(policy.isAutomatic() == TestConstants.INDEXING_POLICY_AUTOMATIC, "unmatched collection policy automatic of class Role"); - TestUtils.testIndexingPolicyPathsEquals(policy.includedPaths(), TestConstants.INCLUDEDPATHS); - TestUtils.testIndexingPolicyPathsEquals(policy.excludedPaths(), TestConstants.EXCLUDEDPATHS); + TestUtils.testIndexingPolicyPathsEquals(policy.getIncludedPaths(), TestConstants.INCLUDED_PATHS); + TestUtils.testIndexingPolicyPathsEquals(policy.getExcludedPaths(), TestConstants.EXCLUDED_PATHS); } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java index 5b2eb1866a5e..a910b94adb38 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java @@ -3,11 +3,15 @@ package com.azure.spring.data.cosmos.repository.integration; import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.domain.Customer; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.CustomerRepository; -import org.junit.*; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java index ec95314fb903..66c4f357f171 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java @@ -4,12 +4,16 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.domain.IntegerIdDomain; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.IntegerIdDomainRepository; -import org.junit.*; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; @@ -17,7 +21,12 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import java.util.*; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; import java.util.stream.Collectors; import java.util.stream.StreamSupport; @@ -112,7 +121,6 @@ public void testSaveAllAndFindAll() { } @Test - @Ignore // TODO(kuthapar): findById IN clause not working in case of Integer public void testFindAllById() { final Iterable allById = this.repository.findAllById(Collections.singleton(DOMAIN.getNumber())); @@ -131,7 +139,7 @@ public void testDeleteById() { Assert.assertEquals(0, this.repository.count()); } - @Test(expected = CosmosDBAccessException.class) + @Test(expected = CosmosAccessException.class) public void testDeleteByIdShouldFailIfNothingToDelete() { this.repository.deleteAll(); this.repository.deleteById(DOMAIN.getNumber()); @@ -144,7 +152,7 @@ public void testDelete() { Assert.assertEquals(0, this.repository.count()); } - @Test(expected = CosmosDBAccessException.class) + @Test(expected = CosmosAccessException.class) public void testDeleteShouldFailIfNothingToDelete() { this.repository.deleteAll(); this.repository.delete(DOMAIN); diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java new file mode 100644 index 000000000000..c14990287557 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.integration; + +import com.azure.spring.data.cosmos.core.CosmosTemplate; +import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; +import com.azure.spring.data.cosmos.domain.LongIdDomain; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; +import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; +import com.azure.spring.data.cosmos.repository.repository.LongIdDomainRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Sort; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.Arrays; +import java.util.Comparator; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfig.class) +public class LongIdDomainRepositoryIT { + + private static final Long ID_1 = 12345L; + private static final String NAME_1 = "moary"; + + private static final Long ID_2 = 67890L; + private static final String NAME_2 = "camille"; + + private static final LongIdDomain DOMAIN_1 = new LongIdDomain(ID_1, NAME_1); + private static final LongIdDomain DOMAIN_2 = new LongIdDomain(ID_2, NAME_2); + + private static final CosmosEntityInformation entityInformation = + new CosmosEntityInformation<>(LongIdDomain.class); + + private static CosmosTemplate staticTemplate; + private static boolean isSetupDone; + + @Autowired + private CosmosTemplate template; + + @Autowired + private LongIdDomainRepository repository; + + @Before + public void setUp() { + if (!isSetupDone) { + staticTemplate = template; + template.createContainerIfNotExists(entityInformation); + } + this.repository.save(DOMAIN_1); + this.repository.save(DOMAIN_2); + isSetupDone = true; + } + + @After + public void cleanup() { + this.repository.deleteAll(); + } + + @AfterClass + public static void afterClassCleanup() { + staticTemplate.deleteContainer(entityInformation.getContainerName()); + } + + @Test + public void testLongIdDomain() { + this.repository.deleteAll(); + Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + + this.repository.save(DOMAIN_1); + final Optional foundOptional = this.repository.findById(ID_1); + + Assert.assertTrue(foundOptional.isPresent()); + Assert.assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); + Assert.assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); + + this.repository.delete(DOMAIN_1); + + Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + } + + @Test(expected = IllegalArgumentException.class) + public void testInvalidDomain() { + new CosmosEntityInformation(InvalidDomain.class); + } + + @Test + public void testBasicQuery() { + final LongIdDomain save = this.repository.save(DOMAIN_1); + Assert.assertNotNull(save); + } + + @Test + public void testSaveAndFindById() { + Assert.assertNotNull(this.repository.save(DOMAIN_1)); + + final Optional savedEntity = this.repository.findById(DOMAIN_1.getNumber()); + Assert.assertTrue(savedEntity.isPresent()); + Assert.assertEquals(DOMAIN_1, savedEntity.get()); + } + + @Test + public void testSaveAllAndFindAll() { + Assert.assertTrue(this.repository.findAll().iterator().hasNext()); + + final Set entitiesToSave = Stream.of(DOMAIN_1, DOMAIN_2).collect(Collectors.toSet()); + this.repository.saveAll(entitiesToSave); + + final Set savedEntities = StreamSupport.stream(this.repository.findAll().spliterator(), false) + .collect(Collectors.toSet()); + + Assert.assertTrue(entitiesToSave.containsAll(savedEntities)); + } + + @Test + public void testFindAllById() { + final Iterable allById = + this.repository.findAllById(Arrays.asList(DOMAIN_1.getNumber(), DOMAIN_2.getNumber())); + Assert.assertTrue(((ArrayList) allById).size() == 2); + Iterator it = allById.iterator(); + assertLongIdDomainEquals(Arrays.asList(it.next(), it.next()), Arrays.asList(DOMAIN_1, DOMAIN_2)); + } + + private void assertLongIdDomainEquals(List cur, List reference) { + cur.sort(Comparator.comparing(LongIdDomain::getNumber)); + reference.sort(Comparator.comparing(LongIdDomain::getNumber)); + Assert.assertEquals(reference, cur); + } + + @Test + public void testCount() { + Assert.assertEquals(2, repository.count()); + } + + @Test + public void testDeleteById() { + this.repository.save(DOMAIN_1); + this.repository.save(DOMAIN_2); + this.repository.deleteById(DOMAIN_1.getNumber()); + this.repository.deleteById(DOMAIN_2.getNumber()); + Assert.assertEquals(0, this.repository.count()); + } + + @Test(expected = CosmosAccessException.class) + public void testDeleteByIdShouldFailIfNothingToDelete() { + this.repository.deleteAll(); + this.repository.deleteById(DOMAIN_1.getNumber()); + } + + @Test + public void testDelete() { + this.repository.save(DOMAIN_1); + this.repository.delete(DOMAIN_1); + Assert.assertEquals(1, this.repository.count()); + } + + @Test(expected = CosmosAccessException.class) + public void testDeleteShouldFailIfNothingToDelete() { + this.repository.deleteAll(); + this.repository.delete(DOMAIN_1); + } + + @Test + public void testDeleteAll() { + this.repository.save(DOMAIN_1); + this.repository.save(DOMAIN_2); + this.repository.deleteAll(Arrays.asList(DOMAIN_1, DOMAIN_2)); + Assert.assertEquals(0, this.repository.count()); + } + + @Test + public void testExistsById() { + this.repository.save(DOMAIN_1); + Assert.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); + } + + @Test + public void testFindAllSort() { + final LongIdDomain other = new LongIdDomain(DOMAIN_1.getNumber() + 1, "other-name"); + this.repository.save(other); + this.repository.save(DOMAIN_1); + + final Sort ascSort = Sort.by(Sort.Direction.ASC, "number"); + final List ascending = StreamSupport + .stream(this.repository.findAll(ascSort).spliterator(), false) + .collect(Collectors.toList()); + Assert.assertEquals(3, ascending.size()); + Assert.assertEquals(DOMAIN_1, ascending.get(0)); + Assert.assertEquals(other, ascending.get(1)); + Assert.assertEquals(DOMAIN_2, ascending.get(2)); + + final Sort descSort = Sort.by(Sort.Direction.DESC, "number"); + final List descending = StreamSupport + .stream(this.repository.findAll(descSort).spliterator(), false) + .collect(Collectors.toList()); + Assert.assertEquals(3, descending.size()); + Assert.assertEquals(DOMAIN_2, descending.get(0)); + Assert.assertEquals(other, descending.get(1)); + Assert.assertEquals(DOMAIN_1, descending.get(2)); + + } + + @Test + public void testFindAllPageable() { + final LongIdDomain other = new LongIdDomain(DOMAIN_1.getNumber() + 1, "other-name"); + this.repository.save(other); + + final Page page1 = this.repository.findAll(new CosmosPageRequest(0, 1, null)); + final Iterator page1Iterator = page1.iterator(); + Assert.assertTrue(page1Iterator.hasNext()); + Assert.assertEquals(DOMAIN_1, page1Iterator.next()); + + final Page page2 = this.repository.findAll(new CosmosPageRequest(1, 1, null)); + final Iterator page2Iterator = page2.iterator(); + Assert.assertTrue(page2Iterator.hasNext()); + Assert.assertEquals(DOMAIN_1, page2Iterator.next()); + } + + private static class InvalidDomain { + + private long count; + + private String location; + + InvalidDomain() { + } + + InvalidDomain(long count, String location) { + this.count = count; + this.location = location; + } + + public long getCount() { + return count; + } + + public void setCount(long count) { + this.count = count; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvalidDomain that = (InvalidDomain) o; + return count == that.count + && Objects.equals(location, that.location); + } + + @Override + public int hashCode() { + return Objects.hash(count, location); + } + + @Override + public String toString() { + return "InvalidDomain{" + + "count=" + + count + + ", location='" + + location + + '\'' + + '}'; + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java index 11e0a8a504dd..eda4c1579c59 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java @@ -2,16 +2,22 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.common.TestUtils; +import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.domain.Importance; import com.azure.spring.data.cosmos.domain.Memo; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.MemoRepository; -import org.junit.*; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; @@ -240,7 +246,7 @@ private void assertMemoListEquals(List memos, List reference) { Assert.assertEquals(reference, memos); } - @Test(expected = CosmosDBAccessException.class) + @Test(expected = CosmosAccessException.class) @Ignore // TODO(pan): Ignore this test case for now, will update this from service update. public void testFindByStartsWithWithException() { repository.findByMessageStartsWith(testMemo1.getMessage()); diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java index dee802834c9a..5361cee83e5d 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java @@ -2,19 +2,18 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; -import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.FeedResponse; import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.common.TestUtils; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.core.CosmosTemplate; +import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; import com.azure.spring.data.cosmos.domain.PageableAddress; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageableAddressRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -65,7 +64,7 @@ public class PageableAddressRepositoryIT { private ApplicationContext applicationContext; @Autowired - private CosmosDBConfig dbConfig; + private CosmosConfig cosmosConfig; @Before public void setUp() { @@ -166,22 +165,22 @@ public void testFindWithoutPartitionKeyMultiPages() { public void testOffsetAndLimit() { final int skipCount = 2; final int takeCount = 2; - final List results = new ArrayList<>(); - final FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); - options.maxDegreeOfParallelism(2); + final List results = new ArrayList<>(); + final CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setMaxDegreeOfParallelism(2); final String query = "SELECT * from c OFFSET " + skipCount + " LIMIT " + takeCount; - final CosmosClient cosmosClient = applicationContext.getBean(CosmosClient.class); - final Flux> feedResponseFlux = - cosmosClient.getDatabase(dbConfig.getDatabase()) + final CosmosAsyncClient cosmosClient = applicationContext.getBean(CosmosAsyncClient.class); + final Flux> feedResponseFlux = + cosmosClient.getDatabase(cosmosConfig.getDatabase()) .getContainer(entityInformation.getContainerName()) - .queryItems(query, options); + .queryItems(query, options, PageableAddress.class) + .byPage(); StepVerifier.create(feedResponseFlux) .consumeNextWith(cosmosItemPropertiesFeedResponse -> - results.addAll(cosmosItemPropertiesFeedResponse.results())) + results.addAll(cosmosItemPropertiesFeedResponse.getResults())) .verifyComplete(); assertThat(results.size()).isEqualTo(takeCount); } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java index a941af82390b..4998508bee5b 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java @@ -2,18 +2,17 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.data.cosmos.CosmosClient; -import com.azure.data.cosmos.CosmosItemProperties; -import com.azure.data.cosmos.FeedOptions; -import com.azure.data.cosmos.FeedResponse; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.FeedResponse; +import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.domain.Importance; import com.azure.spring.data.cosmos.domain.PageableMemo; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageableMemoRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.junit.AfterClass; import org.junit.Before; import org.junit.Test; @@ -27,7 +26,13 @@ import reactor.core.publisher.Flux; import reactor.test.StepVerifier; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Random; +import java.util.Set; +import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; @@ -52,7 +57,7 @@ public class PageableMemoRepositoryIT { private ApplicationContext applicationContext; @Autowired - private CosmosDBConfig dbConfig; + private CosmosConfig cosmosConfig; private static Set memoSet; @@ -126,26 +131,26 @@ public void testOffsetAndLimitGreaterThanTotal() { verifyItemsWithOffsetAndLimit(skipCount, takeCount, TOTAL_CONTENT_SIZE - skipCount); } - private Flux> getItemsWithOffsetAndLimit(int skipCount, int takeCount) { - final FeedOptions options = new FeedOptions(); - options.enableCrossPartitionQuery(true); - options.maxDegreeOfParallelism(2); + private Flux> getItemsWithOffsetAndLimit(int skipCount, int takeCount) { + final CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setMaxDegreeOfParallelism(2); final String query = "SELECT * from c OFFSET " + skipCount + " LIMIT " + takeCount; - final CosmosClient cosmosClient = applicationContext.getBean(CosmosClient.class); - return cosmosClient.getDatabase(dbConfig.getDatabase()) - .getContainer(entityInformation.getContainerName()) - .queryItems(query, options); + final CosmosAsyncClient cosmosClient = applicationContext.getBean(CosmosAsyncClient.class); + return cosmosClient.getDatabase(cosmosConfig.getDatabase()) + .getContainer(entityInformation.getContainerName()) + .queryItems(query, options, PageableMemo.class) + .byPage(); } private void verifyItemsWithOffsetAndLimit(int skipCount, int takeCount, int verifyCount) { - final List itemsWithOffsetAndLimit = new ArrayList<>(); - final Flux> itemsWithOffsetAndLimitFlux = + final List itemsWithOffsetAndLimit = new ArrayList<>(); + final Flux> itemsWithOffsetAndLimitFlux = getItemsWithOffsetAndLimit(skipCount, takeCount); StepVerifier.create(itemsWithOffsetAndLimitFlux) .thenConsumeWhile(cosmosItemPropertiesFeedResponse -> { - itemsWithOffsetAndLimit.addAll(cosmosItemPropertiesFeedResponse.results()); + itemsWithOffsetAndLimit.addAll(cosmosItemPropertiesFeedResponse.getResults()); return true; }) .verifyComplete(); diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java index 20cc38a9ce36..75a4399caa85 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java @@ -4,12 +4,11 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.domain.Address; import com.azure.spring.data.cosmos.domain.PageablePerson; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageablePersonRepository; -import org.apache.commons.io.FileUtils; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.apache.commons.lang3.StringUtils; import org.junit.AfterClass; import org.junit.Before; @@ -21,7 +20,11 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; @@ -29,7 +32,8 @@ @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageablePersonRepositoryIT { - private static final int TOTAL_CONTENT_SIZE = 50; + private static final int TOTAL_CONTENT_SIZE = 25; + public static final int ONE_KB = 1024; private static final CosmosEntityInformation entityInformation = new CosmosEntityInformation<>(PageablePerson.class); @@ -59,7 +63,7 @@ public void setUp() { for (int i = 0; i < TOTAL_CONTENT_SIZE; i++) { final List hobbies = new ArrayList<>(); hobbies.add(StringUtils.repeat("hobbies-" + UUID.randomUUID().toString(), - (int) FileUtils.ONE_KB * 10)); + ONE_KB * 10)); final List
    address = new ArrayList<>(); address.add(new Address("postalCode-" + UUID.randomUUID().toString(), "street-" + UUID.randomUUID().toString(), @@ -81,18 +85,18 @@ public static void afterClassCleanup() { // Cosmos DB can return any number of documents less than or equal to requested page size // Because of available RUs, the number of return documents vary. // With documents more than 10 KB, and collection RUs 400, - // it usually return documents less than total content size. + // it usually return documents less than total 12 documents. - // This test covers the case where page size is greater than returned documents + // This test covers the case where page size is greater than returned documents limit @Test - public void testFindAllWithPageSizeGreaterThanReturned() { - final Set outputSet = findAllWithPageSize(30, false); + public void testFindAllWithPageSizeGreaterThanReturnedLimit() { + final Set outputSet = findAllWithPageSize(15, true); assertThat(outputSet).isEqualTo(personSet); } - // This test covers the case where page size is less than returned documents + // This test covers the case where page size is less than returned documents limit @Test - public void testFindAllWithPageSizeLessThanReturned() { + public void testFindAllWithPageSizeLessThanReturnedLimit() { final Set outputSet = findAllWithPageSize(5, false); assertThat(outputSet).isEqualTo(personSet); } @@ -100,23 +104,25 @@ public void testFindAllWithPageSizeLessThanReturned() { // This test covers the case where page size is greater than total number of documents @Test public void testFindAllWithPageSizeGreaterThanTotal() { - final Set outputSet = findAllWithPageSize(120, true); + final Set outputSet = findAllWithPageSize(50, true); assertThat(outputSet).isEqualTo(personSet); } private Set findAllWithPageSize(int pageSize, boolean checkContentLimit) { final CosmosPageRequest pageRequest = new CosmosPageRequest(0, pageSize, null); Page page = repository.findAll(pageRequest); - final Set outputSet = new HashSet<>(page.getContent()); + List content = page.getContent(); + final Set outputSet = new HashSet<>(content); if (checkContentLimit) { // Make sure CosmosDB returns less number of documents than requested // This will verify the functionality of new pagination implementation - assertThat(page.getContent().size()).isLessThan(pageSize); + assertThat(content.size()).isLessThan(pageSize); } while (page.hasNext()) { final Pageable pageable = page.nextPageable(); page = repository.findAll(pageable); - outputSet.addAll((page.getContent())); + content = page.getContent(); + outputSet.addAll((content)); } return outputSet; } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java index 3910aa2a3be1..f88e03546b3a 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java @@ -2,23 +2,32 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import com.google.common.collect.Lists; import com.azure.spring.data.cosmos.domain.Project; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ProjectRepository; -import org.junit.*; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertTrue; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) @@ -65,7 +74,7 @@ public class ProjectRepositoryIT { private static final List PROJECTS = Arrays.asList(PROJECT_0, PROJECT_1, PROJECT_2, PROJECT_3, PROJECT_4); private static final CosmosEntityInformation entityInformation = - new CosmosEntityInformation<>(Project.class); + new CosmosEntityInformation<>(Project.class); private static CosmosTemplate staticTemplate; private static boolean isSetupDone; @@ -209,7 +218,7 @@ public void testFindByWithOrOr() { @Test public void testFindByWithOrAndOr() { List projects = repository.findByNameOrCreatorAndForkCountOrStarCount(NAME_1, CREATOR_0, - FORK_COUNT_2, STAR_COUNT_3); + FORK_COUNT_2, STAR_COUNT_3); assertProjectListEquals(projects, Arrays.asList(PROJECT_1, PROJECT_3)); @@ -218,7 +227,7 @@ public void testFindByWithOrAndOr() { assertProjectListEquals(projects, Arrays.asList(PROJECT_0, PROJECT_1, PROJECT_3, PROJECT_4)); projects = repository.findByNameOrCreatorAndForkCountOrStarCount(FAKE_NAME, CREATOR_1, - FORK_COUNT_0, FAKE_COUNT); + FORK_COUNT_0, FAKE_COUNT); Assert.assertTrue(projects.isEmpty()); } @@ -285,7 +294,7 @@ public void testFindByLessThanAndGreaterThan() { @Test public void testFindByLessThanEqualsAndGreaterThanEquals() { List projects = repository.findByForkCountLessThanEqualAndStarCountGreaterThan( - STAR_COUNT_MIN, FORK_COUNT_0); + STAR_COUNT_MIN, FORK_COUNT_0); Assert.assertTrue(projects.isEmpty()); @@ -385,17 +394,17 @@ public void testFindByIn() { @Test public void testFindByInWithAnd() { List projects = repository.findByCreatorInAndStarCountIn(Arrays.asList(CREATOR_0, CREATOR_1), - Arrays.asList(STAR_COUNT_2, STAR_COUNT_3)); + Arrays.asList(STAR_COUNT_2, STAR_COUNT_3)); Assert.assertTrue(projects.isEmpty()); projects = repository.findByCreatorInAndStarCountIn(Arrays.asList(CREATOR_0, CREATOR_1), - Arrays.asList(STAR_COUNT_0, STAR_COUNT_2)); + Arrays.asList(STAR_COUNT_0, STAR_COUNT_2)); assertProjectListEquals(projects, Arrays.asList(PROJECT_0, PROJECT_4)); projects = repository.findByCreatorInAndStarCountIn(Arrays.asList(CREATOR_0, CREATOR_1, CREATOR_2), - Arrays.asList(STAR_COUNT_0, STAR_COUNT_1, STAR_COUNT_2)); + Arrays.asList(STAR_COUNT_0, STAR_COUNT_1, STAR_COUNT_2)); assertProjectListEquals(projects, Arrays.asList(PROJECT_0, PROJECT_1, PROJECT_2, PROJECT_4)); } @@ -403,7 +412,7 @@ public void testFindByInWithAnd() { @Test public void testFindByNotIn() { List projects = repository.findByCreatorNotIn( - Arrays.asList(CREATOR_0, CREATOR_1, CREATOR_2, CREATOR_3)); + Arrays.asList(CREATOR_0, CREATOR_1, CREATOR_2, CREATOR_3)); Assert.assertTrue(projects.isEmpty()); @@ -419,17 +428,17 @@ public void testFindByNotIn() { @Test public void testFindByInWithNotIn() { List projects = repository.findByCreatorInAndStarCountNotIn(Collections.singletonList(FAKE_CREATOR), - Arrays.asList(STAR_COUNT_2, STAR_COUNT_3)); + Arrays.asList(STAR_COUNT_2, STAR_COUNT_3)); Assert.assertTrue(projects.isEmpty()); projects = repository.findByCreatorInAndStarCountNotIn(Arrays.asList(CREATOR_0, CREATOR_1), - Arrays.asList(STAR_COUNT_0, STAR_COUNT_2)); + Arrays.asList(STAR_COUNT_0, STAR_COUNT_2)); assertProjectListEquals(projects, Collections.singletonList(PROJECT_1)); projects = repository.findByCreatorInAndStarCountNotIn(Arrays.asList(CREATOR_0, CREATOR_1, CREATOR_2), - Arrays.asList(STAR_COUNT_1, STAR_COUNT_2)); + Arrays.asList(STAR_COUNT_1, STAR_COUNT_2)); assertProjectListEquals(projects, Arrays.asList(PROJECT_0, PROJECT_4)); } @@ -441,7 +450,7 @@ public void testFindByNameIsNull() { Assert.assertTrue(projects.isEmpty()); final Project nullNameProject = new Project("id-999", null, CREATOR_0, true, STAR_COUNT_0, - FORK_COUNT_0); + FORK_COUNT_0); this.repository.save(nullNameProject); projects = repository.findByNameIsNull(); @@ -470,7 +479,7 @@ public void testFindByNameIsNullWithAnd() { Assert.assertTrue(projects.isEmpty()); final Project nullNameProject = new Project("id-999", null, CREATOR_0, true, STAR_COUNT_0, - FORK_COUNT_0); + FORK_COUNT_0); this.repository.save(nullNameProject); projects = repository.findByNameIsNullAndForkCount(FORK_COUNT_0); @@ -497,7 +506,10 @@ public void testFindAllByPartitionKey() { repository.findAll(new PartitionKey(CREATOR_0)); // Since there are two projects with creator_0 assertThat(findAll.size()).isEqualTo(2); - assertThat(findAll.containsAll(Lists.newArrayList(PROJECT_0, PROJECT_4))).isTrue(); + List projectList = new ArrayList<>(); + projectList.add(PROJECT_0); + projectList.add(PROJECT_4); + assertThat(findAll.containsAll(projectList)).isTrue(); findAll = repository.findAll(new PartitionKey(CREATOR_1)); // Since there is one projects with creator_1 @@ -515,4 +527,10 @@ public void testFindAllByPartitionKey() { assertThat(findAll.size()).isEqualTo(1); assertThat(findAll.contains(PROJECT_3)).isTrue(); } + + @Test + public void testSqlInjection() { + List projects = this.repository.findAllByNameIn(Collections.singleton("sql) or (r.name <> ''")); + assertTrue(projects.isEmpty()); + } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java index 0402c2c9e8c7..d75df0779a2f 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java @@ -4,13 +4,17 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.domain.SortedProject; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.SortedProjectRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.assertj.core.util.Lists; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; @@ -141,7 +145,7 @@ public void testFindAllUnSorted() { Assert.assertEquals(PROJECTS, projects); } - @Test(expected = CosmosDBAccessException.class) + @Test(expected = CosmosAccessException.class) public void testFindAllSortMoreThanOneOrderException() { final Sort sort = Sort.by(Sort.Direction.ASC, "name", "creator"); @@ -156,7 +160,7 @@ public void testFindAllSortIgnoreCaseException() { this.repository.findAll(sort); } - @Test(expected = CosmosDBAccessException.class) + @Test(expected = CosmosAccessException.class) public void testFindAllSortMissMatchException() { final Sort sort = Sort.by(Sort.Direction.ASC, "fake-name"); diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java index 5410ca9f445e..5cd17d70a034 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java @@ -3,13 +3,16 @@ package com.azure.spring.data.cosmos.repository.integration; import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.domain.Question; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; -import com.azure.spring.data.cosmos.repository.repository.ProjectRepository; import com.azure.spring.data.cosmos.repository.repository.QuestionRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.assertj.core.util.Lists; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; @@ -41,9 +44,6 @@ public class QuestionRepositoryIT { @Autowired private QuestionRepository repository; - @Autowired - private ProjectRepository projectRepository; - @Before public void setUp() { if (!isSetupDone) { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java index df2780cfc216..c4f0694998af 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java @@ -2,13 +2,13 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.data.cosmos.PartitionKey; +import com.azure.cosmos.models.PartitionKey; import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; -import com.azure.spring.data.cosmos.exception.CosmosDBAccessException; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.domain.Course; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveCourseRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -133,6 +133,28 @@ public void testFindAll() { StepVerifier.create(allFlux).expectNextCount(4).verifyComplete(); } + @Test + public void testFindOneShouldFailIfMultipleResultsReturned() { + final Course course = new Course("unusedId", COURSE_1.getName(), COURSE_1.getDepartment()); + final Mono saveSecond = repository.save(course); + StepVerifier.create(saveSecond).expectNext(course).verifyComplete(); + + final Mono find = repository.findOneByName(COURSE_1.getName()); + StepVerifier.create(find).expectError(CosmosAccessException.class).verify(); + } + + @Test + public void testShouldFindSingleEntity() { + final Mono find = repository.findOneByName(COURSE_1.getName()); + StepVerifier.create(find).expectNext(COURSE_1).expectComplete().verify(); + } + + @Test + public void testShouldReturnEmptyMonoWhenNoResults() { + final Mono find = repository.findOneByName("unusedName"); + StepVerifier.create(find).verifyComplete(); + } + @Test public void testInsert() { final Mono save = repository.save(COURSE_5); @@ -151,7 +173,7 @@ public void testUpsert() { @Test public void testDeleteByIdWithoutPartitionKey() { final Mono deleteMono = repository.deleteById(COURSE_1.getCourseId()); - StepVerifier.create(deleteMono).expectError(CosmosDBAccessException.class).verify(); + StepVerifier.create(deleteMono).expectError(CosmosAccessException.class).verify(); } @Test @@ -179,13 +201,13 @@ public void testDeleteByEntity() { @Test public void testDeleteByIdNotFound() { final Mono deleteMono = repository.deleteById(COURSE_ID_5); - StepVerifier.create(deleteMono).expectError(CosmosDBAccessException.class).verify(); + StepVerifier.create(deleteMono).expectError(CosmosAccessException.class).verify(); } @Test public void testDeleteByEntityNotFound() { final Mono deleteMono = repository.delete(COURSE_5); - StepVerifier.create(deleteMono).expectError(CosmosDBAccessException.class).verify(); + StepVerifier.create(deleteMono).expectError(CosmosAccessException.class).verify(); } @Test @@ -257,4 +279,24 @@ public void testFindAllByPartitionKey() { }) .verifyComplete(); } + + @Test + public void testFindByNameIgnoreCase() { + final Flux findResult = repository.findByNameIgnoreCase(COURSE_NAME_1.toLowerCase()); + StepVerifier.create(findResult).expectNext(COURSE_1).verifyComplete(); + } + + @Test + public void testFindByNameAndDepartmentAllIgnoreCase() { + final Flux findResult = repository.findByNameAndDepartmentAllIgnoreCase( + COURSE_NAME_1.toLowerCase(), DEPARTMENT_NAME_3.toLowerCase()); + StepVerifier.create(findResult).expectNext(COURSE_1).verifyComplete(); + } + + @Test + public void testFindByNameOrDepartmentAllIgnoreCase() { + final Flux findResult = repository.findByNameOrDepartmentAllIgnoreCase( + COURSE_NAME_1.toLowerCase(), DEPARTMENT_NAME_3.toLowerCase()); + StepVerifier.create(findResult).expectNext(COURSE_1).verifyComplete(); + } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java new file mode 100644 index 000000000000..c06d9ec1cb89 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.integration; + +import com.azure.cosmos.models.PartitionKey; +import com.azure.spring.data.cosmos.core.CosmosTemplate; +import com.azure.spring.data.cosmos.domain.LongIdDomainPartition; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; +import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; +import com.azure.spring.data.cosmos.repository.repository.ReactiveLongIdDomainPartitionRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Sort; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.util.Arrays; +import java.util.Objects; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfig.class) +public class ReactiveLongIdDomainPartitionPartitionRepositoryIT { + + private static final Long ID_1 = 12345L; + private static final String NAME_1 = "moary"; + + private static final Long ID_2 = 67890L; + private static final String NAME_2 = "camille"; + + private static final LongIdDomainPartition DOMAIN_1 = new LongIdDomainPartition(ID_1, NAME_1); + private static final LongIdDomainPartition DOMAIN_2 = new LongIdDomainPartition(ID_2, NAME_2); + + private static final CosmosEntityInformation entityInformation = + new CosmosEntityInformation<>(LongIdDomainPartition.class); + + private static CosmosTemplate staticTemplate; + private static boolean isSetupDone; + + @Autowired + private CosmosTemplate template; + + @Autowired + private ReactiveLongIdDomainPartitionRepository repository; + + @Before + public void setUp() { + if (!isSetupDone) { + staticTemplate = template; + template.createContainerIfNotExists(entityInformation); + } + Flux savedAllFlux = this.repository.saveAll(Arrays.asList(DOMAIN_1, DOMAIN_2)); + StepVerifier.create(savedAllFlux).thenConsumeWhile(domain -> true).expectComplete().verify(); + isSetupDone = true; + } + + @After + public void cleanup() { + final Mono deletedMono = repository.deleteAll(); + StepVerifier.create(deletedMono).thenAwait().verifyComplete(); + } + + @AfterClass + public static void afterClassCleanup() { + staticTemplate.deleteContainer(entityInformation.getContainerName()); + } + + @Test + public void testLongIdDomainPartition() { + Mono deletedMono = this.repository.deleteAll(); + StepVerifier.create(deletedMono).thenAwait().verifyComplete(); + + Mono idMono = this.repository.findById(ID_1, + new PartitionKey(entityInformation.getPartitionKeyFieldValue(DOMAIN_1))); + StepVerifier.create(idMono).expectNextCount(0).verifyComplete(); + + Mono saveMono = this.repository.save(DOMAIN_1); + StepVerifier.create(saveMono).expectNext(DOMAIN_1).expectComplete().verify(); + + Mono findIdMono = this.repository.findById(ID_1, + new PartitionKey(entityInformation.getPartitionKeyFieldValue(DOMAIN_1))); + StepVerifier.create(findIdMono).expectNext(DOMAIN_1).expectComplete().verify(); + + Mono deleteMono = this.repository.delete(DOMAIN_1); + StepVerifier.create(deleteMono).verifyComplete(); + + Mono afterDelIdMono = this.repository.findById(ID_1, + new PartitionKey(entityInformation.getPartitionKeyFieldValue(DOMAIN_1))); + StepVerifier.create(afterDelIdMono).expectNextCount(0).verifyComplete(); + } + + @Test(expected = IllegalArgumentException.class) + public void testInvalidDomain() { + new CosmosEntityInformation(InvalidDomain.class); + } + + @Test + public void testSaveAllAndFindAll() { + final Mono deletedMono = repository.deleteAll(); + StepVerifier.create(deletedMono).thenAwait().verifyComplete(); + + Flux savedAllFlux = this.repository.saveAll(Arrays.asList(DOMAIN_1, DOMAIN_2)); + StepVerifier.create(savedAllFlux).expectNextCount(2).verifyComplete(); + + final Flux allFlux = repository.findAll(); + StepVerifier.create(allFlux).expectNextCount(2).verifyComplete(); + } + + @Test + public void testCount() { + Mono countMono = repository.count(); + StepVerifier.create(countMono).expectNext(2L).verifyComplete(); + } + + @Test + public void testDeleteByIdWithoutPartitionKey() { + final Mono deleteMono = repository.deleteById(DOMAIN_1.getNumber()); + StepVerifier.create(deleteMono).expectError(CosmosAccessException.class).verify(); + } + + @Test + public void testDeleteByIdAndPartitionKey() { + final Mono deleteMono = repository.deleteById(DOMAIN_1.getNumber(), + new PartitionKey(entityInformation.getPartitionKeyFieldValue(DOMAIN_1))); + StepVerifier.create(deleteMono).verifyComplete(); + + Mono findIdMono = this.repository.findById(ID_1, + new PartitionKey(entityInformation.getPartitionKeyFieldValue(DOMAIN_1))); + StepVerifier.create(findIdMono).expectNextCount(0).verifyComplete(); + } + + @Test + public void testDeleteByIdShouldFailIfNothingToDelete() { + final Mono deletedMono = repository.deleteAll(); + StepVerifier.create(deletedMono).thenAwait().verifyComplete(); + + final Mono deleteIdMono = repository.deleteById(DOMAIN_1.getNumber(), + new PartitionKey(entityInformation.getPartitionKeyFieldValue(DOMAIN_1))); + StepVerifier.create(deleteIdMono).expectError(CosmosAccessException.class).verify(); + } + + @Test + public void testDelete() { + Mono saveMono = this.repository.save(DOMAIN_1); + StepVerifier.create(saveMono).expectNext(DOMAIN_1).expectComplete().verify(); + + Mono deleteMono = this.repository.delete(DOMAIN_1); + StepVerifier.create(deleteMono).verifyComplete(); + + Mono countMono = repository.count(); + StepVerifier.create(countMono).expectNext(1L).verifyComplete(); + } + + @Test + public void testDeleteShouldFailIfNothingToDelete() { + final Mono deletedMono = repository.deleteAll(); + StepVerifier.create(deletedMono).thenAwait().verifyComplete(); + + Mono deleteIdMono = this.repository.delete(DOMAIN_1); + StepVerifier.create(deleteIdMono).expectError(CosmosAccessException.class).verify(); + } + + @Test + public void testDeleteAll() { + Flux savedAllFlux = this.repository.saveAll(Arrays.asList(DOMAIN_1, DOMAIN_2)); + StepVerifier.create(savedAllFlux).expectNextCount(2).verifyComplete(); + + final Mono deletedMono = repository.deleteAll(); + StepVerifier.create(deletedMono).thenAwait().verifyComplete(); + + Mono countMono = repository.count(); + StepVerifier.create(countMono).expectNext(0L).verifyComplete(); + } + + @Test + public void testExistsById() { + Mono saveMono = this.repository.save(DOMAIN_1); + StepVerifier.create(saveMono).expectNext(DOMAIN_1).expectComplete().verify(); + + Mono booleanMono = this.repository.existsById(DOMAIN_1.getNumber()); + StepVerifier.create(booleanMono).expectNext(true).expectComplete().verify(); + } + + @Test + public void testFindAllSort() { + final LongIdDomainPartition other = new LongIdDomainPartition( + DOMAIN_1.getNumber() + 1, "other-name"); + Flux savedAllFlux = this.repository.saveAll(Arrays.asList(DOMAIN_1, other)); + StepVerifier.create(savedAllFlux).thenConsumeWhile(domain -> true).expectComplete().verify(); + + final Sort ascSort = Sort.by(Sort.Direction.ASC, "number"); + Flux ascAllFlux = this.repository.findAll(ascSort); + StepVerifier.create(ascAllFlux).expectNext(DOMAIN_1, other, DOMAIN_2).verifyComplete(); + + final Sort descSort = Sort.by(Sort.Direction.DESC, "number"); + Flux descAllFlux = this.repository.findAll(descSort); + StepVerifier.create(descAllFlux).expectNext(DOMAIN_2, other, DOMAIN_1).verifyComplete(); + } + + private static class InvalidDomain { + + private long count; + + private String location; + + InvalidDomain() { + } + + InvalidDomain(long count, String location) { + this.count = count; + this.location = location; + } + + public long getCount() { + return count; + } + + public void setCount(long count) { + this.count = count; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvalidDomain that = (InvalidDomain) o; + return count == that.count + && Objects.equals(location, that.location); + } + + @Override + public int hashCode() { + return Objects.hash(count, location); + } + + @Override + public String toString() { + return "InvalidDomain{" + + "count=" + + count + + ", location='" + + location + + '\'' + + '}'; + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SingleResponseRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SingleResponseRepositoryIT.java new file mode 100644 index 000000000000..b8cc2a848ac5 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SingleResponseRepositoryIT.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.data.cosmos.repository.integration; + +import com.azure.spring.data.cosmos.core.CosmosTemplate; +import com.azure.spring.data.cosmos.domain.Contact; +import com.azure.spring.data.cosmos.exception.CosmosAccessException; +import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; +import com.azure.spring.data.cosmos.repository.repository.ContactRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Iterator; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfig.class) +public class SingleResponseRepositoryIT { + + private static final Contact TEST_CONTACT = new Contact("testId", "faketitle"); + + private static final CosmosEntityInformation entityInformation = + new CosmosEntityInformation<>(Contact.class); + + private static CosmosTemplate staticTemplate; + private static boolean isSetupDone; + + @Autowired + private ContactRepository repository; + + @Autowired + private CosmosTemplate template; + + @Before + public void setUp() { + if (!isSetupDone) { + staticTemplate = template; + template.createContainerIfNotExists(entityInformation); + } + repository.save(TEST_CONTACT); + isSetupDone = true; + } + + @After + public void cleanup() { + repository.deleteAll(); + } + + @AfterClass + public static void afterClassCleanup() { + staticTemplate.deleteContainer(entityInformation.getContainerName()); + } + + @Test + public void testShouldFindSingleEntity() { + final Contact contact = repository.findOneByTitle(TEST_CONTACT.getTitle()); + + Assert.assertEquals(TEST_CONTACT, contact); + } + + @Test + public void testShouldFindSingleOptionalEntity() { + final Optional contact = repository.findOptionallyByTitle(TEST_CONTACT.getTitle()); + Assert.assertTrue(contact.isPresent()); + Assert.assertEquals(TEST_CONTACT, contact.get()); + + Assert.assertFalse(repository.findOptionallyByTitle("not here").isPresent()); + } + + @Test(expected = CosmosAccessException.class) + public void testShouldFailIfMultipleResultsReturned() { + repository.save(new Contact("testId2", TEST_CONTACT.getTitle())); + + repository.findOneByTitle(TEST_CONTACT.getTitle()); + } + + @Test + public void testShouldAllowListAndIterableResponses() { + final List contactList = repository.findByTitle(TEST_CONTACT.getTitle()); + Assert.assertEquals(TEST_CONTACT, contactList.get(0)); + Assert.assertEquals(1, contactList.size()); + + final Iterator contactIterator = repository.findByLogicId(TEST_CONTACT.getLogicId()).iterator(); + Assert.assertTrue(contactIterator.hasNext()); + Assert.assertEquals(TEST_CONTACT, contactIterator.next()); + Assert.assertFalse(contactIterator.hasNext()); + } + +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java new file mode 100644 index 000000000000..bf2300cc0f2b --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.integration; + +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.spring.data.cosmos.CosmosFactory; +import com.azure.spring.data.cosmos.common.TestConstants; +import com.azure.spring.data.cosmos.config.CosmosConfig; +import com.azure.spring.data.cosmos.core.CosmosTemplate; +import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; +import com.azure.spring.data.cosmos.core.convert.ObjectMapperFactory; +import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; +import com.azure.spring.data.cosmos.domain.SpELBeanStudent; +import com.azure.spring.data.cosmos.domain.SpELPropertyStudent; +import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.context.ApplicationContext; +import org.springframework.data.annotation.Persistent; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfig.class) +public class SpELCosmosAnnotationIT { + private static final SpELPropertyStudent TEST_PROPERTY_STUDENT = + new SpELPropertyStudent(TestConstants.ID_1, TestConstants.FIRST_NAME, + TestConstants.LAST_NAME); + + @Value("${cosmos.uri}") + private String dbUri; + + @Value("${cosmos.key}") + private String dbKey; + + @Autowired + private ApplicationContext applicationContext; + + @Autowired + private CosmosTemplate cosmosTemplate; + + private static CosmosTemplate staticTemplate; + private static CosmosEntityInformation cosmosEntityInformation; + + @Before + public void setUp() { + if (staticTemplate == null) { + staticTemplate = cosmosTemplate; + } + } + + @AfterClass + public static void afterClassCleanup() { + if (cosmosEntityInformation != null) { + staticTemplate.deleteContainer(cosmosEntityInformation.getContainerName()); + } + } + + @Test + public void testDynamicContainerNameWithPropertySourceExpression() { + final CosmosEntityInformation propertyStudentInfo = + new CosmosEntityInformation<>(SpELPropertyStudent.class); + + assertEquals(TestConstants.DYNAMIC_PROPERTY_COLLECTION_NAME, propertyStudentInfo.getContainerName()); + } + + @Test + public void testDynamicContainerNameWithBeanExpression() { + final CosmosEntityInformation beanStudentInfo = + new CosmosEntityInformation<>(SpELBeanStudent.class); + + assertEquals(TestConstants.DYNAMIC_BEAN_COLLECTION_NAME, beanStudentInfo.getContainerName()); + } + + @Test + public void testDatabaseOperationsOnDynamicallyNamedCollection() throws ClassNotFoundException { + final CosmosConfig cosmosConfig = CosmosConfig.builder() + .cosmosClientBuilder(new CosmosClientBuilder() + .endpoint(dbUri) + .key(dbKey)) + .database(TestConstants.DB_NAME) + .build(); + final CosmosFactory dbFactory = new CosmosFactory(cosmosConfig); + + cosmosEntityInformation = new CosmosEntityInformation<>(SpELPropertyStudent.class); + final CosmosMappingContext dbContext = new CosmosMappingContext(); + dbContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); + + final ObjectMapper objectMapper = ObjectMapperFactory.getObjectMapper(); + final MappingCosmosConverter mappingConverter = new MappingCosmosConverter(dbContext, objectMapper); + staticTemplate = new CosmosTemplate(dbFactory, mappingConverter, TestConstants.DB_NAME); + + staticTemplate.createContainerIfNotExists(cosmosEntityInformation); + + final SpELPropertyStudent insertedRecord = + staticTemplate.insert(cosmosEntityInformation.getContainerName(), TEST_PROPERTY_STUDENT, null); + assertNotNull(insertedRecord); + + final SpELPropertyStudent readRecord = + staticTemplate.findById(TestConstants.DYNAMIC_PROPERTY_COLLECTION_NAME, + insertedRecord.getId(), SpELPropertyStudent.class); + assertNotNull(readRecord); + } + +} + diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosDBAnnotationIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosDBAnnotationIT.java deleted file mode 100644 index 608e26b6b60b..000000000000 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosDBAnnotationIT.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.spring.data.cosmos.repository.integration; - -import com.azure.spring.data.cosmos.CosmosDbFactory; -import com.azure.spring.data.cosmos.config.CosmosDBConfig; -import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter; -import com.azure.spring.data.cosmos.core.convert.ObjectMapperFactory; -import com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.azure.spring.data.cosmos.common.TestConstants; -import com.azure.spring.data.cosmos.domain.SpELBeanStudent; -import com.azure.spring.data.cosmos.domain.SpELPropertyStudent; -import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.domain.EntityScanner; -import org.springframework.context.ApplicationContext; -import org.springframework.data.annotation.Persistent; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = TestRepositoryConfig.class) -public class SpELCosmosDBAnnotationIT { - private static final SpELPropertyStudent TEST_PROPERTY_STUDENT = - new SpELPropertyStudent(TestConstants.ID_1, TestConstants.FIRST_NAME, - TestConstants.LAST_NAME); - - @Value("${cosmosdb.uri}") - private String dbUri; - - @Value("${cosmosdb.key}") - private String dbKey; - - @Autowired - private ApplicationContext applicationContext; - - @Autowired - private CosmosTemplate cosmosTemplate; - - private static CosmosTemplate staticTemplate; - private static CosmosEntityInformation cosmosEntityInformation; - - @Before - public void setUp() { - if (staticTemplate == null) { - staticTemplate = cosmosTemplate; - } - } - - @AfterClass - public static void afterClassCleanup() { - if (cosmosEntityInformation != null) { - staticTemplate.deleteContainer(cosmosEntityInformation.getContainerName()); - } - } - - @Test - public void testDynamicContainerNameWithPropertySourceExpression() { - final CosmosEntityInformation propertyStudentInfo = - new CosmosEntityInformation<>(SpELPropertyStudent.class); - - assertEquals(TestConstants.DYNAMIC_PROPERTY_COLLECTION_NAME, propertyStudentInfo.getContainerName()); - } - - @Test - public void testDynamicContainerNameWithBeanExpression() { - final CosmosEntityInformation beanStudentInfo = - new CosmosEntityInformation<>(SpELBeanStudent.class); - - assertEquals(TestConstants.DYNAMIC_BEAN_COLLECTION_NAME, beanStudentInfo.getContainerName()); - } - - @Test - public void testDatabaseOperationsOnDynamicallyNamedCollection() throws ClassNotFoundException { - final CosmosDBConfig dbConfig = CosmosDBConfig.builder(dbUri, dbKey, TestConstants.DB_NAME).build(); - final CosmosDbFactory dbFactory = new CosmosDbFactory(dbConfig); - - cosmosEntityInformation = new CosmosEntityInformation<>(SpELPropertyStudent.class); - final CosmosMappingContext dbContext = new CosmosMappingContext(); - dbContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); - - final ObjectMapper objectMapper = ObjectMapperFactory.getObjectMapper(); - final MappingCosmosConverter mappingConverter = new MappingCosmosConverter(dbContext, objectMapper); - staticTemplate = new CosmosTemplate(dbFactory, mappingConverter, TestConstants.DB_NAME); - - staticTemplate.createContainerIfNotExists(cosmosEntityInformation); - - final SpELPropertyStudent insertedRecord = - staticTemplate.insert(cosmosEntityInformation.getContainerName(), TEST_PROPERTY_STUDENT, null); - assertNotNull(insertedRecord); - - final SpELPropertyStudent readRecord = - staticTemplate.findById(TestConstants.DYNAMIC_PROPERTY_COLLECTION_NAME, - insertedRecord.getId(), SpELPropertyStudent.class); - assertNotNull(readRecord); - } - -} - diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java index f7a0bbbc9a5c..131fe0c75626 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java @@ -2,12 +2,12 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; -import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.common.TestUtils; +import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.domain.inheritance.Square; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.SquareRepository; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java index 5da443d21f66..c836ebb73f8f 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java @@ -3,11 +3,15 @@ package com.azure.spring.data.cosmos.repository.integration; import com.azure.spring.data.cosmos.core.CosmosTemplate; -import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.domain.Student; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.StudentRepository; -import org.junit.*; +import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; @@ -165,4 +169,53 @@ public void testExists() { assertTrue(repository.existsByLastNameContaining("N")); assertFalse(repository.existsByLastNameContaining("X")); } + + @Test + public void testFindByLastNameIgnoreCase() { + List people = repository.findByLastNameIgnoreCase(LAST_NAME_0.toLowerCase()); + assertPeopleEquals(people, Arrays.asList(STUDENT_0)); + assertTrue(people.get(0).getLastName().equals(LAST_NAME_0)); + } + + @Test + public void testFindByLastNameAndFirstNameAllIgnoreCase() { + List people = repository + .findByLastNameAndFirstNameAllIgnoreCase(LAST_NAME_0.toLowerCase(), FIRST_NAME_0.toLowerCase()); + assertPeopleEquals(people, Arrays.asList(STUDENT_0)); + assertTrue(people.get(0).getFirstName().equals(FIRST_NAME_0)); + assertTrue(people.get(0).getLastName().equals(LAST_NAME_0)); + } + + @Test + public void testFindByLastNameOrFirstNameAllIgnoreCase() { + List people = repository + .findByLastNameOrFirstNameAllIgnoreCase(LAST_NAME_0.toLowerCase(), FIRST_NAME_1.toLowerCase()); + assertPeopleEquals(people, Arrays.asList(STUDENT_0, STUDENT_1)); + } + + @Test + public void testFindByFirstNameEndsWithIgnoreCase() { + List people = repository + .findByFirstNameEndsWithIgnoreCase(FIRST_NAME_0.toLowerCase().substring(2)); + assertPeopleEquals(people, Arrays.asList(STUDENT_0)); + assertTrue(people.get(0).getFirstName().equals(FIRST_NAME_0)); + } + + @Test + public void testFindByLastNameStartsWithAndFirstNameStartsWithAllIgnoreCase() { + List people = repository + .findByLastNameStartsWithAndFirstNameStartsWithAllIgnoreCase( + LAST_NAME_0.toLowerCase().substring(0, 2), FIRST_NAME_0.toLowerCase().substring(0, 2)); + assertPeopleEquals(people, Arrays.asList(STUDENT_0)); + assertTrue(people.get(0).getLastName().equals(LAST_NAME_0)); + assertTrue(people.get(0).getFirstName().equals(FIRST_NAME_0)); + } + + @Test + public void testFindByLastNameStartsWithOrFirstNameStartsWithAllIgnoreCase() { + List people = repository + .findByLastNameStartsWithOrFirstNameStartsWithAllIgnoreCase( + LAST_NAME_0.toLowerCase().substring(0, 2), FIRST_NAME_1.toLowerCase().substring(0, 3)); + assertPeopleEquals(people, Arrays.asList(STUDENT_0, STUDENT_1)); + } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java new file mode 100644 index 000000000000..eba3ba9558df --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.query; + +import com.azure.spring.data.cosmos.core.CosmosOperations; +import com.azure.spring.data.cosmos.core.query.DocumentQuery; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.util.Assert; + +import static org.mockito.Mockito.when; + +@RunWith(MockitoJUnitRunner.class) +public class AbstractCosmosQueryUnitTest { + + @Mock + CosmosQueryMethod method; + + @Test + public void testShouldUseMultiEntityExecutionIfMethodIsCollectionQuery() { + when(method.isCollectionQuery()).thenReturn(true); + TestCosmosQuery cosmosQuery = new TestCosmosQuery(method, null); + CosmosQueryExecution execution = cosmosQuery.getExecution(null, null); + Assert.isInstanceOf(CosmosQueryExecution.MultiEntityExecution.class, execution); + } + + @Test + public void testShouldUseSingleExecutionAsFinalCase() { + when(method.isCollectionQuery()).thenReturn(false); + TestCosmosQuery cosmosQuery = new TestCosmosQuery(method, null); + CosmosQueryExecution execution = cosmosQuery.getExecution(null, null); + Assert.isInstanceOf(CosmosQueryExecution.SingleEntityExecution.class, execution); + } + + private class TestCosmosQuery extends AbstractCosmosQuery { + + TestCosmosQuery(CosmosQueryMethod method, CosmosOperations operations) { + super(method, operations); + } + + @Override + protected DocumentQuery createQuery(CosmosParameterAccessor accessor) { + return null; + } + + @Override + protected boolean isDeleteQuery() { + return false; + } + + @Override + protected boolean isExistsQuery() { + return false; + } + + @Override + protected boolean isPageQuery() { + return false; + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java new file mode 100644 index 000000000000..966cb761f749 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.query; + +import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; +import com.azure.spring.data.cosmos.core.query.DocumentQuery; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.util.Assert; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +@RunWith(MockitoJUnitRunner.class) +public class AbstractReactiveCosmosQueryUnitTest { + + @Mock + ReactiveCosmosQueryMethod method; + + @Test + public void testShouldUseMultiEntityExecutionIfMethodHasFluxReactiveWrapper() { + Mockito.>when(method.getReactiveWrapper()).thenReturn(Flux.class); + TestReactiveCosmosQuery cosmosQuery = new TestReactiveCosmosQuery(method, null); + ReactiveCosmosQueryExecution execution = cosmosQuery.getExecution(null); + Assert.isInstanceOf(ReactiveCosmosQueryExecution.MultiEntityExecution.class, execution); + } + + @Test + public void testShouldUseSingleExecutionIfMethodHasMonoReactiveWrapper() { + Mockito.>when(method.getReactiveWrapper()).thenReturn(Mono.class); + TestReactiveCosmosQuery cosmosQuery = new TestReactiveCosmosQuery(method, null); + ReactiveCosmosQueryExecution execution = cosmosQuery.getExecution(null); + Assert.isInstanceOf(ReactiveCosmosQueryExecution.SingleEntityExecution.class, execution); + } + + private class TestReactiveCosmosQuery extends AbstractReactiveCosmosQuery { + + TestReactiveCosmosQuery(ReactiveCosmosQueryMethod method, ReactiveCosmosOperations operations) { + super(method, operations); + } + + @Override + protected DocumentQuery createQuery(ReactiveCosmosParameterAccessor accessor) { + return null; + } + + @Override + protected boolean isDeleteQuery() { + return false; + } + + @Override + protected boolean isExistsQuery() { + return false; + } + + @Override + protected boolean isPageQuery() { + return false; + } + } +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/AddressRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/AddressRepository.java index 69cb5ee06e9e..8b7fed466932 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/AddressRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/AddressRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.Address; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; import java.util.List; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ContactRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ContactRepository.java index e13047d28442..9013a96183a4 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ContactRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ContactRepository.java @@ -2,13 +2,20 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.Contact; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; import java.util.List; +import java.util.Optional; @Repository public interface ContactRepository extends CosmosRepository { List findByTitle(String title); + + Iterable findByLogicId(String title); + + Contact findOneByTitle(String title); + + Optional findOptionallyByTitle(String title); } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/CustomerRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/CustomerRepository.java index 6a15bd90b4fa..ed015518d9bd 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/CustomerRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/CustomerRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.Customer; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import java.util.List; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/IntegerIdDomainRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/IntegerIdDomainRepository.java index 295d7f3d7c66..eb064a5f9478 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/IntegerIdDomainRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/IntegerIdDomainRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.IntegerIdDomain; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; @Repository diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/LongIdDomainRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/LongIdDomainRepository.java new file mode 100644 index 000000000000..c8fb082d6691 --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/LongIdDomainRepository.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.repository; + +import com.azure.spring.data.cosmos.domain.LongIdDomain; +import com.azure.spring.data.cosmos.repository.CosmosRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface LongIdDomainRepository extends CosmosRepository { + +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/MemoRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/MemoRepository.java index 56f51bef2f60..1c7bbbe057aa 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/MemoRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/MemoRepository.java @@ -2,9 +2,9 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.Importance; import com.azure.spring.data.cosmos.domain.Memo; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; import java.util.Date; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/PartitionPersonRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/PartitionPersonRepository.java index df1a33f88ae1..1fefb26bbc72 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/PartitionPersonRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/PartitionPersonRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.PartitionPerson; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; @Repository diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/PersonRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/PersonRepository.java index 11c63be3e4af..e305178f6b75 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/PersonRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/PersonRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.Person; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; @Repository diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ProjectRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ProjectRepository.java index c930ca9d8486..3d99657f19d7 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ProjectRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ProjectRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.Project; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; @@ -83,4 +83,11 @@ List findByNameOrCreatorAndForkCountOrStarCount(String name, String cre List findByNameIsNotNullAndHasReleased(boolean hasReleased); Page findByForkCount(Long forkCount, Pageable pageable); + + + List findAllByNameIn(Collection names); + + List findAllByStarCountIn(Collection startCounts); + + List findAllByHasReleasedIn(Collection releases); } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/QuestionRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/QuestionRepository.java index 0d043875c128..f45d4621ec9e 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/QuestionRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/QuestionRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.Question; +import com.azure.spring.data.cosmos.repository.CosmosRepository; public interface QuestionRepository extends CosmosRepository { } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveCourseRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveCourseRepository.java index 50f589f4b31e..d43708223fdc 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveCourseRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveCourseRepository.java @@ -2,13 +2,45 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; import com.azure.spring.data.cosmos.domain.Course; +import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; import java.util.Collection; public interface ReactiveCourseRepository extends ReactiveCosmosRepository { Flux findByDepartmentIn(Collection departments); + + /** + * Find Course list by name without case sensitive + * @param name name + * @return Course list + */ + Flux findByNameIgnoreCase(String name); + + /** + * Find Course list by name and department without case sensitive + * @param name name + * @param department department + * @return Course list + */ + Flux findByNameAndDepartmentAllIgnoreCase(String name, String department); + + /** + * Find Course list by name or department without case sensitive + * @param name name + * @param department department + * @return Course list + */ + Flux findByNameOrDepartmentAllIgnoreCase(String name, String department); + + /** + * Find a single Course list by name + * @param name name + * @return Course list + */ + Mono findOneByName(String name); + } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveLongIdDomainPartitionRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveLongIdDomainPartitionRepository.java new file mode 100644 index 000000000000..a6adc573650f --- /dev/null +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/ReactiveLongIdDomainPartitionRepository.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.spring.data.cosmos.repository.repository; + +import com.azure.spring.data.cosmos.domain.LongIdDomainPartition; +import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ReactiveLongIdDomainPartitionRepository extends ReactiveCosmosRepository { + +} diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/SortedProjectRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/SortedProjectRepository.java index e841aaab8d2c..0bdd871e184b 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/SortedProjectRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/SortedProjectRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.SortedProject; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/SquareRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/SquareRepository.java index 0026cc7b8ad1..a46748b0c523 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/SquareRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/SquareRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.inheritance.Square; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; @Repository diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/StudentRepository.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/StudentRepository.java index f8039bc21388..698aa5d25780 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/StudentRepository.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/repository/StudentRepository.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.repository; -import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.domain.Student; +import com.azure.spring.data.cosmos.repository.CosmosRepository; import org.springframework.stereotype.Repository; import java.util.List; @@ -32,4 +32,51 @@ public interface StudentRepository extends CosmosRepository { Boolean existsByFirstName(String firstName); Boolean existsByLastNameContaining(String lastName); + + /** + * Find student list by last name without case sensitive + * @param lastName last name + * @return student list + */ + List findByLastNameIgnoreCase(String lastName); + + /** + * Find student list by last name and first name without case sensitive + * @param lastName last name + * @param firstName first name + * @return student list + */ + List findByLastNameAndFirstNameAllIgnoreCase(String lastName, String firstName); + + /** + * Find student list by last name or first name without case sensitive + * @param lastName last name + * @param firstName first name + * @return Student list + */ + List findByLastNameOrFirstNameAllIgnoreCase(String lastName, String firstName); + + /** + * Find student list by first name matching end without case sensitive + * @param firstName + * @return + */ + List findByFirstNameEndsWithIgnoreCase(String firstName); + + /** + * Find student list by last name matching end and first name matching end without case sensitive + * @param lastName + * @param firstName + * @return + */ + List findByLastNameStartsWithAndFirstNameStartsWithAllIgnoreCase(String lastName, String firstName); + + /** + * Find student list by last name matching or and first name matching end without case sensitive + * @param lastName + * @param firstName + * @return + */ + List findByLastNameStartsWithOrFirstNameStartsWithAllIgnoreCase(String lastName, String firstName); + } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java index 3a5ecd362fe3..994d68637225 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java @@ -2,13 +2,15 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.support; +import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.core.mapping.Document; import com.azure.spring.data.cosmos.core.mapping.PartitionKey; -import com.azure.spring.data.cosmos.common.TestConstants; import com.azure.spring.data.cosmos.domain.Address; +import com.azure.spring.data.cosmos.domain.LongIdDomain; import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.domain.Student; import org.junit.Test; +import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Version; import java.util.List; @@ -58,7 +60,7 @@ public void testCustomContainerName() { new CosmosEntityInformation(VersionedVolunteer.class); final String containerName = entityInformation.getContainerName(); - assertThat(containerName).isEqualTo("testCollection"); + assertThat(containerName).isEqualTo("testContainer"); } @Test @@ -124,7 +126,7 @@ public void testNonVersionedEntity() { assertThat(isVersioned).isFalse(); } - @Document(collection = "testCollection") + @Document(container = "testContainer") private static class Volunteer { String id; String name; @@ -176,7 +178,7 @@ public void setName(String name) { } } - @Document(collection = "testCollection") + @Document(container = "testContainer") private static class VersionedVolunteer { private String id; private String name; @@ -380,4 +382,80 @@ public String toString() { + '}'; } } + + @Test + public void testGetIdFieldWithLongType() { + final CosmosEntityInformation entityInformation = + new CosmosEntityInformation<>(LongIdDomain.class); + assertThat(entityInformation.getIdField().getType().equals(Long.class)).isTrue(); + } + + @Test + public void testGetIdFieldWithBasicType() { + final CosmosEntityInformation entityInformation = + new CosmosEntityInformation<>(BasicLongIdDomain.class); + assertThat(entityInformation.getIdField().getType().equals(long.class)).isTrue(); + } + + @Document + class BasicLongIdDomain { + + @Id + private long number; + + private String name; + + BasicLongIdDomain(long number, String name) { + this.number = number; + this.name = name; + } + + BasicLongIdDomain() { + } + + public long getNumber() { + return number; + } + + public void setNumber(Long number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BasicLongIdDomain that = (BasicLongIdDomain) o; + return Objects.equals(number, that.number) + && Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(number, name); + } + + @Override + public String toString() { + return "BasicLongIdDomain{" + + "number=" + + number + + ", name='" + + name + + '\'' + + '}'; + } + } } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java index cb205d625cc9..d7c2c127ef50 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java @@ -2,21 +2,16 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.support; -import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.repository.repository.PersonRepository; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.data.repository.core.support.RepositoryFactorySupport; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("unchecked") @RunWith(MockitoJUnitRunner.class) public class CosmosRepositoryFactoryBeanUnitTest { - @Mock - CosmosTemplate dbTemplate; @Test public void testCreateRepositoryFactory() { diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java index 086c9cdb29f7..47b03637c98a 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java @@ -8,8 +8,6 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; import org.springframework.data.repository.core.EntityInformation; import static org.junit.Assert.assertTrue; @@ -20,12 +18,9 @@ public class CosmosRepositoryFactoryUnitTest { @Mock CosmosTemplate dbTemplate; - @Autowired - ApplicationContext applicationContext; - @Test public void useMappingCosmosDBEntityInfoIfMappingContextSet() { - final CosmosRepositoryFactory factory = new CosmosRepositoryFactory(dbTemplate, applicationContext); + final CosmosRepositoryFactory factory = new CosmosRepositoryFactory(dbTemplate); final EntityInformation entityInfo = factory.getEntityInformation(Person.class); assertTrue(entityInfo instanceof CosmosEntityInformation); } diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/test/resources/application.properties b/sdk/cosmos/azure-spring-data-cosmos/src/test/resources/application.properties index 12b7c8f46f80..425d26f61755 100644 --- a/sdk/cosmos/azure-spring-data-cosmos/src/test/resources/application.properties +++ b/sdk/cosmos/azure-spring-data-cosmos/src/test/resources/application.properties @@ -1,9 +1,6 @@ -cosmosdb.uri=${ACCOUNT_HOST} -cosmosdb.key=${ACCOUNT_KEY} -cosmosdb.secondaryKey=${SECONDARY_ACCOUNT_KEY} - -#You can also use connection string instead of uri and key to connect to cosmos DB -#cosmosdb.connection-string=${DOCUMENTDB_CONNECTION_STRING} +cosmos.uri=${ACCOUNT_HOST} +cosmos.key=${ACCOUNT_KEY} +cosmos.secondaryKey=${SECONDARY_ACCOUNT_KEY} dynamic.collection.name=spel-property-collection # Performance test configurations @@ -12,4 +9,14 @@ perf.batch.size=3 perf.acceptance.percentage=10 # Populate query metrics -cosmosdb.populateQueryMetrics=true +cosmos.queryMetricsEnabled=true + +cosmos.secondary.uri=${NEW_ACCOUNT_HOST} +cosmos.secondary.key=${NEW_ACCOUNT_KEY} +cosmos.secondary.secondaryKey=${NEW_SECONDARY_ACCOUNT_KEY} + +# Populate query metrics +cosmos.secondary.queryMetricsEnabled=true + + + diff --git a/sdk/cosmos/ci.yml b/sdk/cosmos/ci.yml index 4b65101fddcd..82e01edc6920 100644 --- a/sdk/cosmos/ci.yml +++ b/sdk/cosmos/ci.yml @@ -46,6 +46,10 @@ extends: - name: azure-spring-data-cosmos groupId: com.azure safeName: azurespringdatacosmos + - name: azure-cosmos-encryption + groupId: com.azure + safeName: azurecosmosencryption AdditionalModules: - name: azure-cosmos-benchmark groupId: com.azure + diff --git a/sdk/cosmos/pom.xml b/sdk/cosmos/pom.xml index 025f5523dfa2..71650c9f1bd1 100644 --- a/sdk/cosmos/pom.xml +++ b/sdk/cosmos/pom.xml @@ -11,6 +11,7 @@ azure-cosmos azure-cosmos-benchmark + azure-cosmos-encryption azure-spring-data-cosmos diff --git a/sdk/cosmos/test-resources.json b/sdk/cosmos/test-resources.json index 447dd5729a44..1d6c382d202a 100644 --- a/sdk/cosmos/test-resources.json +++ b/sdk/cosmos/test-resources.json @@ -28,7 +28,9 @@ "variables": { "apiVersion": "2020-04-01", "accountName": "[toLower(parameters('baseName'))]", + "newAccountName": "[toLower(concat(parameters('baseName'), '2'))]", "resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('accountName'))]", + "newResourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('newAccountName'))]", "singleRegionConfiguration": [ { "locationName": "East US 2", @@ -79,6 +81,32 @@ "capabilities": [], "ipRules": [] } + }, + { + "type": "Microsoft.DocumentDB/databaseAccounts", + "apiVersion": "[variables('apiVersion')]", + "name": "[variables('newAccountName')]", + "location": "[resourceGroup().location]", + "kind": "GlobalDocumentDB", + "properties": { + "publicNetworkAccess": "Enabled", + "enableAutomaticFailover": false, + "enableMultipleWriteLocations": "[parameters('enableMultipleWriteLocations')]", + "isVirtualNetworkFilterEnabled": false, + "virtualNetworkRules": [], + "disableKeyBasedMetadataWriteAccess": false, + "enableFreeTier": false, + "enableAnalyticalStorage": false, + "databaseAccountOfferType": "Standard", + "consistencyPolicy": { + "defaultConsistencyLevel": "[parameters('defaultConsistencyLevel')]", + "maxIntervalInSeconds": 5, + "maxStalenessPrefix": 100 + }, + "locations": "[variables('locationsConfiguration')]", + "capabilities": [], + "ipRules": [] + } } ], "outputs": { @@ -93,6 +121,18 @@ "SECONDARY_ACCOUNT_KEY": { "type": "string", "value": "[listKeys(variables('resourceId'), variables('apiVersion')).secondaryMasterKey]" + }, + "NEW_ACCOUNT_HOST": { + "type": "string", + "value": "[reference(variables('newResourceId'), variables('apiVersion')).documentEndpoint]" + }, + "NEW_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(variables('newResourceId'), variables('apiVersion')).primaryMasterKey]" + }, + "NEW_SECONDARY_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(variables('newResourceId'), variables('apiVersion')).secondaryMasterKey]" } } } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/ARecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/ARecordSetsImpl.java index 9efe4d3e109b..4049e448105a 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/ARecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/ARecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/AaaaRecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/AaaaRecordSetsImpl.java index 0cb248777267..13de8476a6d6 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/AaaaRecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/AaaaRecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/CNameRecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/CNameRecordSetsImpl.java index f03e366188f3..8904b8ed5e6e 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/CNameRecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/CNameRecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/CaaRecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/CaaRecordSetsImpl.java index c6157540e12e..723c7a699d79 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/CaaRecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/CaaRecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/MXRecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/MXRecordSetsImpl.java index 33ac1dfac9ed..f3b00f1a3f77 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/MXRecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/MXRecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/NSRecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/NSRecordSetsImpl.java index 8aa272302e19..f1dd2356eabc 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/NSRecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/NSRecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/PtrRecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/PtrRecordSetsImpl.java index 730ae1438ddc..118e6118a432 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/PtrRecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/PtrRecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/SrvRecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/SrvRecordSetsImpl.java index 7a7eb3a0629b..02fc4275e5c8 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/SrvRecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/SrvRecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/TxtRecordSetsImpl.java b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/TxtRecordSetsImpl.java index 70399b7f4949..8ea6f6e87d05 100644 --- a/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/TxtRecordSetsImpl.java +++ b/sdk/dns/mgmt/src/main/java/com/azure/resourcemanager/dns/implementation/TxtRecordSetsImpl.java @@ -30,7 +30,6 @@ public Mono getByNameAsync(String name) { .inner() .getRecordSets() .getAsync(this.dnsZone.resourceGroupName(), this.dnsZone.name(), name, this.recordType) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/e2e/CHANGELOG.md b/sdk/e2e/CHANGELOG.md new file mode 100644 index 000000000000..4144f75694a0 --- /dev/null +++ b/sdk/e2e/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) diff --git a/sdk/e2e/pom.xml b/sdk/e2e/pom.xml index 648a174f431b..2337e511b70c 100644 --- a/sdk/e2e/pom.xml +++ b/sdk/e2e/pom.xml @@ -38,17 +38,17 @@ com.azure azure-security-keyvault-keys - 4.2.0-beta.5 + 4.2.0-beta.6 com.azure azure-security-keyvault-secrets - 4.2.0-beta.4 + 4.2.0-beta.5 com.azure azure-security-keyvault-certificates - 4.1.0-beta.4 + 4.1.0-beta.5 org.slf4j @@ -86,7 +86,6 @@ - com.azure:* org.slf4j:slf4j-api:[1.7.28] diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml index 5b1c595cd701..c4613a0fcfb5 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml @@ -52,7 +52,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml index cea61be49473..ad41a3bd2fa8 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml @@ -49,7 +49,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/eventhubs/microsoft-azure-eventhubs-eph/README.md b/sdk/eventhubs/microsoft-azure-eventhubs-eph/README.md index 4f0f9679d9c5..9f0c6872b950 100644 --- a/sdk/eventhubs/microsoft-azure-eventhubs-eph/README.md +++ b/sdk/eventhubs/microsoft-azure-eventhubs-eph/README.md @@ -5,9 +5,9 @@ # Microsoft Azure Event Processor Host for Java Event Processor Host is built on top of the Azure Event Hubs Client and provides a number of features -not present in that lower layer. See the [readme for Azure Event Hubs Client for Java](../readme.md) for details of how to +not present in that lower layer. See the [README for Azure Event Hubs Client for Java](../microsoft-azure-eventhubs/README.md) for details of how to include Event Processor Host in your project. See the [overview](Overview.md) for details of the functionality -that Event Processor Host offers and how to use it. +that Event Processor Host offers and how to use it. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Feventhubs%2Fmicrosoft-azure-eventhubs-eph%2FReadme.png) diff --git a/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml b/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml index b4fb48e76b71..c8bbb53d00fb 100644 --- a/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml +++ b/sdk/eventhubs/microsoft-azure-eventhubs/pom.xml @@ -76,7 +76,7 @@ com.microsoft.azure msal4j - 1.3.0 + 1.6.1 test diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md index 11a6b1faf6d4..34564c309ed5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md @@ -1,7 +1,10 @@ # Release History ## 1.0.0-beta.5 (Unreleased) +- Added support for context passing. +### Key Bug Fixes +- Fixed `getFields()` to preserve service side ordering of fields. ## 1.0.0-beta.4 (2020-07-07) ### Breaking Changes diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/README.md index 48541a47825d..898a156bd5a8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/README.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/README.md @@ -81,14 +81,14 @@ resource, or by running the following Azure CLI command to get the key from the az cognitiveservices account keys list --resource-group --name ``` Use the API key as the credential parameter to authenticate the client: - + ```java FormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint("{endpoint}") .buildClient(); ``` - + ```java FormTrainingClient formTrainingClient = new FormTrainingClientBuilder() .credential(new AzureKeyCredential("{key}")) @@ -98,7 +98,7 @@ FormTrainingClient formTrainingClient = new FormTrainingClientBuilder() The Azure Form Recognizer client library provides a way to **rotate the existing key**. - + ```java AzureKeyCredential credential = new AzureKeyCredential("{key}"); FormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder() @@ -121,7 +121,7 @@ Authentication with AAD requires some initial setup: com.azure azure-identity - 1.0.8 + 1.0.9 ``` [//]: # ({x-version-update-end}) @@ -137,7 +137,7 @@ Authorization is easiest using [DefaultAzureCredential][wiki_identity]. It finds running environment. For more information about using Azure Active Directory authorization with Form Recognizer, please refer to [the associated documentation][aad_authorization]. - + ```java TokenCredential credential = new DefaultAzureCredentialBuilder().build(); FormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder() @@ -195,7 +195,7 @@ The following section provides several code snippets covering some of the most c ### Recognize Forms Using a Custom Model Recognize name/value pairs and table data from forms. These models are trained with your own data, so they're tailored to your forms. You should only recognize forms of the same form type that the custom model was trained on. - + ```java String formUrl = "{form_url}"; String modelId = "{custom_trained_model_id}"; @@ -206,7 +206,7 @@ List recognizedForms = recognizeFormPoller.getFinalResult(); for (int i = 0; i < recognizedForms.size(); i++) { RecognizedForm form = recognizedForms.get(i); - System.out.printf("----------- Recognized Form %d -----------%n", i); + System.out.printf("----------- Recognized custom form info for page %d -----------%n", i); System.out.printf("Form type: %s%n", form.getFormType()); form.getFields().forEach((label, formField) -> System.out.printf("Field %s has value %s with confidence score of %f.%n", label, @@ -218,7 +218,7 @@ for (int i = 0; i < recognizedForms.size(); i++) { ### Recognize Content Recognize text and table structures, along with their bounding box coordinates, from documents. - + ```java // recognize form content using file input stream File form = new File("local/file_path/filename.png"); @@ -232,7 +232,7 @@ List contentPageResults = recognizeContentPoller.getFinalResult(); for (int i = 0; i < contentPageResults.size(); i++) { FormPage formPage = contentPageResults.get(i); - System.out.printf("----Recognizing content for page %d ----%n", i); + System.out.printf("----Recognizing content info for page %d ----%n", i); // Table information System.out.printf("Has width: %f and height: %f, measured with unit: %s.%n", formPage.getWidth(), formPage.getHeight(), @@ -247,10 +247,12 @@ for (int i = 0; i < contentPageResults.size(); i++) { ``` ### Recognize receipts -Recognize data from a USA sales receipts using a prebuilt model. [Here][service_recognize_receipt] are the fields the service returns for a recognized receipt. See [StronglyTypedRecognizedForm.java][strongly_typed_sample] for a suggested approach to extract +Recognize data from a USA sales receipts using a prebuilt model. [Here][service_recognize_receipt] are the fields +the service returns for a recognized receipt. +See [StronglyTypedRecognizedForm.java][strongly_typed_sample] for a suggested approach to extract information from receipts. - + ```java String receiptUrl = "https://docs.microsoft.com/en-us/azure/cognitive-services/form-recognizer/media" + "/contoso-allinone.jpg"; @@ -261,10 +263,10 @@ List receiptPageResults = syncPoller.getFinalResult(); for (int i = 0; i < receiptPageResults.size(); i++) { RecognizedForm recognizedForm = receiptPageResults.get(i); Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + System.out.printf("----------- Recognizing receipt info for page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -273,7 +275,7 @@ for (int i = 0; i < receiptPageResults.size(); i++) { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -282,7 +284,7 @@ for (int i = 0; i < receiptPageResults.size(); i++) { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -292,14 +294,14 @@ for (int i = 0; i < receiptPageResults.size(); i++) { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { + if (FieldValueType.MAP == receiptItem.getValueType()) { Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); formFieldMap.forEach((key, formField) -> { if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { + if (FieldValueType.DOUBLE == formField.getValueType()) { Float quantity = FieldValueType.DOUBLE.cast(formField); System.out.printf("Quantity: %f, confidence: %.2f%n", quantity, formField.getConfidence()); @@ -317,9 +319,9 @@ for (int i = 0; i < receiptPageResults.size(); i++) { Train a machine-learned model on your own form type. The resulting model will be able to recognize values from the types of forms it was trained on. Provide a container SAS url to your Azure Storage Blob container where you're storing the training documents. See details on setting this up in the [service quickstart documentation][quickstart_training]. - + ```java -String trainingFilesUrl = "{SAS-URL-of-your-container-in-blob-storage}"; +String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}"; SyncPoller trainingPoller = formTrainingClient.beginTraining(trainingFilesUrl, false); @@ -332,7 +334,7 @@ System.out.printf("Training started on: %s%n", customFormModel.getTrainingStarte System.out.printf("Training completed on: %s%n%n", customFormModel.getTrainingCompletedOn()); System.out.println("Recognized Fields:"); -// looping through the sub-models, which contains the fields they were trained on +// looping through the subModels, which contains the fields they were trained on // Since the given training documents are unlabeled, we still group them but they do not have a label. customFormModel.getSubmodels().forEach(customFormSubmodel -> { // Since the training data is unlabeled, we are unable to return the accuracy of this model @@ -344,9 +346,8 @@ customFormModel.getSubmodels().forEach(customFormSubmodel -> { ### Manage your models Manage the custom models attached to your account. - + ```java -AtomicReference modelId = new AtomicReference<>(); // First, we see how many custom models we have, and what our limit is AccountProperties accountProperties = formTrainingClient.getAccountProperties(); System.out.printf("The account has %d custom models, and we can have at most %d custom models", @@ -357,8 +358,7 @@ PagedIterable customModels = formTrainingClient.listCustomM System.out.println("We have following models in the account:"); customModels.forEach(customFormModelInfo -> { System.out.printf("Model Id: %s%n", customFormModelInfo.getModelId()); - // get custom model info - modelId.set(customFormModelInfo.getModelId()); + // get specific custom model info CustomFormModel customModel = formTrainingClient.getCustomModel(customFormModelInfo.getModelId()); System.out.printf("Model Status: %s%n", customModel.getModelStatus()); System.out.printf("Training started on: %s%n", customModel.getTrainingStartedOn()); @@ -374,8 +374,9 @@ customModels.forEach(customFormModelInfo -> { } }); }); + // Delete Custom Model -formTrainingClient.deleteModel(modelId.get()); +formTrainingClient.deleteModel("{modelId}"); ``` For more detailed examples, refer to [samples][sample_readme]. @@ -386,7 +387,7 @@ to provide an invalid file source URL an `HttpResponseException` would be raised In the following code snippet, the error is handled gracefully by catching the exception and display the additional information about the error. - + ```java try { formRecognizerClient.beginRecognizeContentFromUrl("invalidSourceUrl"); @@ -424,7 +425,7 @@ These code samples show common scenario operations with the Azure Form Recognize #### Async APIs All the examples shown so far have been using synchronous APIs, but we provide full support for async APIs as well. You'll need to use `FormRecognizerAsyncClient` - + ```java FormRecognizerAsyncClient formRecognizerAsyncClient = new FormRecognizerClientBuilder() .credential(new AzureKeyCredential("{key}")) @@ -491,12 +492,12 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [manage_custom_models]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModels.java [manage_custom_models_async]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModelsAsync.java [recognize_content]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContent.java -[recognize_content_async]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentAsync.java +[recognize_content_async]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentFromUrlAsync.java [recognize_receipts]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceipts.java [recognize_receipts_async]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsAsync.java [recognize_receipts_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrl.java [recognize_receipts_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrlAsync.java -[recognize_custom_forms]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomForms.java +[recognize_custom_forms]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsFromUrl.java [recognize_custom_forms_async]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsAsync.java [register_AAD_application]: https://docs.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal [train_unlabeled_model]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabels.java diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index 870385b9ea76..dcc9c4a4baf4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml @@ -78,7 +78,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java index 6e9dc5a0a962..78539d2df27e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java @@ -22,6 +22,7 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -118,14 +119,21 @@ public final class FormRecognizerAsyncClient { @ServiceMethod(returns = ReturnType.COLLECTION) public PollerFlux> beginRecognizeCustomFormsFromUrl(String formUrl, String modelId, RecognizeOptions recognizeOptions) { + return beginRecognizeCustomFormsFromUrl(formUrl, modelId, recognizeOptions, Context.NONE); + } + + PollerFlux> + beginRecognizeCustomFormsFromUrl(String formUrl, String modelId, RecognizeOptions recognizeOptions, + Context context) { try { recognizeOptions = getRecognizeOptionsProperties(recognizeOptions); return new PollerFlux>( recognizeOptions.getPollInterval(), - analyzeFormActivationOperation(formUrl, modelId, recognizeOptions.isIncludeFieldElements()), - createAnalyzeFormPollOperation(modelId), - (activationResponse, context) -> Mono.error(new RuntimeException("Cancellation is not supported")), - fetchAnalyzeFormResultOperation(modelId, recognizeOptions.isIncludeFieldElements())); + analyzeFormActivationOperation(formUrl, modelId, recognizeOptions.isIncludeFieldElements(), context), + createAnalyzeFormPollOperation(modelId, context), + (activationResponse, pollingContext) -> + Mono.error(new RuntimeException("Cancellation is not supported")), + fetchAnalyzeFormResultOperation(modelId, recognizeOptions.isIncludeFieldElements(), context)); } catch (RuntimeException ex) { return PollerFlux.error(ex); } @@ -181,22 +189,29 @@ public final class FormRecognizerAsyncClient { * or has been cancelled. The completed operation returns a List of {@link RecognizedForm}. * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with * an {@link OperationStatus#FAILED}. - * @throws NullPointerException If {@code recognizeOptions} is {@code null}. + * @throws NullPointerException If {@code form}, {@code modelId} is {@code null}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PollerFlux> beginRecognizeCustomForms(Flux form, long length, String modelId, RecognizeOptions recognizeOptions) { + return beginRecognizeCustomForms(form, length, modelId, recognizeOptions, Context.NONE); + } + + PollerFlux> + beginRecognizeCustomForms(Flux form, long length, String modelId, + RecognizeOptions recognizeOptions, Context context) { try { recognizeOptions = getRecognizeOptionsProperties(recognizeOptions); return new PollerFlux>( recognizeOptions.getPollInterval(), analyzeFormStreamActivationOperation(form, modelId, length, recognizeOptions.getContentType(), - recognizeOptions.isIncludeFieldElements()), - createAnalyzeFormPollOperation(modelId), - (activationResponse, context) -> Mono.error(new RuntimeException("Cancellation is not supported")), - fetchAnalyzeFormResultOperation(modelId, recognizeOptions.isIncludeFieldElements())); + recognizeOptions.isIncludeFieldElements(), context), + createAnalyzeFormPollOperation(modelId, context), + (activationResponse, pollingContext) -> + Mono.error(new RuntimeException("Cancellation is not supported")), + fetchAnalyzeFormResultOperation(modelId, recognizeOptions.isIncludeFieldElements(), context)); } catch (RuntimeException ex) { return PollerFlux.error(ex); } @@ -245,15 +260,20 @@ public PollerFlux> beginRecognizeContentFromUrl( @ServiceMethod(returns = ReturnType.COLLECTION) public PollerFlux> beginRecognizeContentFromUrl(String formUrl, RecognizeOptions recognizeOptions) { + return beginRecognizeContentFromUrl(formUrl, recognizeOptions, Context.NONE); + } + + PollerFlux> + beginRecognizeContentFromUrl(String formUrl, RecognizeOptions recognizeOptions, Context context) { try { recognizeOptions = getRecognizeOptionsProperties(recognizeOptions); return new PollerFlux>( recognizeOptions.getPollInterval(), - contentAnalyzeActivationOperation(formUrl), - extractContentPollOperation(), - (activationResponse, context) -> + contentAnalyzeActivationOperation(formUrl, context), + extractContentPollOperation(context), + (activationResponse, pollingContext) -> monoError(logger, new RuntimeException("Cancellation is not supported")), - fetchExtractContentResult()); + fetchExtractContentResult(context)); } catch (RuntimeException ex) { return PollerFlux.error(ex); } @@ -305,20 +325,25 @@ public PollerFlux> beginRecognizeContent( * been cancelled. The completed operation returns a List of {@link FormPage}. * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with * an {@link OperationStatus#FAILED}. - * @throws NullPointerException If {@code recognizeOptions} is {@code null}. + * @throws NullPointerException If {@code form} is {@code null}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PollerFlux> beginRecognizeContent(Flux form, long length, RecognizeOptions recognizeOptions) { + return beginRecognizeContent(form, length, recognizeOptions, Context.NONE); + } + + PollerFlux> beginRecognizeContent(Flux form, long length, + RecognizeOptions recognizeOptions, Context context) { try { recognizeOptions = getRecognizeOptionsProperties(recognizeOptions); return new PollerFlux<>( recognizeOptions.getPollInterval(), - contentStreamActivationOperation(form, length, recognizeOptions.getContentType()), - extractContentPollOperation(), - (activationResponse, context) -> + contentStreamActivationOperation(form, length, recognizeOptions.getContentType(), context), + extractContentPollOperation(context), + (activationResponse, pollingContext) -> monoError(logger, new RuntimeException("Cancellation is not supported")), - fetchExtractContentResult()); + fetchExtractContentResult(context)); } catch (RuntimeException ex) { return PollerFlux.error(ex); } @@ -370,15 +395,20 @@ public PollerFlux> beginRecognizeContent(Flux> beginRecognizeReceiptsFromUrl(String receiptUrl, RecognizeOptions recognizeOptions) { + return beginRecognizeReceiptsFromUrl(receiptUrl, recognizeOptions, Context.NONE); + } + + PollerFlux> + beginRecognizeReceiptsFromUrl(String receiptUrl, RecognizeOptions recognizeOptions, Context context) { try { recognizeOptions = getRecognizeOptionsProperties(recognizeOptions); return new PollerFlux>( recognizeOptions.getPollInterval(), - receiptAnalyzeActivationOperation(receiptUrl, recognizeOptions.isIncludeFieldElements()), - extractReceiptPollOperation(), - (activationResponse, context) -> monoError(logger, + receiptAnalyzeActivationOperation(receiptUrl, recognizeOptions.isIncludeFieldElements(), context), + extractReceiptPollOperation(context), + (activationResponse, pollingContext) -> monoError(logger, new RuntimeException("Cancellation is not supported")), - fetchExtractReceiptResult(recognizeOptions.isIncludeFieldElements())); + fetchExtractReceiptResult(recognizeOptions.isIncludeFieldElements(), context)); } catch (RuntimeException ex) { return PollerFlux.error(ex); } @@ -434,33 +464,39 @@ public PollerFlux> beginRecognizeReceipts( * or has been cancelled. The completed operation returns a List of {@link RecognizedForm}. * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with * an {@link OperationStatus#FAILED}. - * @throws NullPointerException If {@code recognizeOptions} is {@code null}. + * @throws NullPointerException If {@code receipt} is {@code null}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PollerFlux> beginRecognizeReceipts(Flux receipt, long length, RecognizeOptions recognizeOptions) { + return beginRecognizeReceipts(receipt, length, recognizeOptions, Context.NONE); + } + + PollerFlux> + beginRecognizeReceipts(Flux receipt, long length, RecognizeOptions recognizeOptions, + Context context) { try { recognizeOptions = getRecognizeOptionsProperties(recognizeOptions); return new PollerFlux<>( recognizeOptions.getPollInterval(), receiptStreamActivationOperation(receipt, length, - recognizeOptions.getContentType(), recognizeOptions.isIncludeFieldElements()), - extractReceiptPollOperation(), - (activationResponse, context) -> monoError(logger, + recognizeOptions.getContentType(), recognizeOptions.isIncludeFieldElements(), context), + extractReceiptPollOperation(context), + (activationResponse, pollingContext) -> monoError(logger, new RuntimeException("Cancellation is not supported")), - fetchExtractReceiptResult(recognizeOptions.isIncludeFieldElements())); + fetchExtractReceiptResult(recognizeOptions.isIncludeFieldElements(), context)); } catch (RuntimeException ex) { return PollerFlux.error(ex); } } private Function, Mono> receiptAnalyzeActivationOperation( - String receiptUrl, boolean includeFieldElements) { + String receiptUrl, boolean includeFieldElements, Context context) { return (pollingContext) -> { try { Objects.requireNonNull(receiptUrl, "'receiptUrl' is required and cannot be null."); return service.analyzeReceiptAsyncWithResponseAsync(includeFieldElements, - new SourcePath().setSource(receiptUrl)) + new SourcePath().setSource(receiptUrl), context) .map(response -> new OperationResult(parseModelId(response.getDeserializedHeaders().getOperationLocation()))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -471,13 +507,14 @@ private Function, Mono> receipt } private Function, Mono> receiptStreamActivationOperation( - Flux form, long length, FormContentType contentType, boolean includeFieldElements) { + Flux form, long length, FormContentType contentType, boolean includeFieldElements, + Context context) { return pollingContext -> { try { Objects.requireNonNull(form, "'form' is required and cannot be null."); if (contentType != null) { return service.analyzeReceiptAsyncWithResponseAsync( - ContentType.fromString(contentType.toString()), form, length, includeFieldElements) + ContentType.fromString(contentType.toString()), form, length, includeFieldElements, context) .map(response -> new OperationResult( parseModelId(response.getDeserializedHeaders().getOperationLocation()))) .onErrorMap(throwable -> throwable); @@ -485,7 +522,7 @@ private Function, Mono> receipt return detectContentType(form) .flatMap(detectedContentType -> service.analyzeReceiptAsyncWithResponseAsync(detectedContentType, form, length, - includeFieldElements) + includeFieldElements, context) .map(response -> new OperationResult( parseModelId(response.getDeserializedHeaders().getOperationLocation())))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -497,12 +534,12 @@ private Function, Mono> receipt } private Function, Mono>> - extractReceiptPollOperation() { + extractReceiptPollOperation(Context context) { return (pollingContext) -> { try { PollResponse operationResultPollResponse = pollingContext.getLatestResponse(); UUID resultUid = UUID.fromString(operationResultPollResponse.getValue().getResultId()); - return service.getAnalyzeReceiptResultWithResponseAsync(resultUid) + return service.getAnalyzeReceiptResultWithResponseAsync(resultUid, context) .flatMap(modelSimpleResponse -> processAnalyzeModelResponse(modelSimpleResponse, operationResultPollResponse)); } catch (HttpResponseException e) { @@ -513,11 +550,11 @@ private Function, Mono> receipt } private Function, Mono>> - fetchExtractReceiptResult(boolean includeFieldElements) { + fetchExtractReceiptResult(boolean includeFieldElements, Context context) { return (pollingContext) -> { try { final UUID resultUid = UUID.fromString(pollingContext.getLatestResponse().getValue().getResultId()); - return service.getAnalyzeReceiptResultWithResponseAsync(resultUid) + return service.getAnalyzeReceiptResultWithResponseAsync(resultUid, context) .map(modelSimpleResponse -> { throwIfAnalyzeStatusInvalid(modelSimpleResponse.getValue()); return toRecognizedForm(modelSimpleResponse.getValue().getAnalyzeResult(), @@ -531,11 +568,11 @@ private Function, Mono> receipt } private Function, Mono> contentAnalyzeActivationOperation( - String formUrl) { + String formUrl, Context context) { return (pollingContext) -> { try { Objects.requireNonNull(formUrl, "'formUrl' is required and cannot be null."); - return service.analyzeLayoutAsyncWithResponseAsync(new SourcePath().setSource(formUrl)) + return service.analyzeLayoutAsyncWithResponseAsync(new SourcePath().setSource(formUrl), context) .map(response -> new OperationResult(parseModelId(response.getDeserializedHeaders().getOperationLocation()))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -546,20 +583,20 @@ private Function, Mono> content } private Function, Mono> contentStreamActivationOperation( - Flux form, long length, FormContentType contentType) { + Flux form, long length, FormContentType contentType, Context context) { return pollingContext -> { try { Objects.requireNonNull(form, "'form' is required and cannot be null."); if (contentType != null) { return service.analyzeLayoutAsyncWithResponseAsync( - ContentType.fromString(contentType.toString()), form, length) + ContentType.fromString(contentType.toString()), form, length, context) .map(response -> new OperationResult(parseModelId( response.getDeserializedHeaders().getOperationLocation()))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); } else { return detectContentType(form) .flatMap(detectedContentType -> - service.analyzeLayoutAsyncWithResponseAsync(detectedContentType, form, length) + service.analyzeLayoutAsyncWithResponseAsync(detectedContentType, form, length, context) .map(response -> new OperationResult( parseModelId(response.getDeserializedHeaders().getOperationLocation())))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -571,12 +608,12 @@ private Function, Mono> content } private Function, Mono>> - extractContentPollOperation() { + extractContentPollOperation(Context context) { return (pollingContext) -> { try { PollResponse operationResultPollResponse = pollingContext.getLatestResponse(); UUID resultUid = UUID.fromString(operationResultPollResponse.getValue().getResultId()); - return service.getAnalyzeLayoutResultWithResponseAsync(resultUid) + return service.getAnalyzeLayoutResultWithResponseAsync(resultUid, context) .flatMap(modelSimpleResponse -> processAnalyzeModelResponse(modelSimpleResponse, operationResultPollResponse)); } catch (HttpResponseException e) { @@ -587,11 +624,11 @@ private Function, Mono> content } private Function, Mono>> - fetchExtractContentResult() { + fetchExtractContentResult(Context context) { return (pollingContext) -> { try { final UUID resultUid = UUID.fromString(pollingContext.getLatestResponse().getValue().getResultId()); - return service.getAnalyzeLayoutResultWithResponseAsync(resultUid) + return service.getAnalyzeLayoutResultWithResponseAsync(resultUid, context) .map(modelSimpleResponse -> { throwIfAnalyzeStatusInvalid(modelSimpleResponse.getValue()); return toRecognizedLayout(modelSimpleResponse.getValue().getAnalyzeResult(), true); @@ -604,13 +641,13 @@ private Function, Mono> content } private Function, Mono>> - fetchAnalyzeFormResultOperation(String modelId, boolean includeFieldElements) { + fetchAnalyzeFormResultOperation(String modelId, boolean includeFieldElements, Context context) { return (pollingContext) -> { try { Objects.requireNonNull(modelId, "'modelId' is required and cannot be null."); UUID resultUid = UUID.fromString(pollingContext.getLatestResponse().getValue().getResultId()); UUID modelUid = UUID.fromString(modelId); - return service.getAnalyzeFormResultWithResponseAsync(modelUid, resultUid) + return service.getAnalyzeFormResultWithResponseAsync(modelUid, resultUid, context) .map(modelSimpleResponse -> { throwIfAnalyzeStatusInvalid(modelSimpleResponse.getValue()); return toRecognizedForm(modelSimpleResponse.getValue().getAnalyzeResult(), @@ -640,14 +677,14 @@ private void throwIfAnalyzeStatusInvalid(AnalyzeOperationResult analyzeResponse) } private Function, Mono>> - createAnalyzeFormPollOperation(String modelId) { + createAnalyzeFormPollOperation(String modelId, Context context) { return (pollingContext) -> { try { PollResponse operationResultPollResponse = pollingContext.getLatestResponse(); Objects.requireNonNull(modelId, "'modelId' is required and cannot be null."); UUID resultUid = UUID.fromString(operationResultPollResponse.getValue().getResultId()); UUID modelUid = UUID.fromString(modelId); - return service.getAnalyzeFormResultWithResponseAsync(modelUid, resultUid) + return service.getAnalyzeFormResultWithResponseAsync(modelUid, resultUid, context) .flatMap(modelSimpleResponse -> processAnalyzeModelResponse(modelSimpleResponse, operationResultPollResponse)) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -659,13 +696,13 @@ private void throwIfAnalyzeStatusInvalid(AnalyzeOperationResult analyzeResponse) } private Function, Mono> analyzeFormActivationOperation( - String formUrl, String modelId, boolean includeFieldElements) { + String formUrl, String modelId, boolean includeFieldElements, Context context) { return (pollingContext) -> { try { Objects.requireNonNull(formUrl, "'formUrl' is required and cannot be null."); Objects.requireNonNull(modelId, "'modelId' is required and cannot be null."); return service.analyzeWithCustomModelWithResponseAsync(UUID.fromString(modelId), includeFieldElements, - new SourcePath().setSource(formUrl)) + new SourcePath().setSource(formUrl), context) .map(response -> new OperationResult(parseModelId(response.getDeserializedHeaders().getOperationLocation()))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -677,7 +714,7 @@ private Function, Mono> analyze private Function, Mono> analyzeFormStreamActivationOperation( Flux form, String modelId, long length, FormContentType contentType, - boolean includeFieldElements) { + boolean includeFieldElements, Context context) { return pollingContext -> { try { @@ -685,7 +722,7 @@ private Function, Mono> analyze Objects.requireNonNull(modelId, "'modelId' is required and cannot be null."); if (contentType != null) { return service.analyzeWithCustomModelWithResponseAsync(UUID.fromString(modelId), - ContentType.fromString(contentType.toString()), form, length, includeFieldElements) + ContentType.fromString(contentType.toString()), form, length, includeFieldElements, context) .map(response -> new OperationResult(parseModelId( response.getDeserializedHeaders().getOperationLocation()))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -693,7 +730,7 @@ private Function, Mono> analyze return detectContentType(form) .flatMap(detectedContentType -> service.analyzeWithCustomModelWithResponseAsync(UUID.fromString(modelId), - detectedContentType, form, length, includeFieldElements) + detectedContentType, form, length, includeFieldElements, context) .map(response -> new OperationResult( parseModelId(response.getDeserializedHeaders().getOperationLocation())))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java index be8c2332fc80..e0b905fe39d6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import reactor.core.publisher.Flux; @@ -66,7 +67,7 @@ public final class FormRecognizerClient { @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> beginRecognizeCustomFormsFromUrl(String formUrl, String modelId) { - return beginRecognizeCustomFormsFromUrl(formUrl, modelId, null); + return beginRecognizeCustomFormsFromUrl(formUrl, modelId, null, Context.NONE); } /** @@ -76,12 +77,13 @@ public final class FormRecognizerClient { * error message indicating absence of cancellation support

    * *

    Code sample

    - * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string-recognizeOptions} + * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string-recognizeOptions-Context} * * @param formUrl The source URL to the input form. * @param modelId The UUID string format custom trained model Id to be used. * @param recognizeOptions The additional configurable {@link RecognizeOptions options} that may be passed when * recognizing custom form. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * * @return A {@link SyncPoller} to poll the progress of the recognize custom form operation until it has completed, * has failed, or has been cancelled. The completed operation returns a List of {@link RecognizedForm}. @@ -91,8 +93,9 @@ public final class FormRecognizerClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> - beginRecognizeCustomFormsFromUrl(String formUrl, String modelId, RecognizeOptions recognizeOptions) { - return client.beginRecognizeCustomFormsFromUrl(formUrl, modelId, recognizeOptions).getSyncPoller(); + beginRecognizeCustomFormsFromUrl(String formUrl, String modelId, RecognizeOptions recognizeOptions, + Context context) { + return client.beginRecognizeCustomFormsFromUrl(formUrl, modelId, recognizeOptions, context).getSyncPoller(); } /** @@ -117,7 +120,7 @@ public final class FormRecognizerClient { @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> beginRecognizeCustomForms(InputStream form, long length, String modelId) { - return beginRecognizeCustomForms(form, length, modelId, null); + return beginRecognizeCustomForms(form, length, modelId, null, Context.NONE); } /** @@ -127,25 +130,27 @@ public final class FormRecognizerClient { * error message indicating absence of cancellation support.

    * *

    Code sample

    - * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#InputStream-long-string-recognizeOptions} + * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#InputStream-long-string-recognizeOptions-Context} * * @param form The data of the form to recognize form information from. * @param length The exact length of the data. * @param modelId The UUID string format custom trained model Id to be used. * @param recognizeOptions The additional configurable {@link RecognizeOptions options} that may be passed when * recognizing custom form. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * * @return A {@link SyncPoller} that polls the recognize custom form operation until it has completed, * has failed, or has been cancelled. The completed operation returns a List of {@link RecognizedForm}. * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with * an {@link OperationStatus#FAILED}. - * @throws NullPointerException If {@code recognizeOptions} is {@code null}. + * @throws NullPointerException If {@code form}, {@code modelId} is {@code null}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> - beginRecognizeCustomForms(InputStream form, long length, String modelId, RecognizeOptions recognizeOptions) { + beginRecognizeCustomForms(InputStream form, long length, String modelId, RecognizeOptions recognizeOptions, + Context context) { Flux buffer = Utility.toFluxByteBuffer(form); - return client.beginRecognizeCustomForms(buffer, length, modelId, recognizeOptions).getSyncPoller(); + return client.beginRecognizeCustomForms(buffer, length, modelId, recognizeOptions, context).getSyncPoller(); } /** @@ -166,7 +171,7 @@ public final class FormRecognizerClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> beginRecognizeContentFromUrl(String formUrl) { - return beginRecognizeContentFromUrl(formUrl, null); + return beginRecognizeContentFromUrl(formUrl, null, Context.NONE); } /** @@ -175,11 +180,12 @@ public SyncPoller> beginRecognizeContentFromUrl( * error message indicating absence of cancellation support.

    * *

    Code sample

    - * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string-recognizeOptions} + * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string-recognizeOptions-Context} * * @param formUrl The source URL to the input form. * @param recognizeOptions The additional configurable {@link RecognizeOptions options} that may be passed when * recognizing content/layout on a form. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * * @return A {@link SyncPoller} that polls the recognize layout operation until it has completed, has * failed, or has been cancelled. The completed operation returns a List of {@link FormPage}. @@ -189,8 +195,8 @@ public SyncPoller> beginRecognizeContentFromUrl( */ @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> - beginRecognizeContentFromUrl(String formUrl, RecognizeOptions recognizeOptions) { - return client.beginRecognizeContentFromUrl(formUrl, recognizeOptions).getSyncPoller(); + beginRecognizeContentFromUrl(String formUrl, RecognizeOptions recognizeOptions, Context context) { + return client.beginRecognizeContentFromUrl(formUrl, recognizeOptions, context).getSyncPoller(); } /** @@ -213,7 +219,7 @@ public SyncPoller> beginRecognizeContentFromUrl( @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> beginRecognizeContent(InputStream form, long length) { - return beginRecognizeContent(form, length, null); + return beginRecognizeContent(form, length, null, Context.NONE); } /** @@ -222,25 +228,26 @@ public SyncPoller> beginRecognizeContentFromUrl( * error message indicating absence of cancellation support

    * *

    Code sample

    - * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long-recognizeOptions} + * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long-recognizeOptions-Context} * * @param form The data of the form to recognize content information from. * @param length The exact length of the data. * @param recognizeOptions The additional configurable {@link RecognizeOptions options} that may be passed when * analyzing a receipt. The configurable {@code RecognizeOptions options} that may be passed when recognizing * content on a form. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * * @return A {@link SyncPoller} that polls the recognize content operation until it has completed, * has failed, or has been cancelled. The completed operation returns a List of {@link FormPage}. * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with * an {@link OperationStatus#FAILED}. - * @throws NullPointerException If {@code recognizeOptions} is {@code null}. + * @throws NullPointerException If {@code form} is {@code null}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> beginRecognizeContent(InputStream form, long length, - RecognizeOptions recognizeOptions) { + RecognizeOptions recognizeOptions, Context context) { Flux buffer = Utility.toFluxByteBuffer(form); - return client.beginRecognizeContent(buffer, length, recognizeOptions).getSyncPoller(); + return client.beginRecognizeContent(buffer, length, recognizeOptions, context).getSyncPoller(); } /** @@ -263,7 +270,7 @@ public SyncPoller> beginRecognizeContent(InputSt */ @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> beginRecognizeReceiptsFromUrl(String receiptUrl) { - return beginRecognizeReceiptsFromUrl(receiptUrl, null); + return beginRecognizeReceiptsFromUrl(receiptUrl, null, Context.NONE); } /** @@ -273,11 +280,12 @@ public SyncPoller> beginRecognizeReceiptsF * error message indicating absence of cancellation support

    * *

    Code sample

    - * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string-recognizeOptions} + * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string-recognizeOptions-Context} * * @param receiptUrl The source URL to the input receipt. * @param recognizeOptions The additional configurable {@link RecognizeOptions options} that may be passed when * analyzing a receipt. Include text lines and element references in the result. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * * @return A {@link SyncPoller} to poll the progress of the recognize receipt operation until it has completed, * has failed, or has been cancelled. The completed operation returns a List of {@link RecognizedForm}. @@ -287,8 +295,8 @@ public SyncPoller> beginRecognizeReceiptsF */ @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> - beginRecognizeReceiptsFromUrl(String receiptUrl, RecognizeOptions recognizeOptions) { - return client.beginRecognizeReceiptsFromUrl(receiptUrl, recognizeOptions).getSyncPoller(); + beginRecognizeReceiptsFromUrl(String receiptUrl, RecognizeOptions recognizeOptions, Context context) { + return client.beginRecognizeReceiptsFromUrl(receiptUrl, recognizeOptions, context).getSyncPoller(); } /** @@ -313,7 +321,7 @@ public SyncPoller> beginRecognizeReceiptsF @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> beginRecognizeReceipts(InputStream receipt, long length) { - return beginRecognizeReceipts(receipt, length, null); + return beginRecognizeReceipts(receipt, length, null, Context.NONE); } /** @@ -324,23 +332,24 @@ public SyncPoller> beginRecognizeReceiptsF * See here for fields found on a receipt. * *

    Code sample

    - * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long-recognizeOptions} + * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long-recognizeOptions-Context} * * @param receipt The data of the receipt to recognize receipt information from. * @param length The exact length of the data. * @param recognizeOptions The additional configurable {@link RecognizeOptions options} that may be passed when * analyzing a receipt. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * * @return A {@link SyncPoller} that polls the recognize receipt operation until it has completed, has failed, * or has been cancelled. The completed operation returns a List of {@link RecognizedForm}. * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with * an {@link OperationStatus#FAILED}. - * @throws NullPointerException If {@code recognizeOptions} is {@code null}. + * @throws NullPointerException If {@code receipt} is {@code null}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public SyncPoller> - beginRecognizeReceipts(InputStream receipt, long length, RecognizeOptions recognizeOptions) { + beginRecognizeReceipts(InputStream receipt, long length, RecognizeOptions recognizeOptions, Context context) { Flux buffer = Utility.toFluxByteBuffer(receipt); - return client.beginRecognizeReceipts(buffer, length, recognizeOptions).getSyncPoller(); + return client.beginRecognizeReceipts(buffer, length, recognizeOptions, context).getSyncPoller(); } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/Transforms.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/Transforms.java index 9ddbefa914a1..354656ae3d33 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/Transforms.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/Transforms.java @@ -32,6 +32,7 @@ import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Collections; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; @@ -199,7 +200,7 @@ static List getReadResultFormLines(ReadResult readResultItem) { */ private static Map> getUnlabeledFieldMap(DocumentResult documentResultItem, List readResults, boolean includeFieldElements) { - Map> extractedFieldMap = new TreeMap<>(); + Map> extractedFieldMap = new LinkedHashMap<>(); // add receipt fields if (!CoreUtils.isNullOrEmpty(documentResultItem.getFields())) { documentResultItem.getFields().forEach((key, fieldValue) -> { @@ -367,7 +368,7 @@ private static FormPage getFormPage(ReadResult readResultItem, List p private static Map> getLabeledFieldMap(boolean includeFieldElements, List readResults, PageResult pageResultItem, Integer pageNumber) { - Map> formFieldMap = new TreeMap<>(); + Map> formFieldMap = new LinkedHashMap<>(); List keyValuePairs = pageResultItem.getKeyValuePairs(); forEachWithIndex(keyValuePairs, ((index, keyValuePair) -> { List formKeyContentList = null; diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java index 11198cc9b78f..1526894a70a9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java @@ -174,16 +174,21 @@ public PollerFlux beginTraining(String trainin @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux beginTraining(String trainingFilesUrl, boolean useTrainingLabels, TrainingFileFilter trainingFileFilter, Duration pollInterval) { + return beginTraining(trainingFilesUrl, useTrainingLabels, trainingFileFilter, pollInterval, Context.NONE); + } + + PollerFlux beginTraining(String trainingFilesUrl, + boolean useTrainingLabels, TrainingFileFilter trainingFileFilter, Duration pollInterval, Context context) { final Duration interval = pollInterval != null ? pollInterval : DEFAULT_DURATION; return new PollerFlux( interval, getTrainingActivationOperation(trainingFilesUrl, trainingFileFilter != null ? trainingFileFilter.isIncludeSubFolders() : false, trainingFileFilter != null ? trainingFileFilter.getPrefix() : null, - useTrainingLabels), - createTrainingPollOperation(), - (activationResponse, context) -> Mono.error(new RuntimeException("Cancellation is not supported")), - fetchTrainingModelResultOperation()); + useTrainingLabels, context), + createTrainingPollOperation(context), + (activationResponse, pollingContext) -> Mono.error(new RuntimeException("Cancellation is not supported")), + fetchTrainingModelResultOperation(context)); } /** @@ -405,13 +410,18 @@ public PollerFlux beginCopyModel(String mo @ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux beginCopyModel(String modelId, CopyAuthorization target, Duration pollInterval) { + return beginCopyModel(modelId, target, pollInterval, Context.NONE); + } + + PollerFlux beginCopyModel(String modelId, + CopyAuthorization target, Duration pollInterval, Context context) { final Duration interval = pollInterval != null ? pollInterval : DEFAULT_DURATION; return new PollerFlux( interval, - getCopyActivationOperation(modelId, target), - createCopyPollOperation(modelId), - (activationResponse, context) -> Mono.error(new RuntimeException("Cancellation is not supported")), - fetchCopyModelResultOperation(modelId, target.getModelId())); + getCopyActivationOperation(modelId, target, context), + createCopyPollOperation(modelId, context), + (activationResponse, pollingContext) -> Mono.error(new RuntimeException("Cancellation is not supported")), + fetchCopyModelResultOperation(modelId, target.getModelId(), context)); } /** @@ -507,12 +517,12 @@ private Mono> listNextPageModelInfo(String ne } private Function, Mono> fetchCopyModelResultOperation( - String modelId, String copyModelId) { + String modelId, String copyModelId, Context context) { return (pollingContext) -> { try { final UUID resultUid = UUID.fromString(pollingContext.getLatestResponse().getValue().getResultId()); Objects.requireNonNull(modelId, "'modelId' cannot be null."); - return service.getCustomModelCopyResultWithResponseAsync(UUID.fromString(modelId), resultUid) + return service.getCustomModelCopyResultWithResponseAsync(UUID.fromString(modelId), resultUid, context) .map(modelSimpleResponse -> { CopyOperationResult copyOperationResult = modelSimpleResponse.getValue(); throwIfCopyOperationStatusInvalid(copyOperationResult); @@ -531,12 +541,12 @@ private Function, Mono> fet } private Function, Mono>> - createCopyPollOperation(String modelId) { + createCopyPollOperation(String modelId, Context context) { return (pollingContext) -> { try { PollResponse operationResultPollResponse = pollingContext.getLatestResponse(); UUID targetId = UUID.fromString(operationResultPollResponse.getValue().getResultId()); - return service.getCustomModelCopyResultWithResponseAsync(UUID.fromString(modelId), targetId) + return service.getCustomModelCopyResultWithResponseAsync(UUID.fromString(modelId), targetId, context) .flatMap(modelSimpleResponse -> processCopyModelResponse(modelSimpleResponse, operationResultPollResponse)) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -547,7 +557,7 @@ private Function, Mono> fet } private Function, Mono> getCopyActivationOperation( - String modelId, CopyAuthorization target) { + String modelId, CopyAuthorization target, Context context) { return (pollingContext) -> { try { Objects.requireNonNull(modelId, "'modelId' cannot be null."); @@ -559,7 +569,7 @@ private Function, Mono> getCopy .setModelId(target.getModelId()) .setAccessToken(target.getAccessToken()) .setExpirationDateTimeTicks(target.getExpiresOn().toEpochSecond())); - return service.copyCustomModelWithResponseAsync(UUID.fromString(modelId), copyRequest) + return service.copyCustomModelWithResponseAsync(UUID.fromString(modelId), copyRequest, context) .map(response -> new OperationResult(parseModelId(response.getDeserializedHeaders().getOperationLocation()))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -591,11 +601,12 @@ private Mono> processCopyModelResponse( return Mono.just(new PollResponse<>(status, copyModelOperationResponse.getValue())); } - private Function, Mono> fetchTrainingModelResultOperation() { + private Function, Mono> + fetchTrainingModelResultOperation(Context context) { return (pollingContext) -> { try { final UUID modelUid = UUID.fromString(pollingContext.getLatestResponse().getValue().getResultId()); - return service.getCustomModelWithResponseAsync(modelUid, true) + return service.getCustomModelWithResponseAsync(modelUid, true, context) .map(modelSimpleResponse -> { throwIfModelStatusInvalid(modelSimpleResponse.getValue()); return toCustomFormModel(modelSimpleResponse.getValue()); @@ -608,12 +619,12 @@ private Function, Mono> fetchTr } private Function, Mono>> - createTrainingPollOperation() { + createTrainingPollOperation(Context context) { return (pollingContext) -> { try { PollResponse operationResultPollResponse = pollingContext.getLatestResponse(); UUID modelUid = UUID.fromString(operationResultPollResponse.getValue().getResultId()); - return service.getCustomModelWithResponseAsync(modelUid, true) + return service.getCustomModelWithResponseAsync(modelUid, true, context) .flatMap(modelSimpleResponse -> processTrainingModelResponse(modelSimpleResponse, operationResultPollResponse)) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); @@ -625,7 +636,8 @@ private Function, Mono> fetchTr } private Function, Mono> getTrainingActivationOperation( - String trainingFilesUrl, boolean includeSubFolders, String filePrefix, boolean useTrainingLabels) { + String trainingFilesUrl, boolean includeSubFolders, String filePrefix, boolean useTrainingLabels, + Context context) { return (pollingContext) -> { try { Objects.requireNonNull(trainingFilesUrl, "'trainingFilesUrl' cannot be null."); @@ -633,7 +645,7 @@ private Function, Mono> getTrai .setPrefix(filePrefix); TrainRequest serviceTrainRequest = new TrainRequest().setSource(trainingFilesUrl). setSourceFilter(trainSourceFilter).setUseLabelFile(useTrainingLabels); - return service.trainCustomModelAsyncWithResponseAsync(serviceTrainRequest) + return service.trainCustomModelAsyncWithResponseAsync(serviceTrainRequest, context) .map(response -> new OperationResult(parseModelId(response.getDeserializedHeaders().getLocation()))) .onErrorMap(Utility::mapToHttpResponseExceptionIfExist); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java index dcab77ad6e21..3d87066da776 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java @@ -87,7 +87,7 @@ public FormRecognizerClient getFormRecognizerClient() { @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller beginTraining(String trainingFilesUrl, boolean useTrainingLabels) { - return beginTraining(trainingFilesUrl, useTrainingLabels, null, null); + return beginTraining(trainingFilesUrl, useTrainingLabels, null, null, Context.NONE); } /** @@ -99,7 +99,7 @@ public SyncPoller beginTraining(String trainin * error message indicating absence of cancellation support.

    * *

    Code sample

    - * {@codesnippet com.azure.ai.formrecognizer.training.FormTrainingClient.beginTraining#string-boolean-trainingFileFilter-Duration} + * {@codesnippet com.azure.ai.formrecognizer.training.FormTrainingClient.beginTraining#string-boolean-trainingFileFilter-Duration-Context} * * @param trainingFilesUrl an externally accessible Azure storage blob container Uri (preferably a * Shared Access Signature Uri). @@ -109,6 +109,7 @@ public SyncPoller beginTraining(String trainin * @param trainingFileFilter Filter to apply to the documents in the source path for training. * @param pollInterval Duration between each poll for the operation status. If none is specified, a default of * 5 seconds is used. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * * @return A {@link SyncPoller} that polls the training model operation until it has completed, has failed, or has * been cancelled. The completed operation returns the trained {@link CustomFormModel custom form model}. @@ -117,8 +118,8 @@ public SyncPoller beginTraining(String trainin */ @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller beginTraining(String trainingFilesUrl, - boolean useTrainingLabels, TrainingFileFilter trainingFileFilter, Duration pollInterval) { - return client.beginTraining(trainingFilesUrl, useTrainingLabels, trainingFileFilter, pollInterval) + boolean useTrainingLabels, TrainingFileFilter trainingFileFilter, Duration pollInterval, Context context) { + return client.beginTraining(trainingFilesUrl, useTrainingLabels, trainingFileFilter, pollInterval, context) .getSyncPoller(); } @@ -268,7 +269,7 @@ public PagedIterable listCustomModels(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller beginCopyModel(String modelId, CopyAuthorization target) { - return beginCopyModel(modelId, target, null); + return beginCopyModel(modelId, target, null, Context.NONE); } /** @@ -283,21 +284,22 @@ public SyncPoller beginCopyModel(String mo * error message indicating absence of cancellation support.

    * *

    Code sample

    - * {@codesnippet com.azure.ai.formrecognizer.training.FormTrainingClient.beginCopyModel#string-copyAuthorization-Duration} + * {@codesnippet com.azure.ai.formrecognizer.training.FormTrainingClient.beginCopyModel#string-copyAuthorization-Duration-Context} * * @param modelId Model identifier of the model to copy to the target Form Recognizer resource * @param target the copy authorization to the target Form Recognizer resource. The copy authorization can be * generated from the target resource's call to {@link FormTrainingClient#getCopyAuthorization(String, String)} * @param pollInterval Duration between each poll for the operation status. If none is specified, a default of * 5 seconds is used. + * @param context Additional context that is passed through the HTTP pipeline during the service call. * * @return A {@link SyncPoller} that polls the copy model operation until it has completed, has failed, * or has been cancelled. */ @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller beginCopyModel(String modelId, - CopyAuthorization target, Duration pollInterval) { - return client.beginCopyModel(modelId, target, pollInterval).getSyncPoller(); + CopyAuthorization target, Duration pollInterval, Context context) { + return client.beginCopyModel(modelId, target, pollInterval, context).getSyncPoller(); } /** diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledData.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledData.java index b3a96dd6c895..cd98e6575756 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledData.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledData.java @@ -7,6 +7,7 @@ import com.azure.ai.formrecognizer.models.RecognizeOptions; import com.azure.ai.formrecognizer.models.RecognizedForm; import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.Context; import java.io.File; import java.io.FileInputStream; @@ -49,18 +50,20 @@ public static void main(String[] args) throws IOException { List formsWithLabeledModel = client.beginRecognizeCustomForms( new FileInputStream(analyzeFile), analyzeFile.length(), - "{labeled_model_Id}", new RecognizeOptions() + "{labeled_model_Id}", + new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF) .setIncludeFieldElements(true) - .setPollInterval(Duration.ofSeconds(5))) + .setPollInterval(Duration.ofSeconds(5)), Context.NONE) .getFinalResult(); List formsWithUnlabeledModel = client.beginRecognizeCustomForms(new FileInputStream(analyzeFile), analyzeFile.length(), - "{unlabeled_model_Id}", new RecognizeOptions() + "{unlabeled_model_Id}", + new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF) .setIncludeFieldElements(true) - .setPollInterval(Duration.ofSeconds(5))) + .setPollInterval(Duration.ofSeconds(5)), Context.NONE) .getFinalResult(); System.out.println("--------Recognizing forms with labeled custom model--------"); @@ -109,15 +112,14 @@ public static void main(String[] args) throws IOException { String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append); } - final StringBuilder boundingBoxLabelStr = new StringBuilder(); if (formField.getLabelData() != null && formField.getLabelData().getBoundingBox() != null) { formField.getLabelData().getBoundingBox().getPoints().stream().map(point -> String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append); - } - System.out.printf("Field %s has label %s within bounding box %s with a confidence score " - + "of %.2f.%n", - label, formField.getLabelData().getText(), boundingBoxLabelStr, formField.getConfidence()); + System.out.printf("Field %s has label %s within bounding box %s with a confidence score " + + "of %.2f.%n", + label, formField.getLabelData().getText(), "", formField.getConfidence()); + } System.out.printf("Field %s has value %s based on %s within bounding box %s with a confidence score " + "of %.2f.%n", label, formField.getValue(), formField.getValueData().getText(), boundingBoxStr, diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledDataAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledDataAsync.java index 24b783a515d1..6263691407da 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledDataAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledDataAsync.java @@ -56,7 +56,8 @@ public static void main(String[] args) throws IOException { PollerFlux> labeledCustomFormPoller = client.beginRecognizeCustomForms(toFluxByteBuffer(new ByteArrayInputStream(fileContent)), - analyzeFile.length(), "{labeled_model_Id}", new RecognizeOptions() + analyzeFile.length(), "{labeled_model_Id}", + new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF) .setIncludeFieldElements(true) .setPollInterval(Duration.ofSeconds(5))); @@ -71,25 +72,24 @@ public static void main(String[] args) throws IOException { Mono> labeledDataResult = labeledCustomFormPoller .last() - .flatMap(trainingOperationResponse -> { - if (trainingOperationResponse.getStatus().isComplete()) { + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { // training completed successfully, retrieving final result. - return trainingOperationResponse.getFinalResult(); + return pollResponse.getFinalResult(); } else { return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + trainingOperationResponse.getStatus())); + + pollResponse.getStatus())); } }); Mono> unlabeledDataResult = unlabeledCustomFormPoller .last() - .flatMap(trainingOperationResponse -> { - if (trainingOperationResponse.getStatus().isComplete()) { - // training completed successfully, retrieving final result. - return trainingOperationResponse.getFinalResult(); + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { + return pollResponse.getFinalResult(); } else { return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + trainingOperationResponse.getStatus())); + + pollResponse.getStatus())); } }); @@ -146,14 +146,14 @@ public static void main(String[] args) throws IOException { String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append); } - final StringBuilder boundingBoxLabelStr = new StringBuilder(); if (formField.getLabelData() != null && formField.getLabelData().getBoundingBox() != null) { formField.getLabelData().getBoundingBox().getPoints().stream().map(point -> String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append); + + System.out.printf("Field %s has label %s within bounding box %s with a confidence score " + + "of %.2f.%n", + label, formField.getLabelData().getText(), "", formField.getConfidence()); } - System.out.printf("Field %s has label %s within bounding box %s with a confidence score " - + "of %.2f.%n", - label, formField.getLabelData().getText(), boundingBoxLabelStr, formField.getConfidence()); System.out.printf("Field %s has value %s based on %s within bounding box %s with a confidence " + "score of %.2f.%n", diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/Authentication.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/Authentication.java index 121fa1b04037..c9c261c424ae 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/Authentication.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/Authentication.java @@ -31,11 +31,11 @@ public class Authentication { * */ public static void main(String[] args) { - /** - * Set the environment variables with your own values before running the sample: - * AZURE_CLIENT_ID - the client ID of your active directory application. - * AZURE_TENANT_ID - the tenant ID of your active directory application. - * AZURE_CLIENT_SECRET - the secret of your active directory application. + /* + Set the environment variables with your own values before running the sample: + AZURE_CLIENT_ID - the client ID of your active directory application. + AZURE_TENANT_ID - the tenant ID of your active directory application. + AZURE_CLIENT_SECRET - the secret of your active directory application. */ // Form recognizer client: Key credential @@ -92,10 +92,10 @@ private static void beginRecognizeCustomFormsFromUrl(FormRecognizerClient formRe for (int i = 0; i < receiptPageResults.size(); i++) { RecognizedForm recognizedForm = receiptPageResults.get(i); Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + System.out.printf("----------- Recognizing receipt info for page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -104,7 +104,7 @@ private static void beginRecognizeCustomFormsFromUrl(FormRecognizerClient formRe FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -113,7 +113,7 @@ private static void beginRecognizeCustomFormsFromUrl(FormRecognizerClient formRe FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -123,29 +123,27 @@ private static void beginRecognizeCustomFormsFromUrl(FormRecognizerClient formRe FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Name".equals(key)) { - if (FieldValueType.STRING.equals(formField.getValueType())) { - String name = FieldValueType.STRING.cast(formField); - System.out.printf("Name: %s, confidence: %.2fs%n", - name, formField.getConfidence()); - } + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Name".equals(key)) { + if (FieldValueType.STRING == formField.getValueType()) { + String name = FieldValueType.STRING.cast(formField); + System.out.printf("Name: %s, confidence: %.2fs%n", + name, formField.getConfidence()); } - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %f, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + } + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - }); - } - }); + } + })); } } System.out.print("-----------------------------------"); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CopyModelAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CopyModelAsync.java index fd6df45da834..b90d38314f6b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CopyModelAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CopyModelAsync.java @@ -6,6 +6,7 @@ import com.azure.ai.formrecognizer.training.FormTrainingAsyncClient; import com.azure.ai.formrecognizer.training.FormTrainingClientBuilder; import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.polling.AsyncPollResponse; import java.util.concurrent.TimeUnit; @@ -42,7 +43,8 @@ public static void main(final String[] args) { // Start copy operation from the source client // The Id of the model that needs to be copied to the target resource .subscribe(copyAuthorization -> sourceClient.beginCopyModel(copyModelId, copyAuthorization) - .subscribe(copyPoller -> copyPoller.getFinalResult() + .filter(pollResponse -> pollResponse.getStatus().isComplete()) + .flatMap(AsyncPollResponse::getFinalResult) .subscribe(customFormModelInfo -> { System.out.printf("Original model has model Id: %s, model status: %s, training started on: %s," + " training completed on: %s.%n", @@ -59,7 +61,7 @@ public static void main(final String[] args) { customFormModel.getModelStatus(), customFormModel.getTrainingStartedOn(), customFormModel.getTrainingCompletedOn())); - }))); + })); // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep // the thread so the program does not end before the send operation is complete. Using .block() instead of diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientJavaDocCodeSnippets.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientJavaDocCodeSnippets.java index 3ac36fa32243..7a1602434a2c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientJavaDocCodeSnippets.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientJavaDocCodeSnippets.java @@ -11,6 +11,7 @@ import com.azure.core.credential.AzureKeyCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.util.polling.AsyncPollResponse; import reactor.core.publisher.Flux; import java.io.ByteArrayInputStream; @@ -70,17 +71,17 @@ public void beginRecognizeCustomFormsFromUrl() { String formUrl = "{form_url}"; String modelId = "{custom_trained_model_id}"; - formRecognizerAsyncClient.beginRecognizeCustomFormsFromUrl(formUrl, modelId).flatMap( - recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()).subscribe(recognizedForms -> - recognizedForms.forEach(recognizedForm -> { - recognizedForm.getFields().forEach((fieldText, fieldValue) -> { - System.out.printf("Field text: %s%n", fieldText); - System.out.printf("Field value: %s%n", fieldValue.getValue()); - System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); - }); - })); + // if training polling operation completed, retrieve the final result. + formRecognizerAsyncClient.beginRecognizeCustomFormsFromUrl(formUrl, modelId) + // if training polling operation completed, retrieve the final result. + .flatMap(AsyncPollResponse::getFinalResult) + .flatMap(Flux::fromIterable) + .subscribe(recognizedForm -> recognizedForm.getFields() + .forEach((fieldText, fieldValue) -> { + System.out.printf("Field text: %s%n", fieldText); + System.out.printf("Field value: %s%n", fieldValue.getValue()); + System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); + })); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeCustomFormsFromUrl#string-string } @@ -98,16 +99,15 @@ public void beginRecognizeCustomFormsFromUrlWithOptions() { new RecognizeOptions() .setIncludeFieldElements(includeTextContent) .setPollInterval(Duration.ofSeconds(10))) - .flatMap(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()).subscribe(recognizedForms -> - recognizedForms.forEach(recognizedForm -> { - recognizedForm.getFields().forEach((fieldText, fieldValue) -> { - System.out.printf("Field text: %s%n", fieldText); - System.out.printf("Field value: %s%n", fieldValue.getValue()); - System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); - }); - })); + // if training polling operation completed, retrieve the final result. + .flatMap(AsyncPollResponse::getFinalResult) + .flatMap(Flux::fromIterable) + .subscribe(recognizedForm -> recognizedForm.getFields() + .forEach((fieldText, fieldValue) -> { + System.out.printf("Field text: %s%n", fieldText); + System.out.printf("Field value: %s%n", fieldValue.getValue()); + System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); + })); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeCustomFormsFromUrl#string-string-recognizeOptions } @@ -123,17 +123,17 @@ public void beginRecognizeCustomForms() throws IOException { // Utility method to convert input stream to Byte buffer Flux buffer = toFluxByteBuffer(new ByteArrayInputStream(Files.readAllBytes(form.toPath()))); + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeCustomForms(buffer, form.length(), modelId) - .flatMap(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()).subscribe(recognizedForms -> - recognizedForms.forEach(recognizedForm -> { - recognizedForm.getFields().forEach((fieldText, fieldValue) -> { - System.out.printf("Field text: %s%n", fieldText); - System.out.printf("Field value: %s%n", fieldValue.getValue()); - System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); - }); - })); + // if training polling operation completed, retrieve the final result. + .flatMap(AsyncPollResponse::getFinalResult) + .flatMap(Flux::fromIterable) + .subscribe(recognizedForm -> recognizedForm.getFields() + .forEach((fieldText, fieldValue) -> { + System.out.printf("Field text: %s%n", fieldText); + System.out.printf("Field value: %s%n", fieldValue.getValue()); + System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); + })); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeCustomForms#Flux-long-string } @@ -152,21 +152,21 @@ public void beginRecognizeCustomFormsWithOptions() throws IOException { // Utility method to convert input stream to Byte buffer Flux buffer = toFluxByteBuffer(new ByteArrayInputStream(Files.readAllBytes(form.toPath()))); + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeCustomForms(buffer, form.length(), modelId, new RecognizeOptions() .setContentType(FormContentType.IMAGE_JPEG) .setIncludeFieldElements(includeFieldElements) .setPollInterval(Duration.ofSeconds(5))) - .flatMap(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()).subscribe(recognizedForms -> - recognizedForms.forEach(recognizedForm -> { - recognizedForm.getFields().forEach((fieldText, fieldValue) -> { - System.out.printf("Field text: %s%n", fieldText); - System.out.printf("Field value: %s%n", fieldValue.getValue()); - System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); - }); - })); + // if training polling operation completed, retrieve the final result. + .flatMap(AsyncPollResponse::getFinalResult) + .flatMap(Flux::fromIterable) + .subscribe(recognizedForm -> recognizedForm.getFields() + .forEach((fieldText, fieldValue) -> { + System.out.printf("Field text: %s%n", fieldText); + System.out.printf("Field value: %s%n", fieldValue.getValue()); + System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); + })); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeCustomForms#Flux-long-string-recognizeOptions } @@ -178,18 +178,19 @@ public void beginRecognizeCustomFormsWithOptions() throws IOException { public void beginRecognizeContentFromUrl() { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeContentFromUrl#string String formUrl = "{formUrl}"; - formRecognizerAsyncClient.beginRecognizeContentFromUrl(formUrl).flatMap( - recognizePollingOperation -> - recognizePollingOperation.getFinalResult()).subscribe(layoutPageResults -> - layoutPageResults.forEach(recognizedForm -> { - System.out.printf("Page Angle: %s%n", recognizedForm.getTextAngle()); - System.out.printf("Page Dimension unit: %s%n", recognizedForm.getUnit()); - // Table information - System.out.println("Recognized Tables: "); - recognizedForm.getTables().forEach(formTable -> - formTable.getCells().forEach(recognizedTableCell -> - System.out.printf("%s ", recognizedTableCell.getText()))); - })); + formRecognizerAsyncClient.beginRecognizeContentFromUrl(formUrl) + // if training polling operation completed, retrieve the final result. + .flatMap(AsyncPollResponse::getFinalResult) + .flatMap(Flux::fromIterable) + .subscribe(formPage -> { + System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); + System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); + // Table information + System.out.println("Recognized Tables: "); + formPage.getTables().forEach(formTable -> + formTable.getCells().forEach(recognizedTableCell -> + System.out.printf("%s ", recognizedTableCell.getText()))); + }); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeContentFromUrl#string } @@ -200,21 +201,20 @@ public void beginRecognizeContentFromUrl() { public void beginRecognizeContentFromUrlWithOptions() { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeContentFromUrl#string-recognizeOptions String formUrl = "{formUrl}"; + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeContentFromUrl(formUrl, new RecognizeOptions().setPollInterval(Duration.ofSeconds(5))) - .flatMap(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()) - .subscribe(contentPageResult -> - contentPageResult.forEach(recognizedForm -> { - System.out.printf("Page Angle: %s%n", recognizedForm.getTextAngle()); - System.out.printf("Page Dimension unit: %s%n", recognizedForm.getUnit()); - // Table information - System.out.println("Recognized Tables: "); - recognizedForm.getTables().forEach(formTable -> - formTable.getCells().forEach(recognizedTableCell -> - System.out.printf("%s ", recognizedTableCell.getText()))); - })); + .flatMap(AsyncPollResponse::getFinalResult) + .flatMap(Flux::fromIterable) + .subscribe(formPage -> { + System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); + System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); + // Table information + System.out.println("Recognized Tables: "); + formPage.getTables().forEach(formTable -> + formTable.getCells().forEach(recognizedTableCell -> + System.out.printf("%s ", recognizedTableCell.getText()))); + }); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeContentFromUrl#string-recognizeOptions } @@ -229,20 +229,19 @@ public void beginRecognizeContent() throws IOException { // Utility method to convert input stream to Byte buffer Flux buffer = toFluxByteBuffer(new ByteArrayInputStream(Files.readAllBytes(form.toPath()))); + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeContent(buffer, form.length()) - .flatMap(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()) - .subscribe(contentPageResult -> - contentPageResult.forEach(formPage -> { - System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); - System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); - // Table information - System.out.println("Recognized Tables: "); - formPage.getTables().forEach(formTable -> - formTable.getCells().forEach(recognizedTableCell -> - System.out.printf("%s ", recognizedTableCell.getText()))); - })); + .flatMap(AsyncPollResponse::getFinalResult) + .flatMap(Flux::fromIterable) + .subscribe(formPage -> { + System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); + System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); + // Table information + System.out.println("Recognized Tables: "); + formPage.getTables().forEach(formTable -> + formTable.getCells().forEach(recognizedTableCell -> + System.out.printf("%s ", recognizedTableCell.getText()))); + }); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeContent#Flux-long } @@ -257,22 +256,21 @@ public void beginRecognizeContentWithOptions() throws IOException { File form = new File("{local/file_path/fileName.jpg}"); // Utility method to convert input stream to Byte buffer Flux buffer = toFluxByteBuffer(new ByteArrayInputStream(Files.readAllBytes(form.toPath()))); + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeContent(buffer, form.length(), new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF) .setPollInterval(Duration.ofSeconds(5))) - .flatMap(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()) - .subscribe(contentPageResult -> - contentPageResult.forEach(formPage -> { - System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); - System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); - // Table information - System.out.println("Recognized Tables: "); - formPage.getTables().forEach(formTable -> formTable.getCells().forEach(recognizedTableCell -> - System.out.printf("%s ", recognizedTableCell.getText()))); - })); + .flatMap(AsyncPollResponse::getFinalResult) + .flatMap(Flux::fromIterable) + .subscribe(formPage -> { + System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); + System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); + // Table information + System.out.println("Recognized Tables: "); + formPage.getTables().forEach(formTable -> formTable.getCells().forEach(recognizedTableCell -> + System.out.printf("%s ", recognizedTableCell.getText()))); + }); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeContent#Flux-long-recognizeOptions } @@ -284,10 +282,10 @@ public void beginRecognizeContentWithOptions() throws IOException { public void beginRecognizeReceiptsFromUrl() { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeReceiptsFromUrl#string String receiptUrl = "{receiptUrl}"; + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeReceiptsFromUrl(receiptUrl) - .flatMap(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()) + // if training polling operation completed, retrieve the final result. + .flatMap(AsyncPollResponse::getFinalResult) .subscribe(recognizedReceipts -> { for (int i = 0; i < recognizedReceipts.size(); i++) { RecognizedForm recognizedForm = recognizedReceipts.get(i); @@ -295,7 +293,7 @@ public void beginRecognizeReceiptsFromUrl() { System.out.printf("----------- Recognized Receipt page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -304,7 +302,7 @@ public void beginRecognizeReceiptsFromUrl() { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -313,7 +311,7 @@ public void beginRecognizeReceiptsFromUrl() { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -323,23 +321,20 @@ public void beginRecognizeReceiptsFromUrl() { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %f, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - }); - } - }); + } + })); } } } @@ -354,13 +349,12 @@ public void beginRecognizeReceiptsFromUrlWithOptions() { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeReceiptsFromUrl#string-recognizeOptions String receiptUrl = "{receiptUrl}"; boolean includeTextContent = true; + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeReceiptsFromUrl(receiptUrl, new RecognizeOptions() .setIncludeFieldElements(includeTextContent) .setPollInterval(Duration.ofSeconds(5))) - .flatMap(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult()) + .flatMap(AsyncPollResponse::getFinalResult) .subscribe(recognizedReceipts -> { for (int i = 0; i < recognizedReceipts.size(); i++) { RecognizedForm recognizedReceipt = recognizedReceipts.get(i); @@ -368,7 +362,7 @@ public void beginRecognizeReceiptsFromUrlWithOptions() { System.out.printf("----------- Recognized Receipt page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -377,7 +371,7 @@ public void beginRecognizeReceiptsFromUrlWithOptions() { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -386,7 +380,7 @@ public void beginRecognizeReceiptsFromUrlWithOptions() { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -396,23 +390,20 @@ public void beginRecognizeReceiptsFromUrlWithOptions() { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %f, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - }); - } - }); + } + })); } } } @@ -429,65 +420,62 @@ public void beginRecognizeReceipts() throws IOException { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeReceipts#Flux-long File receipt = new File("{file_source_url}"); Flux buffer = toFluxByteBuffer(new ByteArrayInputStream(Files.readAllBytes(receipt.toPath()))); + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeReceipts(buffer, receipt.length()) - .subscribe(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult().subscribe(recognizedReceipts -> { - for (int i = 0; i < recognizedReceipts.size(); i++) { - RecognizedForm recognizedForm = recognizedReceipts.get(i); - Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); - FormField merchantNameField = recognizedFields.get("MerchantName"); - if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { - String merchantName = FieldValueType.STRING.cast(merchantNameField); - System.out.printf("Merchant Name: %s, confidence: %.2f%n", - merchantName, merchantNameField.getConfidence()); + .flatMap(AsyncPollResponse::getFinalResult) + .subscribe(recognizedReceipts -> { + for (int i = 0; i < recognizedReceipts.size(); i++) { + RecognizedForm recognizedForm = recognizedReceipts.get(i); + Map> recognizedFields = recognizedForm.getFields(); + System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + FormField merchantNameField = recognizedFields.get("MerchantName"); + if (merchantNameField != null) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { + String merchantName = FieldValueType.STRING.cast(merchantNameField); + System.out.printf("Merchant Name: %s, confidence: %.2f%n", + merchantName, merchantNameField.getConfidence()); + } } - } - FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); - if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { - String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); - System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", - merchantAddress, merchantPhoneNumberField.getConfidence()); + FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); + if (merchantPhoneNumberField != null) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { + String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); + System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", + merchantAddress, merchantPhoneNumberField.getConfidence()); + } } - } - FormField transactionDateField = recognizedFields.get("TransactionDate"); - if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { - LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); - System.out.printf("Transaction Date: %s, confidence: %.2f%n", - transactionDate, transactionDateField.getConfidence()); + FormField transactionDateField = recognizedFields.get("TransactionDate"); + if (transactionDateField != null) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { + LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); + System.out.printf("Transaction Date: %s, confidence: %.2f%n", + transactionDate, transactionDateField.getConfidence()); + } } - } - FormField receiptItemsField = recognizedFields.get("Items"); - if (receiptItemsField != null) { - System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { - List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { + FormField receiptItemsField = recognizedFields.get("Items"); + if (receiptItemsField != null) { + System.out.printf("Receipt Items: %n"); + if (FieldValueType.LIST == receiptItemsField.getValueType()) { + List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { + if (FieldValueType.DOUBLE == formField.getValueType()) { Float quantity = FieldValueType.DOUBLE.cast(formField); System.out.printf("Quantity: %f, confidence: %.2f%n", quantity, formField.getConfidence()); } } - }); - } - }); + })); + } } } - } - })); + }); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeReceipts#Flux-long } @@ -503,70 +491,66 @@ public void beginRecognizeReceiptsWithOptions() throws IOException { boolean includeFieldElements = true; // Utility method to convert input stream to Byte buffer Flux buffer = toFluxByteBuffer(new ByteArrayInputStream(Files.readAllBytes(receipt.toPath()))); + // if training polling operation completed, retrieve the final result. formRecognizerAsyncClient.beginRecognizeReceipts(buffer, receipt.length(), new RecognizeOptions() .setContentType(FormContentType.IMAGE_JPEG) .setIncludeFieldElements(includeFieldElements) .setPollInterval(Duration.ofSeconds(5))) - .subscribe(recognizePollingOperation -> - // if training polling operation completed, retrieve the final result. - recognizePollingOperation.getFinalResult().subscribe(recognizedReceipts -> { - for (int i = 0; i < recognizedReceipts.size(); i++) { - RecognizedForm recognizedForm = recognizedReceipts.get(i); - Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); - FormField merchantNameField = recognizedFields.get("MerchantName"); - if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { - String merchantName = FieldValueType.STRING.cast(merchantNameField); - System.out.printf("Merchant Name: %s, confidence: %.2f%n", - merchantName, merchantNameField.getConfidence()); - } + .flatMap(AsyncPollResponse::getFinalResult) + .subscribe(recognizedReceipts -> { + for (int i = 0; i < recognizedReceipts.size(); i++) { + RecognizedForm recognizedForm = recognizedReceipts.get(i); + Map> recognizedFields = recognizedForm.getFields(); + System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + FormField merchantNameField = recognizedFields.get("MerchantName"); + if (merchantNameField != null) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { + String merchantName = FieldValueType.STRING.cast(merchantNameField); + System.out.printf("Merchant Name: %s, confidence: %.2f%n", + merchantName, merchantNameField.getConfidence()); } + } - FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); - if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { - String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); - System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", - merchantAddress, merchantPhoneNumberField.getConfidence()); - } + FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); + if (merchantPhoneNumberField != null) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { + String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); + System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", + merchantAddress, merchantPhoneNumberField.getConfidence()); } + } - FormField transactionDateField = recognizedFields.get("TransactionDate"); - if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { - LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); - System.out.printf("Transaction Date: %s, confidence: %.2f%n", - transactionDate, transactionDateField.getConfidence()); - } + FormField transactionDateField = recognizedFields.get("TransactionDate"); + if (transactionDateField != null) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { + LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); + System.out.printf("Transaction Date: %s, confidence: %.2f%n", + transactionDate, transactionDateField.getConfidence()); } + } - FormField receiptItemsField = recognizedFields.get("Items"); - if (receiptItemsField != null) { - System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { - List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %f, confidence: %.2f%n", - quantity, formField.getConfidence()); - } - } - }); + FormField receiptItemsField = recognizedFields.get("Items"); + if (receiptItemsField != null) { + System.out.printf("Receipt Items: %n"); + if (FieldValueType.LIST == receiptItemsField.getValueType()) { + List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); + } } - }); - } + })); } } - })); - + } + }); // END: com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeReceipts#Flux-long-recognizeOptions } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerClientJavaDocCodeSnippets.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerClientJavaDocCodeSnippets.java index 3e88ff23d154..0f3279e4f2de 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerClientJavaDocCodeSnippets.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerClientJavaDocCodeSnippets.java @@ -6,10 +6,13 @@ import com.azure.ai.formrecognizer.models.FieldValueType; import com.azure.ai.formrecognizer.models.FormContentType; import com.azure.ai.formrecognizer.models.FormField; +import com.azure.ai.formrecognizer.models.FormPage; import com.azure.ai.formrecognizer.models.RecognizeOptions; +import com.azure.ai.formrecognizer.models.RecognizedForm; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.util.Context; import java.io.ByteArrayInputStream; import java.io.File; @@ -68,36 +71,39 @@ public void beginRecognizeCustomFormsFromUrl() { String modelId = "{custom_trained_model_id}"; formRecognizerClient.beginRecognizeCustomFormsFromUrl(formUrl, modelId).getFinalResult() - .forEach(recognizedForm -> - recognizedForm.getFields().forEach((fieldText, fieldValue) -> { - System.out.printf("Field text: %s%n", fieldText); - System.out.printf("Field value: %s%n", fieldValue.getValue()); - System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); - })); + .stream() + .map(RecognizedForm::getFields) + .forEach(formFieldMap -> formFieldMap.forEach((fieldText, formField) -> { + System.out.printf("Field text: %s%n", fieldText); + System.out.printf("Field value: %s%n", formField.getValue()); + System.out.printf("Confidence score: %.2f%n", formField.getConfidence()); + })); + // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string } /** - * Code snippet for {@link FormRecognizerClient#beginRecognizeCustomFormsFromUrl(String, String, RecognizeOptions)} + * Code snippet for {@link FormRecognizerClient#beginRecognizeCustomFormsFromUrl(String, String, RecognizeOptions, Context)} */ public void beginRecognizeCustomFormsFromUrlWithOptions() { - // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string-recognizeOptions + // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string-recognizeOptions-Context String analyzeFilePath = "{file_source_url}"; String modelId = "{model_id}"; boolean includeFieldElements = true; formRecognizerClient.beginRecognizeCustomFormsFromUrl(analyzeFilePath, modelId, new RecognizeOptions() - .setContentType(FormContentType.IMAGE_JPEG) .setIncludeFieldElements(includeFieldElements) - .setPollInterval(Duration.ofSeconds(10))) + .setPollInterval(Duration.ofSeconds(10)), Context.NONE) .getFinalResult() - .forEach(recognizedForm -> recognizedForm.getFields().forEach((fieldText, fieldValue) -> { + .stream() + .map(RecognizedForm::getFields) + .forEach(formFieldMap -> formFieldMap.forEach((fieldText, formField) -> { System.out.printf("Field text: %s%n", fieldText); - System.out.printf("Field value: %s%n", fieldValue.getValue()); - System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); + System.out.printf("Field value: %s%n", formField.getValue()); + System.out.printf("Confidence score: %.2f%n", formField.getConfidence()); })); - // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string-recognizeOptions + // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomFormsFromUrl#string-string-recognizeOptions-Context } /** @@ -111,44 +117,50 @@ public void beginRecognizeCustomForms() throws IOException { File form = new File("{local/file_path/fileName.jpg}"); String modelId = "{custom_trained_model_id}"; byte[] fileContent = Files.readAllBytes(form.toPath()); - InputStream targetStream = new ByteArrayInputStream(fileContent); + try (InputStream targetStream = new ByteArrayInputStream(fileContent)) { - formRecognizerClient.beginRecognizeCustomForms(targetStream, form.length(), modelId).getFinalResult() - .forEach(recognizedForm -> recognizedForm.getFields().forEach((fieldText, fieldValue) -> { - System.out.printf("Field text: %s%n", fieldText); - System.out.printf("Field value: %s%n", fieldValue.getValue()); - System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); - })); + formRecognizerClient.beginRecognizeCustomForms(targetStream, form.length(), modelId) + .getFinalResult() + .stream() + .map(RecognizedForm::getFields) + .forEach(formFieldMap -> formFieldMap.forEach((fieldText, formField) -> { + System.out.printf("Field text: %s%n", fieldText); + System.out.printf("Field value: %s%n", formField.getValue()); + System.out.printf("Confidence score: %.2f%n", formField.getConfidence()); + })); + } // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#InputStream-long-string } /** * Code snippet for - * {@link FormRecognizerClient#beginRecognizeCustomForms(InputStream, long, String, RecognizeOptions)} with options + * {@link FormRecognizerClient#beginRecognizeCustomForms(InputStream, long, String, RecognizeOptions, Context)} with options * * @throws IOException Exception thrown when there is an error in reading all the bytes from the File. */ public void beginRecognizeCustomFormsWithOptions() throws IOException { - // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#InputStream-long-string-recognizeOptions + // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#InputStream-long-string-recognizeOptions-Context File form = new File("{local/file_path/fileName.jpg}"); String modelId = "{custom_trained_model_id}"; boolean includeFieldElements = true; - byte[] fileContent = Files.readAllBytes(form.toPath()); - InputStream targetStream = new ByteArrayInputStream(fileContent); - formRecognizerClient.beginRecognizeCustomForms(targetStream, form.length(), modelId, - new RecognizeOptions() - .setContentType(FormContentType.IMAGE_JPEG) - .setIncludeFieldElements(includeFieldElements) - .setPollInterval(Duration.ofSeconds(10))) - .getFinalResult() - .forEach(recognizedForm -> recognizedForm.getFields().forEach((fieldText, fieldValue) -> { - System.out.printf("Field text: %s%n", fieldText); - System.out.printf("Field value: %s%n", fieldValue.getValue()); - System.out.printf("Confidence score: %.2f%n", fieldValue.getConfidence()); - })); - // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#InputStream-long-string-recognizeOptions + try (InputStream targetStream = new ByteArrayInputStream(fileContent)) { + formRecognizerClient.beginRecognizeCustomForms(targetStream, form.length(), modelId, + new RecognizeOptions() + .setContentType(FormContentType.IMAGE_JPEG) + .setIncludeFieldElements(includeFieldElements) + .setPollInterval(Duration.ofSeconds(10)), Context.NONE) + .getFinalResult() + .stream() + .map(RecognizedForm::getFields) + .forEach(formFieldMap -> formFieldMap.forEach((fieldText, formField) -> { + System.out.printf("Field text: %s%n", fieldText); + System.out.printf("Field value: %s%n", formField.getValue()); + System.out.printf("Confidence score: %.2f%n", formField.getConfidence()); + })); + } + // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeCustomForms#InputStream-long-string-recognizeOptions-Context } // Recognize Content @@ -159,38 +171,44 @@ public void beginRecognizeCustomFormsWithOptions() throws IOException { public void beginRecognizeContentFromUrl() { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string String formUrl = "{form_url}"; - formRecognizerClient.beginRecognizeContentFromUrl(formUrl).getFinalResult().forEach(recognizedForm -> { - System.out.printf("Page Angle: %s%n", recognizedForm.getTextAngle()); - System.out.printf("Page Dimension unit: %s%n", recognizedForm.getUnit()); - // Table information - System.out.println("Recognized Tables: "); - recognizedForm.getTables().forEach(formTable -> formTable.getCells().forEach(recognizedTableCell -> - System.out.printf("%s ", recognizedTableCell.getText()))); - }); + formRecognizerClient.beginRecognizeContentFromUrl(formUrl) + .getFinalResult() + .forEach(formPage -> { + System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); + System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); + // Table information + System.out.println("Recognized Tables: "); + formPage.getTables() + .stream() + .flatMap(formTable -> formTable.getCells().stream()) + .forEach(recognizedTableCell -> System.out.printf("%s ", recognizedTableCell.getText())); + }); // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string } /** - * Code snippet for {@link FormRecognizerClient#beginRecognizeContentFromUrl(String, RecognizeOptions)} with + * Code snippet for {@link FormRecognizerClient#beginRecognizeContentFromUrl(String, RecognizeOptions, Context)} with * options. */ public void beginRecognizeContentFromUrlWithOptions() { - // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string-recognizeOptions + // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string-recognizeOptions-Context String formPath = "{file_source_url}"; formRecognizerClient.beginRecognizeContentFromUrl(formPath, new RecognizeOptions() - .setPollInterval(Duration.ofSeconds(5))) + .setPollInterval(Duration.ofSeconds(5)) + .setIncludeFieldElements(true), Context.NONE) .getFinalResult() - .forEach(recognizedForm -> { - System.out.printf("Page Angle: %s%n", recognizedForm.getTextAngle()); - System.out.printf("Page Dimension unit: %s%n", recognizedForm.getUnit()); + .forEach(formPage -> { + System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); + System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); // Table information System.out.println("Recognized Tables: "); - recognizedForm.getTables().forEach(formTable -> - formTable.getCells().forEach(recognizedTableCell -> - System.out.printf("%s ", recognizedTableCell.getText()))); + formPage.getTables() + .stream() + .flatMap(formTable -> formTable.getCells().stream()) + .forEach(recognizedTableCell -> System.out.printf("%s ", recognizedTableCell.getText())); }); - // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string-recognizeOptions + // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContentFromUrl#string-recognizeOptions-Context } /** @@ -202,42 +220,51 @@ public void beginRecognizeContent() throws IOException { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long File form = new File("{local/file_path/fileName.pdf}"); byte[] fileContent = Files.readAllBytes(form.toPath()); - InputStream targetStream = new ByteArrayInputStream(fileContent); - formRecognizerClient.beginRecognizeContent(targetStream, form.length()).getFinalResult() - .forEach(recognizedForm -> { - System.out.printf("Page Angle: %f%n", recognizedForm.getTextAngle()); - System.out.printf("Page Dimension unit: %s%n", recognizedForm.getUnit()); - System.out.println("Recognized Tables: "); - recognizedForm.getTables().forEach(formTable -> formTable.getCells().forEach(recognizedTableCell -> - System.out.printf("%s ", recognizedTableCell.getText()))); - }); + try (InputStream targetStream = new ByteArrayInputStream(fileContent)) { + formRecognizerClient.beginRecognizeContent(targetStream, form.length()) + .getFinalResult() + .forEach(formPage -> { + System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); + System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); + // Table information + System.out.println("Recognized Tables: "); + formPage.getTables() + .stream() + .flatMap(formTable -> formTable.getCells().stream()) + .forEach(recognizedTableCell -> System.out.printf("%s ", recognizedTableCell.getText())); + }); + } // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long } /** - * Code snippet for {@link FormRecognizerClient#beginRecognizeContent(InputStream, long, RecognizeOptions)} with + * Code snippet for {@link FormRecognizerClient#beginRecognizeContent(InputStream, long, RecognizeOptions, Context)} with * options. * * @throws IOException Exception thrown when there is an error in reading all the bytes from the File. */ public void beginRecognizeContentWithOptions() throws IOException { - // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long-recognizeOptions + // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long-recognizeOptions-Context File form = new File("{file_source_url}"); byte[] fileContent = Files.readAllBytes(form.toPath()); - InputStream targetStream = new ByteArrayInputStream(fileContent); - - formRecognizerClient.beginRecognizeContent(targetStream, form.length(), - new RecognizeOptions() - .setPollInterval(Duration.ofSeconds(5))) - .getFinalResult().forEach(recognizedForm -> { - System.out.printf("Page Angle: %f%n", recognizedForm.getTextAngle()); - System.out.printf("Page Dimension unit: %s%n", recognizedForm.getUnit()); + try (InputStream targetStream = new ByteArrayInputStream(fileContent)) { + + for (FormPage formPage : formRecognizerClient.beginRecognizeContent(targetStream, form.length(), + new RecognizeOptions() + .setPollInterval(Duration.ofSeconds(5)) + .setIncludeFieldElements(true), Context.NONE) + .getFinalResult()) { + System.out.printf("Page Angle: %s%n", formPage.getTextAngle()); + System.out.printf("Page Dimension unit: %s%n", formPage.getUnit()); // Table information System.out.println("Recognized Tables: "); - recognizedForm.getTables().forEach(formTable -> formTable.getCells().forEach(recognizedTableCell -> - System.out.printf("%s ", recognizedTableCell.getText()))); - }); - // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long-recognizeOptions + formPage.getTables() + .stream() + .flatMap(formTable -> formTable.getCells().stream()) + .forEach(recognizedTableCell -> System.out.printf("%s ", recognizedTableCell.getText())); + } + } + // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeContent#InputStream-long-recognizeOptions-Context } // Recognize Receipts @@ -248,12 +275,13 @@ public void beginRecognizeContentWithOptions() throws IOException { public void beginRecognizeReceiptsFromUrl() { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string String receiptUrl = "{file_source_url}"; - formRecognizerClient.beginRecognizeReceiptsFromUrl(receiptUrl).getFinalResult() + formRecognizerClient.beginRecognizeReceiptsFromUrl(receiptUrl) + .getFinalResult() .forEach(recognizedReceipt -> { Map> recognizedFields = recognizedReceipt.getFields(); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -262,7 +290,7 @@ public void beginRecognizeReceiptsFromUrl() { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -271,7 +299,7 @@ public void beginRecognizeReceiptsFromUrl() { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -281,16 +309,16 @@ public void beginRecognizeReceiptsFromUrl() { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { + if (FieldValueType.MAP == receiptItem.getValueType()) { Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); formFieldMap.forEach((key, formField) -> { if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { + if (FieldValueType.DOUBLE == formField.getValueType()) { Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %d, confidence: %.2f%n", + System.out.printf("Quantity: %f, confidence: %.2f%n", quantity, formField.getConfidence()); } } @@ -304,17 +332,20 @@ public void beginRecognizeReceiptsFromUrl() { } /** - * Code snippet for {@link FormRecognizerClient#beginRecognizeReceiptsFromUrl(String, RecognizeOptions)} + * Code snippet for {@link FormRecognizerClient#beginRecognizeReceiptsFromUrl(String, RecognizeOptions, Context)} */ public void beginRecognizeReceiptsFromUrlWithOptions() { - // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string-recognizeOptions + // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string-recognizeOptions-Context String receiptUrl = "{receipt_url}"; - formRecognizerClient.beginRecognizeReceiptsFromUrl(receiptUrl).getFinalResult() + formRecognizerClient.beginRecognizeReceiptsFromUrl(receiptUrl, + new RecognizeOptions() + .setPollInterval(Duration.ofSeconds(5)) + .setIncludeFieldElements(true), Context.NONE).getFinalResult() .forEach(recognizedReceipt -> { Map> recognizedFields = recognizedReceipt.getFields(); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -323,7 +354,7 @@ public void beginRecognizeReceiptsFromUrlWithOptions() { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -332,7 +363,7 @@ public void beginRecognizeReceiptsFromUrlWithOptions() { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -342,26 +373,24 @@ public void beginRecognizeReceiptsFromUrlWithOptions() { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %d, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - }); - } - }); + } + })); } } }); - // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string-recognizeOptions + // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceiptsFromUrl#string-recognizeOptions-Context } /** @@ -373,132 +402,127 @@ public void beginRecognizeReceipts() throws IOException { // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long File receipt = new File("{receipt_url}"); byte[] fileContent = Files.readAllBytes(receipt.toPath()); - InputStream targetStream = new ByteArrayInputStream(fileContent); - - formRecognizerClient.beginRecognizeReceipts(targetStream, receipt.length()) - .getFinalResult().forEach(recognizedReceipt -> { - Map> recognizedFields = recognizedReceipt.getFields(); - FormField merchantNameField = recognizedFields.get("MerchantName"); - if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { - String merchantName = FieldValueType.STRING.cast(merchantNameField); - System.out.printf("Merchant Name: %s, confidence: %.2f%n", - merchantName, merchantNameField.getConfidence()); + try (InputStream targetStream = new ByteArrayInputStream(fileContent)) { + + formRecognizerClient.beginRecognizeReceipts(targetStream, receipt.length()).getFinalResult() + .forEach(recognizedReceipt -> { + Map> recognizedFields = recognizedReceipt.getFields(); + FormField merchantNameField = recognizedFields.get("MerchantName"); + if (merchantNameField != null) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { + String merchantName = FieldValueType.STRING.cast(merchantNameField); + System.out.printf("Merchant Name: %s, confidence: %.2f%n", + merchantName, merchantNameField.getConfidence()); + } } - } - FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); - if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { - String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); - System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", - merchantAddress, merchantPhoneNumberField.getConfidence()); + FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); + if (merchantPhoneNumberField != null) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { + String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); + System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", + merchantAddress, merchantPhoneNumberField.getConfidence()); + } } - } - FormField transactionDateField = recognizedFields.get("TransactionDate"); - if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { - LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); - System.out.printf("Transaction Date: %s, confidence: %.2f%n", - transactionDate, transactionDateField.getConfidence()); + FormField transactionDateField = recognizedFields.get("TransactionDate"); + if (transactionDateField != null) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { + LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); + System.out.printf("Transaction Date: %s, confidence: %.2f%n", + transactionDate, transactionDateField.getConfidence()); + } } - } - FormField receiptItemsField = recognizedFields.get("Items"); - if (receiptItemsField != null) { - System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { - List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { + FormField receiptItemsField = recognizedFields.get("Items"); + if (receiptItemsField != null) { + System.out.printf("Receipt Items: %n"); + if (FieldValueType.LIST == receiptItemsField.getValueType()) { + List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { + if (FieldValueType.DOUBLE == formField.getValueType()) { Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %d, confidence: %.2f%n", + System.out.printf("Quantity: %f, confidence: %.2f%n", quantity, formField.getConfidence()); } } - }); - } - }); + })); + } } - } - }); + }); + } // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long } /** - * Code snippet for {@link FormRecognizerClient#beginRecognizeReceipts(InputStream, long, RecognizeOptions)} + * Code snippet for {@link FormRecognizerClient#beginRecognizeReceipts(InputStream, long, RecognizeOptions, Context)} * with options * * @throws IOException Exception thrown when there is an error in reading all the bytes from the File. */ public void beginRecognizeReceiptsWithOptions() throws IOException { - // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long-recognizeOptions + // BEGIN: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long-recognizeOptions-Context File receipt = new File("{local/file_path/fileName.jpg}"); boolean includeFieldElements = true; byte[] fileContent = Files.readAllBytes(receipt.toPath()); - InputStream targetStream = new ByteArrayInputStream(fileContent); - formRecognizerClient.beginRecognizeReceipts(targetStream, receipt.length(), - new RecognizeOptions() - .setContentType(FormContentType.IMAGE_JPEG) - .setIncludeFieldElements(includeFieldElements) - .setPollInterval(Duration.ofSeconds(5))) - .getFinalResult().forEach(recognizedReceipt -> { - Map> recognizedFields = recognizedReceipt.getFields(); + try (InputStream targetStream = new ByteArrayInputStream(fileContent)) { + for (RecognizedForm recognizedForm : formRecognizerClient.beginRecognizeReceipts(targetStream, receipt.length(), + new RecognizeOptions() + .setContentType(FormContentType.IMAGE_JPEG) + .setIncludeFieldElements(includeFieldElements) + .setPollInterval(Duration.ofSeconds(5)), Context.NONE) + .getFinalResult()) { + Map> recognizedFields = recognizedForm.getFields(); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); } } - FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); } } - FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); } } - FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %d, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - }); - } - }); + } + })); } } - }); - // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long-recognizeOptions + } + } + // END: com.azure.ai.formrecognizer.FormRecognizerClient.beginRecognizeReceipts#InputStream-long-recognizeOptions-Context } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientJavaDocCodeSnippets.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientJavaDocCodeSnippets.java index f9970f236f6c..5cab6b343e4b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientJavaDocCodeSnippets.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientJavaDocCodeSnippets.java @@ -12,6 +12,7 @@ import com.azure.core.credential.AzureKeyCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.util.polling.AsyncPollResponse; import java.time.Duration; @@ -54,17 +55,17 @@ public void beginTraining() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.beginTraining#string-boolean String trainingFilesUrl = "{SAS-URL-of-your-container-in-blob-storage}"; boolean useTrainingLabels = true; - formTrainingAsyncClient.beginTraining(trainingFilesUrl, useTrainingLabels).subscribe( - trainingPollingOperation -> { - // if training polling operation completed, retrieve the final result. - trainingPollingOperation.getFinalResult().subscribe(customFormModel -> { - System.out.printf("Model Id: %s%n", customFormModel.getModelId()); - System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); - customFormModel.getSubmodels().forEach(customFormSubmodel -> - customFormSubmodel.getFields().forEach((key, customFormModelField) -> - System.out.printf("Form type: %s Field Text: %s Field Accuracy: %s%n", + formTrainingAsyncClient.beginTraining(trainingFilesUrl, useTrainingLabels) + // if training polling operation completed, retrieve the final result. + .flatMap(AsyncPollResponse::getFinalResult) + .subscribe(customFormModel -> { + System.out.printf("Model Id: %s%n", customFormModel.getModelId()); + System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); + customFormModel.getSubmodels() + .forEach(customFormSubmodel -> customFormSubmodel.getFields() + .forEach((key, customFormModelField) -> + System.out.printf("Form type: %s Field Text: %s Field Accuracy: %f%n", key, customFormModelField.getName(), customFormModelField.getAccuracy()))); - }); }); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.beginTraining#string-boolean } @@ -76,19 +77,19 @@ public void beginTraining() { public void beginTrainingWithOptions() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.beginTraining#string-boolean-trainingFileFilter-Duration String trainingFilesUrl = "{SAS-URL-of-your-container-in-blob-storage}"; - TrainingFileFilter trainingFileFilter = new TrainingFileFilter().setIncludeSubFolders(false).setPrefix("Invoice"); + TrainingFileFilter trainingFileFilter = new TrainingFileFilter().setIncludeSubFolders(true).setPrefix("Invoice"); formTrainingAsyncClient.beginTraining(trainingFilesUrl, true, trainingFileFilter, - Duration.ofSeconds(5)).subscribe(trainingPollingOperation -> { - // if training polling operation completed, retrieve the final result. - trainingPollingOperation.getFinalResult().subscribe(customFormModel -> { - System.out.printf("Model Id: %s%n", customFormModel.getModelId()); - System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); - customFormModel.getSubmodels().forEach(customFormSubmodel -> - customFormSubmodel.getFields().forEach((key, customFormModelField) -> - System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %s%n", - key, customFormModelField.getName(), customFormModelField.getAccuracy()))); - }); + Duration.ofSeconds(5)) + // if training polling operation completed, retrieve the final result. + .flatMap(AsyncPollResponse::getFinalResult) + .subscribe(customFormModel -> { + System.out.printf("Model Id: %s%n", customFormModel.getModelId()); + System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); + customFormModel.getSubmodels().forEach(customFormSubmodel -> + customFormSubmodel.getFields().forEach((key, customFormModelField) -> + System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", + key, customFormModelField.getName(), customFormModelField.getAccuracy()))); }); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.beginTraining#string-boolean-trainingFileFilter-Duration } @@ -102,10 +103,11 @@ public void getCustomModel() { formTrainingAsyncClient.getCustomModel(modelId).subscribe(customFormModel -> { System.out.printf("Model Id: %s%n", customFormModel.getModelId()); System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); - customFormModel.getSubmodels().forEach(customFormSubmodel -> - customFormSubmodel.getFields().forEach((key, customFormModelField) -> - System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %s%n", - key, customFormModelField.getName(), customFormModelField.getAccuracy()))); + customFormModel.getSubmodels() + .forEach(customFormSubmodel -> customFormSubmodel.getFields() + .forEach((key, customFormModelField) -> + System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", + key, customFormModelField.getName(), customFormModelField.getAccuracy()))); }); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.getCustomModel#string @@ -122,10 +124,11 @@ public void getCustomModelWithResponse() { CustomFormModel customFormModel = response.getValue(); System.out.printf("Model Id: %s%n", customFormModel.getModelId()); System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); - customFormModel.getSubmodels().forEach(customFormSubmodel -> - customFormSubmodel.getFields().forEach((key, customFormModelField) -> - System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", - key, customFormModelField.getName(), customFormModelField.getAccuracy()))); + customFormModel.getSubmodels() + .forEach(customFormSubmodel -> customFormSubmodel.getFields() + .forEach((key, customFormModelField) -> + System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", + key, customFormModelField.getName(), customFormModelField.getAccuracy()))); }); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.getCustomModelWithResponse#string } @@ -135,11 +138,13 @@ public void getCustomModelWithResponse() { */ public void getAccountProperties() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.getAccountProperties - formTrainingAsyncClient.getAccountProperties().subscribe(accountProperties -> { - System.out.printf("Max number of models that can be trained for this account: %s%n", - accountProperties.getCustomModelLimit()); - System.out.printf("Current count of trained custom models: %d%n", accountProperties.getCustomModelCount()); - }); + formTrainingAsyncClient.getAccountProperties() + .subscribe(accountProperties -> { + System.out.printf("Max number of models that can be trained for this account: %d%n", + accountProperties.getCustomModelLimit()); + System.out.printf("Current count of trained custom models: %d%n", + accountProperties.getCustomModelCount()); + }); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.getAccountProperties } @@ -148,13 +153,15 @@ public void getAccountProperties() { */ public void getAccountPropertiesWithResponse() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.getAccountPropertiesWithResponse - formTrainingAsyncClient.getAccountPropertiesWithResponse().subscribe(response -> { - System.out.printf("Response Status Code: %d.", response.getStatusCode()); - AccountProperties accountProperties = response.getValue(); - System.out.printf("Max number of models that can be trained for this account: %s%n", - accountProperties.getCustomModelLimit()); - System.out.printf("Current count of trained custom models: %d%n", accountProperties.getCustomModelCount()); - }); + formTrainingAsyncClient.getAccountPropertiesWithResponse() + .subscribe(response -> { + System.out.printf("Response Status Code: %d.", response.getStatusCode()); + AccountProperties accountProperties = response.getValue(); + System.out.printf("Max number of models that can be trained for this account: %d%n", + accountProperties.getCustomModelLimit()); + System.out.printf("Current count of trained custom models: %d%n", + accountProperties.getCustomModelCount()); + }); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.getAccountPropertiesWithResponse } @@ -164,8 +171,8 @@ public void getAccountPropertiesWithResponse() { public void deleteModel() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.deleteModel#string String modelId = "{model_id}"; - formTrainingAsyncClient.deleteModel(modelId).subscribe(val -> - System.out.printf("Model Id: %s is deleted%n", modelId)); + formTrainingAsyncClient.deleteModel(modelId) + .subscribe(ignored -> System.out.printf("Model Id: %s is deleted%n", modelId)); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.deleteModel#string } @@ -175,10 +182,11 @@ public void deleteModel() { public void deleteModelWithResponse() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.deleteModelWithResponse#string String modelId = "{model_id}"; - formTrainingAsyncClient.deleteModelWithResponse(modelId).subscribe(response -> { - System.out.printf("Response Status Code: %d.", response.getStatusCode()); - System.out.printf("Model Id: %s is deleted.%n", modelId); - }); + formTrainingAsyncClient.deleteModelWithResponse(modelId) + .subscribe(response -> { + System.out.printf("Response Status Code: %d.", response.getStatusCode()); + System.out.printf("Model Id: %s is deleted.%n", modelId); + }); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.deleteModelWithResponse#string } @@ -187,12 +195,13 @@ public void deleteModelWithResponse() { */ public void listCustomModels() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.listCustomModels - formTrainingAsyncClient.listCustomModels().subscribe(customModel -> - System.out.printf("Model Id: %s, Model status: %s, Created on: %s, Last updated on: %s.%n", - customModel.getModelId(), - customModel.getStatus(), - customModel.getTrainingStartedOn(), - customModel.getTrainingCompletedOn())); + formTrainingAsyncClient.listCustomModels() + .subscribe(customModel -> + System.out.printf("Model Id: %s, Model status: %s, Created on: %s, Last updated on: %s.%n", + customModel.getModelId(), + customModel.getStatus(), + customModel.getTrainingStartedOn(), + customModel.getTrainingCompletedOn())); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.listCustomModels } @@ -205,15 +214,15 @@ public void beginCopy() { String resourceRegion = "target-resource-region"; String copyModelId = "copy-model-Id"; formTrainingAsyncClient.getCopyAuthorization(resourceId, resourceRegion) - .subscribe(copyAuthorization -> formTrainingAsyncClient.beginCopyModel(copyModelId, copyAuthorization) - .subscribe(copyPoller -> copyPoller.getFinalResult().subscribe(customFormModelInfo -> { - System.out.printf("Copied model has model Id: %s, model status: %s, training started on: %s," - + " training completed on: %s.%n", - customFormModelInfo.getModelId(), - customFormModelInfo.getStatus(), - customFormModelInfo.getTrainingStartedOn(), - customFormModelInfo.getTrainingCompletedOn()); - }))); + .flatMapMany(copyAuthorization -> formTrainingAsyncClient.beginCopyModel(copyModelId, copyAuthorization)) + .flatMap(AsyncPollResponse::getFinalResult) + .subscribe(customFormModelInfo -> + System.out.printf("Copied model has model Id: %s, model status: %s, training started on: %s," + + " training completed on: %s.%n", + customFormModelInfo.getModelId(), + customFormModelInfo.getStatus(), + customFormModelInfo.getTrainingStartedOn(), + customFormModelInfo.getTrainingCompletedOn())); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.beginCopyModel#string-copyAuthorization } @@ -226,16 +235,16 @@ public void beginCopyOverload() { String resourceRegion = "target-resource-region"; String copyModelId = "copy-model-Id"; formTrainingAsyncClient.getCopyAuthorization(resourceId, resourceRegion) - .subscribe(copyAuthorization -> formTrainingAsyncClient.beginCopyModel(copyModelId, copyAuthorization, - Duration.ofSeconds(5)).subscribe(copyPoller -> - copyPoller.getFinalResult().subscribe(customFormModelInfo -> { + .flatMapMany(copyAuthorization -> formTrainingAsyncClient.beginCopyModel(copyModelId, copyAuthorization, + Duration.ofSeconds(5))) + .flatMap(AsyncPollResponse::getFinalResult) + .subscribe(customFormModelInfo -> System.out.printf("Copied model has model Id: %s, model status: %s, training started on: %s," - + "training completed on: %s.%n", - customFormModelInfo.getModelId(), - customFormModelInfo.getStatus(), - customFormModelInfo.getTrainingStartedOn(), - customFormModelInfo.getTrainingCompletedOn()); - }))); + + "training completed on: %s.%n", + customFormModelInfo.getModelId(), + customFormModelInfo.getStatus(), + customFormModelInfo.getTrainingStartedOn(), + customFormModelInfo.getTrainingCompletedOn())); // END: com.azure.ai.formrecognizer.training.FormTrainingAsyncClient.beginCopyModel#string-copyAuthorization-Duration } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingClientJavaDocCodeSnippets.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingClientJavaDocCodeSnippets.java index 9a0ed89563c2..66268b2eebef 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingClientJavaDocCodeSnippets.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingClientJavaDocCodeSnippets.java @@ -41,33 +41,35 @@ public void beginTraining() { formTrainingClient.beginTraining(trainingFilesUrl, useTrainingLabels).getFinalResult(); System.out.printf("Model Id: %s%n", customFormModel.getModelId()); System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); - customFormModel.getSubmodels().forEach(customFormSubmodel -> - customFormSubmodel.getFields().forEach((key, customFormModelField) -> - System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", - key, customFormModelField.getName(), customFormModelField.getAccuracy()))); + customFormModel.getSubmodels() + .forEach(customFormSubmodel -> customFormSubmodel.getFields() + .forEach((key, customFormModelField) -> + System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", + key, customFormModelField.getName(), customFormModelField.getAccuracy()))); // END: com.azure.ai.formrecognizer.training.FormTrainingClient.beginTraining#string-boolean } /** - * Code snippet for {@link FormTrainingClient#beginTraining(String, boolean, TrainingFileFilter, Duration)} + * Code snippet for {@link FormTrainingClient#beginTraining(String, boolean, TrainingFileFilter, Duration, Context)} * with options */ public void beginTrainingWithOptions() { - // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingClient.beginTraining#string-boolean-trainingFileFilter-Duration + // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingClient.beginTraining#string-boolean-trainingFileFilter-Duration-Context String trainingFilesUrl = "{SAS-URL-of-your-container-in-blob-storage}"; TrainingFileFilter trainingFileFilter = new TrainingFileFilter().setIncludeSubFolders(false).setPrefix("Invoice"); boolean useTrainingLabels = true; CustomFormModel customFormModel = formTrainingClient.beginTraining(trainingFilesUrl, useTrainingLabels, - trainingFileFilter, Duration.ofSeconds(5)).getFinalResult(); + trainingFileFilter, Duration.ofSeconds(5), Context.NONE).getFinalResult(); System.out.printf("Model Id: %s%n", customFormModel.getModelId()); System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); - customFormModel.getSubmodels().forEach(customFormSubmodel -> - customFormSubmodel.getFields().forEach((key, customFormModelField) -> - System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", - key, customFormModelField.getName(), customFormModelField.getAccuracy()))); - // END: com.azure.ai.formrecognizer.training.FormTrainingClient.beginTraining#string-boolean-trainingFileFilter-Duration + customFormModel.getSubmodels() + .forEach(customFormSubmodel -> customFormSubmodel.getFields() + .forEach((key, customFormModelField) -> + System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", + key, customFormModelField.getName(), customFormModelField.getAccuracy()))); + // END: com.azure.ai.formrecognizer.training.FormTrainingClient.beginTraining#string-boolean-trainingFileFilter-Duration-Context } /** @@ -79,10 +81,11 @@ public void getCustomModel() { CustomFormModel customFormModel = formTrainingClient.getCustomModel(modelId); System.out.printf("Model Id: %s%n", customFormModel.getModelId()); System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); - customFormModel.getSubmodels().forEach(customFormSubmodel -> - customFormSubmodel.getFields().forEach((key, customFormModelField) -> - System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", - key, customFormModelField.getName(), customFormModelField.getAccuracy()))); + customFormModel.getSubmodels() + .forEach(customFormSubmodel -> customFormSubmodel.getFields() + .forEach((key, customFormModelField) -> + System.out.printf("Form Type: %s Field Text: %s Field Accuracy: %f%n", + key, customFormModelField.getName(), customFormModelField.getAccuracy()))); // END: com.azure.ai.formrecognizer.training.FormTrainingClient.getCustomModel#string } @@ -97,10 +100,11 @@ public void getCustomModelWithResponse() { CustomFormModel customFormModel = response.getValue(); System.out.printf("Model Id: %s%n", customFormModel.getModelId()); System.out.printf("Model Status: %s%n", customFormModel.getModelStatus()); - customFormModel.getSubmodels().forEach(customFormSubmodel -> - customFormSubmodel.getFields().forEach((key, customFormModelField) -> - System.out.printf("Field: %s Field Text: %s Field Accuracy: %f%n", - key, customFormModelField.getName(), customFormModelField.getAccuracy()))); + customFormModel.getSubmodels() + .forEach(customFormSubmodel -> customFormSubmodel.getFields() + .forEach((key, customFormModelField) -> + System.out.printf("Field: %s Field Text: %s Field Accuracy: %f%n", + key, customFormModelField.getName(), customFormModelField.getAccuracy()))); // END: com.azure.ai.formrecognizer.training.FormTrainingClient.getCustomModelWithResponse#string-Context } @@ -110,7 +114,7 @@ public void getCustomModelWithResponse() { public void getAccountProperties() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingClient.getAccountProperties AccountProperties accountProperties = formTrainingClient.getAccountProperties(); - System.out.printf("Max number of models that can be trained for this account: %s%n", + System.out.printf("Max number of models that can be trained for this account: %d%n", accountProperties.getCustomModelLimit()); System.out.printf("Current count of trained custom models: %d%n", accountProperties.getCustomModelCount()); // END: com.azure.ai.formrecognizer.training.FormTrainingClient.getAccountProperties @@ -158,13 +162,14 @@ public void deleteModelWithResponse() { */ public void listCustomModels() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingClient.listCustomModels - formTrainingClient.listCustomModels().forEach(customModel -> - System.out.printf("Model Id: %s, Model status: %s, Training started on: %s, Training completed on: %s.%n", - customModel.getModelId(), - customModel.getStatus(), - customModel.getTrainingStartedOn(), - customModel.getTrainingCompletedOn()) - ); + formTrainingClient.listCustomModels() + .forEach(customModel -> + System.out.printf("Model Id: %s, Model status: %s, Training started on: %s, Training completed on: %s.%n", + customModel.getModelId(), + customModel.getStatus(), + customModel.getTrainingStartedOn(), + customModel.getTrainingCompletedOn()) + ); // END: com.azure.ai.formrecognizer.training.FormTrainingClient.listCustomModels } @@ -173,13 +178,14 @@ public void listCustomModels() { */ public void listCustomModelsWithContext() { // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingClient.listCustomModels#Context - formTrainingClient.listCustomModels(Context.NONE).forEach(customModel -> - System.out.printf("Model Id: %s, Model status: %s, Training started on: %s, Training completed on: %s.%n", - customModel.getModelId(), - customModel.getStatus(), - customModel.getTrainingStartedOn(), - customModel.getTrainingCompletedOn()) - ); + formTrainingClient.listCustomModels(Context.NONE) + .forEach(customModel -> + System.out.printf("Model Id: %s, Model status: %s, Training started on: %s, Training completed on: %s.%n", + customModel.getModelId(), + customModel.getStatus(), + customModel.getTrainingStartedOn(), + customModel.getTrainingCompletedOn()) + ); // END: com.azure.ai.formrecognizer.training.FormTrainingClient.listCustomModels#Context } @@ -208,10 +214,10 @@ public void beginCopy() { } /** - * Code snippet for {@link FormTrainingClient#beginCopyModel(String, CopyAuthorization, Duration)} + * Code snippet for {@link FormTrainingClient#beginCopyModel(String, CopyAuthorization, Duration, Context)} */ public void beginCopyOverload() { - // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingClient.beginCopyModel#string-copyAuthorization-Duration + // BEGIN: com.azure.ai.formrecognizer.training.FormTrainingClient.beginCopyModel#string-copyAuthorization-Duration-Context // The resource to copy model to String resourceId = "target-resource-Id"; String resourceRegion = "target-resource-region"; @@ -220,7 +226,8 @@ public void beginCopyOverload() { CopyAuthorization copyAuthorization = targetFormTrainingClient.getCopyAuthorization(resourceId, resourceRegion); - formTrainingClient.beginCopyModel(copyModelId, copyAuthorization, Duration.ofSeconds(5)).waitForCompletion(); + formTrainingClient.beginCopyModel(copyModelId, copyAuthorization, Duration.ofSeconds(5), Context.NONE) + .waitForCompletion(); CustomFormModel modelCopy = targetFormTrainingClient.getCustomModel(copyAuthorization.getModelId()); System.out.printf("Copied model has model Id: %s, model status: %s, was requested on: %s," + " transfer completed on: %s.%n", @@ -228,7 +235,7 @@ public void beginCopyOverload() { modelCopy.getModelStatus(), modelCopy.getTrainingStartedOn(), modelCopy.getTrainingCompletedOn()); - // END: com.azure.ai.formrecognizer.training.FormTrainingClient.beginCopyModel#string-copyAuthorization-Duration + // END: com.azure.ai.formrecognizer.training.FormTrainingClient.beginCopyModel#string-copyAuthorization-Duration-Context } /** diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxes.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxes.java index f6f72e2d9c95..4949eb1af09b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxes.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxes.java @@ -10,6 +10,7 @@ import com.azure.ai.formrecognizer.models.RecognizeOptions; import com.azure.ai.formrecognizer.models.RecognizedForm; import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import java.util.List; @@ -36,14 +37,13 @@ public static void main(String[] args) { String formUrl = "{form_url}"; SyncPoller> recognizeFormPoller = client.beginRecognizeCustomFormsFromUrl(formUrl, modelId, new RecognizeOptions() - .setIncludeFieldElements(true)); + .setIncludeFieldElements(true), Context.NONE); List recognizedForms = recognizeFormPoller.getFinalResult(); - System.out.println("--------RECOGNIZING FORM --------"); for (int i = 0; i < recognizedForms.size(); i++) { final RecognizedForm recognizedForm = recognizedForms.get(i); - System.out.printf("Form %s has type: %s%n", i, recognizedForm.getFormType()); + System.out.printf("Form %d has type: %s%n", i, recognizedForm.getFormType()); // each field is of type FormField // The value of the field can also be a FormField, or a list of FormFields // In our sample, it is not. @@ -57,8 +57,8 @@ public static void main(String[] args) { final List pages = recognizedForm.getPages(); for (int i1 = 0; i1 < pages.size(); i1++) { final FormPage formPage = pages.get(i1); - System.out.printf("-------Recognizing Page %s of Form -------%n", i1); - System.out.printf("Has width %f , angle %.2f, height %f %n", formPage.getWidth(), + System.out.printf("-------Recognizing info on page %s of Form -------%n", i1); + System.out.printf("Has width: %f, angle: %.2f, height: %f %n", formPage.getWidth(), formPage.getTextAngle(), formPage.getHeight()); // Table information System.out.println("Recognized Tables: "); @@ -66,27 +66,27 @@ public static void main(String[] args) { for (int i2 = 0; i2 < tables.size(); i2++) { final FormTable formTable = tables.get(i2); System.out.printf("Table %d%n", i2); - formTable.getCells().forEach(formTableCell -> { - System.out.printf("Cell text %s has following words: %n", formTableCell.getText()); - // textContent only exists if you set includeFieldElements to True in your - // call to beginRecognizeCustomFormsFromUrl - // It is also a list of FormWords and FormLines, but in this example, we only deal with - // FormWords - formTableCell.getFieldElements().forEach(formContent -> { - if (formContent instanceof FormWord) { - FormWord formWordElement = (FormWord) (formContent); - StringBuilder boundingBoxStr = new StringBuilder(); - if (formWordElement.getBoundingBox() != null) { - formWordElement.getBoundingBox().getPoints().forEach(point -> { - boundingBoxStr.append(String.format("[%.2f, %.2f]", point.getX(), - point.getY())); - }); - } - System.out.printf("Word '%s' within bounding box %s with a confidence of %.2f.%n", - formWordElement.getText(), boundingBoxStr, formWordElement.getConfidence()); - } + formTable.getCells() + .forEach(formTableCell -> { + System.out.printf("Cell text %s has following words: %n", formTableCell.getText()); + // FormElements only exists if you set includeFieldElements to true in your + // call to beginRecognizeCustomFormsFromUrl + // It is also a list of FormWords and FormLines, but in this example, we only deal with + // FormWords + formTableCell.getFieldElements().stream() + .filter(formContent -> formContent instanceof FormWord) + .map(formContent -> (FormWord) (formContent)) + .forEach(formWordElement -> { + StringBuilder boundingBoxStr = new StringBuilder(); + if (formWordElement.getBoundingBox() != null) { + formWordElement.getBoundingBox().getPoints() + .forEach(point -> boundingBoxStr.append( + String.format("[%.2f, %.2f]", point.getX(), point.getY()))); + } + System.out.printf("Word '%s' within bounding box %s with a confidence of %.2f.%n", + formWordElement.getText(), boundingBoxStr.toString(), formWordElement.getConfidence()); + }); }); - }); System.out.println(); } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxesAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxesAsync.java index ebfad4bdc35f..7482ea6f98a6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxesAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxesAsync.java @@ -37,42 +37,40 @@ public static void main(String[] args) { String modelId = "{model_Id}"; String formUrl = "{form_url}"; PollerFlux> recognizeFormPoller = - client.beginRecognizeCustomFormsFromUrl(formUrl, modelId, new RecognizeOptions() - .setIncludeFieldElements(true)); + client.beginRecognizeCustomFormsFromUrl(formUrl, modelId, + new RecognizeOptions() + .setIncludeFieldElements(true)); Mono> recognizeFormResult = recognizeFormPoller .last() - .flatMap(trainingOperationResponse -> { - if (trainingOperationResponse.getStatus().isComplete()) { + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { // training completed successfully, retrieving final result. - return trainingOperationResponse.getFinalResult(); + return pollResponse.getFinalResult(); } else { return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + trainingOperationResponse.getStatus())); + + pollResponse.getStatus())); } }); - System.out.println("--------RECOGNIZING FORM --------"); recognizeFormResult.subscribe(recognizedForms -> { for (int i = 0; i < recognizedForms.size(); i++) { final RecognizedForm recognizedForm = recognizedForms.get(i); - System.out.printf("Form %s has type: %s%n", i, recognizedForm.getFormType()); + System.out.printf("Form %d has type: %s%n", i, recognizedForm.getFormType()); // each field is of type FormField - // The value of the field can also be a FormField, or a list of FormFields - // In our sample, it is not. - recognizedForm.getFields().forEach((fieldText, fieldValue) -> { + // The value of the field can also be a FormField, or a list of FormFields + // In our sample, it is not. + recognizedForm.getFields().forEach((fieldText, fieldValue) -> System.out.printf("Field %s has value %s based on %s with a confidence score " - + "of %.2f.%n", - fieldText, fieldValue.getValue(), fieldValue.getValueData().getText(), - fieldValue.getConfidence()); - }); + + "of %.2f.%n", fieldText, fieldValue.getValue(), fieldValue.getValueData().getText(), + fieldValue.getConfidence())); // Page Information final List pages = recognizedForm.getPages(); for (int i1 = 0; i1 < pages.size(); i1++) { final FormPage formPage = pages.get(i1); - System.out.printf("-------Recognizing Page %s of Form -------%n", i1); - System.out.printf("Has width %f , angle %f, height %f %n", formPage.getWidth(), + System.out.printf("-------Recognizing info on page %s of Form -------%n", i1); + System.out.printf("Has width: %f , angle: %f, height: %f %n", formPage.getWidth(), formPage.getTextAngle(), formPage.getHeight()); // Table information System.out.println("Recognized Tables: "); @@ -82,25 +80,24 @@ public static void main(String[] args) { System.out.printf("Table %d%n", i2); formTable.getCells().forEach(formTableCell -> { System.out.printf("Cell text %s has following words: %n", formTableCell.getText()); - // textContent only exists if you set includeFieldElements to True in your + // FormElements only exists if you set includeFieldElements to true in your // call to beginRecognizeCustomFormsFromUrl // It is also a list of FormWords and FormLines, but in this example, we only deal with // FormWords - formTableCell.getFieldElements().forEach(formContent -> { - if (formContent instanceof FormWord) { - FormWord formWordElement = (FormWord) (formContent); + formTableCell.getFieldElements().stream() + .filter(formContent -> formContent instanceof FormWord) + .map(formContent -> (FormWord) (formContent)) + .forEach(formWordElement -> { final StringBuilder boundingBoxStr = new StringBuilder(); if (formWordElement.getBoundingBox() != null) { - formWordElement.getBoundingBox().getPoints().forEach(point -> { + formWordElement.getBoundingBox().getPoints().forEach(point -> boundingBoxStr.append(String.format("[%.2f, %.2f]", point.getX(), - point.getY())); - }); + point.getY()))); } System.out.printf("Word '%s' within bounding box %s with a confidence of %.2f.%n", formWordElement.getText(), boundingBoxStr, formWordElement.getConfidence()); - } - }); + }); }); System.out.println(); } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModels.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModels.java index 70495fb9df39..943ff5908965 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModels.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModels.java @@ -60,12 +60,11 @@ public static void main(final String[] args) { System.out.printf("Field Accuracy: %.2f%n", customFormModelField.getAccuracy()); }); } - }); }); // Delete Custom Model - System.out.printf("Deleted model with model Id: %s operation completed with status: %s%n", modelId.get(), + System.out.printf("Deleted model with model Id: %s, operation completed with status: %s%n", modelId.get(), client.deleteModelWithResponse(modelId.get(), Context.NONE).getStatusCode()); } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModelsAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModelsAsync.java index 12dc7aa5a753..786578e6813e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModelsAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModelsAsync.java @@ -55,13 +55,13 @@ public static void main(final String[] args) { System.out.printf("Field Accuracy: %.2f%n", customFormModelField.getAccuracy()); }); } - }); }); }); // Delete Custom Model - System.out.printf("Deleted model with model Id: %s%n", modelId.get(), client.deleteModelWithResponse(modelId.get())); + client.deleteModel(modelId.get()); + System.out.printf("Deleted model with model Id: %s%n", modelId.get()); // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep // the thread so the program does not end before the send operation is complete. Using .block() instead of diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ReadmeSamples.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ReadmeSamples.java index e1851afe0cd4..c4ec2ee6b2da 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ReadmeSamples.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ReadmeSamples.java @@ -28,7 +28,6 @@ import java.time.LocalDate; import java.util.List; import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; /** * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS ARE USED TO EXTRACT @@ -95,7 +94,7 @@ public void recognizeCustomForm() { for (int i = 0; i < recognizedForms.size(); i++) { RecognizedForm form = recognizedForms.get(i); - System.out.printf("----------- Recognized Form %d -----------%n", i); + System.out.printf("----------- Recognized custom form info for page %d -----------%n", i); System.out.printf("Form type: %s%n", form.getFormType()); form.getFields().forEach((label, formField) -> System.out.printf("Field %s has value %s with confidence score of %f.%n", label, @@ -123,7 +122,7 @@ public void recognizeContent() throws IOException { for (int i = 0; i < contentPageResults.size(); i++) { FormPage formPage = contentPageResults.get(i); - System.out.printf("----Recognizing content for page %d ----%n", i); + System.out.printf("----Recognizing content info for page %d ----%n", i); // Table information System.out.printf("Has width: %f and height: %f, measured with unit: %s.%n", formPage.getWidth(), formPage.getHeight(), @@ -147,10 +146,10 @@ public void recognizeReceipt() { for (int i = 0; i < receiptPageResults.size(); i++) { RecognizedForm recognizedForm = receiptPageResults.get(i); Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + System.out.printf("----------- Recognizing receipt info for page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -159,7 +158,7 @@ public void recognizeReceipt() { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -168,7 +167,7 @@ public void recognizeReceipt() { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -178,14 +177,14 @@ public void recognizeReceipt() { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { + if (FieldValueType.MAP == receiptItem.getValueType()) { Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); formFieldMap.forEach((key, formField) -> { if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { + if (FieldValueType.DOUBLE == formField.getValueType()) { Float quantity = FieldValueType.DOUBLE.cast(formField); System.out.printf("Quantity: %f, confidence: %.2f%n", quantity, formField.getConfidence()); @@ -200,7 +199,7 @@ public void recognizeReceipt() { } public void trainModel() { - String trainingFilesUrl = "{SAS-URL-of-your-container-in-blob-storage}"; + String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}"; SyncPoller trainingPoller = formTrainingClient.beginTraining(trainingFilesUrl, false); @@ -213,7 +212,7 @@ public void trainModel() { System.out.printf("Training completed on: %s%n%n", customFormModel.getTrainingCompletedOn()); System.out.println("Recognized Fields:"); - // looping through the sub-models, which contains the fields they were trained on + // looping through the subModels, which contains the fields they were trained on // Since the given training documents are unlabeled, we still group them but they do not have a label. customFormModel.getSubmodels().forEach(customFormSubmodel -> { // Since the training data is unlabeled, we are unable to return the accuracy of this model @@ -224,7 +223,6 @@ public void trainModel() { } public void manageModels() { - AtomicReference modelId = new AtomicReference<>(); // First, we see how many custom models we have, and what our limit is AccountProperties accountProperties = formTrainingClient.getAccountProperties(); System.out.printf("The account has %d custom models, and we can have at most %d custom models", @@ -235,8 +233,7 @@ public void manageModels() { System.out.println("We have following models in the account:"); customModels.forEach(customFormModelInfo -> { System.out.printf("Model Id: %s%n", customFormModelInfo.getModelId()); - // get custom model info - modelId.set(customFormModelInfo.getModelId()); + // get specific custom model info CustomFormModel customModel = formTrainingClient.getCustomModel(customFormModelInfo.getModelId()); System.out.printf("Model Status: %s%n", customModel.getModelStatus()); System.out.printf("Training started on: %s%n", customModel.getTrainingStartedOn()); @@ -252,8 +249,9 @@ public void manageModels() { } }); }); + // Delete Custom Model - formTrainingClient.deleteModel(modelId.get()); + formTrainingClient.deleteModel("{modelId}"); } /** diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContent.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContent.java index 2aced3ff91fe..22fa42953b64 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContent.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContent.java @@ -30,7 +30,6 @@ public class RecognizeContent { */ public static void main(final String[] args) throws IOException { // Instantiate a client that will be used to call the service. - FormRecognizerClient client = new FormRecognizerClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") @@ -48,9 +47,9 @@ public static void main(final String[] args) throws IOException { for (int i = 0; i < contentPageResults.size(); i++) { final FormPage formPage = contentPageResults.get(i); - System.out.printf("----Recognizing content for page %d ----%n", i); + System.out.printf("---- Recognized content info for page %d ----%n", i); // Table information - System.out.printf("Has width: %f and height: %f, measured with unit: %s%n", formPage.getWidth(), + System.out.printf("Has width: %.2f and height: %.2f, measured with unit: %s%n", formPage.getWidth(), formPage.getHeight(), formPage.getUnit()); final List tables = formPage.getTables(); @@ -64,7 +63,7 @@ public static void main(final String[] args) throws IOException { formTableCell.getBoundingBox().getPoints().forEach(point -> boundingBoxStr.append(String.format("[%.2f, %.2f]", point.getX(), point.getY()))); } - System.out.printf("Cell has text %s, within bounding box %s.%n", formTableCell.getText(), + System.out.printf("Cell has text '%s', within bounding box %s.%n", formTableCell.getText(), boundingBoxStr); }); System.out.println(); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentAsync.java deleted file mode 100644 index 83db8fa0dc75..000000000000 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentAsync.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.formrecognizer; - -import com.azure.ai.formrecognizer.models.FormPage; -import com.azure.ai.formrecognizer.models.FormTable; -import com.azure.ai.formrecognizer.models.OperationResult; -import com.azure.core.credential.AzureKeyCredential; -import com.azure.core.util.polling.PollerFlux; -import reactor.core.publisher.Mono; - -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * Async sample for recognizing content information from a document given through a URL. - */ -public class RecognizeContentAsync { - - /** - * Main method to invoke this demo. - * - * @param args Unused. Arguments to the program. - */ - public static void main(final String[] args) { - // Instantiate a client that will be used to call the service. - - FormRecognizerAsyncClient client = new FormRecognizerClientBuilder() - .credential(new AzureKeyCredential("{key}")) - .endpoint("https://{endpoint}.cognitiveservices.azure.com/") - .buildAsyncClient(); - - PollerFlux> recognizeContentPoller = - client.beginRecognizeContentFromUrl("https://raw.githubusercontent.com/Azure/azure-sdk-for-java/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/sample-forms/forms/layout1.jpg"); - - Mono> contentPageResults = recognizeContentPoller - .last() - .flatMap(trainingOperationResponse -> { - if (trainingOperationResponse.getStatus().isComplete()) { - // training completed successfully, retrieving final result. - return trainingOperationResponse.getFinalResult(); - } else { - return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + trainingOperationResponse.getStatus())); - } - }); - - contentPageResults.subscribe(formPages -> { - for (int i = 0; i < formPages.size(); i++) { - final FormPage formPage = formPages.get(i); - System.out.printf("----Recognizing content for page %d ----%n", i); - System.out.printf("Has width: %f and height: %f, measured with unit: %s%n", formPage.getWidth(), - formPage.getHeight(), - formPage.getUnit()); - // Table information - final List tables = formPage.getTables(); - for (int i1 = 0; i1 < tables.size(); i1++) { - final FormTable formTable = tables.get(i1); - System.out.printf("Table %d has %d rows and %d columns.%n", i1, formTable.getRowCount(), - formTable.getColumnCount()); - formTable.getCells().forEach(formTableCell -> { - final StringBuilder boundingBoxStr = new StringBuilder(); - if (formTableCell.getBoundingBox() != null) { - formTableCell.getBoundingBox().getPoints().forEach(point -> - boundingBoxStr.append(String.format("[%.2f, %.2f]", point.getX(), point.getY()))); - } - System.out.printf("Cell has text %s, within bounding box %s.%n", formTableCell.getText(), - boundingBoxStr); - }); - System.out.println(); - } - } - }); - - // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep - // the thread so the program does not end before the send operation is complete. Using .block() instead of - // .subscribe() will turn this into a synchronous call. - try { - TimeUnit.MINUTES.sleep(1); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } -} diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentFromUrlAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentFromUrlAsync.java new file mode 100644 index 000000000000..63d1d82c01b2 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentFromUrlAsync.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.formrecognizer; + +import com.azure.ai.formrecognizer.models.FormPage; +import com.azure.ai.formrecognizer.models.FormTable; +import com.azure.ai.formrecognizer.models.OperationResult; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.polling.PollerFlux; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.concurrent.TimeUnit; + +/** + * Async sample for recognizing content information from a document given through a URL. + */ +public class RecognizeContentFromUrlAsync { + + /** + * Main method to invoke this demo. + * + * @param args Unused. Arguments to the program. + */ + public static void main(final String[] args) { + // Instantiate a client that will be used to call the service. + + FormRecognizerAsyncClient client = new FormRecognizerClientBuilder() + .credential(new AzureKeyCredential("{key}")) + .endpoint("https://{endpoint}.cognitiveservices.azure.com/") + .buildAsyncClient(); + + PollerFlux> recognizeContentPoller = + client.beginRecognizeContentFromUrl("https://raw.githubusercontent.com/Azure/azure-sdk-for-java/master/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/sample-forms/forms/layout1.jpg"); + + Mono> contentPageResults = recognizeContentPoller + .last() + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { + // training completed successfully, retrieving final result. + return pollResponse.getFinalResult(); + } else { + return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" + + pollResponse.getStatus())); + } + }); + + contentPageResults.subscribe(formPages -> { + for (int i = 0; i < formPages.size(); i++) { + final FormPage formPage = formPages.get(i); + System.out.printf("---- Recognized content info for page %d ----%n", i); + System.out.printf("Has width: %f and height: %f, measured with unit: %s%n", formPage.getWidth(), + formPage.getHeight(), + formPage.getUnit()); + // Table information + final List tables = formPage.getTables(); + for (int i1 = 0; i1 < tables.size(); i1++) { + final FormTable formTable = tables.get(i1); + System.out.printf("Table %d has %d rows and %d columns.%n", i1, formTable.getRowCount(), + formTable.getColumnCount()); + formTable.getCells().forEach(formTableCell -> { + final StringBuilder boundingBoxStr = new StringBuilder(); + if (formTableCell.getBoundingBox() != null) { + formTableCell.getBoundingBox().getPoints().forEach(point -> + boundingBoxStr.append(String.format("[%.2f, %.2f]", point.getX(), point.getY()))); + } + System.out.printf("Cell has text '%s', within bounding box %s.%n", formTableCell.getText(), + boundingBoxStr); + }); + System.out.println(); + } + } + }); + + // The .subscribe() creation and assignment is not a blocking call. For the purpose of this example, we sleep + // the thread so the program does not end before the send operation is complete. Using .block() instead of + // .subscribe() will turn this into a synchronous call. + try { + TimeUnit.MINUTES.sleep(1); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } +} diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomForms.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomForms.java deleted file mode 100644 index e7914b271750..000000000000 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomForms.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.formrecognizer; - -import com.azure.ai.formrecognizer.models.OperationResult; -import com.azure.ai.formrecognizer.models.RecognizedForm; -import com.azure.core.credential.AzureKeyCredential; -import com.azure.core.util.polling.SyncPoller; - -import java.util.List; - -/** - * Sample to analyze a form from a document with a custom trained model. To learn how to train your own models, - * look at TrainModelWithoutLabels.java and TrainModelWithLabels.java. - */ -public class RecognizeCustomForms { - - /** - * Main method to invoke this demo. - * - * @param args Unused arguments to the program. - * - */ - public static void main(String[] args) { - // Instantiate a client that will be used to call the service. - FormRecognizerClient client = new FormRecognizerClientBuilder() - .credential(new AzureKeyCredential("{key}")) - .endpoint("https://{endpoint}.cognitiveservices.azure.com/") - .buildClient(); - - String analyzeFilePath = "{file_source_url}"; - String modelId = "{custom_trained_model_id}"; - SyncPoller> recognizeFormPoller = - client.beginRecognizeCustomFormsFromUrl(analyzeFilePath, modelId); - - List recognizedForms = recognizeFormPoller.getFinalResult(); - - for (int i = 0; i < recognizedForms.size(); i++) { - final RecognizedForm form = recognizedForms.get(i); - System.out.printf("----------- Recognized Form page %d -----------%n", i); - System.out.printf("Form type: %s%n", form.getFormType()); - form.getFields().forEach((label, formField) -> { - System.out.printf("Field %s has value %s with confidence score of %.2f.%n", label, - formField.getValueData().getText(), - formField.getConfidence()); - }); - System.out.print("-----------------------------------"); - } - } -} diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsAsync.java index a2391e3763f0..81fd527f2389 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsAsync.java @@ -43,35 +43,35 @@ public static void main(String[] args) throws IOException { File sourceFile = new File("../formrecognizer/azure-ai-formrecognizer/src/samples/java/sample-forms/" + "forms/Invoice_6.pdf"); byte[] fileContent = Files.readAllBytes(sourceFile.toPath()); - InputStream targetStream = new ByteArrayInputStream(fileContent); String modelId = "{modelId}"; - - PollerFlux> recognizeFormPoller = - client.beginRecognizeCustomForms(toFluxByteBuffer(targetStream), sourceFile.length(), modelId); + PollerFlux> recognizeFormPoller; + try (InputStream targetStream = new ByteArrayInputStream(fileContent)) { + recognizeFormPoller = client.beginRecognizeCustomForms(toFluxByteBuffer(targetStream), sourceFile.length(), + modelId); + } Mono> recognizeFormResult = recognizeFormPoller .last() - .flatMap(recognizeFormPollOperation -> { - if (recognizeFormPollOperation.getStatus().isComplete()) { + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { // training completed successfully, retrieving final result. - return recognizeFormPollOperation.getFinalResult(); + return pollResponse.getFinalResult(); } else { return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + recognizeFormPollOperation.getStatus())); + + pollResponse.getStatus())); } }); recognizeFormResult.subscribe(recognizedForms -> { for (int i = 0; i < recognizedForms.size(); i++) { final RecognizedForm form = recognizedForms.get(i); - System.out.printf("----------- Recognized Form page %d -----------%n", i); + System.out.printf("----------- Recognized custom form info for page %d -----------%n", i); System.out.printf("Form type: %s%n", form.getFormType()); form.getFields().forEach((label, formField) -> { - System.out.printf("Field %s has value %s with confidence score of %.2f.%n", label, - formField.getValueData().getText(), + System.out.printf("Field '%s' has label '%s' with confidence score of %.2f.%n", label, + formField.getLabelData().getText(), formField.getConfidence()); }); - System.out.print("-----------------------------------"); } }); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsFromUrl.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsFromUrl.java new file mode 100644 index 000000000000..4f063ff665b6 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsFromUrl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.formrecognizer; + +import com.azure.ai.formrecognizer.models.OperationResult; +import com.azure.ai.formrecognizer.models.RecognizedForm; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.polling.SyncPoller; + +import java.util.List; + +/** + * Sample to analyze a form from a document with a custom trained model. To learn how to train your own models, + * look at TrainModelWithoutLabels.java and TrainModelWithLabels.java. + */ +public class RecognizeCustomFormsFromUrl { + + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + * + */ + public static void main(String[] args) { + // Instantiate a client that will be used to call the service. + FormRecognizerClient client = new FormRecognizerClientBuilder() + .credential(new AzureKeyCredential("{key}")) + .endpoint("https://{endpoint}.cognitiveservices.azure.com/") + .buildClient(); + + String formUrl = "{form_url}"; + String modelId = "{custom_trained_model_id}"; + SyncPoller> recognizeFormPoller = + client.beginRecognizeCustomFormsFromUrl(formUrl, modelId); + + List recognizedForms = recognizeFormPoller.getFinalResult(); + + for (int i = 0; i < recognizedForms.size(); i++) { + final RecognizedForm form = recognizedForms.get(i); + System.out.printf("----------- Recognized custom form info for page %d -----------%n", i); + System.out.printf("Form type: %s%n", form.getFormType()); + form.getFields().forEach((label, formField) -> + // label data is populated if you are using a model trained with unlabeled data, + // since the service needs to make predictions for labels if not explicitly given to it. + System.out.printf("Field '%s' has label '%s' with a confidence " + + "score of %.2f.%n", label, formField.getLabelData().getText(), formField.getConfidence())); + } + } +} diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceipts.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceipts.java index cd612e70d4a6..c7e50a70e2e8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceipts.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceipts.java @@ -54,10 +54,10 @@ public static void main(final String[] args) throws IOException { for (int i = 0; i < receiptPageResults.size(); i++) { RecognizedForm recognizedForm = receiptPageResults.get(i); Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + System.out.printf("----------- Recognized receipt info for page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -66,7 +66,7 @@ public static void main(final String[] args) throws IOException { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -75,7 +75,7 @@ public static void main(final String[] args) throws IOException { FormField merchantAddressField = recognizedFields.get("MerchantAddress"); if (merchantAddressField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantAddressField.getValueType()) { String merchantAddress = FieldValueType.STRING.cast(merchantAddressField); System.out.printf("Merchant Address: %s, confidence: %.2f%n", merchantAddress, merchantAddressField.getConfidence()); @@ -84,7 +84,7 @@ public static void main(final String[] args) throws IOException { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -94,46 +94,43 @@ public static void main(final String[] args) throws IOException { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Name".equals(key)) { - if (FieldValueType.STRING.equals(formField.getValueType())) { - String name = FieldValueType.STRING.cast(formField); - System.out.printf("Name: %s, confidence: %.2fs%n", - name, formField.getConfidence()); - } + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Name".equals(key)) { + if (FieldValueType.STRING == formField.getValueType()) { + String name = FieldValueType.STRING.cast(formField); + System.out.printf("Name: %s, confidence: %.2fs%n", + name, formField.getConfidence()); } - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %f, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + } + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - if ("Price".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float price = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Price: %f, confidence: %.2f%n", - price, formField.getConfidence()); - } + } + if ("Price".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float price = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Price: %f, confidence: %.2f%n", + price, formField.getConfidence()); } - if ("TotalPrice".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float totalPrice = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Total Price: %f, confidence: %.2f%n", - totalPrice, formField.getConfidence()); - } + } + if ("TotalPrice".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float totalPrice = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Total Price: %f, confidence: %.2f%n", + totalPrice, formField.getConfidence()); } - }); - } - }); + } + })); } } - System.out.print("-----------------------------------"); } } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsAsync.java index d9c1b3849187..bcb1859e55f7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsAsync.java @@ -48,22 +48,21 @@ public static void main(final String[] args) throws IOException { File sourceFile = new File("../formrecognizer/azure-ai-formrecognizer/src/samples/java/sample-forms/" + "receipts/contoso-allinone.jpg"); byte[] fileContent = Files.readAllBytes(sourceFile.toPath()); - InputStream targetStream = new ByteArrayInputStream(fileContent); - - PollerFlux> analyzeReceiptPoller = - client.beginRecognizeReceipts(toFluxByteBuffer(targetStream), - sourceFile.length()); + PollerFlux> recognizeReceiptPoller; + try (InputStream targetStream = new ByteArrayInputStream(fileContent)) { + recognizeReceiptPoller = client.beginRecognizeReceipts(toFluxByteBuffer(targetStream), sourceFile.length()); + } - Mono> receiptPageResultsMono = analyzeReceiptPoller + Mono> receiptPageResultsMono = recognizeReceiptPoller .last() - .flatMap(recognizeReceiptPollOperation -> { - if (recognizeReceiptPollOperation.getStatus().isComplete()) { + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { System.out.println("Polling completed successfully"); // training completed successfully, retrieving final result. - return recognizeReceiptPollOperation.getFinalResult(); + return pollResponse.getFinalResult(); } else { return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + recognizeReceiptPollOperation.getStatus())); + + pollResponse.getStatus())); } }); @@ -71,10 +70,10 @@ public static void main(final String[] args) throws IOException { for (int i = 0; i < receiptPageResults.size(); i++) { RecognizedForm recognizedForm = receiptPageResults.get(i); Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + System.out.printf("----------- Recognized receipt info for page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -83,7 +82,7 @@ public static void main(final String[] args) throws IOException { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -92,7 +91,7 @@ public static void main(final String[] args) throws IOException { FormField merchantAddressField = recognizedFields.get("MerchantAddress"); if (merchantAddressField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantAddressField.getValueType()) { String merchantAddress = FieldValueType.STRING.cast(merchantAddressField); System.out.printf("Merchant Address: %s, confidence: %.2f%n", merchantAddress, merchantAddressField.getConfidence()); @@ -101,7 +100,7 @@ public static void main(final String[] args) throws IOException { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -111,46 +110,43 @@ public static void main(final String[] args) throws IOException { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Name".equals(key)) { - if (FieldValueType.STRING.equals(formField.getValueType())) { - String name = FieldValueType.STRING.cast(formField); - System.out.printf("Name: %s, confidence: %.2fs%n", - name, formField.getConfidence()); - } + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Name".equals(key)) { + if (FieldValueType.STRING == formField.getValueType()) { + String name = FieldValueType.STRING.cast(formField); + System.out.printf("Name: %s, confidence: %.2fs%n", + name, formField.getConfidence()); } - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %f, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + } + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - if ("Price".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float price = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Price: %f, confidence: %.2f%n", - price, formField.getConfidence()); - } + } + if ("Price".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float price = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Price: %f, confidence: %.2f%n", + price, formField.getConfidence()); } - if ("TotalPrice".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float totalPrice = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Total Price: %f, confidence: %.2f%n", - totalPrice, formField.getConfidence()); - } + } + if ("TotalPrice".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float totalPrice = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Total Price: %f, confidence: %.2f%n", + totalPrice, formField.getConfidence()); } - }); - } - }); + } + })); } } - System.out.print("-----------------------------------"); } }); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrl.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrl.java index df9c21ca7d09..1f3b08c3fa1c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrl.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrl.java @@ -44,10 +44,10 @@ public static void main(final String[] args) { for (int i = 0; i < receiptPageResults.size(); i++) { RecognizedForm recognizedForm = receiptPageResults.get(i); Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + System.out.printf("----------- Recognized receipt info for page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -56,7 +56,7 @@ public static void main(final String[] args) { FormField merchantAddressField = recognizedFields.get("MerchantAddress"); if (merchantAddressField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantAddressField.getValueType()) { String merchantAddress = FieldValueType.STRING.cast(merchantAddressField); System.out.printf("Merchant Address: %s, confidence: %.2f%n", merchantAddress, merchantAddressField.getConfidence()); @@ -65,7 +65,7 @@ public static void main(final String[] args) { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Phone number: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -74,7 +74,7 @@ public static void main(final String[] args) { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -84,46 +84,43 @@ public static void main(final String[] args) { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Name".equals(key)) { - if (FieldValueType.STRING.equals(formField.getValueType())) { - String name = FieldValueType.STRING.cast(formField); - System.out.printf("Name: %s, confidence: %.2fs%n", - name, formField.getConfidence()); - } + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Name".equals(key)) { + if (FieldValueType.STRING == formField.getValueType()) { + String name = FieldValueType.STRING.cast(formField); + System.out.printf("Name: %s, confidence: %.2fs%n", + name, formField.getConfidence()); } - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %f, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + } + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - if ("Price".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float price = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Price: %f, confidence: %.2f%n", - price, formField.getConfidence()); - } + } + if ("Price".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float price = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Price: %f, confidence: %.2f%n", + price, formField.getConfidence()); } - if ("TotalPrice".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float totalPrice = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Total Price: %f, confidence: %.2f%n", - totalPrice, formField.getConfidence()); - } + } + if ("TotalPrice".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float totalPrice = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Total Price: %f, confidence: %.2f%n", + totalPrice, formField.getConfidence()); } - }); - } - }); + } + })); } } - System.out.print("-----------------------------------"); } } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrlAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrlAsync.java index 4df763056b81..8f20c9573128 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrlAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrlAsync.java @@ -43,14 +43,14 @@ public static void main(final String[] args) { Mono> receiptPageResults = recognizeReceiptPoller .last() - .flatMap(trainingOperationResponse -> { - if (trainingOperationResponse.getStatus().isComplete()) { + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { System.out.println("Polling completed successfully"); // training completed successfully, retrieving final result. - return trainingOperationResponse.getFinalResult(); + return pollResponse.getFinalResult(); } else { return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + trainingOperationResponse.getStatus())); + + pollResponse.getStatus())); } }); @@ -58,10 +58,10 @@ public static void main(final String[] args) { for (int i = 0; i < recognizedReceipts.size(); i++) { RecognizedForm recognizedForm = recognizedReceipts.get(i); Map> recognizedFields = recognizedForm.getFields(); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + System.out.printf("----------- Recognized receipt for page %d -----------%n", i); FormField merchantNameField = recognizedFields.get("MerchantName"); if (merchantNameField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantNameField.getValueType()) { String merchantName = FieldValueType.STRING.cast(merchantNameField); System.out.printf("Merchant Name: %s, confidence: %.2f%n", merchantName, merchantNameField.getConfidence()); @@ -70,7 +70,7 @@ public static void main(final String[] args) { FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber"); if (merchantPhoneNumberField != null) { - if (FieldValueType.PHONE_NUMBER.equals(merchantNameField.getValueType())) { + if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValueType()) { String merchantAddress = FieldValueType.PHONE_NUMBER.cast(merchantPhoneNumberField); System.out.printf("Merchant Address: %s, confidence: %.2f%n", merchantAddress, merchantPhoneNumberField.getConfidence()); @@ -79,7 +79,7 @@ public static void main(final String[] args) { FormField merchantAddressField = recognizedFields.get("MerchantAddress"); if (merchantAddressField != null) { - if (FieldValueType.STRING.equals(merchantNameField.getValueType())) { + if (FieldValueType.STRING == merchantAddressField.getValueType()) { String merchantAddress = FieldValueType.STRING.cast(merchantAddressField); System.out.printf("Merchant Address: %s, confidence: %.2f%n", merchantAddress, merchantAddressField.getConfidence()); @@ -88,7 +88,7 @@ public static void main(final String[] args) { FormField transactionDateField = recognizedFields.get("TransactionDate"); if (transactionDateField != null) { - if (FieldValueType.DATE.equals(transactionDateField.getValueType())) { + if (FieldValueType.DATE == transactionDateField.getValueType()) { LocalDate transactionDate = FieldValueType.DATE.cast(transactionDateField); System.out.printf("Transaction Date: %s, confidence: %.2f%n", transactionDate, transactionDateField.getConfidence()); @@ -98,47 +98,44 @@ public static void main(final String[] args) { FormField receiptItemsField = recognizedFields.get("Items"); if (receiptItemsField != null) { System.out.printf("Receipt Items: %n"); - if (FieldValueType.LIST.equals(receiptItemsField.getValueType())) { + if (FieldValueType.LIST == receiptItemsField.getValueType()) { List> receiptItems = FieldValueType.LIST.cast(receiptItemsField); - receiptItems.forEach(receiptItem -> { - if (FieldValueType.MAP.equals(receiptItem.getValueType())) { - // we still have to cast or assign - Map> formFieldMap = FieldValueType.MAP.cast(receiptItem); - formFieldMap.forEach((key, formField) -> { - if ("Name".equals(key)) { - if (FieldValueType.STRING.equals(formField.getValueType())) { - String name = FieldValueType.STRING.cast(formField); - System.out.printf("Name: %s, confidence: %.2fs%n", - name, formField.getConfidence()); - } + // we still have to cast or assign + receiptItems.stream() + .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValueType()) + .>>map(FieldValueType.MAP::cast) + .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> { + if ("Name".equals(key)) { + if (FieldValueType.STRING == formField.getValueType()) { + String name = FieldValueType.STRING.cast(formField); + System.out.printf("Name: %s, confidence: %.2fs%n", + name, formField.getConfidence()); } - if ("Quantity".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float quantity = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Quantity: %f, confidence: %.2f%n", - quantity, formField.getConfidence()); - } + } + if ("Quantity".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float quantity = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Quantity: %f, confidence: %.2f%n", + quantity, formField.getConfidence()); } - if ("Price".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float price = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Price: %f, confidence: %.2f%n", - price, formField.getConfidence()); - } + } + if ("Price".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float price = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Price: %f, confidence: %.2f%n", + price, formField.getConfidence()); } - if ("TotalPrice".equals(key)) { - if (FieldValueType.DOUBLE.equals(formField.getValueType())) { - Float totalPrice = FieldValueType.DOUBLE.cast(formField); - System.out.printf("Total Price: %f, confidence: %.2f%n", - totalPrice, formField.getConfidence()); - } + } + if ("TotalPrice".equals(key)) { + if (FieldValueType.DOUBLE == formField.getValueType()) { + Float totalPrice = FieldValueType.DOUBLE.cast(formField); + System.out.printf("Total Price: %f, confidence: %.2f%n", + totalPrice, formField.getConfidence()); } - }); - } - }); + } + })); } } - System.out.print("-----------------------------------"); } }); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/StronglyTypedRecognizedForm.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/StronglyTypedRecognizedForm.java index f0144fdc9a56..53862e130c29 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/StronglyTypedRecognizedForm.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/StronglyTypedRecognizedForm.java @@ -25,7 +25,7 @@ public class StronglyTypedRecognizedForm { public static void main(final String[] args) { // Instantiate a client that will be used to call the service. FormRecognizerClient client = new FormRecognizerClientBuilder() - .credential(new AzureKeyCredential("{api_Key}")) + .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") .buildClient(); @@ -38,7 +38,7 @@ public static void main(final String[] args) { for (int i = 0; i < receiptPageResults.size(); i++) { final RecognizedForm recognizedForm = receiptPageResults.get(i); - System.out.printf("----------- Recognized Receipt page %d -----------%n", i); + System.out.printf("----------- Recognized receipt info for page %d -----------%n", i); // Use Receipt model transform the recognized form to strongly typed US receipt fields Receipt usReceipt = new Receipt(recognizedForm); System.out.printf("Merchant Name: %s, confidence: %.2f%n", usReceipt.getMerchantName().getValue(), @@ -48,7 +48,7 @@ public static void main(final String[] args) { usReceipt.getMerchantAddress().getConfidence()); System.out.printf("Merchant Phone Number %s, confidence: %.2f%n", usReceipt.getMerchantPhoneNumber().getValue(), usReceipt.getMerchantPhoneNumber().getConfidence()); - System.out.printf("Total: %s confidence: %.2f%n", usReceipt.getTotal().getValue(), + System.out.printf("Total: %.2f confidence: %.2f%n", usReceipt.getTotal().getValue(), usReceipt.getTotal().getConfidence()); System.out.printf("Transaction Date: %s, confidence: %.2f%n", usReceipt.getTransactionDate().getValue(), usReceipt.getTransactionDate().getConfidence()); @@ -73,7 +73,7 @@ public static void main(final String[] args) { receiptItem.getTotalPrice().getValue(), receiptItem.getTotalPrice().getConfidence()); } }); - System.out.print("-----------------------------------"); + System.out.println("-----------------------------------"); } } } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabels.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabels.java index fb06d585cdfa..cdc096fc8337 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabels.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabels.java @@ -28,14 +28,14 @@ public class TrainModelWithLabels { */ public static void main(String[] args) { // Instantiate a client that will be used to call the service. - FormTrainingClient client = new FormTrainingClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") .buildClient(); // Train custom model - String trainingFilesUrl = "{CONTAINER_SAS_URL}"; // The shared access signature (SAS) Url of your Azure Blob Storage container with your forms. + String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}"; + // The shared access signature (SAS) Url of your Azure Blob Storage container with your forms. SyncPoller trainingPoller = client.beginTraining(trainingFilesUrl, true); CustomFormModel customFormModel = trainingPoller.getFinalResult(); @@ -46,20 +46,21 @@ public static void main(String[] args) { System.out.printf("Training started on: %s%n", customFormModel.getTrainingStartedOn()); System.out.printf("Training completed on: %s%n%n", customFormModel.getTrainingCompletedOn()); - // looping through the sub-models, which contains the fields they were trained on + // looping through the subModels, which contains the fields they were trained on // The labels are based on the ones you gave the training document. System.out.println("Recognized Fields:"); // Since the data is labeled, we are able to return the accuracy of the model customFormModel.getSubmodels().forEach(customFormSubmodel -> { - System.out.printf("Sub-model accuracy: %.2f%n", customFormSubmodel.getAccuracy()); + System.out.printf("The subModel with form type %s has accuracy: %.2f%n", + customFormSubmodel.getFormType(), customFormSubmodel.getAccuracy()); customFormSubmodel.getFields().forEach((label, customFormModelField) -> - System.out.printf("Field: %s Field Name: %s Field Accuracy: %.2f%n", + System.out.printf("The model found field '%s' to have name: %s with an accuracy: %.2f%n", label, customFormModelField.getName(), customFormModelField.getAccuracy())); }); System.out.println(); customFormModel.getTrainingDocuments().forEach(trainingDocumentInfo -> { System.out.printf("Document name: %s%n", trainingDocumentInfo.getName()); - System.out.printf("Document status: %s%n", trainingDocumentInfo.getName()); + System.out.printf("Document status: %s%n", trainingDocumentInfo.getTrainingStatus()); System.out.printf("Document page count: %d%n", trainingDocumentInfo.getPageCount()); if (!trainingDocumentInfo.getDocumentErrors().isEmpty()) { System.out.println("Document Errors:"); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabelsAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabelsAsync.java index 67ef5513fedf..d905f3357aae 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabelsAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabelsAsync.java @@ -8,7 +8,6 @@ import com.azure.ai.formrecognizer.training.FormTrainingAsyncClient; import com.azure.ai.formrecognizer.training.FormTrainingClientBuilder; import com.azure.core.credential.AzureKeyCredential; -import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; import reactor.core.publisher.Mono; @@ -31,25 +30,24 @@ public class TrainModelWithLabelsAsync { */ public static void main(String[] args) { // Instantiate a client that will be used to call the service. - FormTrainingAsyncClient client = new FormTrainingClientBuilder() - .credential(new AzureKeyCredential("{api_Key}")) + .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") .buildAsyncClient(); - // Train custom model - String trainingFilesUrl = "{CONTAINER_SAS_URL}"; // The shared access signature (SAS) Url of your Azure Blob Storage container with your forms. + String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}"; + // The shared access signature (SAS) Url of your Azure Blob Storage container with your forms. PollerFlux trainingPoller = client.beginTraining(trainingFilesUrl, true); Mono customFormModelResult = trainingPoller .last() - .flatMap(trainingOperationResponse -> { - if (trainingOperationResponse.getStatus().equals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED)) { + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { // training completed successfully, retrieving final result. - return trainingOperationResponse.getFinalResult(); + return pollResponse.getFinalResult(); } else { return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + trainingOperationResponse.getStatus())); + + pollResponse.getStatus())); } }); @@ -65,15 +63,16 @@ public static void main(String[] args) { System.out.println("Recognized Fields:"); // Since the data is labeled, we are able to return the accuracy of the model customFormModel.getSubmodels().forEach(customFormSubmodel -> { - System.out.printf("Sub-model accuracy: %.2f%n", customFormSubmodel.getAccuracy()); + System.out.printf("The subModel with form type %s has accuracy: %.2f%n", + customFormSubmodel.getFormType(), customFormSubmodel.getAccuracy()); customFormSubmodel.getFields().forEach((label, customFormModelField) -> - System.out.printf("Field: %s Field Name: %s Field Accuracy: %.2f%n", + System.out.printf("The model found field '%s' to have name: %s with an accuracy: %.2f%n", label, customFormModelField.getName(), customFormModelField.getAccuracy())); }); System.out.println(); customFormModel.getTrainingDocuments().forEach(trainingDocumentInfo -> { System.out.printf("Document name: %s%n", trainingDocumentInfo.getName()); - System.out.printf("Document status: %s%n", trainingDocumentInfo.getName()); + System.out.printf("Document status: %s%n", trainingDocumentInfo.getTrainingStatus()); System.out.printf("Document page count: %d%n", trainingDocumentInfo.getPageCount()); if (!trainingDocumentInfo.getDocumentErrors().isEmpty()) { System.out.println("Document Errors:"); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabels.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabels.java index f60180abb0d3..048b009ac8f8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabels.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabels.java @@ -27,14 +27,14 @@ public class TrainModelWithoutLabels { */ public static void main(String[] args) { // Instantiate a client that will be used to call the service. - FormTrainingClient client = new FormTrainingClientBuilder() - .credential(new AzureKeyCredential("{api_Key}")) + .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") .buildClient(); // Train custom model - String trainingFilesUrl = "{CONTAINER_SAS_URL}"; // The shared access signature (SAS) Url of your Azure Blob Storage container with your forms. + String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}"; + // The shared access signature (SAS) Url of your Azure Blob Storage container with your forms. SyncPoller trainingPoller = client.beginTraining(trainingFilesUrl, false); CustomFormModel customFormModel = trainingPoller.getFinalResult(); @@ -46,12 +46,13 @@ public static void main(String[] args) { System.out.printf("Training completed on: %s%n%n", customFormModel.getTrainingCompletedOn()); System.out.println("Recognized Fields:"); - // looping through the sub-models, which contains the fields they were trained on + // looping through the subModels, which contains the fields they were trained on // Since the given training documents are unlabeled, we still group them but they do not have a label. customFormModel.getSubmodels().forEach(customFormSubmodel -> { // Since the training data is unlabeled, we are unable to return the accuracy of this model + System.out.printf("The subModel has form type %s%n", customFormSubmodel.getFormType()); customFormSubmodel.getFields().forEach((field, customFormModelField) -> - System.out.printf("Field: %s Field Label: %s%n", + System.out.printf("The model found field '%s' with label: %s%n", field, customFormModelField.getLabel())); }); System.out.println(); @@ -59,7 +60,7 @@ public static void main(String[] args) { // Training result information customFormModel.getTrainingDocuments().forEach(trainingDocumentInfo -> { System.out.printf("Document name: %s%n", trainingDocumentInfo.getName()); - System.out.printf("Document status: %s%n", trainingDocumentInfo.getName()); + System.out.printf("Document status: %s%n", trainingDocumentInfo.getTrainingStatus()); System.out.printf("Document page count: %d%n", trainingDocumentInfo.getPageCount()); if (!trainingDocumentInfo.getDocumentErrors().isEmpty()) { System.out.println("Document Errors:"); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabelsAsync.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabelsAsync.java index e7d720c6f4c4..d62eb7688c24 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabelsAsync.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabelsAsync.java @@ -8,7 +8,6 @@ import com.azure.ai.formrecognizer.training.FormTrainingAsyncClient; import com.azure.ai.formrecognizer.training.FormTrainingClientBuilder; import com.azure.core.credential.AzureKeyCredential; -import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; import reactor.core.publisher.Mono; @@ -32,25 +31,25 @@ public class TrainModelWithoutLabelsAsync { */ public static void main(String[] args) { // Instantiate a client that will be used to call the service. - FormTrainingAsyncClient client = new FormTrainingClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint("https://{endpoint}.cognitiveservices.azure.com/") .buildAsyncClient(); // Train custom model - String trainingSetSource = "{unlabeled_training_set_SAS_URL}"; - PollerFlux trainingPoller = client.beginTraining(trainingSetSource, false); + String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}"; + // The shared access signature (SAS) Url of your Azure Blob Storage container with your forms. + PollerFlux trainingPoller = client.beginTraining(trainingFilesUrl, false); Mono customFormModelResult = trainingPoller .last() - .flatMap(trainingOperationResponse -> { - if (trainingOperationResponse.getStatus().equals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED)) { + .flatMap(pollResponse -> { + if (pollResponse.getStatus().isComplete()) { // training completed successfully, retrieving final result. - return trainingOperationResponse.getFinalResult(); + return pollResponse.getFinalResult(); } else { return Mono.error(new RuntimeException("Polling completed unsuccessfully with status:" - + trainingOperationResponse.getStatus())); + + pollResponse.getStatus())); } }); @@ -62,19 +61,21 @@ public static void main(String[] args) { System.out.printf("Training completed on: %s%n%n", customFormModel.getTrainingCompletedOn()); System.out.println("Recognized Fields:"); - // looping through the sub-models, which contains the fields they were trained on + // looping through the subModels, which contains the fields they were trained on // Since the given training documents are unlabeled, we still group them but they do not have a label. customFormModel.getSubmodels().forEach(customFormSubmodel -> { // Since the training data is unlabeled, we are unable to return the accuracy of this model + System.out.printf("The subModel has form type %s%n", customFormSubmodel.getFormType()); customFormSubmodel.getFields().forEach((field, customFormModelField) -> - System.out.printf("Field: %s Field Label: %s%n", field, customFormModelField.getLabel())); + System.out.printf("The model found field '%s' with label: %s%n", + field, customFormModelField.getLabel())); }); System.out.println(); // Training result information customFormModel.getTrainingDocuments().forEach(trainingDocumentInfo -> { System.out.printf("Document name: %s%n", trainingDocumentInfo.getName()); - System.out.printf("Document status: %s%n", trainingDocumentInfo.getName()); + System.out.printf("Document status: %s%n", trainingDocumentInfo.getTrainingStatus()); System.out.printf("Document page count: %d%n", trainingDocumentInfo.getPageCount()); if (!trainingDocumentInfo.getDocumentErrors().isEmpty()) { System.out.println("Document Errors:"); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientTest.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientTest.java index 5aa35327f249..be4340c7dbd6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientTest.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientTest.java @@ -666,7 +666,7 @@ public void recognizeCustomFormUnlabeledData(HttpClient httpClient, FormRecogniz })); } /** - * Verifies custom form data for a document using source as input stream data and valid include text content + * Verifies custom form data for a document using source as input stream data and valid include field elements */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.formrecognizer.TestUtils#getTestParameters") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTest.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTest.java index ca8741c86814..a03ec93afd0c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTest.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTest.java @@ -14,6 +14,7 @@ import com.azure.ai.formrecognizer.training.FormTrainingClient; import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpClient; +import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -64,7 +65,7 @@ public void recognizeReceiptData(HttpClient httpClient, FormRecognizerServiceVer receiptDataRunner((data, dataLength) -> { SyncPoller> syncPoller = client.beginRecognizeReceipts(data, dataLength, new RecognizeOptions() - .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode)); + .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateReceiptResultData(syncPoller.getFinalResult(), false); }); @@ -92,7 +93,7 @@ public void recognizeReceiptDataWithContentTypeAutoDetection(HttpClient httpClie client = getFormRecognizerClient(httpClient, serviceVersion); SyncPoller> syncPoller = client.beginRecognizeReceipts( getContentDetectionFileData(RECEIPT_LOCAL_URL), RECEIPT_FILE_LENGTH, new RecognizeOptions() - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateReceiptResultData(syncPoller.getFinalResult(), false); } @@ -108,7 +109,7 @@ public void recognizeReceiptDataIncludeFieldElements(HttpClient httpClient, Form receiptDataRunnerFieldElements((data, includeFieldElements) -> { SyncPoller> syncPoller = client.beginRecognizeReceipts( data, RECEIPT_FILE_LENGTH, new RecognizeOptions().setContentType(FormContentType.IMAGE_JPEG) - .setIncludeFieldElements(includeFieldElements).setPollInterval(durationTestMode)); + .setIncludeFieldElements(includeFieldElements).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateReceiptResultData(syncPoller.getFinalResult(), includeFieldElements); }); @@ -126,7 +127,7 @@ public void recognizeReceiptDataWithPngFile(HttpClient httpClient, SyncPoller> syncPoller = client.beginRecognizeReceipts(data, RECEIPT_PNG_FILE_LENGTH, new RecognizeOptions().setContentType( FormContentType.IMAGE_PNG).setIncludeFieldElements(includeFieldElements) - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateReceiptResultData(syncPoller.getFinalResult(), includeFieldElements); }); @@ -143,7 +144,7 @@ public void recognizeReceiptDataWithBlankPdf(HttpClient httpClient, blankPdfDataRunner((data, dataLength) -> { SyncPoller> syncPoller = client.beginRecognizeReceipts( data, dataLength, new RecognizeOptions().setContentType(FormContentType.APPLICATION_PDF) - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateBlankPdfResultData(syncPoller.getFinalResult()); }); @@ -156,7 +157,7 @@ public void recognizeReceiptFromDataMultiPage(HttpClient httpClient, FormRecogni multipageFromDataRunner((data, dataLength) -> { SyncPoller> syncPoller = client.beginRecognizeReceipts( data, dataLength, new RecognizeOptions().setContentType(FormContentType.APPLICATION_PDF) - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateMultipageReceiptData(syncPoller.getFinalResult()); }); @@ -188,7 +189,7 @@ public void recognizeReceiptInvalidSourceUrl(HttpClient httpClient, FormRecogniz client = getFormRecognizerClient(httpClient, serviceVersion); invalidSourceUrlRunner((sourceUrl) -> assertThrows(HttpResponseException.class, () -> client.beginRecognizeReceiptsFromUrl(sourceUrl, - new RecognizeOptions().setPollInterval(durationTestMode)))); + new RecognizeOptions().setPollInterval(durationTestMode), Context.NONE))); } /** @@ -203,7 +204,7 @@ public void recognizeReceiptFromUrlIncludeFieldElements(HttpClient httpClient, receiptSourceUrlRunnerFieldElements((sourceUrl, includeFieldElements) -> { SyncPoller> syncPoller = client.beginRecognizeReceiptsFromUrl( sourceUrl, new RecognizeOptions().setIncludeFieldElements(includeFieldElements) - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateReceiptResultData(syncPoller.getFinalResult(), includeFieldElements); }); @@ -222,7 +223,7 @@ public void recognizeReceiptSourceUrlWithPngFile(HttpClient httpClient, SyncPoller> syncPoller = client.beginRecognizeReceiptsFromUrl( sourceUrl, new RecognizeOptions().setIncludeFieldElements(includeFieldElements) - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateReceiptResultData(syncPoller.getFinalResult(), includeFieldElements); }); @@ -234,7 +235,7 @@ public void recognizeReceiptFromUrlMultiPage(HttpClient httpClient, FormRecogniz client = getFormRecognizerClient(httpClient, serviceVersion); multipageFromUrlRunner(receiptUrl -> { SyncPoller> syncPoller = client.beginRecognizeReceiptsFromUrl( - receiptUrl, new RecognizeOptions().setPollInterval(durationTestMode)); + receiptUrl, new RecognizeOptions().setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateMultipageReceiptData(syncPoller.getFinalResult()); }); @@ -254,7 +255,7 @@ public void recognizeContent(HttpClient httpClient, FormRecognizerServiceVersion contentFromDataRunner((data, dataLength) -> { SyncPoller> syncPoller = client.beginRecognizeContent(data, dataLength, new RecognizeOptions() - .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode)); + .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateContentResultData(syncPoller.getFinalResult(), false); }); @@ -269,7 +270,7 @@ public void recognizeContentResultWithNullData(HttpClient httpClient, FormRecogn client = getFormRecognizerClient(httpClient, serviceVersion); assertThrows(RuntimeException.class, () -> client.beginRecognizeContent(null, LAYOUT_FILE_LENGTH, new RecognizeOptions() - .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode))); + .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode), Context.NONE)); } /** @@ -282,7 +283,7 @@ public void recognizeContentResultWithContentTypeAutoDetection(HttpClient httpCl client = getFormRecognizerClient(httpClient, serviceVersion); SyncPoller> syncPoller = client.beginRecognizeContent( getContentDetectionFileData(LAYOUT_LOCAL_URL), LAYOUT_FILE_LENGTH, new RecognizeOptions() - .setContentType(null).setPollInterval(durationTestMode)); + .setContentType(null).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateContentResultData(syncPoller.getFinalResult(), false); @@ -299,7 +300,7 @@ public void recognizeContentResultWithBlankPdf(HttpClient httpClient, FormRecogn blankPdfDataRunner((data, dataLength) -> { SyncPoller> syncPoller = client.beginRecognizeContent(data, dataLength, new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateContentResultData(syncPoller.getFinalResult(), false); }); @@ -312,7 +313,7 @@ public void recognizeContentFromDataMultiPage(HttpClient httpClient, FormRecogni multipageFromDataRunner((data, dataLength) -> { SyncPoller> syncPoller = client.beginRecognizeContent(data, dataLength, new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateContentResultData(syncPoller.getFinalResult(), false); }); @@ -340,7 +341,7 @@ public void recognizeContentFromUrlWithPdf(HttpClient httpClient, FormRecognizer client = getFormRecognizerClient(httpClient, serviceVersion); pdfContentFromUrlRunner(sourceUrl -> { SyncPoller> syncPoller = client.beginRecognizeContentFromUrl(sourceUrl, - new RecognizeOptions().setPollInterval(durationTestMode)); + new RecognizeOptions().setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateContentResultData(syncPoller.getFinalResult(), false); }); @@ -356,7 +357,7 @@ public void recognizeContentInvalidSourceUrl(HttpClient httpClient, FormRecogniz invalidSourceUrlRunner((invalidSourceUrl) -> assertThrows( HttpResponseException.class, () -> client.beginRecognizeContentFromUrl(invalidSourceUrl, - new RecognizeOptions().setPollInterval(durationTestMode)))); + new RecognizeOptions().setPollInterval(durationTestMode), Context.NONE))); } @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -365,7 +366,8 @@ public void recognizeContentFromUrlMultiPage(HttpClient httpClient, FormRecogniz client = getFormRecognizerClient(httpClient, serviceVersion); multipageFromUrlRunner((formUrl) -> { SyncPoller> syncPoller = - client.beginRecognizeContentFromUrl(formUrl, new RecognizeOptions().setPollInterval(durationTestMode)); + client.beginRecognizeContentFromUrl(formUrl, new RecognizeOptions().setPollInterval(durationTestMode), + Context.NONE); syncPoller.waitForCompletion(); validateContentResultData(syncPoller.getFinalResult(), false); }); @@ -386,13 +388,13 @@ public void recognizeCustomFormLabeledData(HttpClient httpClient, FormRecognizer beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF).setIncludeFieldElements(true) - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), true, true); })); @@ -410,12 +412,12 @@ public void recognizeCustomFormLabeledDataWithJpgContentType(HttpClient httpClie beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, useTrainingLabels, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode)); + .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), false, true); })); @@ -432,12 +434,12 @@ public void recognizeCustomFormLabeledDataWithBlankPdfContentType(HttpClient htt blankPdfDataRunner((data, dataLength) -> beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, useTrainingLabels, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), false, true); })); @@ -455,12 +457,12 @@ public void recognizeCustomFormLabeledDataExcludeFieldElements(HttpClient httpCl customFormDataRunner((data, dataLength) -> beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, useTrainingLabels, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), false, true); })); @@ -478,13 +480,13 @@ public void recognizeCustomFormLabeledDataWithNullFormData(HttpClient httpClient beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller syncPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); syncPoller.waitForCompletion(); assertThrows(RuntimeException.class, () -> client.beginRecognizeCustomForms( (InputStream) null, dataLength, syncPoller.getFinalResult().getModelId(), new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF).setIncludeFieldElements(true) - .setPollInterval(durationTestMode))); + .setPollInterval(durationTestMode), Context.NONE)); }) ); } @@ -501,7 +503,7 @@ public void recognizeCustomFormLabeledDataWithNullModelId(HttpClient httpClient, Exception ex = assertThrows(RuntimeException.class, () -> client.beginRecognizeCustomForms( data, dataLength, null, new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF).setIncludeFieldElements(true) - .setPollInterval(durationTestMode))); + .setPollInterval(durationTestMode), Context.NONE)); assertEquals(EXPECTED_MODEL_ID_IS_REQUIRED_EXCEPTION_MESSAGE, ex.getMessage()); }); } @@ -519,7 +521,7 @@ public void recognizeCustomFormLabeledDataWithEmptyModelId(HttpClient httpClient Exception ex = assertThrows(RuntimeException.class, () -> client.beginRecognizeCustomForms( data, dataLength, "", new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF).setIncludeFieldElements(true) - .setPollInterval(durationTestMode))); + .setPollInterval(durationTestMode), Context.NONE)); assertEquals(EXPECTED_INVALID_UUID_EXCEPTION_MESSAGE, ex.getMessage()); }); } @@ -532,12 +534,13 @@ public void recognizeCustomFormInvalidStatus(HttpClient httpClient, FormRecogniz beginTrainingLabeledRunner((training, useTrainingLabels) -> { SyncPoller syncPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(training, useTrainingLabels, - null, durationTestMode); + null, durationTestMode, Context.NONE); syncPoller.waitForCompletion(); CustomFormModel createdModel = syncPoller.getFinalResult(); FormRecognizerException formRecognizerException = assertThrows(FormRecognizerException.class, () -> client.beginRecognizeCustomFormsFromUrl(invalidSourceUrl, - createdModel.getModelId(), new RecognizeOptions().setPollInterval(durationTestMode)).getFinalResult()); + createdModel.getModelId(), new RecognizeOptions().setPollInterval(durationTestMode), + Context.NONE).getFinalResult()); ErrorInformation errorInformation = formRecognizerException.getErrorInformation().get(0); // TODO: Service bug https://github.com/Azure/azure-sdk-for-java/issues/12046 // assertEquals(EXPECTED_INVALID_URL_ERROR_CODE, errorInformation.getCode()); @@ -558,13 +561,13 @@ public void recognizeCustomFormLabeledDataWithContentTypeAutoDetection(HttpClien beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, useTrainingLabels, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( getContentDetectionFileData(FORM_LOCAL_URL), CUSTOM_FORM_FILE_LENGTH, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setIncludeFieldElements(true).setPollInterval(durationTestMode)); + .setIncludeFieldElements(true).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), true, true); }); @@ -578,12 +581,12 @@ public void recognizeCustomFormMultiPageLabeled(HttpClient httpClient, multipageFromDataRunner((data, dataLength) -> beginTrainingMultipageRunner((trainingFilesUrl) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, true, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateMultiPageDataLabeled(syncPoller.getFinalResult()); })); @@ -602,12 +605,12 @@ public void recognizeCustomFormUnlabeledData(HttpClient httpClient, FormRecogniz beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), false, false); })); @@ -625,13 +628,13 @@ public void recognizeCustomFormUnlabeledDataIncludeFieldElements(HttpClient http customFormDataRunner((data, dataLength) -> beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() .setContentType(FormContentType.APPLICATION_PDF).setIncludeFieldElements(true) - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), true, false); })); @@ -645,12 +648,12 @@ public void recognizeCustomFormMultiPageUnlabeled(HttpClient httpClient, multipageFromDataRunner((data, dataLength) -> beginTrainingMultipageRunner((trainingFilesUrl) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, false, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateMultiPageDataUnlabeled(syncPoller.getFinalResult()); })); @@ -668,12 +671,12 @@ public void recognizeCustomFormUnlabeledDataWithJpgContentType(HttpClient httpCl beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode)); + .setContentType(FormContentType.IMAGE_JPEG).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), false, false); })); @@ -690,12 +693,12 @@ public void recognizeCustomFormUnlabeledDataWithBlankPdfContentType(HttpClient h blankPdfDataRunner((data, dataLength) -> beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomForms( data, dataLength, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), false, false); })); @@ -714,12 +717,12 @@ public void recognizeCustomFormUrlUnlabeledData(HttpClient httpClient, urlRunner(fileUrl -> beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, useTrainingLabels, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomFormsFromUrl( fileUrl, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), false, false); }), FORM_JPG); @@ -736,12 +739,12 @@ public void recognizeCustomFormUrlUnlabeledDataIncludeFieldElements(HttpClient h urlRunner(fileUrl -> beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, useTrainingLabels, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomFormsFromUrl( fileUrl, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setIncludeFieldElements(true).setPollInterval(durationTestMode)); + .setIncludeFieldElements(true).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), true, false); }), FORM_JPG); @@ -755,12 +758,12 @@ public void recognizeCustomFormUrlMultiPageUnlabeled(HttpClient httpClient, multipageFromUrlRunner(fileUrl -> beginTrainingMultipageRunner((trainingFilesUrl) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, false, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomFormsFromUrl( fileUrl, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateMultiPageDataUnlabeled(syncPoller.getFinalResult()); })); @@ -779,13 +782,13 @@ public void recognizeCustomFormInvalidSourceUrl(HttpClient httpClient, beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller syncPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, useTrainingLabels, - null, durationTestMode); + null, durationTestMode, Context.NONE); syncPoller.waitForCompletion(); CustomFormModel createdModel = syncPoller.getFinalResult(); HttpResponseException httpResponseException = assertThrows( HttpResponseException.class, () -> client.beginRecognizeCustomFormsFromUrl( INVALID_URL, createdModel.getModelId(), new RecognizeOptions() - .setPollInterval(durationTestMode)).getFinalResult()); + .setPollInterval(durationTestMode), Context.NONE).getFinalResult()); assertEquals(httpResponseException.getMessage(), (INVALID_SOURCE_URL_ERROR)); }); } @@ -800,7 +803,7 @@ public void recognizeCustomFormFromUrlLabeledDataWithNullModelId(HttpClient http client = getFormRecognizerClient(httpClient, serviceVersion); multipageFromUrlRunner(fileUrl -> { Exception ex = assertThrows(RuntimeException.class, () -> client.beginRecognizeCustomFormsFromUrl( - fileUrl, null, new RecognizeOptions().setPollInterval(durationTestMode))); + fileUrl, null, new RecognizeOptions().setPollInterval(durationTestMode), Context.NONE)); assertEquals(EXPECTED_MODEL_ID_IS_REQUIRED_EXCEPTION_MESSAGE, ex.getMessage()); }); } @@ -815,7 +818,7 @@ public void recognizeCustomFormFromUrlLabeledDataWithEmptyModelId(HttpClient htt client = getFormRecognizerClient(httpClient, serviceVersion); multipageFromUrlRunner(fileUrl -> beginTrainingMultipageRunner((trainingFilesUrl) -> { Exception ex = assertThrows(RuntimeException.class, () -> client.beginRecognizeCustomFormsFromUrl( - fileUrl, "", new RecognizeOptions().setPollInterval(durationTestMode))); + fileUrl, "", new RecognizeOptions().setPollInterval(durationTestMode), Context.NONE)); assertEquals(EXPECTED_INVALID_UUID_EXCEPTION_MESSAGE, ex.getMessage()); })); } @@ -832,12 +835,12 @@ public void recognizeCustomFormUrlLabeledDataIncludeFieldElements(HttpClient htt urlRunner(fileUrl -> beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomFormsFromUrl( fileUrl, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setIncludeFieldElements(true).setPollInterval(durationTestMode)); + .setIncludeFieldElements(true).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), true, true); }), FORM_JPG); @@ -854,12 +857,12 @@ public void recognizeCustomFormUrlLabeledData(HttpClient httpClient, FormRecogni SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomFormsFromUrl( fileUrl, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateRecognizedResult(syncPoller.getFinalResult(), false, true); }), FORM_JPG); @@ -876,12 +879,12 @@ public void recognizeCustomFormUrlMultiPageLabeled(HttpClient httpClient, multipageFromUrlRunner(fileUrl -> beginTrainingMultipageRunner((trainingFilesUrl) -> { SyncPoller trainingPoller = getFormTrainingClient(httpClient, serviceVersion).beginTraining(trainingFilesUrl, true, - null, durationTestMode); + null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); SyncPoller> syncPoller = client.beginRecognizeCustomFormsFromUrl( fileUrl, trainingPoller.getFinalResult().getModelId(), new RecognizeOptions() - .setPollInterval(durationTestMode)); + .setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateMultiPageDataLabeled(syncPoller.getFinalResult()); })); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTestBase.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTestBase.java index 4fa322aff744..b1023e6bdcfb 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTestBase.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTestBase.java @@ -696,9 +696,10 @@ void beginTrainingMultipageRunner(Consumer testRunner) { private void validateUnLabeledResult(RecognizedForm actualForm, boolean includeFieldElements, List readResults, PageResult expectedPage) { validatePageRangeData(expectedPage.getPage(), actualForm.getFormPageRange()); - for (int i = 0; i < expectedPage.getKeyValuePairs().size(); i++) { - final KeyValuePair expectedFormField = expectedPage.getKeyValuePairs().get(i); - final FormField actualFormField = actualForm.getFields().get("field-" + i); + int i = 0; + for (Map.Entry> entry : actualForm.getFields().entrySet()) { + FormField actualFormField = entry.getValue(); + final KeyValuePair expectedFormField = expectedPage.getKeyValuePairs().get(i++); assertEquals(expectedFormField.getConfidence(), actualFormField.getConfidence()); assertEquals(expectedFormField.getKey().getText(), actualFormField.getLabelData().getText()); validateBoundingBoxData(expectedFormField.getKey().getBoundingBox(), @@ -720,6 +721,7 @@ private void validateLabeledData(RecognizedForm actualForm, boolean includeField assertEquals(documentResult.getPageRange().get(0), actualForm.getFormPageRange().getFirstPageNumber()); assertEquals(documentResult.getPageRange().get(1), actualForm.getFormPageRange().getLastPageNumber()); + assertEquals(documentResult.getFields().keySet(), actualForm.getFields().keySet()); documentResult.getFields().forEach((label, expectedFieldValue) -> { final FormField actualFormField = actualForm.getFields().get(label); assertEquals(label, actualFormField.getName()); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java index 340889097b86..148fd3c6cd9f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java @@ -57,7 +57,7 @@ public void getFormRecognizerClientAndValidate(HttpClient httpClient, FormRecogn blankPdfDataRunner(data -> { SyncPoller> syncPoller = formRecognizerClient.beginRecognizeReceipts(data, BLANK_FORM_FILE_LENGTH, new RecognizeOptions() - .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode)); + .setContentType(FormContentType.APPLICATION_PDF).setPollInterval(durationTestMode), Context.NONE); syncPoller.waitForCompletion(); validateBlankPdfResultData(syncPoller.getFinalResult()); }); @@ -93,7 +93,7 @@ public void getCustomModelWithResponse(HttpClient httpClient, FormRecognizerServ client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingUnlabeledRunner((trainingDataSasUrl, useTrainingLabels) -> { CustomFormModel trainedUnlabeledModel = client.beginTraining(trainingDataSasUrl, useTrainingLabels, - null, durationTestMode).getFinalResult(); + null, durationTestMode, Context.NONE).getFinalResult(); Response customModelWithResponse = client.getCustomModelWithResponse(trainedUnlabeledModel.getModelId(), Context.NONE); @@ -111,7 +111,7 @@ public void getCustomModelUnlabeled(HttpClient httpClient, FormRecognizerService client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller syncPoller = client.beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); syncPoller.waitForCompletion(); CustomFormModel trainedUnlabeledModel = syncPoller.getFinalResult(); validateCustomModelData(client.getCustomModel(trainedUnlabeledModel.getModelId()), false); @@ -127,7 +127,7 @@ public void getCustomModelLabeled(HttpClient httpClient, FormRecognizerServiceVe client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingLabeledRunner((trainingDataSASUrl, useTrainingLabels) -> { CustomFormModel customFormModel = client.beginTraining(trainingDataSASUrl, useTrainingLabels, - null, durationTestMode).getFinalResult(); + null, durationTestMode, Context.NONE).getFinalResult(); validateCustomModelData(client.getCustomModel(customFormModel.getModelId()), true); }); } @@ -172,7 +172,7 @@ public void deleteModelValidModelIdWithResponse(HttpClient httpClient, FormRecog client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingLabeledRunner((trainingDataSASUrl, useTrainingLabels) -> { SyncPoller syncPoller = client.beginTraining(trainingDataSASUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); syncPoller.waitForCompletion(); CustomFormModel createdModel = syncPoller.getFinalResult(); @@ -233,7 +233,7 @@ public void beginCopy(HttpClient httpClient, FormRecognizerServiceVersion servic client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller syncPoller = - client.beginTraining(trainingFilesUrl, useTrainingLabels, null, durationTestMode); + client.beginTraining(trainingFilesUrl, useTrainingLabels, null, durationTestMode, Context.NONE); syncPoller.waitForCompletion(); CustomFormModel actualModel = syncPoller.getFinalResult(); @@ -260,7 +260,7 @@ public void beginCopyInvalidRegion(HttpClient httpClient, FormRecognizerServiceV client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller syncPoller = - client.beginTraining(trainingFilesUrl, useTrainingLabels, null, durationTestMode); + client.beginTraining(trainingFilesUrl, useTrainingLabels, null, durationTestMode, Context.NONE); syncPoller.waitForCompletion(); final CustomFormModel actualModel = syncPoller.getFinalResult(); @@ -283,7 +283,7 @@ public void beginCopyIncorrectRegion(HttpClient httpClient, FormRecognizerServic client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller syncPoller = - client.beginTraining(trainingFilesUrl, useTrainingLabels, null, durationTestMode); + client.beginTraining(trainingFilesUrl, useTrainingLabels, null, durationTestMode, Context.NONE); syncPoller.waitForCompletion(); CustomFormModel actualModel = syncPoller.getFinalResult(); @@ -337,7 +337,7 @@ public void beginTrainingWithTrainingLabelsForJPGTrainingSet(HttpClient httpClie client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingLabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = client.beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); validateCustomModelData(trainingPoller.getFinalResult(), true); }); @@ -353,7 +353,7 @@ public void beginTrainingWithoutTrainingLabelsForJPGTrainingSet(HttpClient httpC client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = client.beginTraining(trainingFilesUrl, - useTrainingLabels, null, durationTestMode); + useTrainingLabels, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); validateCustomModelData(trainingPoller.getFinalResult(), false); }); @@ -369,7 +369,7 @@ public void beginTrainingWithTrainingLabelsForMultiPagePDFTrainingSet(HttpClient client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingMultipageRunner(trainingFilesUrl -> { SyncPoller trainingPoller = client.beginTraining(trainingFilesUrl, - true, null, durationTestMode); + true, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); validateCustomModelData(trainingPoller.getFinalResult(), true); }); @@ -385,7 +385,7 @@ public void beginTrainingWithoutTrainingLabelsForMultiPagePDFTrainingSet(HttpCli client = getFormTrainingClient(httpClient, serviceVersion); beginTrainingMultipageRunner(trainingFilesUrl -> { SyncPoller trainingPoller = client.beginTraining(trainingFilesUrl, - false, null, durationTestMode); + false, null, durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); validateCustomModelData(trainingPoller.getFinalResult(), false); }); @@ -403,7 +403,7 @@ public void beginTrainingWithoutTrainingLabelsIncludeSubfolderWithPrefixName(Htt beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = client.beginTraining(trainingFilesUrl, useTrainingLabels, new TrainingFileFilter().setIncludeSubFolders(true).setPrefix(PREFIX_SUBFOLDER), - durationTestMode); + durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); validateCustomModelData(trainingPoller.getFinalResult(), false); }); @@ -421,7 +421,7 @@ public void beginTrainingWithoutTrainingLabelsExcludeSubfolderWithPrefixName(Htt beginTrainingUnlabeledRunner((trainingFilesUrl, useTrainingLabels) -> { SyncPoller trainingPoller = client.beginTraining(trainingFilesUrl, useTrainingLabels, new TrainingFileFilter().setPrefix(PREFIX_SUBFOLDER), - durationTestMode); + durationTestMode, Context.NONE); trainingPoller.waitForCompletion(); validateCustomModelData(trainingPoller.getFinalResult(), false); }); @@ -440,7 +440,7 @@ public void beginTrainingWithoutTrainingLabelsIncludeSubfolderWithNonExistPrefix FormRecognizerException thrown = assertThrows(FormRecognizerException.class, () -> client.beginTraining(trainingFilesUrl, false, new TrainingFileFilter().setIncludeSubFolders(true).setPrefix(INVALID_PREFIX_FILE_NAME), - durationTestMode).getFinalResult()); + durationTestMode, Context.NONE).getFinalResult()); assertEquals(NO_VALID_BLOB_FOUND, thrown.getErrorInformation().get(0).getMessage()); }); } @@ -457,7 +457,7 @@ public void beginTrainingWithoutTrainingLabelsExcludeSubfolderWithNonExistPrefix beginTrainingMultipageRunner(trainingFilesUrl -> { FormRecognizerException thrown = assertThrows(FormRecognizerException.class, () -> client.beginTraining(trainingFilesUrl, false, - new TrainingFileFilter().setPrefix(INVALID_PREFIX_FILE_NAME), durationTestMode) + new TrainingFileFilter().setPrefix(INVALID_PREFIX_FILE_NAME), durationTestMode, Context.NONE) .getFinalResult()); assertEquals(NO_VALID_BLOB_FOUND, thrown.getErrorInformation().get(0).getMessage()); }); diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml b/sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml index 51cd7aa60a93..7de691d6db1b 100644 --- a/sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml +++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/pom.xml @@ -11,11 +11,11 @@ com.microsoft.azure azure-arm-parent - 1.3.1 + 1.3.2 ../../parents/azure-arm-parent/pom.xml azure-mgmt-hdinsight - 1.3.3 + 1.3.4 jar Microsoft Azure SDK for HDInsight Management This package contains Microsoft HDInsight Management SDK. diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleConfigurationUpdateParameter.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleConfigurationUpdateParameter.java new file mode 100644 index 000000000000..4d602abcc8f2 --- /dev/null +++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleConfigurationUpdateParameter.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2018_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The autoscale configuration update parameter. + */ +public class AutoscaleConfigurationUpdateParameter { + /** + * The autoscale configuration. + */ + @JsonProperty(value = "autoscale") + private Autoscale autoscale; + + /** + * Get the autoscale configuration. + * + * @return the autoscale value + */ + public Autoscale autoscale() { + return this.autoscale; + } + + /** + * Set the autoscale configuration. + * + * @param autoscale the autoscale value to set + * @return the AutoscaleConfigurationUpdateParameter object itself. + */ + public AutoscaleConfigurationUpdateParameter withAutoscale(Autoscale autoscale) { + this.autoscale = autoscale; + return this; + } + +} diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterCreateProperties.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterCreateProperties.java index ee0e119e1f93..55b741299881 100644 --- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterCreateProperties.java +++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterCreateProperties.java @@ -69,12 +69,24 @@ public class ClusterCreateProperties { @JsonProperty(value = "diskEncryptionProperties") private DiskEncryptionProperties diskEncryptionProperties; + /** + * The encryption-in-transit properties. + */ + @JsonProperty(value = "encryptionInTransitProperties") + private EncryptionInTransitProperties encryptionInTransitProperties; + /** * The minimal supported tls version. */ @JsonProperty(value = "minSupportedTlsVersion") private String minSupportedTlsVersion; + /** + * The network settings. + */ + @JsonProperty(value = "networkSettings") + private NetworkSettings networkSettings; + /** * Get the version of the cluster. * @@ -255,6 +267,26 @@ public ClusterCreateProperties withDiskEncryptionProperties(DiskEncryptionProper return this; } + /** + * Get the encryption-in-transit properties. + * + * @return the encryptionInTransitProperties value + */ + public EncryptionInTransitProperties encryptionInTransitProperties() { + return this.encryptionInTransitProperties; + } + + /** + * Set the encryption-in-transit properties. + * + * @param encryptionInTransitProperties the encryptionInTransitProperties value to set + * @return the ClusterCreateProperties object itself. + */ + public ClusterCreateProperties withEncryptionInTransitProperties(EncryptionInTransitProperties encryptionInTransitProperties) { + this.encryptionInTransitProperties = encryptionInTransitProperties; + return this; + } + /** * Get the minimal supported tls version. * @@ -275,4 +307,24 @@ public ClusterCreateProperties withMinSupportedTlsVersion(String minSupportedTls return this; } + /** + * Get the network settings. + * + * @return the networkSettings value + */ + public NetworkSettings networkSettings() { + return this.networkSettings; + } + + /** + * Set the network settings. + * + * @param networkSettings the networkSettings value to set + * @return the ClusterCreateProperties object itself. + */ + public ClusterCreateProperties withNetworkSettings(NetworkSettings networkSettings) { + this.networkSettings = networkSettings; + return this; + } + } diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterGetProperties.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterGetProperties.java index 36634a6b967b..8d553e6b8137 100644 --- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterGetProperties.java +++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ClusterGetProperties.java @@ -102,12 +102,24 @@ public class ClusterGetProperties { @JsonProperty(value = "diskEncryptionProperties") private DiskEncryptionProperties diskEncryptionProperties; + /** + * The encryption-in-transit properties. + */ + @JsonProperty(value = "encryptionInTransitProperties") + private EncryptionInTransitProperties encryptionInTransitProperties; + /** * The minimal supported tls version. */ @JsonProperty(value = "minSupportedTlsVersion") private String minSupportedTlsVersion; + /** + * The network settings. + */ + @JsonProperty(value = "networkSettings") + private NetworkSettings networkSettings; + /** * Get the version of the cluster. * @@ -388,6 +400,26 @@ public ClusterGetProperties withDiskEncryptionProperties(DiskEncryptionPropertie return this; } + /** + * Get the encryption-in-transit properties. + * + * @return the encryptionInTransitProperties value + */ + public EncryptionInTransitProperties encryptionInTransitProperties() { + return this.encryptionInTransitProperties; + } + + /** + * Set the encryption-in-transit properties. + * + * @param encryptionInTransitProperties the encryptionInTransitProperties value to set + * @return the ClusterGetProperties object itself. + */ + public ClusterGetProperties withEncryptionInTransitProperties(EncryptionInTransitProperties encryptionInTransitProperties) { + this.encryptionInTransitProperties = encryptionInTransitProperties; + return this; + } + /** * Get the minimal supported tls version. * @@ -408,4 +440,24 @@ public ClusterGetProperties withMinSupportedTlsVersion(String minSupportedTlsVer return this; } + /** + * Get the network settings. + * + * @return the networkSettings value + */ + public NetworkSettings networkSettings() { + return this.networkSettings; + } + + /** + * Set the network settings. + * + * @param networkSettings the networkSettings value to set + * @return the ClusterGetProperties object itself. + */ + public ClusterGetProperties withNetworkSettings(NetworkSettings networkSettings) { + this.networkSettings = networkSettings; + return this; + } + } diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Clusters.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Clusters.java index f606528226f9..cf19e298813b 100644 --- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Clusters.java +++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Clusters.java @@ -76,4 +76,14 @@ public interface Clusters extends SupportsCreating { + /** Static value PublicLoadBalancer for OutboundOnlyPublicNetworkAccessType. */ + public static final OutboundOnlyPublicNetworkAccessType PUBLIC_LOAD_BALANCER = fromString("PublicLoadBalancer"); + + /** Static value UDR for OutboundOnlyPublicNetworkAccessType. */ + public static final OutboundOnlyPublicNetworkAccessType UDR = fromString("UDR"); + + /** + * Creates or finds a OutboundOnlyPublicNetworkAccessType from its string representation. + * @param name a name to look for + * @return the corresponding OutboundOnlyPublicNetworkAccessType + */ + @JsonCreator + public static OutboundOnlyPublicNetworkAccessType fromString(String name) { + return fromString(name, OutboundOnlyPublicNetworkAccessType.class); + } + + /** + * @return known OutboundOnlyPublicNetworkAccessType values + */ + public static Collection values() { + return values(OutboundOnlyPublicNetworkAccessType.class); + } +} diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/PublicNetworkAccess.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/PublicNetworkAccess.java new file mode 100644 index 000000000000..9f83fac49300 --- /dev/null +++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/PublicNetworkAccess.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2018_06_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PublicNetworkAccess. + */ +public final class PublicNetworkAccess extends ExpandableStringEnum { + /** Static value InboundAndOutbound for PublicNetworkAccess. */ + public static final PublicNetworkAccess INBOUND_AND_OUTBOUND = fromString("InboundAndOutbound"); + + /** Static value OutboundOnly for PublicNetworkAccess. */ + public static final PublicNetworkAccess OUTBOUND_ONLY = fromString("OutboundOnly"); + + /** + * Creates or finds a PublicNetworkAccess from its string representation. + * @param name a name to look for + * @return the corresponding PublicNetworkAccess + */ + @JsonCreator + public static PublicNetworkAccess fromString(String name) { + return fromString(name, PublicNetworkAccess.class); + } + + /** + * @return known PublicNetworkAccess values + */ + public static Collection values() { + return values(PublicNetworkAccess.class); + } +} diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersImpl.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersImpl.java index 63400afa4a31..973698a11a66 100644 --- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersImpl.java +++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersImpl.java @@ -175,4 +175,10 @@ public Completable resizeAsync(String resourceGroupName, String clusterName) { return client.resizeAsync(resourceGroupName, clusterName).toCompletable(); } + @Override + public Completable updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.updateAutoScaleConfigurationAsync(resourceGroupName, clusterName).toCompletable(); + } + } diff --git a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java index a742a7175f99..38fd4130f69d 100644 --- a/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java +++ b/sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java @@ -15,6 +15,8 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Autoscale; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.AutoscaleConfigurationUpdateParameter; import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.ClusterCreateParametersExtended; import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.ClusterDiskEncryptionParameters; import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.ClusterPatchParameters; @@ -109,6 +111,14 @@ interface ClustersService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/resize") Observable> beginResize(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("roleName") String roleName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ClusterResizeParameters parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Clusters updateAutoScaleConfiguration" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/autoscale") + Observable> updateAutoScaleConfiguration(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("roleName") String roleName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AutoscaleConfigurationUpdateParameter parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Clusters beginUpdateAutoScaleConfiguration" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/autoscale") + Observable> beginUpdateAutoScaleConfiguration(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("roleName") String roleName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AutoscaleConfigurationUpdateParameter parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Clusters list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusters") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1173,6 +1183,329 @@ private ServiceResponse beginResizeDelegate(Response respons .build(response); } + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void updateAutoScaleConfiguration(String resourceGroupName, String clusterName) { + updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName) { + return updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateAutoScaleConfigurationWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String roleName = "workernode"; + final Autoscale autoscale = null; + AutoscaleConfigurationUpdateParameter parameters = new AutoscaleConfigurationUpdateParameter(); + parameters.withAutoscale(null); + Observable> observable = service.updateAutoScaleConfiguration(this.client.subscriptionId(), resourceGroupName, clusterName, roleName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param autoscale The autoscale configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void updateAutoScaleConfiguration(String resourceGroupName, String clusterName, Autoscale autoscale) { + updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale).toBlocking().last().body(); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param autoscale The autoscale configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, Autoscale autoscale, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale), serviceCallback); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param autoscale The autoscale configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, Autoscale autoscale) { + return updateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param autoscale The autoscale configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateAutoScaleConfigurationWithServiceResponseAsync(String resourceGroupName, String clusterName, Autoscale autoscale) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(autoscale); + final String roleName = "workernode"; + AutoscaleConfigurationUpdateParameter parameters = new AutoscaleConfigurationUpdateParameter(); + parameters.withAutoscale(autoscale); + Observable> observable = service.updateAutoScaleConfiguration(this.client.subscriptionId(), resourceGroupName, clusterName, roleName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginUpdateAutoScaleConfiguration(String resourceGroupName, String clusterName) { + beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginUpdateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName) { + return beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginUpdateAutoScaleConfigurationWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String roleName = "workernode"; + final Autoscale autoscale = null; + AutoscaleConfigurationUpdateParameter parameters = new AutoscaleConfigurationUpdateParameter(); + parameters.withAutoscale(null); + return service.beginUpdateAutoScaleConfiguration(this.client.subscriptionId(), resourceGroupName, clusterName, roleName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateAutoScaleConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param autoscale The autoscale configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginUpdateAutoScaleConfiguration(String resourceGroupName, String clusterName, Autoscale autoscale) { + beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale).toBlocking().single().body(); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param autoscale The autoscale configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, Autoscale autoscale, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale), serviceCallback); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param autoscale The autoscale configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginUpdateAutoScaleConfigurationAsync(String resourceGroupName, String clusterName, Autoscale autoscale) { + return beginUpdateAutoScaleConfigurationWithServiceResponseAsync(resourceGroupName, clusterName, autoscale).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Autoscale Configuration for HDInsight cluster. + * + * @param resourceGroupName The name of the resource group. + * @param clusterName The name of the cluster. + * @param autoscale The autoscale configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginUpdateAutoScaleConfigurationWithServiceResponseAsync(String resourceGroupName, String clusterName, Autoscale autoscale) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(autoscale); + final String roleName = "workernode"; + AutoscaleConfigurationUpdateParameter parameters = new AutoscaleConfigurationUpdateParameter(); + parameters.withAutoscale(autoscale); + return service.beginUpdateAutoScaleConfiguration(this.client.subscriptionId(), resourceGroupName, clusterName, roleName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateAutoScaleConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateAutoScaleConfigurationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + /** * Lists all the HDInsight clusters under the subscription. * diff --git a/sdk/identity/azure-identity/CHANGELOG.md b/sdk/identity/azure-identity/CHANGELOG.md index 21bd86b15566..660f6942e3de 100644 --- a/sdk/identity/azure-identity/CHANGELOG.md +++ b/sdk/identity/azure-identity/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History ## 1.1.0-beta.7 (Unreleased) - +- Added support for web apps (confidential apps) for `InteractiveBrowserCredential` and `AuthorizationCodeCredential`. A client secret is required on the builder for web apps. +- Added support for user assigned managed identities for `DefaultAzureCredential` with `.managedIdentityClientId()`. ## 1.1.0-beta.6 (2020-07-10) - Added `.getCredentials()` method to `DefaultAzureCredential` and `ChainedTokenCredential` and added option `.addAll(Collection)` on `ChainedtokenCredentialBuilder`. diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index 2c4a37dad0f1..5e8272aacb51 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -11,32 +11,8 @@ The Azure Identity library provides Azure Active Directory token authentication [Source code][source] | [API reference documentation][javadoc] | [Azure Active Directory documentation][aad_doc] -## Table of contents -- [Getting started](#getting-started) - - [Adding the package to your project](#adding-the-package-to-your-project) - - [Prerequisites](#prerequisites) - - [Creating a Service Principal with the Azure CLI](#creating-a-service-principal-with-the-azure-cli) - - [Enable applications for device code flow](#enable-applications-for-device-code-flow) - - [Enable applications for interactive browser oauth 2 flow](#enable-applications-for-interactive-browser-oauth-2-flow) - - [Enable applications for oauth 2 auth code flow](#enable-applications-for-oauth-2-auth-code-flow) - - [Enable applications for shared token cache credential](#enable-applications-for-shared-token-cache-credential) - - [Key concepts](#key-concepts) - - [Credentials](#credentials) - - [DefaultAzureCredential](#defaultazurecredential) - - [Environment variables](#environment-variables) -- [Examples](#examples) - - [Authenticating with `DefaultAzureCredential`](#authenticating-with-defaultazurecredential) - - [Authenticating a service principal with a client secret](#authenticating-a-service-principal-with-a-client-secret) - - [Authenticating a user account with device code flow](#authenticating-a-user-account-with-device-code-flow) - - [Authenticating a user account with username and password](#authenticating-a-user-account-with-username-and-password) - - [Authenticating a user account with auth code flow](#authenticating-a-user-account-with-auth-code-flow) - - [Chaining credentials](#chaining-credentials) -- [Troubleshooting](#troubleshooting) -- [Next steps](#next-steps) -- [Contributing](#contributing) - ## Getting started -### Adding the package to your project +### Include the package Maven dependency for Azure Secret Client library. Add it to your project's pom file. @@ -45,7 +21,7 @@ Maven dependency for Azure Secret Client library. Add it to your project's pom f com.azure azure-identity - 1.0.7 + 1.0.9 ``` [//]: # ({x-version-update-end}) @@ -157,6 +133,14 @@ principal authentication with these environment variables: ## Examples +### Table of contents + - [Authenticating with `DefaultAzureCredential`](#authenticating-with-defaultazurecredential) + - [Authenticating a service principal with a client secret](#authenticating-a-service-principal-with-a-client-secret) + - [Authenticating a user account with device code flow](#authenticating-a-user-account-with-device-code-flow) + - [Authenticating a user account with username and password](#authenticating-a-user-account-with-username-and-password) + - [Authenticating a user account with auth code flow](#authenticating-a-user-account-with-auth-code-flow) + - [Chaining credentials](#chaining-credentials) + ### Authenticating with `DefaultAzureCredential` This example demonstrates authenticating the `SecretClient` from the [azure-security-keyvault-secrets][secrets_client_library] client library using the `DefaultAzureCredential`. There's also [a compilable sample](../../keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/IdentitySamples.java) to create a Key Vault secret client you can copy-paste. diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index 6ac3d50a97ec..f7fc80d0d1ec 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -32,12 +32,18 @@ com.microsoft.azure msal4j - 1.3.0 + 1.6.1 com.microsoft.azure msal4j-persistence-extension - 0.1 + 0.2.0 + + + org.slf4j + slf4j-log4j12 + + com.nimbusds @@ -116,9 +122,8 @@ - com.azure:* - com.microsoft.azure:msal4j:[1.3.0] - com.microsoft.azure:msal4j-persistence-extension:[0.1] + com.microsoft.azure:msal4j:[1.6.1] + com.microsoft.azure:msal4j-persistence-extension:[0.2.0] com.nimbusds:oauth2-oidc-sdk:[6.14] net.java.dev.jna:jna-platform:[5.4.0] org.linguafranca.pwdb:KeePassJava2:[2.1.4] diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthenticationRecord.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthenticationRecord.java index eea996212a2f..27b85edc8f37 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthenticationRecord.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthenticationRecord.java @@ -30,14 +30,18 @@ public class AuthenticationRecord { @JsonProperty("username") private String username; + @JsonProperty("clientId") + private String clientId; + AuthenticationRecord() { } - AuthenticationRecord(IAuthenticationResult authenticationResult, String tenantId) { + AuthenticationRecord(IAuthenticationResult authenticationResult, String tenantId, String clientId) { authority = authenticationResult.account().environment(); homeAccountId = authenticationResult.account().homeAccountId(); username = authenticationResult.account().username(); this.tenantId = tenantId; + this.clientId = clientId; } /** @@ -67,6 +71,15 @@ public String getTenantId() { return tenantId; } + /** + * Get the client id of the application used for authentication. + * + * @return the client id. + */ + public String getClientId() { + return clientId; + } + /** * Get the user principal name of the account. * @@ -82,14 +95,14 @@ public String getUsername() { * @param outputStream The {@link OutputStream} to which the serialized record will be written to. * @return A {@link Mono} containing {@link Void} */ - public Mono serialize(OutputStream outputStream) { + public Mono serialize(OutputStream outputStream) { return Mono.defer(() -> { try { OBJECT_MAPPER.writeValue(outputStream, this); } catch (IOException e) { return Mono.error(e); } - return Mono.empty(); + return Mono.just(outputStream); }); } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java index ded57921603c..aa2a7ff47401 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java @@ -34,16 +34,18 @@ public class AuthorizationCodeCredential implements TokenCredential { * Creates an AuthorizationCodeCredential with the given identity client options. * * @param clientId the client ID of the application + * @param clientSecret the client secret of the application * @param tenantId the tenant ID of the application * @param authCode the Oauth 2.0 authorization code grant * @param redirectUri the redirect URI used to authenticate to Azure Active Directory * @param identityClientOptions the options for configuring the identity client */ - AuthorizationCodeCredential(String clientId, String tenantId, String authCode, URI redirectUri, - IdentityClientOptions identityClientOptions) { + AuthorizationCodeCredential(String clientId, String clientSecret, String tenantId, String authCode, + URI redirectUri, IdentityClientOptions identityClientOptions) { identityClient = new IdentityClientBuilder() .tenantId(tenantId) .clientId(clientId) + .clientSecret(clientSecret) .identityClientOptions(identityClientOptions) .build(); this.cachedToken = new AtomicReference<>(); @@ -65,7 +67,7 @@ public Mono getToken(TokenRequestContext request) { .map(msalToken -> { cachedToken.set(new MsalAuthenticationAccount( new AuthenticationRecord(msalToken.getAuthenticationResult(), - identityClient.getTenantId()))); + identityClient.getTenantId(), identityClient.getClientId()))); return (AccessToken) msalToken; }) .doOnNext(token -> LoggingUtil.logTokenSuccess(logger, request)) diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java index c92e63932c07..a1350685a298 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java @@ -20,6 +20,7 @@ public class AuthorizationCodeCredentialBuilder extends AadCredentialBuilderBase private String authCode; private String redirectUrl; + private String clientSecret; /** * Sets the authorization code on the builder. @@ -48,27 +49,14 @@ public AuthorizationCodeCredentialBuilder redirectUrl(String redirectUrl) { } /** - * Sets whether to use an unprotected file specified by cacheFileLocation() instead of - * Gnome keyring on Linux. This is false by default. + * Sets the client secret for the authentication. This is required for AAD web apps. Do not set this for AAD native + * apps. * - * @param allowUnencryptedCache whether to use an unprotected file for cache storage. - * - * @return An updated instance of this builder with the unprotected token cache setting set as specified. - */ - public AuthorizationCodeCredentialBuilder allowUnencryptedCache(boolean allowUnencryptedCache) { - this.identityClientOptions.allowUnencryptedCache(allowUnencryptedCache); - return this; - } - - /** - * Sets whether to enable using the shared token cache. This is disabled by default. - * - * @param enabled whether to enabled using the shared token cache. - * - * @return An updated instance of this builder with if the shared token cache enabled specified. + * @param clientSecret the secret value of the AAD application. + * @return An updated instance of this builder. */ - public AuthorizationCodeCredentialBuilder enablePersistentCache(boolean enabled) { - this.identityClientOptions.enablePersistentCache(enabled); + public AuthorizationCodeCredentialBuilder clientSecret(String clientSecret) { + this.clientSecret = clientSecret; return this; } @@ -84,8 +72,8 @@ public AuthorizationCodeCredential build() { put("redirectUrl", redirectUrl); }}); try { - return new AuthorizationCodeCredential(clientId, tenantId, authCode, - new URI(redirectUrl), identityClientOptions); + return new AuthorizationCodeCredential(clientId, clientSecret, tenantId, authCode, new URI(redirectUrl), + identityClientOptions); } catch (URISyntaxException e) { throw logger.logExceptionAsError(new RuntimeException(e)); } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureAuthorityHosts.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureAuthorityHosts.java new file mode 100644 index 000000000000..42085d71fdd9 --- /dev/null +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureAuthorityHosts.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.identity; + +/** + * Defines fields exposing the well known authority hosts for the Azure Public Cloud and sovereign clouds. + */ +public final class AzureAuthorityHosts { + + private AzureAuthorityHosts() { } + + /** + * The host of the Azure Active Directory authority for tenants in the Azure Public Cloud. + */ + public static final String AZURE_PUBLIC_CLOUD = "https://login.microsoftonline.com/"; + + /** + * The host of the Azure Active Directory authority for tenants in the Azure China Cloud. + */ + public static final String AZURE_CHINA = "https://login.chinacloudapi.cn/"; + + /** + * The host of the Azure Active Directory authority for tenants in the Azure German Cloud. + */ + public static final String AZURE_GERMANY = "https://login.microsoftonline.de/"; + + /** + * The host of the Azure Active Directory authority for tenants in the Azure US Government Cloud. + */ + public static final String AZURE_GOVERNMENT = "https://login.microsoftonline.us/"; + + + static String getDefaultScope(String authorityHost) { + switch (authorityHost) { + case AZURE_PUBLIC_CLOUD: + return "https://management.core.windows.net//.default"; + case AZURE_CHINA: + return "https://management.core.chinacloudapi.cn//.default"; + case AZURE_GERMANY: + return "https://management.core.cloudapi.de//.default"; + case AZURE_GOVERNMENT: + return "https://management.core.usgovcloudapi.net//.default"; + default: + return null; + } + } +} diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java index ac36c7c6ac1a..4b2f8b65c4dd 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ChainedTokenCredential.java @@ -68,14 +68,4 @@ public Mono getToken(TokenRequestContext request) { return Mono.error(last); })); } - - - /** - * Get the read-only list of credentials sequentially used to attempt authentication. - * - * @return The list of {@link TokenCredential}. - */ - public List getCredentials() { - return credentials; - } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java index d606909a3690..fde02f002537 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java @@ -41,14 +41,25 @@ public ClientCertificateCredentialBuilder pfxCertificate(String certificatePath, } /** - * Sets whether to enable using the shared token cache. This is disabled by default. + * Allows to use an unprotected file specified by cacheFileLocation() instead of + * Gnome keyring on Linux. This is restricted by default. * - * @param enabled indicates whether to enable using the shared token cache. + * @return An updated instance of this builder. + */ + public ClientCertificateCredentialBuilder allowUnencryptedCache() { + this.identityClientOptions.allowUnencryptedCache(); + return this; + } + + /** + * Enables the shared token cache which is disabled by default. If enabled, the credential will store tokens + * in a cache persisted to the machine, protected to the current user, which can be shared by other credentials + * and processes. * * @return An updated instance of this builder. */ - public ClientCertificateCredentialBuilder enablePersistentCache(boolean enabled) { - this.identityClientOptions.enablePersistentCache(enabled); + public ClientCertificateCredentialBuilder enablePersistentCache() { + this.identityClientOptions.enablePersistentCache(); return this; } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java index a5382f140665..c16677b61bcd 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java @@ -26,14 +26,25 @@ public ClientSecretCredentialBuilder clientSecret(String clientSecret) { } /** - * Sets whether to enable using the shared token cache. This is disabled by default. + * Enables the shared token cache which is disabled by default. If enabled, the credential will store tokens + * in a cache persisted to the machine, protected to the current user, which can be shared by other credentials + * and processes. * - * @param enabled indicates whether to enable using the shared token cache. + * @return An updated instance of this builder. + */ + public ClientSecretCredentialBuilder enablePersistentCache() { + this.identityClientOptions.enablePersistentCache(); + return this; + } + + /** + * Allows to use an unprotected file specified by cacheFileLocation() instead of + * Gnome keyring on Linux. This is restricted by default. * * @return An updated instance of this builder. */ - public ClientSecretCredentialBuilder enablePersistentCache(boolean enabled) { - this.identityClientOptions.enablePersistentCache(enabled); + public ClientSecretCredentialBuilder allowUnencryptedCache() { + this.identityClientOptions.allowUnencryptedCache(); return this; } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java index b4693b16b088..5b9ee03d44d9 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java @@ -35,15 +35,4 @@ public final class DefaultAzureCredential extends ChainedTokenCredential { DefaultAzureCredential(List tokenCredentials) { super(tokenCredentials); } - - /** - * {@inheritDoc} - * The credentials in the returned list and their order may change in future versions of Identity. - * This API is not intended to be used in production ready code and should only be used for development purposes. - * - * @return The list of {@link TokenCredential}. - */ - public List getCredentials() { - return super.getCredentials(); - } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java index fbe9992ced9b..58534ec872c3 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java @@ -4,6 +4,7 @@ package com.azure.identity; import com.azure.core.credential.TokenCredential; +import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -18,11 +19,21 @@ */ public class DefaultAzureCredentialBuilder extends CredentialBuilderBase { private String tenantId; + private String managedIdentityClientId; private final ClientLogger logger = new ClientLogger(DefaultAzureCredentialBuilder.class); + /** + * Creates an instance of a DefaultAzureCredentialBuilder. + */ + public DefaultAzureCredentialBuilder() { + Configuration configuration = Configuration.getGlobalConfiguration().clone(); + tenantId = configuration.get(Configuration.PROPERTY_AZURE_TENANT_ID); + managedIdentityClientId = configuration.get(Configuration.PROPERTY_AZURE_CLIENT_ID); + } /** - * Sets the tenant id of the user to authenticate through the {@link DefaultAzureCredential}. The default is null + * Sets the tenant id of the user to authenticate through the {@link DefaultAzureCredential}. If unset, the value + * in the AZURE_TENANT_ID environment variable will be used. If neither is set, the default is null * and will authenticate users to their default tenant. * * @param tenantId the tenant ID to set. @@ -67,6 +78,19 @@ public DefaultAzureCredentialBuilder intelliJKeePassDatabasePath(String database return this; } + /** + * Specifies the client ID of user assigned or system assigned identity, when this credential is running + * in an environment with managed identities. If unset, the value in the AZURE_CLIENT_ID environment variable + * will be used. If neither is set, the default value is null and will only work with system assigned + * managed identities and not user assigned managed identities. + * + * @param clientId the client ID + * @return the DefaultAzureCredentialBuilder itself + */ + public DefaultAzureCredentialBuilder managedIdentityClientId(String clientId) { + this.managedIdentityClientId = clientId; + return this; + } /** * Specifies the ExecutorService to be used to execute the authentication requests. @@ -101,9 +125,9 @@ public DefaultAzureCredential build() { private ArrayList getCredentialsChain() { ArrayList output = new ArrayList(6); output.add(new EnvironmentCredential(identityClientOptions)); - output.add(new ManagedIdentityCredential(null, identityClientOptions)); + output.add(new ManagedIdentityCredential(managedIdentityClientId, identityClientOptions)); output.add(new SharedTokenCacheCredential(null, "04b07795-8ddb-461a-bbee-02f9e1bf7b46", - null, identityClientOptions)); + tenantId, identityClientOptions)); output.add(new IntelliJCredential(tenantId, identityClientOptions)); output.add(new VisualStudioCodeCredential(tenantId, identityClientOptions)); output.add(new AzureCliCredential(identityClientOptions)); diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java index 28935a696231..c4c74719d965 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java @@ -91,7 +91,7 @@ public Mono getToken(TokenRequestContext request) { * * @return The {@link AuthenticationRecord} which can be used to silently authenticate the account * on future execution if persistent caching was enabled via - * {@link DeviceCodeCredentialBuilder#enablePersistentCache(boolean)} when credential was instantiated. + * {@link DeviceCodeCredentialBuilder#enablePersistentCache()} when credential was instantiated. */ public Mono authenticate(TokenRequestContext request) { return Mono.defer(() -> identityClient.authenticateWithDeviceCode(request, challengeConsumer)) @@ -108,10 +108,10 @@ public Mono authenticate(TokenRequestContext request) { * * @return The {@link AuthenticationRecord} which can be used to silently authenticate the account * on future execution if persistent caching was enabled via - * {@link DeviceCodeCredentialBuilder#enablePersistentCache(boolean)} when credential was instantiated. + * {@link DeviceCodeCredentialBuilder#enablePersistentCache()} when credential was instantiated. */ public Mono authenticate() { - String defaultScope = KnownAuthorityHosts.getDefaultScope(authorityHost); + String defaultScope = AzureAuthorityHosts.getDefaultScope(authorityHost); if (defaultScope == null) { return Mono.error(logger.logExceptionAsError(new CredentialUnavailableException("Authenticating in this " + "environment requires specifying a TokenRequestContext."))); @@ -123,7 +123,7 @@ private AccessToken updateCache(MsalToken msalToken) { cachedToken.set( new MsalAuthenticationAccount( new AuthenticationRecord(msalToken.getAuthenticationResult(), - identityClient.getTenantId()))); + identityClient.getTenantId(), identityClient.getClientId()))); return msalToken; } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java index 3876940480b1..6dc62951b8a5 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java @@ -31,36 +31,34 @@ public DeviceCodeCredentialBuilder challengeConsumer( } /** - * Sets whether to use an unprotected file specified by cacheFileLocation() instead of - * Gnome keyring on Linux. This is false by default. + * Allows to use an unprotected file specified by cacheFileLocation() instead of + * Gnome keyring on Linux. This is restricted by default. * - * @param allowUnencryptedCache whether to use an unprotected file for cache storage. - * - * @return An updated instance of this builder with the unprotected token cache setting set as specified. + * @return An updated instance of this builder. */ - public DeviceCodeCredentialBuilder allowUnencryptedCache(boolean allowUnencryptedCache) { - this.identityClientOptions.allowUnencryptedCache(allowUnencryptedCache); + public DeviceCodeCredentialBuilder allowUnencryptedCache() { + this.identityClientOptions.allowUnencryptedCache(); return this; } /** - * Sets whether to enable using the shared token cache. This is disabled by default. - * - * @param enabled whether to enabled using the shared token cache. + * Enables the shared token cache which is disabled by default. If enabled, the credential will store tokens + * in a cache persisted to the machine, protected to the current user, which can be shared by other credentials + * and processes. * * @return An updated instance of this builder with if the shared token cache enabled specified. */ - public DeviceCodeCredentialBuilder enablePersistentCache(boolean enabled) { - this.identityClientOptions.enablePersistentCache(enabled); + public DeviceCodeCredentialBuilder enablePersistentCache() { + this.identityClientOptions.enablePersistentCache(); return this; } /** * Sets the {@link AuthenticationRecord} captured from a previous authentication. * - * @param authenticationRecord the authentication record to ser. + * @param authenticationRecord the authentication record to be configured. * - * @return An updated instance of this builder with if the shared token cache enabled specified. + * @return An updated instance of this builder with the configured authentication record. */ public DeviceCodeCredentialBuilder authenticationRecord(AuthenticationRecord authenticationRecord) { this.identityClientOptions.setAuthenticationRecord(authenticationRecord); diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java index bd6e8f9be7ba..aad793b2f5c6 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java @@ -91,7 +91,7 @@ public Mono getToken(TokenRequestContext request) { * * @return The {@link AuthenticationRecord} which can be used to silently authenticate the account * on future execution if persistent caching was enabled via - * {@link InteractiveBrowserCredentialBuilder#enablePersistentCache(boolean)} when credential was instantiated. + * {@link InteractiveBrowserCredentialBuilder#enablePersistentCache()} when credential was instantiated. */ public Mono authenticate(TokenRequestContext request) { return Mono.defer(() -> identityClient.authenticateWithBrowserInteraction(request, port)) @@ -104,10 +104,10 @@ public Mono authenticate(TokenRequestContext request) { * * @return The {@link AuthenticationRecord} which can be used to silently authenticate the account * on future execution if persistent caching was enabled via - * {@link InteractiveBrowserCredentialBuilder#enablePersistentCache(boolean)} when credential was instantiated. + * {@link InteractiveBrowserCredentialBuilder#enablePersistentCache()} when credential was instantiated. */ public Mono authenticate() { - String defaultScope = KnownAuthorityHosts.getDefaultScope(authorityHost); + String defaultScope = AzureAuthorityHosts.getDefaultScope(authorityHost); if (defaultScope == null) { return Mono.error(logger.logExceptionAsError(new CredentialUnavailableException("Authenticating in this " + "environment requires specifying a TokenRequestContext."))); @@ -119,7 +119,7 @@ private AccessToken updateCache(MsalToken msalToken) { cachedToken.set( new MsalAuthenticationAccount( new AuthenticationRecord(msalToken.getAuthenticationResult(), - identityClient.getTenantId()))); + identityClient.getTenantId(), identityClient.getClientId()))); return msalToken; } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java index b81d98d3c8e7..87b7982a4664 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java @@ -30,27 +30,25 @@ public InteractiveBrowserCredentialBuilder port(int port) { } /** - * Sets whether to use an unprotected file specified by cacheFileLocation() instead of - * Gnome keyring on Linux. This is false by default. + * Allows to use an unprotected file specified by cacheFileLocation() instead of + * Gnome keyring on Linux. This is restricted by default. * - * @param allowUnencryptedCache whether to use an unprotected file for cache storage. - * - * @return An updated instance of this builder with the unprotected token cache setting set as specified. + * @return An updated instance of this builder. */ - public InteractiveBrowserCredentialBuilder allowUnencryptedCache(boolean allowUnencryptedCache) { - this.identityClientOptions.allowUnencryptedCache(allowUnencryptedCache); + public InteractiveBrowserCredentialBuilder allowUnencryptedCache() { + this.identityClientOptions.allowUnencryptedCache(); return this; } /** - * Sets whether to enable using the shared token cache. This is disabled by default. - * - * @param enabled whether to enabled using the shared token cache. + * Enables the shared token cache which is disabled by default. If enabled, the credential will store tokens + * in a cache persisted to the machine, protected to the current user, which can be shared by other credentials + * and processes. * * @return An updated instance of this builder with if the shared token cache enabled specified. */ - public InteractiveBrowserCredentialBuilder enablePersistentCache(boolean enabled) { - this.identityClientOptions.enablePersistentCache(enabled); + public InteractiveBrowserCredentialBuilder enablePersistentCache() { + this.identityClientOptions.enablePersistentCache(); return this; } @@ -82,7 +80,6 @@ public InteractiveBrowserCredentialBuilder disableAutomaticAuthentication() { return this; } - /** * Creates a new {@link InteractiveBrowserCredential} with the current configurations. * @@ -94,6 +91,6 @@ public InteractiveBrowserCredential build() { put("port", port); }}); return new InteractiveBrowserCredential(clientId, tenantId, port, automaticAuthentication, - identityClientOptions); + identityClientOptions); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/KnownAuthorityHosts.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/KnownAuthorityHosts.java deleted file mode 100644 index deafcbc486b9..000000000000 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/KnownAuthorityHosts.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.identity; - -/** - * Defines fields exposing the well known authority hosts for the Azure Public Cloud and sovereign clouds. - */ -public final class KnownAuthorityHosts { - - private KnownAuthorityHosts() { } - - /** - * The host of the Azure Active Directory authority for tenants in the Azure Public Cloud. - */ - public static final String AZURE_CLOUD = "https://login.microsoftonline.com/"; - - /** - * The host of the Azure Active Directory authority for tenants in the Azure China Cloud. - */ - public static final String AZURE_CHINA_CLOUD = "https://login.chinacloudapi.cn/"; - - /** - * The host of the Azure Active Directory authority for tenants in the Azure German Cloud. - */ - public static final String AZURE_GERMAN_CLOUD = "https://login.microsoftonline.de/"; - - /** - * The host of the Azure Active Directory authority for tenants in the Azure US Government Cloud. - */ - public static final String AZURE_US_GOVERNMENT = "https://login.microsoftonline.us/"; - - - static String getDefaultScope(String authorityHost) { - switch (authorityHost) { - case AZURE_CLOUD: - return "https://management.core.windows.net//.default"; - case AZURE_CHINA_CLOUD: - return "https://management.core.chinacloudapi.cn//.default"; - case AZURE_GERMAN_CLOUD: - return "https://management.core.cloudapi.de//.default"; - case AZURE_US_GOVERNMENT: - return "https://management.core.usgovcloudapi.net//.default"; - default: - return null; - } - } -} diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java index 41bc18e14360..12a303b156a5 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredential.java @@ -11,6 +11,7 @@ import com.azure.identity.implementation.IdentityClient; import com.azure.identity.implementation.IdentityClientBuilder; import com.azure.identity.implementation.IdentityClientOptions; +import com.azure.identity.implementation.MsalAuthenticationAccount; import com.azure.identity.implementation.MsalToken; import com.azure.identity.implementation.util.LoggingUtil; import reactor.core.publisher.Mono; @@ -26,7 +27,8 @@ public class SharedTokenCacheCredential implements TokenCredential { private final String username; private final String clientId; private final String tenantId; - private final AtomicReference cachedToken; + private final AtomicReference cachedToken; + private final IdentityClient identityClient; private final ClientLogger logger = new ClientLogger(SharedTokenCacheCredential.class); @@ -65,6 +67,9 @@ public class SharedTokenCacheCredential implements TokenCredential { .identityClientOptions(identityClientOptions) .build(); this.cachedToken = new AtomicReference<>(); + if (identityClientOptions.getAuthenticationRecord() != null) { + cachedToken.set(new MsalAuthenticationAccount(identityClientOptions.getAuthenticationRecord())); + } LoggingUtil.logAvailableEnvironmentVariables(logger, configuration); } @@ -75,18 +80,23 @@ public class SharedTokenCacheCredential implements TokenCredential { public Mono getToken(TokenRequestContext request) { return Mono.defer(() -> { if (cachedToken.get() != null) { - return identityClient.authenticateWithPublicClientCache(request, cachedToken.get().getAccount()) + return identityClient.authenticateWithPublicClientCache(request, cachedToken.get()) .onErrorResume(t -> Mono.empty()); } else { return Mono.empty(); } }).switchIfEmpty( Mono.defer(() -> identityClient.authenticateWithSharedTokenCache(request, username))) - .map(msalToken -> { - cachedToken.set(msalToken); - return (AccessToken) msalToken; - }) + .map(this::updateCache) .doOnNext(token -> LoggingUtil.logTokenSuccess(logger, request)) .doOnError(error -> LoggingUtil.logTokenError(logger, request, error)); } + + private AccessToken updateCache(MsalToken msalToken) { + cachedToken.set( + new MsalAuthenticationAccount( + new AuthenticationRecord(msalToken.getAuthenticationResult(), + identityClient.getTenantId(), identityClient.getClientId()))); + return msalToken; + } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java index c12675635300..5c2f372b327a 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/SharedTokenCacheCredentialBuilder.java @@ -24,15 +24,25 @@ public SharedTokenCacheCredentialBuilder username(String username) { } /** - * Sets whether to use an unprotected file specified by cacheFileLocation() instead of - * Gnome keyring on Linux. This is false by default. + * Allows to use an unprotected file specified by cacheFileLocation() instead of + * Gnome keyring on Linux. This is restricted by default. * - * @param allowUnencryptedCache whether to use an unprotected file for cache storage. + * @return An updated instance of this builder. + */ + public SharedTokenCacheCredentialBuilder allowUnencryptedCache() { + this.identityClientOptions.allowUnencryptedCache(); + return this; + } + + /** + * Sets the {@link AuthenticationRecord} captured from a previous authentication. + * + * @param authenticationRecord the authentication record to be configured. * - * @return An updated instance of this builder with the unprotected token cache setting set as specified. + * @return An updated instance of this builder with the configured authentication record. */ - public SharedTokenCacheCredentialBuilder allowUnencryptedCache(boolean allowUnencryptedCache) { - this.identityClientOptions.allowUnencryptedCache(allowUnencryptedCache); + public SharedTokenCacheCredentialBuilder authenticationRecord(AuthenticationRecord authenticationRecord) { + this.identityClientOptions.setAuthenticationRecord(authenticationRecord); return this; } @@ -43,6 +53,6 @@ public SharedTokenCacheCredentialBuilder allowUnencryptedCache(boolean allowUnen */ public SharedTokenCacheCredential build() { return new SharedTokenCacheCredential(username, clientId, tenantId, - identityClientOptions.enablePersistentCache(true)); + identityClientOptions.enablePersistentCache()); } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java index 135cbef914f1..6c86dcc239dc 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java @@ -92,7 +92,7 @@ public Mono authenticate(TokenRequestContext request) { * @return The {@link AuthenticationRecord} of the authenticated account. */ public Mono authenticate() { - String defaultScope = KnownAuthorityHosts.getDefaultScope(authorityHost); + String defaultScope = AzureAuthorityHosts.getDefaultScope(authorityHost); if (defaultScope == null) { return Mono.error(logger.logExceptionAsError(new CredentialUnavailableException("Authenticating in this " + "environment requires specifying a TokenRequestContext."))); @@ -104,7 +104,7 @@ private AccessToken updateCache(MsalToken msalToken) { cachedToken.set( new MsalAuthenticationAccount( new AuthenticationRecord(msalToken.getAuthenticationResult(), - identityClient.getTenantId()))); + identityClient.getTenantId(), identityClient.getClientId()))); return msalToken; } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java index d1204b6bc8f4..03ff436cbb40 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java @@ -37,27 +37,25 @@ public UsernamePasswordCredentialBuilder password(String password) { } /** - * Sets whether to use an unprotected file specified by cacheFileLocation() instead of - * Gnome keyring on Linux. This is false by default. + * Allows to use an unprotected file specified by cacheFileLocation() instead of + * Gnome keyring on Linux. This is restricted by default. * - * @param allowUnencryptedCache whether to use an unprotected file for cache storage. - * - * @return An updated instance of this builder with the unprotected token cache setting set as specified. + * @return An updated instance of this builder. */ - public UsernamePasswordCredentialBuilder allowUnencryptedCache(boolean allowUnencryptedCache) { - this.identityClientOptions.allowUnencryptedCache(allowUnencryptedCache); + public UsernamePasswordCredentialBuilder allowUnencryptedCache() { + this.identityClientOptions.allowUnencryptedCache(); return this; } /** - * Sets whether to enable using the shared token cache. This is disabled by default. - * - * @param enabled whether to enabled using the shared token cache. + * Enables the shared token cache which is disabled by default. If enabled, the credential will store tokens + * in a cache persisted to the machine, protected to the current user, which can be shared by other credentials + * and processes. * * @return An updated instance of this builder with if the shared token cache enabled specified. */ - public UsernamePasswordCredentialBuilder enablePersistentCache(boolean enabled) { - this.identityClientOptions.enablePersistentCache(enabled); + public UsernamePasswordCredentialBuilder enablePersistentCache() { + this.identityClientOptions.enablePersistentCache(); return this; } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/HttpPipelineAdapter.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/HttpPipelineAdapter.java index 5621bc018299..39647fb5acdc 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/HttpPipelineAdapter.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/HttpPipelineAdapter.java @@ -44,7 +44,7 @@ public IHttpResponse send(HttpRequest httpRequest) throws Exception { com.microsoft.aad.msal4j.HttpResponse httpResponse = new com.microsoft.aad.msal4j.HttpResponse() .body(body) .statusCode(response.getStatusCode()); - httpResponse.headers(response.getHeaders().stream().collect(Collectors.toMap(HttpHeader::getName, + httpResponse.addHeaders(response.getHeaders().stream().collect(Collectors.toMap(HttpHeader::getName, h -> Collections.singletonList(h.getValue())))); return httpResponse; }) @@ -52,7 +52,7 @@ public IHttpResponse send(HttpRequest httpRequest) throws Exception { .switchIfEmpty(Mono.defer(() -> { com.microsoft.aad.msal4j.HttpResponse httpResponse = new com.microsoft.aad.msal4j.HttpResponse() .statusCode(response.getStatusCode()); - httpResponse.headers(response.getHeaders().stream().collect(Collectors.toMap(HttpHeader::getName, + httpResponse.addHeaders(response.getHeaders().stream().collect(Collectors.toMap(HttpHeader::getName, h -> Collections.singletonList(h.getValue())))); return Mono.just(httpResponse); }))) diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java index 660c6ad0daec..65d649be92fc 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java @@ -549,13 +549,19 @@ public Mono authenticateWithVsCodeCredential(TokenRequestContext requ */ public Mono authenticateWithAuthorizationCode(TokenRequestContext request, String authorizationCode, URI redirectUrl) { - return publicClientApplicationAccessor.getValue() - .flatMap(pc -> Mono.fromFuture(() -> pc.acquireToken( - AuthorizationCodeParameters.builder(authorizationCode, redirectUrl) - .scopes(new HashSet<>(request.getScopes())) - .build())) - .onErrorMap(t -> new ClientAuthenticationException("Failed to acquire token with authorization code", - null, t)).map(MsalToken::new)); + AuthorizationCodeParameters parameters = AuthorizationCodeParameters.builder(authorizationCode, redirectUrl) + .scopes(new HashSet<>(request.getScopes())) + .build(); + Mono acquireToken; + if (clientSecret != null) { + acquireToken = confidentialClientApplicationAccessor.getValue() + .flatMap(pc -> Mono.fromFuture(() -> pc.acquireToken(parameters))); + } else { + acquireToken = publicClientApplicationAccessor.getValue() + .flatMap(pc -> Mono.fromFuture(() -> pc.acquireToken(parameters))); + } + return acquireToken.onErrorMap(t -> new ClientAuthenticationException( + "Failed to acquire token with authorization code", null, t)).map(MsalToken::new); } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientBuilder.java index 54a1b97be05f..672e890d8e37 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientBuilder.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientBuilder.java @@ -71,7 +71,6 @@ public IdentityClientBuilder certificatePassword(String certificatePassword) { return this; } - /** * Sets the options for the client. * @param identityClientOptions the options for the client. diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientOptions.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientOptions.java index bb09787b4ae8..25462ac68d3c 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientOptions.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientOptions.java @@ -8,7 +8,7 @@ import com.azure.core.http.ProxyOptions; import com.azure.core.util.Configuration; import com.azure.identity.AuthenticationRecord; -import com.azure.identity.KnownAuthorityHosts; +import com.azure.identity.AzureAuthorityHosts; import com.microsoft.aad.msal4jextensions.PersistenceSettings; import com.sun.jna.Platform; @@ -56,11 +56,10 @@ public final class IdentityClientOptions { */ public IdentityClientOptions() { Configuration configuration = Configuration.getGlobalConfiguration(); - authorityHost = configuration.get(Configuration.PROPERTY_AZURE_AUTHORITY_HOST, KnownAuthorityHosts.AZURE_CLOUD); + authorityHost = configuration.get(Configuration.PROPERTY_AZURE_AUTHORITY_HOST, + AzureAuthorityHosts.AZURE_PUBLIC_CLOUD); maxRetry = MAX_RETRY_DEFAULT_LIMIT; retryTimeout = i -> Duration.ofSeconds((long) Math.pow(2, i.getSeconds() - 1)); - allowUnencryptedCache = false; - sharedTokenCacheEnabled = false; } /** @@ -211,16 +210,15 @@ PersistenceSettings getConfidentialClientPersistenceSettings() { .build(); } + /** - * Sets whether to use an unprotected file specified by cacheFileLocation() instead of - * Gnome keyring on Linux. This is false by default. - * - * @param allowUnencryptedCache whether to use an unprotected file for cache storage. + * Allows to use an unprotected file specified by cacheFileLocation() instead of + * Gnome keyring on Linux. This is restricted by default. * * @return The updated identity client options. */ - public IdentityClientOptions allowUnencryptedCache(boolean allowUnencryptedCache) { - this.allowUnencryptedCache = allowUnencryptedCache; + public IdentityClientOptions allowUnencryptedCache() { + this.allowUnencryptedCache = true; return this; } @@ -243,14 +241,14 @@ public boolean isSharedTokenCacheEnabled() { } /** - * Sets whether to enable using the shared token cache. This is disabled by default. - * - * @param enabled whether to enable using the shared token cache. + * Enables the shared token cache which is disabled by default. If enabled, the client will store tokens + * in a cache persisted to the machine, protected to the current user, which can be shared by other credentials + * and processes. * * @return The updated identity client options. */ - public IdentityClientOptions enablePersistentCache(boolean enabled) { - this.sharedTokenCacheEnabled = enabled; + public IdentityClientOptions enablePersistentCache() { + this.sharedTokenCacheEnabled = true; return this; } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IntelliJCacheAccessor.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IntelliJCacheAccessor.java index 32c95c8971c3..5fb52a754c38 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IntelliJCacheAccessor.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IntelliJCacheAccessor.java @@ -6,7 +6,7 @@ import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.identity.CredentialUnavailableException; -import com.azure.identity.KnownAuthorityHosts; +import com.azure.identity.AzureAuthorityHosts; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.microsoft.aad.msal4jextensions.persistence.mac.KeyChainAccessor; @@ -217,15 +217,15 @@ public String getAzureAuthHost(String azureEnvironment) { switch (azureEnvironment) { case "GLOBAL": - return KnownAuthorityHosts.AZURE_CLOUD; + return AzureAuthorityHosts.AZURE_PUBLIC_CLOUD; case "CHINA": - return KnownAuthorityHosts.AZURE_CHINA_CLOUD; + return AzureAuthorityHosts.AZURE_CHINA; case "GERMAN": - return KnownAuthorityHosts.AZURE_GERMAN_CLOUD; + return AzureAuthorityHosts.AZURE_GERMANY; case "US_GOVERNMENT": - return KnownAuthorityHosts.AZURE_US_GOVERNMENT; + return AzureAuthorityHosts.AZURE_GOVERNMENT; default: - return KnownAuthorityHosts.AZURE_CLOUD; + return AzureAuthorityHosts.AZURE_PUBLIC_CLOUD; } } diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/VisualStudioCacheAccessor.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/VisualStudioCacheAccessor.java index 82ca15b48bbf..759e83a2e815 100644 --- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/VisualStudioCacheAccessor.java +++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/VisualStudioCacheAccessor.java @@ -6,7 +6,7 @@ import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.identity.CredentialUnavailableException; -import com.azure.identity.KnownAuthorityHosts; +import com.azure.identity.AzureAuthorityHosts; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.microsoft.aad.msal4jextensions.persistence.mac.KeyChainAccessor; @@ -161,15 +161,15 @@ public String getAzureAuthHost(String cloud) { switch (cloud) { case "Azure": - return KnownAuthorityHosts.AZURE_CLOUD; + return AzureAuthorityHosts.AZURE_PUBLIC_CLOUD; case "AzureChina": - return KnownAuthorityHosts.AZURE_CHINA_CLOUD; + return AzureAuthorityHosts.AZURE_CHINA; case "AzureGermanCloud": - return KnownAuthorityHosts.AZURE_GERMAN_CLOUD; + return AzureAuthorityHosts.AZURE_GERMANY; case "AzureUSGovernment": - return KnownAuthorityHosts.AZURE_US_GOVERNMENT; + return AzureAuthorityHosts.AZURE_GOVERNMENT; default: - return KnownAuthorityHosts.AZURE_CLOUD; + return AzureAuthorityHosts.AZURE_PUBLIC_CLOUD; } } diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java index 21657842b1bc..e5d3dbd1a971 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/DefaultAzureCredentialTest.java @@ -56,9 +56,9 @@ public void testUseEnvironmentCredential() throws Exception { IntelliJCredential intelliJCredential = PowerMockito.mock(IntelliJCredential.class); when(intelliJCredential.getToken(request1)) - .thenReturn(Mono.empty()); + .thenReturn(Mono.empty()); PowerMockito.whenNew(IntelliJCredential.class).withAnyArguments() - .thenReturn(intelliJCredential); + .thenReturn(intelliJCredential); // test DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build(); @@ -88,9 +88,9 @@ public void testUseManagedIdentityCredential() throws Exception { IntelliJCredential intelliJCredential = PowerMockito.mock(IntelliJCredential.class); when(intelliJCredential.getToken(request)) - .thenReturn(Mono.empty()); + .thenReturn(Mono.empty()); PowerMockito.whenNew(IntelliJCredential.class).withAnyArguments() - .thenReturn(intelliJCredential); + .thenReturn(intelliJCredential); // test DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build(); @@ -110,9 +110,9 @@ public void testUseAzureCliCredential() throws Exception { // mock IntelliJCredential intelliJCredential = PowerMockito.mock(IntelliJCredential.class); when(intelliJCredential.getToken(request)) - .thenReturn(Mono.empty()); + .thenReturn(Mono.empty()); PowerMockito.whenNew(IntelliJCredential.class).withAnyArguments() - .thenReturn(intelliJCredential); + .thenReturn(intelliJCredential); IdentityClient identityClient = PowerMockito.mock(IdentityClient.class); when(identityClient.authenticateWithAzureCli(request)).thenReturn(TestUtils.getMockAccessToken(token1, expiresAt)); @@ -156,22 +156,22 @@ public void testNoCredentialWorks() throws Exception { IntelliJCredential intelliJCredential = PowerMockito.mock(IntelliJCredential.class); when(intelliJCredential.getToken(request)) - .thenReturn(Mono.error( - new CredentialUnavailableException("Cannot get token from IntelliJ Credential"))); + .thenReturn(Mono.error( + new CredentialUnavailableException("Cannot get token from IntelliJ Credential"))); PowerMockito.whenNew(IntelliJCredential.class).withAnyArguments() - .thenReturn(intelliJCredential); + .thenReturn(intelliJCredential); VisualStudioCodeCredential vscodeCredential = PowerMockito.mock(VisualStudioCodeCredential.class); when(vscodeCredential.getToken(request)) - .thenReturn(Mono.error(new CredentialUnavailableException("Cannot get token from VS Code credential"))); + .thenReturn(Mono.error(new CredentialUnavailableException("Cannot get token from VS Code credential"))); PowerMockito.whenNew(VisualStudioCodeCredential.class).withAnyArguments() - .thenReturn(vscodeCredential); + .thenReturn(vscodeCredential); // test DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build(); StepVerifier.create(credential.getToken(request)) .expectErrorMatches(t -> t instanceof CredentialUnavailableException && t.getMessage() - .startsWith("EnvironmentCredential authentication unavailable. ")) + .startsWith("EnvironmentCredential authentication unavailable. ")) .verify(); } @@ -190,22 +190,22 @@ public void testCredentialUnavailable() throws Exception { IntelliJCredential intelliJCredential = PowerMockito.mock(IntelliJCredential.class); when(intelliJCredential.getToken(request)) - .thenReturn(Mono.error( - new CredentialUnavailableException("Cannot get token from IntelliJ Credential"))); + .thenReturn(Mono.error( + new CredentialUnavailableException("Cannot get token from IntelliJ Credential"))); PowerMockito.whenNew(IntelliJCredential.class).withAnyArguments() - .thenReturn(intelliJCredential); + .thenReturn(intelliJCredential); VisualStudioCodeCredential vscodeCredential = PowerMockito.mock(VisualStudioCodeCredential.class); when(vscodeCredential.getToken(request)) - .thenReturn(Mono.error(new CredentialUnavailableException("Cannot get token from VS Code credential"))); + .thenReturn(Mono.error(new CredentialUnavailableException("Cannot get token from VS Code credential"))); PowerMockito.whenNew(VisualStudioCodeCredential.class).withAnyArguments() - .thenReturn(vscodeCredential); + .thenReturn(vscodeCredential); // test DefaultAzureCredential credential = new DefaultAzureCredentialBuilder() - .build(); + .build(); StepVerifier.create(credential.getToken(request)) .expectErrorMatches(t -> t instanceof CredentialUnavailableException && t.getMessage() - .startsWith("EnvironmentCredential authentication unavailable. ")) + .startsWith("EnvironmentCredential authentication unavailable. ")) .verify(); } } diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java index afec805e3c62..fb0e48f62d19 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/implementation/IdentityClientTests.java @@ -247,7 +247,7 @@ public void testAuthorizationCodeFlow() throws Exception { IdentityClient client = new IdentityClientBuilder().tenantId(tenantId).clientId(clientId).identityClientOptions(options).build(); StepVerifier.create(client.authenticateWithAuthorizationCode(request, authCode1, redirectUri)) .expectNextMatches(accessToken -> token1.equals(accessToken.getToken()) - && expiresAt.getSecond() == accessToken.getExpiresAt().getSecond()) + && expiresAt.getSecond() == accessToken.getExpiresAt().getSecond()) .verifyComplete(); } @@ -267,7 +267,7 @@ public void testUserRefreshTokenflow() throws Exception { IdentityClient client = new IdentityClientBuilder().tenantId(tenantId).clientId(clientId).identityClientOptions(options).build(); StepVerifier.create(client.authenticateWithPublicClientCache(request2, TestUtils.getMockMsalAccount(token1, expiresAt).block())) .expectNextMatches(accessToken -> token2.equals(accessToken.getToken()) - && expiresAt.getSecond() == accessToken.getExpiresAt().getSecond()) + && expiresAt.getSecond() == accessToken.getExpiresAt().getSecond()) .verifyComplete(); } @@ -288,7 +288,7 @@ public void testUsernamePasswordCodeFlow() throws Exception { IdentityClient client = new IdentityClientBuilder().tenantId(tenantId).clientId(clientId).identityClientOptions(options).build(); StepVerifier.create(client.authenticateWithUsernamePassword(request, username, password)) .expectNextMatches(accessToken -> token.equals(accessToken.getToken()) - && expiresOn.getSecond() == accessToken.getExpiresAt().getSecond()) + && expiresOn.getSecond() == accessToken.getExpiresAt().getSecond()) .verifyComplete(); } @@ -310,7 +310,7 @@ public void testBrowserAuthenicationCodeFlow() throws Exception { IdentityClient client = new IdentityClientBuilder().tenantId(tenantId).clientId(clientId).identityClientOptions(options).build(); StepVerifier.create(client.authenticateWithBrowserInteraction(request, 4567)) .expectNextMatches(accessToken -> token.equals(accessToken.getToken()) - && expiresOn.getSecond() == accessToken.getExpiresAt().getSecond()) + && expiresOn.getSecond() == accessToken.getExpiresAt().getSecond()) .verifyComplete(); } diff --git a/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md index 7acb8f1116a3..fa6c23d0a482 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md @@ -1,8 +1,11 @@ # Release History -## 4.1.0-beta.4 (Unreleased) +## 4.1.0-beta.5 (Unreleased) +## 4.1.0-beta.4 (2020-07-08) +- Updated versions for azure-core, azure-identity. + ## 4.1.0-beta.3 (2020-06-10) - Updated version for azure-core, azure-identity and external dependencies. diff --git a/sdk/keyvault/azure-security-keyvault-certificates/README.md b/sdk/keyvault/azure-security-keyvault-certificates/README.md index 9f03fe41d6dd..7d022c00304c 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/README.md +++ b/sdk/keyvault/azure-security-keyvault-certificates/README.md @@ -14,7 +14,7 @@ Maven dependency for the Azure Key Vault Certificate client library. Add it to y com.azure azure-security-keyvault-certificates - 4.0.4 + 4.0.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml index 48c366d6c466..006192230d1f 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml @@ -12,7 +12,7 @@ com.azure azure-security-keyvault-certificates - 4.1.0-beta.4 + 4.1.0-beta.5 Microsoft Azure client library for KeyVault Certificates This module contains client library for Microsoft Azure KeyVault Certificates. @@ -98,7 +98,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md index fdf6f0750716..b771838f69f3 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md @@ -1,8 +1,11 @@ # Release History -## 4.2.0-beta.5 (Unreleased) +## 4.2.0-beta.6 (Unreleased) +## 4.2.0-beta.5 (2020-07-08) +- Updated versions for azure-core, azure-identity. + ## 4.2.0-beta.4 (2020-06-10) - Updated version for azure-core, azure-identity and external dependencies. - `404` responses from `listPropertiesOfKeyVersions` in `KeyAsyncClient` and `KeyClient` now throw a `ResourceNotFoundException`. diff --git a/sdk/keyvault/azure-security-keyvault-keys/README.md b/sdk/keyvault/azure-security-keyvault-keys/README.md index d49459cf014f..43189ca7f232 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/README.md +++ b/sdk/keyvault/azure-security-keyvault-keys/README.md @@ -14,7 +14,7 @@ Maven dependency for the Azure Key Vault Key client library. Add it to your proj com.azure azure-security-keyvault-keys - 4.1.4 + 4.1.5 ``` [//]: # ({x-version-update-end}) @@ -255,7 +255,7 @@ The following sections provide several code snippets covering some of the most c - [Update an existing key asynchronously](#update-an-existing-key-asynchronously) - [Delete a key asynchronously](#delete-a-key-asynchronously) - [List keys asynchronously](#list-keys-asynchronously) -- [Encrypt asynchronously](#encryp-asynchronously) +- [Encrypt asynchronously](#encrypt-asynchronously) - [Decrypt asynchronously](#decrypt-asynchronously) > Note : You should add `System.in.read()` or `Thread.sleep()` after the function calls in the main class/thread to allow async functions/operations to execute and finish before the main application/thread exits. diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml index 0d2217e1c40b..613c06807692 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-keys/pom.xml @@ -14,7 +14,7 @@ com.azure azure-security-keyvault-keys - 4.2.0-beta.5 + 4.2.0-beta.6 Microsoft Azure client library for KeyVault Keys This module contains client library for Microsoft Azure KeyVault Keys. @@ -105,7 +105,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/LocalKeyCryptographyClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/LocalKeyCryptographyClient.java index a38f935b7c0b..281d40cf5bb5 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/LocalKeyCryptographyClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/LocalKeyCryptographyClient.java @@ -17,7 +17,7 @@ import reactor.core.publisher.Mono; abstract class LocalKeyCryptographyClient { - CryptographyServiceClient serviceClient; + final CryptographyServiceClient serviceClient; LocalKeyCryptographyClient(CryptographyServiceClient serviceClient) { this.serviceClient = serviceClient; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyWrapAlgorithm.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyWrapAlgorithm.java index 940b04bd9593..5c387443778a 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyWrapAlgorithm.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/KeyWrapAlgorithm.java @@ -15,27 +15,27 @@ public final class KeyWrapAlgorithm extends ExpandableStringEnum { /** - * Static value Encrypt for KeyWrapAlgorithm. + * Static value RSA-OAEP for KeyWrapAlgorithm. */ public static final KeyWrapAlgorithm RSA_OAEP = fromString("RSA-OAEP"); /** - * Static value Decrypt for KeyWrapAlgorithm. + * Static value RSA-OAEP-256 for KeyWrapAlgorithm. */ public static final KeyWrapAlgorithm RSA_OAEP_256 = fromString("RSA-OAEP-256"); /** - * Static value Sign for KeyWrapAlgorithm. + * Static value RSA1_5 for KeyWrapAlgorithm. */ public static final KeyWrapAlgorithm RSA1_5 = fromString("RSA1_5"); /** - * Static value Verify for KeyWrapAlgorithm. + * Static value A192KW for KeyWrapAlgorithm. */ public static final KeyWrapAlgorithm A192KW = fromString("A192KW"); /** - * Static value Wrap Key for KeyWrapAlgorithm. + * Static value A128KW for KeyWrapAlgorithm. */ public static final KeyWrapAlgorithm A128KW = fromString("A128KW"); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/SignatureAlgorithm.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/SignatureAlgorithm.java index 07801352dcb0..1994403a287e 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/SignatureAlgorithm.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/models/SignatureAlgorithm.java @@ -15,52 +15,52 @@ public final class SignatureAlgorithm extends ExpandableStringEnum { /** - * Static value RSA_OAEP for SignatureAlgorithm. + * Static value PS256 for SignatureAlgorithm. */ public static final SignatureAlgorithm PS256 = fromString("PS256"); /** - * Static value RSA_OAEP_256 for SignatureAlgorithm. + * Static value PS384 for SignatureAlgorithm. */ public static final SignatureAlgorithm PS384 = fromString("PS384"); /** - * Static value RSA1_5 for SignatureAlgorithm. + * Static value PS512 for SignatureAlgorithm. */ public static final SignatureAlgorithm PS512 = fromString("PS512"); /** - * Static value A256CBC_HS512 for SignatureAlgorithm. + * Static value RS256 for SignatureAlgorithm. */ public static final SignatureAlgorithm RS256 = fromString("RS256"); /** - * Static value A128CBC_HS256 for SignatureAlgorithm. + * Static value RS384 for SignatureAlgorithm. */ public static final SignatureAlgorithm RS384 = fromString("RS384"); /** - * Static value A192CBC_HS384 for SignatureAlgorithm. + * Static value RS512 for SignatureAlgorithm. */ public static final SignatureAlgorithm RS512 = fromString("RS512"); /** - * Static value A256CBC for SignatureAlgorithm. + * Static value ES256 for SignatureAlgorithm. */ public static final SignatureAlgorithm ES256 = fromString("ES256"); /** - * Static value A192CBC for SignatureAlgorithm. + * Static value ES384 for SignatureAlgorithm. */ public static final SignatureAlgorithm ES384 = fromString("ES384"); /** - * Static value A128CBC for SignatureAlgorithm. + * Static value ES512 for SignatureAlgorithm. */ public static final SignatureAlgorithm ES512 = fromString("ES512"); /** - * Static value A128CBC for SignatureAlgorithm. + * Static value ES256K for SignatureAlgorithm. */ public static final SignatureAlgorithm ES256K = fromString("ES256K"); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateEcKeyOptions.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateEcKeyOptions.java index 4f112ed80a29..b378e4dff22e 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateEcKeyOptions.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateEcKeyOptions.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import java.time.OffsetDateTime; -import java.util.Arrays; import java.util.Map; /** @@ -30,8 +29,7 @@ public class CreateEcKeyOptions extends CreateKeyOptions { * @param name The name of the Ec key. */ public CreateEcKeyOptions(String name) { - super.name = name; - this.keyType = KeyType.EC; + super(name, KeyType.EC); } /** @@ -62,7 +60,7 @@ public CreateEcKeyOptions setCurveName(KeyCurveName curveName) { */ @Override public CreateEcKeyOptions setKeyOperations(KeyOperation... keyOperations) { - this.keyOperations = Arrays.asList(keyOperations); + super.setKeyOperations(keyOperations); return this; } @@ -121,7 +119,8 @@ public CreateEcKeyOptions setEnabled(Boolean enabled) { */ public CreateEcKeyOptions setHardwareProtected(Boolean hardwareProtected) { this.hardwareProtected = hardwareProtected; - this.keyType = hardwareProtected ? KeyType.EC_HSM : KeyType.EC; + KeyType keyType = hardwareProtected ? KeyType.EC_HSM : KeyType.EC; + setKeyType(keyType); return this; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateKeyOptions.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateKeyOptions.java index bd9340ce910e..6ef9e52226e4 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateKeyOptions.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateKeyOptions.java @@ -15,11 +15,20 @@ */ @Fluent public class CreateKeyOptions { + /** + * The key name. + */ + private final String name; /** - * Determines whether the object is enabled. + * The type of the key. */ - private Boolean enabled; + private KeyType keyType; + + /** + * The key operations. + */ + private List keyOperations; /** * Not before date in UTC. @@ -37,21 +46,9 @@ public class CreateKeyOptions { private Map tags; /** - * The type of the key. - */ - KeyType keyType; - - /** - * The key operations. - */ - List keyOperations; - - /** - * The key name. + * Determines whether the object is enabled. */ - String name; - - CreateKeyOptions() { } + private Boolean enabled; /** * Creates instance of KeyCreateOptions with {@code name} as key name and {@code keyType} as type of the key. @@ -92,6 +89,10 @@ public KeyType getKeyType() { return this.keyType; } + void setKeyType(KeyType keyType) { + this.keyType = keyType; + } + /** * Set the {@link OffsetDateTime notBefore} UTC time. * diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateRsaKeyOptions.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateRsaKeyOptions.java index d0c10f2f86af..d563c796a6c8 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateRsaKeyOptions.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/CreateRsaKeyOptions.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import java.time.OffsetDateTime; -import java.util.Arrays; import java.util.Map; /** @@ -30,8 +29,7 @@ public class CreateRsaKeyOptions extends CreateKeyOptions { * @param name The name of the key. */ public CreateRsaKeyOptions(String name) { - super.name = name; - this.keyType = KeyType.RSA; + super(name, KeyType.RSA); } /** @@ -62,7 +60,7 @@ public CreateRsaKeyOptions setKeySize(Integer keySize) { */ @Override public CreateRsaKeyOptions setKeyOperations(KeyOperation... keyOperations) { - this.keyOperations = Arrays.asList(keyOperations); + super.setKeyOperations(keyOperations); return this; } @@ -120,7 +118,8 @@ public CreateRsaKeyOptions setEnabled(Boolean enabled) { */ public CreateRsaKeyOptions setHardwareProtected(Boolean hardwareProtected) { this.hardwareProtected = hardwareProtected; - this.keyType = hardwareProtected ? KeyType.RSA_HSM : KeyType.RSA; + KeyType keyType = hardwareProtected ? KeyType.RSA_HSM : KeyType.RSA; + setKeyType(keyType); return this; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyType.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyType.java index 98b8c7864422..5f8ee90add43 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyType.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyType.java @@ -15,27 +15,27 @@ public final class KeyType extends ExpandableStringEnum { /** - * Static value Encrypt for KeyType. + * Static value EC for KeyType. */ public static final KeyType EC = fromString("EC"); /** - * Static value Decrypt for KeyType. + * Static value EC-HSM for KeyType. */ public static final KeyType EC_HSM = fromString("EC-HSM"); /** - * Static value Sign for KeyType. + * Static value RSA for KeyType. */ public static final KeyType RSA = fromString("RSA"); /** - * Static value Verify for KeyType. + * Static value RSA-HSM for KeyType. */ public static final KeyType RSA_HSM = fromString("RSA-HSM"); /** - * Static value Wrap Key for KeyType. + * Static value oct for KeyType. */ public static final KeyType OCT = fromString("oct"); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java index b056f7e71408..e01a950bd606 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyAsyncClientJavaDocCodeSnippets.java @@ -43,8 +43,8 @@ public KeyAsyncClient createAsyncClientWithHttpClient() { // BEGIN: com.azure.security.keyvault.keys.async.keyclient.withhttpclient.instantiation KeyAsyncClient keyAsyncClient = new KeyClientBuilder() .vaultUrl("https://myvault.azure.net/") + .credential(new DefaultAzureCredentialBuilder().build()) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) - .addPolicy(new KeyVaultCredentialPolicy(new DefaultAzureCredentialBuilder().build())) .httpClient(HttpClient.createDefault()) .buildAsyncClient(); // END: com.azure.security.keyvault.keys.async.keyclient.withhttpclient.instantiation diff --git a/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md index c156c114f55f..229d9f0e758a 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md @@ -1,8 +1,11 @@ # Release History -## 4.2.0-beta.4 (Unreleased) +## 4.2.0-beta.5 (Unreleased) +## 4.2.0-beta.4 (2020-07-08) +- Updated versions for azure-core, azure-identity. + ## 4.2.0-beta.3 (2020-06-10) - Updated version for azure-core, azure-identity and external dependencies. - Fixed `ByteBuf` resource leak in `KeyVaultCredentialPolicy`. diff --git a/sdk/keyvault/azure-security-keyvault-secrets/README.md b/sdk/keyvault/azure-security-keyvault-secrets/README.md index 5db0ab17b401..b67f216d0cb1 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-security-keyvault-secrets/README.md @@ -16,7 +16,7 @@ Maven dependency for the Azure Key Vault Secrets client library. Add it to your com.azure azure-security-keyvault-secrets - 4.1.4 + 4.1.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml index b16e36c6eaba..1873438c8d05 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml @@ -11,7 +11,7 @@ com.azure azure-security-keyvault-secrets - 4.2.0-beta.4 + 4.2.0-beta.5 Microsoft Azure client library for KeyVault Secrets This module contains client library for Microsoft Azure KeyVault Secrets. @@ -105,7 +105,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java index b8b35ddbe700..fbbb24f59092 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/samples/java/com/azure/security/keyvault/secrets/SecretClientJavaDocCodeSnippets.java @@ -26,6 +26,21 @@ public final class SecretClientJavaDocCodeSnippets { private String value1 = "val1"; private String value2 = "val2"; + /** + * Implementation for sync SecretClient + * @return sync SecretClient + */ + private SecretClient getSecretClient() { + // BEGIN: com.azure.security.keyvault.secretclient.sync.construct + SecretClient secretClient = new SecretClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .vaultUrl("https://myvault.vault.azure.net/") + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + .buildClient(); + // END: com.azure.security.keyvault.secretclient.sync.construct + return secretClient; + } + /** * Method to insert code snippets for {@link SecretClient#getSecret(String, String)} */ @@ -369,28 +384,4 @@ public void listSecretVersionsCodeSnippets() { }); // END: com.azure.security.keyvault.secretclient.listSecretVersions#string-Context-iterableByPage } - - /** - * Implementation for sync SecretClient - * - * @return sync SecretClient - */ - private SecretClient getSyncSecretClientCodeSnippets() { - - // BEGIN: com.azure.security.keyvault.secretclient.sync.construct - SecretClient secretClient = new SecretClientBuilder() - .credential(new DefaultAzureCredentialBuilder().build()) - .vaultUrl("https://myvault.vault.azure.net/") - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) - .buildClient(); - // END: com.azure.security.keyvault.secretclient.sync.construct - return secretClient; - } - - /** - * Implementation not provided for this method - */ - private SecretClient getSecretClient() { - return new SecretClient(null); - } } diff --git a/sdk/keyvault/ci.yml b/sdk/keyvault/ci.yml index d4fc84eeb0d3..5665710edbb8 100644 --- a/sdk/keyvault/ci.yml +++ b/sdk/keyvault/ci.yml @@ -57,4 +57,9 @@ extends: safeName: azuresecuritykeyvaultkeys - name: azure-security-keyvault-secrets groupId: com.azure - safeName: azuresecuritykeyvaultsecrets \ No newline at end of file + safeName: azuresecuritykeyvaultsecrets + AdditionalModules: + - name: azure-storage-blob + groupId: com.azure + - name: perf-test-core + groupId: com.azure diff --git a/sdk/kusto/mgmt-v2020_06_14/pom.xml b/sdk/kusto/mgmt-v2020_06_14/pom.xml new file mode 100644 index 000000000000..959138e7e076 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.kusto.v2020_06_14 + + com.microsoft.azure + azure-arm-parent + 1.3.2 + ../../parents/azure-arm-parent/pom.xml + + azure-mgmt-kusto + 1.0.0-beta + jar + Microsoft Azure SDK for Kusto Management + This package contains Microsoft Kusto Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + 1.6.5 + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
    * Copyright (c) Microsoft Corporation. All rights reserved. +
    * Licensed under the MIT License. See License.txt in the project root for +
    * license information. +
    */ + ]]> +
    +
    +
    +
    +
    +
    diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AttachedDatabaseConfiguration.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AttachedDatabaseConfiguration.java new file mode 100644 index 000000000000..0f575b8b1d72 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AttachedDatabaseConfiguration.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.AttachedDatabaseConfigurationInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import java.util.List; + +/** + * Type representing AttachedDatabaseConfiguration. + */ +public interface AttachedDatabaseConfiguration extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the attachedDatabaseNames value. + */ + List attachedDatabaseNames(); + + /** + * @return the clusterResourceId value. + */ + String clusterResourceId(); + + /** + * @return the databaseName value. + */ + String databaseName(); + + /** + * @return the defaultPrincipalsModificationKind value. + */ + DefaultPrincipalsModificationKind defaultPrincipalsModificationKind(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the AttachedDatabaseConfiguration definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCluster, DefinitionStages.WithClusterResourceId, DefinitionStages.WithDatabaseName, DefinitionStages.WithDefaultPrincipalsModificationKind, DefinitionStages.WithCreate { + } + + /** + * Grouping of AttachedDatabaseConfiguration definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a AttachedDatabaseConfiguration definition. + */ + interface Blank extends WithCluster { + } + + /** + * The stage of the attacheddatabaseconfiguration definition allowing to specify Cluster. + */ + interface WithCluster { + /** + * Specifies resourceGroupName, clusterName. + * @param resourceGroupName The name of the resource group containing the Kusto cluster + * @param clusterName The name of the Kusto cluster + * @return the next definition stage + */ + WithClusterResourceId withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the attacheddatabaseconfiguration definition allowing to specify ClusterResourceId. + */ + interface WithClusterResourceId { + /** + * Specifies clusterResourceId. + * @param clusterResourceId The resource id of the cluster where the databases you would like to attach reside + * @return the next definition stage + */ + WithDatabaseName withClusterResourceId(String clusterResourceId); + } + + /** + * The stage of the attacheddatabaseconfiguration definition allowing to specify DatabaseName. + */ + interface WithDatabaseName { + /** + * Specifies databaseName. + * @param databaseName The name of the database which you would like to attach, use * if you want to follow all current and future databases + * @return the next definition stage + */ + WithDefaultPrincipalsModificationKind withDatabaseName(String databaseName); + } + + /** + * The stage of the attacheddatabaseconfiguration definition allowing to specify DefaultPrincipalsModificationKind. + */ + interface WithDefaultPrincipalsModificationKind { + /** + * Specifies defaultPrincipalsModificationKind. + * @param defaultPrincipalsModificationKind The default principals modification kind. Possible values include: 'Union', 'Replace', 'None' + * @return the next definition stage + */ + WithCreate withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind defaultPrincipalsModificationKind); + } + + /** + * The stage of the attacheddatabaseconfiguration definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithLocation { + } + } + /** + * The template for a AttachedDatabaseConfiguration update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithLocation { + } + + /** + * Grouping of AttachedDatabaseConfiguration update stages. + */ + interface UpdateStages { + /** + * The stage of the attacheddatabaseconfiguration update allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next update stage + */ + Update withLocation(String location); + } + + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AttachedDatabaseConfigurations.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AttachedDatabaseConfigurations.java new file mode 100644 index 000000000000..d23e3709362b --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AttachedDatabaseConfigurations.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.AttachedDatabaseConfigurationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AttachedDatabaseConfigurations. + */ +public interface AttachedDatabaseConfigurations extends SupportsCreating, HasInner { + /** + * Returns an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName); + + /** + * Returns the list of attached database configurations of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByClusterAsync(String resourceGroupName, String clusterName); + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureCapacity.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureCapacity.java new file mode 100644 index 000000000000..f043f0f465af --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureCapacity.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure capacity definition. + */ +public class AzureCapacity { + /** + * Scale type. Possible values include: 'automatic', 'manual', 'none'. + */ + @JsonProperty(value = "scaleType", required = true) + private AzureScaleType scaleType; + + /** + * Minimum allowed capacity. + */ + @JsonProperty(value = "minimum", required = true) + private int minimum; + + /** + * Maximum allowed capacity. + */ + @JsonProperty(value = "maximum", required = true) + private int maximum; + + /** + * The default capacity that would be used. + */ + @JsonProperty(value = "default", required = true) + private int defaultProperty; + + /** + * Get scale type. Possible values include: 'automatic', 'manual', 'none'. + * + * @return the scaleType value + */ + public AzureScaleType scaleType() { + return this.scaleType; + } + + /** + * Set scale type. Possible values include: 'automatic', 'manual', 'none'. + * + * @param scaleType the scaleType value to set + * @return the AzureCapacity object itself. + */ + public AzureCapacity withScaleType(AzureScaleType scaleType) { + this.scaleType = scaleType; + return this; + } + + /** + * Get minimum allowed capacity. + * + * @return the minimum value + */ + public int minimum() { + return this.minimum; + } + + /** + * Set minimum allowed capacity. + * + * @param minimum the minimum value to set + * @return the AzureCapacity object itself. + */ + public AzureCapacity withMinimum(int minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get maximum allowed capacity. + * + * @return the maximum value + */ + public int maximum() { + return this.maximum; + } + + /** + * Set maximum allowed capacity. + * + * @param maximum the maximum value to set + * @return the AzureCapacity object itself. + */ + public AzureCapacity withMaximum(int maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the default capacity that would be used. + * + * @return the defaultProperty value + */ + public int defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the default capacity that would be used. + * + * @param defaultProperty the defaultProperty value to set + * @return the AzureCapacity object itself. + */ + public AzureCapacity withDefaultProperty(int defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureEntityResource.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureEntityResource.java new file mode 100644 index 000000000000..6f9ba076afb5 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureEntityResource.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * The resource model definition for a Azure Resource Manager resource with an + * etag. + */ +public class AzureEntityResource extends ProxyResource { + /** + * Resource Etag. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource Etag. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureResourceSku.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureResourceSku.java new file mode 100644 index 000000000000..69767fe377e4 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureResourceSku.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.AzureResourceSkuInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; + +/** + * Type representing AzureResourceSku. + */ +public interface AzureResourceSku extends HasInner, HasManager { + /** + * @return the capacity value. + */ + AzureCapacity capacity(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the sku value. + */ + AzureSku sku(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureScaleType.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureScaleType.java new file mode 100644 index 000000000000..e05479f58c8c --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureScaleType.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureScaleType. + */ +public final class AzureScaleType extends ExpandableStringEnum { + /** Static value automatic for AzureScaleType. */ + public static final AzureScaleType AUTOMATIC = fromString("automatic"); + + /** Static value manual for AzureScaleType. */ + public static final AzureScaleType MANUAL = fromString("manual"); + + /** Static value none for AzureScaleType. */ + public static final AzureScaleType NONE = fromString("none"); + + /** + * Creates or finds a AzureScaleType from its string representation. + * @param name a name to look for + * @return the corresponding AzureScaleType + */ + @JsonCreator + public static AzureScaleType fromString(String name) { + return fromString(name, AzureScaleType.class); + } + + /** + * @return known AzureScaleType values + */ + public static Collection values() { + return values(AzureScaleType.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSku.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSku.java new file mode 100644 index 000000000000..ee01e2ed1b4a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSku.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure SKU definition. + */ +public class AzureSku { + /** + * SKU name. Possible values include: 'Standard_DS13_v2+1TB_PS', + * 'Standard_DS13_v2+2TB_PS', 'Standard_DS14_v2+3TB_PS', + * 'Standard_DS14_v2+4TB_PS', 'Standard_D13_v2', 'Standard_D14_v2', + * 'Standard_L8s', 'Standard_L16s', 'Standard_D11_v2', 'Standard_D12_v2', + * 'Standard_L4s', 'Dev(No SLA)_Standard_D11_v2', 'Standard_E2a_v4', + * 'Standard_E4a_v4', 'Standard_E8a_v4', 'Standard_E16a_v4', + * 'Standard_E8as_v4+1TB_PS', 'Standard_E8as_v4+2TB_PS', + * 'Standard_E16as_v4+3TB_PS', 'Standard_E16as_v4+4TB_PS', 'Dev(No + * SLA)_Standard_E2a_v4'. + */ + @JsonProperty(value = "name", required = true) + private AzureSkuName name; + + /** + * The number of instances of the cluster. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * SKU tier. Possible values include: 'Basic', 'Standard'. + */ + @JsonProperty(value = "tier", required = true) + private AzureSkuTier tier; + + /** + * Get sKU name. Possible values include: 'Standard_DS13_v2+1TB_PS', 'Standard_DS13_v2+2TB_PS', 'Standard_DS14_v2+3TB_PS', 'Standard_DS14_v2+4TB_PS', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_L8s', 'Standard_L16s', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_L4s', 'Dev(No SLA)_Standard_D11_v2', 'Standard_E2a_v4', 'Standard_E4a_v4', 'Standard_E8a_v4', 'Standard_E16a_v4', 'Standard_E8as_v4+1TB_PS', 'Standard_E8as_v4+2TB_PS', 'Standard_E16as_v4+3TB_PS', 'Standard_E16as_v4+4TB_PS', 'Dev(No SLA)_Standard_E2a_v4'. + * + * @return the name value + */ + public AzureSkuName name() { + return this.name; + } + + /** + * Set sKU name. Possible values include: 'Standard_DS13_v2+1TB_PS', 'Standard_DS13_v2+2TB_PS', 'Standard_DS14_v2+3TB_PS', 'Standard_DS14_v2+4TB_PS', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_L8s', 'Standard_L16s', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_L4s', 'Dev(No SLA)_Standard_D11_v2', 'Standard_E2a_v4', 'Standard_E4a_v4', 'Standard_E8a_v4', 'Standard_E16a_v4', 'Standard_E8as_v4+1TB_PS', 'Standard_E8as_v4+2TB_PS', 'Standard_E16as_v4+3TB_PS', 'Standard_E16as_v4+4TB_PS', 'Dev(No SLA)_Standard_E2a_v4'. + * + * @param name the name value to set + * @return the AzureSku object itself. + */ + public AzureSku withName(AzureSkuName name) { + this.name = name; + return this; + } + + /** + * Get the number of instances of the cluster. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the number of instances of the cluster. + * + * @param capacity the capacity value to set + * @return the AzureSku object itself. + */ + public AzureSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get sKU tier. Possible values include: 'Basic', 'Standard'. + * + * @return the tier value + */ + public AzureSkuTier tier() { + return this.tier; + } + + /** + * Set sKU tier. Possible values include: 'Basic', 'Standard'. + * + * @param tier the tier value to set + * @return the AzureSku object itself. + */ + public AzureSku withTier(AzureSkuTier tier) { + this.tier = tier; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSkuName.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSkuName.java new file mode 100644 index 000000000000..3c8b059512e0 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSkuName.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureSkuName. + */ +public final class AzureSkuName extends ExpandableStringEnum { + /** Static value Standard_DS13_v2+1TB_PS for AzureSkuName. */ + public static final AzureSkuName STANDARD_DS13_V21TB_PS = fromString("Standard_DS13_v2+1TB_PS"); + + /** Static value Standard_DS13_v2+2TB_PS for AzureSkuName. */ + public static final AzureSkuName STANDARD_DS13_V22TB_PS = fromString("Standard_DS13_v2+2TB_PS"); + + /** Static value Standard_DS14_v2+3TB_PS for AzureSkuName. */ + public static final AzureSkuName STANDARD_DS14_V23TB_PS = fromString("Standard_DS14_v2+3TB_PS"); + + /** Static value Standard_DS14_v2+4TB_PS for AzureSkuName. */ + public static final AzureSkuName STANDARD_DS14_V24TB_PS = fromString("Standard_DS14_v2+4TB_PS"); + + /** Static value Standard_D13_v2 for AzureSkuName. */ + public static final AzureSkuName STANDARD_D13_V2 = fromString("Standard_D13_v2"); + + /** Static value Standard_D14_v2 for AzureSkuName. */ + public static final AzureSkuName STANDARD_D14_V2 = fromString("Standard_D14_v2"); + + /** Static value Standard_L8s for AzureSkuName. */ + public static final AzureSkuName STANDARD_L8S = fromString("Standard_L8s"); + + /** Static value Standard_L16s for AzureSkuName. */ + public static final AzureSkuName STANDARD_L16S = fromString("Standard_L16s"); + + /** Static value Standard_D11_v2 for AzureSkuName. */ + public static final AzureSkuName STANDARD_D11_V2 = fromString("Standard_D11_v2"); + + /** Static value Standard_D12_v2 for AzureSkuName. */ + public static final AzureSkuName STANDARD_D12_V2 = fromString("Standard_D12_v2"); + + /** Static value Standard_L4s for AzureSkuName. */ + public static final AzureSkuName STANDARD_L4S = fromString("Standard_L4s"); + + /** Static value Dev(No SLA)_Standard_D11_v2 for AzureSkuName. */ + public static final AzureSkuName DEV_NO_SLA_STANDARD_D11_V2 = fromString("Dev(No SLA)_Standard_D11_v2"); + + /** Static value Standard_E2a_v4 for AzureSkuName. */ + public static final AzureSkuName STANDARD_E2A_V4 = fromString("Standard_E2a_v4"); + + /** Static value Standard_E4a_v4 for AzureSkuName. */ + public static final AzureSkuName STANDARD_E4A_V4 = fromString("Standard_E4a_v4"); + + /** Static value Standard_E8a_v4 for AzureSkuName. */ + public static final AzureSkuName STANDARD_E8A_V4 = fromString("Standard_E8a_v4"); + + /** Static value Standard_E16a_v4 for AzureSkuName. */ + public static final AzureSkuName STANDARD_E16A_V4 = fromString("Standard_E16a_v4"); + + /** Static value Standard_E8as_v4+1TB_PS for AzureSkuName. */ + public static final AzureSkuName STANDARD_E8AS_V41TB_PS = fromString("Standard_E8as_v4+1TB_PS"); + + /** Static value Standard_E8as_v4+2TB_PS for AzureSkuName. */ + public static final AzureSkuName STANDARD_E8AS_V42TB_PS = fromString("Standard_E8as_v4+2TB_PS"); + + /** Static value Standard_E16as_v4+3TB_PS for AzureSkuName. */ + public static final AzureSkuName STANDARD_E16AS_V43TB_PS = fromString("Standard_E16as_v4+3TB_PS"); + + /** Static value Standard_E16as_v4+4TB_PS for AzureSkuName. */ + public static final AzureSkuName STANDARD_E16AS_V44TB_PS = fromString("Standard_E16as_v4+4TB_PS"); + + /** Static value Dev(No SLA)_Standard_E2a_v4 for AzureSkuName. */ + public static final AzureSkuName DEV_NO_SLA_STANDARD_E2A_V4 = fromString("Dev(No SLA)_Standard_E2a_v4"); + + /** + * Creates or finds a AzureSkuName from its string representation. + * @param name a name to look for + * @return the corresponding AzureSkuName + */ + @JsonCreator + public static AzureSkuName fromString(String name) { + return fromString(name, AzureSkuName.class); + } + + /** + * @return known AzureSkuName values + */ + public static Collection values() { + return values(AzureSkuName.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSkuTier.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSkuTier.java new file mode 100644 index 000000000000..a9a1e6b0b9fe --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/AzureSkuTier.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AzureSkuTier. + */ +public final class AzureSkuTier extends ExpandableStringEnum { + /** Static value Basic for AzureSkuTier. */ + public static final AzureSkuTier BASIC = fromString("Basic"); + + /** Static value Standard for AzureSkuTier. */ + public static final AzureSkuTier STANDARD = fromString("Standard"); + + /** + * Creates or finds a AzureSkuTier from its string representation. + * @param name a name to look for + * @return the corresponding AzureSkuTier + */ + @JsonCreator + public static AzureSkuTier fromString(String name) { + return fromString(name, AzureSkuTier.class); + } + + /** + * @return known AzureSkuTier values + */ + public static Collection values() { + return values(AzureSkuTier.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/BlobStorageEventType.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/BlobStorageEventType.java new file mode 100644 index 000000000000..afdfed8d3a8a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/BlobStorageEventType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for BlobStorageEventType. + */ +public final class BlobStorageEventType extends ExpandableStringEnum { + /** Static value Microsoft.Storage.BlobCreated for BlobStorageEventType. */ + public static final BlobStorageEventType MICROSOFT_STORAGE_BLOB_CREATED = fromString("Microsoft.Storage.BlobCreated"); + + /** Static value Microsoft.Storage.BlobRenamed for BlobStorageEventType. */ + public static final BlobStorageEventType MICROSOFT_STORAGE_BLOB_RENAMED = fromString("Microsoft.Storage.BlobRenamed"); + + /** + * Creates or finds a BlobStorageEventType from its string representation. + * @param name a name to look for + * @return the corresponding BlobStorageEventType + */ + @JsonCreator + public static BlobStorageEventType fromString(String name) { + return fromString(name, BlobStorageEventType.class); + } + + /** + * @return known BlobStorageEventType values + */ + public static Collection values() { + return values(BlobStorageEventType.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/CheckNameRequest.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/CheckNameRequest.java new file mode 100644 index 000000000000..56ad230e7d2f --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/CheckNameRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The result returned from a database check name availability request. + */ +public class CheckNameRequest { + /** + * Resource name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The type of resource, for instance Microsoft.Kusto/clusters/databases. + * Possible values include: 'Microsoft.Kusto/clusters/databases', + * 'Microsoft.Kusto/clusters/attachedDatabaseConfigurations'. + */ + @JsonProperty(value = "type", required = true) + private Type type; + + /** + * Get resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set resource name. + * + * @param name the name value to set + * @return the CheckNameRequest object itself. + */ + public CheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type of resource, for instance Microsoft.Kusto/clusters/databases. Possible values include: 'Microsoft.Kusto/clusters/databases', 'Microsoft.Kusto/clusters/attachedDatabaseConfigurations'. + * + * @return the type value + */ + public Type type() { + return this.type; + } + + /** + * Set the type of resource, for instance Microsoft.Kusto/clusters/databases. Possible values include: 'Microsoft.Kusto/clusters/databases', 'Microsoft.Kusto/clusters/attachedDatabaseConfigurations'. + * + * @param type the type value to set + * @return the CheckNameRequest object itself. + */ + public CheckNameRequest withType(Type type) { + this.type = type; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/CheckNameResult.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/CheckNameResult.java new file mode 100644 index 000000000000..8b8fb14fd9c2 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/CheckNameResult.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.CheckNameResultInner; + +/** + * Type representing CheckNameResult. + */ +public interface CheckNameResult extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + Reason reason(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Cluster.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Cluster.java new file mode 100644 index 000000000000..6600fa27bfcd --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Cluster.java @@ -0,0 +1,406 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.ClusterInner; + +/** + * Type representing Cluster. + */ +public interface Cluster extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the dataIngestionUri value. + */ + String dataIngestionUri(); + + /** + * @return the enableDiskEncryption value. + */ + Boolean enableDiskEncryption(); + + /** + * @return the enableDoubleEncryption value. + */ + Boolean enableDoubleEncryption(); + + /** + * @return the enablePurge value. + */ + Boolean enablePurge(); + + /** + * @return the enableStreamingIngest value. + */ + Boolean enableStreamingIngest(); + + /** + * @return the identity value. + */ + Identity identity(); + + /** + * @return the keyVaultProperties value. + */ + KeyVaultProperties keyVaultProperties(); + + /** + * @return the languageExtensions value. + */ + LanguageExtensionsList languageExtensions(); + + /** + * @return the optimizedAutoscale value. + */ + OptimizedAutoscale optimizedAutoscale(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the sku value. + */ + AzureSku sku(); + + /** + * @return the state value. + */ + State state(); + + /** + * @return the stateReason value. + */ + String stateReason(); + + /** + * @return the trustedExternalTenants value. + */ + List trustedExternalTenants(); + + /** + * @return the uri value. + */ + String uri(); + + /** + * @return the virtualNetworkConfiguration value. + */ + VirtualNetworkConfiguration virtualNetworkConfiguration(); + + /** + * @return the zones value. + */ + List zones(); + + /** + * The entirety of the Cluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithSku, DefinitionStages.WithCreate { + } + + /** + * Grouping of Cluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Cluster definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Cluster definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the cluster definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The SKU of the cluster + * @return the next definition stage +*/ + WithCreate withSku(AzureSku sku); + } + + /** + * The stage of the cluster definition allowing to specify EnableDiskEncryption. + */ + interface WithEnableDiskEncryption { + /** + * Specifies enableDiskEncryption. + * @param enableDiskEncryption A boolean value that indicates if the cluster's disks are encrypted + * @return the next definition stage + */ + WithCreate withEnableDiskEncryption(Boolean enableDiskEncryption); + } + + /** + * The stage of the cluster definition allowing to specify EnableDoubleEncryption. + */ + interface WithEnableDoubleEncryption { + /** + * Specifies enableDoubleEncryption. + * @param enableDoubleEncryption A boolean value that indicates if double encryption is enabled + * @return the next definition stage + */ + WithCreate withEnableDoubleEncryption(Boolean enableDoubleEncryption); + } + + /** + * The stage of the cluster definition allowing to specify EnablePurge. + */ + interface WithEnablePurge { + /** + * Specifies enablePurge. + * @param enablePurge A boolean value that indicates if the purge operations are enabled + * @return the next definition stage + */ + WithCreate withEnablePurge(Boolean enablePurge); + } + + /** + * The stage of the cluster definition allowing to specify EnableStreamingIngest. + */ + interface WithEnableStreamingIngest { + /** + * Specifies enableStreamingIngest. + * @param enableStreamingIngest A boolean value that indicates if the streaming ingest is enabled + * @return the next definition stage + */ + WithCreate withEnableStreamingIngest(Boolean enableStreamingIngest); + } + + /** + * The stage of the cluster definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of the cluster, if configured + * @return the next definition stage + */ + WithCreate withIdentity(Identity identity); + } + + /** + * The stage of the cluster definition allowing to specify KeyVaultProperties. + */ + interface WithKeyVaultProperties { + /** + * Specifies keyVaultProperties. + * @param keyVaultProperties KeyVault properties for the cluster encryption + * @return the next definition stage + */ + WithCreate withKeyVaultProperties(KeyVaultProperties keyVaultProperties); + } + + /** + * The stage of the cluster definition allowing to specify OptimizedAutoscale. + */ + interface WithOptimizedAutoscale { + /** + * Specifies optimizedAutoscale. + * @param optimizedAutoscale Optimized auto scale definition + * @return the next definition stage + */ + WithCreate withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale); + } + + /** + * The stage of the cluster definition allowing to specify TrustedExternalTenants. + */ + interface WithTrustedExternalTenants { + /** + * Specifies trustedExternalTenants. + * @param trustedExternalTenants The cluster's external tenants + * @return the next definition stage + */ + WithCreate withTrustedExternalTenants(List trustedExternalTenants); + } + + /** + * The stage of the cluster definition allowing to specify VirtualNetworkConfiguration. + */ + interface WithVirtualNetworkConfiguration { + /** + * Specifies virtualNetworkConfiguration. + * @param virtualNetworkConfiguration Virtual network definition + * @return the next definition stage + */ + WithCreate withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration); + } + + /** + * The stage of the cluster definition allowing to specify Zones. + */ + interface WithZones { + /** + * Specifies zones. + * @param zones The availability zones of the cluster + * @return the next definition stage + */ + WithCreate withZones(List zones); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithEnableDiskEncryption, DefinitionStages.WithEnableDoubleEncryption, DefinitionStages.WithEnablePurge, DefinitionStages.WithEnableStreamingIngest, DefinitionStages.WithIdentity, DefinitionStages.WithKeyVaultProperties, DefinitionStages.WithOptimizedAutoscale, DefinitionStages.WithTrustedExternalTenants, DefinitionStages.WithVirtualNetworkConfiguration, DefinitionStages.WithZones { + } + } + /** + * The template for a Cluster update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithEnableDiskEncryption, UpdateStages.WithEnableDoubleEncryption, UpdateStages.WithEnablePurge, UpdateStages.WithEnableStreamingIngest, UpdateStages.WithIdentity, UpdateStages.WithKeyVaultProperties, UpdateStages.WithOptimizedAutoscale, UpdateStages.WithSku, UpdateStages.WithTrustedExternalTenants, UpdateStages.WithVirtualNetworkConfiguration { + } + + /** + * Grouping of Cluster update stages. + */ + interface UpdateStages { + /** + * The stage of the cluster update allowing to specify EnableDiskEncryption. + */ + interface WithEnableDiskEncryption { + /** + * Specifies enableDiskEncryption. + * @param enableDiskEncryption A boolean value that indicates if the cluster's disks are encrypted + * @return the next update stage + */ + Update withEnableDiskEncryption(Boolean enableDiskEncryption); + } + + /** + * The stage of the cluster update allowing to specify EnableDoubleEncryption. + */ + interface WithEnableDoubleEncryption { + /** + * Specifies enableDoubleEncryption. + * @param enableDoubleEncryption A boolean value that indicates if double encryption is enabled + * @return the next update stage + */ + Update withEnableDoubleEncryption(Boolean enableDoubleEncryption); + } + + /** + * The stage of the cluster update allowing to specify EnablePurge. + */ + interface WithEnablePurge { + /** + * Specifies enablePurge. + * @param enablePurge A boolean value that indicates if the purge operations are enabled + * @return the next update stage + */ + Update withEnablePurge(Boolean enablePurge); + } + + /** + * The stage of the cluster update allowing to specify EnableStreamingIngest. + */ + interface WithEnableStreamingIngest { + /** + * Specifies enableStreamingIngest. + * @param enableStreamingIngest A boolean value that indicates if the streaming ingest is enabled + * @return the next update stage + */ + Update withEnableStreamingIngest(Boolean enableStreamingIngest); + } + + /** + * The stage of the cluster update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity The identity of the cluster, if configured + * @return the next update stage + */ + Update withIdentity(Identity identity); + } + + /** + * The stage of the cluster update allowing to specify KeyVaultProperties. + */ + interface WithKeyVaultProperties { + /** + * Specifies keyVaultProperties. + * @param keyVaultProperties KeyVault properties for the cluster encryption + * @return the next update stage + */ + Update withKeyVaultProperties(KeyVaultProperties keyVaultProperties); + } + + /** + * The stage of the cluster update allowing to specify OptimizedAutoscale. + */ + interface WithOptimizedAutoscale { + /** + * Specifies optimizedAutoscale. + * @param optimizedAutoscale Optimized auto scale definition + * @return the next update stage + */ + Update withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale); + } + + /** + * The stage of the cluster update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The SKU of the cluster + * @return the next update stage + */ + Update withSku(AzureSku sku); + } + + /** + * The stage of the cluster update allowing to specify TrustedExternalTenants. + */ + interface WithTrustedExternalTenants { + /** + * Specifies trustedExternalTenants. + * @param trustedExternalTenants The cluster's external tenants + * @return the next update stage + */ + Update withTrustedExternalTenants(List trustedExternalTenants); + } + + /** + * The stage of the cluster update allowing to specify VirtualNetworkConfiguration. + */ + interface WithVirtualNetworkConfiguration { + /** + * Specifies virtualNetworkConfiguration. + * @param virtualNetworkConfiguration Virtual network definition + * @return the next update stage + */ + Update withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration); + } + + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterCheckNameRequest.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterCheckNameRequest.java new file mode 100644 index 000000000000..52f25961bf63 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterCheckNameRequest.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The result returned from a cluster check name availability request. + */ +public class ClusterCheckNameRequest { + /** + * Cluster name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The type of resource, Microsoft.Kusto/clusters. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of ClusterCheckNameRequest class. + * @param name cluster name. + */ + public ClusterCheckNameRequest() { + type = "Microsoft.Kusto/clusters"; + } + + /** + * Get cluster name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set cluster name. + * + * @param name the name value to set + * @return the ClusterCheckNameRequest object itself. + */ + public ClusterCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type of resource, Microsoft.Kusto/clusters. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of resource, Microsoft.Kusto/clusters. + * + * @param type the type value to set + * @return the ClusterCheckNameRequest object itself. + */ + public ClusterCheckNameRequest withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignment.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignment.java new file mode 100644 index 000000000000..9dcba241ec55 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignment.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.ClusterPrincipalAssignmentInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; + +/** + * Type representing ClusterPrincipalAssignment. + */ +public interface ClusterPrincipalAssignment extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the principalId value. + */ + String principalId(); + + /** + * @return the principalName value. + */ + String principalName(); + + /** + * @return the principalType value. + */ + PrincipalType principalType(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the role value. + */ + ClusterPrincipalRole role(); + + /** + * @return the tenantId value. + */ + String tenantId(); + + /** + * @return the tenantName value. + */ + String tenantName(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ClusterPrincipalAssignment definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCluster, DefinitionStages.WithPrincipalId, DefinitionStages.WithPrincipalType, DefinitionStages.WithRole, DefinitionStages.WithCreate { + } + + /** + * Grouping of ClusterPrincipalAssignment definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ClusterPrincipalAssignment definition. + */ + interface Blank extends WithCluster { + } + + /** + * The stage of the clusterprincipalassignment definition allowing to specify Cluster. + */ + interface WithCluster { + /** + * Specifies resourceGroupName, clusterName. + * @param resourceGroupName The name of the resource group containing the Kusto cluster + * @param clusterName The name of the Kusto cluster + * @return the next definition stage + */ + WithPrincipalId withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the clusterprincipalassignment definition allowing to specify PrincipalId. + */ + interface WithPrincipalId { + /** + * Specifies principalId. + * @param principalId The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group name + * @return the next definition stage + */ + WithPrincipalType withPrincipalId(String principalId); + } + + /** + * The stage of the clusterprincipalassignment definition allowing to specify PrincipalType. + */ + interface WithPrincipalType { + /** + * Specifies principalType. + * @param principalType Principal type. Possible values include: 'App', 'Group', 'User' + * @return the next definition stage + */ + WithRole withPrincipalType(PrincipalType principalType); + } + + /** + * The stage of the clusterprincipalassignment definition allowing to specify Role. + */ + interface WithRole { + /** + * Specifies role. + * @param role Cluster principal role. Possible values include: 'AllDatabasesAdmin', 'AllDatabasesViewer' + * @return the next definition stage + */ + WithCreate withRole(ClusterPrincipalRole role); + } + + /** + * The stage of the clusterprincipalassignment definition allowing to specify TenantId. + */ + interface WithTenantId { + /** + * Specifies tenantId. + * @param tenantId The tenant id of the principal + * @return the next definition stage + */ + WithCreate withTenantId(String tenantId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithTenantId { + } + } + /** + * The template for a ClusterPrincipalAssignment update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithTenantId { + } + + /** + * Grouping of ClusterPrincipalAssignment update stages. + */ + interface UpdateStages { + /** + * The stage of the clusterprincipalassignment update allowing to specify TenantId. + */ + interface WithTenantId { + /** + * Specifies tenantId. + * @param tenantId The tenant id of the principal + * @return the next update stage + */ + Update withTenantId(String tenantId); + } + + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignmentCheckNameRequest.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignmentCheckNameRequest.java new file mode 100644 index 000000000000..fdb66877c57b --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignmentCheckNameRequest.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A principal assignment check name availability request. + */ +public class ClusterPrincipalAssignmentCheckNameRequest { + /** + * Principal Assignment resource name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The type of resource, Microsoft.Kusto/clusters/principalAssignments. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of ClusterPrincipalAssignmentCheckNameRequest class. + * @param name principal Assignment resource name. + */ + public ClusterPrincipalAssignmentCheckNameRequest() { + type = "Microsoft.Kusto/clusters/principalAssignments"; + } + + /** + * Get principal Assignment resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set principal Assignment resource name. + * + * @param name the name value to set + * @return the ClusterPrincipalAssignmentCheckNameRequest object itself. + */ + public ClusterPrincipalAssignmentCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type of resource, Microsoft.Kusto/clusters/principalAssignments. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of resource, Microsoft.Kusto/clusters/principalAssignments. + * + * @param type the type value to set + * @return the ClusterPrincipalAssignmentCheckNameRequest object itself. + */ + public ClusterPrincipalAssignmentCheckNameRequest withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignments.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignments.java new file mode 100644 index 000000000000..898e6c236517 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalAssignments.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.ClusterPrincipalAssignmentsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ClusterPrincipalAssignments. + */ +public interface ClusterPrincipalAssignments extends SupportsCreating, HasInner { + /** + * Gets a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String clusterName, String principalAssignmentName); + + /** + * Lists all Kusto cluster principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String clusterName); + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String clusterName, String principalAssignmentName); + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param name Principal Assignment resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String name); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalRole.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalRole.java new file mode 100644 index 000000000000..9f7210ec9a58 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterPrincipalRole.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ClusterPrincipalRole. + */ +public final class ClusterPrincipalRole extends ExpandableStringEnum { + /** Static value AllDatabasesAdmin for ClusterPrincipalRole. */ + public static final ClusterPrincipalRole ALL_DATABASES_ADMIN = fromString("AllDatabasesAdmin"); + + /** Static value AllDatabasesViewer for ClusterPrincipalRole. */ + public static final ClusterPrincipalRole ALL_DATABASES_VIEWER = fromString("AllDatabasesViewer"); + + /** + * Creates or finds a ClusterPrincipalRole from its string representation. + * @param name a name to look for + * @return the corresponding ClusterPrincipalRole + */ + @JsonCreator + public static ClusterPrincipalRole fromString(String name) { + return fromString(name, ClusterPrincipalRole.class); + } + + /** + * @return known ClusterPrincipalRole values + */ + public static Collection values() { + return values(ClusterPrincipalRole.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterUpdate.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterUpdate.java new file mode 100644 index 000000000000..cda56a705f05 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ClusterUpdate.java @@ -0,0 +1,427 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Class representing an update to a Kusto cluster. + */ +@JsonFlatten +public class ClusterUpdate extends ProxyResource { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * The SKU of the cluster. + */ + @JsonProperty(value = "sku") + private AzureSku sku; + + /** + * The identity of the cluster, if configured. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * The state of the resource. Possible values include: 'Creating', + * 'Unavailable', 'Running', 'Deleting', 'Deleted', 'Stopping', 'Stopped', + * 'Starting', 'Updating'. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private State state; + + /** + * The provisioned state of the resource. Possible values include: + * 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The cluster URI. + */ + @JsonProperty(value = "properties.uri", access = JsonProperty.Access.WRITE_ONLY) + private String uri; + + /** + * The cluster data ingestion URI. + */ + @JsonProperty(value = "properties.dataIngestionUri", access = JsonProperty.Access.WRITE_ONLY) + private String dataIngestionUri; + + /** + * The reason for the cluster's current state. + */ + @JsonProperty(value = "properties.stateReason", access = JsonProperty.Access.WRITE_ONLY) + private String stateReason; + + /** + * The cluster's external tenants. + */ + @JsonProperty(value = "properties.trustedExternalTenants") + private List trustedExternalTenants; + + /** + * Optimized auto scale definition. + */ + @JsonProperty(value = "properties.optimizedAutoscale") + private OptimizedAutoscale optimizedAutoscale; + + /** + * A boolean value that indicates if the cluster's disks are encrypted. + */ + @JsonProperty(value = "properties.enableDiskEncryption") + private Boolean enableDiskEncryption; + + /** + * A boolean value that indicates if the streaming ingest is enabled. + */ + @JsonProperty(value = "properties.enableStreamingIngest") + private Boolean enableStreamingIngest; + + /** + * Virtual network definition. + */ + @JsonProperty(value = "properties.virtualNetworkConfiguration") + private VirtualNetworkConfiguration virtualNetworkConfiguration; + + /** + * KeyVault properties for the cluster encryption. + */ + @JsonProperty(value = "properties.keyVaultProperties") + private KeyVaultProperties keyVaultProperties; + + /** + * A boolean value that indicates if the purge operations are enabled. + */ + @JsonProperty(value = "properties.enablePurge") + private Boolean enablePurge; + + /** + * List of the cluster's language extensions. + */ + @JsonProperty(value = "properties.languageExtensions", access = JsonProperty.Access.WRITE_ONLY) + private LanguageExtensionsList languageExtensions; + + /** + * A boolean value that indicates if double encryption is enabled. + */ + @JsonProperty(value = "properties.enableDoubleEncryption") + private Boolean enableDoubleEncryption; + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource location. + * + * @param location the location value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the SKU of the cluster. + * + * @return the sku value + */ + public AzureSku sku() { + return this.sku; + } + + /** + * Set the SKU of the cluster. + * + * @param sku the sku value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withSku(AzureSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the identity of the cluster, if configured. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity of the cluster, if configured. + * + * @param identity the identity value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get the state of the resource. Possible values include: 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted', 'Stopping', 'Stopped', 'Starting', 'Updating'. + * + * @return the state value + */ + public State state() { + return this.state; + } + + /** + * Get the provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the cluster URI. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Get the cluster data ingestion URI. + * + * @return the dataIngestionUri value + */ + public String dataIngestionUri() { + return this.dataIngestionUri; + } + + /** + * Get the reason for the cluster's current state. + * + * @return the stateReason value + */ + public String stateReason() { + return this.stateReason; + } + + /** + * Get the cluster's external tenants. + * + * @return the trustedExternalTenants value + */ + public List trustedExternalTenants() { + return this.trustedExternalTenants; + } + + /** + * Set the cluster's external tenants. + * + * @param trustedExternalTenants the trustedExternalTenants value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withTrustedExternalTenants(List trustedExternalTenants) { + this.trustedExternalTenants = trustedExternalTenants; + return this; + } + + /** + * Get optimized auto scale definition. + * + * @return the optimizedAutoscale value + */ + public OptimizedAutoscale optimizedAutoscale() { + return this.optimizedAutoscale; + } + + /** + * Set optimized auto scale definition. + * + * @param optimizedAutoscale the optimizedAutoscale value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale) { + this.optimizedAutoscale = optimizedAutoscale; + return this; + } + + /** + * Get a boolean value that indicates if the cluster's disks are encrypted. + * + * @return the enableDiskEncryption value + */ + public Boolean enableDiskEncryption() { + return this.enableDiskEncryption; + } + + /** + * Set a boolean value that indicates if the cluster's disks are encrypted. + * + * @param enableDiskEncryption the enableDiskEncryption value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withEnableDiskEncryption(Boolean enableDiskEncryption) { + this.enableDiskEncryption = enableDiskEncryption; + return this; + } + + /** + * Get a boolean value that indicates if the streaming ingest is enabled. + * + * @return the enableStreamingIngest value + */ + public Boolean enableStreamingIngest() { + return this.enableStreamingIngest; + } + + /** + * Set a boolean value that indicates if the streaming ingest is enabled. + * + * @param enableStreamingIngest the enableStreamingIngest value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withEnableStreamingIngest(Boolean enableStreamingIngest) { + this.enableStreamingIngest = enableStreamingIngest; + return this; + } + + /** + * Get virtual network definition. + * + * @return the virtualNetworkConfiguration value + */ + public VirtualNetworkConfiguration virtualNetworkConfiguration() { + return this.virtualNetworkConfiguration; + } + + /** + * Set virtual network definition. + * + * @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration) { + this.virtualNetworkConfiguration = virtualNetworkConfiguration; + return this; + } + + /** + * Get keyVault properties for the cluster encryption. + * + * @return the keyVaultProperties value + */ + public KeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set keyVault properties for the cluster encryption. + * + * @param keyVaultProperties the keyVaultProperties value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get a boolean value that indicates if the purge operations are enabled. + * + * @return the enablePurge value + */ + public Boolean enablePurge() { + return this.enablePurge; + } + + /** + * Set a boolean value that indicates if the purge operations are enabled. + * + * @param enablePurge the enablePurge value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withEnablePurge(Boolean enablePurge) { + this.enablePurge = enablePurge; + return this; + } + + /** + * Get list of the cluster's language extensions. + * + * @return the languageExtensions value + */ + public LanguageExtensionsList languageExtensions() { + return this.languageExtensions; + } + + /** + * Get a boolean value that indicates if double encryption is enabled. + * + * @return the enableDoubleEncryption value + */ + public Boolean enableDoubleEncryption() { + return this.enableDoubleEncryption; + } + + /** + * Set a boolean value that indicates if double encryption is enabled. + * + * @param enableDoubleEncryption the enableDoubleEncryption value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withEnableDoubleEncryption(Boolean enableDoubleEncryption) { + this.enableDoubleEncryption = enableDoubleEncryption; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Clusters.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Clusters.java new file mode 100644 index 000000000000..fd866ec1d955 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Clusters.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.FollowerDatabaseDefinitionInner; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.ClustersInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.kusto.v2020_06_14.AzureResourceSku; + +/** + * Type representing Clusters. + */ +public interface Clusters extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable stopAsync(String resourceGroupName, String clusterName); + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable startAsync(String resourceGroupName, String clusterName); + + /** + * Returns a list of databases that are owned by this cluster and were followed by another cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listFollowerDatabasesAsync(String resourceGroupName, String clusterName); + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable detachFollowerDatabasesAsync(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove); + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable diagnoseVirtualNetworkAsync(String resourceGroupName, String clusterName); + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listLanguageExtensionsAsync(String resourceGroupName, String clusterName); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable addLanguageExtensionsAsync(String resourceGroupName, String clusterName); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable removeLanguageExtensionsAsync(String resourceGroupName, String clusterName); + + /** + * Checks that the cluster name is valid and is not already in use. + * + * @param location Azure location. + * @param name Cluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location, String name); + + /** + * Returns the SKUs available for the provided resource. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSkusByResourceAsync(String resourceGroupName, String clusterName); + + /** + * Lists eligible SKUs for Kusto resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSkusAsync(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Compression.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Compression.java new file mode 100644 index 000000000000..9ee2a4c3b985 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Compression.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Compression. + */ +public final class Compression extends ExpandableStringEnum { + /** Static value None for Compression. */ + public static final Compression NONE = fromString("None"); + + /** Static value GZip for Compression. */ + public static final Compression GZIP = fromString("GZip"); + + /** + * Creates or finds a Compression from its string representation. + * @param name a name to look for + * @return the corresponding Compression + */ + @JsonCreator + public static Compression fromString(String name) { + return fromString(name, Compression.class); + } + + /** + * @return known Compression values + */ + public static Collection values() { + return values(Compression.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnection.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnection.java new file mode 100644 index 000000000000..8031a2065070 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnection.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DataConnectionInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; + +/** + * Type representing DataConnection. + */ +public interface DataConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DataConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDatabasis, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataConnection definition. + */ + interface Blank extends WithDatabasis { + } + + /** + * The stage of the dataconnection definition allowing to specify Databasis. + */ + interface WithDatabasis { + /** + * Specifies resourceGroupName, clusterName, databaseName. + * @param resourceGroupName The name of the resource group containing the Kusto cluster + * @param clusterName The name of the Kusto cluster + * @param databaseName The name of the database in the Kusto cluster + * @return the next definition stage + */ + WithCreate withExistingDatabasis(String resourceGroupName, String clusterName, String databaseName); + } + + /** + * The stage of the dataconnection definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithLocation { + } + } + /** + * The template for a DataConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithLocation { + } + + /** + * Grouping of DataConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the dataconnection update allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next update stage + */ + Update withLocation(String location); + } + + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionCheckNameRequest.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionCheckNameRequest.java new file mode 100644 index 000000000000..4fc2f95b54be --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionCheckNameRequest.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A data connection check name availability request. + */ +public class DataConnectionCheckNameRequest { + /** + * Data Connection name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The type of resource, + * Microsoft.Kusto/clusters/databases/dataConnections. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of DataConnectionCheckNameRequest class. + * @param name data Connection name. + */ + public DataConnectionCheckNameRequest() { + type = "Microsoft.Kusto/clusters/databases/dataConnections"; + } + + /** + * Get data Connection name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set data Connection name. + * + * @param name the name value to set + * @return the DataConnectionCheckNameRequest object itself. + */ + public DataConnectionCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type of resource, Microsoft.Kusto/clusters/databases/dataConnections. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of resource, Microsoft.Kusto/clusters/databases/dataConnections. + * + * @param type the type value to set + * @return the DataConnectionCheckNameRequest object itself. + */ + public DataConnectionCheckNameRequest withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidation.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidation.java new file mode 100644 index 000000000000..57a28223d23c --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidation.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DataConnectionInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class representing an data connection validation. + */ +public class DataConnectionValidation { + /** + * The name of the data connection. + */ + @JsonProperty(value = "dataConnectionName") + private String dataConnectionName; + + /** + * The data connection properties to validate. + */ + @JsonProperty(value = "properties") + private DataConnectionInner properties; + + /** + * Get the name of the data connection. + * + * @return the dataConnectionName value + */ + public String dataConnectionName() { + return this.dataConnectionName; + } + + /** + * Set the name of the data connection. + * + * @param dataConnectionName the dataConnectionName value to set + * @return the DataConnectionValidation object itself. + */ + public DataConnectionValidation withDataConnectionName(String dataConnectionName) { + this.dataConnectionName = dataConnectionName; + return this; + } + + /** + * Get the data connection properties to validate. + * + * @return the properties value + */ + public DataConnectionInner properties() { + return this.properties; + } + + /** + * Set the data connection properties to validate. + * + * @param properties the properties value to set + * @return the DataConnectionValidation object itself. + */ + public DataConnectionValidation withProperties(DataConnectionInner properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidationListResult.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidationListResult.java new file mode 100644 index 000000000000..b50a861eb717 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidationListResult.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DataConnectionValidationListResultInner; +import java.util.List; + +/** + * Type representing DataConnectionValidationListResult. + */ +public interface DataConnectionValidationListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidationResult.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidationResult.java new file mode 100644 index 000000000000..b8307efdeef6 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnectionValidationResult.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The result returned from a data connection validation request. + */ +public class DataConnectionValidationResult { + /** + * A message which indicates a problem in data connection validation. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /** + * Get a message which indicates a problem in data connection validation. + * + * @return the errorMessage value + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set a message which indicates a problem in data connection validation. + * + * @param errorMessage the errorMessage value to set + * @return the DataConnectionValidationResult object itself. + */ + public DataConnectionValidationResult withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnections.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnections.java new file mode 100644 index 000000000000..351fddbe17a6 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DataConnections.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DataConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DataConnections. + */ +public interface DataConnections extends SupportsCreating, HasInner { + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName); + + /** + * Returns the list of data connections of the given Kusto database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByDatabaseAsync(String resourceGroupName, String clusterName, String databaseName); + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName); + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable dataConnectionValidationMethodAsync(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters); + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Data Connection name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String databaseName, String name); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Database.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Database.java new file mode 100644 index 000000000000..11c436c7ac6e --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Database.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabaseInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; + +/** + * Type representing Database. + */ +public interface Database extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Database definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCluster, DefinitionStages.WithCreate { + } + + /** + * Grouping of Database definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Database definition. + */ + interface Blank extends WithCluster { + } + + /** + * The stage of the database definition allowing to specify Cluster. + */ + interface WithCluster { + /** + * Specifies resourceGroupName, clusterName. + * @param resourceGroupName The name of the resource group containing the Kusto cluster + * @param clusterName The name of the Kusto cluster + * @return the next definition stage + */ + WithCreate withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the database definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithLocation { + } + } + /** + * The template for a Database update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithLocation { + } + + /** + * Grouping of Database update stages. + */ + interface UpdateStages { + /** + * The stage of the database update allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next update stage + */ + Update withLocation(String location); + } + + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipal.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipal.java new file mode 100644 index 000000000000..74eb31ec38ac --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipal.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabasePrincipalInner; + +/** + * Type representing DatabasePrincipal. + */ +public interface DatabasePrincipal extends HasInner, HasManager { + /** + * @return the appId value. + */ + String appId(); + + /** + * @return the email value. + */ + String email(); + + /** + * @return the fqn value. + */ + String fqn(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the role value. + */ + DatabasePrincipalRole role(); + + /** + * @return the tenantName value. + */ + String tenantName(); + + /** + * @return the type value. + */ + DatabasePrincipalType type(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignment.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignment.java new file mode 100644 index 000000000000..da1d1cf8fa2a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignment.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabasePrincipalAssignmentInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; + +/** + * Type representing DatabasePrincipalAssignment. + */ +public interface DatabasePrincipalAssignment extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the principalId value. + */ + String principalId(); + + /** + * @return the principalName value. + */ + String principalName(); + + /** + * @return the principalType value. + */ + PrincipalType principalType(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the role value. + */ + DatabasePrincipalRole role(); + + /** + * @return the tenantId value. + */ + String tenantId(); + + /** + * @return the tenantName value. + */ + String tenantName(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DatabasePrincipalAssignment definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDatabasis, DefinitionStages.WithPrincipalId, DefinitionStages.WithPrincipalType, DefinitionStages.WithRole, DefinitionStages.WithCreate { + } + + /** + * Grouping of DatabasePrincipalAssignment definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DatabasePrincipalAssignment definition. + */ + interface Blank extends WithDatabasis { + } + + /** + * The stage of the databaseprincipalassignment definition allowing to specify Databasis. + */ + interface WithDatabasis { + /** + * Specifies resourceGroupName, clusterName, databaseName. + * @param resourceGroupName The name of the resource group containing the Kusto cluster + * @param clusterName The name of the Kusto cluster + * @param databaseName The name of the database in the Kusto cluster + * @return the next definition stage + */ + WithPrincipalId withExistingDatabasis(String resourceGroupName, String clusterName, String databaseName); + } + + /** + * The stage of the databaseprincipalassignment definition allowing to specify PrincipalId. + */ + interface WithPrincipalId { + /** + * Specifies principalId. + * @param principalId The principal ID assigned to the database principal. It can be a user email, application ID, or security group name + * @return the next definition stage + */ + WithPrincipalType withPrincipalId(String principalId); + } + + /** + * The stage of the databaseprincipalassignment definition allowing to specify PrincipalType. + */ + interface WithPrincipalType { + /** + * Specifies principalType. + * @param principalType Principal type. Possible values include: 'App', 'Group', 'User' + * @return the next definition stage + */ + WithRole withPrincipalType(PrincipalType principalType); + } + + /** + * The stage of the databaseprincipalassignment definition allowing to specify Role. + */ + interface WithRole { + /** + * Specifies role. + * @param role Database principal role. Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer' + * @return the next definition stage + */ + WithCreate withRole(DatabasePrincipalRole role); + } + + /** + * The stage of the databaseprincipalassignment definition allowing to specify TenantId. + */ + interface WithTenantId { + /** + * Specifies tenantId. + * @param tenantId The tenant id of the principal + * @return the next definition stage + */ + WithCreate withTenantId(String tenantId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithTenantId { + } + } + /** + * The template for a DatabasePrincipalAssignment update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithTenantId { + } + + /** + * Grouping of DatabasePrincipalAssignment update stages. + */ + interface UpdateStages { + /** + * The stage of the databaseprincipalassignment update allowing to specify TenantId. + */ + interface WithTenantId { + /** + * Specifies tenantId. + * @param tenantId The tenant id of the principal + * @return the next update stage + */ + Update withTenantId(String tenantId); + } + + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignmentCheckNameRequest.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignmentCheckNameRequest.java new file mode 100644 index 000000000000..bf4fd82fe759 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignmentCheckNameRequest.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A principal assignment check name availability request. + */ +public class DatabasePrincipalAssignmentCheckNameRequest { + /** + * Principal Assignment resource name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The type of resource, + * Microsoft.Kusto/clusters/databases/principalAssignments. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of DatabasePrincipalAssignmentCheckNameRequest class. + * @param name principal Assignment resource name. + */ + public DatabasePrincipalAssignmentCheckNameRequest() { + type = "Microsoft.Kusto/clusters/databases/principalAssignments"; + } + + /** + * Get principal Assignment resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set principal Assignment resource name. + * + * @param name the name value to set + * @return the DatabasePrincipalAssignmentCheckNameRequest object itself. + */ + public DatabasePrincipalAssignmentCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. + * + * @param type the type value to set + * @return the DatabasePrincipalAssignmentCheckNameRequest object itself. + */ + public DatabasePrincipalAssignmentCheckNameRequest withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignments.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignments.java new file mode 100644 index 000000000000..da138244439d --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalAssignments.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabasePrincipalAssignmentsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DatabasePrincipalAssignments. + */ +public interface DatabasePrincipalAssignments extends SupportsCreating, HasInner { + /** + * Gets a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName); + + /** + * Lists all Kusto cluster database principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String clusterName, String databaseName); + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName); + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Principal Assignment resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String databaseName, String name); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalListRequest.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalListRequest.java new file mode 100644 index 000000000000..696ef032f05a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalListRequest.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabasePrincipalInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list Kusto database principals operation request. + */ +public class DatabasePrincipalListRequest { + /** + * The list of Kusto database principals. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the list of Kusto database principals. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the list of Kusto database principals. + * + * @param value the value value to set + * @return the DatabasePrincipalListRequest object itself. + */ + public DatabasePrincipalListRequest withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalListResult.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalListResult.java new file mode 100644 index 000000000000..47bb56f9fdae --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalListResult.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabasePrincipalListResultInner; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabasePrincipalInner; +import java.util.List; + +/** + * Type representing DatabasePrincipalListResult. + */ +public interface DatabasePrincipalListResult extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalRole.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalRole.java new file mode 100644 index 000000000000..2e0a35e584cc --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalRole.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabasePrincipalRole. + */ +public final class DatabasePrincipalRole extends ExpandableStringEnum { + /** Static value Admin for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole ADMIN = fromString("Admin"); + + /** Static value Ingestor for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole INGESTOR = fromString("Ingestor"); + + /** Static value Monitor for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole MONITOR = fromString("Monitor"); + + /** Static value User for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole USER = fromString("User"); + + /** Static value UnrestrictedViewers for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole UNRESTRICTED_VIEWERS = fromString("UnrestrictedViewers"); + + /** Static value Viewer for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole VIEWER = fromString("Viewer"); + + /** + * Creates or finds a DatabasePrincipalRole from its string representation. + * @param name a name to look for + * @return the corresponding DatabasePrincipalRole + */ + @JsonCreator + public static DatabasePrincipalRole fromString(String name) { + return fromString(name, DatabasePrincipalRole.class); + } + + /** + * @return known DatabasePrincipalRole values + */ + public static Collection values() { + return values(DatabasePrincipalRole.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalType.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalType.java new file mode 100644 index 000000000000..02377c014e05 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabasePrincipalType.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabasePrincipalType. + */ +public final class DatabasePrincipalType extends ExpandableStringEnum { + /** Static value App for DatabasePrincipalType. */ + public static final DatabasePrincipalType APP = fromString("App"); + + /** Static value Group for DatabasePrincipalType. */ + public static final DatabasePrincipalType GROUP = fromString("Group"); + + /** Static value User for DatabasePrincipalType. */ + public static final DatabasePrincipalType USER = fromString("User"); + + /** + * Creates or finds a DatabasePrincipalType from its string representation. + * @param name a name to look for + * @return the corresponding DatabasePrincipalType + */ + @JsonCreator + public static DatabasePrincipalType fromString(String name) { + return fromString(name, DatabasePrincipalType.class); + } + + /** + * @return known DatabasePrincipalType values + */ + public static Collection values() { + return values(DatabasePrincipalType.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabaseStatistics.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabaseStatistics.java new file mode 100644 index 000000000000..2a94139fbe7e --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DatabaseStatistics.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class that contains database statistics information. + */ +public class DatabaseStatistics { + /** + * The database size - the total size of compressed data and index in + * bytes. + */ + @JsonProperty(value = "size") + private Double size; + + /** + * Get the database size - the total size of compressed data and index in bytes. + * + * @return the size value + */ + public Double size() { + return this.size; + } + + /** + * Set the database size - the total size of compressed data and index in bytes. + * + * @param size the size value to set + * @return the DatabaseStatistics object itself. + */ + public DatabaseStatistics withSize(Double size) { + this.size = size; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Databases.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Databases.java new file mode 100644 index 000000000000..4ab5c4e84045 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Databases.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabasesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Databases. + */ +public interface Databases extends SupportsCreating, HasInner { + /** + * Returns a list of database principals of the given Kusto cluster and database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName); + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable addPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName); + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable removePrincipalsAsync(String resourceGroupName, String clusterName, String databaseName); + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String clusterName, String databaseName); + + /** + * Returns the list of databases of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByClusterAsync(String resourceGroupName, String clusterName); + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String clusterName, String databaseName); + + /** + * Checks that the database name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, CheckNameRequest resourceName); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DefaultPrincipalsModificationKind.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DefaultPrincipalsModificationKind.java new file mode 100644 index 000000000000..5fdbb8cd5cc3 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DefaultPrincipalsModificationKind.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DefaultPrincipalsModificationKind. + */ +public final class DefaultPrincipalsModificationKind extends ExpandableStringEnum { + /** Static value Union for DefaultPrincipalsModificationKind. */ + public static final DefaultPrincipalsModificationKind UNION = fromString("Union"); + + /** Static value Replace for DefaultPrincipalsModificationKind. */ + public static final DefaultPrincipalsModificationKind REPLACE = fromString("Replace"); + + /** Static value None for DefaultPrincipalsModificationKind. */ + public static final DefaultPrincipalsModificationKind NONE = fromString("None"); + + /** + * Creates or finds a DefaultPrincipalsModificationKind from its string representation. + * @param name a name to look for + * @return the corresponding DefaultPrincipalsModificationKind + */ + @JsonCreator + public static DefaultPrincipalsModificationKind fromString(String name) { + return fromString(name, DefaultPrincipalsModificationKind.class); + } + + /** + * @return known DefaultPrincipalsModificationKind values + */ + public static Collection values() { + return values(DefaultPrincipalsModificationKind.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DiagnoseVirtualNetworkResult.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DiagnoseVirtualNetworkResult.java new file mode 100644 index 000000000000..873dab2fa2f2 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/DiagnoseVirtualNetworkResult.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DiagnoseVirtualNetworkResultInner; +import java.util.List; + +/** + * Type representing DiagnoseVirtualNetworkResult. + */ +public interface DiagnoseVirtualNetworkResult extends HasInner, HasManager { + /** + * @return the findings value. + */ + List findings(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventGridDataConnection.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventGridDataConnection.java new file mode 100644 index 000000000000..2b72659d6624 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventGridDataConnection.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DataConnectionInner; + +/** + * Class representing an Event Grid data connection. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = EventGridDataConnection.class) +@JsonTypeName("EventGrid") +@JsonFlatten +public class EventGridDataConnection extends DataConnectionInner { + /** + * The resource ID of the storage account where the data resides. + */ + @JsonProperty(value = "properties.storageAccountResourceId", required = true) + private String storageAccountResourceId; + + /** + * The resource ID where the event grid is configured to send events. + */ + @JsonProperty(value = "properties.eventHubResourceId", required = true) + private String eventHubResourceId; + + /** + * The event hub consumer group. + */ + @JsonProperty(value = "properties.consumerGroup", required = true) + private String consumerGroup; + + /** + * The table where the data should be ingested. Optionally the table + * information can be added to each message. + */ + @JsonProperty(value = "properties.tableName") + private String tableName; + + /** + * The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + */ + @JsonProperty(value = "properties.mappingRuleName") + private String mappingRuleName; + + /** + * The data format of the message. Optionally the data format can be added + * to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', + * 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', + * 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + */ + @JsonProperty(value = "properties.dataFormat") + private EventGridDataFormat dataFormat; + + /** + * A Boolean value that, if set to true, indicates that ingestion should + * ignore the first record of every file. + */ + @JsonProperty(value = "properties.ignoreFirstRecord") + private Boolean ignoreFirstRecord; + + /** + * The name of blob storage event type to process. Possible values include: + * 'Microsoft.Storage.BlobCreated', 'Microsoft.Storage.BlobRenamed'. + */ + @JsonProperty(value = "properties.blobStorageEventType") + private BlobStorageEventType blobStorageEventType; + + /** + * Get the resource ID of the storage account where the data resides. + * + * @return the storageAccountResourceId value + */ + public String storageAccountResourceId() { + return this.storageAccountResourceId; + } + + /** + * Set the resource ID of the storage account where the data resides. + * + * @param storageAccountResourceId the storageAccountResourceId value to set + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withStorageAccountResourceId(String storageAccountResourceId) { + this.storageAccountResourceId = storageAccountResourceId; + return this; + } + + /** + * Get the resource ID where the event grid is configured to send events. + * + * @return the eventHubResourceId value + */ + public String eventHubResourceId() { + return this.eventHubResourceId; + } + + /** + * Set the resource ID where the event grid is configured to send events. + * + * @param eventHubResourceId the eventHubResourceId value to set + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withEventHubResourceId(String eventHubResourceId) { + this.eventHubResourceId = eventHubResourceId; + return this; + } + + /** + * Get the event hub consumer group. + * + * @return the consumerGroup value + */ + public String consumerGroup() { + return this.consumerGroup; + } + + /** + * Set the event hub consumer group. + * + * @param consumerGroup the consumerGroup value to set + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withConsumerGroup(String consumerGroup) { + this.consumerGroup = consumerGroup; + return this; + } + + /** + * Get the table where the data should be ingested. Optionally the table information can be added to each message. + * + * @return the tableName value + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the table where the data should be ingested. Optionally the table information can be added to each message. + * + * @param tableName the tableName value to set + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + * + * @return the mappingRuleName value + */ + public String mappingRuleName() { + return this.mappingRuleName; + } + + /** + * Set the mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + * + * @param mappingRuleName the mappingRuleName value to set + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withMappingRuleName(String mappingRuleName) { + this.mappingRuleName = mappingRuleName; + return this; + } + + /** + * Get the data format of the message. Optionally the data format can be added to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + * + * @return the dataFormat value + */ + public EventGridDataFormat dataFormat() { + return this.dataFormat; + } + + /** + * Set the data format of the message. Optionally the data format can be added to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + * + * @param dataFormat the dataFormat value to set + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withDataFormat(EventGridDataFormat dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * Get a Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file. + * + * @return the ignoreFirstRecord value + */ + public Boolean ignoreFirstRecord() { + return this.ignoreFirstRecord; + } + + /** + * Set a Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file. + * + * @param ignoreFirstRecord the ignoreFirstRecord value to set + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withIgnoreFirstRecord(Boolean ignoreFirstRecord) { + this.ignoreFirstRecord = ignoreFirstRecord; + return this; + } + + /** + * Get the name of blob storage event type to process. Possible values include: 'Microsoft.Storage.BlobCreated', 'Microsoft.Storage.BlobRenamed'. + * + * @return the blobStorageEventType value + */ + public BlobStorageEventType blobStorageEventType() { + return this.blobStorageEventType; + } + + /** + * Set the name of blob storage event type to process. Possible values include: 'Microsoft.Storage.BlobCreated', 'Microsoft.Storage.BlobRenamed'. + * + * @param blobStorageEventType the blobStorageEventType value to set + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withBlobStorageEventType(BlobStorageEventType blobStorageEventType) { + this.blobStorageEventType = blobStorageEventType; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventGridDataFormat.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventGridDataFormat.java new file mode 100644 index 000000000000..1c165addff4b --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventGridDataFormat.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EventGridDataFormat. + */ +public final class EventGridDataFormat extends ExpandableStringEnum { + /** Static value MULTIJSON for EventGridDataFormat. */ + public static final EventGridDataFormat MULTIJSON = fromString("MULTIJSON"); + + /** Static value JSON for EventGridDataFormat. */ + public static final EventGridDataFormat JSON = fromString("JSON"); + + /** Static value CSV for EventGridDataFormat. */ + public static final EventGridDataFormat CSV = fromString("CSV"); + + /** Static value TSV for EventGridDataFormat. */ + public static final EventGridDataFormat TSV = fromString("TSV"); + + /** Static value SCSV for EventGridDataFormat. */ + public static final EventGridDataFormat SCSV = fromString("SCSV"); + + /** Static value SOHSV for EventGridDataFormat. */ + public static final EventGridDataFormat SOHSV = fromString("SOHSV"); + + /** Static value PSV for EventGridDataFormat. */ + public static final EventGridDataFormat PSV = fromString("PSV"); + + /** Static value TXT for EventGridDataFormat. */ + public static final EventGridDataFormat TXT = fromString("TXT"); + + /** Static value RAW for EventGridDataFormat. */ + public static final EventGridDataFormat RAW = fromString("RAW"); + + /** Static value SINGLEJSON for EventGridDataFormat. */ + public static final EventGridDataFormat SINGLEJSON = fromString("SINGLEJSON"); + + /** Static value AVRO for EventGridDataFormat. */ + public static final EventGridDataFormat AVRO = fromString("AVRO"); + + /** Static value TSVE for EventGridDataFormat. */ + public static final EventGridDataFormat TSVE = fromString("TSVE"); + + /** Static value PARQUET for EventGridDataFormat. */ + public static final EventGridDataFormat PARQUET = fromString("PARQUET"); + + /** Static value ORC for EventGridDataFormat. */ + public static final EventGridDataFormat ORC = fromString("ORC"); + + /** Static value APACHEAVRO for EventGridDataFormat. */ + public static final EventGridDataFormat APACHEAVRO = fromString("APACHEAVRO"); + + /** Static value W3CLOGFILE for EventGridDataFormat. */ + public static final EventGridDataFormat W3CLOGFILE = fromString("W3CLOGFILE"); + + /** + * Creates or finds a EventGridDataFormat from its string representation. + * @param name a name to look for + * @return the corresponding EventGridDataFormat + */ + @JsonCreator + public static EventGridDataFormat fromString(String name) { + return fromString(name, EventGridDataFormat.class); + } + + /** + * @return known EventGridDataFormat values + */ + public static Collection values() { + return values(EventGridDataFormat.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventHubDataConnection.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventHubDataConnection.java new file mode 100644 index 000000000000..256477992bea --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventHubDataConnection.java @@ -0,0 +1,213 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DataConnectionInner; + +/** + * Class representing an event hub data connection. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = EventHubDataConnection.class) +@JsonTypeName("EventHub") +@JsonFlatten +public class EventHubDataConnection extends DataConnectionInner { + /** + * The resource ID of the event hub to be used to create a data connection. + */ + @JsonProperty(value = "properties.eventHubResourceId", required = true) + private String eventHubResourceId; + + /** + * The event hub consumer group. + */ + @JsonProperty(value = "properties.consumerGroup", required = true) + private String consumerGroup; + + /** + * The table where the data should be ingested. Optionally the table + * information can be added to each message. + */ + @JsonProperty(value = "properties.tableName") + private String tableName; + + /** + * The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + */ + @JsonProperty(value = "properties.mappingRuleName") + private String mappingRuleName; + + /** + * The data format of the message. Optionally the data format can be added + * to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', + * 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', + * 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + */ + @JsonProperty(value = "properties.dataFormat") + private EventHubDataFormat dataFormat; + + /** + * System properties of the event hub. + */ + @JsonProperty(value = "properties.eventSystemProperties") + private List eventSystemProperties; + + /** + * The event hub messages compression type. Possible values include: + * 'None', 'GZip'. + */ + @JsonProperty(value = "properties.compression") + private Compression compression; + + /** + * Get the resource ID of the event hub to be used to create a data connection. + * + * @return the eventHubResourceId value + */ + public String eventHubResourceId() { + return this.eventHubResourceId; + } + + /** + * Set the resource ID of the event hub to be used to create a data connection. + * + * @param eventHubResourceId the eventHubResourceId value to set + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withEventHubResourceId(String eventHubResourceId) { + this.eventHubResourceId = eventHubResourceId; + return this; + } + + /** + * Get the event hub consumer group. + * + * @return the consumerGroup value + */ + public String consumerGroup() { + return this.consumerGroup; + } + + /** + * Set the event hub consumer group. + * + * @param consumerGroup the consumerGroup value to set + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withConsumerGroup(String consumerGroup) { + this.consumerGroup = consumerGroup; + return this; + } + + /** + * Get the table where the data should be ingested. Optionally the table information can be added to each message. + * + * @return the tableName value + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the table where the data should be ingested. Optionally the table information can be added to each message. + * + * @param tableName the tableName value to set + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + * + * @return the mappingRuleName value + */ + public String mappingRuleName() { + return this.mappingRuleName; + } + + /** + * Set the mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + * + * @param mappingRuleName the mappingRuleName value to set + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withMappingRuleName(String mappingRuleName) { + this.mappingRuleName = mappingRuleName; + return this; + } + + /** + * Get the data format of the message. Optionally the data format can be added to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + * + * @return the dataFormat value + */ + public EventHubDataFormat dataFormat() { + return this.dataFormat; + } + + /** + * Set the data format of the message. Optionally the data format can be added to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + * + * @param dataFormat the dataFormat value to set + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withDataFormat(EventHubDataFormat dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * Get system properties of the event hub. + * + * @return the eventSystemProperties value + */ + public List eventSystemProperties() { + return this.eventSystemProperties; + } + + /** + * Set system properties of the event hub. + * + * @param eventSystemProperties the eventSystemProperties value to set + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withEventSystemProperties(List eventSystemProperties) { + this.eventSystemProperties = eventSystemProperties; + return this; + } + + /** + * Get the event hub messages compression type. Possible values include: 'None', 'GZip'. + * + * @return the compression value + */ + public Compression compression() { + return this.compression; + } + + /** + * Set the event hub messages compression type. Possible values include: 'None', 'GZip'. + * + * @param compression the compression value to set + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withCompression(Compression compression) { + this.compression = compression; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventHubDataFormat.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventHubDataFormat.java new file mode 100644 index 000000000000..eec8f6fbd2e2 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/EventHubDataFormat.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EventHubDataFormat. + */ +public final class EventHubDataFormat extends ExpandableStringEnum { + /** Static value MULTIJSON for EventHubDataFormat. */ + public static final EventHubDataFormat MULTIJSON = fromString("MULTIJSON"); + + /** Static value JSON for EventHubDataFormat. */ + public static final EventHubDataFormat JSON = fromString("JSON"); + + /** Static value CSV for EventHubDataFormat. */ + public static final EventHubDataFormat CSV = fromString("CSV"); + + /** Static value TSV for EventHubDataFormat. */ + public static final EventHubDataFormat TSV = fromString("TSV"); + + /** Static value SCSV for EventHubDataFormat. */ + public static final EventHubDataFormat SCSV = fromString("SCSV"); + + /** Static value SOHSV for EventHubDataFormat. */ + public static final EventHubDataFormat SOHSV = fromString("SOHSV"); + + /** Static value PSV for EventHubDataFormat. */ + public static final EventHubDataFormat PSV = fromString("PSV"); + + /** Static value TXT for EventHubDataFormat. */ + public static final EventHubDataFormat TXT = fromString("TXT"); + + /** Static value RAW for EventHubDataFormat. */ + public static final EventHubDataFormat RAW = fromString("RAW"); + + /** Static value SINGLEJSON for EventHubDataFormat. */ + public static final EventHubDataFormat SINGLEJSON = fromString("SINGLEJSON"); + + /** Static value AVRO for EventHubDataFormat. */ + public static final EventHubDataFormat AVRO = fromString("AVRO"); + + /** Static value TSVE for EventHubDataFormat. */ + public static final EventHubDataFormat TSVE = fromString("TSVE"); + + /** Static value PARQUET for EventHubDataFormat. */ + public static final EventHubDataFormat PARQUET = fromString("PARQUET"); + + /** Static value ORC for EventHubDataFormat. */ + public static final EventHubDataFormat ORC = fromString("ORC"); + + /** Static value APACHEAVRO for EventHubDataFormat. */ + public static final EventHubDataFormat APACHEAVRO = fromString("APACHEAVRO"); + + /** Static value W3CLOGFILE for EventHubDataFormat. */ + public static final EventHubDataFormat W3CLOGFILE = fromString("W3CLOGFILE"); + + /** + * Creates or finds a EventHubDataFormat from its string representation. + * @param name a name to look for + * @return the corresponding EventHubDataFormat + */ + @JsonCreator + public static EventHubDataFormat fromString(String name) { + return fromString(name, EventHubDataFormat.class); + } + + /** + * @return known EventHubDataFormat values + */ + public static Collection values() { + return values(EventHubDataFormat.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/FollowerDatabaseDefinition.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/FollowerDatabaseDefinition.java new file mode 100644 index 000000000000..c7f7c1597fb4 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/FollowerDatabaseDefinition.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.FollowerDatabaseDefinitionInner; + +/** + * Type representing FollowerDatabaseDefinition. + */ +public interface FollowerDatabaseDefinition extends HasInner, HasManager { + /** + * @return the attachedDatabaseConfigurationName value. + */ + String attachedDatabaseConfigurationName(); + + /** + * @return the clusterResourceId value. + */ + String clusterResourceId(); + + /** + * @return the databaseName value. + */ + String databaseName(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Identity.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Identity.java new file mode 100644 index 000000000000..8e79abbfe5d5 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Identity.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identity for the resource. + */ +public class Identity { + /** + * The principal ID of resource identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The tenant ID of resource. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * The identity type. Possible values include: 'None', 'SystemAssigned'. + */ + @JsonProperty(value = "type", required = true) + private IdentityType type; + + /** + * The list of user identities associated with the Kusto cluster. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; + + /** + * Get the principal ID of resource identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenant ID of resource. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the identity type. Possible values include: 'None', 'SystemAssigned'. + * + * @return the type value + */ + public IdentityType type() { + return this.type; + } + + /** + * Set the identity type. Possible values include: 'None', 'SystemAssigned'. + * + * @param type the type value to set + * @return the Identity object itself. + */ + public Identity withType(IdentityType type) { + this.type = type; + return this; + } + + /** + * Get the list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set + * @return the Identity object itself. + */ + public Identity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IdentityType.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IdentityType.java new file mode 100644 index 000000000000..338dbbe8c287 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IdentityType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for IdentityType. + */ +public enum IdentityType { + /** Enum value None. */ + NONE("None"), + + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"); + + /** The actual serialized value for a IdentityType instance. */ + private String value; + + IdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed IdentityType object, or null if unable to parse. + */ + @JsonCreator + public static IdentityType fromString(String value) { + IdentityType[] items = IdentityType.values(); + for (IdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IdentityUserAssignedIdentitiesValue.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IdentityUserAssignedIdentitiesValue.java new file mode 100644 index 000000000000..bf126e2849b9 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IdentityUserAssignedIdentitiesValue.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The IdentityUserAssignedIdentitiesValue model. + */ +public class IdentityUserAssignedIdentitiesValue { + /** + * The principal id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The client id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** + * Get the principal id of user assigned identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the client id of user assigned identity. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IotHubDataConnection.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IotHubDataConnection.java new file mode 100644 index 000000000000..30e371304d54 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IotHubDataConnection.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DataConnectionInner; + +/** + * Class representing an iot hub data connection. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = IotHubDataConnection.class) +@JsonTypeName("IotHub") +@JsonFlatten +public class IotHubDataConnection extends DataConnectionInner { + /** + * The resource ID of the Iot hub to be used to create a data connection. + */ + @JsonProperty(value = "properties.iotHubResourceId", required = true) + private String iotHubResourceId; + + /** + * The iot hub consumer group. + */ + @JsonProperty(value = "properties.consumerGroup", required = true) + private String consumerGroup; + + /** + * The table where the data should be ingested. Optionally the table + * information can be added to each message. + */ + @JsonProperty(value = "properties.tableName") + private String tableName; + + /** + * The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + */ + @JsonProperty(value = "properties.mappingRuleName") + private String mappingRuleName; + + /** + * The data format of the message. Optionally the data format can be added + * to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', + * 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', + * 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + */ + @JsonProperty(value = "properties.dataFormat") + private IotHubDataFormat dataFormat; + + /** + * System properties of the iot hub. + */ + @JsonProperty(value = "properties.eventSystemProperties") + private List eventSystemProperties; + + /** + * The name of the share access policy. + */ + @JsonProperty(value = "properties.sharedAccessPolicyName", required = true) + private String sharedAccessPolicyName; + + /** + * Get the resource ID of the Iot hub to be used to create a data connection. + * + * @return the iotHubResourceId value + */ + public String iotHubResourceId() { + return this.iotHubResourceId; + } + + /** + * Set the resource ID of the Iot hub to be used to create a data connection. + * + * @param iotHubResourceId the iotHubResourceId value to set + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withIotHubResourceId(String iotHubResourceId) { + this.iotHubResourceId = iotHubResourceId; + return this; + } + + /** + * Get the iot hub consumer group. + * + * @return the consumerGroup value + */ + public String consumerGroup() { + return this.consumerGroup; + } + + /** + * Set the iot hub consumer group. + * + * @param consumerGroup the consumerGroup value to set + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withConsumerGroup(String consumerGroup) { + this.consumerGroup = consumerGroup; + return this; + } + + /** + * Get the table where the data should be ingested. Optionally the table information can be added to each message. + * + * @return the tableName value + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the table where the data should be ingested. Optionally the table information can be added to each message. + * + * @param tableName the tableName value to set + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + * + * @return the mappingRuleName value + */ + public String mappingRuleName() { + return this.mappingRuleName; + } + + /** + * Set the mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + * + * @param mappingRuleName the mappingRuleName value to set + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withMappingRuleName(String mappingRuleName) { + this.mappingRuleName = mappingRuleName; + return this; + } + + /** + * Get the data format of the message. Optionally the data format can be added to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + * + * @return the dataFormat value + */ + public IotHubDataFormat dataFormat() { + return this.dataFormat; + } + + /** + * Set the data format of the message. Optionally the data format can be added to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE'. + * + * @param dataFormat the dataFormat value to set + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withDataFormat(IotHubDataFormat dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * Get system properties of the iot hub. + * + * @return the eventSystemProperties value + */ + public List eventSystemProperties() { + return this.eventSystemProperties; + } + + /** + * Set system properties of the iot hub. + * + * @param eventSystemProperties the eventSystemProperties value to set + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withEventSystemProperties(List eventSystemProperties) { + this.eventSystemProperties = eventSystemProperties; + return this; + } + + /** + * Get the name of the share access policy. + * + * @return the sharedAccessPolicyName value + */ + public String sharedAccessPolicyName() { + return this.sharedAccessPolicyName; + } + + /** + * Set the name of the share access policy. + * + * @param sharedAccessPolicyName the sharedAccessPolicyName value to set + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withSharedAccessPolicyName(String sharedAccessPolicyName) { + this.sharedAccessPolicyName = sharedAccessPolicyName; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IotHubDataFormat.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IotHubDataFormat.java new file mode 100644 index 000000000000..2ff2ba9ce5ab --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/IotHubDataFormat.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for IotHubDataFormat. + */ +public final class IotHubDataFormat extends ExpandableStringEnum { + /** Static value MULTIJSON for IotHubDataFormat. */ + public static final IotHubDataFormat MULTIJSON = fromString("MULTIJSON"); + + /** Static value JSON for IotHubDataFormat. */ + public static final IotHubDataFormat JSON = fromString("JSON"); + + /** Static value CSV for IotHubDataFormat. */ + public static final IotHubDataFormat CSV = fromString("CSV"); + + /** Static value TSV for IotHubDataFormat. */ + public static final IotHubDataFormat TSV = fromString("TSV"); + + /** Static value SCSV for IotHubDataFormat. */ + public static final IotHubDataFormat SCSV = fromString("SCSV"); + + /** Static value SOHSV for IotHubDataFormat. */ + public static final IotHubDataFormat SOHSV = fromString("SOHSV"); + + /** Static value PSV for IotHubDataFormat. */ + public static final IotHubDataFormat PSV = fromString("PSV"); + + /** Static value TXT for IotHubDataFormat. */ + public static final IotHubDataFormat TXT = fromString("TXT"); + + /** Static value RAW for IotHubDataFormat. */ + public static final IotHubDataFormat RAW = fromString("RAW"); + + /** Static value SINGLEJSON for IotHubDataFormat. */ + public static final IotHubDataFormat SINGLEJSON = fromString("SINGLEJSON"); + + /** Static value AVRO for IotHubDataFormat. */ + public static final IotHubDataFormat AVRO = fromString("AVRO"); + + /** Static value TSVE for IotHubDataFormat. */ + public static final IotHubDataFormat TSVE = fromString("TSVE"); + + /** Static value PARQUET for IotHubDataFormat. */ + public static final IotHubDataFormat PARQUET = fromString("PARQUET"); + + /** Static value ORC for IotHubDataFormat. */ + public static final IotHubDataFormat ORC = fromString("ORC"); + + /** Static value APACHEAVRO for IotHubDataFormat. */ + public static final IotHubDataFormat APACHEAVRO = fromString("APACHEAVRO"); + + /** Static value W3CLOGFILE for IotHubDataFormat. */ + public static final IotHubDataFormat W3CLOGFILE = fromString("W3CLOGFILE"); + + /** + * Creates or finds a IotHubDataFormat from its string representation. + * @param name a name to look for + * @return the corresponding IotHubDataFormat + */ + @JsonCreator + public static IotHubDataFormat fromString(String name) { + return fromString(name, IotHubDataFormat.class); + } + + /** + * @return known IotHubDataFormat values + */ + public static Collection values() { + return values(IotHubDataFormat.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/KeyVaultProperties.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/KeyVaultProperties.java new file mode 100644 index 000000000000..e9f28a844aa4 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/KeyVaultProperties.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the key vault. + */ +public class KeyVaultProperties { + /** + * The name of the key vault key. + */ + @JsonProperty(value = "keyName", required = true) + private String keyName; + + /** + * The version of the key vault key. + */ + @JsonProperty(value = "keyVersion", required = true) + private String keyVersion; + + /** + * The Uri of the key vault. + */ + @JsonProperty(value = "keyVaultUri", required = true) + private String keyVaultUri; + + /** + * Get the name of the key vault key. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the name of the key vault key. + * + * @param keyName the keyName value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the version of the key vault key. + * + * @return the keyVersion value + */ + public String keyVersion() { + return this.keyVersion; + } + + /** + * Set the version of the key vault key. + * + * @param keyVersion the keyVersion value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVersion(String keyVersion) { + this.keyVersion = keyVersion; + return this; + } + + /** + * Get the Uri of the key vault. + * + * @return the keyVaultUri value + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the Uri of the key vault. + * + * @param keyVaultUri the keyVaultUri value to set + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtension.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtension.java new file mode 100644 index 000000000000..991f31dc35f0 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtension.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.LanguageExtensionInner; + +/** + * Type representing LanguageExtension. + */ +public interface LanguageExtension extends HasInner, HasManager { + /** + * @return the languageExtensionName value. + */ + LanguageExtensionName languageExtensionName(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtensionName.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtensionName.java new file mode 100644 index 000000000000..9f861a570054 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtensionName.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LanguageExtensionName. + */ +public final class LanguageExtensionName extends ExpandableStringEnum { + /** Static value PYTHON for LanguageExtensionName. */ + public static final LanguageExtensionName PYTHON = fromString("PYTHON"); + + /** Static value R for LanguageExtensionName. */ + public static final LanguageExtensionName R = fromString("R"); + + /** + * Creates or finds a LanguageExtensionName from its string representation. + * @param name a name to look for + * @return the corresponding LanguageExtensionName + */ + @JsonCreator + public static LanguageExtensionName fromString(String name) { + return fromString(name, LanguageExtensionName.class); + } + + /** + * @return known LanguageExtensionName values + */ + public static Collection values() { + return values(LanguageExtensionName.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtensionsList.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtensionsList.java new file mode 100644 index 000000000000..0a2c4cfd933a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/LanguageExtensionsList.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.LanguageExtensionInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of language extension objects. + */ +public class LanguageExtensionsList { + /** + * The list of language extensions. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the list of language extensions. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the list of language extensions. + * + * @param value the value value to set + * @return the LanguageExtensionsList object itself. + */ + public LanguageExtensionsList withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Operation.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Operation.java new file mode 100644 index 000000000000..6c5fe50fd7b0 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Operation.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + Object properties(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/OperationDisplay.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/OperationDisplay.java new file mode 100644 index 000000000000..a480668e1f49 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/OperationDisplay.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The object that describes the operation. + */ +public class OperationDisplay { + /** + * Friendly name of the resource provider. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The operation type. + * For example: read, write, delete. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The resource type on which the operation is performed. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The friendly name of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the provider value. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider value. + * + * @param provider the provider value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get for example: read, write, delete. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set for example: read, write, delete. + * + * @param operation the operation value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the resource value. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource value. + * + * @param resource the resource value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Operations.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Operations.java new file mode 100644 index 000000000000..fdabab372019 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Operations.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/OptimizedAutoscale.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/OptimizedAutoscale.java new file mode 100644 index 000000000000..31f71de5a1a4 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/OptimizedAutoscale.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class that contains the optimized auto scale definition. + */ +public class OptimizedAutoscale { + /** + * The version of the template defined, for instance 1. + */ + @JsonProperty(value = "version", required = true) + private int version; + + /** + * A boolean value that indicate if the optimized autoscale feature is + * enabled or not. + */ + @JsonProperty(value = "isEnabled", required = true) + private boolean isEnabled; + + /** + * Minimum allowed instances count. + */ + @JsonProperty(value = "minimum", required = true) + private int minimum; + + /** + * Maximum allowed instances count. + */ + @JsonProperty(value = "maximum", required = true) + private int maximum; + + /** + * Get the version of the template defined, for instance 1. + * + * @return the version value + */ + public int version() { + return this.version; + } + + /** + * Set the version of the template defined, for instance 1. + * + * @param version the version value to set + * @return the OptimizedAutoscale object itself. + */ + public OptimizedAutoscale withVersion(int version) { + this.version = version; + return this; + } + + /** + * Get a boolean value that indicate if the optimized autoscale feature is enabled or not. + * + * @return the isEnabled value + */ + public boolean isEnabled() { + return this.isEnabled; + } + + /** + * Set a boolean value that indicate if the optimized autoscale feature is enabled or not. + * + * @param isEnabled the isEnabled value to set + * @return the OptimizedAutoscale object itself. + */ + public OptimizedAutoscale withIsEnabled(boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Get minimum allowed instances count. + * + * @return the minimum value + */ + public int minimum() { + return this.minimum; + } + + /** + * Set minimum allowed instances count. + * + * @param minimum the minimum value to set + * @return the OptimizedAutoscale object itself. + */ + public OptimizedAutoscale withMinimum(int minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get maximum allowed instances count. + * + * @return the maximum value + */ + public int maximum() { + return this.maximum; + } + + /** + * Set maximum allowed instances count. + * + * @param maximum the maximum value to set + * @return the OptimizedAutoscale object itself. + */ + public OptimizedAutoscale withMaximum(int maximum) { + this.maximum = maximum; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/PrincipalType.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/PrincipalType.java new file mode 100644 index 000000000000..0d5a80f47f40 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/PrincipalType.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrincipalType. + */ +public final class PrincipalType extends ExpandableStringEnum { + /** Static value App for PrincipalType. */ + public static final PrincipalType APP = fromString("App"); + + /** Static value Group for PrincipalType. */ + public static final PrincipalType GROUP = fromString("Group"); + + /** Static value User for PrincipalType. */ + public static final PrincipalType USER = fromString("User"); + + /** + * Creates or finds a PrincipalType from its string representation. + * @param name a name to look for + * @return the corresponding PrincipalType + */ + @JsonCreator + public static PrincipalType fromString(String name) { + return fromString(name, PrincipalType.class); + } + + /** + * @return known PrincipalType values + */ + public static Collection values() { + return values(PrincipalType.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/PrincipalsModificationKind.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/PrincipalsModificationKind.java new file mode 100644 index 000000000000..ba0283aafcf4 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/PrincipalsModificationKind.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrincipalsModificationKind. + */ +public final class PrincipalsModificationKind extends ExpandableStringEnum { + /** Static value Union for PrincipalsModificationKind. */ + public static final PrincipalsModificationKind UNION = fromString("Union"); + + /** Static value Replace for PrincipalsModificationKind. */ + public static final PrincipalsModificationKind REPLACE = fromString("Replace"); + + /** Static value None for PrincipalsModificationKind. */ + public static final PrincipalsModificationKind NONE = fromString("None"); + + /** + * Creates or finds a PrincipalsModificationKind from its string representation. + * @param name a name to look for + * @return the corresponding PrincipalsModificationKind + */ + @JsonCreator + public static PrincipalsModificationKind fromString(String name) { + return fromString(name, PrincipalsModificationKind.class); + } + + /** + * @return known PrincipalsModificationKind values + */ + public static Collection values() { + return values(PrincipalsModificationKind.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ProvisioningState.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ProvisioningState.java new file mode 100644 index 000000000000..856911f0f83b --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ProvisioningState.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProvisioningState. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Running for ProvisioningState. */ + public static final ProvisioningState RUNNING = fromString("Running"); + + /** Static value Creating for ProvisioningState. */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Moving for ProvisioningState. */ + public static final ProvisioningState MOVING = fromString("Moving"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProvisioningState + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * @return known ProvisioningState values + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ReadOnlyFollowingDatabase.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ReadOnlyFollowingDatabase.java new file mode 100644 index 000000000000..f8a99e6aaaf0 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ReadOnlyFollowingDatabase.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import org.joda.time.Period; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabaseInner; + +/** + * Class representing a read only following database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = ReadOnlyFollowingDatabase.class) +@JsonTypeName("ReadOnlyFollowing") +@JsonFlatten +public class ReadOnlyFollowingDatabase extends DatabaseInner { + /** + * The provisioned state of the resource. Possible values include: + * 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The time the data should be kept before it stops being accessible to + * queries in TimeSpan. + */ + @JsonProperty(value = "properties.softDeletePeriod", access = JsonProperty.Access.WRITE_ONLY) + private Period softDeletePeriod; + + /** + * The time the data should be kept in cache for fast queries in TimeSpan. + */ + @JsonProperty(value = "properties.hotCachePeriod") + private Period hotCachePeriod; + + /** + * The statistics of the database. + */ + @JsonProperty(value = "properties.statistics") + private DatabaseStatistics statistics; + + /** + * The name of the leader cluster. + */ + @JsonProperty(value = "properties.leaderClusterResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String leaderClusterResourceId; + + /** + * The name of the attached database configuration cluster. + */ + @JsonProperty(value = "properties.attachedDatabaseConfigurationName", access = JsonProperty.Access.WRITE_ONLY) + private String attachedDatabaseConfigurationName; + + /** + * The principals modification kind of the database. Possible values + * include: 'Union', 'Replace', 'None'. + */ + @JsonProperty(value = "properties.principalsModificationKind", access = JsonProperty.Access.WRITE_ONLY) + private PrincipalsModificationKind principalsModificationKind; + + /** + * Get the provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the time the data should be kept before it stops being accessible to queries in TimeSpan. + * + * @return the softDeletePeriod value + */ + public Period softDeletePeriod() { + return this.softDeletePeriod; + } + + /** + * Get the time the data should be kept in cache for fast queries in TimeSpan. + * + * @return the hotCachePeriod value + */ + public Period hotCachePeriod() { + return this.hotCachePeriod; + } + + /** + * Set the time the data should be kept in cache for fast queries in TimeSpan. + * + * @param hotCachePeriod the hotCachePeriod value to set + * @return the ReadOnlyFollowingDatabase object itself. + */ + public ReadOnlyFollowingDatabase withHotCachePeriod(Period hotCachePeriod) { + this.hotCachePeriod = hotCachePeriod; + return this; + } + + /** + * Get the statistics of the database. + * + * @return the statistics value + */ + public DatabaseStatistics statistics() { + return this.statistics; + } + + /** + * Set the statistics of the database. + * + * @param statistics the statistics value to set + * @return the ReadOnlyFollowingDatabase object itself. + */ + public ReadOnlyFollowingDatabase withStatistics(DatabaseStatistics statistics) { + this.statistics = statistics; + return this; + } + + /** + * Get the name of the leader cluster. + * + * @return the leaderClusterResourceId value + */ + public String leaderClusterResourceId() { + return this.leaderClusterResourceId; + } + + /** + * Get the name of the attached database configuration cluster. + * + * @return the attachedDatabaseConfigurationName value + */ + public String attachedDatabaseConfigurationName() { + return this.attachedDatabaseConfigurationName; + } + + /** + * Get the principals modification kind of the database. Possible values include: 'Union', 'Replace', 'None'. + * + * @return the principalsModificationKind value + */ + public PrincipalsModificationKind principalsModificationKind() { + return this.principalsModificationKind; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ReadWriteDatabase.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ReadWriteDatabase.java new file mode 100644 index 000000000000..b93716d982fa --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/ReadWriteDatabase.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import org.joda.time.Period; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.DatabaseInner; + +/** + * Class representing a read write database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = ReadWriteDatabase.class) +@JsonTypeName("ReadWrite") +@JsonFlatten +public class ReadWriteDatabase extends DatabaseInner { + /** + * The provisioned state of the resource. Possible values include: + * 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The time the data should be kept before it stops being accessible to + * queries in TimeSpan. + */ + @JsonProperty(value = "properties.softDeletePeriod") + private Period softDeletePeriod; + + /** + * The time the data should be kept in cache for fast queries in TimeSpan. + */ + @JsonProperty(value = "properties.hotCachePeriod") + private Period hotCachePeriod; + + /** + * The statistics of the database. + */ + @JsonProperty(value = "properties.statistics") + private DatabaseStatistics statistics; + + /** + * Indicates whether the database is followed. + */ + @JsonProperty(value = "properties.isFollowed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isFollowed; + + /** + * Get the provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the time the data should be kept before it stops being accessible to queries in TimeSpan. + * + * @return the softDeletePeriod value + */ + public Period softDeletePeriod() { + return this.softDeletePeriod; + } + + /** + * Set the time the data should be kept before it stops being accessible to queries in TimeSpan. + * + * @param softDeletePeriod the softDeletePeriod value to set + * @return the ReadWriteDatabase object itself. + */ + public ReadWriteDatabase withSoftDeletePeriod(Period softDeletePeriod) { + this.softDeletePeriod = softDeletePeriod; + return this; + } + + /** + * Get the time the data should be kept in cache for fast queries in TimeSpan. + * + * @return the hotCachePeriod value + */ + public Period hotCachePeriod() { + return this.hotCachePeriod; + } + + /** + * Set the time the data should be kept in cache for fast queries in TimeSpan. + * + * @param hotCachePeriod the hotCachePeriod value to set + * @return the ReadWriteDatabase object itself. + */ + public ReadWriteDatabase withHotCachePeriod(Period hotCachePeriod) { + this.hotCachePeriod = hotCachePeriod; + return this; + } + + /** + * Get the statistics of the database. + * + * @return the statistics value + */ + public DatabaseStatistics statistics() { + return this.statistics; + } + + /** + * Set the statistics of the database. + * + * @param statistics the statistics value to set + * @return the ReadWriteDatabase object itself. + */ + public ReadWriteDatabase withStatistics(DatabaseStatistics statistics) { + this.statistics = statistics; + return this; + } + + /** + * Get indicates whether the database is followed. + * + * @return the isFollowed value + */ + public Boolean isFollowed() { + return this.isFollowed; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Reason.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Reason.java new file mode 100644 index 000000000000..6e554eab95c5 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Reason.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Reason. + */ +public final class Reason extends ExpandableStringEnum { + /** Static value Invalid for Reason. */ + public static final Reason INVALID = fromString("Invalid"); + + /** Static value AlreadyExists for Reason. */ + public static final Reason ALREADY_EXISTS = fromString("AlreadyExists"); + + /** + * Creates or finds a Reason from its string representation. + * @param name a name to look for + * @return the corresponding Reason + */ + @JsonCreator + public static Reason fromString(String name) { + return fromString(name, Reason.class); + } + + /** + * @return known Reason values + */ + public static Collection values() { + return values(Reason.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/SkuDescription.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/SkuDescription.java new file mode 100644 index 000000000000..43f539d5676a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/SkuDescription.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.KustoManager; +import com.microsoft.azure.management.kusto.v2020_06_14.implementation.SkuDescriptionInner; +import java.util.List; + +/** + * Type representing SkuDescription. + */ +public interface SkuDescription extends HasInner, HasManager { + /** + * @return the locationInfo value. + */ + List locationInfo(); + + /** + * @return the locations value. + */ + List locations(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the restrictions value. + */ + List restrictions(); + + /** + * @return the tier value. + */ + String tier(); + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/SkuLocationInfoItem.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/SkuLocationInfoItem.java new file mode 100644 index 000000000000..9a23bbe88cfb --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/SkuLocationInfoItem.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The locations and zones info for SKU. + */ +public class SkuLocationInfoItem { + /** + * The available location of the SKU. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * The available zone of the SKU. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * Get the available location of the SKU. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the available location of the SKU. + * + * @param location the location value to set + * @return the SkuLocationInfoItem object itself. + */ + public SkuLocationInfoItem withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the available zone of the SKU. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set the available zone of the SKU. + * + * @param zones the zones value to set + * @return the SkuLocationInfoItem object itself. + */ + public SkuLocationInfoItem withZones(List zones) { + this.zones = zones; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/State.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/State.java new file mode 100644 index 000000000000..5e9bf38b1e29 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/State.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for State. + */ +public final class State extends ExpandableStringEnum { + /** Static value Creating for State. */ + public static final State CREATING = fromString("Creating"); + + /** Static value Unavailable for State. */ + public static final State UNAVAILABLE = fromString("Unavailable"); + + /** Static value Running for State. */ + public static final State RUNNING = fromString("Running"); + + /** Static value Deleting for State. */ + public static final State DELETING = fromString("Deleting"); + + /** Static value Deleted for State. */ + public static final State DELETED = fromString("Deleted"); + + /** Static value Stopping for State. */ + public static final State STOPPING = fromString("Stopping"); + + /** Static value Stopped for State. */ + public static final State STOPPED = fromString("Stopped"); + + /** Static value Starting for State. */ + public static final State STARTING = fromString("Starting"); + + /** Static value Updating for State. */ + public static final State UPDATING = fromString("Updating"); + + /** + * Creates or finds a State from its string representation. + * @param name a name to look for + * @return the corresponding State + */ + @JsonCreator + public static State fromString(String name) { + return fromString(name, State.class); + } + + /** + * @return known State values + */ + public static Collection values() { + return values(State.class); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/TrustedExternalTenant.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/TrustedExternalTenant.java new file mode 100644 index 000000000000..e532b4d677af --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/TrustedExternalTenant.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents a tenant ID that is trusted by the cluster. + */ +public class TrustedExternalTenant { + /** + * GUID representing an external tenant. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get gUID representing an external tenant. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set gUID representing an external tenant. + * + * @param value the value value to set + * @return the TrustedExternalTenant object itself. + */ + public TrustedExternalTenant withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Type.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Type.java new file mode 100644 index 000000000000..ad7ce2a71971 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/Type.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for Type. + */ +public enum Type { + /** Enum value Microsoft.Kusto/clusters/databases. */ + MICROSOFT_KUSTOCLUSTERSDATABASES("Microsoft.Kusto/clusters/databases"), + + /** Enum value Microsoft.Kusto/clusters/attachedDatabaseConfigurations. */ + MICROSOFT_KUSTOCLUSTERSATTACHED_DATABASE_CONFIGURATIONS("Microsoft.Kusto/clusters/attachedDatabaseConfigurations"); + + /** The actual serialized value for a Type instance. */ + private String value; + + Type(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Type instance. + * + * @param value the serialized value to parse. + * @return the parsed Type object, or null if unable to parse. + */ + @JsonCreator + public static Type fromString(String value) { + Type[] items = Type.values(); + for (Type item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/VirtualNetworkConfiguration.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/VirtualNetworkConfiguration.java new file mode 100644 index 000000000000..ec3e91d56866 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/VirtualNetworkConfiguration.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class that contains virtual network definition. + */ +public class VirtualNetworkConfiguration { + /** + * The subnet resource id. + */ + @JsonProperty(value = "subnetId", required = true) + private String subnetId; + + /** + * Engine service's public IP address resource id. + */ + @JsonProperty(value = "enginePublicIpId", required = true) + private String enginePublicIpId; + + /** + * Data management's service public IP address resource id. + */ + @JsonProperty(value = "dataManagementPublicIpId", required = true) + private String dataManagementPublicIpId; + + /** + * Get the subnet resource id. + * + * @return the subnetId value + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnet resource id. + * + * @param subnetId the subnetId value to set + * @return the VirtualNetworkConfiguration object itself. + */ + public VirtualNetworkConfiguration withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Get engine service's public IP address resource id. + * + * @return the enginePublicIpId value + */ + public String enginePublicIpId() { + return this.enginePublicIpId; + } + + /** + * Set engine service's public IP address resource id. + * + * @param enginePublicIpId the enginePublicIpId value to set + * @return the VirtualNetworkConfiguration object itself. + */ + public VirtualNetworkConfiguration withEnginePublicIpId(String enginePublicIpId) { + this.enginePublicIpId = enginePublicIpId; + return this; + } + + /** + * Get data management's service public IP address resource id. + * + * @return the dataManagementPublicIpId value + */ + public String dataManagementPublicIpId() { + return this.dataManagementPublicIpId; + } + + /** + * Set data management's service public IP address resource id. + * + * @param dataManagementPublicIpId the dataManagementPublicIpId value to set + * @return the VirtualNetworkConfiguration object itself. + */ + public VirtualNetworkConfiguration withDataManagementPublicIpId(String dataManagementPublicIpId) { + this.dataManagementPublicIpId = dataManagementPublicIpId; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationImpl.java new file mode 100644 index 000000000000..6abe19172248 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationImpl.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfiguration; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.ProvisioningState; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.DefaultPrincipalsModificationKind; + +class AttachedDatabaseConfigurationImpl extends CreatableUpdatableImpl implements AttachedDatabaseConfiguration, AttachedDatabaseConfiguration.Definition, AttachedDatabaseConfiguration.Update { + private final KustoManager manager; + private String resourceGroupName; + private String clusterName; + private String attachedDatabaseConfigurationName; + + AttachedDatabaseConfigurationImpl(String name, KustoManager manager) { + super(name, new AttachedDatabaseConfigurationInner()); + this.manager = manager; + // Set resource name + this.attachedDatabaseConfigurationName = name; + // + } + + AttachedDatabaseConfigurationImpl(AttachedDatabaseConfigurationInner inner, KustoManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.attachedDatabaseConfigurationName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.clusterName = IdParsingUtils.getValueFromIdByName(inner.id(), "clusters"); + this.attachedDatabaseConfigurationName = IdParsingUtils.getValueFromIdByName(inner.id(), "attachedDatabaseConfigurations"); + // + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + AttachedDatabaseConfigurationsInner client = this.manager().inner().attachedDatabaseConfigurations(); + return client.createOrUpdateAsync(this.resourceGroupName, this.clusterName, this.attachedDatabaseConfigurationName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AttachedDatabaseConfigurationsInner client = this.manager().inner().attachedDatabaseConfigurations(); + return client.createOrUpdateAsync(this.resourceGroupName, this.clusterName, this.attachedDatabaseConfigurationName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AttachedDatabaseConfigurationsInner client = this.manager().inner().attachedDatabaseConfigurations(); + return client.getAsync(this.resourceGroupName, this.clusterName, this.attachedDatabaseConfigurationName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List attachedDatabaseNames() { + return this.inner().attachedDatabaseNames(); + } + + @Override + public String clusterResourceId() { + return this.inner().clusterResourceId(); + } + + @Override + public String databaseName() { + return this.inner().databaseName(); + } + + @Override + public DefaultPrincipalsModificationKind defaultPrincipalsModificationKind() { + return this.inner().defaultPrincipalsModificationKind(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public AttachedDatabaseConfigurationImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + @Override + public AttachedDatabaseConfigurationImpl withClusterResourceId(String clusterResourceId) { + this.inner().withClusterResourceId(clusterResourceId); + return this; + } + + @Override + public AttachedDatabaseConfigurationImpl withDatabaseName(String databaseName) { + this.inner().withDatabaseName(databaseName); + return this; + } + + @Override + public AttachedDatabaseConfigurationImpl withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind defaultPrincipalsModificationKind) { + this.inner().withDefaultPrincipalsModificationKind(defaultPrincipalsModificationKind); + return this; + } + + @Override + public AttachedDatabaseConfigurationImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationInner.java new file mode 100644 index 000000000000..47c519a9c0af --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationInner.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.ProvisioningState; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.DefaultPrincipalsModificationKind; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Class representing an attached database configuration. + */ +@JsonFlatten +public class AttachedDatabaseConfigurationInner extends ProxyResource { + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * The provisioned state of the resource. Possible values include: + * 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The name of the database which you would like to attach, use * if you + * want to follow all current and future databases. + */ + @JsonProperty(value = "properties.databaseName", required = true) + private String databaseName; + + /** + * The resource id of the cluster where the databases you would like to + * attach reside. + */ + @JsonProperty(value = "properties.clusterResourceId", required = true) + private String clusterResourceId; + + /** + * The list of databases from the clusterResourceId which are currently + * attached to the cluster. + */ + @JsonProperty(value = "properties.attachedDatabaseNames", access = JsonProperty.Access.WRITE_ONLY) + private List attachedDatabaseNames; + + /** + * The default principals modification kind. Possible values include: + * 'Union', 'Replace', 'None'. + */ + @JsonProperty(value = "properties.defaultPrincipalsModificationKind", required = true) + private DefaultPrincipalsModificationKind defaultPrincipalsModificationKind; + + /** + * Get resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource location. + * + * @param location the location value to set + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the database which you would like to attach, use * if you want to follow all current and future databases. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database which you would like to attach, use * if you want to follow all current and future databases. + * + * @param databaseName the databaseName value to set + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the resource id of the cluster where the databases you would like to attach reside. + * + * @return the clusterResourceId value + */ + public String clusterResourceId() { + return this.clusterResourceId; + } + + /** + * Set the resource id of the cluster where the databases you would like to attach reside. + * + * @param clusterResourceId the clusterResourceId value to set + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withClusterResourceId(String clusterResourceId) { + this.clusterResourceId = clusterResourceId; + return this; + } + + /** + * Get the list of databases from the clusterResourceId which are currently attached to the cluster. + * + * @return the attachedDatabaseNames value + */ + public List attachedDatabaseNames() { + return this.attachedDatabaseNames; + } + + /** + * Get the default principals modification kind. Possible values include: 'Union', 'Replace', 'None'. + * + * @return the defaultPrincipalsModificationKind value + */ + public DefaultPrincipalsModificationKind defaultPrincipalsModificationKind() { + return this.defaultPrincipalsModificationKind; + } + + /** + * Set the default principals modification kind. Possible values include: 'Union', 'Replace', 'None'. + * + * @param defaultPrincipalsModificationKind the defaultPrincipalsModificationKind value to set + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind defaultPrincipalsModificationKind) { + this.defaultPrincipalsModificationKind = defaultPrincipalsModificationKind; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationsImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationsImpl.java new file mode 100644 index 000000000000..829c0142416a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationsImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfigurations; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfiguration; + +class AttachedDatabaseConfigurationsImpl extends WrapperImpl implements AttachedDatabaseConfigurations { + private final KustoManager manager; + + AttachedDatabaseConfigurationsImpl(KustoManager manager) { + super(manager.inner().attachedDatabaseConfigurations()); + this.manager = manager; + } + + public KustoManager manager() { + return this.manager; + } + + @Override + public AttachedDatabaseConfigurationImpl define(String name) { + return wrapModel(name); + } + + private AttachedDatabaseConfigurationImpl wrapModel(AttachedDatabaseConfigurationInner inner) { + return new AttachedDatabaseConfigurationImpl(inner, manager()); + } + + private AttachedDatabaseConfigurationImpl wrapModel(String name) { + return new AttachedDatabaseConfigurationImpl(name, this.manager()); + } + + @Override + public Observable listByClusterAsync(String resourceGroupName, String clusterName) { + AttachedDatabaseConfigurationsInner client = this.inner(); + return client.listByClusterAsync(resourceGroupName, clusterName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public AttachedDatabaseConfiguration call(AttachedDatabaseConfigurationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + AttachedDatabaseConfigurationsInner client = this.inner(); + return client.getAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName) + .flatMap(new Func1>() { + @Override + public Observable call(AttachedDatabaseConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AttachedDatabaseConfiguration)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + AttachedDatabaseConfigurationsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName).toCompletable(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationsInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationsInner.java new file mode 100644 index 000000000000..75f5c9975c91 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AttachedDatabaseConfigurationsInner.java @@ -0,0 +1,625 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AttachedDatabaseConfigurations. + */ +public class AttachedDatabaseConfigurationsInner { + /** The Retrofit service to perform REST calls. */ + private AttachedDatabaseConfigurationsService service; + /** The service client containing this operation class. */ + private KustoManagementClientImpl client; + + /** + * Initializes an instance of AttachedDatabaseConfigurationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AttachedDatabaseConfigurationsInner(Retrofit retrofit, KustoManagementClientImpl client) { + this.service = retrofit.create(AttachedDatabaseConfigurationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for AttachedDatabaseConfigurations to be + * used by Retrofit to perform actually REST calls. + */ + interface AttachedDatabaseConfigurationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfigurations listByCluster" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations") + Observable> listByCluster(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfigurations get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("attachedDatabaseConfigurationName") String attachedDatabaseConfigurationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfigurations createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("attachedDatabaseConfigurationName") String attachedDatabaseConfigurationName, @Path("subscriptionId") String subscriptionId, @Body AttachedDatabaseConfigurationInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfigurations beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("attachedDatabaseConfigurationName") String attachedDatabaseConfigurationName, @Path("subscriptionId") String subscriptionId, @Body AttachedDatabaseConfigurationInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfigurations delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("attachedDatabaseConfigurationName") String attachedDatabaseConfigurationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfigurations beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("attachedDatabaseConfigurationName") String attachedDatabaseConfigurationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Returns the list of attached database configurations of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<AttachedDatabaseConfigurationInner> object if successful. + */ + public List listByCluster(String resourceGroupName, String clusterName) { + return listByClusterWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Returns the list of attached database configurations of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByClusterAsync(String resourceGroupName, String clusterName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByClusterWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Returns the list of attached database configurations of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<AttachedDatabaseConfigurationInner> object + */ + public Observable> listByClusterAsync(String resourceGroupName, String clusterName) { + return listByClusterWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of attached database configurations of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<AttachedDatabaseConfigurationInner> object + */ + public Observable>> listByClusterWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByCluster(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByClusterDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByClusterDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AttachedDatabaseConfigurationInner object if successful. + */ + public AttachedDatabaseConfigurationInner get(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName).toBlocking().single().body(); + } + + /** + * Returns an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName), serviceCallback); + } + + /** + * Returns an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AttachedDatabaseConfigurationInner object + */ + public Observable getAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName).map(new Func1, AttachedDatabaseConfigurationInner>() { + @Override + public AttachedDatabaseConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AttachedDatabaseConfigurationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (attachedDatabaseConfigurationName == null) { + throw new IllegalArgumentException("Parameter attachedDatabaseConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, clusterName, attachedDatabaseConfigurationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AttachedDatabaseConfigurationInner object if successful. + */ + public AttachedDatabaseConfigurationInner createOrUpdate(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, AttachedDatabaseConfigurationInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, AttachedDatabaseConfigurationInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters), serviceCallback); + } + + /** + * Creates or updates an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, AttachedDatabaseConfigurationInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters).map(new Func1, AttachedDatabaseConfigurationInner>() { + @Override + public AttachedDatabaseConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, AttachedDatabaseConfigurationInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (attachedDatabaseConfigurationName == null) { + throw new IllegalArgumentException("Parameter attachedDatabaseConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(resourceGroupName, clusterName, attachedDatabaseConfigurationName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AttachedDatabaseConfigurationInner object if successful. + */ + public AttachedDatabaseConfigurationInner beginCreateOrUpdate(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, AttachedDatabaseConfigurationInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, AttachedDatabaseConfigurationInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters), serviceCallback); + } + + /** + * Creates or updates an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AttachedDatabaseConfigurationInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, AttachedDatabaseConfigurationInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters).map(new Func1, AttachedDatabaseConfigurationInner>() { + @Override + public AttachedDatabaseConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an attached database configuration. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AttachedDatabaseConfigurationInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, AttachedDatabaseConfigurationInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (attachedDatabaseConfigurationName == null) { + throw new IllegalArgumentException("Parameter attachedDatabaseConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(resourceGroupName, clusterName, attachedDatabaseConfigurationName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName).toBlocking().last().body(); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName), serviceCallback); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (attachedDatabaseConfigurationName == null) { + throw new IllegalArgumentException("Parameter attachedDatabaseConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, clusterName, attachedDatabaseConfigurationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName).toBlocking().single().body(); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName), serviceCallback); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (attachedDatabaseConfigurationName == null) { + throw new IllegalArgumentException("Parameter attachedDatabaseConfigurationName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, clusterName, attachedDatabaseConfigurationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AzureResourceSkuImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AzureResourceSkuImpl.java new file mode 100644 index 000000000000..da2358e5def5 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AzureResourceSkuImpl.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.AzureResourceSku; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.AzureCapacity; +import com.microsoft.azure.management.kusto.v2020_06_14.AzureSku; + +class AzureResourceSkuImpl extends WrapperImpl implements AzureResourceSku { + private final KustoManager manager; + + AzureResourceSkuImpl(AzureResourceSkuInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + + + @Override + public AzureCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public AzureSku sku() { + return this.inner().sku(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AzureResourceSkuInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AzureResourceSkuInner.java new file mode 100644 index 000000000000..d06bd64fb7ca --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/AzureResourceSkuInner.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.AzureSku; +import com.microsoft.azure.management.kusto.v2020_06_14.AzureCapacity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure resource SKU definition. + */ +public class AzureResourceSkuInner { + /** + * Resource Namespace and Type. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * The SKU details. + */ + @JsonProperty(value = "sku") + private AzureSku sku; + + /** + * The number of instances of the cluster. + */ + @JsonProperty(value = "capacity") + private AzureCapacity capacity; + + /** + * Get resource Namespace and Type. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set resource Namespace and Type. + * + * @param resourceType the resourceType value to set + * @return the AzureResourceSkuInner object itself. + */ + public AzureResourceSkuInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the SKU details. + * + * @return the sku value + */ + public AzureSku sku() { + return this.sku; + } + + /** + * Set the SKU details. + * + * @param sku the sku value to set + * @return the AzureResourceSkuInner object itself. + */ + public AzureResourceSkuInner withSku(AzureSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the number of instances of the cluster. + * + * @return the capacity value + */ + public AzureCapacity capacity() { + return this.capacity; + } + + /** + * Set the number of instances of the cluster. + * + * @param capacity the capacity value to set + * @return the AzureResourceSkuInner object itself. + */ + public AzureResourceSkuInner withCapacity(AzureCapacity capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/CheckNameResultImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/CheckNameResultImpl.java new file mode 100644 index 000000000000..3d37b59e5274 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/CheckNameResultImpl.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.CheckNameResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.Reason; + +class CheckNameResultImpl extends WrapperImpl implements CheckNameResult { + private final KustoManager manager; + CheckNameResultImpl(CheckNameResultInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public Reason reason() { + return this.inner().reason(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/CheckNameResultInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/CheckNameResultInner.java new file mode 100644 index 000000000000..b29c499f8d7a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/CheckNameResultInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.Reason; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The result returned from a check name availability request. + */ +public class CheckNameResultInner { + /** + * Specifies a Boolean value that indicates if the name is available. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * The name that was checked. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Message indicating an unavailable name due to a conflict, or a + * description of the naming rules that are violated. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Message providing the reason why the given name is invalid. Possible + * values include: 'Invalid', 'AlreadyExists'. + */ + @JsonProperty(value = "reason") + private Reason reason; + + /** + * Get specifies a Boolean value that indicates if the name is available. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set specifies a Boolean value that indicates if the name is available. + * + * @param nameAvailable the nameAvailable value to set + * @return the CheckNameResultInner object itself. + */ + public CheckNameResultInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the name that was checked. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name that was checked. + * + * @param name the name value to set + * @return the CheckNameResultInner object itself. + */ + public CheckNameResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. + * + * @param message the message value to set + * @return the CheckNameResultInner object itself. + */ + public CheckNameResultInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get message providing the reason why the given name is invalid. Possible values include: 'Invalid', 'AlreadyExists'. + * + * @return the reason value + */ + public Reason reason() { + return this.reason; + } + + /** + * Set message providing the reason why the given name is invalid. Possible values include: 'Invalid', 'AlreadyExists'. + * + * @param reason the reason value to set + * @return the CheckNameResultInner object itself. + */ + public CheckNameResultInner withReason(Reason reason) { + this.reason = reason; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterImpl.java new file mode 100644 index 000000000000..97d8a7aeb676 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterImpl.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.Cluster; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterUpdate; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.AzureSku; +import com.microsoft.azure.management.kusto.v2020_06_14.Identity; +import com.microsoft.azure.management.kusto.v2020_06_14.State; +import com.microsoft.azure.management.kusto.v2020_06_14.ProvisioningState; +import com.microsoft.azure.management.kusto.v2020_06_14.TrustedExternalTenant; +import com.microsoft.azure.management.kusto.v2020_06_14.OptimizedAutoscale; +import com.microsoft.azure.management.kusto.v2020_06_14.VirtualNetworkConfiguration; +import com.microsoft.azure.management.kusto.v2020_06_14.KeyVaultProperties; +import com.microsoft.azure.management.kusto.v2020_06_14.LanguageExtensionsList; +import rx.functions.Func1; + +class ClusterImpl extends GroupableResourceCoreImpl implements Cluster, Cluster.Definition, Cluster.Update { + private ClusterUpdate updateParameter; + ClusterImpl(String name, ClusterInner inner, KustoManager manager) { + super(name, inner, manager); + this.updateParameter = new ClusterUpdate(); + } + + @Override + public Observable createResourceAsync() { + ClustersInner client = this.manager().inner().clusters(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public ClusterInner call(ClusterInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ClustersInner client = this.manager().inner().clusters(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public ClusterInner call(ClusterInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ClustersInner client = this.manager().inner().clusters(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new ClusterUpdate(); + } + + @Override + public String dataIngestionUri() { + return this.inner().dataIngestionUri(); + } + + @Override + public Boolean enableDiskEncryption() { + return this.inner().enableDiskEncryption(); + } + + @Override + public Boolean enableDoubleEncryption() { + return this.inner().enableDoubleEncryption(); + } + + @Override + public Boolean enablePurge() { + return this.inner().enablePurge(); + } + + @Override + public Boolean enableStreamingIngest() { + return this.inner().enableStreamingIngest(); + } + + @Override + public Identity identity() { + return this.inner().identity(); + } + + @Override + public KeyVaultProperties keyVaultProperties() { + return this.inner().keyVaultProperties(); + } + + @Override + public LanguageExtensionsList languageExtensions() { + return this.inner().languageExtensions(); + } + + @Override + public OptimizedAutoscale optimizedAutoscale() { + return this.inner().optimizedAutoscale(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public AzureSku sku() { + return this.inner().sku(); + } + + @Override + public State state() { + return this.inner().state(); + } + + @Override + public String stateReason() { + return this.inner().stateReason(); + } + + @Override + public List trustedExternalTenants() { + return this.inner().trustedExternalTenants(); + } + + @Override + public String uri() { + return this.inner().uri(); + } + + @Override + public VirtualNetworkConfiguration virtualNetworkConfiguration() { + return this.inner().virtualNetworkConfiguration(); + } + + @Override + public List zones() { + return this.inner().zones(); + } + + @Override + public ClusterImpl withZones(List zones) { + this.inner().withZones(zones); + return this; + } + + @Override + public ClusterImpl withSku(AzureSku sku) { + if (isInCreateMode()) { + this.inner().withSku(sku); + } else { + this.updateParameter.withSku(sku); + } + return this; + } + + @Override + public ClusterImpl withEnableDiskEncryption(Boolean enableDiskEncryption) { + if (isInCreateMode()) { + this.inner().withEnableDiskEncryption(enableDiskEncryption); + } else { + this.updateParameter.withEnableDiskEncryption(enableDiskEncryption); + } + return this; + } + + @Override + public ClusterImpl withEnableDoubleEncryption(Boolean enableDoubleEncryption) { + if (isInCreateMode()) { + this.inner().withEnableDoubleEncryption(enableDoubleEncryption); + } else { + this.updateParameter.withEnableDoubleEncryption(enableDoubleEncryption); + } + return this; + } + + @Override + public ClusterImpl withEnablePurge(Boolean enablePurge) { + if (isInCreateMode()) { + this.inner().withEnablePurge(enablePurge); + } else { + this.updateParameter.withEnablePurge(enablePurge); + } + return this; + } + + @Override + public ClusterImpl withEnableStreamingIngest(Boolean enableStreamingIngest) { + if (isInCreateMode()) { + this.inner().withEnableStreamingIngest(enableStreamingIngest); + } else { + this.updateParameter.withEnableStreamingIngest(enableStreamingIngest); + } + return this; + } + + @Override + public ClusterImpl withIdentity(Identity identity) { + if (isInCreateMode()) { + this.inner().withIdentity(identity); + } else { + this.updateParameter.withIdentity(identity); + } + return this; + } + + @Override + public ClusterImpl withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { + if (isInCreateMode()) { + this.inner().withKeyVaultProperties(keyVaultProperties); + } else { + this.updateParameter.withKeyVaultProperties(keyVaultProperties); + } + return this; + } + + @Override + public ClusterImpl withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale) { + if (isInCreateMode()) { + this.inner().withOptimizedAutoscale(optimizedAutoscale); + } else { + this.updateParameter.withOptimizedAutoscale(optimizedAutoscale); + } + return this; + } + + @Override + public ClusterImpl withTrustedExternalTenants(List trustedExternalTenants) { + if (isInCreateMode()) { + this.inner().withTrustedExternalTenants(trustedExternalTenants); + } else { + this.updateParameter.withTrustedExternalTenants(trustedExternalTenants); + } + return this; + } + + @Override + public ClusterImpl withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration) { + if (isInCreateMode()) { + this.inner().withVirtualNetworkConfiguration(virtualNetworkConfiguration); + } else { + this.updateParameter.withVirtualNetworkConfiguration(virtualNetworkConfiguration); + } + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterInner.java new file mode 100644 index 000000000000..0ff5aa26128f --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterInner.java @@ -0,0 +1,409 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.AzureSku; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.Identity; +import com.microsoft.azure.management.kusto.v2020_06_14.State; +import com.microsoft.azure.management.kusto.v2020_06_14.ProvisioningState; +import com.microsoft.azure.management.kusto.v2020_06_14.TrustedExternalTenant; +import com.microsoft.azure.management.kusto.v2020_06_14.OptimizedAutoscale; +import com.microsoft.azure.management.kusto.v2020_06_14.VirtualNetworkConfiguration; +import com.microsoft.azure.management.kusto.v2020_06_14.KeyVaultProperties; +import com.microsoft.azure.management.kusto.v2020_06_14.LanguageExtensionsList; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Class representing a Kusto cluster. + */ +@JsonFlatten +public class ClusterInner extends Resource { + /** + * The SKU of the cluster. + */ + @JsonProperty(value = "sku", required = true) + private AzureSku sku; + + /** + * The availability zones of the cluster. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * The identity of the cluster, if configured. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * The state of the resource. Possible values include: 'Creating', + * 'Unavailable', 'Running', 'Deleting', 'Deleted', 'Stopping', 'Stopped', + * 'Starting', 'Updating'. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private State state; + + /** + * The provisioned state of the resource. Possible values include: + * 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The cluster URI. + */ + @JsonProperty(value = "properties.uri", access = JsonProperty.Access.WRITE_ONLY) + private String uri; + + /** + * The cluster data ingestion URI. + */ + @JsonProperty(value = "properties.dataIngestionUri", access = JsonProperty.Access.WRITE_ONLY) + private String dataIngestionUri; + + /** + * The reason for the cluster's current state. + */ + @JsonProperty(value = "properties.stateReason", access = JsonProperty.Access.WRITE_ONLY) + private String stateReason; + + /** + * The cluster's external tenants. + */ + @JsonProperty(value = "properties.trustedExternalTenants") + private List trustedExternalTenants; + + /** + * Optimized auto scale definition. + */ + @JsonProperty(value = "properties.optimizedAutoscale") + private OptimizedAutoscale optimizedAutoscale; + + /** + * A boolean value that indicates if the cluster's disks are encrypted. + */ + @JsonProperty(value = "properties.enableDiskEncryption") + private Boolean enableDiskEncryption; + + /** + * A boolean value that indicates if the streaming ingest is enabled. + */ + @JsonProperty(value = "properties.enableStreamingIngest") + private Boolean enableStreamingIngest; + + /** + * Virtual network definition. + */ + @JsonProperty(value = "properties.virtualNetworkConfiguration") + private VirtualNetworkConfiguration virtualNetworkConfiguration; + + /** + * KeyVault properties for the cluster encryption. + */ + @JsonProperty(value = "properties.keyVaultProperties") + private KeyVaultProperties keyVaultProperties; + + /** + * A boolean value that indicates if the purge operations are enabled. + */ + @JsonProperty(value = "properties.enablePurge") + private Boolean enablePurge; + + /** + * List of the cluster's language extensions. + */ + @JsonProperty(value = "properties.languageExtensions", access = JsonProperty.Access.WRITE_ONLY) + private LanguageExtensionsList languageExtensions; + + /** + * A boolean value that indicates if double encryption is enabled. + */ + @JsonProperty(value = "properties.enableDoubleEncryption") + private Boolean enableDoubleEncryption; + + /** + * Get the SKU of the cluster. + * + * @return the sku value + */ + public AzureSku sku() { + return this.sku; + } + + /** + * Set the SKU of the cluster. + * + * @param sku the sku value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withSku(AzureSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the availability zones of the cluster. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set the availability zones of the cluster. + * + * @param zones the zones value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the identity of the cluster, if configured. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity of the cluster, if configured. + * + * @param identity the identity value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get the state of the resource. Possible values include: 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted', 'Stopping', 'Stopped', 'Starting', 'Updating'. + * + * @return the state value + */ + public State state() { + return this.state; + } + + /** + * Get the provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the cluster URI. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Get the cluster data ingestion URI. + * + * @return the dataIngestionUri value + */ + public String dataIngestionUri() { + return this.dataIngestionUri; + } + + /** + * Get the reason for the cluster's current state. + * + * @return the stateReason value + */ + public String stateReason() { + return this.stateReason; + } + + /** + * Get the cluster's external tenants. + * + * @return the trustedExternalTenants value + */ + public List trustedExternalTenants() { + return this.trustedExternalTenants; + } + + /** + * Set the cluster's external tenants. + * + * @param trustedExternalTenants the trustedExternalTenants value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withTrustedExternalTenants(List trustedExternalTenants) { + this.trustedExternalTenants = trustedExternalTenants; + return this; + } + + /** + * Get optimized auto scale definition. + * + * @return the optimizedAutoscale value + */ + public OptimizedAutoscale optimizedAutoscale() { + return this.optimizedAutoscale; + } + + /** + * Set optimized auto scale definition. + * + * @param optimizedAutoscale the optimizedAutoscale value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale) { + this.optimizedAutoscale = optimizedAutoscale; + return this; + } + + /** + * Get a boolean value that indicates if the cluster's disks are encrypted. + * + * @return the enableDiskEncryption value + */ + public Boolean enableDiskEncryption() { + return this.enableDiskEncryption; + } + + /** + * Set a boolean value that indicates if the cluster's disks are encrypted. + * + * @param enableDiskEncryption the enableDiskEncryption value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withEnableDiskEncryption(Boolean enableDiskEncryption) { + this.enableDiskEncryption = enableDiskEncryption; + return this; + } + + /** + * Get a boolean value that indicates if the streaming ingest is enabled. + * + * @return the enableStreamingIngest value + */ + public Boolean enableStreamingIngest() { + return this.enableStreamingIngest; + } + + /** + * Set a boolean value that indicates if the streaming ingest is enabled. + * + * @param enableStreamingIngest the enableStreamingIngest value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withEnableStreamingIngest(Boolean enableStreamingIngest) { + this.enableStreamingIngest = enableStreamingIngest; + return this; + } + + /** + * Get virtual network definition. + * + * @return the virtualNetworkConfiguration value + */ + public VirtualNetworkConfiguration virtualNetworkConfiguration() { + return this.virtualNetworkConfiguration; + } + + /** + * Set virtual network definition. + * + * @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration) { + this.virtualNetworkConfiguration = virtualNetworkConfiguration; + return this; + } + + /** + * Get keyVault properties for the cluster encryption. + * + * @return the keyVaultProperties value + */ + public KeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set keyVault properties for the cluster encryption. + * + * @param keyVaultProperties the keyVaultProperties value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get a boolean value that indicates if the purge operations are enabled. + * + * @return the enablePurge value + */ + public Boolean enablePurge() { + return this.enablePurge; + } + + /** + * Set a boolean value that indicates if the purge operations are enabled. + * + * @param enablePurge the enablePurge value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withEnablePurge(Boolean enablePurge) { + this.enablePurge = enablePurge; + return this; + } + + /** + * Get list of the cluster's language extensions. + * + * @return the languageExtensions value + */ + public LanguageExtensionsList languageExtensions() { + return this.languageExtensions; + } + + /** + * Get a boolean value that indicates if double encryption is enabled. + * + * @return the enableDoubleEncryption value + */ + public Boolean enableDoubleEncryption() { + return this.enableDoubleEncryption; + } + + /** + * Set a boolean value that indicates if double encryption is enabled. + * + * @param enableDoubleEncryption the enableDoubleEncryption value to set + * @return the ClusterInner object itself. + */ + public ClusterInner withEnableDoubleEncryption(Boolean enableDoubleEncryption) { + this.enableDoubleEncryption = enableDoubleEncryption; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentImpl.java new file mode 100644 index 000000000000..5726435d84ee --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentImpl.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignment; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalRole; +import com.microsoft.azure.management.kusto.v2020_06_14.PrincipalType; +import com.microsoft.azure.management.kusto.v2020_06_14.ProvisioningState; + +class ClusterPrincipalAssignmentImpl extends CreatableUpdatableImpl implements ClusterPrincipalAssignment, ClusterPrincipalAssignment.Definition, ClusterPrincipalAssignment.Update { + private final KustoManager manager; + private String resourceGroupName; + private String clusterName; + private String principalAssignmentName; + + ClusterPrincipalAssignmentImpl(String name, KustoManager manager) { + super(name, new ClusterPrincipalAssignmentInner()); + this.manager = manager; + // Set resource name + this.principalAssignmentName = name; + // + } + + ClusterPrincipalAssignmentImpl(ClusterPrincipalAssignmentInner inner, KustoManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.principalAssignmentName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.clusterName = IdParsingUtils.getValueFromIdByName(inner.id(), "clusters"); + this.principalAssignmentName = IdParsingUtils.getValueFromIdByName(inner.id(), "principalAssignments"); + // + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ClusterPrincipalAssignmentsInner client = this.manager().inner().clusterPrincipalAssignments(); + return client.createOrUpdateAsync(this.resourceGroupName, this.clusterName, this.principalAssignmentName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ClusterPrincipalAssignmentsInner client = this.manager().inner().clusterPrincipalAssignments(); + return client.createOrUpdateAsync(this.resourceGroupName, this.clusterName, this.principalAssignmentName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ClusterPrincipalAssignmentsInner client = this.manager().inner().clusterPrincipalAssignments(); + return client.getAsync(this.resourceGroupName, this.clusterName, this.principalAssignmentName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String principalId() { + return this.inner().principalId(); + } + + @Override + public String principalName() { + return this.inner().principalName(); + } + + @Override + public PrincipalType principalType() { + return this.inner().principalType(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ClusterPrincipalRole role() { + return this.inner().role(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + + @Override + public String tenantName() { + return this.inner().tenantName(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ClusterPrincipalAssignmentImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + @Override + public ClusterPrincipalAssignmentImpl withPrincipalId(String principalId) { + this.inner().withPrincipalId(principalId); + return this; + } + + @Override + public ClusterPrincipalAssignmentImpl withPrincipalType(PrincipalType principalType) { + this.inner().withPrincipalType(principalType); + return this; + } + + @Override + public ClusterPrincipalAssignmentImpl withRole(ClusterPrincipalRole role) { + this.inner().withRole(role); + return this; + } + + @Override + public ClusterPrincipalAssignmentImpl withTenantId(String tenantId) { + this.inner().withTenantId(tenantId); + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentInner.java new file mode 100644 index 000000000000..b117b5c7ad68 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentInner.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalRole; +import com.microsoft.azure.management.kusto.v2020_06_14.PrincipalType; +import com.microsoft.azure.management.kusto.v2020_06_14.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Class representing a cluster principal assignment. + */ +@JsonFlatten +public class ClusterPrincipalAssignmentInner extends ProxyResource { + /** + * The principal ID assigned to the cluster principal. It can be a user + * email, application ID, or security group name. + */ + @JsonProperty(value = "properties.principalId", required = true) + private String principalId; + + /** + * Cluster principal role. Possible values include: 'AllDatabasesAdmin', + * 'AllDatabasesViewer'. + */ + @JsonProperty(value = "properties.role", required = true) + private ClusterPrincipalRole role; + + /** + * The tenant id of the principal. + */ + @JsonProperty(value = "properties.tenantId") + private String tenantId; + + /** + * Principal type. Possible values include: 'App', 'Group', 'User'. + */ + @JsonProperty(value = "properties.principalType", required = true) + private PrincipalType principalType; + + /** + * The tenant name of the principal. + */ + @JsonProperty(value = "properties.tenantName", access = JsonProperty.Access.WRITE_ONLY) + private String tenantName; + + /** + * The principal name. + */ + @JsonProperty(value = "properties.principalName", access = JsonProperty.Access.WRITE_ONLY) + private String principalName; + + /** + * The provisioned state of the resource. Possible values include: + * 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Get the principal ID assigned to the cluster principal. It can be a user email, application ID, or security group name. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principal ID assigned to the cluster principal. It can be a user email, application ID, or security group name. + * + * @param principalId the principalId value to set + * @return the ClusterPrincipalAssignmentInner object itself. + */ + public ClusterPrincipalAssignmentInner withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get cluster principal role. Possible values include: 'AllDatabasesAdmin', 'AllDatabasesViewer'. + * + * @return the role value + */ + public ClusterPrincipalRole role() { + return this.role; + } + + /** + * Set cluster principal role. Possible values include: 'AllDatabasesAdmin', 'AllDatabasesViewer'. + * + * @param role the role value to set + * @return the ClusterPrincipalAssignmentInner object itself. + */ + public ClusterPrincipalAssignmentInner withRole(ClusterPrincipalRole role) { + this.role = role; + return this; + } + + /** + * Get the tenant id of the principal. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant id of the principal. + * + * @param tenantId the tenantId value to set + * @return the ClusterPrincipalAssignmentInner object itself. + */ + public ClusterPrincipalAssignmentInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get principal type. Possible values include: 'App', 'Group', 'User'. + * + * @return the principalType value + */ + public PrincipalType principalType() { + return this.principalType; + } + + /** + * Set principal type. Possible values include: 'App', 'Group', 'User'. + * + * @param principalType the principalType value to set + * @return the ClusterPrincipalAssignmentInner object itself. + */ + public ClusterPrincipalAssignmentInner withPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + return this; + } + + /** + * Get the tenant name of the principal. + * + * @return the tenantName value + */ + public String tenantName() { + return this.tenantName; + } + + /** + * Get the principal name. + * + * @return the principalName value + */ + public String principalName() { + return this.principalName; + } + + /** + * Get the provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentsImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentsImpl.java new file mode 100644 index 000000000000..8630a1bad840 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentsImpl.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignment; +import com.microsoft.azure.management.kusto.v2020_06_14.CheckNameResult; + +class ClusterPrincipalAssignmentsImpl extends WrapperImpl implements ClusterPrincipalAssignments { + private final KustoManager manager; + + ClusterPrincipalAssignmentsImpl(KustoManager manager) { + super(manager.inner().clusterPrincipalAssignments()); + this.manager = manager; + } + + public KustoManager manager() { + return this.manager; + } + + @Override + public ClusterPrincipalAssignmentImpl define(String name) { + return wrapModel(name); + } + + private ClusterPrincipalAssignmentImpl wrapModel(ClusterPrincipalAssignmentInner inner) { + return new ClusterPrincipalAssignmentImpl(inner, manager()); + } + + private ClusterPrincipalAssignmentImpl wrapModel(String name) { + return new ClusterPrincipalAssignmentImpl(name, this.manager()); + } + + @Override + public Observable listAsync(String resourceGroupName, String clusterName) { + ClusterPrincipalAssignmentsInner client = this.inner(); + return client.listAsync(resourceGroupName, clusterName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ClusterPrincipalAssignment call(ClusterPrincipalAssignmentInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String clusterName, String principalAssignmentName) { + ClusterPrincipalAssignmentsInner client = this.inner(); + return client.getAsync(resourceGroupName, clusterName, principalAssignmentName) + .flatMap(new Func1>() { + @Override + public Observable call(ClusterPrincipalAssignmentInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ClusterPrincipalAssignment)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String clusterName, String principalAssignmentName) { + ClusterPrincipalAssignmentsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, clusterName, principalAssignmentName).toCompletable(); + } + + @Override + public Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String name) { + ClusterPrincipalAssignmentsInner client = this.inner(); + return client.checkNameAvailabilityAsync(resourceGroupName, clusterName, name) + .map(new Func1() { + @Override + public CheckNameResult call(CheckNameResultInner inner) { + return new CheckNameResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentsInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentsInner.java new file mode 100644 index 000000000000..f73a58e5f3ab --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClusterPrincipalAssignmentsInner.java @@ -0,0 +1,725 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignmentCheckNameRequest; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ClusterPrincipalAssignments. + */ +public class ClusterPrincipalAssignmentsInner { + /** The Retrofit service to perform REST calls. */ + private ClusterPrincipalAssignmentsService service; + /** The service client containing this operation class. */ + private KustoManagementClientImpl client; + + /** + * Initializes an instance of ClusterPrincipalAssignmentsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ClusterPrincipalAssignmentsInner(Retrofit retrofit, KustoManagementClientImpl client) { + this.service = retrofit.create(ClusterPrincipalAssignmentsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ClusterPrincipalAssignments to be + * used by Retrofit to perform actually REST calls. + */ + interface ClusterPrincipalAssignmentsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/checkPrincipalAssignmentNameAvailability") + Observable> checkNameAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Body ClusterPrincipalAssignmentInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Body ClusterPrincipalAssignmentInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param name Principal Assignment resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CheckNameResultInner object if successful. + */ + public CheckNameResultInner checkNameAvailability(String resourceGroupName, String clusterName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, name).toBlocking().single().body(); + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param name Principal Assignment resource name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, name), serviceCallback); + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param name Principal Assignment resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, name).map(new Func1, CheckNameResultInner>() { + @Override + public CheckNameResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param name Principal Assignment resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String resourceGroupName, String clusterName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName = new ClusterPrincipalAssignmentCheckNameRequest(); + principalAssignmentName.withName(name); + return service.checkNameAvailability(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), principalAssignmentName, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterPrincipalAssignmentInner object if successful. + */ + public ClusterPrincipalAssignmentInner get(String resourceGroupName, String clusterName, String principalAssignmentName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName).toBlocking().single().body(); + } + + /** + * Gets a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String clusterName, String principalAssignmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName), serviceCallback); + } + + /** + * Gets a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterPrincipalAssignmentInner object + */ + public Observable getAsync(String resourceGroupName, String clusterName, String principalAssignmentName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName).map(new Func1, ClusterPrincipalAssignmentInner>() { + @Override + public ClusterPrincipalAssignmentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterPrincipalAssignmentInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String clusterName, String principalAssignmentName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, clusterName, principalAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterPrincipalAssignmentInner object if successful. + */ + public ClusterPrincipalAssignmentInner createOrUpdate(String resourceGroupName, String clusterName, String principalAssignmentName, ClusterPrincipalAssignmentInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName, parameters).toBlocking().last().body(); + } + + /** + * Create a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String clusterName, String principalAssignmentName, ClusterPrincipalAssignmentInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName, parameters), serviceCallback); + } + + /** + * Create a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, String principalAssignmentName, ClusterPrincipalAssignmentInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName, parameters).map(new Func1, ClusterPrincipalAssignmentInner>() { + @Override + public ClusterPrincipalAssignmentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String principalAssignmentName, ClusterPrincipalAssignmentInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, clusterName, principalAssignmentName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterPrincipalAssignmentInner object if successful. + */ + public ClusterPrincipalAssignmentInner beginCreateOrUpdate(String resourceGroupName, String clusterName, String principalAssignmentName, ClusterPrincipalAssignmentInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName, parameters).toBlocking().single().body(); + } + + /** + * Create a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String principalAssignmentName, ClusterPrincipalAssignmentInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName, parameters), serviceCallback); + } + + /** + * Create a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterPrincipalAssignmentInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String principalAssignmentName, ClusterPrincipalAssignmentInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName, parameters).map(new Func1, ClusterPrincipalAssignmentInner>() { + @Override + public ClusterPrincipalAssignmentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterPrincipalAssignmentInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String principalAssignmentName, ClusterPrincipalAssignmentInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, clusterName, principalAssignmentName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String clusterName, String principalAssignmentName) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName).toBlocking().last().body(); + } + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String clusterName, String principalAssignmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName), serviceCallback); + } + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName, String principalAssignmentName) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String principalAssignmentName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, clusterName, principalAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String clusterName, String principalAssignmentName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName).toBlocking().single().body(); + } + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String clusterName, String principalAssignmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName), serviceCallback); + } + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName, String principalAssignmentName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, principalAssignmentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Kusto cluster principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String principalAssignmentName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, clusterName, principalAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all Kusto cluster principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ClusterPrincipalAssignmentInner> object if successful. + */ + public List list(String resourceGroupName, String clusterName) { + return listWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Lists all Kusto cluster principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(String resourceGroupName, String clusterName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Lists all Kusto cluster principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ClusterPrincipalAssignmentInner> object + */ + public Observable> listAsync(String resourceGroupName, String clusterName) { + return listWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Kusto cluster principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ClusterPrincipalAssignmentInner> object + */ + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClustersImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClustersImpl.java new file mode 100644 index 000000000000..356232ace4f7 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClustersImpl.java @@ -0,0 +1,275 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.Clusters; +import com.microsoft.azure.management.kusto.v2020_06_14.Cluster; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.FollowerDatabaseDefinition; +import com.microsoft.azure.management.kusto.v2020_06_14.DiagnoseVirtualNetworkResult; +import com.microsoft.azure.management.kusto.v2020_06_14.LanguageExtension; +import com.microsoft.azure.management.kusto.v2020_06_14.CheckNameResult; +import com.microsoft.azure.management.kusto.v2020_06_14.AzureResourceSku; +import com.microsoft.azure.management.kusto.v2020_06_14.SkuDescription; + +class ClustersImpl extends GroupableResourcesCoreImpl implements Clusters { + protected ClustersImpl(KustoManager manager) { + super(manager.inner().clusters(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ClustersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ClustersInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + ClustersInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ClustersInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public Cluster call(ClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ClustersInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ClustersInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerList) { + return Observable.from(innerList.items()); + } + }) + .map(new Func1() { + @Override + public Cluster call(ClusterInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public ClusterImpl define(String name) { + return wrapModel(name); + } + + @Override + public Completable stopAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.stopAsync(resourceGroupName, clusterName).toCompletable(); + } + + @Override + public Completable startAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.startAsync(resourceGroupName, clusterName).toCompletable(); + } + + @Override + public Observable listFollowerDatabasesAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.listFollowerDatabasesAsync(resourceGroupName, clusterName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public FollowerDatabaseDefinition call(FollowerDatabaseDefinitionInner inner) { + return new FollowerDatabaseDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Completable detachFollowerDatabasesAsync(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + ClustersInner client = this.inner(); + return client.detachFollowerDatabasesAsync(resourceGroupName, clusterName, followerDatabaseToRemove).toCompletable(); + } + + @Override + public Observable diagnoseVirtualNetworkAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.diagnoseVirtualNetworkAsync(resourceGroupName, clusterName) + .map(new Func1() { + @Override + public DiagnoseVirtualNetworkResult call(DiagnoseVirtualNetworkResultInner inner) { + return new DiagnoseVirtualNetworkResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listLanguageExtensionsAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.listLanguageExtensionsAsync(resourceGroupName, clusterName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public LanguageExtension call(LanguageExtensionInner inner) { + return new LanguageExtensionImpl(inner, manager()); + } + }); + } + + @Override + public Completable addLanguageExtensionsAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.addLanguageExtensionsAsync(resourceGroupName, clusterName).toCompletable(); + } + + @Override + public Completable removeLanguageExtensionsAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.removeLanguageExtensionsAsync(resourceGroupName, clusterName).toCompletable(); + } + + @Override + protected ClusterImpl wrapModel(ClusterInner inner) { + return new ClusterImpl(inner.name(), inner, manager()); + } + + @Override + protected ClusterImpl wrapModel(String name) { + return new ClusterImpl(name, new ClusterInner(), this.manager()); + } + + private AzureResourceSkuImpl wrapAzureResourceSkuModel(AzureResourceSkuInner inner) { + return new AzureResourceSkuImpl(inner, manager()); + } + + @Override + public Observable checkNameAvailabilityAsync(String location, String name) { + ClustersInner client = this.inner(); + return client.checkNameAvailabilityAsync(location, name) + .map(new Func1() { + @Override + public CheckNameResult call(CheckNameResultInner inner) { + return new CheckNameResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSkusByResourceAsync(String resourceGroupName, String clusterName) { + ClustersInner client = this.inner(); + return client.listSkusByResourceAsync(resourceGroupName, clusterName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public AzureResourceSku call(AzureResourceSkuInner inner) { + return wrapAzureResourceSkuModel(inner); + } + }); + } + + @Override + public Observable listSkusAsync() { + ClustersInner client = this.inner(); + return client.listSkusAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public SkuDescription call(SkuDescriptionInner inner) { + return new SkuDescriptionImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClustersInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClustersInner.java new file mode 100644 index 000000000000..879aa11f51ce --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/ClustersInner.java @@ -0,0 +1,2647 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterCheckNameRequest; +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterUpdate; +import com.microsoft.azure.management.kusto.v2020_06_14.LanguageExtensionsList; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in Clusters. + */ +public class ClustersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ClustersService service; + /** The service client containing this operation class. */ + private KustoManagementClientImpl client; + + /** + * Initializes an instance of ClustersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ClustersInner(Retrofit retrofit, KustoManagementClientImpl client) { + this.service = retrofit.create(ClustersService.class); + this.client = client; + } + + /** + * The interface defining all the services for Clusters to be + * used by Retrofit to perform actually REST calls. + */ + interface ClustersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop") + Observable> stop(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop") + Observable> beginStop(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start") + Observable> start(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start") + Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters listFollowerDatabases" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases") + Observable> listFollowerDatabases(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters detachFollowerDatabases" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases") + Observable> detachFollowerDatabases(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body FollowerDatabaseDefinitionInner followerDatabaseToRemove, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginDetachFollowerDatabases" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases") + Observable> beginDetachFollowerDatabases(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body FollowerDatabaseDefinitionInner followerDatabaseToRemove, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters diagnoseVirtualNetwork" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/diagnoseVirtualNetwork") + Observable> diagnoseVirtualNetwork(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginDiagnoseVirtualNetwork" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/diagnoseVirtualNetwork") + Observable> beginDiagnoseVirtualNetwork(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters listSkus" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus") + Observable> listSkus(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ClusterCheckNameRequest clusterName, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters listSkusByResource" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus") + Observable> listSkusByResource(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters listLanguageExtensions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions") + Observable> listLanguageExtensions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters addLanguageExtensions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions") + Observable> addLanguageExtensions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body LanguageExtensionsList languageExtensionsToAdd, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginAddLanguageExtensions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions") + Observable> beginAddLanguageExtensions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body LanguageExtensionsList languageExtensionsToAdd, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters removeLanguageExtensions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions") + Observable> removeLanguageExtensions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body LanguageExtensionsList languageExtensionsToRemove, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Clusters beginRemoveLanguageExtensions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions") + Observable> beginRemoveLanguageExtensions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body LanguageExtensionsList languageExtensionsToRemove, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Gets a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Gets a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String clusterName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body(); + } + + /** + * Create or update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Create or update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(resourceGroupName, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner beginCreateOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Create or update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(resourceGroupName, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body(); + } + + /** + * Update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the Update operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String clusterName, ClusterUpdate parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String clusterName, ClusterUpdate parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterUpdate parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.update(resourceGroupName, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterInner object if successful. + */ + public ClusterInner beginUpdate(String resourceGroupName, String clusterName, ClusterUpdate parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); + } + + /** + * Update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the Update operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String clusterName, ClusterUpdate parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback); + } + + /** + * Update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String clusterName, ClusterUpdate parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() { + @Override + public ClusterInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param parameters The Kusto cluster parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterUpdate parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginUpdate(resourceGroupName, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String clusterName) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Deletes a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Deletes a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String clusterName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Deletes a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Deletes a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stop(String resourceGroupName, String clusterName) { + stopWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture stopAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable stopAsync(String resourceGroupName, String clusterName) { + return stopWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> stopWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.stop(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginStop(String resourceGroupName, String clusterName) { + beginStopWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginStopAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String resourceGroupName, String clusterName) { + return beginStopWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginStop(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void start(String resourceGroupName, String clusterName) { + startWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startAsync(String resourceGroupName, String clusterName) { + return startWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.start(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginStart(String resourceGroupName, String clusterName) { + beginStartWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginStartAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String resourceGroupName, String clusterName) { + return beginStartWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts a Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginStart(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns a list of databases that are owned by this cluster and were followed by another cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<FollowerDatabaseDefinitionInner> object if successful. + */ + public List listFollowerDatabases(String resourceGroupName, String clusterName) { + return listFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Returns a list of databases that are owned by this cluster and were followed by another cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listFollowerDatabasesAsync(String resourceGroupName, String clusterName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Returns a list of databases that are owned by this cluster and were followed by another cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<FollowerDatabaseDefinitionInner> object + */ + public Observable> listFollowerDatabasesAsync(String resourceGroupName, String clusterName) { + return listFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns a list of databases that are owned by this cluster and were followed by another cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<FollowerDatabaseDefinitionInner> object + */ + public Observable>> listFollowerDatabasesWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listFollowerDatabases(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listFollowerDatabasesDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listFollowerDatabasesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void detachFollowerDatabases(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + detachFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName, followerDatabaseToRemove).toBlocking().last().body(); + } + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture detachFollowerDatabasesAsync(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(detachFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName, followerDatabaseToRemove), serviceCallback); + } + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable detachFollowerDatabasesAsync(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + return detachFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName, followerDatabaseToRemove).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> detachFollowerDatabasesWithServiceResponseAsync(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (followerDatabaseToRemove == null) { + throw new IllegalArgumentException("Parameter followerDatabaseToRemove is required and cannot be null."); + } + Validator.validate(followerDatabaseToRemove); + Observable> observable = service.detachFollowerDatabases(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), followerDatabaseToRemove, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDetachFollowerDatabases(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + beginDetachFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName, followerDatabaseToRemove).toBlocking().single().body(); + } + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDetachFollowerDatabasesAsync(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDetachFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName, followerDatabaseToRemove), serviceCallback); + } + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDetachFollowerDatabasesAsync(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + return beginDetachFollowerDatabasesWithServiceResponseAsync(resourceGroupName, clusterName, followerDatabaseToRemove).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Detaches all followers of a database owned by this cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDetachFollowerDatabasesWithServiceResponseAsync(String resourceGroupName, String clusterName, FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (followerDatabaseToRemove == null) { + throw new IllegalArgumentException("Parameter followerDatabaseToRemove is required and cannot be null."); + } + Validator.validate(followerDatabaseToRemove); + return service.beginDetachFollowerDatabases(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), followerDatabaseToRemove, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDetachFollowerDatabasesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDetachFollowerDatabasesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnoseVirtualNetworkResultInner object if successful. + */ + public DiagnoseVirtualNetworkResultInner diagnoseVirtualNetwork(String resourceGroupName, String clusterName) { + return diagnoseVirtualNetworkWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture diagnoseVirtualNetworkAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(diagnoseVirtualNetworkWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable diagnoseVirtualNetworkAsync(String resourceGroupName, String clusterName) { + return diagnoseVirtualNetworkWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, DiagnoseVirtualNetworkResultInner>() { + @Override + public DiagnoseVirtualNetworkResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> diagnoseVirtualNetworkWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.diagnoseVirtualNetwork(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DiagnoseVirtualNetworkResultInner object if successful. + */ + public DiagnoseVirtualNetworkResultInner beginDiagnoseVirtualNetwork(String resourceGroupName, String clusterName) { + return beginDiagnoseVirtualNetworkWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDiagnoseVirtualNetworkAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDiagnoseVirtualNetworkWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnoseVirtualNetworkResultInner object + */ + public Observable beginDiagnoseVirtualNetworkAsync(String resourceGroupName, String clusterName) { + return beginDiagnoseVirtualNetworkWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, DiagnoseVirtualNetworkResultInner>() { + @Override + public DiagnoseVirtualNetworkResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Diagnoses network connectivity status for external resources on which the service is dependent on. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DiagnoseVirtualNetworkResultInner object + */ + public Observable> beginDiagnoseVirtualNetworkWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDiagnoseVirtualNetwork(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDiagnoseVirtualNetworkDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDiagnoseVirtualNetworkDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all Kusto clusters within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName) { + PageImpl page = new PageImpl<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Lists all Kusto clusters within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); + } + + /** + * Lists all Kusto clusters within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @return the observable to the List<ClusterInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Lists all Kusto clusters within a resource group. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @return the observable to the List<ClusterInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all Kusto clusters within a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ClusterInner> object if successful. + */ + public PagedList list() { + PageImpl page = new PageImpl<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Lists all Kusto clusters within a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all Kusto clusters within a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ClusterInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Lists all Kusto clusters within a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ClusterInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists eligible SKUs for Kusto resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<SkuDescriptionInner> object if successful. + */ + public List listSkus() { + return listSkusWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists eligible SKUs for Kusto resource provider. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSkusAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listSkusWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists eligible SKUs for Kusto resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<SkuDescriptionInner> object + */ + public Observable> listSkusAsync() { + return listSkusWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists eligible SKUs for Kusto resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<SkuDescriptionInner> object + */ + public Observable>> listSkusWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSkus(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSkusDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks that the cluster name is valid and is not already in use. + * + * @param location Azure location. + * @param name Cluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CheckNameResultInner object if successful. + */ + public CheckNameResultInner checkNameAvailability(String location, String name) { + return checkNameAvailabilityWithServiceResponseAsync(location, name).toBlocking().single().body(); + } + + /** + * Checks that the cluster name is valid and is not already in use. + * + * @param location Azure location. + * @param name Cluster name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String location, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, name), serviceCallback); + } + + /** + * Checks that the cluster name is valid and is not already in use. + * + * @param location Azure location. + * @param name Cluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable checkNameAvailabilityAsync(String location, String name) { + return checkNameAvailabilityWithServiceResponseAsync(location, name).map(new Func1, CheckNameResultInner>() { + @Override + public CheckNameResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the cluster name is valid and is not already in use. + * + * @param location Azure location. + * @param name Cluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, String name) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + ClusterCheckNameRequest clusterName = new ClusterCheckNameRequest(); + clusterName.withName(name); + return service.checkNameAvailability(this.client.subscriptionId(), location, this.client.apiVersion(), this.client.acceptLanguage(), clusterName, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<AzureResourceSkuInner> object if successful. + */ + public List listSkusByResource(String resourceGroupName, String clusterName) { + return listSkusByResourceWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listSkusByResourceAsync(String resourceGroupName, String clusterName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listSkusByResourceWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<AzureResourceSkuInner> object + */ + public Observable> listSkusByResourceAsync(String resourceGroupName, String clusterName) { + return listSkusByResourceWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<AzureResourceSkuInner> object + */ + public Observable>> listSkusByResourceWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSkusByResource(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSkusByResourceDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSkusByResourceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<LanguageExtensionInner> object if successful. + */ + public List listLanguageExtensions(String resourceGroupName, String clusterName) { + return listLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listLanguageExtensionsAsync(String resourceGroupName, String clusterName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<LanguageExtensionInner> object + */ + public Observable> listLanguageExtensionsAsync(String resourceGroupName, String clusterName) { + return listLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<LanguageExtensionInner> object + */ + public Observable>> listLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listLanguageExtensionsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listLanguageExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void addLanguageExtensions(String resourceGroupName, String clusterName) { + addLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addLanguageExtensionsAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable addLanguageExtensionsAsync(String resourceGroupName, String clusterName) { + return addLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> addLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String valueConverted = null; + LanguageExtensionsList languageExtensionsToAdd = new LanguageExtensionsList(); + languageExtensionsToAdd.withValue(null); + Observable> observable = service.addLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), languageExtensionsToAdd, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void addLanguageExtensions(String resourceGroupName, String clusterName, List value) { + addLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value).toBlocking().last().body(); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addLanguageExtensionsAsync(String resourceGroupName, String clusterName, List value, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value), serviceCallback); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable addLanguageExtensionsAsync(String resourceGroupName, String clusterName, List value) { + return addLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> addLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName, List value) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(value); + LanguageExtensionsList languageExtensionsToAdd = new LanguageExtensionsList(); + languageExtensionsToAdd.withValue(value); + Observable> observable = service.addLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), languageExtensionsToAdd, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginAddLanguageExtensions(String resourceGroupName, String clusterName) { + beginAddLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginAddLanguageExtensionsAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginAddLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginAddLanguageExtensionsAsync(String resourceGroupName, String clusterName) { + return beginAddLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginAddLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final List value = null; + LanguageExtensionsList languageExtensionsToAdd = new LanguageExtensionsList(); + languageExtensionsToAdd.withValue(null); + return service.beginAddLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), languageExtensionsToAdd, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginAddLanguageExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginAddLanguageExtensions(String resourceGroupName, String clusterName, List value) { + beginAddLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value).toBlocking().single().body(); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginAddLanguageExtensionsAsync(String resourceGroupName, String clusterName, List value, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginAddLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value), serviceCallback); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginAddLanguageExtensionsAsync(String resourceGroupName, String clusterName, List value) { + return beginAddLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginAddLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName, List value) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(value); + LanguageExtensionsList languageExtensionsToAdd = new LanguageExtensionsList(); + languageExtensionsToAdd.withValue(value); + return service.beginAddLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), languageExtensionsToAdd, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginAddLanguageExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginAddLanguageExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void removeLanguageExtensions(String resourceGroupName, String clusterName) { + removeLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture removeLanguageExtensionsAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(removeLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable removeLanguageExtensionsAsync(String resourceGroupName, String clusterName) { + return removeLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> removeLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String valueConverted = null; + LanguageExtensionsList languageExtensionsToRemove = new LanguageExtensionsList(); + languageExtensionsToRemove.withValue(null); + Observable> observable = service.removeLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), languageExtensionsToRemove, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void removeLanguageExtensions(String resourceGroupName, String clusterName, List value) { + removeLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value).toBlocking().last().body(); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture removeLanguageExtensionsAsync(String resourceGroupName, String clusterName, List value, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(removeLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value), serviceCallback); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable removeLanguageExtensionsAsync(String resourceGroupName, String clusterName, List value) { + return removeLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> removeLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName, List value) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(value); + LanguageExtensionsList languageExtensionsToRemove = new LanguageExtensionsList(); + languageExtensionsToRemove.withValue(value); + Observable> observable = service.removeLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), languageExtensionsToRemove, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRemoveLanguageExtensions(String resourceGroupName, String clusterName) { + beginRemoveLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRemoveLanguageExtensionsAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRemoveLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRemoveLanguageExtensionsAsync(String resourceGroupName, String clusterName) { + return beginRemoveLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRemoveLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final List value = null; + LanguageExtensionsList languageExtensionsToRemove = new LanguageExtensionsList(); + languageExtensionsToRemove.withValue(null); + return service.beginRemoveLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), languageExtensionsToRemove, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRemoveLanguageExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRemoveLanguageExtensions(String resourceGroupName, String clusterName, List value) { + beginRemoveLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value).toBlocking().single().body(); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRemoveLanguageExtensionsAsync(String resourceGroupName, String clusterName, List value, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRemoveLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value), serviceCallback); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRemoveLanguageExtensionsAsync(String resourceGroupName, String clusterName, List value) { + return beginRemoveLanguageExtensionsWithServiceResponseAsync(resourceGroupName, clusterName, value).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param value The list of language extensions. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRemoveLanguageExtensionsWithServiceResponseAsync(String resourceGroupName, String clusterName, List value) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(value); + LanguageExtensionsList languageExtensionsToRemove = new LanguageExtensionsList(); + languageExtensionsToRemove.withValue(value); + return service.beginRemoveLanguageExtensions(this.client.subscriptionId(), resourceGroupName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), languageExtensionsToRemove, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRemoveLanguageExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRemoveLanguageExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionImpl.java new file mode 100644 index 000000000000..d67a1a646251 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionImpl.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class DataConnectionImpl extends CreatableUpdatableImpl implements DataConnection, DataConnection.Definition, DataConnection.Update { + private final KustoManager manager; + private String resourceGroupName; + private String clusterName; + private String databaseName; + private String dataConnectionName; + + DataConnectionImpl(String name, KustoManager manager) { + super(name, new DataConnectionInner()); + this.manager = manager; + // Set resource name + this.dataConnectionName = name; + // + } + + DataConnectionImpl(DataConnectionInner inner, KustoManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.dataConnectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.clusterName = IdParsingUtils.getValueFromIdByName(inner.id(), "clusters"); + this.databaseName = IdParsingUtils.getValueFromIdByName(inner.id(), "databases"); + this.dataConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "dataConnections"); + // + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DataConnectionsInner client = this.manager().inner().dataConnections(); + return client.createOrUpdateAsync(this.resourceGroupName, this.clusterName, this.databaseName, this.dataConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DataConnectionsInner client = this.manager().inner().dataConnections(); + return client.updateAsync(this.resourceGroupName, this.clusterName, this.databaseName, this.dataConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DataConnectionsInner client = this.manager().inner().dataConnections(); + return client.getAsync(this.resourceGroupName, this.clusterName, this.databaseName, this.dataConnectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DataConnectionImpl withExistingDatabasis(String resourceGroupName, String clusterName, String databaseName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + this.databaseName = databaseName; + return this; + } + + @Override + public DataConnectionImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionInner.java new file mode 100644 index 000000000000..28078531be34 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionInner.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.microsoft.azure.ProxyResource; +import com.microsoft.azure.management.kusto.v2020_06_14.EventGridDataConnection; +import com.microsoft.azure.management.kusto.v2020_06_14.EventHubDataConnection; +import com.microsoft.azure.management.kusto.v2020_06_14.IotHubDataConnection; + +/** + * Class representing an data connection. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = DataConnectionInner.class) +@JsonTypeName("DataConnection") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "EventHub", value = EventHubDataConnection.class), + @JsonSubTypes.Type(name = "IotHub", value = IotHubDataConnection.class), + @JsonSubTypes.Type(name = "EventGrid", value = EventGridDataConnection.class) +}) +public class DataConnectionInner extends ProxyResource { + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource location. + * + * @param location the location value to set + * @return the DataConnectionInner object itself. + */ + public DataConnectionInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionValidationListResultImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionValidationListResultImpl.java new file mode 100644 index 000000000000..c5747c0bc890 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionValidationListResultImpl.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnectionValidationListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnectionValidationResult; + +class DataConnectionValidationListResultImpl extends WrapperImpl implements DataConnectionValidationListResult { + private final KustoManager manager; + DataConnectionValidationListResultImpl(DataConnectionValidationListResultInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionValidationListResultInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionValidationListResultInner.java new file mode 100644 index 000000000000..d524d3cb533f --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionValidationListResultInner.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnectionValidationResult; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list Kusto data connection validation result. + */ +public class DataConnectionValidationListResultInner { + /** + * The list of Kusto data connection validation errors. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the list of Kusto data connection validation errors. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the list of Kusto data connection validation errors. + * + * @param value the value value to set + * @return the DataConnectionValidationListResultInner object itself. + */ + public DataConnectionValidationListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionsImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionsImpl.java new file mode 100644 index 000000000000..ccab7b81ef3b --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionsImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnections; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnection; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnectionValidationListResult; +import com.microsoft.azure.management.kusto.v2020_06_14.CheckNameResult; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnectionValidation; + +class DataConnectionsImpl extends WrapperImpl implements DataConnections { + private final KustoManager manager; + + DataConnectionsImpl(KustoManager manager) { + super(manager.inner().dataConnections()); + this.manager = manager; + } + + public KustoManager manager() { + return this.manager; + } + + @Override + public DataConnectionImpl define(String name) { + return wrapModel(name); + } + + private DataConnectionImpl wrapModel(DataConnectionInner inner) { + return new DataConnectionImpl(inner, manager()); + } + + private DataConnectionImpl wrapModel(String name) { + return new DataConnectionImpl(name, this.manager()); + } + + @Override + public Observable listByDatabaseAsync(String resourceGroupName, String clusterName, String databaseName) { + DataConnectionsInner client = this.inner(); + return client.listByDatabaseAsync(resourceGroupName, clusterName, databaseName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public DataConnection call(DataConnectionInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + DataConnectionsInner client = this.inner(); + return client.getAsync(resourceGroupName, clusterName, databaseName, dataConnectionName) + .flatMap(new Func1>() { + @Override + public Observable call(DataConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DataConnection)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + DataConnectionsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, clusterName, databaseName, dataConnectionName).toCompletable(); + } + + @Override + public Observable dataConnectionValidationMethodAsync(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters) { + DataConnectionsInner client = this.inner(); + return client.dataConnectionValidationMethodAsync(resourceGroupName, clusterName, databaseName, parameters) + .map(new Func1() { + @Override + public DataConnectionValidationListResult call(DataConnectionValidationListResultInner inner) { + return new DataConnectionValidationListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String databaseName, String name) { + DataConnectionsInner client = this.inner(); + return client.checkNameAvailabilityAsync(resourceGroupName, clusterName, databaseName, name) + .map(new Func1() { + @Override + public CheckNameResult call(CheckNameResultInner inner) { + return new CheckNameResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionsInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionsInner.java new file mode 100644 index 000000000000..4b2dd6b4a3a5 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DataConnectionsInner.java @@ -0,0 +1,1182 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnectionCheckNameRequest; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnectionValidation; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; + +/** + * An instance of this class provides access to all the operations defined + * in DataConnections. + */ +public class DataConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private DataConnectionsService service; + /** The service client containing this operation class. */ + private KustoManagementClientImpl client; + + /** + * Initializes an instance of DataConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DataConnectionsInner(Retrofit retrofit, KustoManagementClientImpl client) { + this.service = retrofit.create(DataConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for DataConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface DataConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections listByDatabase" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections") + Observable> listByDatabase(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections dataConnectionValidationMethod" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnectionValidation") + Observable> dataConnectionValidationMethod(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body DataConnectionValidation parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections beginDataConnectionValidationMethod" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnectionValidation") + Observable> beginDataConnectionValidationMethod(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body DataConnectionValidation parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkNameAvailability") + Observable> checkNameAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DataConnectionCheckNameRequest dataConnectionName, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("dataConnectionName") String dataConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("dataConnectionName") String dataConnectionName, @Path("subscriptionId") String subscriptionId, @Body DataConnectionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("dataConnectionName") String dataConnectionName, @Path("subscriptionId") String subscriptionId, @Body DataConnectionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("dataConnectionName") String dataConnectionName, @Path("subscriptionId") String subscriptionId, @Body DataConnectionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("dataConnectionName") String dataConnectionName, @Path("subscriptionId") String subscriptionId, @Body DataConnectionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("dataConnectionName") String dataConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DataConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("dataConnectionName") String dataConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Returns the list of data connections of the given Kusto database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<DataConnectionInner> object if successful. + */ + public List listByDatabase(String resourceGroupName, String clusterName, String databaseName) { + return listByDatabaseWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); + } + + /** + * Returns the list of data connections of the given Kusto database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByDatabaseAsync(String resourceGroupName, String clusterName, String databaseName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByDatabaseWithServiceResponseAsync(resourceGroupName, clusterName, databaseName), serviceCallback); + } + + /** + * Returns the list of data connections of the given Kusto database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DataConnectionInner> object + */ + public Observable> listByDatabaseAsync(String resourceGroupName, String clusterName, String databaseName) { + return listByDatabaseWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of data connections of the given Kusto database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DataConnectionInner> object + */ + public Observable>> listByDatabaseWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByDatabase(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByDatabaseDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataConnectionValidationListResultInner object if successful. + */ + public DataConnectionValidationListResultInner dataConnectionValidationMethod(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters) { + return dataConnectionValidationMethodWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).toBlocking().last().body(); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture dataConnectionValidationMethodAsync(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(dataConnectionValidationMethodWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters), serviceCallback); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable dataConnectionValidationMethodAsync(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters) { + return dataConnectionValidationMethodWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).map(new Func1, DataConnectionValidationListResultInner>() { + @Override + public DataConnectionValidationListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> dataConnectionValidationMethodWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.dataConnectionValidationMethod(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataConnectionValidationListResultInner object if successful. + */ + public DataConnectionValidationListResultInner beginDataConnectionValidationMethod(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters) { + return beginDataConnectionValidationMethodWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).toBlocking().single().body(); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDataConnectionValidationMethodAsync(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDataConnectionValidationMethodWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters), serviceCallback); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataConnectionValidationListResultInner object + */ + public Observable beginDataConnectionValidationMethodAsync(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters) { + return beginDataConnectionValidationMethodWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).map(new Func1, DataConnectionValidationListResultInner>() { + @Override + public DataConnectionValidationListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataConnectionValidationListResultInner object + */ + public Observable> beginDataConnectionValidationMethodWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, DataConnectionValidation parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginDataConnectionValidationMethod(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDataConnectionValidationMethodDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDataConnectionValidationMethodDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Data Connection name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CheckNameResultInner object if successful. + */ + public CheckNameResultInner checkNameAvailability(String resourceGroupName, String clusterName, String databaseName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, name).toBlocking().single().body(); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Data Connection name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String databaseName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, name), serviceCallback); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Data Connection name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String databaseName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, name).map(new Func1, CheckNameResultInner>() { + @Override + public CheckNameResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Data Connection name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + DataConnectionCheckNameRequest dataConnectionName = new DataConnectionCheckNameRequest(); + dataConnectionName.withName(name); + return service.checkNameAvailability(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), dataConnectionName, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataConnectionInner object if successful. + */ + public DataConnectionInner get(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName).toBlocking().single().body(); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName), serviceCallback); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataConnectionInner object + */ + public Observable getAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName).map(new Func1, DataConnectionInner>() { + @Override + public DataConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (dataConnectionName == null) { + throw new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, clusterName, databaseName, dataConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataConnectionInner object if successful. + */ + public DataConnectionInner createOrUpdate(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters), serviceCallback); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters).map(new Func1, DataConnectionInner>() { + @Override + public DataConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (dataConnectionName == null) { + throw new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(resourceGroupName, clusterName, databaseName, dataConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataConnectionInner object if successful. + */ + public DataConnectionInner beginCreateOrUpdate(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters), serviceCallback); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataConnectionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters).map(new Func1, DataConnectionInner>() { + @Override + public DataConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataConnectionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (dataConnectionName == null) { + throw new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(resourceGroupName, clusterName, databaseName, dataConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataConnectionInner object if successful. + */ + public DataConnectionInner update(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters).toBlocking().last().body(); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters), serviceCallback); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters).map(new Func1, DataConnectionInner>() { + @Override + public DataConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (dataConnectionName == null) { + throw new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.update(resourceGroupName, clusterName, databaseName, dataConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataConnectionInner object if successful. + */ + public DataConnectionInner beginUpdate(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters).toBlocking().single().body(); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters), serviceCallback); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataConnectionInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName, parameters).map(new Func1, DataConnectionInner>() { + @Override + public DataConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataConnectionInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, DataConnectionInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (dataConnectionName == null) { + throw new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginUpdate(resourceGroupName, clusterName, databaseName, dataConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName).toBlocking().last().body(); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName), serviceCallback); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (dataConnectionName == null) { + throw new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, clusterName, databaseName, dataConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName).toBlocking().single().body(); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName), serviceCallback); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (dataConnectionName == null) { + throw new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, clusterName, databaseName, dataConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabaseImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabaseImpl.java new file mode 100644 index 000000000000..625b85f29471 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabaseImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.Database; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class DatabaseImpl extends CreatableUpdatableImpl implements Database, Database.Definition, Database.Update { + private final KustoManager manager; + private String resourceGroupName; + private String clusterName; + private String databaseName; + + DatabaseImpl(String name, KustoManager manager) { + super(name, new DatabaseInner()); + this.manager = manager; + // Set resource name + this.databaseName = name; + // + } + + DatabaseImpl(DatabaseInner inner, KustoManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.databaseName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.clusterName = IdParsingUtils.getValueFromIdByName(inner.id(), "clusters"); + this.databaseName = IdParsingUtils.getValueFromIdByName(inner.id(), "databases"); + // + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DatabasesInner client = this.manager().inner().databases(); + return client.createOrUpdateAsync(this.resourceGroupName, this.clusterName, this.databaseName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DatabasesInner client = this.manager().inner().databases(); + return client.updateAsync(this.resourceGroupName, this.clusterName, this.databaseName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DatabasesInner client = this.manager().inner().databases(); + return client.getAsync(this.resourceGroupName, this.clusterName, this.databaseName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DatabaseImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + @Override + public DatabaseImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabaseInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabaseInner.java new file mode 100644 index 000000000000..f596cc35f7c2 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabaseInner.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.microsoft.azure.ProxyResource; +import com.microsoft.azure.management.kusto.v2020_06_14.ReadOnlyFollowingDatabase; +import com.microsoft.azure.management.kusto.v2020_06_14.ReadWriteDatabase; + +/** + * Class representing a Kusto database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = DatabaseInner.class) +@JsonTypeName("Database") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ReadWrite", value = ReadWriteDatabase.class), + @JsonSubTypes.Type(name = "ReadOnlyFollowing", value = ReadOnlyFollowingDatabase.class) +}) +public class DatabaseInner extends ProxyResource { + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource location. + * + * @param location the location value to set + * @return the DatabaseInner object itself. + */ + public DatabaseInner withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentImpl.java new file mode 100644 index 000000000000..020b2a0210eb --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentImpl.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignment; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalRole; +import com.microsoft.azure.management.kusto.v2020_06_14.PrincipalType; +import com.microsoft.azure.management.kusto.v2020_06_14.ProvisioningState; + +class DatabasePrincipalAssignmentImpl extends CreatableUpdatableImpl implements DatabasePrincipalAssignment, DatabasePrincipalAssignment.Definition, DatabasePrincipalAssignment.Update { + private final KustoManager manager; + private String resourceGroupName; + private String clusterName; + private String databaseName; + private String principalAssignmentName; + + DatabasePrincipalAssignmentImpl(String name, KustoManager manager) { + super(name, new DatabasePrincipalAssignmentInner()); + this.manager = manager; + // Set resource name + this.principalAssignmentName = name; + // + } + + DatabasePrincipalAssignmentImpl(DatabasePrincipalAssignmentInner inner, KustoManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.principalAssignmentName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.clusterName = IdParsingUtils.getValueFromIdByName(inner.id(), "clusters"); + this.databaseName = IdParsingUtils.getValueFromIdByName(inner.id(), "databases"); + this.principalAssignmentName = IdParsingUtils.getValueFromIdByName(inner.id(), "principalAssignments"); + // + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DatabasePrincipalAssignmentsInner client = this.manager().inner().databasePrincipalAssignments(); + return client.createOrUpdateAsync(this.resourceGroupName, this.clusterName, this.databaseName, this.principalAssignmentName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DatabasePrincipalAssignmentsInner client = this.manager().inner().databasePrincipalAssignments(); + return client.createOrUpdateAsync(this.resourceGroupName, this.clusterName, this.databaseName, this.principalAssignmentName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DatabasePrincipalAssignmentsInner client = this.manager().inner().databasePrincipalAssignments(); + return client.getAsync(this.resourceGroupName, this.clusterName, this.databaseName, this.principalAssignmentName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String principalId() { + return this.inner().principalId(); + } + + @Override + public String principalName() { + return this.inner().principalName(); + } + + @Override + public PrincipalType principalType() { + return this.inner().principalType(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public DatabasePrincipalRole role() { + return this.inner().role(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + + @Override + public String tenantName() { + return this.inner().tenantName(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DatabasePrincipalAssignmentImpl withExistingDatabasis(String resourceGroupName, String clusterName, String databaseName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + this.databaseName = databaseName; + return this; + } + + @Override + public DatabasePrincipalAssignmentImpl withPrincipalId(String principalId) { + this.inner().withPrincipalId(principalId); + return this; + } + + @Override + public DatabasePrincipalAssignmentImpl withPrincipalType(PrincipalType principalType) { + this.inner().withPrincipalType(principalType); + return this; + } + + @Override + public DatabasePrincipalAssignmentImpl withRole(DatabasePrincipalRole role) { + this.inner().withRole(role); + return this; + } + + @Override + public DatabasePrincipalAssignmentImpl withTenantId(String tenantId) { + this.inner().withTenantId(tenantId); + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentInner.java new file mode 100644 index 000000000000..31f7d59cd1a5 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentInner.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalRole; +import com.microsoft.azure.management.kusto.v2020_06_14.PrincipalType; +import com.microsoft.azure.management.kusto.v2020_06_14.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Class representing a database principal assignment. + */ +@JsonFlatten +public class DatabasePrincipalAssignmentInner extends ProxyResource { + /** + * The principal ID assigned to the database principal. It can be a user + * email, application ID, or security group name. + */ + @JsonProperty(value = "properties.principalId", required = true) + private String principalId; + + /** + * Database principal role. Possible values include: 'Admin', 'Ingestor', + * 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer'. + */ + @JsonProperty(value = "properties.role", required = true) + private DatabasePrincipalRole role; + + /** + * The tenant id of the principal. + */ + @JsonProperty(value = "properties.tenantId") + private String tenantId; + + /** + * Principal type. Possible values include: 'App', 'Group', 'User'. + */ + @JsonProperty(value = "properties.principalType", required = true) + private PrincipalType principalType; + + /** + * The tenant name of the principal. + */ + @JsonProperty(value = "properties.tenantName", access = JsonProperty.Access.WRITE_ONLY) + private String tenantName; + + /** + * The principal name. + */ + @JsonProperty(value = "properties.principalName", access = JsonProperty.Access.WRITE_ONLY) + private String principalName; + + /** + * The provisioned state of the resource. Possible values include: + * 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Get the principal ID assigned to the database principal. It can be a user email, application ID, or security group name. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principal ID assigned to the database principal. It can be a user email, application ID, or security group name. + * + * @param principalId the principalId value to set + * @return the DatabasePrincipalAssignmentInner object itself. + */ + public DatabasePrincipalAssignmentInner withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get database principal role. Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer'. + * + * @return the role value + */ + public DatabasePrincipalRole role() { + return this.role; + } + + /** + * Set database principal role. Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer'. + * + * @param role the role value to set + * @return the DatabasePrincipalAssignmentInner object itself. + */ + public DatabasePrincipalAssignmentInner withRole(DatabasePrincipalRole role) { + this.role = role; + return this; + } + + /** + * Get the tenant id of the principal. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant id of the principal. + * + * @param tenantId the tenantId value to set + * @return the DatabasePrincipalAssignmentInner object itself. + */ + public DatabasePrincipalAssignmentInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get principal type. Possible values include: 'App', 'Group', 'User'. + * + * @return the principalType value + */ + public PrincipalType principalType() { + return this.principalType; + } + + /** + * Set principal type. Possible values include: 'App', 'Group', 'User'. + * + * @param principalType the principalType value to set + * @return the DatabasePrincipalAssignmentInner object itself. + */ + public DatabasePrincipalAssignmentInner withPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + return this; + } + + /** + * Get the tenant name of the principal. + * + * @return the tenantName value + */ + public String tenantName() { + return this.tenantName; + } + + /** + * Get the principal name. + * + * @return the principalName value + */ + public String principalName() { + return this.principalName; + } + + /** + * Get the provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentsImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentsImpl.java new file mode 100644 index 000000000000..7332b063189a --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentsImpl.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignment; +import com.microsoft.azure.management.kusto.v2020_06_14.CheckNameResult; + +class DatabasePrincipalAssignmentsImpl extends WrapperImpl implements DatabasePrincipalAssignments { + private final KustoManager manager; + + DatabasePrincipalAssignmentsImpl(KustoManager manager) { + super(manager.inner().databasePrincipalAssignments()); + this.manager = manager; + } + + public KustoManager manager() { + return this.manager; + } + + @Override + public DatabasePrincipalAssignmentImpl define(String name) { + return wrapModel(name); + } + + private DatabasePrincipalAssignmentImpl wrapModel(DatabasePrincipalAssignmentInner inner) { + return new DatabasePrincipalAssignmentImpl(inner, manager()); + } + + private DatabasePrincipalAssignmentImpl wrapModel(String name) { + return new DatabasePrincipalAssignmentImpl(name, this.manager()); + } + + @Override + public Observable listAsync(String resourceGroupName, String clusterName, String databaseName) { + DatabasePrincipalAssignmentsInner client = this.inner(); + return client.listAsync(resourceGroupName, clusterName, databaseName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public DatabasePrincipalAssignment call(DatabasePrincipalAssignmentInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + DatabasePrincipalAssignmentsInner client = this.inner(); + return client.getAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName) + .flatMap(new Func1>() { + @Override + public Observable call(DatabasePrincipalAssignmentInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DatabasePrincipalAssignment)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + DatabasePrincipalAssignmentsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).toCompletable(); + } + + @Override + public Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String databaseName, String name) { + DatabasePrincipalAssignmentsInner client = this.inner(); + return client.checkNameAvailabilityAsync(resourceGroupName, clusterName, databaseName, name) + .map(new Func1() { + @Override + public CheckNameResult call(CheckNameResultInner inner) { + return new CheckNameResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentsInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentsInner.java new file mode 100644 index 000000000000..6e14e9d646ef --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalAssignmentsInner.java @@ -0,0 +1,774 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignmentCheckNameRequest; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DatabasePrincipalAssignments. + */ +public class DatabasePrincipalAssignmentsInner { + /** The Retrofit service to perform REST calls. */ + private DatabasePrincipalAssignmentsService service; + /** The service client containing this operation class. */ + private KustoManagementClientImpl client; + + /** + * Initializes an instance of DatabasePrincipalAssignmentsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DatabasePrincipalAssignmentsInner(Retrofit retrofit, KustoManagementClientImpl client) { + this.service = retrofit.create(DatabasePrincipalAssignmentsService.class); + this.client = client; + } + + /** + * The interface defining all the services for DatabasePrincipalAssignments to be + * used by Retrofit to perform actually REST calls. + */ + interface DatabasePrincipalAssignmentsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkPrincipalAssignmentNameAvailability") + Observable> checkNameAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Body DatabasePrincipalAssignmentInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Body DatabasePrincipalAssignmentInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("principalAssignmentName") String principalAssignmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Principal Assignment resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CheckNameResultInner object if successful. + */ + public CheckNameResultInner checkNameAvailability(String resourceGroupName, String clusterName, String databaseName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, name).toBlocking().single().body(); + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Principal Assignment resource name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String databaseName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, name), serviceCallback); + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Principal Assignment resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, String databaseName, String name) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, name).map(new Func1, CheckNameResultInner>() { + @Override + public CheckNameResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param name Principal Assignment resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName = new DatabasePrincipalAssignmentCheckNameRequest(); + principalAssignmentName.withName(name); + return service.checkNameAvailability(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), principalAssignmentName, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabasePrincipalAssignmentInner object if successful. + */ + public DatabasePrincipalAssignmentInner get(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).toBlocking().single().body(); + } + + /** + * Gets a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName), serviceCallback); + } + + /** + * Gets a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalAssignmentInner object + */ + public Observable getAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).map(new Func1, DatabasePrincipalAssignmentInner>() { + @Override + public DatabasePrincipalAssignmentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalAssignmentInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, clusterName, databaseName, principalAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabasePrincipalAssignmentInner object if successful. + */ + public DatabasePrincipalAssignmentInner createOrUpdate(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, DatabasePrincipalAssignmentInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters).toBlocking().last().body(); + } + + /** + * Creates a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, DatabasePrincipalAssignmentInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters), serviceCallback); + } + + /** + * Creates a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, DatabasePrincipalAssignmentInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters).map(new Func1, DatabasePrincipalAssignmentInner>() { + @Override + public DatabasePrincipalAssignmentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, DatabasePrincipalAssignmentInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, clusterName, databaseName, principalAssignmentName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabasePrincipalAssignmentInner object if successful. + */ + public DatabasePrincipalAssignmentInner beginCreateOrUpdate(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, DatabasePrincipalAssignmentInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters).toBlocking().single().body(); + } + + /** + * Creates a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, DatabasePrincipalAssignmentInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters), serviceCallback); + } + + /** + * Creates a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalAssignmentInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, DatabasePrincipalAssignmentInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters).map(new Func1, DatabasePrincipalAssignmentInner>() { + @Override + public DatabasePrincipalAssignmentInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a Kusto cluster database principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalAssignmentInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, DatabasePrincipalAssignmentInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, clusterName, databaseName, principalAssignmentName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).toBlocking().last().body(); + } + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName), serviceCallback); + } + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, clusterName, databaseName, principalAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).toBlocking().single().body(); + } + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName), serviceCallback); + } + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Kusto principalAssignment. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (principalAssignmentName == null) { + throw new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, clusterName, databaseName, principalAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all Kusto cluster database principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<DatabasePrincipalAssignmentInner> object if successful. + */ + public List list(String resourceGroupName, String clusterName, String databaseName) { + return listWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); + } + + /** + * Lists all Kusto cluster database principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(String resourceGroupName, String clusterName, String databaseName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, clusterName, databaseName), serviceCallback); + } + + /** + * Lists all Kusto cluster database principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DatabasePrincipalAssignmentInner> object + */ + public Observable> listAsync(String resourceGroupName, String clusterName, String databaseName) { + return listWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all Kusto cluster database principalAssignments. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DatabasePrincipalAssignmentInner> object + */ + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, clusterName, databaseName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalImpl.java new file mode 100644 index 000000000000..0cfa330d9bd1 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalImpl.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipal; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalRole; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalType; + +class DatabasePrincipalImpl extends WrapperImpl implements DatabasePrincipal { + private final KustoManager manager; + DatabasePrincipalImpl(DatabasePrincipalInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public String appId() { + return this.inner().appId(); + } + + @Override + public String email() { + return this.inner().email(); + } + + @Override + public String fqn() { + return this.inner().fqn(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public DatabasePrincipalRole role() { + return this.inner().role(); + } + + @Override + public String tenantName() { + return this.inner().tenantName(); + } + + @Override + public DatabasePrincipalType type() { + return this.inner().type(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalInner.java new file mode 100644 index 000000000000..0afcdbf8c35c --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalInner.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalRole; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class representing database principal entity. + */ +public class DatabasePrincipalInner { + /** + * Database principal role. Possible values include: 'Admin', 'Ingestor', + * 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer'. + */ + @JsonProperty(value = "role", required = true) + private DatabasePrincipalRole role; + + /** + * Database principal name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Database principal type. Possible values include: 'App', 'Group', + * 'User'. + */ + @JsonProperty(value = "type", required = true) + private DatabasePrincipalType type; + + /** + * Database principal fully qualified name. + */ + @JsonProperty(value = "fqn") + private String fqn; + + /** + * Database principal email if exists. + */ + @JsonProperty(value = "email") + private String email; + + /** + * Application id - relevant only for application principal type. + */ + @JsonProperty(value = "appId") + private String appId; + + /** + * The tenant name of the principal. + */ + @JsonProperty(value = "tenantName", access = JsonProperty.Access.WRITE_ONLY) + private String tenantName; + + /** + * Get database principal role. Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer'. + * + * @return the role value + */ + public DatabasePrincipalRole role() { + return this.role; + } + + /** + * Set database principal role. Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer'. + * + * @param role the role value to set + * @return the DatabasePrincipalInner object itself. + */ + public DatabasePrincipalInner withRole(DatabasePrincipalRole role) { + this.role = role; + return this; + } + + /** + * Get database principal name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set database principal name. + * + * @param name the name value to set + * @return the DatabasePrincipalInner object itself. + */ + public DatabasePrincipalInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get database principal type. Possible values include: 'App', 'Group', 'User'. + * + * @return the type value + */ + public DatabasePrincipalType type() { + return this.type; + } + + /** + * Set database principal type. Possible values include: 'App', 'Group', 'User'. + * + * @param type the type value to set + * @return the DatabasePrincipalInner object itself. + */ + public DatabasePrincipalInner withType(DatabasePrincipalType type) { + this.type = type; + return this; + } + + /** + * Get database principal fully qualified name. + * + * @return the fqn value + */ + public String fqn() { + return this.fqn; + } + + /** + * Set database principal fully qualified name. + * + * @param fqn the fqn value to set + * @return the DatabasePrincipalInner object itself. + */ + public DatabasePrincipalInner withFqn(String fqn) { + this.fqn = fqn; + return this; + } + + /** + * Get database principal email if exists. + * + * @return the email value + */ + public String email() { + return this.email; + } + + /** + * Set database principal email if exists. + * + * @param email the email value to set + * @return the DatabasePrincipalInner object itself. + */ + public DatabasePrincipalInner withEmail(String email) { + this.email = email; + return this; + } + + /** + * Get application id - relevant only for application principal type. + * + * @return the appId value + */ + public String appId() { + return this.appId; + } + + /** + * Set application id - relevant only for application principal type. + * + * @param appId the appId value to set + * @return the DatabasePrincipalInner object itself. + */ + public DatabasePrincipalInner withAppId(String appId) { + this.appId = appId; + return this; + } + + /** + * Get the tenant name of the principal. + * + * @return the tenantName value + */ + public String tenantName() { + return this.tenantName; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalListResultImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalListResultImpl.java new file mode 100644 index 000000000000..db6ff6251796 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalListResultImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class DatabasePrincipalListResultImpl extends WrapperImpl implements DatabasePrincipalListResult { + private final KustoManager manager; + DatabasePrincipalListResultImpl(DatabasePrincipalListResultInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalListResultInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalListResultInner.java new file mode 100644 index 000000000000..941ad0182188 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasePrincipalListResultInner.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list Kusto database principals operation response. + */ +public class DatabasePrincipalListResultInner { + /** + * The list of Kusto database principals. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the list of Kusto database principals. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the list of Kusto database principals. + * + * @param value the value value to set + * @return the DatabasePrincipalListResultInner object itself. + */ + public DatabasePrincipalListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasesImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasesImpl.java new file mode 100644 index 000000000000..52179ddbee01 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasesImpl.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.Databases; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipal; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalListResult; +import com.microsoft.azure.management.kusto.v2020_06_14.Database; +import com.microsoft.azure.management.kusto.v2020_06_14.CheckNameResult; +import com.microsoft.azure.management.kusto.v2020_06_14.CheckNameRequest; + +class DatabasesImpl extends WrapperImpl implements Databases { + private final KustoManager manager; + + DatabasesImpl(KustoManager manager) { + super(manager.inner().databases()); + this.manager = manager; + } + + public KustoManager manager() { + return this.manager; + } + + @Override + public DatabaseImpl define(String name) { + return wrapModel(name); + } + + private DatabaseImpl wrapModel(DatabaseInner inner) { + return new DatabaseImpl(inner, manager()); + } + + private DatabaseImpl wrapModel(String name) { + return new DatabaseImpl(name, this.manager()); + } + + @Override + public Observable listPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName) { + DatabasesInner client = this.inner(); + return client.listPrincipalsAsync(resourceGroupName, clusterName, databaseName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public DatabasePrincipal call(DatabasePrincipalInner inner) { + return new DatabasePrincipalImpl(inner, manager()); + } + }); + } + + @Override + public Observable addPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName) { + DatabasesInner client = this.inner(); + return client.addPrincipalsAsync(resourceGroupName, clusterName, databaseName) + .map(new Func1() { + @Override + public DatabasePrincipalListResult call(DatabasePrincipalListResultInner inner) { + return new DatabasePrincipalListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable removePrincipalsAsync(String resourceGroupName, String clusterName, String databaseName) { + DatabasesInner client = this.inner(); + return client.removePrincipalsAsync(resourceGroupName, clusterName, databaseName) + .map(new Func1() { + @Override + public DatabasePrincipalListResult call(DatabasePrincipalListResultInner inner) { + return new DatabasePrincipalListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByClusterAsync(String resourceGroupName, String clusterName) { + DatabasesInner client = this.inner(); + return client.listByClusterAsync(resourceGroupName, clusterName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public Database call(DatabaseInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String clusterName, String databaseName) { + DatabasesInner client = this.inner(); + return client.getAsync(resourceGroupName, clusterName, databaseName) + .flatMap(new Func1>() { + @Override + public Observable call(DatabaseInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Database)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String clusterName, String databaseName) { + DatabasesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, clusterName, databaseName).toCompletable(); + } + + @Override + public Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, CheckNameRequest resourceName) { + DatabasesInner client = this.inner(); + return client.checkNameAvailabilityAsync(resourceGroupName, clusterName, resourceName) + .map(new Func1() { + @Override + public CheckNameResult call(CheckNameResultInner inner) { + return new CheckNameResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasesInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasesInner.java new file mode 100644 index 000000000000..7e2220161ca8 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DatabasesInner.java @@ -0,0 +1,1410 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.kusto.v2020_06_14.CheckNameRequest; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalListRequest; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Databases. + */ +public class DatabasesInner { + /** The Retrofit service to perform REST calls. */ + private DatabasesService service; + /** The service client containing this operation class. */ + private KustoManagementClientImpl client; + + /** + * Initializes an instance of DatabasesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DatabasesInner(Retrofit retrofit, KustoManagementClientImpl client) { + this.service = retrofit.create(DatabasesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Databases to be + * used by Retrofit to perform actually REST calls. + */ + interface DatabasesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/checkNameAvailability") + Observable> checkNameAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body CheckNameRequest resourceName, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases listByCluster" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases") + Observable> listByCluster(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Body DatabaseInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Body DatabaseInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Body DatabaseInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Body DatabaseInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases listPrincipals" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/listPrincipals") + Observable> listPrincipals(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases addPrincipals" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/addPrincipals") + Observable> addPrincipals(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DatabasePrincipalListRequest databasePrincipalsToAdd, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Databases removePrincipals" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/removePrincipals") + Observable> removePrincipals(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DatabasePrincipalListRequest databasePrincipalsToRemove, @Header("User-Agent") String userAgent); + + } + + /** + * Checks that the database name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CheckNameResultInner object if successful. + */ + public CheckNameResultInner checkNameAvailability(String resourceGroupName, String clusterName, CheckNameRequest resourceName) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, resourceName).toBlocking().single().body(); + } + + /** + * Checks that the database name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkNameAvailabilityAsync(String resourceGroupName, String clusterName, CheckNameRequest resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, resourceName), serviceCallback); + } + + /** + * Checks that the database name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable checkNameAvailabilityAsync(String resourceGroupName, String clusterName, CheckNameRequest resourceName) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, clusterName, resourceName).map(new Func1, CheckNameResultInner>() { + @Override + public CheckNameResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the database name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CheckNameResultInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String resourceGroupName, String clusterName, CheckNameRequest resourceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + Validator.validate(resourceName); + return service.checkNameAvailability(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), resourceName, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of databases of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<DatabaseInner> object if successful. + */ + public List listByCluster(String resourceGroupName, String clusterName) { + return listByClusterWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); + } + + /** + * Returns the list of databases of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByClusterAsync(String resourceGroupName, String clusterName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByClusterWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback); + } + + /** + * Returns the list of databases of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DatabaseInner> object + */ + public Observable> listByClusterAsync(String resourceGroupName, String clusterName) { + return listByClusterWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of databases of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DatabaseInner> object + */ + public Observable>> listByClusterWithServiceResponseAsync(String resourceGroupName, String clusterName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByCluster(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByClusterDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByClusterDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabaseInner object if successful. + */ + public DatabaseInner get(String resourceGroupName, String clusterName, String databaseName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String clusterName, String databaseName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName), serviceCallback); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabaseInner object + */ + public Observable getAsync(String resourceGroupName, String clusterName, String databaseName) { + return getWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1, DatabaseInner>() { + @Override + public DatabaseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabaseInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabaseInner object if successful. + */ + public DatabaseInner createOrUpdate(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters), serviceCallback); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).map(new Func1, DatabaseInner>() { + @Override + public DatabaseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabaseInner object if successful. + */ + public DatabaseInner beginCreateOrUpdate(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters), serviceCallback); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabaseInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).map(new Func1, DatabaseInner>() { + @Override + public DatabaseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabaseInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabaseInner object if successful. + */ + public DatabaseInner update(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).toBlocking().last().body(); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters), serviceCallback); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).map(new Func1, DatabaseInner>() { + @Override + public DatabaseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.update(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabaseInner object if successful. + */ + public DatabaseInner beginUpdate(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).toBlocking().single().body(); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters), serviceCallback); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabaseInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, parameters).map(new Func1, DatabaseInner>() { + @Override + public DatabaseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabaseInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginUpdate(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String clusterName, String databaseName) { + deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().last().body(); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String clusterName, String databaseName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName), serviceCallback); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String clusterName, String databaseName) { + return deleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String clusterName, String databaseName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String clusterName, String databaseName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName), serviceCallback); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String clusterName, String databaseName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns a list of database principals of the given Kusto cluster and database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<DatabasePrincipalInner> object if successful. + */ + public List listPrincipals(String resourceGroupName, String clusterName, String databaseName) { + return listPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); + } + + /** + * Returns a list of database principals of the given Kusto cluster and database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName), serviceCallback); + } + + /** + * Returns a list of database principals of the given Kusto cluster and database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DatabasePrincipalInner> object + */ + public Observable> listPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName) { + return listPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns a list of database principals of the given Kusto cluster and database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DatabasePrincipalInner> object + */ + public Observable>> listPrincipalsWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPrincipals(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPrincipalsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPrincipalsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabasePrincipalListResultInner object if successful. + */ + public DatabasePrincipalListResultInner addPrincipals(String resourceGroupName, String clusterName, String databaseName) { + return addPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); + } + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName), serviceCallback); + } + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalListResultInner object + */ + public Observable addPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName) { + return addPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1, DatabasePrincipalListResultInner>() { + @Override + public DatabasePrincipalListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalListResultInner object + */ + public Observable> addPrincipalsWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final List value = null; + DatabasePrincipalListRequest databasePrincipalsToAdd = new DatabasePrincipalListRequest(); + databasePrincipalsToAdd.withValue(null); + return service.addPrincipals(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), databasePrincipalsToAdd, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addPrincipalsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param value The list of Kusto database principals. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabasePrincipalListResultInner object if successful. + */ + public DatabasePrincipalListResultInner addPrincipals(String resourceGroupName, String clusterName, String databaseName, List value) { + return addPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, value).toBlocking().single().body(); + } + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param value The list of Kusto database principals. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, List value, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, value), serviceCallback); + } + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param value The list of Kusto database principals. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalListResultInner object + */ + public Observable addPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, List value) { + return addPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, value).map(new Func1, DatabasePrincipalListResultInner>() { + @Override + public DatabasePrincipalListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param value The list of Kusto database principals. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalListResultInner object + */ + public Observable> addPrincipalsWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, List value) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(value); + DatabasePrincipalListRequest databasePrincipalsToAdd = new DatabasePrincipalListRequest(); + databasePrincipalsToAdd.withValue(value); + return service.addPrincipals(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), databasePrincipalsToAdd, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addPrincipalsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addPrincipalsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabasePrincipalListResultInner object if successful. + */ + public DatabasePrincipalListResultInner removePrincipals(String resourceGroupName, String clusterName, String databaseName) { + return removePrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); + } + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture removePrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(removePrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName), serviceCallback); + } + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalListResultInner object + */ + public Observable removePrincipalsAsync(String resourceGroupName, String clusterName, String databaseName) { + return removePrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1, DatabasePrincipalListResultInner>() { + @Override + public DatabasePrincipalListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalListResultInner object + */ + public Observable> removePrincipalsWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final List value = null; + DatabasePrincipalListRequest databasePrincipalsToRemove = new DatabasePrincipalListRequest(); + databasePrincipalsToRemove.withValue(null); + return service.removePrincipals(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), databasePrincipalsToRemove, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = removePrincipalsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param value The list of Kusto database principals. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DatabasePrincipalListResultInner object if successful. + */ + public DatabasePrincipalListResultInner removePrincipals(String resourceGroupName, String clusterName, String databaseName, List value) { + return removePrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, value).toBlocking().single().body(); + } + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param value The list of Kusto database principals. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture removePrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, List value, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(removePrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, value), serviceCallback); + } + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param value The list of Kusto database principals. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalListResultInner object + */ + public Observable removePrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, List value) { + return removePrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, value).map(new Func1, DatabasePrincipalListResultInner>() { + @Override + public DatabasePrincipalListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Remove Database principals permissions. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param value The list of Kusto database principals. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DatabasePrincipalListResultInner object + */ + public Observable> removePrincipalsWithServiceResponseAsync(String resourceGroupName, String clusterName, String databaseName, List value) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(value); + DatabasePrincipalListRequest databasePrincipalsToRemove = new DatabasePrincipalListRequest(); + databasePrincipalsToRemove.withValue(value); + return service.removePrincipals(resourceGroupName, clusterName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), databasePrincipalsToRemove, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = removePrincipalsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse removePrincipalsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DiagnoseVirtualNetworkResultImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DiagnoseVirtualNetworkResultImpl.java new file mode 100644 index 000000000000..111683ad2226 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DiagnoseVirtualNetworkResultImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.DiagnoseVirtualNetworkResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class DiagnoseVirtualNetworkResultImpl extends WrapperImpl implements DiagnoseVirtualNetworkResult { + private final KustoManager manager; + DiagnoseVirtualNetworkResultImpl(DiagnoseVirtualNetworkResultInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public List findings() { + return this.inner().findings(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DiagnoseVirtualNetworkResultInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DiagnoseVirtualNetworkResultInner.java new file mode 100644 index 000000000000..58ebb7a667bf --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/DiagnoseVirtualNetworkResultInner.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The DiagnoseVirtualNetworkResultInner model. + */ +public class DiagnoseVirtualNetworkResultInner { + /** + * The list of network connectivity diagnostic finding. + */ + @JsonProperty(value = "findings") + private List findings; + + /** + * Get the list of network connectivity diagnostic finding. + * + * @return the findings value + */ + public List findings() { + return this.findings; + } + + /** + * Set the list of network connectivity diagnostic finding. + * + * @param findings the findings value to set + * @return the DiagnoseVirtualNetworkResultInner object itself. + */ + public DiagnoseVirtualNetworkResultInner withFindings(List findings) { + this.findings = findings; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/FollowerDatabaseDefinitionImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/FollowerDatabaseDefinitionImpl.java new file mode 100644 index 000000000000..8f60901cb682 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/FollowerDatabaseDefinitionImpl.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.FollowerDatabaseDefinition; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class FollowerDatabaseDefinitionImpl extends WrapperImpl implements FollowerDatabaseDefinition { + private final KustoManager manager; + FollowerDatabaseDefinitionImpl(FollowerDatabaseDefinitionInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public String attachedDatabaseConfigurationName() { + return this.inner().attachedDatabaseConfigurationName(); + } + + @Override + public String clusterResourceId() { + return this.inner().clusterResourceId(); + } + + @Override + public String databaseName() { + return this.inner().databaseName(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/FollowerDatabaseDefinitionInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/FollowerDatabaseDefinitionInner.java new file mode 100644 index 000000000000..c26a65c7b4c6 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/FollowerDatabaseDefinitionInner.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class representing follower database request. + */ +public class FollowerDatabaseDefinitionInner { + /** + * Resource id of the cluster that follows a database owned by this + * cluster. + */ + @JsonProperty(value = "clusterResourceId", required = true) + private String clusterResourceId; + + /** + * Resource name of the attached database configuration in the follower + * cluster. + */ + @JsonProperty(value = "attachedDatabaseConfigurationName", required = true) + private String attachedDatabaseConfigurationName; + + /** + * The database name owned by this cluster that was followed. * in case + * following all databases. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * Get resource id of the cluster that follows a database owned by this cluster. + * + * @return the clusterResourceId value + */ + public String clusterResourceId() { + return this.clusterResourceId; + } + + /** + * Set resource id of the cluster that follows a database owned by this cluster. + * + * @param clusterResourceId the clusterResourceId value to set + * @return the FollowerDatabaseDefinitionInner object itself. + */ + public FollowerDatabaseDefinitionInner withClusterResourceId(String clusterResourceId) { + this.clusterResourceId = clusterResourceId; + return this; + } + + /** + * Get resource name of the attached database configuration in the follower cluster. + * + * @return the attachedDatabaseConfigurationName value + */ + public String attachedDatabaseConfigurationName() { + return this.attachedDatabaseConfigurationName; + } + + /** + * Set resource name of the attached database configuration in the follower cluster. + * + * @param attachedDatabaseConfigurationName the attachedDatabaseConfigurationName value to set + * @return the FollowerDatabaseDefinitionInner object itself. + */ + public FollowerDatabaseDefinitionInner withAttachedDatabaseConfigurationName(String attachedDatabaseConfigurationName) { + this.attachedDatabaseConfigurationName = attachedDatabaseConfigurationName; + return this; + } + + /** + * Get the database name owned by this cluster that was followed. * in case following all databases. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/IdParsingUtils.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..e417bd9bf497 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/KustoManagementClientImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/KustoManagementClientImpl.java new file mode 100644 index 000000000000..437e0c19d201 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/KustoManagementClientImpl.java @@ -0,0 +1,282 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the KustoManagementClientImpl class. + */ +public class KustoManagementClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public KustoManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Client API Version. */ + private String apiVersion; + + /** + * Gets Client API Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public KustoManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public KustoManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public KustoManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ClustersInner object to access its operations. + */ + private ClustersInner clusters; + + /** + * Gets the ClustersInner object to access its operations. + * @return the ClustersInner object. + */ + public ClustersInner clusters() { + return this.clusters; + } + + /** + * The ClusterPrincipalAssignmentsInner object to access its operations. + */ + private ClusterPrincipalAssignmentsInner clusterPrincipalAssignments; + + /** + * Gets the ClusterPrincipalAssignmentsInner object to access its operations. + * @return the ClusterPrincipalAssignmentsInner object. + */ + public ClusterPrincipalAssignmentsInner clusterPrincipalAssignments() { + return this.clusterPrincipalAssignments; + } + + /** + * The DatabasesInner object to access its operations. + */ + private DatabasesInner databases; + + /** + * Gets the DatabasesInner object to access its operations. + * @return the DatabasesInner object. + */ + public DatabasesInner databases() { + return this.databases; + } + + /** + * The DatabasePrincipalAssignmentsInner object to access its operations. + */ + private DatabasePrincipalAssignmentsInner databasePrincipalAssignments; + + /** + * Gets the DatabasePrincipalAssignmentsInner object to access its operations. + * @return the DatabasePrincipalAssignmentsInner object. + */ + public DatabasePrincipalAssignmentsInner databasePrincipalAssignments() { + return this.databasePrincipalAssignments; + } + + /** + * The AttachedDatabaseConfigurationsInner object to access its operations. + */ + private AttachedDatabaseConfigurationsInner attachedDatabaseConfigurations; + + /** + * Gets the AttachedDatabaseConfigurationsInner object to access its operations. + * @return the AttachedDatabaseConfigurationsInner object. + */ + public AttachedDatabaseConfigurationsInner attachedDatabaseConfigurations() { + return this.attachedDatabaseConfigurations; + } + + /** + * The DataConnectionsInner object to access its operations. + */ + private DataConnectionsInner dataConnections; + + /** + * Gets the DataConnectionsInner object to access its operations. + * @return the DataConnectionsInner object. + */ + public DataConnectionsInner dataConnections() { + return this.dataConnections; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * Initializes an instance of KustoManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public KustoManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of KustoManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public KustoManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of KustoManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public KustoManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2020-06-14"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.clusters = new ClustersInner(restClient().retrofit(), this); + this.clusterPrincipalAssignments = new ClusterPrincipalAssignmentsInner(restClient().retrofit(), this); + this.databases = new DatabasesInner(restClient().retrofit(), this); + this.databasePrincipalAssignments = new DatabasePrincipalAssignmentsInner(restClient().retrofit(), this); + this.attachedDatabaseConfigurations = new AttachedDatabaseConfigurationsInner(restClient().retrofit(), this); + this.dataConnections = new DataConnectionsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "KustoManagementClient", "2020-06-14"); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/KustoManager.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/KustoManager.java new file mode 100644 index 000000000000..a9167a0fadb3 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/KustoManager.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.kusto.v2020_06_14.Clusters; +import com.microsoft.azure.management.kusto.v2020_06_14.ClusterPrincipalAssignments; +import com.microsoft.azure.management.kusto.v2020_06_14.Databases; +import com.microsoft.azure.management.kusto.v2020_06_14.DatabasePrincipalAssignments; +import com.microsoft.azure.management.kusto.v2020_06_14.AttachedDatabaseConfigurations; +import com.microsoft.azure.management.kusto.v2020_06_14.DataConnections; +import com.microsoft.azure.management.kusto.v2020_06_14.Operations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure Kusto resource management. + */ +public final class KustoManager extends ManagerCore { + private Clusters clusters; + private ClusterPrincipalAssignments clusterPrincipalAssignments; + private Databases databases; + private DatabasePrincipalAssignments databasePrincipalAssignments; + private AttachedDatabaseConfigurations attachedDatabaseConfigurations; + private DataConnections dataConnections; + private Operations operations; + /** + * Get a Configurable instance that can be used to create KustoManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new KustoManager.ConfigurableImpl(); + } + /** + * Creates an instance of KustoManager that exposes Kusto resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the KustoManager + */ + public static KustoManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new KustoManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of KustoManager that exposes Kusto resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the KustoManager + */ + public static KustoManager authenticate(RestClient restClient, String subscriptionId) { + return new KustoManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of KustoManager that exposes Kusto management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing Kusto management API entry points that work across subscriptions + */ + KustoManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Clusters. + */ + public Clusters clusters() { + if (this.clusters == null) { + this.clusters = new ClustersImpl(this); + } + return this.clusters; + } + + /** + * @return Entry point to manage ClusterPrincipalAssignments. + */ + public ClusterPrincipalAssignments clusterPrincipalAssignments() { + if (this.clusterPrincipalAssignments == null) { + this.clusterPrincipalAssignments = new ClusterPrincipalAssignmentsImpl(this); + } + return this.clusterPrincipalAssignments; + } + + /** + * @return Entry point to manage Databases. + */ + public Databases databases() { + if (this.databases == null) { + this.databases = new DatabasesImpl(this); + } + return this.databases; + } + + /** + * @return Entry point to manage DatabasePrincipalAssignments. + */ + public DatabasePrincipalAssignments databasePrincipalAssignments() { + if (this.databasePrincipalAssignments == null) { + this.databasePrincipalAssignments = new DatabasePrincipalAssignmentsImpl(this); + } + return this.databasePrincipalAssignments; + } + + /** + * @return Entry point to manage AttachedDatabaseConfigurations. + */ + public AttachedDatabaseConfigurations attachedDatabaseConfigurations() { + if (this.attachedDatabaseConfigurations == null) { + this.attachedDatabaseConfigurations = new AttachedDatabaseConfigurationsImpl(this); + } + return this.attachedDatabaseConfigurations; + } + + /** + * @return Entry point to manage DataConnections. + */ + public DataConnections dataConnections() { + if (this.dataConnections == null) { + this.dataConnections = new DataConnectionsImpl(this); + } + return this.dataConnections; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public KustoManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return KustoManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private KustoManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new KustoManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/LanguageExtensionImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/LanguageExtensionImpl.java new file mode 100644 index 000000000000..841b9cab627b --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/LanguageExtensionImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.LanguageExtension; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.LanguageExtensionName; + +class LanguageExtensionImpl extends WrapperImpl implements LanguageExtension { + private final KustoManager manager; + LanguageExtensionImpl(LanguageExtensionInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public LanguageExtensionName languageExtensionName() { + return this.inner().languageExtensionName(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/LanguageExtensionInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/LanguageExtensionInner.java new file mode 100644 index 000000000000..1c66a8db75f0 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/LanguageExtensionInner.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.LanguageExtensionName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The language extension object. + */ +public class LanguageExtensionInner { + /** + * The language extension name. Possible values include: 'PYTHON', 'R'. + */ + @JsonProperty(value = "languageExtensionName") + private LanguageExtensionName languageExtensionName; + + /** + * Get the language extension name. Possible values include: 'PYTHON', 'R'. + * + * @return the languageExtensionName value + */ + public LanguageExtensionName languageExtensionName() { + return this.languageExtensionName; + } + + /** + * Set the language extension name. Possible values include: 'PYTHON', 'R'. + * + * @param languageExtensionName the languageExtensionName value to set + * @return the LanguageExtensionInner object itself. + */ + public LanguageExtensionInner withLanguageExtensionName(LanguageExtensionName languageExtensionName) { + this.languageExtensionName = languageExtensionName; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationImpl.java new file mode 100644 index 000000000000..b13563eaca65 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationImpl.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.OperationDisplay; + +class OperationImpl extends WrapperImpl implements Operation { + private final KustoManager manager; + OperationImpl(OperationInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationInner.java new file mode 100644 index 000000000000..6c14ff777a01 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationInner.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A REST API operation. + */ +public class OperationInner { + /** + * The operation name. + * This is of the format {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The object that describes the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * The intended executor of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Properties of the operation. + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * Get this is of the format {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set this is of the format {provider}/{resource}/{operation}. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display value. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display value. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin value. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin value. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get the properties value. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the OperationInner object itself. + */ + public OperationInner withProperties(Object properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationsImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationsImpl.java new file mode 100644 index 000000000000..828009801380 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.kusto.v2020_06_14.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.kusto.v2020_06_14.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final KustoManager manager; + + OperationsImpl(KustoManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public KustoManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationsInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationsInner.java new file mode 100644 index 000000000000..0b10fd4dd4d4 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/OperationsInner.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private KustoManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, KustoManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Operations list" }) + @GET("providers/Microsoft.Kusto/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.kusto.v2020_06_14.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists available operations for the Microsoft.Kusto provider. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/PageImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/PageImpl.java new file mode 100644 index 000000000000..b67de3e5437c --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/PageImpl1.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/PageImpl1.java new file mode 100644 index 000000000000..ca4fe0d945c2 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/PageImpl1.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl1 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/SkuDescriptionImpl.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/SkuDescriptionImpl.java new file mode 100644 index 000000000000..08b36046a1fd --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/SkuDescriptionImpl.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import com.microsoft.azure.management.kusto.v2020_06_14.SkuDescription; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.SkuLocationInfoItem; + +class SkuDescriptionImpl extends WrapperImpl implements SkuDescription { + private final KustoManager manager; + SkuDescriptionImpl(SkuDescriptionInner inner, KustoManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public KustoManager manager() { + return this.manager; + } + + @Override + public List locationInfo() { + return this.inner().locationInfo(); + } + + @Override + public List locations() { + return this.inner().locations(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public List restrictions() { + return this.inner().restrictions(); + } + + @Override + public String tier() { + return this.inner().tier(); + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/SkuDescriptionInner.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/SkuDescriptionInner.java new file mode 100644 index 000000000000..5d24b8196e3d --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/SkuDescriptionInner.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; + +import java.util.List; +import com.microsoft.azure.management.kusto.v2020_06_14.SkuLocationInfoItem; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Kusto SKU description of given resource type. + */ +public class SkuDescriptionInner { + /** + * The resource type. + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /** + * The name of the SKU. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The tier of the SKU. + */ + @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) + private String tier; + + /** + * The set of locations that the SKU is available. + */ + @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) + private List locations; + + /** + * Locations and zones. + */ + @JsonProperty(value = "locationInfo", access = JsonProperty.Access.WRITE_ONLY) + private List locationInfo; + + /** + * The restrictions because of which SKU cannot be used. + */ + @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY) + private List restrictions; + + /** + * Get the resource type. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the name of the SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the tier of the SKU. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Get the set of locations that the SKU is available. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Get locations and zones. + * + * @return the locationInfo value + */ + public List locationInfo() { + return this.locationInfo; + } + + /** + * Get the restrictions because of which SKU cannot be used. + * + * @return the restrictions value + */ + public List restrictions() { + return this.restrictions; + } + +} diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/package-info.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/package-info.java new file mode 100644 index 000000000000..1eab620a0fc3 --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for KustoManagementClient. + * The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. + */ +package com.microsoft.azure.management.kusto.v2020_06_14.implementation; diff --git a/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/package-info.java b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/package-info.java new file mode 100644 index 000000000000..b65f3fd6974c --- /dev/null +++ b/sdk/kusto/mgmt-v2020_06_14/src/main/java/com/microsoft/azure/management/kusto/v2020_06_14/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for KustoManagementClient. + * The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. + */ +package com.microsoft.azure.management.kusto.v2020_06_14; diff --git a/sdk/kusto/pom.mgmt.xml b/sdk/kusto/pom.mgmt.xml index 6036052b5861..11cb8dce534c 100644 --- a/sdk/kusto/pom.mgmt.xml +++ b/sdk/kusto/pom.mgmt.xml @@ -14,5 +14,6 @@ mgmt-v2019_09_07 mgmt-v2019_11_09 mgmt-v2020_02_15 + mgmt-v2020_06_14 diff --git a/sdk/management/README.md b/sdk/management/README.md index 647a346676d1..118dacb1db10 100644 --- a/sdk/management/README.md +++ b/sdk/management/README.md @@ -46,7 +46,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen com.azure azure-identity - 1.1.0-beta.5 + 1.0.9 ``` [//]: # ({x-version-update-end}) @@ -58,7 +58,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen com.azure azure-core-http-netty - 1.5.2 + 1.5.3 ``` [//]: # ({x-version-update-end}) @@ -103,6 +103,8 @@ The key concepts of Azure Management Libraries includes: - Integration with Azure role-based access control. - Asynchronous operations with [Reactor][reactor]. (Preview) - Configurable client, e.g. configuring HTTP client, retries, logging, etc. +- [API design][design] +- [API design (preview)][design_preview] ### Service features @@ -325,4 +327,5 @@ If you would like to become an active contributor to this project please follow [authenticate]: docs/AUTH.md [sample]: docs/SAMPLE.md [design]: docs/DESIGN.md +[design_preview]: docs/DESIGN_PREVIEW.md [reactor]: https://projectreactor.io/ diff --git a/sdk/management/api-specs.json b/sdk/management/api-specs.json index 0823f6bb2fed..10cb855a75a5 100644 --- a/sdk/management/api-specs.json +++ b/sdk/management/api-specs.json @@ -15,7 +15,7 @@ "dir": "../appplatform/mgmt", "source": "specification/appplatform/resource-manager/readme.md", "package": "com.azure.resourcemanager.appplatform", - "args": "--payload-flattening-threshold=1 --tag=package-2019-05-01-preview --remove-inner=TestKeys,ResourceSku,ResourceUploadDefinition" + "args": "--payload-flattening-threshold=1 --tag=package-2019-05-01-preview --remove-inner=TestKeys,ResourceSku,ResourceUploadDefinition,CustomDomainValidateResult,NameAvailability" }, "appservice": { "dir": "../appservice/mgmt", @@ -87,8 +87,8 @@ "containerinstance": { "dir": "../containerinstance/mgmt", "source": "specification/containerinstance/resource-manager/readme.md", - "package": "com.microsoft.azure.resourcemanager.containerinstance", - "args": "--payload-flattening-threshold=1 --tag=package-2018-10" + "package": "com.azure.resourcemanager.containerinstance", + "args": "--payload-flattening-threshold=1 --tag=package-2019-12 --remove-inner=Operation,CachedImages,Capabilities" }, "containerregistry": { "dir": "../containerregistry/mgmt", diff --git a/sdk/management/azure/pom.xml b/sdk/management/azure/pom.xml index 47f589875697..e0cad4e990d6 100644 --- a/sdk/management/azure/pom.xml +++ b/sdk/management/azure/pom.xml @@ -121,6 +121,11 @@ azure-resourcemanager-appplatform 2.0.0-SNAPSHOT + + com.azure.resourcemanager + azure-resourcemanager-containerinstance + 2.0.0-SNAPSHOT + org.junit.jupiter junit-jupiter-engine diff --git a/sdk/management/azure/src/main/java/com/azure/resourcemanager/Azure.java b/sdk/management/azure/src/main/java/com/azure/resourcemanager/Azure.java index 8e0c14d820db..70a0f496cc4c 100644 --- a/sdk/management/azure/src/main/java/com/azure/resourcemanager/Azure.java +++ b/sdk/management/azure/src/main/java/com/azure/resourcemanager/Azure.java @@ -35,6 +35,8 @@ import com.azure.resourcemanager.compute.models.VirtualMachineImages; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSets; import com.azure.resourcemanager.compute.models.VirtualMachines; +import com.azure.resourcemanager.containerinstance.ContainerInstanceManager; +import com.azure.resourcemanager.containerinstance.models.ContainerGroups; import com.azure.resourcemanager.containerregistry.ContainerRegistryManager; import com.azure.resourcemanager.containerregistry.models.Registries; import com.azure.resourcemanager.containerregistry.models.RegistryTaskRuns; @@ -117,7 +119,7 @@ public final class Azure { private final AppServiceManager appServiceManager; private final SqlServerManager sqlServerManager; // private final ServiceBusManager serviceBusManager; - // private final ContainerInstanceManager containerInstanceManager; + private final ContainerInstanceManager containerInstanceManager; private final ContainerRegistryManager containerRegistryManager; private final ContainerServiceManager containerServiceManager; // private final SearchServiceManager searchServiceManager; @@ -360,8 +362,7 @@ private Azure(HttpPipeline httpPipeline, AzureProfile profile, Authenticated aut this.appServiceManager = AppServiceManager.authenticate(httpPipeline, profile, sdkContext); this.sqlServerManager = SqlServerManager.authenticate(httpPipeline, profile, sdkContext); // this.serviceBusManager = ServiceBusManager.authenticate(restClient, subscriptionId, sdkContext); - // this.containerInstanceManager = ContainerInstanceManager.authenticate(restClient, subscriptionId, - // sdkContext); + this.containerInstanceManager = ContainerInstanceManager.authenticate(httpPipeline, profile, sdkContext); this.containerRegistryManager = ContainerRegistryManager.authenticate(httpPipeline, profile, sdkContext); this.containerServiceManager = ContainerServiceManager.authenticate(httpPipeline, profile, sdkContext); this.cosmosManager = CosmosManager.authenticate(httpPipeline, profile, sdkContext); @@ -682,13 +683,12 @@ public KubernetesClusters kubernetesClusters() { return containerServiceManager.kubernetesClusters(); } - // /** - // * @return entry point to managing Azure Container Instances. - // */ - // @Beta(SinceVersion.V1_3_0) - // public ContainerGroups containerGroups() { - // return containerInstanceManager.containerGroups(); - // } + /** + * @return entry point to managing Azure Container Instances. + */ + public ContainerGroups containerGroups() { + return containerInstanceManager.containerGroups(); + } /** @return entry point to managing Container Registries. */ public Registries containerRegistries() { diff --git a/sdk/management/azure/src/test/java/com/azure/resourcemanager/AzureTests.java b/sdk/management/azure/src/test/java/com/azure/resourcemanager/AzureTests.java index 981cb2055c47..b50b48f3b0c6 100644 --- a/sdk/management/azure/src/test/java/com/azure/resourcemanager/AzureTests.java +++ b/sdk/management/azure/src/test/java/com/azure/resourcemanager/AzureTests.java @@ -5,6 +5,7 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.exception.ManagementException; +import com.azure.resourcemanager.authorization.models.BuiltInRole; import com.azure.resourcemanager.compute.models.CachingTypes; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.PowerState; @@ -14,7 +15,13 @@ import com.azure.resourcemanager.compute.models.VirtualMachinePublisher; import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.compute.models.VirtualMachineSku; +import com.azure.resourcemanager.containerinstance.models.Container; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; +import com.azure.resourcemanager.containerinstance.models.Operation; +import com.azure.resourcemanager.containerinstance.models.ResourceIdentityType; import com.azure.resourcemanager.msi.MSIManager; +import com.azure.resourcemanager.msi.models.Identity; import com.azure.resourcemanager.network.models.Access; import com.azure.resourcemanager.network.models.ConnectionMonitor; import com.azure.resourcemanager.network.models.ConnectionMonitorQueryResult; @@ -32,31 +39,35 @@ import com.azure.resourcemanager.network.models.SecurityGroupView; import com.azure.resourcemanager.network.models.Topology; import com.azure.resourcemanager.network.models.VerificationIPFlow; -import com.azure.resourcemanager.resources.models.Deployment; -import com.azure.resourcemanager.resources.models.DeploymentMode; -import com.azure.resourcemanager.resources.models.GenericResource; -import com.azure.resourcemanager.resources.models.Location; -import com.azure.resourcemanager.resources.models.RegionType; -import com.azure.resourcemanager.resources.models.Subscription; import com.azure.resourcemanager.resources.core.TestBase; import com.azure.resourcemanager.resources.core.TestUtilities; import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.resources.models.Deployment; +import com.azure.resourcemanager.resources.models.DeploymentMode; +import com.azure.resourcemanager.resources.models.GenericResource; +import com.azure.resourcemanager.resources.models.Location; +import com.azure.resourcemanager.resources.models.RegionType; +import com.azure.resourcemanager.resources.models.Subscription; import com.azure.resourcemanager.storage.models.SkuName; import com.azure.resourcemanager.storage.models.StorageAccount; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - import java.io.IOException; import java.text.MessageFormat; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.List; +import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; public class AzureTests extends TestBase { private Azure azure; @@ -64,8 +75,7 @@ public class AzureTests extends TestBase { @Override protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile) { - Azure.Authenticated azureAuthed = - Azure.authenticate(httpPipeline, profile).withSdkContext(sdkContext); + Azure.Authenticated azureAuthed = Azure.authenticate(httpPipeline, profile).withSdkContext(sdkContext); azure = azureAuthed.withDefaultSubscription(); this.msiManager = MSIManager.authenticate(httpPipeline, profile, sdkContext); } @@ -274,7 +284,7 @@ public void testGenericResources() throws Exception { // resourceGroup = azure.resourceGroups().define(rgName) // .withRegion(region) // .create(); - // Assert.assertNotNull(resourceGroup); + // Assertions.assertNotNull(resourceGroup); // // Creatable netDefinition = azure.networks().define(netName) // .withRegion(region) @@ -360,72 +370,72 @@ public void testGenericResources() throws Exception { // .create(); // // // Verify VM lock - // Assert.assertEquals(2, azure.managementLocks().listForResource(vm.id()).size()); + // Assertions.assertEquals(2, azure.managementLocks().listForResource(vm.id()).size()); // - // Assert.assertNotNull(lockVM); + // Assertions.assertNotNull(lockVM); // lockVM = azure.managementLocks().getById(lockVM.id()); - // Assert.assertNotNull(lockVM); + // Assertions.assertNotNull(lockVM); // TestUtils.print(lockVM); - // Assert.assertEquals(LockLevel.READ_ONLY, lockVM.level()); - // Assert.assertTrue(vm.id().equalsIgnoreCase(lockVM.lockedResourceId())); + // Assertions.assertEquals(LockLevel.READ_ONLY, lockVM.level()); + // Assertions.assertTrue(vm.id().equalsIgnoreCase(lockVM.lockedResourceId())); // // // Verify resource group lock - // Assert.assertNotNull(lockGroup); + // Assertions.assertNotNull(lockGroup); // lockGroup = azure.managementLocks().getByResourceGroup(resourceGroup.name(), "rglock"); - // Assert.assertNotNull(lockGroup); + // Assertions.assertNotNull(lockGroup); // TestUtils.print(lockVM); - // Assert.assertEquals(LockLevel.CAN_NOT_DELETE, lockGroup.level()); - // Assert.assertTrue(resourceGroup.id().equalsIgnoreCase(lockGroup.lockedResourceId())); + // Assertions.assertEquals(LockLevel.CAN_NOT_DELETE, lockGroup.level()); + // Assertions.assertTrue(resourceGroup.id().equalsIgnoreCase(lockGroup.lockedResourceId())); // // // Verify storage account lock - // Assert.assertEquals(2, azure.managementLocks().listForResource(storage.id()).size()); + // Assertions.assertEquals(2, azure.managementLocks().listForResource(storage.id()).size()); // - // Assert.assertNotNull(lockStorage); + // Assertions.assertNotNull(lockStorage); // lockStorage = azure.managementLocks().getById(lockStorage.id()); - // Assert.assertNotNull(lockStorage); + // Assertions.assertNotNull(lockStorage); // TestUtils.print(lockStorage); - // Assert.assertEquals(LockLevel.CAN_NOT_DELETE, lockStorage.level()); - // Assert.assertTrue(storage.id().equalsIgnoreCase(lockStorage.lockedResourceId())); + // Assertions.assertEquals(LockLevel.CAN_NOT_DELETE, lockStorage.level()); + // Assertions.assertTrue(storage.id().equalsIgnoreCase(lockStorage.lockedResourceId())); // // // Verify disk lock - // Assert.assertEquals(3, azure.managementLocks().listForResource(disk.id()).size()); + // Assertions.assertEquals(3, azure.managementLocks().listForResource(disk.id()).size()); // - // Assert.assertNotNull(lockDiskRO); + // Assertions.assertNotNull(lockDiskRO); // lockDiskRO = azure.managementLocks().getById(lockDiskRO.id()); - // Assert.assertNotNull(lockDiskRO); + // Assertions.assertNotNull(lockDiskRO); // TestUtils.print(lockDiskRO); - // Assert.assertEquals(LockLevel.READ_ONLY, lockDiskRO.level()); - // Assert.assertTrue(disk.id().equalsIgnoreCase(lockDiskRO.lockedResourceId())); + // Assertions.assertEquals(LockLevel.READ_ONLY, lockDiskRO.level()); + // Assertions.assertTrue(disk.id().equalsIgnoreCase(lockDiskRO.lockedResourceId())); // - // Assert.assertNotNull(lockDiskDel); + // Assertions.assertNotNull(lockDiskDel); // lockDiskDel = azure.managementLocks().getById(lockDiskDel.id()); - // Assert.assertNotNull(lockDiskDel); + // Assertions.assertNotNull(lockDiskDel); // TestUtils.print(lockDiskDel); - // Assert.assertEquals(LockLevel.CAN_NOT_DELETE, lockDiskDel.level()); - // Assert.assertTrue(disk.id().equalsIgnoreCase(lockDiskDel.lockedResourceId())); + // Assertions.assertEquals(LockLevel.CAN_NOT_DELETE, lockDiskDel.level()); + // Assertions.assertTrue(disk.id().equalsIgnoreCase(lockDiskDel.lockedResourceId())); // // // Verify subnet lock - // Assert.assertEquals(2, azure.managementLocks().listForResource(network.id()).size()); + // Assertions.assertEquals(2, azure.managementLocks().listForResource(network.id()).size()); // // lockSubnet = azure.managementLocks().getById(lockSubnet.id()); - // Assert.assertNotNull(lockSubnet); + // Assertions.assertNotNull(lockSubnet); // TestUtils.print(lockSubnet); - // Assert.assertEquals(LockLevel.READ_ONLY, lockSubnet.level()); - // Assert.assertTrue(subnet.inner().id().equalsIgnoreCase(lockSubnet.lockedResourceId())); + // Assertions.assertEquals(LockLevel.READ_ONLY, lockSubnet.level()); + // Assertions.assertTrue(subnet.inner().id().equalsIgnoreCase(lockSubnet.lockedResourceId())); // // // Verify lock collection // List locksSubscription = azure.managementLocks().list(); // List locksGroup = azure.managementLocks().listByResourceGroup(vm.resourceGroupName()); - // Assert.assertNotNull(locksSubscription); - // Assert.assertNotNull(locksGroup); + // Assertions.assertNotNull(locksSubscription); + // Assertions.assertNotNull(locksGroup); // // int locksAllCount = locksSubscription.size(); // System.out.println("All locks: " + locksAllCount); - // Assert.assertTrue(6 <= locksAllCount); + // Assertions.assertTrue(6 <= locksAllCount); // // int locksGroupCount = locksGroup.size(); // System.out.println("Group locks: " + locksGroupCount); - // Assert.assertEquals(6, locksGroup.size()); + // Assertions.assertEquals(6, locksGroup.size()); // } catch (Exception ex) { // ex.printStackTrace(System.out); // } finally { @@ -861,7 +871,7 @@ public void testNetworkWatcherFunctions() throws Exception { azure.virtualMachines().deleteById(virtualMachines[1].id()); topology.execute(); - // Assert.assertEquals(10, topology.resources().size()); // not sure why it is 18 now + // Assertions.assertEquals(10, topology.resources().size()); // not sure why it is 18 now } finally { if (nwrg != null) { azure.resourceGroups().beginDeleteByName(nwrg); @@ -1085,134 +1095,141 @@ public void testKubernetesCluster() throws Exception { new TestKubernetesCluster().runTest(azure.kubernetesClusters(), azure.resourceGroups()); } - // @Test - // public void testContainerInstanceWithPublicIpAddressWithSystemAssignedMsi() throws Exception { - // new TestContainerInstanceWithPublicIpAddressWithSystemAssignedMSI().runTest(azure.containerGroups(), - // azure.resourceGroups(), azure.subscriptionId()); - // } - // - // @Test - // public void testContainerInstanceWithPublicIpAddressWithUserAssignedMsi() throws Exception { - // final String cgName = SdkContext.randomResourceName("aci", 10); - // final String rgName = SdkContext.randomResourceName("rgaci", 10); - // String identityName1 = generateRandomResourceName("msi-id", 15); - // String identityName2 = generateRandomResourceName("msi-id", 15); - // - // final Identity createdIdentity = msiManager.identities() - // .define(identityName1) - // .withRegion(Region.US_WEST) - // .withNewResourceGroup(rgName) - // .withAccessToCurrentResourceGroup(BuiltInRole.READER) - // .create(); - // - // Creatable creatableIdentity = msiManager.identities() - // .define(identityName2) - // .withRegion(Region.US_WEST) - // .withExistingResourceGroup(rgName) - // .withAccessToCurrentResourceGroup(BuiltInRole.CONTRIBUTOR); - // - // - // List dnsServers = new ArrayList(); - // dnsServers.add("dnsServer1"); - // ContainerGroup containerGroup = azure.containerGroups().define(cgName) - // .withRegion(Region.US_EAST2) - // .withExistingResourceGroup(rgName) - // .withLinux() - // .withPublicImageRegistryOnly() - // .withEmptyDirectoryVolume("emptydir1") - // .defineContainerInstance("tomcat") - // .withImage("tomcat") - // .withExternalTcpPort(8080) - // .withCpuCoreCount(1) - // .withEnvironmentVariable("ENV1", "value1") - // .attach() - // .defineContainerInstance("nginx") - // .withImage("nginx") - // .withExternalTcpPort(80) - // .withEnvironmentVariableWithSecuredValue("ENV2", "securedValue1") - // .attach() - // .withExistingUserAssignedManagedServiceIdentity(createdIdentity) - // .withNewUserAssignedManagedServiceIdentity(creatableIdentity) - // .withRestartPolicy(ContainerGroupRestartPolicy.NEVER) - // .withDnsPrefix(cgName) - // .withTag("tag1", "value1") - // .create(); - // - // Assert.assertEquals(cgName, containerGroup.name()); - // Assert.assertEquals("Linux", containerGroup.osType().toString()); - // Assert.assertEquals(0, containerGroup.imageRegistryServers().size()); - // Assert.assertEquals(1, containerGroup.volumes().size()); - // Assert.assertNotNull(containerGroup.volumes().get("emptydir1")); - // Assert.assertNotNull(containerGroup.ipAddress()); - // Assert.assertTrue(containerGroup.isIPAddressPublic()); - // Assert.assertEquals(2, containerGroup.externalTcpPorts().length); - // Assert.assertEquals(2, containerGroup.externalPorts().size()); - // Assert.assertEquals(2, containerGroup.externalTcpPorts().length); - // Assert.assertEquals(8080, containerGroup.externalTcpPorts()[0]); - // Assert.assertEquals(80, containerGroup.externalTcpPorts()[1]); - // Assert.assertEquals(2, containerGroup.containers().size()); - // Container tomcatContainer = containerGroup.containers().get("tomcat"); - // Assert.assertNotNull(tomcatContainer); - // Container nginxContainer = containerGroup.containers().get("nginx"); - // Assert.assertNotNull(nginxContainer); - // Assert.assertEquals("tomcat", tomcatContainer.name()); - // Assert.assertEquals("tomcat", tomcatContainer.image()); - // Assert.assertEquals(1.0, tomcatContainer.resources().requests().cpu(), .1); - // Assert.assertEquals(1.5, tomcatContainer.resources().requests().memoryInGB(), .1); - // Assert.assertEquals(1, tomcatContainer.ports().size()); - // Assert.assertEquals(8080, tomcatContainer.ports().get(0).port()); - // Assert.assertNull(tomcatContainer.volumeMounts()); - // Assert.assertNull(tomcatContainer.command()); - // Assert.assertNotNull(tomcatContainer.environmentVariables()); - // Assert.assertEquals(1, tomcatContainer.environmentVariables().size()); - // Assert.assertEquals("nginx", nginxContainer.name()); - // Assert.assertEquals("nginx", nginxContainer.image()); - // Assert.assertEquals(1.0, nginxContainer.resources().requests().cpu(), .1); - // Assert.assertEquals(1.5, nginxContainer.resources().requests().memoryInGB(), .1); - // Assert.assertEquals(1, nginxContainer.ports().size()); - // Assert.assertEquals(80, nginxContainer.ports().get(0).port()); - // Assert.assertNull(nginxContainer.volumeMounts()); - // Assert.assertNull(nginxContainer.command()); - // Assert.assertNotNull(nginxContainer.environmentVariables()); - // Assert.assertEquals(1, nginxContainer.environmentVariables().size()); - // Assert.assertTrue(containerGroup.tags().containsKey("tag1")); - // Assert.assertEquals(ContainerGroupRestartPolicy.NEVER, containerGroup.restartPolicy()); - // Assert.assertTrue(containerGroup.isManagedServiceIdentityEnabled()); - // Assert.assertEquals(ResourceIdentityType.USER_ASSIGNED, containerGroup.managedServiceIdentityType()); - // Assert.assertNull(containerGroup.systemAssignedManagedServiceIdentityPrincipalId()); // No Local MSI - // enabled - // - // // Ensure the "User Assigned (External) MSI" id can be retrieved from the virtual machine - // // - // Set emsiIds = containerGroup.userAssignedManagedServiceIdentityIds(); - // Assert.assertNotNull(emsiIds); - // Assert.assertEquals(2, emsiIds.size()); - // Assert.assertEquals(cgName, containerGroup.dnsPrefix()); - // - // //TODO: add network and dns testing when questions have been answered - // - // ContainerGroup containerGroup2 = azure.containerGroups().getByResourceGroup(rgName, cgName); - // - // List containerGroupList = azure.containerGroups().listByResourceGroup(rgName); - // Assert.assertTrue(containerGroupList.size() > 0); - // Assert.assertNotNull(containerGroupList.get(0).state()); - // - // containerGroup.refresh(); - // - // Set containerGroupOperations = azure.containerGroups().listOperations(); - // // Number of supported operation can change hence don't assert with a predefined number. - // Assert.assertTrue(containerGroupOperations.size() > 0); - // } + @Test + public void testContainerInstanceWithPublicIpAddressWithSystemAssignedMsi() throws Exception { + new TestContainerInstanceWithPublicIpAddressWithSystemAssignedMSI() + .runTest(azure.containerGroups(), azure.resourceGroups(), azure.subscriptionId()); + } + + @Test + public void testContainerInstanceWithPublicIpAddressWithUserAssignedMsi() throws Exception { + final String cgName = generateRandomResourceName("aci", 10); + final String rgName = generateRandomResourceName("rgaci", 10); + String identityName1 = generateRandomResourceName("msi-id", 15); + String identityName2 = generateRandomResourceName("msi-id", 15); + + final Identity createdIdentity = + msiManager + .identities() + .define(identityName1) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withAccessToCurrentResourceGroup(BuiltInRole.READER) + .create(); + + Creatable creatableIdentity = + msiManager + .identities() + .define(identityName2) + .withRegion(Region.US_WEST) + .withExistingResourceGroup(rgName) + .withAccessToCurrentResourceGroup(BuiltInRole.CONTRIBUTOR); + + List dnsServers = new ArrayList(); + dnsServers.add("dnsServer1"); + ContainerGroup containerGroup = + azure + .containerGroups() + .define(cgName) + .withRegion(Region.US_EAST2) + .withExistingResourceGroup(rgName) + .withLinux() + .withPublicImageRegistryOnly() + .withEmptyDirectoryVolume("emptydir1") + .defineContainerInstance("tomcat") + .withImage("tomcat") + .withExternalTcpPort(8080) + .withCpuCoreCount(1) + .withEnvironmentVariable("ENV1", "value1") + .attach() + .defineContainerInstance("nginx") + .withImage("nginx") + .withExternalTcpPort(80) + .withEnvironmentVariableWithSecuredValue("ENV2", "securedValue1") + .attach() + .withExistingUserAssignedManagedServiceIdentity(createdIdentity) + .withNewUserAssignedManagedServiceIdentity(creatableIdentity) + .withRestartPolicy(ContainerGroupRestartPolicy.NEVER) + .withDnsPrefix(cgName) + .withTag("tag1", "value1") + .create(); + + Assertions.assertEquals(cgName, containerGroup.name()); + Assertions.assertEquals("Linux", containerGroup.osType().toString()); + Assertions.assertEquals(0, containerGroup.imageRegistryServers().size()); + Assertions.assertEquals(1, containerGroup.volumes().size()); + Assertions.assertNotNull(containerGroup.volumes().get("emptydir1")); + Assertions.assertNotNull(containerGroup.ipAddress()); + Assertions.assertTrue(containerGroup.isIPAddressPublic()); + Assertions.assertEquals(2, containerGroup.externalTcpPorts().length); + Assertions.assertEquals(2, containerGroup.externalPorts().size()); + Assertions.assertEquals(2, containerGroup.externalTcpPorts().length); + Assertions.assertEquals(8080, containerGroup.externalTcpPorts()[0]); + Assertions.assertEquals(80, containerGroup.externalTcpPorts()[1]); + Assertions.assertEquals(2, containerGroup.containers().size()); + Container tomcatContainer = containerGroup.containers().get("tomcat"); + Assertions.assertNotNull(tomcatContainer); + Container nginxContainer = containerGroup.containers().get("nginx"); + Assertions.assertNotNull(nginxContainer); + Assertions.assertEquals("tomcat", tomcatContainer.name()); + Assertions.assertEquals("tomcat", tomcatContainer.image()); + Assertions.assertEquals(1.0, tomcatContainer.resources().requests().cpu(), .1); + Assertions.assertEquals(1.5, tomcatContainer.resources().requests().memoryInGB(), .1); + Assertions.assertEquals(1, tomcatContainer.ports().size()); + Assertions.assertEquals(8080, tomcatContainer.ports().get(0).port()); + Assertions.assertNull(tomcatContainer.volumeMounts()); + Assertions.assertNull(tomcatContainer.command()); + Assertions.assertNotNull(tomcatContainer.environmentVariables()); + Assertions.assertEquals(1, tomcatContainer.environmentVariables().size()); + Assertions.assertEquals("nginx", nginxContainer.name()); + Assertions.assertEquals("nginx", nginxContainer.image()); + Assertions.assertEquals(1.0, nginxContainer.resources().requests().cpu(), .1); + Assertions.assertEquals(1.5, nginxContainer.resources().requests().memoryInGB(), .1); + Assertions.assertEquals(1, nginxContainer.ports().size()); + Assertions.assertEquals(80, nginxContainer.ports().get(0).port()); + Assertions.assertNull(nginxContainer.volumeMounts()); + Assertions.assertNull(nginxContainer.command()); + Assertions.assertNotNull(nginxContainer.environmentVariables()); + Assertions.assertEquals(1, nginxContainer.environmentVariables().size()); + Assertions.assertTrue(containerGroup.tags().containsKey("tag1")); + Assertions.assertEquals(ContainerGroupRestartPolicy.NEVER, containerGroup.restartPolicy()); + Assertions.assertTrue(containerGroup.isManagedServiceIdentityEnabled()); + Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, containerGroup.managedServiceIdentityType()); + Assertions.assertNull(containerGroup.systemAssignedManagedServiceIdentityPrincipalId()); // No Local MSI enabled + + // Ensure the "User Assigned (External) MSI" id can be retrieved from the virtual machine + // + Set emsiIds = containerGroup.userAssignedManagedServiceIdentityIds(); + Assertions.assertNotNull(emsiIds); + Assertions.assertEquals(2, emsiIds.size()); + Assertions.assertEquals(cgName, containerGroup.dnsPrefix()); + + // TODO: add network and dns testing when questions have been answered + + ContainerGroup containerGroup2 = azure.containerGroups().getByResourceGroup(rgName, cgName); + + List containerGroupList = + azure.containerGroups().listByResourceGroup(rgName).stream().collect(Collectors.toList()); + Assertions.assertTrue(containerGroupList.size() > 0); + + containerGroup.refresh(); + + Set containerGroupOperations = + azure.containerGroups().listOperations().stream().collect(Collectors.toSet()); + // Number of supported operation can change hence don't assert with a predefined number. + Assertions.assertTrue(containerGroupOperations.size() > 0); + } + + @Disabled("Cannot run test due to unknown parameter") + @Test + public void testContainerInstanceWithPrivateIpAddress() throws Exception { + // LIVE ONLY TEST BECAUSE IT REQUIRES SUBSCRIPTION ID + if (!isPlaybackMode()) { + new TestContainerInstanceWithPrivateIpAddress() + .runTest(azure.containerGroups(), azure.resourceGroups(), azure.subscriptionId()); + } + } - // @Test - // public void testContainerInstanceWithPrivateIpAddress() throws Exception { - // //LIVE ONLY TEST BECAUSE IT REQUIRES SUBSCRIPTION ID - // if (!isPlaybackMode()) { - // new TestContainerInstanceWithPrivateIpAddress() - // .runTest(azure.containerGroups(), azure.resourceGroups(), azure.subscriptionId()); - // } - // } - // @Test public void testContainerRegistry() throws Exception { new TestContainerRegistry().runTest(azure.containerRegistries(), azure.resourceGroups()); diff --git a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestContainerInstanceWithPrivateIpAddress.java b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestContainerInstanceWithPrivateIpAddress.java index e599082d8ed0..ddf88eb9f4e7 100644 --- a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestContainerInstanceWithPrivateIpAddress.java +++ b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestContainerInstanceWithPrivateIpAddress.java @@ -1,223 +1,238 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// -// package com.azure.management; -// -// import com.microsoft.azure.management.containerinstance.Container; -// import com.microsoft.azure.management.containerinstance.ContainerGroup; -// import com.microsoft.azure.management.containerinstance.ContainerGroupRestartPolicy; -// import com.microsoft.azure.management.containerinstance.ContainerGroups; -// import com.microsoft.azure.management.containerinstance.ContainerPort; -// import com.microsoft.azure.management.containerinstance.EnvironmentVariable; -// import com.microsoft.azure.management.containerinstance.Operation; -// import com.microsoft.azure.management.containerinstance.ResourceIdentityType; -// import com.microsoft.azure.management.containerinstance.Volume; -// import com.microsoft.azure.management.containerinstance.VolumeMount; -// import com.microsoft.azure.management.graphrbac.BuiltInRole; -// import com.microsoft.azure.management.resources.core.TestBase; -// import com.microsoft.azure.management.resources.fluentcore.arm.Region; -// import org.junit.Assert; -// -// import java.util.ArrayList; -// import java.util.List; -// import java.util.Map; -// import java.util.Set; -// -// public class TestContainerInstanceWithPrivateIpAddress extends TestTemplate { -// -// @Override -// public ContainerGroup createResource(ContainerGroups containerGroups) throws Exception { -// final String cgName = "aci" + this.testId; -// final String rgName = "rgaci" + this.testId; -// -// final String logAnalyticsWorkspaceId = "REPLACE WITH YOUR LOG ANALYTICS WORKSPACE ID"; -// final String logAnalyticsWorkspaceKey = "REPLACE WITH YOUR LOG ANALYTICS WORKSPACE KEY"; -// final String networkProfileSubscriptionId = "REPLACE WITH YOUR NETWORK PROFILE SUBSCRIPTION ID"; -// final String networkProfileResourceGroupName = "REPLACE WITH YOUR NETWORK PROFILE RESOURCE GROUP NAME"; -// final String networkProfileName = "REPLEACE WITH YOUR NETWORK PROFILE NAME"; -// final List dnsServerNames = new ArrayList(); -// dnsServerNames.add("dnsServer1"); -// -// -// List dnsServers = new ArrayList(); -// dnsServers.add("dnsServer1"); -// ContainerGroup containerGroup = containerGroups.define(cgName) -// .withRegion(Region.US_WEST) -// .withNewResourceGroup(rgName) -// .withLinux() -// .withPublicImageRegistryOnly() -// .withEmptyDirectoryVolume("emptydir1") -// .defineContainerInstance("tomcat") -// .withImage("tomcat") -// .withExternalTcpPort(8080) -// .withCpuCoreCount(1) -// .withEnvironmentVariable("ENV1", "value1") -// .attach() -// .defineContainerInstance("nginx") -// .withImage("nginx") -// .withExternalTcpPort(80) -// .withEnvironmentVariableWithSecuredValue("ENV2", "securedValue1") -// .attach() -// .withSystemAssignedManagedServiceIdentity() -// .withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(BuiltInRole.CONTRIBUTOR) -// .withRestartPolicy(ContainerGroupRestartPolicy.NEVER) -// .withLogAnalytics(logAnalyticsWorkspaceId, logAnalyticsWorkspaceKey) -// .withNetworkProfileId(networkProfileSubscriptionId, networkProfileResourceGroupName, -// networkProfileName) -// .withDnsConfiguration(dnsServerNames, "dnsSearchDomains", "dnsOptions") -// .withTag("tag1", "value1") -// .create(); -// -// Assert.assertEquals(cgName, containerGroup.name()); -// Assert.assertEquals("Linux", containerGroup.osType().toString()); -// Assert.assertEquals(0, containerGroup.imageRegistryServers().size()); -// Assert.assertEquals(1, containerGroup.volumes().size()); -// Assert.assertNotNull(containerGroup.volumes().get("emptydir1")); -// Assert.assertNotNull(containerGroup.ipAddress()); -// Assert.assertTrue(containerGroup.isIPAddressPrivate()); -// Assert.assertEquals(2, containerGroup.externalTcpPorts().length); -// Assert.assertEquals(2, containerGroup.externalPorts().size()); -// Assert.assertEquals(2, containerGroup.externalTcpPorts().length); -// Assert.assertEquals(8080, containerGroup.externalTcpPorts()[0]); -// Assert.assertEquals(80, containerGroup.externalTcpPorts()[1]); -// Assert.assertEquals(2, containerGroup.containers().size()); -// Container tomcatContainer = containerGroup.containers().get("tomcat"); -// Assert.assertNotNull(tomcatContainer); -// Container nginxContainer = containerGroup.containers().get("nginx"); -// Assert.assertNotNull(nginxContainer); -// Assert.assertEquals("tomcat", tomcatContainer.name()); -// Assert.assertEquals("tomcat", tomcatContainer.image()); -// Assert.assertEquals(1.0, tomcatContainer.resources().requests().cpu(), .1); -// Assert.assertEquals(1.5, tomcatContainer.resources().requests().memoryInGB(), .1); -// Assert.assertEquals(1, tomcatContainer.ports().size()); -// Assert.assertEquals(8080, tomcatContainer.ports().get(0).port()); -// Assert.assertNull(tomcatContainer.volumeMounts()); -// Assert.assertNull(tomcatContainer.command()); -// Assert.assertNotNull(tomcatContainer.environmentVariables()); -// Assert.assertEquals(1, tomcatContainer.environmentVariables().size()); -// Assert.assertEquals("nginx", nginxContainer.name()); -// Assert.assertEquals("nginx", nginxContainer.image()); -// Assert.assertEquals(1.0, nginxContainer.resources().requests().cpu(), .1); -// Assert.assertEquals(1.5, nginxContainer.resources().requests().memoryInGB(), .1); -// Assert.assertEquals(1, nginxContainer.ports().size()); -// Assert.assertEquals(80, nginxContainer.ports().get(0).port()); -// Assert.assertNull(nginxContainer.volumeMounts()); -// Assert.assertNull(nginxContainer.command()); -// Assert.assertNotNull(nginxContainer.environmentVariables()); -// Assert.assertEquals(1, nginxContainer.environmentVariables().size()); -// Assert.assertTrue(containerGroup.tags().containsKey("tag1")); -// Assert.assertEquals(ContainerGroupRestartPolicy.NEVER, containerGroup.restartPolicy()); -// Assert.assertTrue(containerGroup.isManagedServiceIdentityEnabled()); -// Assert.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, containerGroup.managedServiceIdentityType()); -// Assert.assertEquals(logAnalyticsWorkspaceId, containerGroup.logAnalytics().workspaceId()); -// Assert.assertEquals("/subscriptions/" + networkProfileSubscriptionId + "/resourceGroups/" + -// networkProfileResourceGroupName + "/providers/Microsoft.Network/networkProfiles/" + networkProfileName, -// containerGroup.networkProfileId()); -// Assert.assertEquals("dnsServer1", containerGroup.dnsConfig().nameServers().get(0)); -// Assert.assertEquals("dnsSearchDomains", containerGroup.dnsConfig().searchDomains()); -// Assert.assertEquals("dnsOptions", containerGroup.dnsConfig().options()); -// -// ContainerGroup containerGroup2 = containerGroups.getByResourceGroup(rgName, cgName); -// -// List containerGroupList = containerGroups.listByResourceGroup(rgName); -// Assert.assertTrue(containerGroupList.size() > 0); -// Assert.assertNotNull(containerGroupList.get(0).state()); -// -// containerGroup.refresh(); -// -// Set containerGroupOperations = containerGroups.listOperations(); -// // Number of supported operation can change hence don't assert with a predefined number. -// Assert.assertTrue(containerGroupOperations.size() > 0); -// -// return containerGroup; -// } -// -// @Override -// public ContainerGroup updateResource(ContainerGroup containerGroup) throws Exception { -// containerGroup.update() -// .withoutTag("tag1") -// .withTag("tag2", "value2") -// .apply(); -// Assert.assertFalse(containerGroup.tags().containsKey("tag")); -// Assert.assertTrue(containerGroup.tags().containsKey("tag2")); -// -// containerGroup.restart(); -// containerGroup.stop(); -// -// return containerGroup; -// } -// -// @Override -// public void print(ContainerGroup resource) { -// StringBuilder info = new StringBuilder().append("Container Group: ").append(resource.id()) -// .append("Name: ").append(resource.name()) -// .append("\n\tResource group: ").append(resource.resourceGroupName()) -// .append("\n\tRegion: ").append(resource.region()) -// .append("\n\tTags: ").append(resource.tags()) -// .append("\n\tOS type: ").append(resource.osType()); -// -// if (resource.ipAddress() != null) { -// info.append("\n\tPublic IP address: ").append(resource.ipAddress()); -// } -// if (resource.externalTcpPorts() != null) { -// info.append("\n\tExternal TCP ports:"); -// for (int port : resource.externalTcpPorts()) { -// info.append(" ").append(port); -// } -// } -// if (resource.externalUdpPorts() != null) { -// info.append("\n\tExternal UDP ports:"); -// for (int port : resource.externalUdpPorts()) { -// info.append(" ").append(port); -// } -// } -// if (resource.imageRegistryServers() != null) { -// info.append("\n\tPrivate Docker image registries:"); -// for (String server : resource.imageRegistryServers()) { -// info.append(" ").append(server); -// } -// } -// if (resource.volumes() != null) { -// info.append("\n\tVolume mapping: "); -// for (Map.Entry entry: resource.volumes().entrySet()) { -// info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ") -// .append(entry.getValue().azureFile() != null ? entry.getValue().azureFile().shareName() : -// "empty direcory volume"); -// } -// } -// if (resource.containers() != null) { -// info.append("\n\tContainer instances: "); -// for (Map.Entry entry: resource.containers().entrySet()) { -// Container container = entry.getValue(); -// info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ").append(container.image()); -// info.append("\n\t\t\tResources: "); -// info.append(container.resources().requests().cpu()).append("CPUs "); -// info.append(container.resources().requests().memoryInGB()).append("GB"); -// info.append("\n\t\t\tPorts:"); -// for (ContainerPort port : container.ports()) { -// info.append(" ").append(port.port()); -// } -// if (container.volumeMounts() != null) { -// info.append("\n\t\t\tVolume mounts:"); -// for (VolumeMount volumeMount : container.volumeMounts()) { -// info.append(" ").append(volumeMount.name()).append("->").append(volumeMount.mountPath()); -// } -// } -// if (container.command() != null) { -// info.append("\n\t\t\tStart commands:"); -// for (String command : container.command()) { -// info.append("\n\t\t\t\t").append(command); -// } -// } -// if (container.environmentVariables() != null) { -// info.append("\n\t\t\tENV vars:"); -// for (EnvironmentVariable envVar : container.environmentVariables()) { -// info.append("\n\t\t\t\t").append(envVar.name()).append("=").append(envVar.value()); -// } -// } -// } -// } -// -// System.out.println(info.toString()); -// } -// } + +package com.azure.resourcemanager; + +import com.azure.resourcemanager.authorization.models.BuiltInRole; +import com.azure.resourcemanager.containerinstance.models.Container; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; +import com.azure.resourcemanager.containerinstance.models.ContainerGroups; +import com.azure.resourcemanager.containerinstance.models.ContainerPort; +import com.azure.resourcemanager.containerinstance.models.EnvironmentVariable; +import com.azure.resourcemanager.containerinstance.models.Operation; +import com.azure.resourcemanager.containerinstance.models.ResourceIdentityType; +import com.azure.resourcemanager.containerinstance.models.Volume; +import com.azure.resourcemanager.containerinstance.models.VolumeMount; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import org.junit.jupiter.api.Assertions; + +public class TestContainerInstanceWithPrivateIpAddress extends TestTemplate { + + @Override + public ContainerGroup createResource(ContainerGroups containerGroups) throws Exception { + final String cgName = containerGroups.manager().sdkContext().randomResourceName("aci", 10); + final String rgName = containerGroups.manager().sdkContext().randomResourceName("rgaci", 10); + + final String logAnalyticsWorkspaceId = "REPLACE WITH YOUR LOG ANALYTICS WORKSPACE ID"; + final String logAnalyticsWorkspaceKey = "REPLACE WITH YOUR LOG ANALYTICS WORKSPACE KEY"; + final String networkProfileSubscriptionId = "REPLACE WITH YOUR NETWORK PROFILE SUBSCRIPTION ID"; + final String networkProfileResourceGroupName = "REPLACE WITH YOUR NETWORK PROFILE RESOURCE GROUP NAME"; + final String networkProfileName = "REPLEACE WITH YOUR NETWORK PROFILE NAME"; + final List dnsServerNames = new ArrayList(); + dnsServerNames.add("dnsServer1"); + + List dnsServers = new ArrayList(); + dnsServers.add("dnsServer1"); + ContainerGroup containerGroup = + containerGroups + .define(cgName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withLinux() + .withPublicImageRegistryOnly() + .withEmptyDirectoryVolume("emptydir1") + .defineContainerInstance("tomcat") + .withImage("tomcat") + .withExternalTcpPort(8080) + .withCpuCoreCount(1) + .withEnvironmentVariable("ENV1", "value1") + .attach() + .defineContainerInstance("nginx") + .withImage("nginx") + .withExternalTcpPort(80) + .withEnvironmentVariableWithSecuredValue("ENV2", "securedValue1") + .attach() + .withSystemAssignedManagedServiceIdentity() + .withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(BuiltInRole.CONTRIBUTOR) + .withRestartPolicy(ContainerGroupRestartPolicy.NEVER) + .withLogAnalytics(logAnalyticsWorkspaceId, logAnalyticsWorkspaceKey) + .withExistingNetworkProfile(networkProfileSubscriptionId, networkProfileResourceGroupName, networkProfileName) + .withDnsConfiguration(dnsServerNames, "dnsSearchDomains", "dnsOptions") + .withTag("tag1", "value1") + .create(); + + Assertions.assertEquals(cgName, containerGroup.name()); + Assertions.assertEquals("Linux", containerGroup.osType().toString()); + Assertions.assertEquals(0, containerGroup.imageRegistryServers().size()); + Assertions.assertEquals(1, containerGroup.volumes().size()); + Assertions.assertNotNull(containerGroup.volumes().get("emptydir1")); + Assertions.assertNotNull(containerGroup.ipAddress()); + Assertions.assertTrue(containerGroup.isIPAddressPrivate()); + Assertions.assertEquals(2, containerGroup.externalTcpPorts().length); + Assertions.assertEquals(2, containerGroup.externalPorts().size()); + Assertions.assertEquals(2, containerGroup.externalTcpPorts().length); + Assertions.assertEquals(8080, containerGroup.externalTcpPorts()[0]); + Assertions.assertEquals(80, containerGroup.externalTcpPorts()[1]); + Assertions.assertEquals(2, containerGroup.containers().size()); + Container tomcatContainer = containerGroup.containers().get("tomcat"); + Assertions.assertNotNull(tomcatContainer); + Container nginxContainer = containerGroup.containers().get("nginx"); + Assertions.assertNotNull(nginxContainer); + Assertions.assertEquals("tomcat", tomcatContainer.name()); + Assertions.assertEquals("tomcat", tomcatContainer.image()); + Assertions.assertEquals(1.0, tomcatContainer.resources().requests().cpu(), .1); + Assertions.assertEquals(1.5, tomcatContainer.resources().requests().memoryInGB(), .1); + Assertions.assertEquals(1, tomcatContainer.ports().size()); + Assertions.assertEquals(8080, tomcatContainer.ports().get(0).port()); + Assertions.assertNull(tomcatContainer.volumeMounts()); + Assertions.assertNull(tomcatContainer.command()); + Assertions.assertNotNull(tomcatContainer.environmentVariables()); + Assertions.assertEquals(1, tomcatContainer.environmentVariables().size()); + Assertions.assertEquals("nginx", nginxContainer.name()); + Assertions.assertEquals("nginx", nginxContainer.image()); + Assertions.assertEquals(1.0, nginxContainer.resources().requests().cpu(), .1); + Assertions.assertEquals(1.5, nginxContainer.resources().requests().memoryInGB(), .1); + Assertions.assertEquals(1, nginxContainer.ports().size()); + Assertions.assertEquals(80, nginxContainer.ports().get(0).port()); + Assertions.assertNull(nginxContainer.volumeMounts()); + Assertions.assertNull(nginxContainer.command()); + Assertions.assertNotNull(nginxContainer.environmentVariables()); + Assertions.assertEquals(1, nginxContainer.environmentVariables().size()); + Assertions.assertTrue(containerGroup.tags().containsKey("tag1")); + Assertions.assertEquals(ContainerGroupRestartPolicy.NEVER, containerGroup.restartPolicy()); + Assertions.assertTrue(containerGroup.isManagedServiceIdentityEnabled()); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, containerGroup.managedServiceIdentityType()); + Assertions.assertEquals(logAnalyticsWorkspaceId, containerGroup.logAnalytics().workspaceId()); + Assertions + .assertEquals( + "/subscriptions/" + + networkProfileSubscriptionId + + "/resourceGroups/" + + networkProfileResourceGroupName + + "/providers/Microsoft.Network/networkProfiles/" + + networkProfileName, + containerGroup.networkProfileId()); + Assertions.assertEquals("dnsServer1", containerGroup.dnsConfig().nameServers().get(0)); + Assertions.assertEquals("dnsSearchDomains", containerGroup.dnsConfig().searchDomains()); + Assertions.assertEquals("dnsOptions", containerGroup.dnsConfig().options()); + + ContainerGroup containerGroup2 = containerGroups.getByResourceGroup(rgName, cgName); + + List containerGroupList = + containerGroups.listByResourceGroup(rgName).stream().collect(Collectors.toList()); + Assertions.assertTrue(containerGroupList.size() > 0); + + containerGroup.refresh(); + + Set containerGroupOperations = containerGroups.listOperations().stream().collect(Collectors.toSet()); + // Number of supported operation can change hence don't assert with a predefined number. + Assertions.assertTrue(containerGroupOperations.size() > 0); + + return containerGroup; + } + + @Override + public ContainerGroup updateResource(ContainerGroup containerGroup) throws Exception { + containerGroup.update().withoutTag("tag1").withTag("tag2", "value2").apply(); + Assertions.assertFalse(containerGroup.tags().containsKey("tag")); + Assertions.assertTrue(containerGroup.tags().containsKey("tag2")); + + containerGroup.restart(); + containerGroup.stop(); + + return containerGroup; + } + + @Override + public void print(ContainerGroup resource) { + StringBuilder info = + new StringBuilder() + .append("Container Group: ") + .append(resource.id()) + .append("Name: ") + .append(resource.name()) + .append("\n\tResource group: ") + .append(resource.resourceGroupName()) + .append("\n\tRegion: ") + .append(resource.region()) + .append("\n\tTags: ") + .append(resource.tags()) + .append("\n\tOS type: ") + .append(resource.osType()); + + if (resource.ipAddress() != null) { + info.append("\n\tPublic IP address: ").append(resource.ipAddress()); + } + if (resource.externalTcpPorts() != null) { + info.append("\n\tExternal TCP ports:"); + for (int port : resource.externalTcpPorts()) { + info.append(" ").append(port); + } + } + if (resource.externalUdpPorts() != null) { + info.append("\n\tExternal UDP ports:"); + for (int port : resource.externalUdpPorts()) { + info.append(" ").append(port); + } + } + if (resource.imageRegistryServers() != null) { + info.append("\n\tPrivate Docker image registries:"); + for (String server : resource.imageRegistryServers()) { + info.append(" ").append(server); + } + } + if (resource.volumes() != null) { + info.append("\n\tVolume mapping: "); + for (Map.Entry entry : resource.volumes().entrySet()) { + info + .append("\n\t\tName: ") + .append(entry.getKey()) + .append(" -> ") + .append( + entry.getValue().azureFile() != null + ? entry.getValue().azureFile().shareName() + : "empty direcory volume"); + } + } + if (resource.containers() != null) { + info.append("\n\tContainer instances: "); + for (Map.Entry entry : resource.containers().entrySet()) { + Container container = entry.getValue(); + info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ").append(container.image()); + info.append("\n\t\t\tResources: "); + info.append(container.resources().requests().cpu()).append("CPUs "); + info.append(container.resources().requests().memoryInGB()).append("GB"); + info.append("\n\t\t\tPorts:"); + for (ContainerPort port : container.ports()) { + info.append(" ").append(port.port()); + } + if (container.volumeMounts() != null) { + info.append("\n\t\t\tVolume mounts:"); + for (VolumeMount volumeMount : container.volumeMounts()) { + info.append(" ").append(volumeMount.name()).append("->").append(volumeMount.mountPath()); + } + } + if (container.command() != null) { + info.append("\n\t\t\tStart commands:"); + for (String command : container.command()) { + info.append("\n\t\t\t\t").append(command); + } + } + if (container.environmentVariables() != null) { + info.append("\n\t\t\tENV vars:"); + for (EnvironmentVariable envVar : container.environmentVariables()) { + info.append("\n\t\t\t\t").append(envVar.name()).append("=").append(envVar.value()); + } + } + } + } + + System.out.println(info.toString()); + } +} diff --git a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestContainerInstanceWithPublicIpAddressWithSystemAssignedMSI.java b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestContainerInstanceWithPublicIpAddressWithSystemAssignedMSI.java index 410e1e6564c6..e0c1534f58fe 100644 --- a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestContainerInstanceWithPublicIpAddressWithSystemAssignedMSI.java +++ b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestContainerInstanceWithPublicIpAddressWithSystemAssignedMSI.java @@ -1,207 +1,216 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// -// package com.azure.management; -// -// import com.microsoft.azure.management.containerinstance.ResourceIdentityType; -// import com.microsoft.azure.management.containerinstance.Container; -// import com.microsoft.azure.management.containerinstance.ContainerGroup; -// import com.microsoft.azure.management.containerinstance.ContainerGroupRestartPolicy; -// import com.microsoft.azure.management.containerinstance.ContainerGroups; -// import com.microsoft.azure.management.containerinstance.ContainerPort; -// import com.microsoft.azure.management.containerinstance.EnvironmentVariable; -// import com.microsoft.azure.management.containerinstance.Operation; -// import com.microsoft.azure.management.containerinstance.Volume; -// import com.microsoft.azure.management.containerinstance.VolumeMount; -// import com.microsoft.azure.management.graphrbac.BuiltInRole; -// import com.microsoft.azure.management.msi.Identity; -// import com.microsoft.azure.management.msi.implementation.MSIManager; -// import com.microsoft.azure.management.resources.fluentcore.arm.Region; -// import org.junit.Assert; -// -// import java.util.ArrayList; -// import java.util.List; -// import java.util.Map; -// import java.util.Set; -// -// public class TestContainerInstanceWithPublicIpAddressWithSystemAssignedMSI extends TestTemplate { -// -// @Override -// public ContainerGroup createResource(ContainerGroups containerGroups) throws Exception { -// final String cgName = "aci" + this.testId; -// final String rgName = "rgaci" + this.testId; -// -// -// List dnsServers = new ArrayList(); -// dnsServers.add("dnsServer1"); -// ContainerGroup containerGroup = containerGroups.define(cgName) -// .withRegion(Region.US_EAST2) -// .withNewResourceGroup(rgName) -// .withLinux() -// .withPublicImageRegistryOnly() -// .withEmptyDirectoryVolume("emptydir1") -// .defineContainerInstance("tomcat") -// .withImage("tomcat") -// .withExternalTcpPort(8080) -// .withCpuCoreCount(1) -// .withEnvironmentVariable("ENV1", "value1") -// .attach() -// .defineContainerInstance("nginx") -// .withImage("nginx") -// .withExternalTcpPort(80) -// .withEnvironmentVariableWithSecuredValue("ENV2", "securedValue1") -// .attach() -// .withSystemAssignedManagedServiceIdentity() -// .withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(BuiltInRole.CONTRIBUTOR) -// .withRestartPolicy(ContainerGroupRestartPolicy.NEVER) -// .withDnsPrefix(cgName) -// .withTag("tag1", "value1") -// .create(); -// -// Assert.assertEquals(cgName, containerGroup.name()); -// Assert.assertEquals("Linux", containerGroup.osType().toString()); -// Assert.assertEquals(0, containerGroup.imageRegistryServers().size()); -// Assert.assertEquals(1, containerGroup.volumes().size()); -// Assert.assertNotNull(containerGroup.volumes().get("emptydir1")); -// Assert.assertNotNull(containerGroup.ipAddress()); -// Assert.assertTrue(containerGroup.isIPAddressPublic()); -// Assert.assertEquals(2, containerGroup.externalTcpPorts().length); -// Assert.assertEquals(2, containerGroup.externalPorts().size()); -// Assert.assertEquals(2, containerGroup.externalTcpPorts().length); -// Assert.assertEquals(8080, containerGroup.externalTcpPorts()[0]); -// Assert.assertEquals(80, containerGroup.externalTcpPorts()[1]); -// Assert.assertEquals(2, containerGroup.containers().size()); -// Container tomcatContainer = containerGroup.containers().get("tomcat"); -// Assert.assertNotNull(tomcatContainer); -// Container nginxContainer = containerGroup.containers().get("nginx"); -// Assert.assertNotNull(nginxContainer); -// Assert.assertEquals("tomcat", tomcatContainer.name()); -// Assert.assertEquals("tomcat", tomcatContainer.image()); -// Assert.assertEquals(1.0, tomcatContainer.resources().requests().cpu(), .1); -// Assert.assertEquals(1.5, tomcatContainer.resources().requests().memoryInGB(), .1); -// Assert.assertEquals(1, tomcatContainer.ports().size()); -// Assert.assertEquals(8080, tomcatContainer.ports().get(0).port()); -// Assert.assertNull(tomcatContainer.volumeMounts()); -// Assert.assertNull(tomcatContainer.command()); -// Assert.assertNotNull(tomcatContainer.environmentVariables()); -// Assert.assertEquals(1, tomcatContainer.environmentVariables().size()); -// Assert.assertEquals("nginx", nginxContainer.name()); -// Assert.assertEquals("nginx", nginxContainer.image()); -// Assert.assertEquals(1.0, nginxContainer.resources().requests().cpu(), .1); -// Assert.assertEquals(1.5, nginxContainer.resources().requests().memoryInGB(), .1); -// Assert.assertEquals(1, nginxContainer.ports().size()); -// Assert.assertEquals(80, nginxContainer.ports().get(0).port()); -// Assert.assertNull(nginxContainer.volumeMounts()); -// Assert.assertNull(nginxContainer.command()); -// Assert.assertNotNull(nginxContainer.environmentVariables()); -// Assert.assertEquals(1, nginxContainer.environmentVariables().size()); -// Assert.assertTrue(containerGroup.tags().containsKey("tag1")); -// Assert.assertEquals(ContainerGroupRestartPolicy.NEVER, containerGroup.restartPolicy()); -// Assert.assertTrue(containerGroup.isManagedServiceIdentityEnabled()); -// Assert.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, containerGroup.managedServiceIdentityType()); -// Assert.assertEquals(cgName, containerGroup.dnsPrefix()); -// ContainerGroup containerGroup2 = containerGroups.getByResourceGroup(rgName, cgName); -// -// List containerGroupList = containerGroups.listByResourceGroup(rgName); -// Assert.assertTrue(containerGroupList.size() > 0); -// Assert.assertNotNull(containerGroupList.get(0).state()); -// -// containerGroup.refresh(); -// -// Set containerGroupOperations = containerGroups.listOperations(); -// // Number of supported operation can change hence don't assert with a predefined number. -// Assert.assertTrue(containerGroupOperations.size() > 0); -// -// return containerGroup; -// } -// -// @Override -// public ContainerGroup updateResource(ContainerGroup containerGroup) throws Exception { -// containerGroup.update() -// .withoutTag("tag1") -// .withTag("tag2", "value2") -// .apply(); -// Assert.assertFalse(containerGroup.tags().containsKey("tag")); -// Assert.assertTrue(containerGroup.tags().containsKey("tag2")); -// -// containerGroup.restart(); -// containerGroup.stop(); -// -// return containerGroup; -// } -// -// @Override -// public void print(ContainerGroup resource) { -// StringBuilder info = new StringBuilder().append("Container Group: ").append(resource.id()) -// .append("Name: ").append(resource.name()) -// .append("\n\tResource group: ").append(resource.resourceGroupName()) -// .append("\n\tRegion: ").append(resource.region()) -// .append("\n\tTags: ").append(resource.tags()) -// .append("\n\tOS type: ").append(resource.osType()); -// -// if (resource.ipAddress() != null) { -// info.append("\n\tPublic IP address: ").append(resource.ipAddress()); -// } -// if (resource.externalTcpPorts() != null) { -// info.append("\n\tExternal TCP ports:"); -// for (int port : resource.externalTcpPorts()) { -// info.append(" ").append(port); -// } -// } -// if (resource.externalUdpPorts() != null) { -// info.append("\n\tExternal UDP ports:"); -// for (int port : resource.externalUdpPorts()) { -// info.append(" ").append(port); -// } -// } -// if (resource.imageRegistryServers() != null) { -// info.append("\n\tPrivate Docker image registries:"); -// for (String server : resource.imageRegistryServers()) { -// info.append(" ").append(server); -// } -// } -// if (resource.volumes() != null) { -// info.append("\n\tVolume mapping: "); -// for (Map.Entry entry: resource.volumes().entrySet()) { -// info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ") -// .append(entry.getValue().azureFile() != null ? entry.getValue().azureFile().shareName() : "empty -// direcory volume"); -// } -// } -// if (resource.containers() != null) { -// info.append("\n\tContainer instances: "); -// for (Map.Entry entry: resource.containers().entrySet()) { -// Container container = entry.getValue(); -// info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ").append(container.image()); -// info.append("\n\t\t\tResources: "); -// info.append(container.resources().requests().cpu()).append("CPUs "); -// info.append(container.resources().requests().memoryInGB()).append("GB"); -// info.append("\n\t\t\tPorts:"); -// for (ContainerPort port : container.ports()) { -// info.append(" ").append(port.port()); -// } -// if (container.volumeMounts() != null) { -// info.append("\n\t\t\tVolume mounts:"); -// for (VolumeMount volumeMount : container.volumeMounts()) { -// info.append(" ").append(volumeMount.name()).append("->").append(volumeMount.mountPath()); -// } -// } -// if (container.command() != null) { -// info.append("\n\t\t\tStart commands:"); -// for (String command : container.command()) { -// info.append("\n\t\t\t\t").append(command); -// } -// } -// if (container.environmentVariables() != null) { -// info.append("\n\t\t\tENV vars:"); -// for (EnvironmentVariable envVar : container.environmentVariables()) { -// info.append("\n\t\t\t\t").append(envVar.name()).append("=").append(envVar.value()); -// } -// } -// } -// } -// -// System.out.println(info.toString()); -// } -// } + +package com.azure.resourcemanager; + +import com.azure.resourcemanager.authorization.models.BuiltInRole; +import com.azure.resourcemanager.containerinstance.models.Container; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; +import com.azure.resourcemanager.containerinstance.models.ContainerGroups; +import com.azure.resourcemanager.containerinstance.models.ContainerPort; +import com.azure.resourcemanager.containerinstance.models.EnvironmentVariable; +import com.azure.resourcemanager.containerinstance.models.Operation; +import com.azure.resourcemanager.containerinstance.models.ResourceIdentityType; +import com.azure.resourcemanager.containerinstance.models.Volume; +import com.azure.resourcemanager.containerinstance.models.VolumeMount; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import org.junit.jupiter.api.Assertions; + +public class TestContainerInstanceWithPublicIpAddressWithSystemAssignedMSI + extends TestTemplate { + + @Override + public ContainerGroup createResource(ContainerGroups containerGroups) throws Exception { + final String cgName = containerGroups.manager().sdkContext().randomResourceName("aci", 10); + final String rgName = containerGroups.manager().sdkContext().randomResourceName("rgaci", 10); + + List dnsServers = new ArrayList(); + dnsServers.add("dnsServer1"); + ContainerGroup containerGroup = + containerGroups + .define(cgName) + .withRegion(Region.US_EAST2) + .withNewResourceGroup(rgName) + .withLinux() + .withPublicImageRegistryOnly() + .withEmptyDirectoryVolume("emptydir1") + .defineContainerInstance("tomcat") + .withImage("tomcat") + .withExternalTcpPort(8080) + .withCpuCoreCount(1) + .withEnvironmentVariable("ENV1", "value1") + .attach() + .defineContainerInstance("nginx") + .withImage("nginx") + .withExternalTcpPort(80) + .withEnvironmentVariableWithSecuredValue("ENV2", "securedValue1") + .attach() + .withSystemAssignedManagedServiceIdentity() + .withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(BuiltInRole.CONTRIBUTOR) + .withRestartPolicy(ContainerGroupRestartPolicy.NEVER) + .withDnsPrefix(cgName) + .withTag("tag1", "value1") + .create(); + + Assertions.assertEquals(cgName, containerGroup.name()); + Assertions.assertEquals("Linux", containerGroup.osType().toString()); + Assertions.assertEquals(0, containerGroup.imageRegistryServers().size()); + Assertions.assertEquals(1, containerGroup.volumes().size()); + Assertions.assertNotNull(containerGroup.volumes().get("emptydir1")); + Assertions.assertNotNull(containerGroup.ipAddress()); + Assertions.assertTrue(containerGroup.isIPAddressPublic()); + Assertions.assertEquals(2, containerGroup.externalTcpPorts().length); + Assertions.assertEquals(2, containerGroup.externalPorts().size()); + Assertions.assertEquals(2, containerGroup.externalTcpPorts().length); + Assertions.assertEquals(8080, containerGroup.externalTcpPorts()[0]); + Assertions.assertEquals(80, containerGroup.externalTcpPorts()[1]); + Assertions.assertEquals(2, containerGroup.containers().size()); + Container tomcatContainer = containerGroup.containers().get("tomcat"); + Assertions.assertNotNull(tomcatContainer); + Container nginxContainer = containerGroup.containers().get("nginx"); + Assertions.assertNotNull(nginxContainer); + Assertions.assertEquals("tomcat", tomcatContainer.name()); + Assertions.assertEquals("tomcat", tomcatContainer.image()); + Assertions.assertEquals(1.0, tomcatContainer.resources().requests().cpu(), .1); + Assertions.assertEquals(1.5, tomcatContainer.resources().requests().memoryInGB(), .1); + Assertions.assertEquals(1, tomcatContainer.ports().size()); + Assertions.assertEquals(8080, tomcatContainer.ports().get(0).port()); + Assertions.assertNull(tomcatContainer.volumeMounts()); + Assertions.assertNull(tomcatContainer.command()); + Assertions.assertNotNull(tomcatContainer.environmentVariables()); + Assertions.assertEquals(1, tomcatContainer.environmentVariables().size()); + Assertions.assertEquals("nginx", nginxContainer.name()); + Assertions.assertEquals("nginx", nginxContainer.image()); + Assertions.assertEquals(1.0, nginxContainer.resources().requests().cpu(), .1); + Assertions.assertEquals(1.5, nginxContainer.resources().requests().memoryInGB(), .1); + Assertions.assertEquals(1, nginxContainer.ports().size()); + Assertions.assertEquals(80, nginxContainer.ports().get(0).port()); + Assertions.assertNull(nginxContainer.volumeMounts()); + Assertions.assertNull(nginxContainer.command()); + Assertions.assertNotNull(nginxContainer.environmentVariables()); + Assertions.assertEquals(1, nginxContainer.environmentVariables().size()); + Assertions.assertTrue(containerGroup.tags().containsKey("tag1")); + Assertions.assertEquals(ContainerGroupRestartPolicy.NEVER, containerGroup.restartPolicy()); + Assertions.assertTrue(containerGroup.isManagedServiceIdentityEnabled()); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, containerGroup.managedServiceIdentityType()); + Assertions.assertEquals(cgName, containerGroup.dnsPrefix()); + ContainerGroup containerGroup2 = containerGroups.getByResourceGroup(rgName, cgName); + + List containerGroupList = + containerGroups.listByResourceGroup(rgName).stream().collect(Collectors.toList()); + Assertions.assertTrue(containerGroupList.size() > 0); + + containerGroup.refresh(); + + Set containerGroupOperations = containerGroups.listOperations().stream().collect(Collectors.toSet()); + // Number of supported operation can change hence don't assert with a predefined number. + Assertions.assertTrue(containerGroupOperations.size() > 0); + + return containerGroup; + } + + @Override + public ContainerGroup updateResource(ContainerGroup containerGroup) throws Exception { + containerGroup.update().withoutTag("tag1").withTag("tag2", "value2").apply(); + Assertions.assertFalse(containerGroup.tags().containsKey("tag")); + Assertions.assertTrue(containerGroup.tags().containsKey("tag2")); + + containerGroup.restart(); + containerGroup.stop(); + + return containerGroup; + } + + @Override + public void print(ContainerGroup resource) { + StringBuilder info = + new StringBuilder() + .append("Container Group: ") + .append(resource.id()) + .append("Name: ") + .append(resource.name()) + .append("\n\tResource group: ") + .append(resource.resourceGroupName()) + .append("\n\tRegion: ") + .append(resource.region()) + .append("\n\tTags: ") + .append(resource.tags()) + .append("\n\tOS type: ") + .append(resource.osType()); + + if (resource.ipAddress() != null) { + info.append("\n\tPublic IP address: ").append(resource.ipAddress()); + } + if (resource.externalTcpPorts() != null) { + info.append("\n\tExternal TCP ports:"); + for (int port : resource.externalTcpPorts()) { + info.append(" ").append(port); + } + } + if (resource.externalUdpPorts() != null) { + info.append("\n\tExternal UDP ports:"); + for (int port : resource.externalUdpPorts()) { + info.append(" ").append(port); + } + } + if (resource.imageRegistryServers() != null) { + info.append("\n\tPrivate Docker image registries:"); + for (String server : resource.imageRegistryServers()) { + info.append(" ").append(server); + } + } + if (resource.volumes() != null) { + info.append("\n\tVolume mapping: "); + for (Map.Entry entry : resource.volumes().entrySet()) { + info + .append("\n\t\tName: ") + .append(entry.getKey()) + .append(" -> ") + .append( + entry.getValue().azureFile() != null + ? entry.getValue().azureFile().shareName() + : "empty direcory volume"); + } + } + if (resource.containers() != null) { + info.append("\n\tContainer instances: "); + for (Map.Entry entry : resource.containers().entrySet()) { + Container container = entry.getValue(); + info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ").append(container.image()); + info.append("\n\t\t\tResources: "); + info.append(container.resources().requests().cpu()).append("CPUs "); + info.append(container.resources().requests().memoryInGB()).append("GB"); + info.append("\n\t\t\tPorts:"); + for (ContainerPort port : container.ports()) { + info.append(" ").append(port.port()); + } + if (container.volumeMounts() != null) { + info.append("\n\t\t\tVolume mounts:"); + for (VolumeMount volumeMount : container.volumeMounts()) { + info.append(" ").append(volumeMount.name()).append("->").append(volumeMount.mountPath()); + } + } + if (container.command() != null) { + info.append("\n\t\t\tStart commands:"); + for (String command : container.command()) { + info.append("\n\t\t\t\t").append(command); + } + } + if (container.environmentVariables() != null) { + info.append("\n\t\t\tENV vars:"); + for (EnvironmentVariable envVar : container.environmentVariables()) { + info.append("\n\t\t\t\t").append(envVar.name()).append("=").append(envVar.value()); + } + } + } + } + + System.out.println(info.toString()); + } +} diff --git a/sdk/management/azure/src/test/resources/session-records/testContainerInstanceWithPublicIpAddressWithSystemAssignedMsi.json b/sdk/management/azure/src/test/resources/session-records/testContainerInstanceWithPublicIpAddressWithSystemAssignedMsi.json index a8610c755df0..76b343614bed 100644 --- a/sdk/management/azure/src/test/resources/session-records/testContainerInstanceWithPublicIpAddressWithSystemAssignedMsi.json +++ b/sdk/management/azure/src/test/resources/session-records/testContainerInstanceWithPublicIpAddressWithSystemAssignedMsi.json @@ -1,820 +1,570 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/containerGroups?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:11:34 GMT", - "content-length" : "1637", + "date" : "Tue, 21 Jul 2020 05:32:53 GMT", + "content-length" : "1675", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11957", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d15d1359-5c73-43fe-8405-56fd65c04849", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8988eb23-a460-4af8-9952-4512924b091d", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221135Z:8988eb23-a460-4af8-9952-4512924b091d", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053253Z:d15d1359-5c73-43fe-8405-56fd65c04849", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:622eb1cc-5c9f-436a-9a1a-0d6391ca0820", - "Body" : "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.62.42\",\"type\":\"Public\",\"dnsNameLabel\":\"aci429937\",\"fqdn\":\"aci429937.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci13656/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id28773076\":{\"principalId\":\"448b2361-7f45-44b5-92a8-5c6e703aba4f\",\"clientId\":\"9d98ac10-cecd-48c0-add2-9dda30215f33\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci13656/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-ida6890225\":{\"principalId\":\"143af4bf-9b0c-4321-add6-7a1266374cc0\",\"clientId\":\"bf807aae-3331-4fcb-b1fb-ccc56cac1ae2\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci13656/providers/Microsoft.ContainerInstance/containerGroups/aci429937\",\"name\":\"aci429937\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" + "x-ms-request-id" : "eastus2:c8ce1cee-39dc-43de-8401-b7dfcba96a7e", + "Body" : "{\"value\":[{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"20.186.53.142\",\"type\":\"Public\",\"dnsNameLabel\":\"aci07176b\",\"fqdn\":\"aci07176b.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55072/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id5d785922\":{\"principalId\":\"afcda290-a527-42e9-a5dd-43e5d6f24f9e\",\"clientId\":\"cf2c0cf1-b51c-42d6-a34d-b8530b22f8ad\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55072/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id96e34158\":{\"principalId\":\"b3edca26-73cd-48f8-96a5-eae799e87fd2\",\"clientId\":\"5921c0a1-0c44-4963-b334-6fb151b0ff0b\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55072/providers/Microsoft.ContainerInstance/containerGroups/aci07176b\",\"name\":\"aci07176b\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci13656/providers/Microsoft.ContainerInstance/containerGroups/aci429937?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/containerGroups?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:11:34 GMT", - "content-length" : "3218", + "date" : "Tue, 21 Jul 2020 05:32:54 GMT", + "content-length" : "1675", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11956", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f991cd21-33cc-4c5d-bf16-babb51ba3a2e", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e6d6ced0-b346-422f-97d8-91bf140ceee1", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221135Z:e6d6ced0-b346-422f-97d8-91bf140ceee1", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053255Z:f991cd21-33cc-4c5d-bf16-babb51ba3a2e", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:e950f914-70f7-478e-8599-ea0662db1c1d", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T20:14:14Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:13:33Z\",\"lastTimestamp\":\"2019-10-13T20:13:33Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:13:55Z\",\"lastTimestamp\":\"2019-10-13T20:13:55Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:13Z\",\"lastTimestamp\":\"2019-10-13T20:14:13Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:14Z\",\"lastTimestamp\":\"2019-10-13T20:14:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T20:14:27Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:14Z\",\"lastTimestamp\":\"2019-10-13T20:14:14Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:21Z\",\"lastTimestamp\":\"2019-10-13T20:14:21Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:27Z\",\"lastTimestamp\":\"2019-10-13T20:14:27Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:28Z\",\"lastTimestamp\":\"2019-10-13T20:14:28Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.62.42\",\"type\":\"Public\",\"dnsNameLabel\":\"aci429937\",\"fqdn\":\"aci429937.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci13656/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id28773076\":{\"principalId\":\"448b2361-7f45-44b5-92a8-5c6e703aba4f\",\"clientId\":\"9d98ac10-cecd-48c0-add2-9dda30215f33\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci13656/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-ida6890225\":{\"principalId\":\"143af4bf-9b0c-4321-add6-7a1266374cc0\",\"clientId\":\"bf807aae-3331-4fcb-b1fb-ccc56cac1ae2\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci13656/providers/Microsoft.ContainerInstance/containerGroups/aci429937\",\"name\":\"aci429937\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:89165904-5196-442e-abdf-3ccf41dbab30", + "Body" : "{\"value\":[{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"20.186.53.142\",\"type\":\"Public\",\"dnsNameLabel\":\"aci07176b\",\"fqdn\":\"aci07176b.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55072/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id5d785922\":{\"principalId\":\"afcda290-a527-42e9-a5dd-43e5d6f24f9e\",\"clientId\":\"cf2c0cf1-b51c-42d6-a34d-b8530b22f8ad\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55072/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id96e34158\":{\"principalId\":\"b3edca26-73cd-48f8-96a5-eae799e87fd2\",\"clientId\":\"5921c0a1-0c44-4963-b334-6fb151b0ff0b\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55072/providers/Microsoft.ContainerInstance/containerGroups/aci07176b\",\"name\":\"aci07176b\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci059438?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci26546?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:11:40 GMT", - "content-length" : "304", + "date" : "Tue, 21 Jul 2020 05:33:01 GMT", + "content-length" : "302", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1181", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b5496360-ac84-4ef1-ae91-5b2eb3797888", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d191a46c-b4e5-47d7-9c6e-dde12711ffbb", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221141Z:d191a46c-b4e5-47d7-9c6e-dde12711ffbb", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053301Z:b5496360-ac84-4ef1-ae91-5b2eb3797888", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "d191a46c-b4e5-47d7-9c6e-dde12711ffbb", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438\",\"name\":\"rgaci059438\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus2\",\"tags\":{\"date\":\"2019-10-13T22:11:35.450Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + "x-ms-request-id" : "b5496360-ac84-4ef1-ae91-5b2eb3797888", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546\",\"name\":\"rgaci26546\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus2\",\"tags\":{\"date\":\"2020-07-21T05:32:57.174Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:11:51 GMT", - "content-length" : "1183", + "date" : "Tue, 21 Jul 2020 05:33:15 GMT", + "content-length" : "1217", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1180", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2b976564-9296-45d5-88d6-78cc9e409dc5", "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "299", - "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "99", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221151Z:2b976564-9296-45d5-88d6-78cc9e409dc5", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:b73d92ad-1df4-4982-b897-54c9d58eab16", - "Body" : "{\"properties\":{\"provisioningState\":\"Pending\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Pending\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/b73d92ad-1df4-4982-b897-54c9d58eab16?api-version=2018-06-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/b73d92ad-1df4-4982-b897-54c9d58eab16?api-version=2018-06-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:11:51 GMT", - "content-length" : "240", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11955", - "StatusCode" : "200", - "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9478f658-db3b-4cc0-9ea4-a3fcde157ee0", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e0cd1bed-298e-45c5-95d0-15f8e6bc49ea", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221151Z:e0cd1bed-298e-45c5-95d0-15f8e6bc49ea", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:ac84cc17-ee23-4fef-8986-45fd75a27c15", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"status\":\"Pending\",\"startTime\":\"2019-10-13T22:11:49.9272126Z\",\"properties\":{\"events\":[]}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/b73d92ad-1df4-4982-b897-54c9d58eab16?api-version=2018-06-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:12:21 GMT", - "content-length" : "240", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11954", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "5de35989-d422-4281-921a-f765c71ce4d5", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "99", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221221Z:5de35989-d422-4281-921a-f765c71ce4d5", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053316Z:9478f658-db3b-4cc0-9ea4-a3fcde157ee0", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:477c9cad-aaf4-4e6c-8447-6c7ec59c1a4d", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"status\":\"Pending\",\"startTime\":\"2019-10-13T22:11:49.9272126Z\",\"properties\":{\"events\":[]}}" + "x-ms-request-id" : "eastus2:38df2c2d-2090-4ed0-b5aa-d1124a393054", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Pending\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Pending\"}},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/38df2c2d-2090-4ed0-b5aa-d1124a393054?api-version=2018-06-01" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/b73d92ad-1df4-4982-b897-54c9d58eab16?api-version=2018-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/38df2c2d-2090-4ed0-b5aa-d1124a393054?api-version=2018-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:12:52 GMT", - "content-length" : "401", + "date" : "Tue, 21 Jul 2020 05:33:46 GMT", + "content-length" : "239", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11953", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "38fcc44b-dc77-4e64-9cae-bb1886c04033", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e440d712-902a-4efc-8060-a0bf6102d264", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221252Z:e440d712-902a-4efc-8060-a0bf6102d264", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053347Z:38fcc44b-dc77-4e64-9cae-bb1886c04033", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:c97b8541-6a31-41eb-a257-28f2b1051951", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"status\":\"Creating\",\"startTime\":\"2019-10-13T22:11:49.9272126Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"}]}}" + "x-ms-request-id" : "eastus2:5837f28b-08ec-4f21-9729-7e8f3ff335be", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"status\":\"Pending\",\"startTime\":\"2020-07-21T05:33:14.6381322Z\",\"properties\":{\"events\":[]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/b73d92ad-1df4-4982-b897-54c9d58eab16?api-version=2018-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/38df2c2d-2090-4ed0-b5aa-d1124a393054?api-version=2018-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:22 GMT", - "content-length" : "1521", + "date" : "Tue, 21 Jul 2020 05:34:18 GMT", + "content-length" : "1520", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11952", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6cab2d7b-7251-4a54-b35f-ff0c7acbdd86", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "caad7369-f6c9-4b34-9924-f5180dd14470", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221323Z:caad7369-f6c9-4b34-9924-f5180dd14470", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053418Z:6cab2d7b-7251-4a54-b35f-ff0c7acbdd86", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:41f565e8-1e1e-4daf-9547-01627096113f", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"status\":\"Succeeded\",\"startTime\":\"2019-10-13T22:11:49.9272126Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]}}" + "x-ms-request-id" : "eastus2:75ebce30-9f04-4b51-9728-61deb6219197", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"status\":\"Succeeded\",\"startTime\":\"2020-07-21T05:33:14.6381322Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:18Z\",\"lastTimestamp\":\"2020-07-21T05:33:18Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:38Z\",\"lastTimestamp\":\"2020-07-21T05:33:38Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:10Z\",\"lastTimestamp\":\"2020-07-21T05:34:10Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:23 GMT", - "content-length" : "2731", + "date" : "Tue, 21 Jul 2020 05:34:19 GMT", + "content-length" : "2765", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11951", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "b0df1e36-b1bd-4350-9518-5a2e8bc480cc", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a135917b-5c79-4dc1-a26f-ab5e77162d91", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221324Z:a135917b-5c79-4dc1-a26f-ab5e77162d91", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053419Z:b0df1e36-b1bd-4350-9518-5a2e8bc480cc", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:a4737744-22ad-4bca-a900-62e097725ba4", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:dbac43a0-8b46-4353-8c26-8756135db25f", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:06Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:18Z\",\"lastTimestamp\":\"2020-07-21T05:33:18Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:38Z\",\"lastTimestamp\":\"2020-07-21T05:33:38Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:14Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:10Z\",\"lastTimestamp\":\"2020-07-21T05:34:10Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.Authorization/roleDefinitions?%24filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:23 GMT", + "date" : "Tue, 21 Jul 2020 05:34:19 GMT", "content-length" : "832", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-request-charge" : "1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11950", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c7f44043-fb4e-4652-bf73-dad62f617ed1", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "77c9e07a-0f52-4fbf-969f-310ba3dc6598", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221324Z:77c9e07a-0f52-4fbf-969f-310ba3dc6598", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053420Z:c7f44043-fb4e-4652-bf73-dad62f617ed1", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "16299431-2f75-49f1-b67d-a4de323e3a6c", + "x-ms-request-id" : "09f0ce5b-6d00-42d2-8c6a-1d778b522af5", "Body" : "{\"value\":[{\"properties\":{\"roleName\":\"Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage everything except access to resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*\"],\"notActions\":[\"Microsoft.Authorization/*/Delete\",\"Microsoft.Authorization/*/Write\",\"Microsoft.Authorization/elevateAccess/Action\",\"Microsoft.Blueprint/blueprintAssignments/write\",\"Microsoft.Blueprint/blueprintAssignments/delete\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T21:24:38.4580610Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b24988ac-6180-42a0-ab88-20f7382dd24c\"}]}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.Authorization/roleAssignments/e500c108-4378-4266-9d97-5d9bd192403c?api-version=2018-01-01-preview", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:24 GMT", - "content-length" : "163", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1179", - "retry-after" : "0", - "StatusCode" : "400", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "51e0f043-83bb-42b3-a4b0-b677fcea1d21", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221325Z:51e0f043-83bb-42b3-a4b0-b677fcea1d21", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "f6dfa5c5-e811-4bb5-af65-fb80dc499916", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 2010ad666d1f4177816ead2b091f410f does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.Authorization/roleAssignments/e500c108-4378-4266-9d97-5d9bd192403c?api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.Authorization/roleAssignments/f558a7c1-8920-4ba6-867d-f342997eb617?api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:26 GMT", - "content-length" : "163", + "date" : "Tue, 21 Jul 2020 05:34:26 GMT", + "content-length" : "773", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1178", - "retry-after" : "0", - "StatusCode" : "400", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8be0e71c-02f6-4db9-89b8-833596a54ef2", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221327Z:8be0e71c-02f6-4db9-89b8-833596a54ef2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "48117a5e-c24a-4ea2-af6e-4d90a6be812f", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 2010ad666d1f4177816ead2b091f410f does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.Authorization/roleAssignments/e500c108-4378-4266-9d97-5d9bd192403c?api-version=2018-01-01-preview", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:31 GMT", - "content-length" : "163", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1177", - "retry-after" : "0", - "StatusCode" : "400", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "16d352ab-5cf5-4a8f-ac9b-a6daceecceed", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221332Z:16d352ab-5cf5-4a8f-ac9b-a6daceecceed", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "87f273b2-62b6-4282-a143-3743729e7140", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 2010ad666d1f4177816ead2b091f410f does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.Authorization/roleAssignments/e500c108-4378-4266-9d97-5d9bd192403c?api-version=2018-01-01-preview", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:38 GMT", - "content-length" : "163", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1176", - "retry-after" : "0", - "StatusCode" : "400", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "eae6285f-5027-4ba3-95f1-0c31bafed268", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221338Z:eae6285f-5027-4ba3-95f1-0c31bafed268", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "afe00bb4-69c7-49a2-abb9-a4a7cebd967a", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 2010ad666d1f4177816ead2b091f410f does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.Authorization/roleAssignments/e500c108-4378-4266-9d97-5d9bd192403c?api-version=2018-01-01-preview", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:46 GMT", - "content-length" : "163", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1175", - "retry-after" : "0", - "StatusCode" : "400", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "965b30a4-b119-4427-9c49-b2d1f19abd14", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221346Z:965b30a4-b119-4427-9c49-b2d1f19abd14", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "78713f2b-cd85-49f4-8d0e-0094193c453f", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 2010ad666d1f4177816ead2b091f410f does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.Authorization/roleAssignments/e500c108-4378-4266-9d97-5d9bd192403c?api-version=2018-01-01-preview", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:13:59 GMT", - "content-length" : "775", - "expires" : "-1", - "x-ms-request-charge" : "4", - "x-ms-ratelimit-remaining-subscription-writes" : "1174", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5a6f6af0-566f-4412-b81b-7cc51b6c320d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2f2d2568-5232-4d97-81b9-26bc185f5525", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221400Z:2f2d2568-5232-4d97-81b9-26bc185f5525", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053426Z:5a6f6af0-566f-4412-b81b-7cc51b6c320d", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "9e00a5f5-16c4-40fa-9514-6ebb84e956a6", - "Body" : "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438\",\"createdOn\":\"2019-10-13T22:13:56.9494048Z\",\"updatedOn\":\"2019-10-13T22:13:56.9494048Z\",\"createdBy\":null,\"updatedBy\":\"e5083d2a-440d-48ff-a6c4-e42d84651643\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.Authorization/roleAssignments/e500c108-4378-4266-9d97-5d9bd192403c\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"e500c108-4378-4266-9d97-5d9bd192403c\"}" + "x-ms-request-id" : "100cd073-1984-4d57-8f7b-352698851f98", + "Body" : "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546\",\"createdOn\":\"2020-07-21T05:34:22.2070381Z\",\"updatedOn\":\"2020-07-21T05:34:22.2070381Z\",\"createdBy\":null,\"updatedBy\":\"4f9eda12-45b5-45bb-ad92-294962ccae95\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.Authorization/roleAssignments/f558a7c1-8920-4ba6-867d-f342997eb617\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"f558a7c1-8920-4ba6-867d-f342997eb617\"}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:00 GMT", - "content-length" : "2731", + "date" : "Tue, 21 Jul 2020 05:34:28 GMT", + "content-length" : "2765", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11949", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d9c35baf-1941-4691-969f-c8d2a74ae20e", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221400Z:d9c35baf-1941-4691-969f-c8d2a74ae20e", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:8e1a2fab-4ea2-4437-92ce-170f66a51472", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-10-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:00 GMT", - "content-length" : "1150", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11948", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9ac7c82a-8b55-4b65-80e5-36cd986b98a7", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2c563c46-75e4-4a4a-8540-c12036902978", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221400Z:2c563c46-75e4-4a4a-8540-c12036902978", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053428Z:9ac7c82a-8b55-4b65-80e5-36cd986b98a7", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:686bf061-5d56-491a-b6c7-1ba3b1b7b927", - "Body" : "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" + "x-ms-request-id" : "eastus2:19dbdfe5-a1f8-4dd0-a0bf-b0a607b1d356", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:06Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:18Z\",\"lastTimestamp\":\"2020-07-21T05:33:18Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:38Z\",\"lastTimestamp\":\"2020-07-21T05:33:38Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:14Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:10Z\",\"lastTimestamp\":\"2020-07-21T05:34:10Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:00 GMT", - "content-length" : "2731", + "date" : "Tue, 21 Jul 2020 05:34:29 GMT", + "content-length" : "1184", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11947", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "50c76691-5676-43c3-b02c-3c4b98db751d", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ca3baf62-cf8b-4e9d-9211-325ddf53e36c", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221401Z:ca3baf62-cf8b-4e9d-9211-325ddf53e36c", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053429Z:50c76691-5676-43c3-b02c-3c4b98db751d", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:b31ee0c1-87a0-4f55-b345-31837280f4e1", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:5f00fb5a-b203-4aee-9619-5fdf38f96fd4", + "Body" : "{\"value\":[{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:01 GMT", - "content-length" : "2731", + "date" : "Tue, 21 Jul 2020 05:34:30 GMT", + "content-length" : "2765", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11946", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6aae3acb-2253-494a-ac2f-2fa3835ee0fc", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c86e6bfb-1967-4651-8a50-97277fa7a695", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221401Z:c86e6bfb-1967-4651-8a50-97277fa7a695", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053430Z:6aae3acb-2253-494a-ac2f-2fa3835ee0fc", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:48d90c5b-0318-4a59-9555-f21db9235389", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:d401b91c-85d4-48b0-a5d7-6ed0eb9f664a", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:06Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:18Z\",\"lastTimestamp\":\"2020-07-21T05:33:18Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:38Z\",\"lastTimestamp\":\"2020-07-21T05:33:38Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:14Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:10Z\",\"lastTimestamp\":\"2020-07-21T05:34:10Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/providers/Microsoft.ContainerInstance/operations?api-version=2018-10-01", + "Uri" : "http://localhost:1234/providers/Microsoft.ContainerInstance/operations?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:01 GMT", - "content-length" : "7905", + "date" : "Tue, 21 Jul 2020 05:34:31 GMT", + "content-length" : "8445", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "c39bbbfd-91b7-4336-9dff-40ce2344f3c3", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e77197af-55f7-43f1-8993-2d574942b5dc", "x-ms-ratelimit-remaining-tenant-reads" : "11999", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221401Z:e77197af-55f7-43f1-8993-2d574942b5dc", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053432Z:c39bbbfd-91b7-4336-9dff-40ce2344f3c3", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "southeastasia:0020128b-74bb-43d1-ac5d-056140dfebc0", - "Body" : "{\"value\":[{\"name\":\"Microsoft.ContainerInstance/register/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Register Microsoft Container Instance\",\"description\":\"Registers the subscription for the container instance resource provider and enables the creation of container groups.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Groups\",\"description\":\"Get all container goups.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/write\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Create or update Container Group\",\"description\":\"Create or update a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/delete\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Delete Container Group\",\"description\":\"Delete the specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/restart/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Restart Container Group\",\"description\":\"Restarts a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/stop/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Stop Container Group\",\"description\":\"Stops a specific container group. Compute resources will be deallocated and billing will stop.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/start/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Start Container Group\",\"description\":\"Starts a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/logs/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Logs\",\"description\":\"Get logs for a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/exec/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Exec Into a Container\",\"description\":\"Exec into a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/operationResults/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Async operation result\",\"description\":\"Get async operation result\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/cachedImages/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Cached Images\",\"operation\":\"Get cached images.\",\"description\":\"Gets the cached images for the subscription in a region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/capabilities/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Capabilities\",\"operation\":\"Get Capabilities\",\"description\":\"Get the capabilities for a region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/usages/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Usages\",\"operation\":\"Get Regional Usage\",\"description\":\"Get the usage for a specific region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/metricDefinitions/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Read container group metric definitions\",\"description\":\"Gets the available metrics for container group.\"},\"origin\":\"System\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"CpuUsage\",\"displayName\":\"CPU Usage\",\"displayDescription\":\"CPU usage on all cores in millicores.\",\"unit\":\"Count\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"containerName\",\"displayName\":\"Container Name\",\"toBeExportedForShoebox\":true}]},{\"name\":\"MemoryUsage\",\"displayName\":\"Memory Usage\",\"displayDescription\":\"Total memory usage in byte.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"containerName\",\"displayName\":\"Container Name\",\"toBeExportedForShoebox\":true}]},{\"name\":\"NetworkBytesReceivedPerSecond\",\"displayName\":\"Network Bytes Received Per Second\",\"displayDescription\":\"The network bytes received per second.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false},{\"name\":\"NetworkBytesTransmittedPerSecond\",\"displayName\":\"Network Bytes Transmitted Per Second\",\"displayDescription\":\"The network bytes transmitted per second.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false}]}}},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Read Diagnostic Setting\",\"description\":\"Gets the diagnostic setting for the container group.\"},\"origin\":\"System\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/write\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Write Diagnostic Setting\",\"description\":\"Creates or updates the diagnostic setting for the container group.\"},\"origin\":\"System\"},{\"name\":\"Microsoft.ContainerInstance/locations/deleteVirtualNetworkOrSubnets/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Delete virtual network or subnet notification\",\"operation\":\"Delete virtual network or subnet notification\",\"description\":\"Notifies Microsoft.ContainerInstance that virtual network or subnet is being deleted.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/operations/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Read operations.\",\"description\":\"List the operations for Azure Container Instance service.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/operations/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Read operations.\",\"description\":\"List the operations for Azure Container Instance service.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/serviceassociationlinks/delete\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Service Association Link.\",\"operation\":\"Delete Service Association Link.\",\"description\":\"Delete the service association link created by azure container instance resource provider on a subnet.\"},\"origin\":\"User\"}]}" + "x-ms-request-id" : "southeastasia:7dcb689a-9c6f-4a52-a8c4-94acb1d83fe1", + "Body" : "{\"value\":[{\"name\":\"Microsoft.ContainerInstance/register/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Register Microsoft Container Instance\",\"description\":\"Registers the subscription for the container instance resource provider and enables the creation of container groups.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Groups\",\"description\":\"Get all container goups.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/write\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Create or update Container Group\",\"description\":\"Create or update a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/delete\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Delete Container Group\",\"description\":\"Delete the specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/restart/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Restart Container Group\",\"description\":\"Restarts a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/stop/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Stop Container Group\",\"description\":\"Stops a specific container group. Compute resources will be deallocated and billing will stop.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/start/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Start Container Group\",\"description\":\"Starts a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/logs/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Logs\",\"description\":\"Get logs for a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/buildlogs/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Build Logs\",\"description\":\"Get build logs for a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/exec/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Exec Into a Container\",\"description\":\"Exec into a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/operationResults/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Async operation result\",\"description\":\"Get async operation result\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/operationResults/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Async operation result\",\"description\":\"Get async operation result\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/cachedImages/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Cached Images\",\"operation\":\"Get cached images.\",\"description\":\"Gets the cached images for the subscription in a region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/capabilities/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Capabilities\",\"operation\":\"Get Capabilities\",\"description\":\"Get the capabilities for a region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/usages/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Usages\",\"operation\":\"Get Regional Usage\",\"description\":\"Get the usage for a specific region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/metricDefinitions/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Read container group metric definitions\",\"description\":\"Gets the available metrics for container group.\"},\"origin\":\"System\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"CpuUsage\",\"displayName\":\"CPU Usage\",\"displayDescription\":\"CPU usage on all cores in millicores.\",\"unit\":\"Count\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"containerName\",\"displayName\":\"Container Name\",\"toBeExportedForShoebox\":true}]},{\"name\":\"MemoryUsage\",\"displayName\":\"Memory Usage\",\"displayDescription\":\"Total memory usage in byte.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"containerName\",\"displayName\":\"Container Name\",\"toBeExportedForShoebox\":true}]},{\"name\":\"NetworkBytesReceivedPerSecond\",\"displayName\":\"Network Bytes Received Per Second\",\"displayDescription\":\"The network bytes received per second.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false},{\"name\":\"NetworkBytesTransmittedPerSecond\",\"displayName\":\"Network Bytes Transmitted Per Second\",\"displayDescription\":\"The network bytes transmitted per second.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false}]}}},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Read Diagnostic Setting\",\"description\":\"Gets the diagnostic setting for the container group.\"},\"origin\":\"System\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/write\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Write Diagnostic Setting\",\"description\":\"Creates or updates the diagnostic setting for the container group.\"},\"origin\":\"System\"},{\"name\":\"Microsoft.ContainerInstance/locations/deleteVirtualNetworkOrSubnets/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Delete virtual network or subnet notification\",\"operation\":\"Delete virtual network or subnet notification\",\"description\":\"Notifies Microsoft.ContainerInstance that virtual network or subnet is being deleted.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/operations/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Read operations.\",\"description\":\"List the operations for Azure Container Instance service.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/operations/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Read operations.\",\"description\":\"List the operations for Azure Container Instance service.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/serviceassociationlinks/delete\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Service Association Link.\",\"operation\":\"Delete Service Association Link.\",\"description\":\"Delete the service association link created by azure container instance resource provider on a subnet.\"},\"origin\":\"User\"}]}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/containerGroups?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:01 GMT", - "content-length" : "2776", + "date" : "Tue, 21 Jul 2020 05:34:33 GMT", + "content-length" : "4511", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11945", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "83d66373-a7c1-43f5-9708-71ac1fa48441", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221402Z:83d66373-a7c1-43f5-9708-71ac1fa48441", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:8f35c9aa-48cd-4bb4-b518-63db38cebec7", - "Body" : "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}},{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.62.42\",\"type\":\"Public\",\"dnsNameLabel\":\"aci429937\",\"fqdn\":\"aci429937.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci13656/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id28773076\":{\"principalId\":\"448b2361-7f45-44b5-92a8-5c6e703aba4f\",\"clientId\":\"9d98ac10-cecd-48c0-add2-9dda30215f33\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci13656/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-ida6890225\":{\"principalId\":\"143af4bf-9b0c-4321-add6-7a1266374cc0\",\"clientId\":\"bf807aae-3331-4fcb-b1fb-ccc56cac1ae2\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci13656/providers/Microsoft.ContainerInstance/containerGroups/aci429937\",\"name\":\"aci429937\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:02 GMT", - "content-length" : "2731", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11944", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5d9b6245-9190-438f-8f11-fc93f4bf24d5", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ef5e3b43-2660-4a79-b662-7a6c757edd83", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221402Z:ef5e3b43-2660-4a79-b662-7a6c757edd83", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053433Z:5d9b6245-9190-438f-8f11-fc93f4bf24d5", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:6023c416-11f8-42e8-8d74-f68e5517a5d0", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:47a280ff-fbaa-4c98-a899-8ab59d892b47", + "Body" : "{\"value\":[{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}},{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"20.186.53.142\",\"type\":\"Public\",\"dnsNameLabel\":\"aci07176b\",\"fqdn\":\"aci07176b.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55072/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id5d785922\":{\"principalId\":\"afcda290-a527-42e9-a5dd-43e5d6f24f9e\",\"clientId\":\"cf2c0cf1-b51c-42d6-a34d-b8530b22f8ad\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55072/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id96e34158\":{\"principalId\":\"b3edca26-73cd-48f8-96a5-eae799e87fd2\",\"clientId\":\"5921c0a1-0c44-4963-b334-6fb151b0ff0b\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55072/providers/Microsoft.ContainerInstance/containerGroups/aci07176b\",\"name\":\"aci07176b\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}},{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Creating\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.247.82.210\",\"type\":\"Public\",\"dnsNameLabel\":\"aci137459\",\"fqdn\":\"aci137459.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244\":{\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"clientId\":\"d38d2261-fe2e-4ab6-9e97-02e7dcd8f3d6\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070\":{\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"clientId\":\"8b29a8aa-c79b-4707-bd92-2550ac602214\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"name\":\"aci137459\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci13656/providers/Microsoft.ContainerInstance/containerGroups/aci429937?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/containerGroups?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:02 GMT", - "content-length" : "3218", + "date" : "Tue, 21 Jul 2020 05:34:34 GMT", + "content-length" : "4511", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11943", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "af542e29-3777-497d-87d9-5a77573f46cb", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "55521bb5-6bde-41a4-95da-31da07b7b0ed", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221403Z:55521bb5-6bde-41a4-95da-31da07b7b0ed", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053434Z:af542e29-3777-497d-87d9-5a77573f46cb", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:e67c4557-74e1-4d40-96df-e676e83adbc6", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T20:14:14Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:13:33Z\",\"lastTimestamp\":\"2019-10-13T20:13:33Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:13:55Z\",\"lastTimestamp\":\"2019-10-13T20:13:55Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:13Z\",\"lastTimestamp\":\"2019-10-13T20:14:13Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:14Z\",\"lastTimestamp\":\"2019-10-13T20:14:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T20:14:27Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:14Z\",\"lastTimestamp\":\"2019-10-13T20:14:14Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:21Z\",\"lastTimestamp\":\"2019-10-13T20:14:21Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:27Z\",\"lastTimestamp\":\"2019-10-13T20:14:27Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T20:14:28Z\",\"lastTimestamp\":\"2019-10-13T20:14:28Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.62.42\",\"type\":\"Public\",\"dnsNameLabel\":\"aci429937\",\"fqdn\":\"aci429937.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci13656/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id28773076\":{\"principalId\":\"448b2361-7f45-44b5-92a8-5c6e703aba4f\",\"clientId\":\"9d98ac10-cecd-48c0-add2-9dda30215f33\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci13656/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-ida6890225\":{\"principalId\":\"143af4bf-9b0c-4321-add6-7a1266374cc0\",\"clientId\":\"bf807aae-3331-4fcb-b1fb-ccc56cac1ae2\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci13656/providers/Microsoft.ContainerInstance/containerGroups/aci429937\",\"name\":\"aci429937\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:6ad9bceb-9de4-4766-a91a-58804e3bcc50", + "Body" : "{\"value\":[{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}},{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"20.186.53.142\",\"type\":\"Public\",\"dnsNameLabel\":\"aci07176b\",\"fqdn\":\"aci07176b.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55072/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id5d785922\":{\"principalId\":\"afcda290-a527-42e9-a5dd-43e5d6f24f9e\",\"clientId\":\"cf2c0cf1-b51c-42d6-a34d-b8530b22f8ad\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55072/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id96e34158\":{\"principalId\":\"b3edca26-73cd-48f8-96a5-eae799e87fd2\",\"clientId\":\"5921c0a1-0c44-4963-b334-6fb151b0ff0b\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55072/providers/Microsoft.ContainerInstance/containerGroups/aci07176b\",\"name\":\"aci07176b\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}},{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Creating\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.247.82.210\",\"type\":\"Public\",\"dnsNameLabel\":\"aci137459\",\"fqdn\":\"aci137459.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244\":{\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"clientId\":\"d38d2261-fe2e-4ab6-9e97-02e7dcd8f3d6\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070\":{\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"clientId\":\"8b29a8aa-c79b-4707-bd92-2550ac602214\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"name\":\"aci137459\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:02 GMT", - "content-length" : "2731", + "date" : "Tue, 21 Jul 2020 05:34:35 GMT", + "content-length" : "2765", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11942", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4a36d42d-c257-459b-a74f-736d8dcb0368", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "6d396ae0-2365-4cb9-bdb9-875de4bda93e", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221403Z:6d396ae0-2365-4cb9-bdb9-875de4bda93e", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053435Z:4a36d42d-c257-459b-a74f-736d8dcb0368", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:5919800f-2b90-4448-b370-96ba654ab093", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:a38a1e22-d05f-4b7b-b305-94b35a639bba", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:06Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:18Z\",\"lastTimestamp\":\"2020-07-21T05:33:18Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:38Z\",\"lastTimestamp\":\"2020-07-21T05:33:38Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:14Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:10Z\",\"lastTimestamp\":\"2020-07-21T05:34:10Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:03 GMT", - "content-length" : "2731", + "date" : "Tue, 21 Jul 2020 05:34:36 GMT", + "content-length" : "2765", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11941", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "a8f4a4fd-8305-4a4e-8353-d712cc121c14", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4aeb5693-cc26-4ab3-9d2e-37a19d787a42", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221403Z:4aeb5693-cc26-4ab3-9d2e-37a19d787a42", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053437Z:a8f4a4fd-8305-4a4e-8353-d712cc121c14", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:d8383c6f-6ec9-4292-b535-d116930d3a1b", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:ff07b523-ee0a-4a7a-b050-dea18d373838", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:06Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:18Z\",\"lastTimestamp\":\"2020-07-21T05:33:18Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:38Z\",\"lastTimestamp\":\"2020-07-21T05:33:38Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:14Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:10Z\",\"lastTimestamp\":\"2020-07-21T05:34:10Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" } }, { "Method" : "PATCH", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:06 GMT", - "content-length" : "2731", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", - "x-ms-ratelimit-remaining-subscription-writes" : "1173", - "retry-after" : "0", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4f663f42-6e6d-4af3-9726-e02ae685b9f2", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221406Z:4f663f42-6e6d-4af3-9726-e02ae685b9f2", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:fc0176ff-8d2b-4be8-88c4-096859c6482a", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag2\":\"value2\"}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:06 GMT", - "content-length" : "2731", + "date" : "Tue, 21 Jul 2020 05:34:43 GMT", + "content-length" : "2765", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11940", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ff3bc948-060b-43a3-b4f4-853d8343f9a7", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "8a5904d0-bae9-4fc3-a031-e950cb14a155", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221407Z:8a5904d0-bae9-4fc3-a031-e950cb14a155", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053444Z:ff3bc948-060b-43a3-b4f4-853d8343f9a7", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:1f294381-b140-4759-9da7-7778dfdde2d8", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:12:49Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:08Z\",\"lastTimestamp\":\"2019-10-13T22:12:08Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:32Z\",\"lastTimestamp\":\"2019-10-13T22:12:32Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-13T22:13:01Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:49Z\",\"lastTimestamp\":\"2019-10-13T22:12:49Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:12:57Z\",\"lastTimestamp\":\"2019-10-13T22:12:57Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-13T22:13:01Z\",\"lastTimestamp\":\"2019-10-13T22:13:01Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag2\":\"value2\"}}" + "x-ms-request-id" : "eastus2:ebf3717b-8ee9-4b22-b6a2-96f1e7683f36", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:06Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:18Z\",\"lastTimestamp\":\"2020-07-21T05:33:18Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:38Z\",\"lastTimestamp\":\"2020-07-21T05:33:38Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:14Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:06Z\",\"lastTimestamp\":\"2020-07-21T05:34:06Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:10Z\",\"lastTimestamp\":\"2020-07-21T05:34:10Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:14Z\",\"lastTimestamp\":\"2020-07-21T05:34:14Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag2\":\"value2\"}}" } }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438/restart?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258/restart?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:07 GMT", + "date" : "Tue, 21 Jul 2020 05:34:45 GMT", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ab006085-a946-4838-abc6-0f4c870d14b6", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d470bbd0-0891-448c-8114-496f910c9e81", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221407Z:ab006085-a946-4838-abc6-0f4c870d14b6", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053445Z:d470bbd0-0891-448c-8114-496f910c9e81", + "connection" : "keep-alive", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:43c3c302-b695-40de-b209-9e19149d2ad7", + "x-ms-request-id" : "eastus2:354d2d86-105b-4e6a-89a7-39422e808b8a", "Body" : "", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/43c3c302-b695-40de-b209-9e19149d2ad7?api-version=2018-06-01" + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/354d2d86-105b-4e6a-89a7-39422e808b8a?api-version=2018-06-01" } }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438/stop?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258/stop?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:07 GMT", + "date" : "Tue, 21 Jul 2020 05:34:46 GMT", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", "retry-after" : "0", "StatusCode" : "204", - "pragma" : "no-cache", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3eaf5acb-00d6-484a-bf88-a839a7cd77c0", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6c3f5a3d-309e-4d47-b3a9-a8320ac71ccc", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221408Z:3eaf5acb-00d6-484a-bf88-a839a7cd77c0", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053446Z:6c3f5a3d-309e-4d47-b3a9-a8320ac71ccc", + "connection" : "keep-alive", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:3104f806-2181-4fcf-8d6f-3a3533540497", + "x-ms-request-id" : "eastus2:14e86508-23c9-4504-a0c7-224fe2d00e95", "Body" : "" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:11 GMT", - "content-length" : "1184", + "date" : "Tue, 21 Jul 2020 05:34:54 GMT", + "content-length" : "1218", "expires" : "-1", - "transfer-encoding" : "chunked", - "x-ms-ratelimit-remaining-subscription-deletes" : "14990", - "vary" : "Accept-Encoding,Accept-Encoding", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "vary" : "Accept-Encoding", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "458cbe07-f09b-4f84-bc10-097351cd9952", "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "299", + "x-ms-correlation-request-id" : "1ffde4f0-b087-4f25-9910-a809595d25ff", + "strict-transport-security" : "max-age=31536000; includeSubDomains", "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "99", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221411Z:458cbe07-f09b-4f84-bc10-097351cd9952", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053454Z:1ffde4f0-b087-4f25-9910-a809595d25ff", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:937b9da6-c6f4-415d-aff5-e7c7181ef70c", - "Body" : "{\"properties\":{\"provisioningState\":\"Updating\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.254.111.211\",\"type\":\"Public\",\"dnsNameLabel\":\"aci059438\",\"fqdn\":\"aci059438.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Stopped\"}},\"identity\":{\"principalId\":\"2010ad66-6d1f-4177-816e-ad2b091f410f\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci059438/providers/Microsoft.ContainerInstance/containerGroups/aci059438\",\"name\":\"aci059438\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag2\":\"value2\"}}" + "x-ms-request-id" : "eastus2:8faf6020-45a9-4c2e-8a48-55f31dc26d3b", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Updating\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.167.85.46\",\"type\":\"Public\",\"dnsNameLabel\":\"aci435258\",\"fqdn\":\"aci435258.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Stopped\"}},\"identity\":{\"principalId\":\"0b6d0acd-9dd9-4dca-949e-79d268c52ece\",\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"SystemAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci26546/providers/Microsoft.ContainerInstance/containerGroups/aci435258\",\"name\":\"aci435258\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag2\":\"value2\"}}" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci059438?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci26546?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 13 Oct 2019 22:14:17 GMT", + "date" : "Tue, 21 Jul 2020 05:34:58 GMT", "content-length" : "0", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14989", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", "retry-after" : "0", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "bad840c6-827f-469f-a02b-530b347d6bcf", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "c86f7e6d-6c80-4fae-96b9-36d81ade60ec", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191013T221418Z:c86f7e6d-6c80-4fae-96b9-36d81ade60ec", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0FDSTA1OTQzOC1FQVNUVVMyIiwiam9iTG9jYXRpb24iOiJlYXN0dXMyIn0?api-version=2019-08-01", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053459Z:bad840c6-827f-469f-a02b-530b347d6bcf", + "connection" : "keep-alive", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0FDSTI2NTQ2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2019-08-01", "cache-control" : "no-cache", - "x-ms-request-id" : "c86f7e6d-6c80-4fae-96b9-36d81ade60ec", + "x-ms-request-id" : "bad840c6-827f-469f-a02b-530b347d6bcf", "Body" : "" } } ], - "variables" : [ "059438", "952ed3e0-1c64-4312-8837-815404a5d7f4", "1d85fe62-beee-42bf-af68-1a482a907097", "9b11c4dc-fcd1-4c9d-a96c-94cafc1e0804", "f8fecb1d-7d43-44e3-87e5-18b9eb538b5c", "e500c108-4378-4266-9d97-5d9bd192403c", "2aa8f3a6-2fbd-43c7-85dc-42f8ae8d0213", "e5675e24-c290-4c49-bb1b-55c9cd4d16e4", "f9f26c17-b419-44a0-9270-8eb2e1e43cb8", "7871e199-1237-4ad4-9261-32870611dc10", "2700a993-f310-4eaa-952a-f80896f82327", "bdab46f0-9348-4909-9e51-c6202eb3653c", "cd50d651-dfd7-4528-87a4-1acee336416f" ] + "variables" : [ "aci435258", "rgaci26546", "df1bdf64-0ff8-4415-acaa-e852a72a3e3b", "f558a7c1-8920-4ba6-867d-f342997eb617" ] } \ No newline at end of file diff --git a/sdk/management/azure/src/test/resources/session-records/testContainerInstanceWithPublicIpAddressWithUserAssignedMsi.json b/sdk/management/azure/src/test/resources/session-records/testContainerInstanceWithPublicIpAddressWithUserAssignedMsi.json index ed801e59f876..ed0fa1afed7d 100644 --- a/sdk/management/azure/src/test/resources/session-records/testContainerInstanceWithPublicIpAddressWithUserAssignedMsi.json +++ b/sdk/management/azure/src/test/resources/session-records/testContainerInstanceWithPublicIpAddressWithUserAssignedMsi.json @@ -1,645 +1,523 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:49:46 GMT", + "date" : "Tue, 21 Jul 2020 05:32:56 GMT", "content-length" : "301", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "d0c62ab0-ca20-4b99-8503-3087b6ef88dd", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ebc3e161-fb21-458e-8324-6835ba2019db", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T204947Z:ebc3e161-fb21-458e-8324-6835ba2019db", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053257Z:d0c62ab0-ca20-4b99-8503-3087b6ef88dd", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "ebc3e161-fb21-458e-8324-6835ba2019db", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552\",\"name\":\"rgaci57552\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2020-02-02T20:49:43.177Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + "x-ms-request-id" : "d0c62ab0-ca20-4b99-8503-3087b6ef88dd", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367\",\"name\":\"rgaci55367\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2020-07-21T05:32:55.551Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516?api-version=2018-11-30", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244?api-version=2018-11-30", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ManagedServiceIdentityClient, 2018-11-30)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.msi/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:49:54 GMT", - "content-length" : "440", + "date" : "Tue, 21 Jul 2020 05:33:03 GMT", "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "440", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "53db03a0-68b8-4619-8a5e-be073aa6d3c8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9de50660-d34e-4d15-b6b9-981dc639bcf8", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T204954Z:9de50660-d34e-4d15-b6b9-981dc639bcf8", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053304Z:53db03a0-68b8-4619-8a5e-be073aa6d3c8", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", - "location" : "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516", + "location" : "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244", "cache-control" : "no-cache", - "x-ms-request-id" : "9de50660-d34e-4d15-b6b9-981dc639bcf8", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516\",\"name\":\"msi-id7c233516\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"principalId\":\"c0c666e1-91af-4afc-8da9-55a5da29b4f7\",\"clientId\":\"19c35dd7-f127-49ff-9ffb-5c7934c3f2b2\"}}" + "x-ms-request-id" : "53db03a0-68b8-4619-8a5e-be073aa6d3c8", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244\",\"name\":\"msi-id4dc38244\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"clientId\":\"d38d2261-fe2e-4ab6-9e97-02e7dcd8f3d6\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleDefinitions?%24filter=roleName%20eq%20%27Reader%27&api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Reader%27&api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:49:54 GMT", + "date" : "Tue, 21 Jul 2020 05:33:05 GMT", "content-length" : "615", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-request-charge" : "1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "x-ms-ratelimit-remaining-subscription-reads" : "11993", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f9bd8fb2-ffc6-474d-830b-84a1fe3100a6", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a32679f7-acdb-405c-b49a-f3db89cf0aba", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; SameSite=None; secure; HttpOnly", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T204954Z:a32679f7-acdb-405c-b49a-f3db89cf0aba", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053305Z:f9bd8fb2-ffc6-474d-830b-84a1fe3100a6", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "78941038-606d-48fa-bb28-99a9004888f2", + "x-ms-request-id" : "831e205d-c66c-44f4-96d6-cadb3dc2f6e7", "Body" : "{\"value\":[{\"properties\":{\"roleName\":\"Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets you view everything, but not make any changes.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T21:24:35.7424745Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"acdd72a7-3385-48ef-bd42-f606fba81ae7\"}]}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/365dff13-feb2-4962-a8ec-149f0d850cfe?api-version=2018-01-01-preview", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 02 Feb 2020 20:49:55 GMT", - "content-length" : "163", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1197", - "retry-after" : "0", - "StatusCode" : "400", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "7e6ecf07-f3b8-49cf-bb88-6c11ea2f03f8", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T204955Z:7e6ecf07-f3b8-49cf-bb88-6c11ea2f03f8", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "0704fb17-067f-4bc7-9246-3ec2df2cc126", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal c0c666e191af4afc8da955a5da29b4f7 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/365dff13-feb2-4962-a8ec-149f0d850cfe?api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleAssignments/c9cd52bc-a810-4bcf-b463-1519095c8188?api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:49:58 GMT", + "date" : "Tue, 21 Jul 2020 05:33:07 GMT", "content-length" : "163", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-writes" : "1196", "retry-after" : "0", "StatusCode" : "400", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2298f377-40ab-4ecf-bf1a-7dafde9d54b8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "003e2480-600e-40f6-b188-8a62e9a66f16", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T204958Z:003e2480-600e-40f6-b188-8a62e9a66f16", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "170a7509-4c9d-4d23-94f4-5d1941e856d8", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal c0c666e191af4afc8da955a5da29b4f7 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/365dff13-feb2-4962-a8ec-149f0d850cfe?api-version=2018-01-01-preview", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:03 GMT", - "content-length" : "163", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1195", - "retry-after" : "0", - "StatusCode" : "400", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "60df7258-77ab-4d71-bcf3-3d5315316483", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205003Z:60df7258-77ab-4d71-bcf3-3d5315316483", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053308Z:2298f377-40ab-4ecf-bf1a-7dafde9d54b8", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "9d30585a-6bdc-4c0d-9246-fd1477b4069a", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal c0c666e191af4afc8da955a5da29b4f7 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + "x-ms-request-id" : "b05aa205-3c33-4a11-8ccd-5c905d91f2aa", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal ed7956fe840c436a81e0c212565cd155 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/365dff13-feb2-4962-a8ec-149f0d850cfe?api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleAssignments/c9cd52bc-a810-4bcf-b463-1519095c8188?api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:14 GMT", + "date" : "Tue, 21 Jul 2020 05:33:14 GMT", "content-length" : "773", "expires" : "-1", - "x-ms-request-charge" : "5", - "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "9c80f7fb-7f26-494d-83be-9c4beac45535", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "cca1a9f1-fb5f-4fd9-a035-8a335f04d190", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205014Z:cca1a9f1-fb5f-4fd9-a035-8a335f04d190", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053315Z:9c80f7fb-7f26-494d-83be-9c4beac45535", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "163c93b4-b0cd-43fa-9bd1-32ea7754a0f1", - "Body" : "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\"principalId\":\"c0c666e1-91af-4afc-8da9-55a5da29b4f7\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552\",\"createdOn\":\"2020-02-02T20:50:10.2078383Z\",\"updatedOn\":\"2020-02-02T20:50:10.2078383Z\",\"createdBy\":null,\"updatedBy\":\"3d831914-9051-4c44-8463-c295f4e7a13e\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/365dff13-feb2-4962-a8ec-149f0d850cfe\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"365dff13-feb2-4962-a8ec-149f0d850cfe\"}" + "x-ms-request-id" : "1014c013-a751-4104-bcf4-7abbb6237c00", + "Body" : "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367\",\"createdOn\":\"2020-07-21T05:33:10.6606767Z\",\"updatedOn\":\"2020-07-21T05:33:10.6606767Z\",\"createdBy\":null,\"updatedBy\":\"4f9eda12-45b5-45bb-ad92-294962ccae95\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleAssignments/c9cd52bc-a810-4bcf-b463-1519095c8188\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"c9cd52bc-a810-4bcf-b463-1519095c8188\"}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218?api-version=2018-11-30", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070?api-version=2018-11-30", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ManagedServiceIdentityClient, 2018-11-30)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.msi/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:17 GMT", - "content-length" : "440", + "date" : "Tue, 21 Jul 2020 05:33:20 GMT", "server" : "Microsoft-HTTPAPI/2.0", + "content-length" : "440", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5ad5b0ae-19f7-4f97-8964-dcbb1d2b150e", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "a2daeb56-9e11-4f9c-95ad-d7792e899886", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205018Z:a2daeb56-9e11-4f9c-95ad-d7792e899886", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053321Z:5ad5b0ae-19f7-4f97-8964-dcbb1d2b150e", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", - "location" : "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218", + "location" : "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070", "cache-control" : "no-cache", - "x-ms-request-id" : "a2daeb56-9e11-4f9c-95ad-d7792e899886", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218\",\"name\":\"msi-id70b46218\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"principalId\":\"b1902d24-8c3d-4eda-a392-275512e5c391\",\"clientId\":\"81fc4859-c8a1-4f59-9bf4-1eed19671061\"}}" + "x-ms-request-id" : "5ad5b0ae-19f7-4f97-8964-dcbb1d2b150e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070\",\"name\":\"msi-id2cd85070\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"clientId\":\"8b29a8aa-c79b-4707-bd92-2550ac602214\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleDefinitions?%24filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:18 GMT", + "date" : "Tue, 21 Jul 2020 05:33:21 GMT", "content-length" : "832", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding", - "x-ms-request-charge" : "1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2be9d8ac-974e-4b8f-a531-47ffadcf5f79", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "1b454b16-607f-40e2-ac9c-3d534f211fff", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205018Z:1b454b16-607f-40e2-ac9c-3d534f211fff", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053322Z:2be9d8ac-974e-4b8f-a531-47ffadcf5f79", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "f83c5c2e-4fe8-44dc-935d-1dd183824732", + "x-ms-request-id" : "29d87fbd-a04a-459c-b52e-a2f058518463", "Body" : "{\"value\":[{\"properties\":{\"roleName\":\"Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage everything except access to resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*\"],\"notActions\":[\"Microsoft.Authorization/*/Delete\",\"Microsoft.Authorization/*/Write\",\"Microsoft.Authorization/elevateAccess/Action\",\"Microsoft.Blueprint/blueprintAssignments/write\",\"Microsoft.Blueprint/blueprintAssignments/delete\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T21:24:38.4580610Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b24988ac-6180-42a0-ab88-20f7382dd24c\"}]}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/82a9d40b-ef04-4024-b79c-3e57cefc03b4?api-version=2018-01-01-preview", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" - }, - "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:18 GMT", - "content-length" : "163", - "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1192", - "retry-after" : "0", - "StatusCode" : "400", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "1f9ccd88-2850-490a-8fbd-4988accc888c", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205019Z:1f9ccd88-2850-490a-8fbd-4988accc888c", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "ab6fccbc-cb5c-40ca-b7e1-cfc26b59a733", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal b1902d248c3d4edaa392275512e5c391 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" - } - }, { - "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/82a9d40b-ef04-4024-b79c-3e57cefc03b4?api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleAssignments/8dec8a9b-4d4e-4c91-ad4f-4df45c447474?api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:21 GMT", + "date" : "Tue, 21 Jul 2020 05:33:24 GMT", "content-length" : "163", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", "retry-after" : "0", "StatusCode" : "400", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "185b4b3e-daf4-485e-b529-0c1419a2d470", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "46134a45-aa7f-4930-95c7-3cb7857a059a", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205021Z:46134a45-aa7f-4930-95c7-3cb7857a059a", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053324Z:185b4b3e-daf4-485e-b529-0c1419a2d470", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "f0264257-3f3d-4e0a-b163-a585dfe19be5", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal b1902d248c3d4edaa392275512e5c391 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + "x-ms-request-id" : "5e898c3f-28a7-4c2e-b689-b3bc486f5d0e", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 68ec26c5026c4d9b8f7d988cf5e51e16 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/82a9d40b-ef04-4024-b79c-3e57cefc03b4?api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleAssignments/8dec8a9b-4d4e-4c91-ad4f-4df45c447474?api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:25 GMT", + "date" : "Tue, 21 Jul 2020 05:33:27 GMT", "content-length" : "163", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", "retry-after" : "0", "StatusCode" : "400", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "2716212d-9926-4f5e-ac66-057d1103a8cc", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "e7e0735a-8ef5-485e-b0c7-baba77d9860b", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205026Z:e7e0735a-8ef5-485e-b0c7-baba77d9860b", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053327Z:2716212d-9926-4f5e-ac66-057d1103a8cc", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "fd35b719-4128-47e3-9a3d-3e0798258331", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal b1902d248c3d4edaa392275512e5c391 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + "x-ms-request-id" : "406d0252-eb04-49fb-a79f-ef1fee18dd39", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 68ec26c5026c4d9b8f7d988cf5e51e16 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/82a9d40b-ef04-4024-b79c-3e57cefc03b4?api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleAssignments/8dec8a9b-4d4e-4c91-ad4f-4df45c447474?api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:31 GMT", + "date" : "Tue, 21 Jul 2020 05:33:30 GMT", "content-length" : "163", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", "retry-after" : "0", "StatusCode" : "400", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "105c1cc2-a731-4e7b-a4c8-2b03dec098e5", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ecb54f0c-546a-4a49-9736-117dd39189d7", - "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205032Z:ecb54f0c-546a-4a49-9736-117dd39189d7", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053331Z:105c1cc2-a731-4e7b-a4c8-2b03dec098e5", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "1f972543-7d1c-421e-afc4-2ad48517aa77", - "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal b1902d248c3d4edaa392275512e5c391 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + "x-ms-request-id" : "831de4b3-5245-4015-b890-96a85d0a0db8", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 68ec26c5026c4d9b8f7d988cf5e51e16 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/82a9d40b-ef04-4024-b79c-3e57cefc03b4?api-version=2018-01-01-preview", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleAssignments/8dec8a9b-4d4e-4c91-ad4f-4df45c447474?api-version=2018-01-01-preview", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (AuthorizationManagementClient)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.authorization/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:42 GMT", + "date" : "Tue, 21 Jul 2020 05:33:38 GMT", "content-length" : "773", "expires" : "-1", - "x-ms-request-charge" : "2", - "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "faaf54a3-21bd-44eb-b4f5-d44f6c22c2f2", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "dcc58daf-3732-4256-a6a6-3c78a12f6d09", "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly; SameSite=None", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205042Z:dcc58daf-3732-4256-a6a6-3c78a12f6d09", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053339Z:faaf54a3-21bd-44eb-b4f5-d44f6c22c2f2", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "51fc3f90-2c80-425c-93d4-f022f2423823", - "Body" : "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"principalId\":\"b1902d24-8c3d-4eda-a392-275512e5c391\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552\",\"createdOn\":\"2020-02-02T20:50:41.0519754Z\",\"updatedOn\":\"2020-02-02T20:50:41.0519754Z\",\"createdBy\":null,\"updatedBy\":\"3d831914-9051-4c44-8463-c295f4e7a13e\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.Authorization/roleAssignments/82a9d40b-ef04-4024-b79c-3e57cefc03b4\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"82a9d40b-ef04-4024-b79c-3e57cefc03b4\"}" + "x-ms-request-id" : "0434b8de-3701-4c1c-bebd-b84ab56f5041", + "Body" : "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367\",\"createdOn\":\"2020-07-21T05:33:36.0261899Z\",\"updatedOn\":\"2020-07-21T05:33:36.0261899Z\",\"createdBy\":null,\"updatedBy\":\"4f9eda12-45b5-45bb-ad92-294962ccae95\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.Authorization/roleAssignments/8dec8a9b-4d4e-4c91-ad4f-4df45c447474\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"8dec8a9b-4d4e-4c91-ad4f-4df45c447474\"}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:51 GMT", - "content-length" : "1670", + "date" : "Tue, 21 Jul 2020 05:33:47 GMT", + "content-length" : "1708", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1187", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "298", + "x-ms-correlation-request-id" : "05e3c23b-c47d-4cf3-8116-bc04c8e20b51", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "f7db07e3-8372-4493-b343-fc71ccf6f0ce", - "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "299", - "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "99", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205051Z:f7db07e3-8372-4493-b343-fc71ccf6f0ce", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:c1de5225-65a4-4cf5-85b7-ba707ec83618", - "Body" : "{\"properties\":{\"provisioningState\":\"Pending\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"40.70.156.39\",\"type\":\"Public\",\"dnsNameLabel\":\"aci94823f\",\"fqdn\":\"aci94823f.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Pending\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516\":{\"principalId\":\"c0c666e1-91af-4afc-8da9-55a5da29b4f7\",\"clientId\":\"19c35dd7-f127-49ff-9ffb-5c7934c3f2b2\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218\":{\"principalId\":\"b1902d24-8c3d-4eda-a392-275512e5c391\",\"clientId\":\"81fc4859-c8a1-4f59-9bf4-1eed19671061\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"name\":\"aci94823f\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/c1de5225-65a4-4cf5-85b7-ba707ec83618?api-version=2018-06-01" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/c1de5225-65a4-4cf5-85b7-ba707ec83618?api-version=2018-06-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)" - }, - "Response" : { - "date" : "Sun, 02 Feb 2020 20:50:51 GMT", - "content-length" : "239", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11997", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b6c7784b-0a0a-417f-8dd7-9d3da95a23c8", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "98", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205052Z:b6c7784b-0a0a-417f-8dd7-9d3da95a23c8", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053348Z:05e3c23b-c47d-4cf3-8116-bc04c8e20b51", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:b948f56c-e986-4f36-a76d-f433db1dedf2", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"status\":\"Pending\",\"startTime\":\"2020-02-02T20:50:50.4713589Z\",\"properties\":{\"events\":[]}}" + "x-ms-request-id" : "eastus2:ba06da5a-32df-48ed-ae71-bc7369054017", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Pending\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.247.82.210\",\"type\":\"Public\",\"dnsNameLabel\":\"aci137459\",\"fqdn\":\"aci137459.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Pending\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244\":{\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"clientId\":\"d38d2261-fe2e-4ab6-9e97-02e7dcd8f3d6\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070\":{\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"clientId\":\"8b29a8aa-c79b-4707-bd92-2550ac602214\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"name\":\"aci137459\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/ba06da5a-32df-48ed-ae71-bc7369054017?api-version=2018-06-01" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/c1de5225-65a4-4cf5-85b7-ba707ec83618?api-version=2018-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/ba06da5a-32df-48ed-ae71-bc7369054017?api-version=2018-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:51:21 GMT", + "date" : "Tue, 21 Jul 2020 05:34:20 GMT", "content-length" : "239", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ef7127fe-8c92-4182-82a5-c89011e8c399", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b649bd82-3656-4140-bb09-04628efc103b", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205122Z:b649bd82-3656-4140-bb09-04628efc103b", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053420Z:ef7127fe-8c92-4182-82a5-c89011e8c399", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:a3a18851-54c6-457e-8578-4843bf614a1f", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"status\":\"Pending\",\"startTime\":\"2020-02-02T20:50:50.4713589Z\",\"properties\":{\"events\":[]}}" + "x-ms-request-id" : "eastus2:2add8207-b832-4f59-944f-685aaa45793c", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"status\":\"Pending\",\"startTime\":\"2020-07-21T05:33:46.8449777Z\",\"properties\":{\"events\":[]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/c1de5225-65a4-4cf5-85b7-ba707ec83618?api-version=2018-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/ba06da5a-32df-48ed-ae71-bc7369054017?api-version=2018-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:51:52 GMT", - "content-length" : "572", + "date" : "Tue, 21 Jul 2020 05:34:50 GMT", + "content-length" : "400", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "1efa8bd1-f549-4c88-b808-4da49b867868", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d7eb5a6a-5361-4efc-ac5c-8ca8e9077c2e", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205153Z:d7eb5a6a-5361-4efc-ac5c-8ca8e9077c2e", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053451Z:1efa8bd1-f549-4c88-b808-4da49b867868", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:db2381b1-577e-4d2c-a51d-9ba0399f5796", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"status\":\"Creating\",\"startTime\":\"2020-02-02T20:50:50.4713589Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:50:55Z\",\"lastTimestamp\":\"2020-02-02T20:50:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:12Z\",\"lastTimestamp\":\"2020-02-02T20:51:12Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"}]}}" + "x-ms-request-id" : "eastus2:f92d44a0-5ada-4d40-886b-b790d4f19043", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"status\":\"Creating\",\"startTime\":\"2020-07-21T05:33:46.8449777Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:55Z\",\"lastTimestamp\":\"2020-07-21T05:33:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"}]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/c1de5225-65a4-4cf5-85b7-ba707ec83618?api-version=2018-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/ba06da5a-32df-48ed-ae71-bc7369054017?api-version=2018-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:52:24 GMT", + "date" : "Tue, 21 Jul 2020 05:35:21 GMT", "content-length" : "1520", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5b4cc3d7-773c-4486-8fac-59664647a92c", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9e0f0cb9-c856-42df-b19b-363b30719844", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205224Z:9e0f0cb9-c856-42df-b19b-363b30719844", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:e460b6a6-fd7c-4314-bb11-e052ba4096fa", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"status\":\"Succeeded\",\"startTime\":\"2020-02-02T20:50:50.4713589Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:50:55Z\",\"lastTimestamp\":\"2020-02-02T20:50:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:12Z\",\"lastTimestamp\":\"2020-02-02T20:51:12Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:40Z\",\"lastTimestamp\":\"2020-02-02T20:51:40Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:46Z\",\"lastTimestamp\":\"2020-02-02T20:51:46Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f?api-version=2018-10-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)" - }, - "Response" : { - "date" : "Sun, 02 Feb 2020 20:52:24 GMT", - "content-length" : "3218", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11993", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "2b908b18-f423-4d39-aed3-c54d249df45f", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205225Z:2b908b18-f423-4d39-aed3-c54d249df45f", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053522Z:5b4cc3d7-773c-4486-8fac-59664647a92c", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:6508a32b-2980-4fd3-8b16-6920ff4ab00a", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-02-02T20:51:41Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:50:55Z\",\"lastTimestamp\":\"2020-02-02T20:50:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:12Z\",\"lastTimestamp\":\"2020-02-02T20:51:12Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:40Z\",\"lastTimestamp\":\"2020-02-02T20:51:40Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-02-02T20:51:55Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:46Z\",\"lastTimestamp\":\"2020-02-02T20:51:46Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"40.70.156.39\",\"type\":\"Public\",\"dnsNameLabel\":\"aci94823f\",\"fqdn\":\"aci94823f.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516\":{\"principalId\":\"c0c666e1-91af-4afc-8da9-55a5da29b4f7\",\"clientId\":\"19c35dd7-f127-49ff-9ffb-5c7934c3f2b2\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218\":{\"principalId\":\"b1902d24-8c3d-4eda-a392-275512e5c391\",\"clientId\":\"81fc4859-c8a1-4f59-9bf4-1eed19671061\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"name\":\"aci94823f\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:68d0c902-4ae9-4424-940e-77dccd601217", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"status\":\"Succeeded\",\"startTime\":\"2020-07-21T05:33:46.8449777Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:55Z\",\"lastTimestamp\":\"2020-07-21T05:33:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:27Z\",\"lastTimestamp\":\"2020-07-21T05:34:27Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:48Z\",\"lastTimestamp\":\"2020-07-21T05:34:48Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:52Z\",\"lastTimestamp\":\"2020-07-21T05:34:52Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:52Z\",\"lastTimestamp\":\"2020-07-21T05:34:52Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:52:24 GMT", - "content-length" : "3218", + "date" : "Tue, 21 Jul 2020 05:35:23 GMT", + "content-length" : "3256", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11992", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "28d8e7a2-5bee-46c1-a408-b487972fff99", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "b738eca2-bd6d-4abf-ac7e-4cad6a7a380b", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205225Z:b738eca2-bd6d-4abf-ac7e-4cad6a7a380b", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053523Z:28d8e7a2-5bee-46c1-a408-b487972fff99", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:2be4ada9-a66b-442b-9b73-c2f02a0a047b", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-02-02T20:51:41Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:50:55Z\",\"lastTimestamp\":\"2020-02-02T20:50:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:12Z\",\"lastTimestamp\":\"2020-02-02T20:51:12Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:40Z\",\"lastTimestamp\":\"2020-02-02T20:51:40Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-02-02T20:51:55Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:46Z\",\"lastTimestamp\":\"2020-02-02T20:51:46Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"40.70.156.39\",\"type\":\"Public\",\"dnsNameLabel\":\"aci94823f\",\"fqdn\":\"aci94823f.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516\":{\"principalId\":\"c0c666e1-91af-4afc-8da9-55a5da29b4f7\",\"clientId\":\"19c35dd7-f127-49ff-9ffb-5c7934c3f2b2\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218\":{\"principalId\":\"b1902d24-8c3d-4eda-a392-275512e5c391\",\"clientId\":\"81fc4859-c8a1-4f59-9bf4-1eed19671061\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"name\":\"aci94823f\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:0244ab68-2ca8-4af3-908e-88562f908cc4", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:44Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:55Z\",\"lastTimestamp\":\"2020-07-21T05:33:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:27Z\",\"lastTimestamp\":\"2020-07-21T05:34:27Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:52Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:48Z\",\"lastTimestamp\":\"2020-07-21T05:34:48Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:52Z\",\"lastTimestamp\":\"2020-07-21T05:34:52Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:52Z\",\"lastTimestamp\":\"2020-07-21T05:34:52Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.247.82.210\",\"type\":\"Public\",\"dnsNameLabel\":\"aci137459\",\"fqdn\":\"aci137459.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244\":{\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"clientId\":\"d38d2261-fe2e-4ab6-9e97-02e7dcd8f3d6\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070\":{\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"clientId\":\"8b29a8aa-c79b-4707-bd92-2550ac602214\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"name\":\"aci137459\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:52:25 GMT", - "content-length" : "1637", + "date" : "Tue, 21 Jul 2020 05:35:23 GMT", + "content-length" : "3256", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "cb518657-0936-47ef-ad98-f81109fbf8e7", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "ba2f5b1c-1b03-4c82-9f6c-ac6e74303a17", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205225Z:ba2f5b1c-1b03-4c82-9f6c-ac6e74303a17", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053524Z:cb518657-0936-47ef-ad98-f81109fbf8e7", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:180211d0-bbb6-4f06-9474-80b0ba3bad8a", - "Body" : "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"40.70.156.39\",\"type\":\"Public\",\"dnsNameLabel\":\"aci94823f\",\"fqdn\":\"aci94823f.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516\":{\"principalId\":\"c0c666e1-91af-4afc-8da9-55a5da29b4f7\",\"clientId\":\"19c35dd7-f127-49ff-9ffb-5c7934c3f2b2\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218\":{\"principalId\":\"b1902d24-8c3d-4eda-a392-275512e5c391\",\"clientId\":\"81fc4859-c8a1-4f59-9bf4-1eed19671061\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"name\":\"aci94823f\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" + "x-ms-request-id" : "eastus2:da27ef96-cb45-423e-bd69-7630f19e43ec", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:44Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:55Z\",\"lastTimestamp\":\"2020-07-21T05:33:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:27Z\",\"lastTimestamp\":\"2020-07-21T05:34:27Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:52Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:48Z\",\"lastTimestamp\":\"2020-07-21T05:34:48Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:52Z\",\"lastTimestamp\":\"2020-07-21T05:34:52Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:52Z\",\"lastTimestamp\":\"2020-07-21T05:34:52Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.247.82.210\",\"type\":\"Public\",\"dnsNameLabel\":\"aci137459\",\"fqdn\":\"aci137459.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244\":{\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"clientId\":\"d38d2261-fe2e-4ab6-9e97-02e7dcd8f3d6\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070\":{\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"clientId\":\"8b29a8aa-c79b-4707-bd92-2550ac602214\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"name\":\"aci137459\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:52:25 GMT", - "content-length" : "3218", + "date" : "Tue, 21 Jul 2020 05:35:25 GMT", + "content-length" : "1675", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11990", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ee0d87a6-29fd-4605-8df8-b88ca015f066", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "137db28e-02d6-4dfa-a698-a76e2921eee6", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205226Z:137db28e-02d6-4dfa-a698-a76e2921eee6", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053526Z:ee0d87a6-29fd-4605-8df8-b88ca015f066", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:f2d46654-16e6-4cc9-8326-0a8acb8e6bc5", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-02-02T20:51:41Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:50:55Z\",\"lastTimestamp\":\"2020-02-02T20:50:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:12Z\",\"lastTimestamp\":\"2020-02-02T20:51:12Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:40Z\",\"lastTimestamp\":\"2020-02-02T20:51:40Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-02-02T20:51:55Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:46Z\",\"lastTimestamp\":\"2020-02-02T20:51:46Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"40.70.156.39\",\"type\":\"Public\",\"dnsNameLabel\":\"aci94823f\",\"fqdn\":\"aci94823f.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516\":{\"principalId\":\"c0c666e1-91af-4afc-8da9-55a5da29b4f7\",\"clientId\":\"19c35dd7-f127-49ff-9ffb-5c7934c3f2b2\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218\":{\"principalId\":\"b1902d24-8c3d-4eda-a392-275512e5c391\",\"clientId\":\"81fc4859-c8a1-4f59-9bf4-1eed19671061\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"name\":\"aci94823f\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:d582afb9-9704-4e81-a2df-62dfc7de6913", + "Body" : "{\"value\":[{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.247.82.210\",\"type\":\"Public\",\"dnsNameLabel\":\"aci137459\",\"fqdn\":\"aci137459.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}]},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244\":{\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"clientId\":\"d38d2261-fe2e-4ab6-9e97-02e7dcd8f3d6\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070\":{\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"clientId\":\"8b29a8aa-c79b-4707-bd92-2550ac602214\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"name\":\"aci137459\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}]}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:52:26 GMT", - "content-length" : "3218", + "date" : "Tue, 21 Jul 2020 05:35:26 GMT", + "content-length" : "3256", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11989", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "da0290d2-5629-46c1-be1e-6d407f8bc088", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "657cc78f-d443-4e6f-bd6d-172e25d1c07b", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205226Z:657cc78f-d443-4e6f-bd6d-172e25d1c07b", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053527Z:da0290d2-5629-46c1-be1e-6d407f8bc088", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "eastus2:8e081b45-2b05-4587-be7b-b7a58acf63d9", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-02-02T20:51:41Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:50:55Z\",\"lastTimestamp\":\"2020-02-02T20:50:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:12Z\",\"lastTimestamp\":\"2020-02-02T20:51:12Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:40Z\",\"lastTimestamp\":\"2020-02-02T20:51:40Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-02-02T20:51:55Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:41Z\",\"lastTimestamp\":\"2020-02-02T20:51:41Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:46Z\",\"lastTimestamp\":\"2020-02-02T20:51:46Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-02-02T20:51:55Z\",\"lastTimestamp\":\"2020-02-02T20:51:55Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"40.70.156.39\",\"type\":\"Public\",\"dnsNameLabel\":\"aci94823f\",\"fqdn\":\"aci94823f.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id7c233516\":{\"principalId\":\"c0c666e1-91af-4afc-8da9-55a5da29b4f7\",\"clientId\":\"19c35dd7-f127-49ff-9ffb-5c7934c3f2b2\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci57552/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id70b46218\":{\"principalId\":\"b1902d24-8c3d-4eda-a392-275512e5c391\",\"clientId\":\"81fc4859-c8a1-4f59-9bf4-1eed19671061\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci57552/providers/Microsoft.ContainerInstance/containerGroups/aci94823f\",\"name\":\"aci94823f\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" + "x-ms-request-id" : "eastus2:73c9fcb6-00e8-4353-b685-8427e12776bd", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:44Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:55Z\",\"lastTimestamp\":\"2020-07-21T05:33:55Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:27Z\",\"lastTimestamp\":\"2020-07-21T05:34:27Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:34:52Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:44Z\",\"lastTimestamp\":\"2020-07-21T05:34:44Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:48Z\",\"lastTimestamp\":\"2020-07-21T05:34:48Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:52Z\",\"lastTimestamp\":\"2020-07-21T05:34:52Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:34:52Z\",\"lastTimestamp\":\"2020-07-21T05:34:52Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.247.82.210\",\"type\":\"Public\",\"dnsNameLabel\":\"aci137459\",\"fqdn\":\"aci137459.eastus2.azurecontainer.io\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id4dc38244\":{\"principalId\":\"ed7956fe-840c-436a-81e0-c212565cd155\",\"clientId\":\"d38d2261-fe2e-4ab6-9e97-02e7dcd8f3d6\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci55367/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2cd85070\":{\"principalId\":\"68ec26c5-026c-4d9b-8f7d-988cf5e51e16\",\"clientId\":\"8b29a8aa-c79b-4707-bd92-2550ac602214\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci55367/providers/Microsoft.ContainerInstance/containerGroups/aci137459\",\"name\":\"aci137459\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"value1\"}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/providers/Microsoft.ContainerInstance/operations?api-version=2018-10-01", + "Uri" : "http://localhost:1234/providers/Microsoft.ContainerInstance/operations?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d916ff2a485200f321d6cba23dc3377b781cd392a6e37bf910c332cb391ba0cc Java:1.8.0_202 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Sun, 02 Feb 2020 20:52:26 GMT", - "content-length" : "8181", + "date" : "Tue, 21 Jul 2020 05:35:28 GMT", + "content-length" : "8445", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "6eca4f24-2bd4-4933-887f-2e007112cbe3", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "9ba88343-401e-4810-ba8c-6d6fa3317d9c", - "x-ms-ratelimit-remaining-tenant-reads" : "11999", + "x-ms-ratelimit-remaining-tenant-reads" : "11998", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "EASTASIA:20200202T205227Z:9ba88343-401e-4810-ba8c-6d6fa3317d9c", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053528Z:6eca4f24-2bd4-4933-887f-2e007112cbe3", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "southeastasia:ee8a3aee-7188-4edf-8121-521276f3cddf", - "Body" : "{\"value\":[{\"name\":\"Microsoft.ContainerInstance/register/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Register Microsoft Container Instance\",\"description\":\"Registers the subscription for the container instance resource provider and enables the creation of container groups.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Groups\",\"description\":\"Get all container goups.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/write\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Create or update Container Group\",\"description\":\"Create or update a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/delete\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Delete Container Group\",\"description\":\"Delete the specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/restart/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Restart Container Group\",\"description\":\"Restarts a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/stop/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Stop Container Group\",\"description\":\"Stops a specific container group. Compute resources will be deallocated and billing will stop.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/start/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Start Container Group\",\"description\":\"Starts a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/logs/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Logs\",\"description\":\"Get logs for a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/buildlogs/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Build Logs\",\"description\":\"Get build logs for a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/exec/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Exec Into a Container\",\"description\":\"Exec into a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/operationResults/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Async operation result\",\"description\":\"Get async operation result\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/cachedImages/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Cached Images\",\"operation\":\"Get cached images.\",\"description\":\"Gets the cached images for the subscription in a region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/capabilities/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Capabilities\",\"operation\":\"Get Capabilities\",\"description\":\"Get the capabilities for a region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/usages/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Usages\",\"operation\":\"Get Regional Usage\",\"description\":\"Get the usage for a specific region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/metricDefinitions/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Read container group metric definitions\",\"description\":\"Gets the available metrics for container group.\"},\"origin\":\"System\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"CpuUsage\",\"displayName\":\"CPU Usage\",\"displayDescription\":\"CPU usage on all cores in millicores.\",\"unit\":\"Count\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"containerName\",\"displayName\":\"Container Name\",\"toBeExportedForShoebox\":true}]},{\"name\":\"MemoryUsage\",\"displayName\":\"Memory Usage\",\"displayDescription\":\"Total memory usage in byte.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"containerName\",\"displayName\":\"Container Name\",\"toBeExportedForShoebox\":true}]},{\"name\":\"NetworkBytesReceivedPerSecond\",\"displayName\":\"Network Bytes Received Per Second\",\"displayDescription\":\"The network bytes received per second.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false},{\"name\":\"NetworkBytesTransmittedPerSecond\",\"displayName\":\"Network Bytes Transmitted Per Second\",\"displayDescription\":\"The network bytes transmitted per second.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false}]}}},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Read Diagnostic Setting\",\"description\":\"Gets the diagnostic setting for the container group.\"},\"origin\":\"System\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/write\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Write Diagnostic Setting\",\"description\":\"Creates or updates the diagnostic setting for the container group.\"},\"origin\":\"System\"},{\"name\":\"Microsoft.ContainerInstance/locations/deleteVirtualNetworkOrSubnets/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Delete virtual network or subnet notification\",\"operation\":\"Delete virtual network or subnet notification\",\"description\":\"Notifies Microsoft.ContainerInstance that virtual network or subnet is being deleted.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/operations/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Read operations.\",\"description\":\"List the operations for Azure Container Instance service.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/operations/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Read operations.\",\"description\":\"List the operations for Azure Container Instance service.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/serviceassociationlinks/delete\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Service Association Link.\",\"operation\":\"Delete Service Association Link.\",\"description\":\"Delete the service association link created by azure container instance resource provider on a subnet.\"},\"origin\":\"User\"}]}" + "x-ms-request-id" : "southeastasia:343f8ab6-1f43-4b3b-8e3e-8357fa7d09d0", + "Body" : "{\"value\":[{\"name\":\"Microsoft.ContainerInstance/register/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Register Microsoft Container Instance\",\"description\":\"Registers the subscription for the container instance resource provider and enables the creation of container groups.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Groups\",\"description\":\"Get all container goups.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/write\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Create or update Container Group\",\"description\":\"Create or update a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/delete\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Delete Container Group\",\"description\":\"Delete the specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/restart/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Restart Container Group\",\"description\":\"Restarts a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/stop/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Stop Container Group\",\"description\":\"Stops a specific container group. Compute resources will be deallocated and billing will stop.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/start/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Start Container Group\",\"description\":\"Starts a specific container group.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/logs/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Logs\",\"description\":\"Get logs for a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/buildlogs/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Get Container Build Logs\",\"description\":\"Get build logs for a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/containers/exec/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Exec Into a Container\",\"description\":\"Exec into a specific container.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/operationResults/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Async operation result\",\"description\":\"Get async operation result\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/operationResults/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Async operation result\",\"description\":\"Get async operation result\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/cachedImages/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Cached Images\",\"operation\":\"Get cached images.\",\"description\":\"Gets the cached images for the subscription in a region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/capabilities/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Capabilities\",\"operation\":\"Get Capabilities\",\"description\":\"Get the capabilities for a region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/usages/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Usages\",\"operation\":\"Get Regional Usage\",\"description\":\"Get the usage for a specific region.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/metricDefinitions/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Read container group metric definitions\",\"description\":\"Gets the available metrics for container group.\"},\"origin\":\"System\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"CpuUsage\",\"displayName\":\"CPU Usage\",\"displayDescription\":\"CPU usage on all cores in millicores.\",\"unit\":\"Count\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"containerName\",\"displayName\":\"Container Name\",\"toBeExportedForShoebox\":true}]},{\"name\":\"MemoryUsage\",\"displayName\":\"Memory Usage\",\"displayDescription\":\"Total memory usage in byte.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"containerName\",\"displayName\":\"Container Name\",\"toBeExportedForShoebox\":true}]},{\"name\":\"NetworkBytesReceivedPerSecond\",\"displayName\":\"Network Bytes Received Per Second\",\"displayDescription\":\"The network bytes received per second.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false},{\"name\":\"NetworkBytesTransmittedPerSecond\",\"displayName\":\"Network Bytes Transmitted Per Second\",\"displayDescription\":\"The network bytes transmitted per second.\",\"unit\":\"Bytes\",\"aggregationType\":\"Average\",\"supportedAggregationTypes\":[\"Maximum\",\"Minimum\",\"Average\"],\"supportedTimeGrainTypes\":[\"PT1M\",\"PT5M\",\"PT15M\",\"PT30M\",\"PT1H\",\"PT6H\",\"PT12H\",\"PT1D\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"MicrosoftContainerInstanceShoebox\",\"sourceMdmNamespace\":\"AzureMonitoringMetrics\",\"fillGapWithZero\":false}]}}},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Read Diagnostic Setting\",\"description\":\"Gets the diagnostic setting for the container group.\"},\"origin\":\"System\"},{\"name\":\"Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/write\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Container Group\",\"operation\":\"Write Diagnostic Setting\",\"description\":\"Creates or updates the diagnostic setting for the container group.\"},\"origin\":\"System\"},{\"name\":\"Microsoft.ContainerInstance/locations/deleteVirtualNetworkOrSubnets/action\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Delete virtual network or subnet notification\",\"operation\":\"Delete virtual network or subnet notification\",\"description\":\"Notifies Microsoft.ContainerInstance that virtual network or subnet is being deleted.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/locations/operations/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Read operations.\",\"description\":\"List the operations for Azure Container Instance service.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/operations/read\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Resource provider operations.\",\"operation\":\"Read operations.\",\"description\":\"List the operations for Azure Container Instance service.\"},\"origin\":\"User\"},{\"name\":\"Microsoft.ContainerInstance/serviceassociationlinks/delete\",\"display\":{\"provider\":\"Microsoft Container Instance\",\"resource\":\"Service Association Link.\",\"operation\":\"Delete Service Association Link.\",\"description\":\"Delete the service association link created by azure container instance resource provider on a subnet.\"},\"origin\":\"User\"}]}" } } ], - "variables" : [ "aci94823f", "rgaci57552", "msi-id7c233516", "msi-id70b46218", "cec93c19-d7f3-41af-bc6d-70c47e44921b", "eaf9a029-edd2-44b8-9433-b9e064b62558", "052e513d-11e5-436d-9793-4e7f68dad700", "365dff13-feb2-4962-a8ec-149f0d850cfe", "f6315174-f412-410c-acd5-2fc1508c74bc", "aedace66-3b50-4648-96fb-57406fbbd656", "d9a90706-fd27-4d3b-b448-96fa8dd5cf28", "3e9a6e8c-8b20-4eef-980c-d756bcadab57", "82a9d40b-ef04-4024-b79c-3e57cefc03b4", "2ccc026c-ebc4-49f9-9104-227167c94cbd", "f96f3191-51a5-47c0-9602-afe1aba0b7ba", "f98d14e3-ee85-4624-9fc6-f91bc722f871" ] + "variables" : [ "aci137459", "rgaci55367", "msi-id4dc38244", "msi-id2cd85070", "cc12e167-92da-42aa-812b-a003d7d42e19", "c9cd52bc-a810-4bcf-b463-1519095c8188", "d173f762-af47-4418-8211-cce9beac21f7", "8dec8a9b-4d4e-4c91-ad4f-4df45c447474" ] } \ No newline at end of file diff --git a/sdk/management/docs/DESIGN_PREVIEW.md b/sdk/management/docs/DESIGN_PREVIEW.md new file mode 100644 index 000000000000..cdb7bd7cb5a9 --- /dev/null +++ b/sdk/management/docs/DESIGN_PREVIEW.md @@ -0,0 +1,54 @@ +# Design for Azure Management Libraries for Java (Preview) + +## Fluent interface + +### Fine control over long-running operation + +Resource provision takes time, a typical solution adopted by Azure services is the [long-running operation (LRO)][lro]. + +Fluent interface does the polling operations in background, and only returns the final result. + +Azure Management Libraries supports fine control over the polling for certain important resources, via `Accepted` and `SyncPoller` class. Method verb is `beginCreate` and `beginDelete`. + +`Accepted` class provides following functionalities: +- `ActivationResponse` via `getActivationResponse` method provides the response of the first activation operation. Note that though it wraps a resource instance, some action on this resource instance will not work, since it is not provisioned yet. +- `SyncPoller` via `getSyncPoller` method provides the control of the polling operations. `SyncPoller.poll` can be called at desired time. +- Resource instance via `getFinalResult` method, after completion of the polling operations. The method will throw `ManagementException` if polling failed and resource cannot be provisioned. + +Here is sample code for Deployment. + +```java +// begin provision +Accepted acceptedDeployment = azure.deployments() + .define(name) + ... + .beginCreate(); +Deployment provisioningDeployment = acceptedDeployment.getAcceptedResult().getValue(); + +LongRunningOperationStatus pollStatus = acceptedDeployment.getAcceptedResult().getStatus(); +int delayInMills = acceptedDeployment.getAcceptedResult().getRetryAfter() == null + ? 0 + : (int) acceptedDeployment.getAcceptedResult().getRetryAfter().toMillis(); +while (!pollStatus.isComplete()) { + Thread.sleep(delayInMills); + + // poll + PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); + pollStatus = pollResponse.getStatus(); + delayInMills = pollResponse.getRetryAfter() == null + ? DEFAULT_DELAY_IN_MILLIS + : (int) pollResponse.getRetryAfter().toMillis(); +} +// pollStatus == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, if successful + +// final result +Deployment deployment = acceptedDeployment.getFinalResult(); +``` + +Supported Azure resources: +- `delete` for `ResourceGroup` +- `create` for `Deployment` +- `create` and `delete` for `GenericResource` +- `create` and `delete` for `VirtualMachine` + +[lro]: https://docs.microsoft.com/en-us/azure/architecture/patterns/async-request-reply diff --git a/sdk/management/pom.xml b/sdk/management/pom.xml index a290e23ca8e7..373ea72ff4d2 100644 --- a/sdk/management/pom.xml +++ b/sdk/management/pom.xml @@ -55,11 +55,6 @@ - - com.azure - azure-core - 1.5.0 - com.azure azure-core-management @@ -113,13 +108,13 @@ com.azure azure-core-http-netty - 1.4.0 + 1.5.3 test com.azure azure-identity - 1.1.0-beta.3 + 1.0.9 test @@ -484,6 +479,7 @@ ../storage/mgmt ../sql/mgmt ../cosmos/mgmt + ../containerinstance/mgmt ../containerregistry/mgmt ../containerservice/mgmt ../monitor/mgmt diff --git a/sdk/management/samples/.gitignore b/sdk/management/samples/.gitignore new file mode 100644 index 000000000000..ee0ce9f5f355 --- /dev/null +++ b/sdk/management/samples/.gitignore @@ -0,0 +1 @@ +/piggymetrics \ No newline at end of file diff --git a/sdk/management/samples/pom.xml b/sdk/management/samples/pom.xml index 71602c38ab03..fa920e1a8631 100644 --- a/sdk/management/samples/pom.xml +++ b/sdk/management/samples/pom.xml @@ -80,6 +80,11 @@ docker-java 3.2.1 + + org.apache.httpcomponents + httpclient + 4.5.12 + com.github.cverges.expect4j expect4j @@ -103,6 +108,11 @@ azure-cosmos 4.0.1-beta.3 + + com.azure + azure-security-keyvault-certificates + 4.0.4 + io.fabric8 kubernetes-client diff --git a/sdk/management/samples/samples.json b/sdk/management/samples/samples.json index 90aa8dae1954..3bc02e94f292 100644 --- a/sdk/management/samples/samples.json +++ b/sdk/management/samples/samples.json @@ -850,6 +850,12 @@ "filePath": "azure-samples/src/main/java/com/microsoft/azure/management/appservice/samples/ManageLinuxFunctionAppSourceControl.java", "githubPath": "Azure-Samples/app-service-java-configure-deployment-sources-for-functions-on-linux", "description": "Getting started on configuring deployment sources for Functions on Linux using Java" + }, + { + "owner": "yaohaizh", + "filePath": "azure-samples/src/main/java/com/microsoft/azure/management/appplatform/samples/ManageSpringCloud.java", + "githubPath": "Azure-Samples/app-platform-java-manage-spring-cloud", + "description": "Getting started on managing spring cloud using Java" } ] -} \ No newline at end of file +} diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java new file mode 100644 index 000000000000..77503f373ba5 --- /dev/null +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/appplatform/samples/ManageSpringCloud.java @@ -0,0 +1,315 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.appplatform.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.appplatform.models.SpringApp; +import com.azure.resourcemanager.appplatform.models.SpringService; +import com.azure.resourcemanager.appservice.models.AppServiceCertificateOrder; +import com.azure.resourcemanager.appservice.models.AppServiceDomain; +import com.azure.resourcemanager.dns.models.DnsZone; +import com.azure.resourcemanager.keyvault.models.CertificatePermissions; +import com.azure.resourcemanager.keyvault.models.Secret; +import com.azure.resourcemanager.keyvault.models.SecretPermissions; +import com.azure.resourcemanager.keyvault.models.Vault; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; +import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.samples.Utils; +import com.azure.security.keyvault.certificates.CertificateClient; +import com.azure.security.keyvault.certificates.CertificateClientBuilder; +import com.azure.security.keyvault.certificates.models.ImportCertificateOptions; +import org.apache.commons.compress.archivers.tar.TarArchiveEntry; +import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; +import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream; +import org.apache.commons.compress.utils.IOUtils; + +import javax.xml.bind.DatatypeConverter; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.security.KeyStore; +import java.security.MessageDigest; +import java.util.Base64; +import java.util.Collections; + +/** + * Azure App Platform sample for managing Spring Cloud. + * - Create a Spring Cloud Service + * - Create 3 app: gateway, auth-service, account-service from sample + * - Open public endpoint for gateway + * - Create a custom domain + * - Add a CNAME to the gateway fully qualified domain name + * - Order a certificate + * - Save the certificate to a key vault + * - Assign certificate to spring cloud + * - Assign custom domain to gateway endpoint + */ +public class ManageSpringCloud { + private static final String PIGGYMETRICS_TAR_GZ_URL = "https://github.com/weidongxu-microsoft/azure-sdk-for-java-management-tests/raw/master/spring-cloud/piggymetrics.tar.gz"; + private static final String SPRING_CLOUD_SERVICE_PRINCIPAL = "03b39d0f-4213-4864-a245-b1476ec03169"; + + /** + * Main function which runs the actual sample. + * @param azure instance of the azure client + * @param clientId the aad client id in azure instance + * @return true if sample runs successfully + * @throws IllegalStateException unexcepted state + */ + public static boolean runSample(Azure azure, String clientId) { + final String rgName = azure.sdkContext().randomResourceName("rg", 24); + final String serviceName = azure.sdkContext().randomResourceName("service", 24); + final Region region = Region.US_EAST; + final String domainName = azure.sdkContext().randomResourceName("jsdkdemo-", 20) + ".com"; + final String certOrderName = azure.sdkContext().randomResourceName("cert", 15); + final String vaultName = azure.sdkContext().randomResourceName("vault", 15); + final String certName = azure.sdkContext().randomResourceName("cert", 15); + + try { + azure.resourceGroups().define(rgName) + .withRegion(region) + .create(); + + //============================================================ + // Create a spring cloud service with 3 apps: gateway, auth-service, account-service + + System.out.printf("Creating spring cloud service %s in resource group %s ...%n", serviceName, rgName); + + SpringService service = azure.springServices().define(serviceName) + .withRegion(region) + .withExistingResourceGroup(rgName) + .create(); + + System.out.printf("Created spring cloud service %s%n", service.name()); + Utils.print(service); + + // get source code of a sample project + File sourceCodeFolder = new File("piggymetrics"); + if (!sourceCodeFolder.exists() || sourceCodeFolder.isFile()) { + if (sourceCodeFolder.isFile() && !sourceCodeFolder.delete()) { + throw new IllegalStateException("could not delete piggymetrics file"); + } + extraTarGzSource(sourceCodeFolder, new URL(PIGGYMETRICS_TAR_GZ_URL)); + } + + //============================================================ + // Create spring cloud app: gateway + + System.out.printf("Creating spring cloud app gateway in resource group %s ...%n", rgName); + SpringApp gateway = service.apps().define("gateway") + .withDefaultPublicEndpoint() + .withHttpsOnly() + .deploySource("default", sourceCodeFolder, "gateway") + .create(); + + System.out.println("Created spring cloud service gateway"); + Utils.print(gateway); + + //============================================================ + // Create spring cloud app: auth-service + + System.out.printf("Creating spring cloud app auth-service in resource group %s ...%n", rgName); + SpringApp authService = service.apps().define("auth-service") + .deploySource("default", sourceCodeFolder, "auth-service") + .create(); + + System.out.println("Created spring cloud service auth-service"); + Utils.print(authService); + + //============================================================ + // Create spring cloud app: account-service + + System.out.printf("Creating spring cloud app account-service in resource group %s ...%n", rgName); + SpringApp accountService = service.apps().define("account-service") + .deploySource("default", sourceCodeFolder, "account-service") + .create(); + + System.out.println("Created spring cloud service account-service"); + Utils.print(accountService); + + //============================================================ + // Create App Service Domain and Certificate + + System.out.println("Purchasing a domain " + domainName + "..."); + + AppServiceDomain domain = azure.appServiceDomains().define(domainName) + .withExistingResourceGroup(rgName) + .defineRegistrantContact() + .withFirstName("Jon") + .withLastName("Doe") + .withEmail("jondoe@contoso.com") + .withAddressLine1("123 4th Ave") + .withCity("Redmond") + .withStateOrProvince("WA") + .withCountry(CountryIsoCode.UNITED_STATES) + .withPostalCode("98052") + .withPhoneCountryCode(CountryPhoneCode.UNITED_STATES) + .withPhoneNumber("4258828080") + .attach() + .withDomainPrivacyEnabled(true) + .withAutoRenewEnabled(false) + .create(); + System.out.println("Purchased domain " + domain.name()); + Utils.print(domain); + + DnsZone dnsZone = azure.dnsZones().getById(domain.dnsZoneId()); + gateway.refresh(); + + System.out.printf("Updating dns with CNAME ssl.%s to %s%n", domainName, gateway.fqdn()); + dnsZone.update() + .withCNameRecordSet("ssl", gateway.fqdn()) + .apply(); + + System.out.printf("Purchasing a certificate for *.%s and save to %s in key vault named %s ...%n", domainName, certOrderName, vaultName); + AppServiceCertificateOrder certificateOrder = azure.appServiceCertificateOrders().define(certOrderName) + .withExistingResourceGroup(rgName) + .withHostName(String.format("*.%s", domainName)) + .withWildcardSku() + .withDomainVerification(domain) + .withNewKeyVault(vaultName, region) + .withAutoRenew(true) + .create(); + System.out.printf("Purchased certificate: *.%s ...%n", domain.name()); + Utils.print(certificateOrder); + + System.out.printf("Updating key vault %s with access from %s, %s%n", vaultName, clientId, SPRING_CLOUD_SERVICE_PRINCIPAL); + Vault vault = azure.vaults().getByResourceGroup(rgName, vaultName); + vault.update() + .defineAccessPolicy() + .forServicePrincipal(clientId) + .allowSecretAllPermissions() + .allowCertificateAllPermissions() + .attach() + .defineAccessPolicy() + .forServicePrincipal(SPRING_CLOUD_SERVICE_PRINCIPAL) + .allowCertificatePermissions(CertificatePermissions.GET, CertificatePermissions.LIST) + .allowSecretPermissions(SecretPermissions.GET, SecretPermissions.LIST) + .attach() + .apply(); + System.out.printf("Updated key vault %s%n", vault.name()); + Utils.print(vault); + + Secret secret = vault.secrets().getByName(certOrderName); + + byte[] certificate = Base64.getDecoder().decode(secret.value()); + + String thumbprint = secret.tags().get("Thumbprint"); + if (thumbprint == null || thumbprint.isEmpty()) { + KeyStore store = KeyStore.getInstance("PKCS12"); + store.load(new ByteArrayInputStream(certificate), null); + String alias = Collections.list(store.aliases()).get(0); + thumbprint = DatatypeConverter.printHexBinary(MessageDigest.getInstance("SHA-1").digest(store.getCertificate(alias).getEncoded())); + } + + System.out.printf("Get certificate: %s%n", secret.value()); + System.out.printf("Certificate Thumbprint: %s%n", thumbprint); + + // upload certificate + CertificateClient certificateClient = new CertificateClientBuilder() + .vaultUrl(vault.vaultUri()) + .pipeline(service.manager().httpPipeline()) + .buildClient(); + + System.out.printf("Uploading certificate to %s in key vault ...%n", certName); + certificateClient.importCertificate( + new ImportCertificateOptions(certName, certificate) + .setEnabled(true) + ); + + //============================================================ + // Update Certificate and Custom Domain for Spring Cloud + System.out.println("Updating Spring Cloud Service with certificate ..."); + service.update() + .withCertificate(certName, vault.vaultUri(), certName) + .apply(); + + System.out.printf("Updating Spring Cloud App with domain ssl.%s ...", domainName); + gateway.update() + .withCustomDomain(String.format("ssl.%s", domainName), thumbprint) + .apply(); + + System.out.printf("Successfully expose domain ssl.%s", domainName); + + return true; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + try { + System.out.println("Delete Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure, Configuration.getGlobalConfiguration().get(Configuration.PROPERTY_AZURE_CLIENT_ID)); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } + + + private static void extraTarGzSource(File folder, URL url) throws IOException { + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.connect(); + try (TarArchiveInputStream inputStream = new TarArchiveInputStream(new GzipCompressorInputStream(connection.getInputStream()))) { + TarArchiveEntry entry; + while ((entry = inputStream.getNextTarEntry()) != null) { + if (entry.isDirectory()) { + continue; + } + File file = new File(folder, entry.getName()); + File parent = file.getParentFile(); + if (parent.exists() || parent.mkdirs()) { + try (OutputStream outputStream = new FileOutputStream(file)) { + IOUtils.copy(inputStream, outputStream); + } + } else { + throw new IllegalStateException("Cannot create directory: " + parent.getAbsolutePath()); + } + } + } finally { + connection.disconnect(); + } + } +} diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/appplatform/samples/package-info.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/appplatform/samples/package-info.java new file mode 100644 index 000000000000..ff4f2a87d32d --- /dev/null +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/appplatform/samples/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +/** + * This package contains the classes for app platform samples. + */ +package com.azure.resourcemanager.appplatform.samples; diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java new file mode 100644 index 000000000000..817e4f7fe41c --- /dev/null +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithAzureFileShareMount.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.storage.models.StorageAccount; +import com.azure.storage.file.share.ShareClient; +import com.azure.storage.file.share.ShareClientBuilder; +import com.azure.storage.file.share.models.ShareFileItem; + +/** + * Azure Container Instance sample for managing container instances with Azure File Share mount. + * - Create an Azure container instance using Docker image "seanmckenna/aci-hellofiles" with a mount to a new file share + * - Test that the container app can be reached via "curl" like HTTP GET calls + * - Retrieve container log content + */ +public class ManageContainerInstanceWithAzureFileShareMount { + /** + * Main function which runs the actual sample. + * + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + final String rgName = azure.sdkContext().randomResourceName("rgACI", 15); + final String aciName = azure.sdkContext().randomResourceName("acisample", 20); + final String shareName = azure.sdkContext().randomResourceName("fileshare", 20); + final String containerImageName = "seanmckenna/aci-hellofiles"; + final String volumeMountName = "aci-helloshare"; + + try { + + //============================================================= + // Create a container group with one container instance of default CPU core count and memory size + // using public Docker image "seanmckenna/aci-hellofiles" which mounts the file share created previously + // as read/write shared container volume. + + ContainerGroup containerGroup = azure.containerGroups().define(aciName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withLinux() + .withPublicImageRegistryOnly() + .withNewAzureFileShareVolume(volumeMountName, shareName) + .defineContainerInstance(aciName) + .withImage(containerImageName) + .withExternalTcpPort(80) + .withVolumeMountSetting(volumeMountName, "/aci/logs/") + .attach() + .withDnsPrefix(aciName) + .create(); + + Utils.print(containerGroup); + + //============================================================= + // Check that the container instance is up and running + + // warm up + System.out.println("Warming up " + containerGroup.ipAddress()); + Utils.curl("http://" + containerGroup.ipAddress()); + SdkContext.sleep(30000); + System.out.println("CURLing " + containerGroup.ipAddress()); + System.out.println(Utils.curl("http://" + containerGroup.ipAddress())); + + //============================================================= + // Check the container instance logs + + String logContent = containerGroup.getLogContent(aciName); + System.out.format("Logs for container instance: %s%n%s", aciName, logContent); + + //============================================================= + // List the file share content + + String storageAccountName = containerGroup.volumes().get(volumeMountName).azureFile().storageAccountName(); + StorageAccount storageAccount = azure.storageAccounts().getByResourceGroup(rgName, storageAccountName); + ShareClient shareClient = new ShareClientBuilder() + .connectionString(com.azure.resourcemanager.resources.fluentcore.utils.Utils.getStorageConnectionString( + storageAccountName, + storageAccount.getKeys().get(0).value(), + azure.containerGroups().manager().environment() + )) + .shareName(shareName) + .buildClient(); + + Iterable shareContent = shareClient.getRootDirectoryClient().listFilesAndDirectories(); + + for (ShareFileItem item : shareContent) { + System.out.format("Found shared file %s:%n", item.getName()); + } + + //============================================================= + // Remove the container group + + azure.containerGroups().deleteById(containerGroup.id()); + + return true; + } catch (Exception f) { + System.out.println(f.getMessage()); + f.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java new file mode 100644 index 000000000000..54b8cc74a962 --- /dev/null +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithManualAzureFileShareMountCreation.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.samples.Utils; +import com.azure.resourcemanager.storage.models.StorageAccount; +import com.azure.resourcemanager.storage.models.StorageAccountKey; +import com.azure.storage.file.share.ShareClient; +import com.azure.storage.file.share.ShareClientBuilder; +import com.azure.storage.file.share.models.ShareFileItem; + +/** + * Azure Container Instance sample for managing container instances with Azure File Share mount. + * - Create a storage account and an Azure file share resource + * - Create an Azure container instance using Docker image "seanmckenna/aci-hellofiles" with a mount to the file share from above + * - Test that the container app can be reached via "curl" like HTTP GET calls + * - Retrieve container log content + */ +public class ManageContainerInstanceWithManualAzureFileShareMountCreation { + /** + * Main function which runs the actual sample. + * + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + final String rgName = azure.sdkContext().randomResourceName("rgACI", 15); + final String aciName = azure.sdkContext().randomResourceName("acisample", 20); + final String saName = azure.sdkContext().randomResourceName("sa", 20); + final String shareName = azure.sdkContext().randomResourceName("fileshare", 20); + final String containerImageName = "seanmckenna/aci-hellofiles"; + final String volumeMountName = "aci-helloshare"; + + try { + + //============================================================= + // Create a new storage account and an Azure file share resource + + StorageAccount storageAccount = azure.storageAccounts().define(saName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .create(); + + StorageAccountKey storageAccountKey = storageAccount.getKeys().get(0); + + ShareClient shareClient = new ShareClientBuilder() + .connectionString(com.azure.resourcemanager.resources.fluentcore.utils.Utils.getStorageConnectionString( + saName, + storageAccountKey.value(), + azure.containerGroups().manager().environment() + )) + .shareName(shareName) + .buildClient(); + shareClient.create(); + + //============================================================= + // Create a container group with one container instance of default CPU core count and memory size + // using public Docker image "seanmckenna/aci-hellofiles" which mounts the file share created previously + // as read/write shared container volume. + + ContainerGroup containerGroup = azure.containerGroups().define(aciName) + .withRegion(Region.US_WEST) + .withExistingResourceGroup(rgName) + .withLinux() + .withPublicImageRegistryOnly() + .defineVolume(volumeMountName) + .withExistingReadWriteAzureFileShare(shareName) + .withStorageAccountName(saName) + .withStorageAccountKey(storageAccountKey.value()) + .attach() + .defineContainerInstance(aciName) + .withImage(containerImageName) + .withExternalTcpPort(80) + .withVolumeMountSetting(volumeMountName, "/aci/logs/") + .attach() + .withDnsPrefix(aciName) + .create(); + + Utils.print(containerGroup); + + //============================================================= + // Check that the container instance is up and running + + // warm up + System.out.println("Warming up " + containerGroup.ipAddress()); + Utils.curl("http://" + containerGroup.ipAddress()); + SdkContext.sleep(15000); + System.out.println("CURLing " + containerGroup.ipAddress()); + System.out.println(Utils.curl("http://" + containerGroup.ipAddress())); + + //============================================================= + // Check the container instance logs + + String logContent = containerGroup.getLogContent(aciName); + System.out.format("Logs for container instance: %s%n%s", aciName, logContent); + + //============================================================= + // Remove the container group + + azure.containerGroups().deleteById(containerGroup.id()); + + //============================================================= + // List the file share content + + Iterable shareContent = shareClient.getRootDirectoryClient().listFilesAndDirectories(); + + for (ShareFileItem item : shareContent) { + System.out.format("Found shared file %s:%n", item.getName()); + } + + return true; + } catch (Exception f) { + System.out.println(f.getMessage()); + f.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java new file mode 100644 index 000000000000..5c624b54d203 --- /dev/null +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.samples.Utils; + +/** + * Azure Container Instance sample for managing container instances. + * - Create an Azure container group with two container instances using Docker images "microsoft/aci-helloworld" and "microsoft/aci-tutorial-sidecar" + * - Set the container group restart policy to "never" + * - Test that the container app can be reached via "curl" like HTTP GET calls + * - Retrieve container log content + * - Delete the container group resource + */ +public class ManageContainerInstanceWithMultipleContainerImages { + /** + * Main function which runs the actual sample. + * + * @param azure instance of the azure client + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure) { + final String rgName = azure.sdkContext().randomResourceName("rgACI", 15); + final String aciName = azure.sdkContext().randomResourceName("acisample", 20); + final String containerImageName1 = "microsoft/aci-helloworld"; + final String containerImageName2 = "microsoft/aci-tutorial-sidecar"; + + try { + //============================================================= + // Create a container group with two container instances + + ContainerGroup containerGroup = azure.containerGroups().define(aciName) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withLinux() + .withPublicImageRegistryOnly() + .withoutVolume() + .defineContainerInstance(aciName + "-1") + .withImage(containerImageName1) + .withExternalTcpPort(80) + .withCpuCoreCount(.5) + .withMemorySizeInGB(0.8) + .attach() + .defineContainerInstance(aciName + "-2") + .withImage(containerImageName2) + .withoutPorts() + .withCpuCoreCount(.5) + .withMemorySizeInGB(0.8) + .attach() + .withRestartPolicy(ContainerGroupRestartPolicy.NEVER) + .withDnsPrefix(aciName) + .create(); + + Utils.print(containerGroup); + + //============================================================= + // Check that the container instance is up and running + + // warm up + System.out.println("Warming up " + containerGroup.ipAddress()); + Utils.curl("http://" + containerGroup.ipAddress()); + SdkContext.sleep(15000); + System.out.println("CURLing " + containerGroup.ipAddress()); + System.out.println(Utils.curl("http://" + containerGroup.ipAddress())); + + //============================================================= + // Check the container instance logs + + String logContent = containerGroup.getLogContent(aciName + "-1"); + System.out.format("Logs for container instance: %s%n%s", aciName + "-1", logContent); + logContent = containerGroup.getLogContent(aciName + "-2"); + System.out.format("Logs for container instance: %s%n%s", aciName + "-2", logContent); + + //============================================================= + // Remove the container group + + azure.containerGroups().deleteById(containerGroup.id()); + + return true; + } catch (Exception f) { + System.out.println(f.getMessage()); + f.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java new file mode 100644 index 000000000000..1445176bb6f6 --- /dev/null +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.java @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerinstance.samples; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.management.AzureEnvironment; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.resourcemanager.Azure; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerregistry.models.AccessKeyType; +import com.azure.resourcemanager.containerregistry.models.Registry; +import com.azure.resourcemanager.containerregistry.models.RegistryCredentials; +import com.azure.resourcemanager.containerservice.models.ContainerServiceVMSizeTypes; +import com.azure.resourcemanager.containerservice.models.KubernetesCluster; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; +import com.azure.resourcemanager.samples.DockerUtils; +import com.azure.resourcemanager.samples.SSHShell; +import com.azure.resourcemanager.samples.Utils; +import com.github.dockerjava.api.DockerClient; +import com.github.dockerjava.api.command.CreateContainerResponse; +import com.github.dockerjava.api.command.PullImageResultCallback; +import com.github.dockerjava.api.exception.NotFoundException; +import com.github.dockerjava.api.model.AuthConfig; +import com.github.dockerjava.api.model.Container; +import com.github.dockerjava.api.model.Image; +import com.github.dockerjava.core.command.PushImageResultCallback; +import io.fabric8.kubernetes.api.model.LoadBalancerIngress; +import io.fabric8.kubernetes.api.model.Namespace; +import io.fabric8.kubernetes.api.model.NamespaceBuilder; +import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.api.model.ReplicationController; +import io.fabric8.kubernetes.api.model.ReplicationControllerBuilder; +import io.fabric8.kubernetes.api.model.Secret; +import io.fabric8.kubernetes.api.model.SecretBuilder; +import io.fabric8.kubernetes.api.model.Service; +import io.fabric8.kubernetes.api.model.ServiceBuilder; +import io.fabric8.kubernetes.client.Config; +import io.fabric8.kubernetes.client.DefaultKubernetesClient; +import io.fabric8.kubernetes.client.KubernetesClient; +import org.apache.commons.codec.binary.Base64; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStreamWriter; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +/** + * Azure Container Instance sample for managing container instances. + * - Create an Azure Container Registry to be used for holding private Docker container images + * - If a local Docker engine cannot be found, create a Linux virtual machine that will host a Docker engine + * to be used for this sample + * - Use Docker Java to create a Docker client that will push/pull an image to/from Azure Container Registry + * - Pull a test image from the public Docker repo (tomcat:8) to be used as a sample for pushing/pulling + * to/from an Azure Container Registry + * - Create an Azure container group with a container instance using the container image that was pushed to the + * container registry created above + * - Test that the container app can be reached via "curl" like HTTP GET calls + * - Retrieve container log content + * - Create a SSH private/public key to be used when creating a container service + * - Create an Azure Container Service with Kubernetes orchestration + * - Log in via the SSH client and download the Kubernetes config + * - Create a Kubernetes client using the Kubernetes config file downloaded from one of the virtual machine managers + * - Create a Kubernetes namespace + * - Create a Kubernetes secret of type "docker-registry" using the Azure Container Registry credentials from above + * - Create a Kubernetes replication controller using a container image from the Azure private registry from above + * and a load balancer service that will expose the app to the world + */ +public class ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator { + /** + * Main function which runs the actual sample. + * + * @param azure instance of the azure client + * @param clientId secondary service principal client ID + * @param secret secondary service principal secret + * @return true if sample runs successfully + */ + public static boolean runSample(Azure azure, String clientId, String secret) { + final String rgName = azure.sdkContext().randomResourceName("rgaci", 15); + final Region region = Region.US_EAST2; + + final String acrName = azure.sdkContext().randomResourceName("acr", 20); + + final String aciName = azure.sdkContext().randomResourceName("acisample", 20); + final String containerImageName = "microsoft/aci-helloworld"; + final String containerImageTag = "latest"; + final String dockerContainerName = "sample-hello"; + + final String acsName = azure.sdkContext().randomResourceName("acssample", 30); + String servicePrincipalClientId = clientId; // replace with a real service principal client id + String servicePrincipalSecret = secret; // and corresponding secret + final String rootUserName = "acsuser"; + String acsSecretName = "mysecret112233"; + String acsNamespace = "acrsample"; + String acsLbIngressName = "lb-acrsample"; + + try { + //============================================================= + // Create an Azure Container Registry to store and manage private Docker container images + + System.out.println("Creating an Azure Container Registry"); + + Date t1 = new Date(); + + Registry azureRegistry = azure.containerRegistries().define(acrName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withBasicSku() + .withRegistryNameAsAdminUser() + .create(); + + Date t2 = new Date(); + System.out.println("Created Azure Container Registry: (took " + ((t2.getTime() - t1.getTime()) / 1000) + " seconds) " + azureRegistry.id()); + Utils.print(azureRegistry); + + + //============================================================= + // Create a Docker client that will be used to push/pull images to/from the Azure Container Registry + + RegistryCredentials acrCredentials = azureRegistry.getCredentials(); + DockerClient dockerClient = DockerUtils.createDockerClient(azure, rgName, region, + azureRegistry.loginServerUrl(), acrCredentials.username(), acrCredentials.accessKeys().get(AccessKeyType.PRIMARY)); + + //============================================================= + // Pull a temp image from public Docker repo and create a temporary container from that image + // These steps can be replaced and instead build a custom image using a Dockerfile and the app's JAR + + dockerClient.pullImageCmd(containerImageName) + .withTag(containerImageTag) + .withAuthConfig(new AuthConfig()) + .exec(new PullImageResultCallback()) + .awaitCompletion(); + System.out.println("List local Docker images:"); + List images = dockerClient.listImagesCmd().withShowAll(true).exec(); + for (Image image : images) { + System.out.format("\tFound Docker image %s (%s)%n", image.getRepoTags()[0], image.getId()); + } + + CreateContainerResponse dockerContainerInstance = dockerClient.createContainerCmd(containerImageName + ":" + containerImageTag) + .withName(dockerContainerName) + .exec(); + System.out.println("List Docker containers:"); + List dockerContainers = dockerClient.listContainersCmd() + .withShowAll(true) + .exec(); + for (Container container : dockerContainers) { + System.out.format("\tFound Docker container %s (%s)%n", container.getImage(), container.getId()); + } + + //============================================================= + // Commit the new container + + String privateRepoUrl = azureRegistry.loginServerUrl() + "/samples/" + dockerContainerName; + dockerClient.commitCmd(dockerContainerInstance.getId()) + .withRepository(privateRepoUrl) + .withTag("latest").exec(); + + // We can now remove the temporary container instance + dockerClient.removeContainerCmd(dockerContainerInstance.getId()) + .withForce(true) + .exec(); + + //============================================================= + // Push the new Docker image to the Azure Container Registry + + dockerClient.pushImageCmd(privateRepoUrl) + .withAuthConfig(dockerClient.authConfig()) + .exec(new PushImageResultCallback()).awaitSuccess(); + + // Remove the temp image from the local Docker host + try { + dockerClient.removeImageCmd(containerImageName + ":" + containerImageTag).withForce(true).exec(); + } catch (NotFoundException e) { + // just ignore if not exist + } + + //============================================================= + // Create a container group with one container instance of default CPU core count and memory size + // using public Docker image "microsoft/aci-helloworld" and mounts a new file share as read/write + // shared container volume. + + ContainerGroup containerGroup = azure.containerGroups().define(aciName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withLinux() + .withPrivateImageRegistry(azureRegistry.loginServerUrl(), acrCredentials.username(), acrCredentials.accessKeys().get(AccessKeyType.PRIMARY)) + .withoutVolume() + .defineContainerInstance(aciName) + .withImage(privateRepoUrl) + .withExternalTcpPort(80) + .attach() + .withDnsPrefix(aciName) + .create(); + + Utils.print(containerGroup); + + //============================================================= + // Check that the container instance is up and running + + // warm up + System.out.println("Warming up " + containerGroup.ipAddress()); + Utils.curl("http://" + containerGroup.ipAddress()); + SdkContext.sleep(15000); + System.out.println("CURLing " + containerGroup.ipAddress()); + System.out.println(Utils.curl("http://" + containerGroup.ipAddress())); + + //============================================================= + // Check the container instance logs + + String logContent = containerGroup.getLogContent(aciName); + System.out.format("Logs for container instance: %s%n%s", aciName, logContent); + + //============================================================= + // If service principal client id and secret are not set via the local variables, attempt to read the service + // principal client id and secret from a secondary ".azureauth" file set through an environment variable. + // + // If the environment variable was not set then reuse the main service principal set for running this sample. + + if (servicePrincipalClientId == null || servicePrincipalClientId.isEmpty() || servicePrincipalSecret == null || servicePrincipalSecret.isEmpty()) { + servicePrincipalClientId = System.getenv("AZURE_CLIENT_ID"); + servicePrincipalSecret = System.getenv("AZURE_CLIENT_SECRET"); + if (servicePrincipalClientId == null || servicePrincipalClientId.isEmpty() || servicePrincipalSecret == null || servicePrincipalSecret.isEmpty()) { + String envSecondaryServicePrincipal = System.getenv("AZURE_AUTH_LOCATION_2"); + + if (envSecondaryServicePrincipal == null || !envSecondaryServicePrincipal.isEmpty() || !Files.exists(Paths.get(envSecondaryServicePrincipal))) { + envSecondaryServicePrincipal = System.getenv("AZURE_AUTH_LOCATION"); + } + + servicePrincipalClientId = Utils.getSecondaryServicePrincipalClientID(envSecondaryServicePrincipal); + servicePrincipalSecret = Utils.getSecondaryServicePrincipalSecret(envSecondaryServicePrincipal); + } + } + + + //============================================================= + // Create an SSH private/public key pair to be used when creating the container service + + System.out.println("Creating an SSH private and public key pair"); + + SSHShell.SshPublicPrivateKey sshKeys = SSHShell.generateSSHKeys("", "ACS"); + System.out.println("SSH private key value: %n" + sshKeys.getSshPrivateKey()); + System.out.println("SSH public key value: %n" + sshKeys.getSshPublicKey()); + + + //============================================================= + // Create an Azure Container Service with Kubernetes orchestration + + System.out.println("Creating an Azure Container Service with Kubernetes ochestration and one agent (virtual machine)"); + + t1 = new Date(); + + KubernetesCluster azureKubernetesCluster = azure.kubernetesClusters().define(acsName) + .withRegion(region) + .withNewResourceGroup(rgName) + .withLatestVersion() + .withRootUsername(rootUserName) + .withSshKey(sshKeys.getSshPublicKey()) + .withServicePrincipalClientId(servicePrincipalClientId) + .withServicePrincipalSecret(servicePrincipalSecret) + .defineAgentPool("agentpool") + .withVirtualMachineSize(ContainerServiceVMSizeTypes.STANDARD_D1_V2) + .withAgentPoolVirtualMachineCount(1) +// .withDnsPrefix("dns-ap-" + acsName) + .attach() + .withDnsPrefix("dns-" + acsName) + .create(); + + t2 = new Date(); + System.out.println("Created Azure Container Service: (took " + ((t2.getTime() - t1.getTime()) / 1000) + " seconds) " + azureKubernetesCluster.id()); + Utils.print(azureKubernetesCluster); + + SdkContext.sleep(120000); + + + //============================================================= + // Download the Kubernetes config file from one of the master virtual machines + + azureKubernetesCluster = azure.kubernetesClusters().getByResourceGroup(rgName, acsName); + System.out.println("Found Kubernetes master at: " + azureKubernetesCluster.fqdn()); + + byte[] kubeConfigContent = azureKubernetesCluster.adminKubeConfigContent(); + System.out.println("Found Kubernetes config:%n" + Arrays.toString(kubeConfigContent)); + + + //============================================================= + // Instantiate the Kubernetes client using the downloaded ".kube/config" file content + // The Kubernetes client API requires setting an environment variable pointing at a real file; + // we will create a temporary file that will be deleted automatically when the sample exits + + File tempKubeConfigFile = File.createTempFile("kube", ".config", new File(System.getProperty("java.io.tmpdir"))); + tempKubeConfigFile.deleteOnExit(); + try (BufferedWriter buffOut = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempKubeConfigFile), StandardCharsets.UTF_8))) { + buffOut.write(new String(kubeConfigContent, StandardCharsets.UTF_8)); + } + + System.setProperty(Config.KUBERNETES_KUBECONFIG_FILE, tempKubeConfigFile.getPath()); + Config config = new Config(); + KubernetesClient kubernetesClient = new DefaultKubernetesClient(config); + + // Wait for 15 minutes for kube endpoint to be available + SdkContext.sleep(15 * 60 * 1000); + + + //============================================================= + // List all the nodes available in the Kubernetes cluster + + System.out.println(kubernetesClient.nodes().list()); + + + //============================================================= + // Create a namespace where all the sample Kubernetes resources will be created + + Namespace ns = new NamespaceBuilder() + .withNewMetadata() + .withName(acsNamespace) + .addToLabels("acr", "sample") + .endMetadata() + .build(); + try { + System.out.println("Created namespace" + kubernetesClient.namespaces().create(ns)); + } catch (Exception e) { + System.err.println(e.getMessage()); + } + + SdkContext.sleep(5000); + for (Namespace namespace : kubernetesClient.namespaces().list().getItems()) { + System.out.println("\tFound Kubernetes namespace: " + namespace.toString()); + } + + + //============================================================= + // Create a secret of type "docker-repository" that will be used for downloading the container image from + // our Azure private container repo + + String basicAuth = new String(Base64.encodeBase64((acrCredentials.username() + ":" + acrCredentials.accessKeys().get(AccessKeyType.PRIMARY)).getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8); + HashMap secretData = new HashMap<>(1); + String dockerCfg = String.format("{ \"%s\": { \"auth\": \"%s\", \"email\": \"%s\" } }", + azureRegistry.loginServerUrl(), + basicAuth, + "acrsample@azure.com"); + + dockerCfg = new String(Base64.encodeBase64(dockerCfg.getBytes("UTF-8")), "UTF-8"); + secretData.put(".dockercfg", dockerCfg); + SecretBuilder secretBuilder = new SecretBuilder() + .withNewMetadata() + .withName(acsSecretName) + .withNamespace(acsNamespace) + .endMetadata() + .withData(secretData) + .withType("kubernetes.io/dockercfg"); + + System.out.println("Creating new secret: " + kubernetesClient.secrets().inNamespace(acsNamespace).create(secretBuilder.build())); + + SdkContext.sleep(5000); + + for (Secret kubeS : kubernetesClient.secrets().inNamespace(acsNamespace).list().getItems()) { + System.out.println("\tFound secret: " + kubeS); + } + + + //============================================================= + // Create a replication controller for our image stored in the Azure Container Registry + + ReplicationController rc = new ReplicationControllerBuilder() + .withNewMetadata() + .withName("acrsample-rc") + .withNamespace(acsNamespace) + .addToLabels("acrsample-myimg", "myimg") + .endMetadata() + .withNewSpec() + .withReplicas(2) + .withNewTemplate() + .withNewMetadata() + .addToLabels("acrsample-myimg", "myimg") + .endMetadata() + .withNewSpec() + .addNewImagePullSecret(acsSecretName) + .addNewContainer() + .withName("acrsample-pod-myimg") + .withImage(privateRepoUrl) + .addNewPort() + .withContainerPort(80) + .endPort() + .endContainer() + .endSpec() + .endTemplate() + .endSpec() + .build(); + + System.out.println("Creating a replication controller: " + kubernetesClient.replicationControllers().inNamespace(acsNamespace).create(rc)); + SdkContext.sleep(5000); + + rc = kubernetesClient.replicationControllers().inNamespace(acsNamespace).withName("acrsample-rc").get(); + System.out.println("Found replication controller: " + rc.toString()); + + for (Pod pod : kubernetesClient.pods().inNamespace(acsNamespace).list().getItems()) { + System.out.println("\tFound Kubernetes pods: " + pod.toString()); + } + + + //============================================================= + // Create a Load Balancer service that will expose the service to the world + + Service lbService = new ServiceBuilder() + .withNewMetadata() + .withName(acsLbIngressName) + .withNamespace(acsNamespace) + .endMetadata() + .withNewSpec() + .withType("LoadBalancer") + .addNewPort() + .withPort(80) + .withProtocol("TCP") + .endPort() + .addToSelector("acrsample-myimg", "myimg") + .endSpec() + .build(); + + System.out.println("Creating a service: " + kubernetesClient.services().inNamespace(acsNamespace).create(lbService)); + + SdkContext.sleep(5000); + + System.out.println("\tFound service: " + kubernetesClient.services().inNamespace(acsNamespace).withName(acsLbIngressName).get()); + + + //============================================================= + // Wait until the external IP becomes available + + String serviceIP = null; + + int timeout = 30 * 60 * 1000; // 30 minutes + String matchIPV4 = "^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$"; + + while (timeout > 0) { + try { + List lbIngressList = kubernetesClient.services().inNamespace(acsNamespace).withName(acsLbIngressName).get().getStatus().getLoadBalancer().getIngress(); + if (lbIngressList != null && !lbIngressList.isEmpty() && lbIngressList.get(0) != null && lbIngressList.get(0).getIp().matches(matchIPV4)) { + serviceIP = lbIngressList.get(0).getIp(); + System.out.println("\tFound ingress IP: " + serviceIP); + timeout = 0; + } + } catch (Exception e) { + System.err.println(e.getMessage()); + } + + if (timeout > 0) { + timeout -= 30000; // 30 seconds + SdkContext.sleep(30000); + } + } + + //============================================================= + // Check that the service is up and running + + if (serviceIP != null) { + // warm up + System.out.println("Warming up " + serviceIP); + Utils.curl("http://" + serviceIP); + SdkContext.sleep(15000); + System.out.println("CURLing " + serviceIP); + System.out.println(Utils.curl("http://" + serviceIP)); + } else { + System.out.println("ERROR: service unavailable"); + } + + // Clean-up + kubernetesClient.namespaces().delete(ns); + + return true; + } catch (Exception f) { + System.out.println(f.getMessage()); + f.printStackTrace(); + } finally { + try { + System.out.println("Deleting Resource Group: " + rgName); + azure.resourceGroups().beginDeleteByName(rgName); + System.out.println("Deleted Resource Group: " + rgName); + } catch (NullPointerException npe) { + System.out.println("Did not create any resources in Azure. No clean up is necessary"); + } catch (Exception g) { + g.printStackTrace(); + } + } + return false; + } + + /** + * Main entry point. + * + * @param args the parameters + */ + public static void main(String[] args) { + try { + //============================================================= + // Authenticate + + final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); + final TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.environment().getActiveDirectoryEndpoint()) + .build(); + + Azure azure = Azure + .configure() + .withLogLevel(HttpLogDetailLevel.BASIC) + .authenticate(credential, profile) + .withDefaultSubscription(); + + // Print selected subscription + System.out.println("Selected subscription: " + azure.subscriptionId()); + + runSample(azure, "", ""); + } catch (Exception e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/package-info.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/package-info.java new file mode 100644 index 000000000000..dc6a19864d8b --- /dev/null +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/containerinstance/samples/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +/** + * This package contains the classes for Azure container instance samples. + */ +package com.azure.resourcemanager.containerinstance.samples; diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java index 72f764d9a5be..65faa64b6db2 100644 --- a/sdk/management/samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/kubernetescluster/samples/DeployImageFromContainerRegistryToKubernetes.java @@ -416,7 +416,7 @@ public static boolean runSample(Azure azure, String clientId, String secret) { System.out.println("\tFound ingress IP: " + lbIngressList.get(0).getIp()); timeout = 0; } - } catch (Exception ignored) { + } catch (Exception e) { } if (timeout > 0) { diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/samples/Utils.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/samples/Utils.java index 1a16b1f30dae..d055b6bbaf05 100644 --- a/sdk/management/samples/src/main/java/com/azure/resourcemanager/samples/Utils.java +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/samples/Utils.java @@ -24,6 +24,10 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.appplatform.models.ConfigServerState; +import com.azure.resourcemanager.appplatform.models.SpringApp; +import com.azure.resourcemanager.appplatform.models.SpringService; +import com.azure.resourcemanager.appplatform.models.TraceProxyState; import com.azure.resourcemanager.appservice.models.AppServiceCertificateOrder; import com.azure.resourcemanager.appservice.models.AppServiceDomain; import com.azure.resourcemanager.appservice.models.AppServicePlan; @@ -49,6 +53,12 @@ import com.azure.resourcemanager.compute.models.VirtualMachine; import com.azure.resourcemanager.compute.models.VirtualMachineCustomImage; import com.azure.resourcemanager.compute.models.VirtualMachineExtension; +import com.azure.resourcemanager.containerinstance.models.Container; +import com.azure.resourcemanager.containerinstance.models.ContainerGroup; +import com.azure.resourcemanager.containerinstance.models.ContainerPort; +import com.azure.resourcemanager.containerinstance.models.EnvironmentVariable; +import com.azure.resourcemanager.containerinstance.models.Volume; +import com.azure.resourcemanager.containerinstance.models.VolumeMount; import com.azure.resourcemanager.containerregistry.models.AccessKeyType; import com.azure.resourcemanager.containerregistry.models.Registry; import com.azure.resourcemanager.containerregistry.models.RegistryCredentials; @@ -72,6 +82,7 @@ import com.azure.resourcemanager.dns.models.TxtRecord; import com.azure.resourcemanager.dns.models.TxtRecordSet; import com.azure.resourcemanager.keyvault.models.AccessPolicy; +import com.azure.resourcemanager.keyvault.models.CertificatePermissions; import com.azure.resourcemanager.keyvault.models.KeyPermissions; import com.azure.resourcemanager.keyvault.models.SecretPermissions; import com.azure.resourcemanager.keyvault.models.Vault; @@ -93,6 +104,7 @@ import com.azure.resourcemanager.monitor.models.VoiceReceiver; import com.azure.resourcemanager.monitor.models.WebhookReceiver; import com.azure.resourcemanager.msi.models.Identity; +import com.azure.resourcemanager.network.fluent.inner.SecurityRuleInner; import com.azure.resourcemanager.network.models.ApplicationGateway; import com.azure.resourcemanager.network.models.ApplicationGatewayBackend; import com.azure.resourcemanager.network.models.ApplicationGatewayBackendAddress; @@ -136,7 +148,6 @@ import com.azure.resourcemanager.network.models.TopologyAssociation; import com.azure.resourcemanager.network.models.TopologyResource; import com.azure.resourcemanager.network.models.VerificationIPFlow; -import com.azure.resourcemanager.network.fluent.inner.SecurityRuleInner; import com.azure.resourcemanager.resources.fluentcore.arm.Region; import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.ResourceGroup; @@ -536,9 +547,18 @@ public static void print(Vault vault) { .append("\n\tVault URI: ").append(vault.vaultUri()) .append("\n\tAccess policies: "); for (AccessPolicy accessPolicy : vault.accessPolicies()) { - info.append("\n\t\tIdentity:").append(accessPolicy.objectId()) - .append("\n\t\tKey permissions: ").append(accessPolicy.permissions().keys().stream().map(KeyPermissions::toString).collect(Collectors.joining(", "))) - .append("\n\t\tSecret permissions: ").append(accessPolicy.permissions().secrets().stream().map(SecretPermissions::toString).collect(Collectors.joining(", "))); + info.append("\n\t\tIdentity:").append(accessPolicy.objectId()); + if (accessPolicy.permissions() != null) { + if (accessPolicy.permissions().keys() != null) { + info.append("\n\t\tKey permissions: ").append(accessPolicy.permissions().keys().stream().map(KeyPermissions::toString).collect(Collectors.joining(", "))); + } + if (accessPolicy.permissions().secrets() != null) { + info.append("\n\t\tSecret permissions: ").append(accessPolicy.permissions().secrets().stream().map(SecretPermissions::toString).collect(Collectors.joining(", "))); + } + if (accessPolicy.permissions().certificates() != null) { + info.append("\n\t\tCertificate permissions: ").append(accessPolicy.permissions().certificates().stream().map(CertificatePermissions::toString).collect(Collectors.joining(", "))); + } + } } System.out.println(info.toString()); } @@ -2541,83 +2561,83 @@ public static void print(NextHop resource) { .toString()); } -// /** -// * Print container group info. -// * -// * @param resource a container group -// */ -// public static void print(ContainerGroup resource) { -// StringBuilder info = new StringBuilder().append("Container Group: ").append(resource.id()) -// .append("Name: ").append(resource.name()) -// .append("\n\tResource group: ").append(resource.resourceGroupName()) -// .append("\n\tRegion: ").append(resource.region()) -// .append("\n\tTags: ").append(resource.tags()) -// .append("\n\tOS type: ").append(resource.osType()); -// -// if (resource.ipAddress() != null) { -// info.append("\n\tPublic IP address: ").append(resource.ipAddress()); -// } -// if (resource.externalTcpPorts() != null) { -// info.append("\n\tExternal TCP ports:"); -// for (int port : resource.externalTcpPorts()) { -// info.append(" ").append(port); -// } -// } -// if (resource.externalUdpPorts() != null) { -// info.append("\n\tExternal UDP ports:"); -// for (int port : resource.externalUdpPorts()) { -// info.append(" ").append(port); -// } -// } -// if (resource.imageRegistryServers() != null) { -// info.append("\n\tPrivate Docker image registries:"); -// for (String server : resource.imageRegistryServers()) { -// info.append(" ").append(server); -// } -// } -// if (resource.volumes() != null) { -// info.append("\n\tVolume mapping: "); -// for (Map.Entry entry : resource.volumes().entrySet()) { -// info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ") -// .append(entry.getValue().azureFile() != null ? entry.getValue().azureFile().shareName() : "empty direcory volume"); -// } -// } -// if (resource.containers() != null) { -// info.append("\n\tContainer instances: "); -// for (Map.Entry entry : resource.containers().entrySet()) { -// Container container = entry.getValue(); -// info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ").append(container.image()); -// info.append("\n\t\t\tResources: "); -// info.append(container.resources().requests().cpu()).append("CPUs "); -// info.append(container.resources().requests().memoryInGB()).append("GB"); -// info.append("\n\t\t\tPorts:"); -// for (ContainerPort port : container.ports()) { -// info.append(" ").append(port.port()); -// } -// if (container.volumeMounts() != null) { -// info.append("\n\t\t\tVolume mounts:"); -// for (VolumeMount volumeMount : container.volumeMounts()) { -// info.append(" ").append(volumeMount.name()).append("->").append(volumeMount.mountPath()); -// } -// } -// if (container.command() != null) { -// info.append("\n\t\t\tStart commands:"); -// for (String command : container.command()) { -// info.append("\n\t\t\t\t").append(command); -// } -// } -// if (container.environmentVariables() != null) { -// info.append("\n\t\t\tENV vars:"); -// for (EnvironmentVariable envVar : container.environmentVariables()) { -// info.append("\n\t\t\t\t").append(envVar.name()).append("=").append(envVar.value()); -// } -// } -// } -// } -// -// System.out.println(info.toString()); -// } -// + /** + * Print container group info. + * + * @param resource a container group + */ + public static void print(ContainerGroup resource) { + StringBuilder info = new StringBuilder().append("Container Group: ").append(resource.id()) + .append("Name: ").append(resource.name()) + .append("\n\tResource group: ").append(resource.resourceGroupName()) + .append("\n\tRegion: ").append(resource.region()) + .append("\n\tTags: ").append(resource.tags()) + .append("\n\tOS type: ").append(resource.osType()); + + if (resource.ipAddress() != null) { + info.append("\n\tPublic IP address: ").append(resource.ipAddress()); + } + if (resource.externalTcpPorts() != null) { + info.append("\n\tExternal TCP ports:"); + for (int port : resource.externalTcpPorts()) { + info.append(" ").append(port); + } + } + if (resource.externalUdpPorts() != null) { + info.append("\n\tExternal UDP ports:"); + for (int port : resource.externalUdpPorts()) { + info.append(" ").append(port); + } + } + if (resource.imageRegistryServers() != null) { + info.append("\n\tPrivate Docker image registries:"); + for (String server : resource.imageRegistryServers()) { + info.append(" ").append(server); + } + } + if (resource.volumes() != null) { + info.append("\n\tVolume mapping: "); + for (Map.Entry entry : resource.volumes().entrySet()) { + info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ") + .append(entry.getValue().azureFile() != null ? entry.getValue().azureFile().shareName() : "empty direcory volume"); + } + } + if (resource.containers() != null) { + info.append("\n\tContainer instances: "); + for (Map.Entry entry : resource.containers().entrySet()) { + Container container = entry.getValue(); + info.append("\n\t\tName: ").append(entry.getKey()).append(" -> ").append(container.image()); + info.append("\n\t\t\tResources: "); + info.append(container.resources().requests().cpu()).append("CPUs "); + info.append(container.resources().requests().memoryInGB()).append("GB"); + info.append("\n\t\t\tPorts:"); + for (ContainerPort port : container.ports()) { + info.append(" ").append(port.port()); + } + if (container.volumeMounts() != null) { + info.append("\n\t\t\tVolume mounts:"); + for (VolumeMount volumeMount : container.volumeMounts()) { + info.append(" ").append(volumeMount.name()).append("->").append(volumeMount.mountPath()); + } + } + if (container.command() != null) { + info.append("\n\t\t\tStart commands:"); + for (String command : container.command()) { + info.append("\n\t\t\t\t").append(command); + } + } + if (container.environmentVariables() != null) { + info.append("\n\t\t\tENV vars:"); + for (EnvironmentVariable envVar : container.environmentVariables()) { + info.append("\n\t\t\t\t").append(envVar.name()).append("=").append(envVar.value()); + } + } + } + } + + System.out.println(info.toString()); + } + // /** // * Print event hub namespace. // * @@ -2969,6 +2989,80 @@ public static void print(MetricAlert metricAlert) { System.out.println(info.toString()); } + /** + * Print spring service settings. + * + * @param springService spring service instance + */ + public static void print(SpringService springService) { + StringBuilder info = new StringBuilder("Spring Service: ") + .append("\n\tId: ").append(springService.id()) + .append("\n\tName: ").append(springService.name()) + .append("\n\tResource Group: ").append(springService.resourceGroupName()) + .append("\n\tRegion: ").append(springService.region()) + .append("\n\tTags: ").append(springService.tags()); + + if (springService.serverProperties() != null && springService.serverProperties().state() == ConfigServerState.SUCCEEDED && springService.serverProperties().configServer() != null) { + info.append("\n\tProperties: "); + if (springService.serverProperties().configServer().gitProperty() != null) { + info.append("\n\t\tGit: ").append(springService.serverProperties().configServer().gitProperty().uri()); + } + } + + if (springService.sku() != null) { + info.append("\n\tSku: ") + .append("\n\t\tName: ").append(springService.sku().name()) + .append("\n\t\tTier: ").append(springService.sku().tier()) + .append("\n\t\tCapacity: ").append(springService.sku().capacity()); + } + + if (springService.traceProperties() != null && springService.traceProperties().state() == TraceProxyState.SUCCEEDED) { + info.append("\n\tTrace: ") + .append("\n\t\tEnabled: ").append(springService.traceProperties().enabled()) + .append("\n\t\tApp Insight Instrumentation Key: ").append(springService.traceProperties().appInsightInstrumentationKey()); + } + + System.out.println(info.toString()); + } + + /** + * Print spring app settings. + * + * @param springApp spring app instance + */ + public static void print(SpringApp springApp) { + StringBuilder info = new StringBuilder("Spring Service: ") + .append("\n\tId: ").append(springApp.id()) + .append("\n\tName: ").append(springApp.name()) + .append("\n\tCreated Time: ").append(springApp.createdTime()) + .append("\n\tPublic Endpoint: ").append(springApp.isPublic()) + .append("\n\tUrl: ").append(springApp.url()) + .append("\n\tHttps Only: ").append(springApp.isHttpsOnly()) + .append("\n\tFully Qualified Domain Name: ").append(springApp.fqdn()) + .append("\n\tActive Deployment Name: ").append(springApp.activeDeployment()); + + if (springApp.temporaryDisk() != null) { + info.append("\n\tTemporary Disk:") + .append("\n\t\tSize In GB: ").append(springApp.temporaryDisk().sizeInGB()) + .append("\n\t\tMount Path: ").append(springApp.temporaryDisk().mountPath()); + } + + if (springApp.persistentDisk() != null) { + info.append("\n\tPersistent Disk:") + .append("\n\t\tSize In GB: ").append(springApp.persistentDisk().sizeInGB()) + .append("\n\t\tMount Path: ").append(springApp.persistentDisk().mountPath()); + } + + if (springApp.identity() != null) { + info.append("\n\tIdentity:") + .append("\n\t\tType: ").append(springApp.identity().type()) + .append("\n\t\tPrincipal Id: ").append(springApp.identity().principalId()) + .append("\n\t\tTenant Id: ").append(springApp.identity().tenantId()); + } + + System.out.println(info.toString()); + } + public static Response curl(String urlString) { try { return stringResponse(httpClient.getString(getHost(urlString), getPathAndQuery(urlString))).block(); diff --git a/sdk/management/samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java b/sdk/management/samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java new file mode 100644 index 000000000000..c9e6e594062c --- /dev/null +++ b/sdk/management/samples/src/test/java/com/azure/resourcemanager/samples/AppPlatformLiveOnlyTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.resourcemanager.samples; + + +import com.azure.resourcemanager.appplatform.samples.ManageSpringCloud; +import com.azure.resourcemanager.resources.core.TestBase; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class AppPlatformLiveOnlyTests extends SamplesTestBase { + public AppPlatformLiveOnlyTests() { + super(TestBase.RunCondition.LIVE_ONLY); + } + + @Test + public void testSpringCloud() { + Assertions.assertTrue(ManageSpringCloud.runSample(azure, clientIdFromFile())); + } +} diff --git a/sdk/management/samples/src/test/java/com/azure/resourcemanager/samples/ContainerInstanceTests.java b/sdk/management/samples/src/test/java/com/azure/resourcemanager/samples/ContainerInstanceTests.java new file mode 100644 index 000000000000..d96f09f4beef --- /dev/null +++ b/sdk/management/samples/src/test/java/com/azure/resourcemanager/samples/ContainerInstanceTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.samples; + +import com.azure.resourcemanager.containerinstance.samples.ManageContainerInstanceWithAzureFileShareMount; +import com.azure.resourcemanager.containerinstance.samples.ManageContainerInstanceWithManualAzureFileShareMountCreation; +import com.azure.resourcemanager.containerinstance.samples.ManageContainerInstanceWithMultipleContainerImages; +import com.azure.resourcemanager.containerinstance.samples.ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class ContainerInstanceTests extends SamplesTestBase { + + @Test + public void testManageContainerInstanceWithAzureFileShareMount() { + // Skip test in "playback" mode due to HTTP calls made outside of the management plane which can not be recorded at this time + if (!isPlaybackMode()) { + Assertions.assertTrue(ManageContainerInstanceWithAzureFileShareMount.runSample(azure)); + } + } + + @Test + public void testManageContainerInstanceWithManualAzureFileShareMountCreation() { + // Skip test in "playback" mode due to HTTP calls made outside of the management plane which can not be recorded at this time + if (!isPlaybackMode()) { + Assertions.assertTrue(ManageContainerInstanceWithManualAzureFileShareMountCreation.runSample(azure)); + } + } + + @Test + public void testManageContainerInstanceWithMultipleContainerImages() { + // Skip test in "playback" mode due to HTTP calls made outside of the management plane which can not be recorded at this time + if (!isPlaybackMode()) { + Assertions.assertTrue(ManageContainerInstanceWithMultipleContainerImages.runSample(azure)); + } + } + + @Test + public void testManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator() { + // Skip test in "playback" mode due to HTTP calls made outside of the management plane which can not be recorded at this time + if (!isPlaybackMode()) { + Assertions.assertTrue(ManageContainerInstanceZeroToOneAndOneToManyUsingContainerServiceOrchestrator.runSample(azure, "", "")); + } + } + +} diff --git a/sdk/management/samples/src/test/resources/session-records/testManageContainerInstanceWithMultipleContainerImages.json b/sdk/management/samples/src/test/resources/session-records/testManageContainerInstanceWithMultipleContainerImages.json index c36323fbcab0..71a4e8de443d 100644 --- a/sdk/management/samples/src/test/resources/session-records/testManageContainerInstanceWithMultipleContainerImages.json +++ b/sdk/management/samples/src/test/resources/session-records/testManageContainerInstanceWithMultipleContainerImages.json @@ -1,234 +1,212 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgacidd5064977?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci9ef40856d?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 03:31:23 GMT", + "date" : "Tue, 21 Jul 2020 05:32:52 GMT", "content-length" : "309", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-writes" : "1199", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "80624354-f7e6-439a-a15a-4cc937e0c155", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "dac47b1a-e5d9-4ddf-95f1-ac663730c192", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033123Z:dac47b1a-e5d9-4ddf-95f1-ac663730c192", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053253Z:80624354-f7e6-439a-a15a-4cc937e0c155", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "dac47b1a-e5d9-4ddf-95f1-ac663730c192", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977\",\"name\":\"rgacidd5064977\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2019-10-17T03:31:18.971Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + "x-ms-request-id" : "80624354-f7e6-439a-a15a-4cc937e0c155", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d\",\"name\":\"rgaci9ef40856d\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"westus\",\"tags\":{\"date\":\"2020-07-21T05:32:51.114Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 03:31:29 GMT", - "content-length" : "979", + "date" : "Tue, 21 Jul 2020 05:33:06 GMT", + "content-length" : "1018", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "999", + "x-ms-correlation-request-id" : "5f4a671c-938a-4172-b20a-805b9acc81eb", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "4ed7fa99-089e-4a64-83aa-526dfd3204e2", - "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "299", - "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "99", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "299", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033129Z:4ed7fa99-089e-4a64-83aa-526dfd3204e2", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053306Z:5f4a671c-938a-4172-b20a-805b9acc81eb", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "westus:1c85d946-6598-4a3d-8b38-0cd4db6a4d9b", - "Body" : "{\"properties\":{\"provisioningState\":\"Pending\",\"containers\":[{\"name\":\"acisample6d3573832-1\",\"properties\":{\"image\":\"microsoft/aci-helloworld\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[],\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}},{\"name\":\"acisample6d3573832-2\",\"properties\":{\"image\":\"microsoft/aci-tutorial-sidecar\",\"ports\":[],\"environmentVariables\":[],\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"13.83.66.65\",\"type\":\"Public\",\"dnsNameLabel\":\"acisample6d3573832\",\"fqdn\":\"acisample6d3573832.westus.azurecontainer.io\"},\"osType\":\"Linux\",\"instanceView\":{\"events\":[],\"state\":\"Pending\"}},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832\",\"name\":\"acisample6d3573832\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"westus\",\"tags\":{}}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1c85d946-6598-4a3d-8b38-0cd4db6a4d9b?api-version=2018-06-01" + "x-ms-request-id" : "westus:95afcedf-c490-4983-b75b-3430f65b60b4", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Pending\",\"containers\":[{\"name\":\"acisamplec67769480-1\",\"properties\":{\"image\":\"microsoft/aci-helloworld\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[],\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}},{\"name\":\"acisamplec67769480-2\",\"properties\":{\"image\":\"microsoft/aci-tutorial-sidecar\",\"ports\":[],\"environmentVariables\":[],\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.155.41.216\",\"type\":\"Public\",\"dnsNameLabel\":\"acisamplec67769480\",\"fqdn\":\"acisamplec67769480.westus.azurecontainer.io\"},\"osType\":\"Linux\",\"instanceView\":{\"events\":[],\"state\":\"Pending\"}},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480\",\"name\":\"acisamplec67769480\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"westus\",\"tags\":{}}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/95afcedf-c490-4983-b75b-3430f65b60b4?api-version=2018-06-01" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1c85d946-6598-4a3d-8b38-0cd4db6a4d9b?api-version=2018-06-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/95afcedf-c490-4983-b75b-3430f65b60b4?api-version=2018-06-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Thu, 17 Oct 2019 03:31:30 GMT", - "content-length" : "252", - "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11830", - "StatusCode" : "200", - "pragma" : "no-cache", - "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "51f19a8b-0a78-4dc4-850b-71da40340d6c", - "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033130Z:51f19a8b-0a78-4dc4-850b-71da40340d6c", - "content-type" : "application/json; charset=utf-8", - "cache-control" : "no-cache", - "x-ms-request-id" : "westus:319212fd-d89f-4ebd-9a87-0bde6ba32e62", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832\",\"status\":\"Pending\",\"startTime\":\"2019-10-17T03:31:28.9860022Z\",\"properties\":{\"events\":[]}}" - } - }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1c85d946-6598-4a3d-8b38-0cd4db6a4d9b?api-version=2018-06-01", - "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)" - }, - "Response" : { - "date" : "Thu, 17 Oct 2019 03:32:00 GMT", + "date" : "Tue, 21 Jul 2020 05:33:38 GMT", "content-length" : "1619", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11829", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "67318ac2-7bbf-49a9-bad6-b92f4190f7af", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "0c8067e8-d5e7-4ed8-a58d-71ae716d6079", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033201Z:0c8067e8-d5e7-4ed8-a58d-71ae716d6079", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053338Z:67318ac2-7bbf-49a9-bad6-b92f4190f7af", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "westus:8a260bcc-f1dc-4d64-ba8b-7e75d8e9f7c9", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832\",\"status\":\"Succeeded\",\"startTime\":\"2019-10-17T03:31:28.9860022Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:38Z\",\"lastTimestamp\":\"2019-10-17T03:31:38Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:46Z\",\"lastTimestamp\":\"2019-10-17T03:31:46Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]}}" + "x-ms-request-id" : "westus:01fbd4f4-4bd3-47f6-808f-94f30596dc8d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480\",\"status\":\"Succeeded\",\"startTime\":\"2020-07-21T05:33:05.4449464Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:10Z\",\"lastTimestamp\":\"2020-07-21T05:33:10Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:14Z\",\"lastTimestamp\":\"2020-07-21T05:33:14Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:19Z\",\"lastTimestamp\":\"2020-07-21T05:33:19Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:20Z\",\"lastTimestamp\":\"2020-07-21T05:33:20Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:20Z\",\"lastTimestamp\":\"2020-07-21T05:33:20Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (1.8.0_231; Windows 10 10.0)" }, "Response" : { - "date" : "Thu, 17 Oct 2019 03:32:00 GMT", - "content-length" : "2613", + "date" : "Tue, 21 Jul 2020 05:33:39 GMT", + "content-length" : "2652", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11828", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "532da50d-8cd4-4c1c-9084-908b223aad46", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "d6b2845e-fda2-4dbd-9127-3cb856efc020", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033201Z:d6b2845e-fda2-4dbd-9127-3cb856efc020", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053340Z:532da50d-8cd4-4c1c-9084-908b223aad46", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "westus:01f7cf33-6834-4522-8b70-83039d128274", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"acisample6d3573832-1\",\"properties\":{\"image\":\"microsoft/aci-helloworld\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-17T03:31:48Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:38Z\",\"lastTimestamp\":\"2019-10-17T03:31:38Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:46Z\",\"lastTimestamp\":\"2019-10-17T03:31:46Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}},{\"name\":\"acisample6d3573832-2\",\"properties\":{\"image\":\"microsoft/aci-tutorial-sidecar\",\"ports\":[],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-17T03:31:52Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"13.83.66.65\",\"type\":\"Public\",\"dnsNameLabel\":\"acisample6d3573832\",\"fqdn\":\"acisample6d3573832.westus.azurecontainer.io\"},\"osType\":\"Linux\",\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832\",\"name\":\"acisample6d3573832\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"westus\",\"tags\":{}}" + "x-ms-request-id" : "westus:8c039c0f-9758-4217-b240-25d0bd691ca8", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"acisamplec67769480-1\",\"properties\":{\"image\":\"microsoft/aci-helloworld\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:33:16Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:10Z\",\"lastTimestamp\":\"2020-07-21T05:33:10Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:14Z\",\"lastTimestamp\":\"2020-07-21T05:33:14Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}},{\"name\":\"acisamplec67769480-2\",\"properties\":{\"image\":\"microsoft/aci-tutorial-sidecar\",\"ports\":[],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:33:20Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:19Z\",\"lastTimestamp\":\"2020-07-21T05:33:19Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:20Z\",\"lastTimestamp\":\"2020-07-21T05:33:20Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:20Z\",\"lastTimestamp\":\"2020-07-21T05:33:20Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.155.41.216\",\"type\":\"Public\",\"dnsNameLabel\":\"acisamplec67769480\",\"fqdn\":\"acisamplec67769480.westus.azurecontainer.io\"},\"osType\":\"Linux\",\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480\",\"name\":\"acisamplec67769480\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"westus\",\"tags\":{}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832/containers/acisample6d3573832-1/logs?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480/containers/acisamplec67769480-1/logs?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 03:32:19 GMT", - "content-length" : "1369", + "date" : "Tue, 21 Jul 2020 05:33:57 GMT", + "content-length" : "1433", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11827", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "bb06a56a-6ff6-4d24-881c-f39c27b84be8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "fc6c5427-e32a-4037-8ae5-b5b7023f8e3f", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033219Z:fc6c5427-e32a-4037-8ae5-b5b7023f8e3f", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053358Z:bb06a56a-6ff6-4d24-881c-f39c27b84be8", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "westus:da74e91d-f21a-4236-8315-973541058770", - "Body" : "{\"content\":\"listening on port 80\\n::1 - - [17/Oct/2019:03:31:52 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [17/Oct/2019:03:31:55 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [17/Oct/2019:03:31:58 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [17/Oct/2019:03:32:01 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::ffff:10.240.255.55 - - [17/Oct/2019:03:32:01 +0000] \\\"GET / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"okhttp/3.12.0\\\"\\n::1 - - [17/Oct/2019:03:32:04 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [17/Oct/2019:03:32:07 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [17/Oct/2019:03:32:10 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [17/Oct/2019:03:32:13 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [17/Oct/2019:03:32:16 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::ffff:10.240.255.56 - - [17/Oct/2019:03:32:16 +0000] \\\"GET / HTTP/1.1\\\" 200 1663 \\\"http://www.bing.com/search?q=amazon\\\" \\\"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.2)\\\"\\n::ffff:10.240.255.56 - - [17/Oct/2019:03:32:18 +0000] \\\"GET / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"okhttp/3.12.0\\\"\\n\"}" + "x-ms-request-id" : "westus:13067716-474f-4b14-8cd6-8bbbe8a177a6", + "Body" : "{\"content\":\"listening on port 80\\n::1 - - [21/Jul/2020:05:33:20 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:23 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:26 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:29 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:32 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:35 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:38 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::ffff:10.240.255.55 - - [21/Jul/2020:05:33:40 +0000] \\\"GET / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"ReactorNetty/0.9.7.RELEASE\\\"\\n::1 - - [21/Jul/2020:05:33:41 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:44 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:47 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:50 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:53 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::1 - - [21/Jul/2020:05:33:56 +0000] \\\"HEAD / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"curl/7.54.0\\\"\\n::ffff:10.240.255.55 - - [21/Jul/2020:05:33:56 +0000] \\\"GET / HTTP/1.1\\\" 200 1663 \\\"-\\\" \\\"ReactorNetty/0.9.7.RELEASE\\\"\\n\"}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832/containers/acisample6d3573832-2/logs?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480/containers/acisamplec67769480-2/logs?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 03:32:19 GMT", - "content-length" : "6665", + "date" : "Tue, 21 Jul 2020 05:33:58 GMT", + "content-length" : "9621", "expires" : "-1", - "transfer-encoding" : "chunked", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11826", + "x-ms-ratelimit-remaining-subscription-reads" : "11992", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "87f6097d-836b-49fe-9b29-6c899d7b4603", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "00805231-e835-4cbe-af06-4b2ea5aae176", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033219Z:00805231-e835-4cbe-af06-4b2ea5aae176", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053359Z:87f6097d-836b-49fe-9b29-6c899d7b4603", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "westus:310d35ce-590e-4b47-a4c5-08e679c698f3", - "Body" : "{\"content\":\"\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:31:52\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:31:52 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:31:55\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:31:55 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:31:58\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:31:58 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:32:01\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:32:01 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:32:04\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:32:04 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:32:07\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:32:07 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:32:10\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:32:10 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:32:13\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:32:13 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2019-10-17 03:32:16\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Thu, 17 Oct 2019 03:32:16 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\"}" + "x-ms-request-id" : "westus:07450346-131d-44eb-b91d-735ceda4a861", + "Body" : "{\"content\":\"\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:20\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:20 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:23\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:23 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:26\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:26 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:29\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:29 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:32\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:32 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:35\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:35 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:38\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:38 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:41\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:41 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:44\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:44 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:47\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:47 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:50\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:50 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:53\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:53 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\n\\u001b[H\\u001b[JEvery 3s: curl -I http://localhost 2020-07-21 05:33:56\\n\\n % Total % Received % Xferd Average Speed Time Time Time Current\\n Dload Upload Total Spent Left Speed\\nHTTP/1.1 200 OK\\r\\n\\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\r 0 1663 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\\nX-Powered-By: Express\\r\\nAccept-Ranges: bytes\\r\\nCache-Control: public, max-age=0\\r\\nLast-Modified: Wed, 29 Nov 2017 06:40:40 GMT\\r\\nETag: W/\\\"67f-16006818640\\\"\\r\\nContent-Type: text/html; charset=UTF-8\\r\\nContent-Length: 1663\\r\\nDate: Tue, 21 Jul 2020 05:33:56 GMT\\r\\nConnection: keep-alive\\r\\n\\r\\n\"}" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832?api-version=2018-10-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480?api-version=2019-12-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ContainerInstanceManagementClient, 2018-10-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerinstance/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 03:32:22 GMT", - "content-length" : "2613", + "date" : "Tue, 21 Jul 2020 05:34:02 GMT", + "content-length" : "2652", "expires" : "-1", - "transfer-encoding" : "chunked", "x-ms-ratelimit-remaining-subscription-deletes" : "14999", - "vary" : "Accept-Encoding,Accept-Encoding", + "vary" : "Accept-Encoding", "retry-after" : "0", "StatusCode" : "200", "pragma" : "no-cache", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "999", + "x-ms-correlation-request-id" : "4de8a001-3e83-4dfb-b785-742833162a53", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "19d70f1c-3015-4fb0-856a-34cdf4afc1ce", - "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "298", - "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "98", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "299", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033222Z:19d70f1c-3015-4fb0-856a-34cdf4afc1ce", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053403Z:4de8a001-3e83-4dfb-b785-742833162a53", + "connection" : "keep-alive", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "westus:39b7b4bc-d42d-4f56-b556-3a3132467de3", - "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"acisample6d3573832-1\",\"properties\":{\"image\":\"microsoft/aci-helloworld\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-17T03:31:48Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:38Z\",\"lastTimestamp\":\"2019-10-17T03:31:38Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:46Z\",\"lastTimestamp\":\"2019-10-17T03:31:46Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}},{\"name\":\"acisample6d3573832-2\",\"properties\":{\"image\":\"microsoft/aci-tutorial-sidecar\",\"ports\":[],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-10-17T03:31:52Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:48Z\",\"lastTimestamp\":\"2019-10-17T03:31:48Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-10-17T03:31:52Z\",\"lastTimestamp\":\"2019-10-17T03:31:52Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}}],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"13.83.66.65\",\"type\":\"Public\",\"dnsNameLabel\":\"acisample6d3573832\",\"fqdn\":\"acisample6d3573832.westus.azurecontainer.io\"},\"osType\":\"Linux\",\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgacidd5064977/providers/Microsoft.ContainerInstance/containerGroups/acisample6d3573832\",\"name\":\"acisample6d3573832\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"westus\",\"tags\":{}}" + "x-ms-request-id" : "westus:c4c097f2-73e4-4902-9452-f8675a8e0d04", + "Body" : "{\"properties\":{\"sku\":\"Standard\",\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"acisamplec67769480-1\",\"properties\":{\"image\":\"microsoft/aci-helloworld\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:33:16Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:10Z\",\"lastTimestamp\":\"2020-07-21T05:33:10Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:14Z\",\"lastTimestamp\":\"2020-07-21T05:33:14Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-helloworld\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}},{\"name\":\"acisamplec67769480-2\",\"properties\":{\"image\":\"microsoft/aci-tutorial-sidecar\",\"ports\":[],\"environmentVariables\":[],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2020-07-21T05:33:20Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:16Z\",\"lastTimestamp\":\"2020-07-21T05:33:16Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:19Z\",\"lastTimestamp\":\"2020-07-21T05:33:19Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"microsoft/aci-tutorial-sidecar\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:20Z\",\"lastTimestamp\":\"2020-07-21T05:33:20Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2020-07-21T05:33:20Z\",\"lastTimestamp\":\"2020-07-21T05:33:20Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":0.8,\"cpu\":0.5}}}}],\"initContainers\":[],\"restartPolicy\":\"Never\",\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.155.41.216\",\"type\":\"Public\",\"dnsNameLabel\":\"acisamplec67769480\",\"fqdn\":\"acisamplec67769480.westus.azurecontainer.io\"},\"osType\":\"Linux\",\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci9ef40856d/providers/Microsoft.ContainerInstance/containerGroups/acisamplec67769480\",\"name\":\"acisamplec67769480\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"westus\",\"tags\":{}}" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgacidd5064977?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci9ef40856d?api-version=2019-08-01", "Headers" : { - "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:d3fc60ad002f4c863d99d3beb851e8edf973a5248d395e580e9f144e262d969c Java:1.8.0_221 (ResourceManagementClient, 2019-08-01)", - "Content-Type" : "application/json; charset=utf-8" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (1.8.0_231; Windows 10 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Thu, 17 Oct 2019 03:32:26 GMT", + "date" : "Tue, 21 Jul 2020 05:34:06 GMT", "content-length" : "0", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", "retry-after" : "0", "StatusCode" : "202", "pragma" : "no-cache", + "x-ms-correlation-request-id" : "7eed4ce1-d3d8-425d-bf59-d75db45c9136", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-correlation-request-id" : "3bb2c145-7044-43c5-89c6-2df533e5af79", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20191017T033226Z:3bb2c145-7044-43c5-89c6-2df533e5af79", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0FDSURENTA2NDk3Ny1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2019-08-01", + "x-ms-routing-request-id" : "KOREASOUTH:20200721T053407Z:7eed4ce1-d3d8-425d-bf59-d75db45c9136", + "connection" : "keep-alive", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0FDSTlFRjQwODU2RC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2019-08-01", "cache-control" : "no-cache", - "x-ms-request-id" : "3bb2c145-7044-43c5-89c6-2df533e5af79", + "x-ms-request-id" : "7eed4ce1-d3d8-425d-bf59-d75db45c9136", "Body" : "" } } ], - "variables" : [ "rgacidd5064977", "acisample6d3573832", "9be8ed47-4867-4422-a23d-f8c752992b55", "e916e0cc-94e0-46d0-b2f9-b42a30eaf425" ] + "variables" : [ "rgaci9ef40856d", "acisamplec67769480" ] } \ No newline at end of file diff --git a/sdk/network/mgmt/src/main/java/com/azure/resourcemanager/network/implementation/SubnetImpl.java b/sdk/network/mgmt/src/main/java/com/azure/resourcemanager/network/implementation/SubnetImpl.java index a2e2569d54b7..f9fc7e9050a8 100644 --- a/sdk/network/mgmt/src/main/java/com/azure/resourcemanager/network/implementation/SubnetImpl.java +++ b/sdk/network/mgmt/src/main/java/com/azure/resourcemanager/network/implementation/SubnetImpl.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.resourcemanager.network.implementation; +import com.azure.resourcemanager.network.models.Delegation; import com.azure.resourcemanager.network.models.Network; import com.azure.resourcemanager.network.models.NetworkInterface; import com.azure.resourcemanager.network.models.NetworkSecurityGroup; @@ -270,4 +271,27 @@ public Set listAvailablePrivateIPAddresses() { ipAddresses.addAll(result.availableIpAddresses()); return ipAddresses; } + + @Override + public SubnetImpl withDelegation(String serviceName) { + if (inner().delegations() == null) { + inner().withDelegations(new ArrayList<>()); + } + inner().delegations().add(new Delegation().withName(serviceName).withServiceName(serviceName)); + return this; + } + + @Override + public SubnetImpl withoutDelegation(String serviceName) { + if (inner().delegations() != null) { + for (int i = 0; i < inner().delegations().size();) { + if (serviceName.equalsIgnoreCase(inner().delegations().get(i).serviceName())) { + inner().delegations().remove(i); + } else { + ++i; + } + } + } + return this; + } } diff --git a/sdk/network/mgmt/src/main/java/com/azure/resourcemanager/network/models/Subnet.java b/sdk/network/mgmt/src/main/java/com/azure/resourcemanager/network/models/Subnet.java index 0654b8807c2f..5048b3ece3eb 100644 --- a/sdk/network/mgmt/src/main/java/com/azure/resourcemanager/network/models/Subnet.java +++ b/sdk/network/mgmt/src/main/java/com/azure/resourcemanager/network/models/Subnet.java @@ -136,6 +136,22 @@ interface WithRouteTable { WithAttach withExistingRouteTable(String resourceId); } + /** + * The stage of the subnet definition allowing to specify the subnet delegation. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithDelegation { + + /** + * Specifies a subnet delegation. + * + * @param serviceName the service name for the delegation + * @return the next stage of the definition + */ + WithAttach withDelegation(String serviceName); + } + /** * The stage of a subnet definition allowing to enable access from a service endpoint to the subnet. * @@ -163,6 +179,7 @@ interface WithAttach extends Attachable.InDefinition, WithNetworkSecurityGroup, WithRouteTable, + WithDelegation, WithServiceEndpoint { } } @@ -246,6 +263,28 @@ interface WithRouteTable { Update withoutRouteTable(); } + /** + * The stage of the subnet definition allowing to specify the subnet delegation. + */ + interface WithDelegation { + + /** + * Specifies a subnet delegation. + * + * @param serviceName the service name for the delegation + * @return the next stage of the definition + */ + Update withDelegation(String serviceName); + + /** + * Removes a subnet delegation. + * + * @param serviceName the service name for the delegation + * @return the next stage of the definition + */ + Update withoutDelegation(String serviceName); + } + /** * The stage of a subnet definition allowing to enable or disable access from a service endpoint to the subnet. */ @@ -273,6 +312,7 @@ interface Update extends UpdateStages.WithAddressPrefix, UpdateStages.WithNetworkSecurityGroup, UpdateStages.WithRouteTable, + UpdateStages.WithDelegation, UpdateStages.WithServiceEndpoint, Settable { } @@ -348,6 +388,22 @@ interface WithRouteTable { WithAttach withExistingRouteTable(String resourceId); } + /** + * The stage of the subnet definition allowing to specify the subnet delegation. + * + * @param the stage of the parent definition to return to after attaching this definition + */ + interface WithDelegation { + + /** + * Specifies a subnet delegation. + * + * @param serviceName the service name for the delegation + * @return the next stage of the definition + */ + WithAttach withDelegation(String serviceName); + } + /** * The stage of a subnet definition allowing to enable access from a service endpoint to the subnet. * @@ -375,6 +431,7 @@ interface WithAttach extends Attachable.InUpdate, WithNetworkSecurityGroup, WithRouteTable, + WithDelegation, WithServiceEndpoint { } } diff --git a/sdk/parents/azure-client-sdk-parent/README.md b/sdk/parents/azure-client-sdk-parent/README.md new file mode 100644 index 000000000000..b7adbdce9468 --- /dev/null +++ b/sdk/parents/azure-client-sdk-parent/README.md @@ -0,0 +1 @@ +# Microsoft Azure SDK for Java - Client Libraries \ No newline at end of file diff --git a/sdk/parents/azure-client-sdk-parent/pom.xml b/sdk/parents/azure-client-sdk-parent/pom.xml index 8276bdfb8eb7..20135c07ff11 100644 --- a/sdk/parents/azure-client-sdk-parent/pom.xml +++ b/sdk/parents/azure-client-sdk-parent/pom.xml @@ -388,6 +388,29 @@ org.codehaus.mojo build-helper-maven-plugin 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ${basedir}/README.md + md + readme + + + ${basedir}/CHANGELOG.md + md + changelog + + + + + @@ -473,7 +496,7 @@ *:*:*:*:compile *:*:*:*:provided - + com.azure:* @@ -687,7 +710,6 @@ true - com.github.spotbugs spotbugs-maven-plugin @@ -731,17 +753,7 @@ org.apache.maven.plugins maven-surefire-plugin 3.0.0-M3 - - - com.azure - azure-test-watcher - 1.0.0-beta.1 - - - - ../../../common/azure-test-watcher/target/azure-test-watcher-1.0.0-beta.1.jar - alphabetical false @@ -1253,76 +1265,6 @@ - - changelog - - - ${basedir}/CHANGELOG.md - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - copy-changelog - package - - - Copying ${project.basedir}/CHANGELOG.md to - ${packageOutputDirectory}/${project.build.finalName}-changelog.md - - - - - - run - - - - - - - - - - readme - - - ${basedir}/README.md - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - copy-readme - package - - - Copying ${project.basedir}/README.md to - ${packageOutputDirectory}/${project.build.finalName}-readme.md - - - - - - run - - - - - - - - readme-codesnippet-windows diff --git a/sdk/resourcemanager/ci.yml b/sdk/resourcemanager/ci.yml new file mode 100644 index 000000000000..dc60fdcf45f4 --- /dev/null +++ b/sdk/resourcemanager/ci.yml @@ -0,0 +1,32 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - master + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/ + +pr: + branches: + include: + - master + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: resourcemanager + # Artifacts: + # - name: azure-identity + # groupId: com.azure + # safeName: azureidentity diff --git a/sdk/resourcemanager/pom.xml b/sdk/resourcemanager/pom.xml new file mode 100644 index 000000000000..a0464c1ce31f --- /dev/null +++ b/sdk/resourcemanager/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + com.azure + azure-resourcemanager-service + pom + 1.0.0 + + + + diff --git a/sdk/resources/mgmt/pom.xml b/sdk/resources/mgmt/pom.xml index 0894610293ef..030fcf07163a 100644 --- a/sdk/resources/mgmt/pom.xml +++ b/sdk/resources/mgmt/pom.xml @@ -47,10 +47,6 @@ - - com.azure - azure-core - com.azure azure-core-management @@ -92,6 +88,13 @@ + + + src/main/resources + true + + + org.apache.maven.plugins diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/AzureServiceClient.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/AzureServiceClient.java index 9ec1a0f8ac03..78a2115bcc47 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/AzureServiceClient.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/AzureServiceClient.java @@ -37,6 +37,7 @@ import java.time.format.DateTimeFormatter; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalQueries; +import java.util.Map; /** * ServiceClient is the abstraction for accessing REST operations and their payload data types. @@ -45,27 +46,34 @@ public abstract class AzureServiceClient { private final ClientLogger logger = new ClientLogger(getClass()); - protected AzureServiceClient(HttpPipeline httpPipeline, AzureEnvironment environment) { - ((AzureJacksonAdapter) serializerAdapter).serializer().registerModule(DateTimeDeserializer.getModule()); + private static final Map PROPERTIES = + CoreUtils.getProperties("azure.properties"); + + private static final String SDK_VERSION; + static { + SDK_VERSION = PROPERTIES.getOrDefault("version", "UnknownVersion"); } - private static final String OS; - private static final String OS_NAME; - private static final String OS_VERSION; - private static final String JAVA_VERSION; - private static final String SDK_VERSION = "2.0.0-SNAPSHOT"; + private final SerializerAdapter serializerAdapter; - static { - OS_NAME = System.getProperty("os.name"); - OS_VERSION = System.getProperty("os.version"); - OS = OS_NAME + "/" + OS_VERSION; - String version = System.getProperty("java.version"); - JAVA_VERSION = version != null ? version : "Unknown"; + private final String sdkName; + + protected AzureServiceClient(HttpPipeline httpPipeline, AzureEnvironment environment) { + sdkName = this.getClass().getPackage().getName(); + + this.serializerAdapter = new AzureJacksonAdapter(); + ((AzureJacksonAdapter) serializerAdapter).serializer().registerModule(DateTimeDeserializer.getModule()); } - private final SerializerAdapter serializerAdapter = new AzureJacksonAdapter(); + protected AzureServiceClient(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + AzureEnvironment environment) { + sdkName = this.getClass().getPackage().getName(); - private String sdkName; + this.serializerAdapter = serializerAdapter; + if (serializerAdapter instanceof AzureJacksonAdapter) { + ((AzureJacksonAdapter) serializerAdapter).serializer().registerModule(DateTimeDeserializer.getModule()); + } + } /** * Gets serializer adapter for JSON serialization/de-serialization. @@ -82,23 +90,20 @@ public SerializerAdapter getSerializerAdapter() { * @return the default client context. */ public Context getContext() { - Context context = new Context("java.version", JAVA_VERSION); - if (!CoreUtils.isNullOrEmpty(OS_NAME)) { - context = context.addData("os.name", OS_NAME); - } - if (!CoreUtils.isNullOrEmpty(OS_VERSION)) { - context = context.addData("os.version", OS_VERSION); - } - if (sdkName == null) { - String packageName = this.getClass().getPackage().getName(); - if (packageName.endsWith(".models")) { - sdkName = packageName.substring(0, packageName.length() - ".models".length()); - } else { - sdkName = packageName; - } + return new Context("Sdk-Name", sdkName) + .addData("Sdk-Version", SDK_VERSION); + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + for (Map.Entry entry : this.getContext().getValues().entrySet()) { + context = context.addData(entry.getKey(), entry.getValue()); } - context = context.addData("Sdk-Name", sdkName); - context = context.addData("Sdk-Version", SDK_VERSION); return context; } diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/Accepted.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/Accepted.java index 2f909b5e18f2..44fbfed5b345 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/Accepted.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/Accepted.java @@ -14,11 +14,11 @@ public interface Accepted { /** - * Gets the accepted result of LRO. + * Gets the activation response of LRO. * - * @return the accepted result + * @return the activation response */ - ActivationResponse getAcceptedResult(); + ActivationResponse getActivationResponse(); /** * Gets the {@link SyncPoller} of LRO. diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java index c56eac46a50f..65254bcf2eae 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/AcceptedImpl.java @@ -63,7 +63,7 @@ public AcceptedImpl(Response> activationResponse, } @Override - public ActivationResponse getAcceptedResult() { + public ActivationResponse getActivationResponse() { try { T value = wrapOperation.apply(serializerAdapter.deserialize( new String(getResponse(), StandardCharsets.UTF_8), diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/CreatableUpdatableImpl.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/CreatableUpdatableImpl.java index d214c79511d9..76f32c74bbd6 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/CreatableUpdatableImpl.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/model/implementation/CreatableUpdatableImpl.java @@ -269,13 +269,11 @@ protected T taskResult(String key) { } } + @SuppressWarnings("unchecked") protected Function innerToFluentMap(final FluentModelImplT fluentModelImplT) { - return new Function() { - @Override - public FluentModelT apply(InnerModelT innerModel) { - fluentModelImplT.setInner(innerModel); - return (FluentModelT) fluentModelImplT; - } + return innerModel -> { + fluentModelImplT.setInner(innerModel); + return (FluentModelT) fluentModelImplT; }; } diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/UserAgentPolicy.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/UserAgentPolicy.java index fb907e2bebf9..8bd010728836 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/UserAgentPolicy.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/UserAgentPolicy.java @@ -21,36 +21,12 @@ public class UserAgentPolicy implements HttpPipelinePolicy { private static final String SDK_VERSION_KEY = "Sdk-Version"; private static final String APPLICATION_ID_KEY = "Application-Id"; - private static final String OS_NAME = System.getProperty("os.name"); - private static final String OS_VERSION = System.getProperty("os.version"); - private static final String JAVA_VERSION = System.getProperty("java.version"); - - /* - * The base User-Agent header format is azsdk-java-/. Additional information such as the - * application ID will be prepended and platform telemetry will be appended, a fully configured User-Agent header - * format is azsdk-java-/ . - */ - private static final String DEFAULT_USER_AGENT_FORMAT = "azsdk-java-%s/%s"; - - // From the design guidelines, the platform info format is: - // ; - private static final String PLATFORM_INFO_FORMAT = "%s; %s %s"; - private final String defaultSdkName = this.getClass().getPackage().getName(); private final String defaultSdkVersion = this.getClass().getPackage().getSpecificationVersion(); private final HttpLogOptions httpLogOptions; private final Configuration configuration; - private static final UserAgentPolicy DEFAULT_USER_AGENT_POLICY = new UserAgentPolicy(null, null); - - /** - * @return default user agent policy - */ - public static UserAgentPolicy getDefaultUserAgentPolicy() { - return DEFAULT_USER_AGENT_POLICY; - } - /** * @param httpLogOptions used for get application id * @param configuration used for check telemetry enable or not @@ -69,32 +45,54 @@ public UserAgentPolicy(HttpLogOptions httpLogOptions, Configuration configuratio } } - protected String buildUserAgent(String applicationId, String sdkName, String sdkVersion) { + // begin of UserAgentUtil.toUserAgentString + public static final String DEFAULT_USER_AGENT_HEADER = "azsdk-java"; + private static final String PLATFORM_INFO_FORMAT = "%s; %s; %s"; + private static final int MAX_APP_ID_LENGTH = 24; + + private static String toUserAgentString(String applicationId, String sdkName, String sdkVersion, + Configuration configuration) { StringBuilder userAgentBuilder = new StringBuilder(); // Only add the application ID if it is present as it is optional. if (applicationId != null) { + applicationId = applicationId.length() > MAX_APP_ID_LENGTH ? applicationId.substring(0, MAX_APP_ID_LENGTH) + : applicationId; userAgentBuilder.append(applicationId).append(" "); } // Add the required default User-Agent string. - userAgentBuilder.append(String.format(DEFAULT_USER_AGENT_FORMAT, sdkName, sdkVersion)); + userAgentBuilder.append(DEFAULT_USER_AGENT_HEADER) + .append("-") + .append(sdkName) + .append("/") + .append(sdkVersion); // Only add the platform telemetry if it is allowed as it is optional. - if (!telemetryDisabled()) { - String platformInfo = String.format(PLATFORM_INFO_FORMAT, JAVA_VERSION, OS_NAME, OS_VERSION); + if (!isTelemetryDisabled(configuration)) { userAgentBuilder.append(" ") - .append("(") - .append(platformInfo) - .append(")"); + .append("(") + .append(getPlatformInfo()) + .append(")"); } return userAgentBuilder.toString(); } - private boolean telemetryDisabled() { - return configuration.get(Configuration.PROPERTY_AZURE_TELEMETRY_DISABLED, false); + private static String getPlatformInfo() { + String javaVersion = Configuration.getGlobalConfiguration().get("java.version"); + String osName = Configuration.getGlobalConfiguration().get("os.name"); + String osVersion = Configuration.getGlobalConfiguration().get("os.version"); + + return String.format(PLATFORM_INFO_FORMAT, javaVersion, osName, osVersion); + } + + private static boolean isTelemetryDisabled(Configuration configuration) { + return (configuration == null) + ? Configuration.getGlobalConfiguration().get(Configuration.PROPERTY_AZURE_TELEMETRY_DISABLED, false) + : configuration.get(Configuration.PROPERTY_AZURE_TELEMETRY_DISABLED, false); } + // end of UserAgentUtil.toUserAgentString @Override public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { @@ -124,7 +122,9 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN applicationId = httpLogOptions.getApplicationId(); } - context.getHttpRequest().setHeader(USER_AGENT_KEY, buildUserAgent(applicationId, sdkName, sdkVersion)); + context.getHttpRequest().setHeader(USER_AGENT_KEY, + //UserAgentUtil.toUserAgentString(applicationId, sdkName, sdkVersion, configuration)); + toUserAgentString(applicationId, sdkName, sdkVersion, configuration)); return next.process(); } } diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentImpl.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentImpl.java index 1a34f2caa37d..8da188cfef7d 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentImpl.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentImpl.java @@ -325,7 +325,7 @@ public Accepted beginCreate() { DeploymentExtendedInner.class, inner -> new DeploymentImpl(inner, inner.name(), resourceManager)); - setInner(accepted.getAcceptedResult().getValue().inner()); + setInner(accepted.getActivationResponse().getValue().inner()); return accepted; } } diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentsImpl.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentsImpl.java index 5b36dc61b829..23c26a49c994 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentsImpl.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/DeploymentsImpl.java @@ -82,8 +82,7 @@ public DeploymentImpl define(String name) { @Override public boolean checkExistence(String resourceGroupName, String deploymentName) { - // return this.getManager().getInner().deployments().checkExistence(resourceGroupName, deploymentName); - return true; + return this.manager().inner().getDeployments().checkExistence(resourceGroupName, deploymentName); } protected DeploymentImpl createFluentModel(String name) { @@ -106,7 +105,6 @@ public void deleteById(String id) { deleteByIdAsync(id).block(); } - @Override public Mono deleteByIdAsync(String id) { return deleteByResourceGroupAsync(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourceImpl.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourceImpl.java index 07f5cb58b311..251ea7d1b90e 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourceImpl.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourceImpl.java @@ -3,7 +3,11 @@ package com.azure.resourcemanager.resources.implementation; +import com.azure.core.http.rest.Response; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.model.Accepted; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.AcceptedImpl; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.models.Plan; import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; @@ -12,8 +16,11 @@ import com.azure.resourcemanager.resources.fluent.inner.GenericResourceInner; import com.azure.resourcemanager.resources.ResourceManagementClient; import com.azure.resourcemanager.resources.fluent.ResourcesClient; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.nio.ByteBuffer; + /** * The implementation for GenericResource and its nested interfaces. */ @@ -28,6 +35,9 @@ final class GenericResourceImpl GenericResource.Definition, GenericResource.UpdateStages.WithApiVersion, GenericResource.Update { + + private final ClientLogger logger = new ClientLogger(GenericResourceImpl.class); + private String resourceProviderNamespace; private String parentResourcePath; private String resourceType; @@ -140,33 +150,44 @@ public GenericResourceImpl withApiVersion(String apiVersion) { return this; } - // CreateUpdateTaskGroup.ResourceCreator implementation @Override - public Mono createResourceAsync() { - final GenericResourceImpl self = this; - Mono observable = null; - if (apiVersion != null) { - observable = Mono.just(apiVersion); + public Accepted beginCreate() { + String apiVersion = this.getApiVersionAsync().block(); + + String name = this.name(); + if (!isInCreateMode()) { + name = ResourceUtils.nameFromResourceId(inner().id()); + } + + Response> activationResponse = this.manager().inner().getResources() + .createOrUpdateWithResponseAsync( + resourceGroupName(), + resourceProviderNamespace, + parentResourcePath(), + resourceType, + name, + apiVersion, + inner()).block(); + if (activationResponse == null) { + throw logger.logExceptionAsError(new NullPointerException()); } else { - final ResourceManagementClient serviceClient = this.manager().inner(); - observable = this.manager().providers().getByNameAsync(resourceProviderNamespace) - .flatMap(provider -> { - String id; - if (!isInCreateMode()) { - id = inner().id(); - } else { - id = ResourceUtils.constructResourceId( - serviceClient.getSubscriptionId(), - resourceGroupName(), - resourceProviderNamespace(), - resourceType(), - this.name(), - parentResourcePath()); - } - self.apiVersion = ResourceUtils.defaultApiVersion(id, provider); - return Mono.just(self.apiVersion); - }); + Accepted accepted = new AcceptedImpl( + activationResponse, + this.manager().inner().getSerializerAdapter(), + this.manager().inner().getHttpPipeline(), + GenericResourceInner.class, + GenericResourceInner.class, + inner -> new GenericResourceImpl(inner.id(), inner, this.manager())); + + setInner(accepted.getActivationResponse().getValue().inner()); + return accepted; } + } + + // CreateUpdateTaskGroup.ResourceCreator implementation + @Override + public Mono createResourceAsync() { + Mono observable = this.getApiVersionAsync(); final ResourcesClient resourceClient = this.manager().inner().getResources(); return observable .flatMap(api -> { @@ -183,7 +204,34 @@ public Mono createResourceAsync() { api, inner()) .subscribeOn(SdkContext.getReactorScheduler()) - .map(innerToFluentMap(self)); + .map(innerToFluentMap(this)); }); } + + private Mono getApiVersionAsync() { + Mono apiVersion; + if (this.apiVersion != null) { + apiVersion = Mono.just(this.apiVersion); + } else { + final ResourceManagementClient serviceClient = this.manager().inner(); + apiVersion = this.manager().providers().getByNameAsync(resourceProviderNamespace) + .flatMap(provider -> { + String id; + if (!isInCreateMode()) { + id = inner().id(); + } else { + id = ResourceUtils.constructResourceId( + serviceClient.getSubscriptionId(), + resourceGroupName(), + resourceProviderNamespace(), + resourceType(), + this.name(), + parentResourcePath()); + } + this.apiVersion = ResourceUtils.defaultApiVersion(id, provider); + return Mono.just(this.apiVersion); + }); + } + return apiVersion; + } } diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourcesImpl.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourcesImpl.java index d49f6fa7c334..0e4228c610bd 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourcesImpl.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/GenericResourcesImpl.java @@ -5,8 +5,11 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.model.Accepted; +import com.azure.resourcemanager.resources.fluentcore.model.implementation.AcceptedImpl; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.models.GenericResources; import com.azure.resourcemanager.resources.models.ResourceGroup; @@ -17,9 +20,12 @@ import com.azure.resourcemanager.resources.fluentcore.utils.Utils; import com.azure.resourcemanager.resources.fluent.inner.GenericResourceInner; import com.azure.resourcemanager.resources.fluent.ResourcesClient; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.nio.ByteBuffer; import java.util.List; +import java.util.function.Function; /** * Implementation of the {@link GenericResources}. @@ -179,7 +185,6 @@ public Mono deleteAsync(String resourceGroupName, String resourceProviderN parentResourcePath, resourceType, resourceName, apiVersion); } - @Override protected GenericResourceImpl wrapModel(String id) { return new GenericResourceImpl(id, new GenericResourceInner(), this.manager()) @@ -222,6 +227,24 @@ public Mono deleteByIdAsync(final String id) { .flatMap(apiVersion -> inner.deleteByIdAsync(id, apiVersion)); } + @Override + public Accepted beginDeleteById(String id) { + String apiVersion = getApiVersionFromId(id).block(); + + Response> activationResponse = this.inner() + .deleteByIdWithResponseAsync(id, apiVersion).block(); + if (activationResponse == null) { + throw logger.logExceptionAsError(new NullPointerException()); + } else { + return new AcceptedImpl(activationResponse, + manager().inner().getSerializerAdapter(), + manager().inner().getHttpPipeline(), + Void.class, + Void.class, + Function.identity()); + } + } + private Mono getApiVersionFromId(final String id) { return this.manager().providers().getByNameAsync(ResourceUtils.resourceProviderFromResourceId(id)) .map(provider -> ResourceUtils.defaultApiVersion(id, provider)); diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsImpl.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsImpl.java index fe9c883d1958..2cf01f800fc8 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsImpl.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsImpl.java @@ -80,7 +80,6 @@ public PolicyAssignment getById(String id) { @Override public Mono getByIdAsync(String id) { return client.getByIdAsync(id) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsImpl.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsImpl.java index 3b63e50176eb..b0504c94105c 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsImpl.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyDefinitionsImpl.java @@ -44,7 +44,6 @@ public PolicyDefinition getByName(String name) { @Override public Mono getByNameAsync(String name) { return client.getAsync(name) - .onErrorResume(e -> Mono.empty()) .map(this::wrapModel); } diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/models/GenericResource.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/models/GenericResource.java index 71b0ae9e3387..54a5753e0cb0 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/models/GenericResource.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/models/GenericResource.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.resources.fluentcore.arm.models.GroupableResource; import com.azure.resourcemanager.resources.fluentcore.arm.models.Resource; +import com.azure.resourcemanager.resources.fluentcore.model.Accepted; import com.azure.resourcemanager.resources.fluentcore.model.Appliable; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import com.azure.resourcemanager.resources.fluentcore.model.Refreshable; @@ -181,6 +182,13 @@ interface WithCreate extends * @return the next stage of generic resource definition */ WithCreate withProperties(Object properties); + + /** + * Begins creating the Azure resource. + * + * @return the accepted create operation + */ + Accepted beginCreate(); } } diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/models/GenericResources.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/models/GenericResources.java index cd0b58bc0a44..68a89e1f3729 100644 --- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/models/GenericResources.java +++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/resources/models/GenericResources.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById; import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing; import com.azure.resourcemanager.resources.ResourceManager; +import com.azure.resourcemanager.resources.fluentcore.model.Accepted; import reactor.core.publisher.Mono; import java.util.List; @@ -136,4 +137,12 @@ void delete(String resourceGroupName, String resourceProviderNamespace, */ Mono deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion); + + /** + * Begins deleting a resource from Azure, identifying it by its resource ID. + * + * @param id the resource ID of the resource to delete + * @return the accepted deleting operation + */ + Accepted beginDeleteById(String id); } diff --git a/sdk/resources/mgmt/src/main/resources/azure.properties b/sdk/resources/mgmt/src/main/resources/azure.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/resources/mgmt/src/main/resources/azure.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java b/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java index 5213aa76befa..c65cf8546137 100644 --- a/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java +++ b/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/DeploymentsTests.java @@ -212,7 +212,7 @@ public void canUpdateVirtualNetworkDeployment() throws Exception { .withParametersLink(parametersUri, contentVersion) .withMode(DeploymentMode.COMPLETE) .beginCreate(); - Deployment createdDeployment = acceptedDeployment.getAcceptedResult().getValue(); + Deployment createdDeployment = acceptedDeployment.getActivationResponse().getValue(); Deployment deployment = resourceClient.deployments().getByResourceGroup(rgName, dp); Assertions.assertEquals(createdDeployment.correlationId(), deployment.correlationId()); Assertions.assertEquals(dp, deployment.name()); @@ -246,17 +246,17 @@ public void canDeployVirtualNetworkSyncPoll() throws Exception { .withParametersLink(parametersUri, contentVersion) .withMode(DeploymentMode.COMPLETE) .beginCreate(); - Deployment createdDeployment = acceptedDeployment.getAcceptedResult().getValue(); + Deployment createdDeployment = acceptedDeployment.getActivationResponse().getValue(); Assertions.assertNotEquals("Succeeded", createdDeployment.provisioningState()); - LongRunningOperationStatus pollStatus = acceptedDeployment.getAcceptedResult().getStatus(); - int delayInMills = acceptedDeployment.getAcceptedResult().getRetryAfter() == null + LongRunningOperationStatus pollStatus = acceptedDeployment.getActivationResponse().getStatus(); + int delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null ? 0 - : (int) acceptedDeployment.getAcceptedResult().getRetryAfter().toMillis(); + : (int) acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); - PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); + PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null ? 10000 @@ -280,17 +280,17 @@ public void canDeployVirtualNetworkSyncPollWithFailure() throws Exception { .withParameters("{}") .withMode(DeploymentMode.COMPLETE) .beginCreate(); - Deployment createdDeployment = acceptedDeployment.getAcceptedResult().getValue(); + Deployment createdDeployment = acceptedDeployment.getActivationResponse().getValue(); Assertions.assertNotEquals("Succeeded", createdDeployment.provisioningState()); - LongRunningOperationStatus pollStatus = acceptedDeployment.getAcceptedResult().getStatus(); - int delayInMills = acceptedDeployment.getAcceptedResult().getRetryAfter() == null + LongRunningOperationStatus pollStatus = acceptedDeployment.getActivationResponse().getStatus(); + int delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null ? 0 - : (int) acceptedDeployment.getAcceptedResult().getRetryAfter().toMillis(); + : (int) acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); - PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); + PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null ? 10000 @@ -312,17 +312,17 @@ public void canDeployVirtualNetworkSyncPollWithFailure() throws Exception { .withParameters("{}") .withMode(DeploymentMode.COMPLETE) .beginCreate(); - createdDeployment = acceptedDeployment.getAcceptedResult().getValue(); + createdDeployment = acceptedDeployment.getActivationResponse().getValue(); Assertions.assertNotEquals("Succeeded", createdDeployment.provisioningState()); - pollStatus = acceptedDeployment.getAcceptedResult().getStatus(); - delayInMills = acceptedDeployment.getAcceptedResult().getRetryAfter() == null + pollStatus = acceptedDeployment.getActivationResponse().getStatus(); + delayInMills = acceptedDeployment.getActivationResponse().getRetryAfter() == null ? 0 - : (int) acceptedDeployment.getAcceptedResult().getRetryAfter().toMillis(); + : (int) acceptedDeployment.getActivationResponse().getRetryAfter().toMillis(); while (!pollStatus.isComplete()) { SdkContext.sleep(delayInMills); - PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); + PollResponse pollResponse = acceptedDeployment.getSyncPoller().poll(); pollStatus = pollResponse.getStatus(); delayInMills = pollResponse.getRetryAfter() == null ? 10000 diff --git a/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java b/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java index fbdd7d8b18a3..bc5a4fd92d3d 100644 --- a/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java +++ b/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/GenericResourcesTests.java @@ -5,8 +5,14 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.resourcemanager.resources.fluent.inner.GenericResourceExpandedInner; import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; +import com.azure.resourcemanager.resources.fluentcore.model.Accepted; import com.azure.resourcemanager.resources.fluentcore.profile.AzureProfile; +import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext; import com.azure.resourcemanager.resources.models.GenericResource; import com.azure.resourcemanager.resources.models.GenericResources; import com.azure.resourcemanager.resources.models.ResourceGroups; @@ -15,6 +21,7 @@ import org.junit.jupiter.api.Test; import java.util.Arrays; +import java.util.Optional; public class GenericResourcesTests extends ResourceManagerTestBase { private ResourceGroups resourceGroups; @@ -87,4 +94,51 @@ public void canCreateUpdateMoveResource() throws Exception { Assertions.assertFalse(genericResources.checkExistence(newRgName, resource.resourceProviderNamespace(), resource.parentResourcePath(), resource.resourceType(), resource.name(), resource.apiVersion())); Assertions.assertFalse(genericResources.checkExistenceById(resource.id())); } + + @Test + public void canCreateDeleteResourceSyncPoll() throws Exception { + final String resourceName = "rs" + testId; + // Create + Accepted acceptedResource = genericResources.define(resourceName) + .withRegion(Region.US_SOUTH_CENTRAL) + .withExistingResourceGroup(rgName) + .withResourceType("sites") + .withProviderNamespace("Microsoft.Web") + .withoutPlan() + .withParentResourcePath("") + .withProperties(new ObjectMapper().readTree("{\"SiteMode\":\"Limited\",\"ComputeMode\":\"Shared\"}")) + .beginCreate(); + + LongRunningOperationStatus pollStatus = acceptedResource.getActivationResponse().getStatus(); + int delayInMills = acceptedResource.getActivationResponse().getRetryAfter() == null + ? 0 + : (int) acceptedResource.getActivationResponse().getRetryAfter().toMillis(); + while (!pollStatus.isComplete()) { + SdkContext.sleep(delayInMills); + + PollResponse pollResponse = acceptedResource.getSyncPoller().poll(); + pollStatus = pollResponse.getStatus(); + delayInMills = pollResponse.getRetryAfter() == null + ? 10000 + : (int) pollResponse.getRetryAfter().toMillis(); + } + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollStatus); + GenericResource resource = acceptedResource.getFinalResult(); + Assertions.assertNotNull(resource.id()); + Assertions.assertEquals(resourceName, ResourceUtils.nameFromResourceId(resource.id())); + + PagedIterable resources = + genericResources.manager().inner().getResources() + .listByResourceGroup(rgName, null, "provisioningState", null); + Optional resourceOpt + = resources.stream().filter(r -> resourceName.equals(r.name())).findFirst(); + Assertions.assertTrue(resourceOpt.isPresent()); + Assertions.assertEquals("Succeeded", resourceOpt.get().provisioningState()); + + Accepted acceptedDelete = genericResources.beginDeleteById(resource.id()); + acceptedDelete.getFinalResult(); + PagedIterable resourcesAfterDelete = genericResources.listByResourceGroup(rgName); + boolean deleted = resourcesAfterDelete.stream().noneMatch(r -> resourceName.equals(r.name())); + Assertions.assertTrue(deleted); + } } diff --git a/sdk/resources/mgmt/src/test/resources/session-records/canCreateDeleteResourceSyncPoll.json b/sdk/resources/mgmt/src/test/resources/session-records/canCreateDeleteResourceSyncPoll.json new file mode 100644 index 000000000000..215f202c1aba --- /dev/null +++ b/sdk/resources/mgmt/src/test/resources/session-records/canCreateDeleteResourceSyncPoll.json @@ -0,0 +1,251 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg72b81582?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:28:55 GMT", + "content-length" : "307", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "0e8545dc-c82d-4a75-a6e0-ea4fa86a86ab", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T032855Z:0e8545dc-c82d-4a75-a6e0-ea4fa86a86ab", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "0e8545dc-c82d-4a75-a6e0-ea4fa86a86ab", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg72b81582\",\"name\":\"rg72b81582\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"eastus\",\"tags\":{\"date\":\"2020-07-08T03:28:51.783595400Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgB72b81582?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:28:57 GMT", + "content-length" : "317", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "201", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f451763a-5337-4a59-ba7e-84b91db79129", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T032858Z:f451763a-5337-4a59-ba7e-84b91db79129", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "f451763a-5337-4a59-ba7e-84b91db79129", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgB72b81582\",\"name\":\"rgB72b81582\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"southcentralus\",\"tags\":{\"date\":\"2020-07-08T03:28:55.767339800Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:28:58 GMT", + "content-length" : "54768", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "3f6faf19-ead9-4c45-afa1-929f94a4221e", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T032858Z:3f6faf19-ead9-4c45-afa1-929f94a4221e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3f6faf19-ead9-4c45-afa1-929f94a4221e", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web\",\"namespace\":\"Microsoft.Web\",\"authorization\":{\"applicationId\":\"abfa0a7c-a6b6-4736-8310-5855508787cd\",\"roleDefinitionId\":\"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"},\"resourceTypes\":[{\"resourceType\":\"publishingUsers\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"ishostnameavailable\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"validate\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"isusernameavailable\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sourceControls\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"availableStacks\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"staticSites\",\"locations\":[\"West US 2\",\"Central US\",\"East US 2\",\"West Europe\",\"East Asia\"],\"apiVersions\":[\"2019-12-01-preview\",\"2019-08-01\"],\"capabilities\":\"SupportsTags, SupportsLocation\"},{\"resourceType\":\"listSitesAssignedToHostName\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/getNetworkPolicies\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"France Central\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-02-01\",\"2016-08-01\"],\"defaultApiVersion\":\"2018-02-01\",\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/operations\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"West US 2\",\"East US 2\",\"East US\",\"UK South\",\"Southeast Asia\",\"North Europe\",\"Japan East\",\"West Europe\",\"East Asia\",\"West US\",\"Australia East\",\"Brazil South\",\"Central US\",\"Japan West\",\"Central India\",\"Canada East\",\"Korea Central\",\"France Central\",\"West India\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-12-01-preview\",\"2019-08-01\",\"2019-01-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\"],\"defaultApiVersion\":\"2019-01-01\",\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/operationResults\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"West US 2\",\"East US 2\",\"East US\",\"UK South\",\"Southeast Asia\",\"North Europe\",\"Japan East\",\"West Europe\",\"East Asia\",\"West US\",\"Australia East\",\"Brazil South\",\"Central US\",\"Japan West\",\"Central India\",\"Canada East\",\"Korea Central\",\"France Central\",\"West India\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-12-01-preview\",\"2019-08-01\",\"2019-01-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\"],\"defaultApiVersion\":\"2019-01-01\",\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/networkConfig\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/slots/networkConfig\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/hostNameBindings\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/slots/hostNameBindings\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"operations\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"certificates\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"serverFarms\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"sites\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-08-01\",\"2016-03-01\",\"2015-11-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2015-01-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation\"},{\"resourceType\":\"sites/slots\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-08-01\",\"2016-03-01\",\"2015-11-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2015-01-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation\"},{\"resourceType\":\"runtimes\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"recommendations\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"resourceHealthMetadata\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"georegions\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/premieraddons\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"hostingEnvironments\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"West US 2\",\"East US 2\",\"UK South\",\"Southeast Asia\",\"North Europe\",\"Japan East\",\"West Europe\",\"East Asia\",\"Australia East\",\"Brazil South\",\"Central US\",\"Japan West\",\"Central India\",\"Canada East\",\"Korea Central\",\"France Central\",\"West India\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2019-01-01\",\"2018-11-01\",\"2018-08-01\",\"2018-05-01-preview\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"}],\"zoneMappings\":[{\"location\":\"East US 2\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"Central US\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"West Europe\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"East US 2 EUAP\",\"zones\":[\"2\",\"1\",\"3\"]},{\"location\":\"Central US EUAP\",\"zones\":[]},{\"location\":\"France Central\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"Southeast Asia\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"West US 2\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"North Europe\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"East US\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"UK South\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"Japan East\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"Australia East\",\"zones\":[]},{\"location\":\"South Africa North\",\"zones\":[]},{\"location\":\"South Central US\",\"zones\":[]},{\"location\":\"Canada Central\",\"zones\":[]},{\"location\":\"Germany West Central\",\"zones\":[]}],\"capabilities\":\"SupportsTags, SupportsLocation\"},{\"resourceType\":\"hostingEnvironments/multiRolePools\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2018-11-01\",\"2018-08-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"hostingEnvironments/workerPools\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2018-11-01\",\"2018-08-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"kubeEnvironments\",\"locations\":[\"North Central US (Stage)\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2019-01-01\",\"2018-11-01\",\"2018-08-01\",\"2018-05-01-preview\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"deploymentLocations\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"deletedSites\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/deletedSites\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"defaultApiVersion\":\"2018-02-01\",\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"ishostingenvironmentnameavailable\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/deleteVirtualNetworkOrSubnets\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-11-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"defaultApiVersion\":\"2018-02-01\",\"apiProfiles\":[{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"connections\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"customApis\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"locations\",\"locations\":[],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/listWsdlInterfaces\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/extractApiDefinitionFromWsdl\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/managedApis\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/runtimes\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/apiOperations\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"connectionGateways\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"locations/connectionGatewayInstallations\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"checkNameAvailability\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"billingMeters\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"verifyHostingEnvironmentVnet\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"serverFarms/eventGridFilters\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway West\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"South Africa West\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"capabilities\":\"None\"},{\"resourceType\":\"sites/eventGridFilters\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway West\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"South Africa West\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-08-01\",\"2016-03-01\",\"2015-11-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2015-01-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"capabilities\":\"None\"},{\"resourceType\":\"sites/slots/eventGridFilters\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway West\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"South Africa West\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-08-01\",\"2016-03-01\",\"2015-11-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2015-01-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"capabilities\":\"None\"},{\"resourceType\":\"hostingEnvironments/eventGridFilters\",\"locations\":[\"North Central US\",\"South Central US\",\"Brazil South\",\"Canada East\",\"UK West\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"West US 2\",\"East US 2\",\"UK South\",\"Southeast Asia\",\"North Europe\",\"Japan East\",\"West Europe\",\"East Asia\",\"Australia East\",\"Central US\",\"Japan West\",\"Central India\",\"Korea Central\",\"France Central\",\"West India\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2019-01-01\",\"2018-11-01\",\"2018-08-01\",\"2018-05-01-preview\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"capabilities\":\"None\"}],\"registrationState\":\"Registered\",\"registrationPolicy\":\"RegistrationRequired\"}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg72b81582/providers/Microsoft.Web//sites/rs72b81582?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:29:26 GMT", + "server" : "Microsoft-IIS/10.0", + "content-length" : "5230", + "expires" : "-1", + "x-aspnet-version" : "4.0.30319", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "01db4fcc-805f-4567-8167-d6157363a816", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-ratelimit-remaining-subscription-resource-requests" : "499", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T032926Z:01db4fcc-805f-4567-8167-d6157363a816", + "x-powered-by" : "ASP.NET", + "etag" : "\"1D654D7F0FCA7C0\"", + "content-type" : "application/json", + "cache-control" : "no-cache", + "x-ms-request-id" : "5e325e97-9bc3-4f7b-bee2-1fd25e272df0", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg72b81582/providers/Microsoft.Web/sites/rs72b81582\",\"name\":\"rs72b81582\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"name\":\"rs72b81582\",\"state\":\"Running\",\"hostNames\":[\"rs72b81582.azurewebsites.net\"],\"webSpace\":\"rg72b81582-SouthCentralUSwebspace\",\"selfLink\":\"https://waws-prod-sn1-127.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/rg72b81582-SouthCentralUSwebspace/sites/rs72b81582\",\"repositorySiteName\":\"rs72b81582\",\"owner\":null,\"usageState\":\"Normal\",\"enabled\":true,\"adminEnabled\":true,\"enabledHostNames\":[\"rs72b81582.azurewebsites.net\",\"rs72b81582.scm.azurewebsites.net\"],\"siteProperties\":{\"metadata\":null,\"properties\":[{\"name\":\"LinuxFxVersion\",\"value\":\"\"},{\"name\":\"WindowsFxVersion\",\"value\":null}],\"appSettings\":null},\"availabilityState\":\"Normal\",\"sslCertificates\":null,\"csrs\":[],\"cers\":null,\"siteMode\":null,\"hostNameSslStates\":[{\"name\":\"rs72b81582.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Standard\"},{\"name\":\"rs72b81582.scm.azurewebsites.net\",\"sslState\":\"Disabled\",\"ipBasedSslResult\":null,\"virtualIP\":null,\"thumbprint\":null,\"toUpdate\":null,\"toUpdateIpBasedSsl\":null,\"ipBasedSslState\":\"NotConfigured\",\"hostType\":\"Repository\"}],\"computeMode\":null,\"serverFarm\":null,\"serverFarmId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg72b81582/providers/Microsoft.Web/serverfarms/Default1pf\",\"reserved\":false,\"isXenon\":false,\"hyperV\":false,\"lastModifiedTimeUtc\":\"2020-07-08T03:29:08.99\",\"storageRecoveryDefaultState\":\"Running\",\"contentAvailabilityState\":\"Normal\",\"runtimeAvailabilityState\":\"Normal\",\"siteConfig\":{\"numberOfWorkers\":null,\"defaultDocuments\":null,\"netFrameworkVersion\":null,\"phpVersion\":null,\"pythonVersion\":null,\"nodeVersion\":null,\"powerShellVersion\":null,\"linuxFxVersion\":null,\"windowsFxVersion\":null,\"requestTracingEnabled\":null,\"remoteDebuggingEnabled\":null,\"remoteDebuggingVersion\":null,\"httpLoggingEnabled\":null,\"azureMonitorLogCategories\":null,\"acrUseManagedIdentityCreds\":false,\"acrUserManagedIdentityID\":null,\"logsDirectorySizeLimit\":null,\"detailedErrorLoggingEnabled\":null,\"publishingUsername\":null,\"publishingPassword\":null,\"appSettings\":null,\"metadata\":null,\"connectionStrings\":null,\"machineKey\":null,\"handlerMappings\":null,\"documentRoot\":null,\"scmType\":null,\"use32BitWorkerProcess\":null,\"webSocketsEnabled\":null,\"alwaysOn\":null,\"javaVersion\":null,\"javaContainer\":null,\"javaContainerVersion\":null,\"appCommandLine\":null,\"managedPipelineMode\":null,\"virtualApplications\":null,\"winAuthAdminState\":null,\"winAuthTenantState\":null,\"customAppPoolIdentityAdminState\":null,\"customAppPoolIdentityTenantState\":null,\"runtimeADUser\":null,\"runtimeADUserPassword\":null,\"loadBalancing\":null,\"routingRules\":null,\"experiments\":null,\"limits\":null,\"autoHealEnabled\":null,\"autoHealRules\":null,\"tracingOptions\":null,\"vnetName\":null,\"cors\":null,\"push\":null,\"apiDefinition\":null,\"apiManagementConfig\":null,\"autoSwapSlotName\":null,\"localMySqlEnabled\":null,\"managedServiceIdentityId\":null,\"xManagedServiceIdentityId\":null,\"ipSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictions\":[{\"ipAddress\":\"Any\",\"action\":\"Allow\",\"priority\":1,\"name\":\"Allow all\",\"description\":\"Allow all access\"}],\"scmIpSecurityRestrictionsUseMain\":null,\"http20Enabled\":null,\"minTlsVersion\":null,\"ftpsState\":null,\"preWarmedInstanceCount\":null,\"healthCheckPath\":null,\"fileChangeAuditEnabled\":null,\"functionsRuntimeScaleMonitoringEnabled\":null,\"websiteTimeZone\":null,\"minimumElasticInstanceCount\":0},\"deploymentId\":\"rs72b81582\",\"trafficManagerHostNames\":null,\"sku\":\"Free\",\"scmSiteAlsoStopped\":false,\"targetSwapSlot\":null,\"hostingEnvironment\":null,\"hostingEnvironmentProfile\":null,\"clientAffinityEnabled\":true,\"clientCertEnabled\":false,\"clientCertMode\":\"Required\",\"clientCertExclusionPaths\":null,\"hostNamesDisabled\":false,\"domainVerificationIdentifiers\":null,\"customDomainVerificationId\":\"0FFA32248F34E67BEAA6BC639753005F4F7BED4F59950F668037EEAB327F1054\",\"kind\":\"app\",\"inboundIpAddress\":\"52.171.218.239\",\"possibleInboundIpAddresses\":\"52.171.218.239\",\"ftpUsername\":\"rs72b81582\\\\$rs72b81582\",\"ftpsHostName\":\"ftps://waws-prod-sn1-127.ftp.azurewebsites.windows.net/site/wwwroot\",\"outboundIpAddresses\":\"52.171.218.239,52.171.223.92,52.171.217.31,52.171.216.93,52.171.220.134\",\"possibleOutboundIpAddresses\":\"52.171.218.239,52.171.223.92,52.171.217.31,52.171.216.93,52.171.220.134,40.84.145.193,23.98.149.67,23.98.148.122\",\"containerSize\":0,\"dailyMemoryTimeQuota\":0,\"suspendedTill\":null,\"siteDisabledReason\":0,\"functionExecutionUnitsCache\":null,\"maxNumberOfWorkers\":null,\"homeStamp\":\"waws-prod-sn1-127\",\"cloningInfo\":null,\"hostingEnvironmentId\":null,\"tags\":{},\"resourceGroup\":\"rg72b81582\",\"defaultHostName\":\"rs72b81582.azurewebsites.net\",\"slotSwapStatus\":null,\"httpsOnly\":false,\"redundancyMode\":\"None\",\"inProgressOperationId\":null,\"geoDistributions\":null,\"privateEndpointConnections\":null,\"buildVersion\":null,\"targetBuildVersion\":null}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg72b81582/resources?$expand=provisioningState&api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:29:26 GMT", + "content-length" : "271", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "75892b78-a29b-45c1-84b8-9b16d2057b8e", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T032927Z:75892b78-a29b-45c1-84b8-9b16d2057b8e", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "75892b78-a29b-45c1-84b8-9b16d2057b8e", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg72b81582/providers/Microsoft.Web/sites/rs72b81582\",\"name\":\"rs72b81582\",\"type\":\"Microsoft.Web/sites\",\"kind\":\"app\",\"location\":\"southcentralus\",\"provisioningState\":\"Succeeded\",\"tags\":{}}]}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:29:27 GMT", + "content-length" : "54768", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "5434697f-d488-4e46-b187-2a411197e02f", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T032927Z:5434697f-d488-4e46-b187-2a411197e02f", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "5434697f-d488-4e46-b187-2a411197e02f", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web\",\"namespace\":\"Microsoft.Web\",\"authorization\":{\"applicationId\":\"abfa0a7c-a6b6-4736-8310-5855508787cd\",\"roleDefinitionId\":\"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"},\"resourceTypes\":[{\"resourceType\":\"publishingUsers\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"ishostnameavailable\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"validate\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"isusernameavailable\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sourceControls\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"availableStacks\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"staticSites\",\"locations\":[\"West US 2\",\"Central US\",\"East US 2\",\"West Europe\",\"East Asia\"],\"apiVersions\":[\"2019-12-01-preview\",\"2019-08-01\"],\"capabilities\":\"SupportsTags, SupportsLocation\"},{\"resourceType\":\"listSitesAssignedToHostName\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/getNetworkPolicies\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"France Central\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-02-01\",\"2016-08-01\"],\"defaultApiVersion\":\"2018-02-01\",\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/operations\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"West US 2\",\"East US 2\",\"East US\",\"UK South\",\"Southeast Asia\",\"North Europe\",\"Japan East\",\"West Europe\",\"East Asia\",\"West US\",\"Australia East\",\"Brazil South\",\"Central US\",\"Japan West\",\"Central India\",\"Canada East\",\"Korea Central\",\"France Central\",\"West India\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-12-01-preview\",\"2019-08-01\",\"2019-01-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\"],\"defaultApiVersion\":\"2019-01-01\",\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/operationResults\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"West US 2\",\"East US 2\",\"East US\",\"UK South\",\"Southeast Asia\",\"North Europe\",\"Japan East\",\"West Europe\",\"East Asia\",\"West US\",\"Australia East\",\"Brazil South\",\"Central US\",\"Japan West\",\"Central India\",\"Canada East\",\"Korea Central\",\"France Central\",\"West India\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-12-01-preview\",\"2019-08-01\",\"2019-01-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\"],\"defaultApiVersion\":\"2019-01-01\",\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/networkConfig\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/slots/networkConfig\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/hostNameBindings\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/slots/hostNameBindings\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"operations\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"certificates\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"serverFarms\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"sites\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-08-01\",\"2016-03-01\",\"2015-11-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2015-01-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation\"},{\"resourceType\":\"sites/slots\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-08-01\",\"2016-03-01\",\"2015-11-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2015-01-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation\"},{\"resourceType\":\"runtimes\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"recommendations\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"resourceHealthMetadata\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"georegions\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"sites/premieraddons\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"hostingEnvironments\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"West US 2\",\"East US 2\",\"UK South\",\"Southeast Asia\",\"North Europe\",\"Japan East\",\"West Europe\",\"East Asia\",\"Australia East\",\"Brazil South\",\"Central US\",\"Japan West\",\"Central India\",\"Canada East\",\"Korea Central\",\"France Central\",\"West India\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2019-01-01\",\"2018-11-01\",\"2018-08-01\",\"2018-05-01-preview\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"}],\"zoneMappings\":[{\"location\":\"East US 2\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"Central US\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"West Europe\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"East US 2 EUAP\",\"zones\":[\"2\",\"1\",\"3\"]},{\"location\":\"Central US EUAP\",\"zones\":[]},{\"location\":\"France Central\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"Southeast Asia\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"West US 2\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"North Europe\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"East US\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"UK South\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"Japan East\",\"zones\":[\"3\",\"2\",\"1\"]},{\"location\":\"Australia East\",\"zones\":[]},{\"location\":\"South Africa North\",\"zones\":[]},{\"location\":\"South Central US\",\"zones\":[]},{\"location\":\"Canada Central\",\"zones\":[]},{\"location\":\"Germany West Central\",\"zones\":[]}],\"capabilities\":\"SupportsTags, SupportsLocation\"},{\"resourceType\":\"hostingEnvironments/multiRolePools\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2018-11-01\",\"2018-08-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"hostingEnvironments/workerPools\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2018-11-01\",\"2018-08-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"kubeEnvironments\",\"locations\":[\"North Central US (Stage)\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2019-01-01\",\"2018-11-01\",\"2018-08-01\",\"2018-05-01-preview\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-09-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2017-08-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"deploymentLocations\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"deletedSites\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/deletedSites\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"East Asia\",\"Japan East\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"defaultApiVersion\":\"2018-02-01\",\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"ishostingenvironmentnameavailable\",\"locations\":[],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/deleteVirtualNetworkOrSubnets\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-11-01\",\"2016-08-01\",\"2016-03-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"defaultApiVersion\":\"2018-02-01\",\"apiProfiles\":[{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"connections\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"customApis\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"locations\",\"locations\":[],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/listWsdlInterfaces\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/extractApiDefinitionFromWsdl\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/managedApis\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/runtimes\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"locations/apiOperations\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-07-01-preview\",\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"connectionGateways\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation\"},{\"resourceType\":\"locations/connectionGatewayInstallations\",\"locations\":[\"North Central US\",\"Central US\",\"South Central US\",\"North Europe\",\"West Europe\",\"East Asia\",\"Southeast Asia\",\"West US\",\"East US\",\"East US 2\",\"Japan West\",\"Japan East\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"South India\",\"Central India\",\"West India\",\"West US 2\",\"West Central US\",\"Canada Central\",\"Canada East\",\"UK South\",\"UK West\",\"France Central\",\"France South\",\"Korea Central\",\"Korea South\",\"South Africa West\",\"South Africa North\",\"UAE Central\",\"Central US EUAP\",\"East US 2 EUAP\"],\"apiVersions\":[\"2018-03-01-preview\",\"2016-06-01\",\"2015-08-01-preview\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-06-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-03-01-preview\"}],\"capabilities\":\"None\"},{\"resourceType\":\"checkNameAvailability\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"billingMeters\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"verifyHostingEnvironmentVnet\",\"locations\":[\"Central US\",\"North Europe\",\"West Europe\",\"Southeast Asia\",\"Korea Central\",\"Korea South\",\"West US\",\"East US\",\"Japan West\",\"Japan East\",\"East Asia\",\"East US 2\",\"North Central US\",\"South Central US\",\"Brazil South\",\"Australia East\",\"Australia Southeast\",\"West India\",\"Central India\",\"South India\",\"Canada Central\",\"Canada East\",\"West Central US\",\"UK West\",\"UK South\",\"West US 2\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"East Asia (Stage)\",\"Central US (Stage)\",\"North Central US (Stage)\",\"France Central\",\"South Africa North\",\"Australia Central\",\"Switzerland North\",\"Germany West Central\",\"Norway East\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"apiProfiles\":[{\"profileVersion\":\"2017-03-09-profile\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-03-01-hybrid\",\"apiVersion\":\"2016-03-01\"},{\"profileVersion\":\"2018-06-01-profile\",\"apiVersion\":\"2018-02-01\"},{\"profileVersion\":\"2019-03-01-hybrid\",\"apiVersion\":\"2018-02-01\"}],\"capabilities\":\"None\"},{\"resourceType\":\"serverFarms/eventGridFilters\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway West\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"South Africa West\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"capabilities\":\"None\"},{\"resourceType\":\"sites/eventGridFilters\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway West\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"South Africa West\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-08-01\",\"2016-03-01\",\"2015-11-01\",\"2015-08-01-preview\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2015-01-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"capabilities\":\"None\"},{\"resourceType\":\"sites/slots/eventGridFilters\",\"locations\":[\"South Central US\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"Australia East\",\"Brazil South\",\"Southeast Asia\",\"Central US\",\"Japan West\",\"Central India\",\"UK South\",\"Canada East\",\"Korea Central\",\"France Central\",\"North Europe\",\"West US 2\",\"West India\",\"East US 2\",\"Australia Central\",\"Germany West Central\",\"Norway West\",\"Norway East\",\"Switzerland North\",\"North Central US\",\"UK West\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"West Europe\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"East Asia\",\"Japan East\",\"South Africa West\",\"East US 2 EUAP\",\"Central US EUAP\",\"West US\",\"East US\"],\"apiVersions\":[\"2019-08-01\",\"2018-11-01\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-08-01\",\"2016-03-01\",\"2015-11-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2015-01-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01-preview\",\"2014-04-01\"],\"capabilities\":\"None\"},{\"resourceType\":\"hostingEnvironments/eventGridFilters\",\"locations\":[\"North Central US\",\"South Central US\",\"Brazil South\",\"Canada East\",\"UK West\",\"MSFT West US\",\"MSFT East US\",\"MSFT East Asia\",\"MSFT North Europe\",\"East US 2 (Stage)\",\"Central US (Stage)\",\"South Africa North\",\"West US 2\",\"East US 2\",\"UK South\",\"Southeast Asia\",\"North Europe\",\"Japan East\",\"West Europe\",\"East Asia\",\"Australia East\",\"Central US\",\"Japan West\",\"Central India\",\"Korea Central\",\"France Central\",\"West India\",\"Australia Central\",\"Germany West Central\",\"Norway East\",\"Switzerland North\",\"Australia Southeast\",\"Korea South\",\"Canada Central\",\"South India\",\"West Central US\",\"East Asia (Stage)\",\"North Central US (Stage)\",\"West US\",\"East US\",\"East US 2 EUAP\",\"Central US EUAP\"],\"apiVersions\":[\"2019-08-01\",\"2019-02-01\",\"2019-01-01\",\"2018-11-01\",\"2018-08-01\",\"2018-05-01-preview\",\"2018-02-01\",\"2017-08-01\",\"2016-09-01\",\"2016-03-01\",\"2015-08-01\",\"2015-07-01\",\"2015-06-01\",\"2015-05-01\",\"2015-04-01\",\"2015-02-01\",\"2014-11-01\",\"2014-06-01\",\"2014-04-01\"],\"capabilities\":\"None\"}],\"registrationState\":\"Registered\",\"registrationPolicy\":\"RegistrationRequired\"}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg72b81582/providers/Microsoft.Web/sites/rs72b81582?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:29:35 GMT", + "server" : "Microsoft-IIS/10.0", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "x-aspnet-version" : "4.0.30319", + "retry-after" : "0", + "StatusCode" : "200", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "51fcfc05-96e4-43cf-9da8-0ef4cdfcd6ec", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T032935Z:51fcfc05-96e4-43cf-9da8-0ef4cdfcd6ec", + "x-powered-by" : "ASP.NET", + "etag" : "\"1D654D7F0FCA7C0\"", + "cache-control" : "no-cache", + "x-ms-request-id" : "6cbc7071-d4b1-4d26-a08e-43a104de872e", + "Body" : "" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg72b81582/resources?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:30:05 GMT", + "content-length" : "12", + "expires" : "-1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "f6632c16-6389-4d41-a747-e9e401ccd63c", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T033006Z:f6632c16-6389-4d41-a747-e9e401ccd63c", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "f6632c16-6389-4d41-a747-e9e401ccd63c", + "Body" : "{\"value\":[]}" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgB72b81582?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:30:09 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "4379b08a-e72e-45ab-90cc-8e406295e598", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T033010Z:4379b08a-e72e-45ab-90cc-8e406295e598", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SR0I3MkI4MTU4Mi1TT1VUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoic291dGhjZW50cmFsdXMifQ?api-version=2019-08-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "4379b08a-e72e-45ab-90cc-8e406295e598", + "Body" : "" + } + }, { + "Method" : "DELETE", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg72b81582?api-version=2019-08-01", + "Headers" : { + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "date" : "Wed, 08 Jul 2020 03:30:13 GMT", + "content-length" : "0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", + "retry-after" : "0", + "StatusCode" : "202", + "pragma" : "no-cache", + "x-ms-correlation-request-id" : "ea86cb6c-ddae-4c25-93fa-21ee8d962f58", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200708T033014Z:ea86cb6c-ddae-4c25-93fa-21ee8d962f58", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzcyQjgxNTgyLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2019-08-01", + "cache-control" : "no-cache", + "x-ms-request-id" : "ea86cb6c-ddae-4c25-93fa-21ee8d962f58", + "Body" : "" + } + } ], + "variables" : [ "72b81582" ] +} \ No newline at end of file diff --git a/sdk/resources/mgmt/src/test/resources/session-records/canDeployVirtualNetwork.json b/sdk/resources/mgmt/src/test/resources/session-records/canDeployVirtualNetwork.json index 5679709c58d9..bdfe2a453b96 100644 --- a/sdk/resources/mgmt/src/test/resources/session-records/canDeployVirtualNetwork.json +++ b/sdk/resources/mgmt/src/test/resources/session-records/canDeployVirtualNetwork.json @@ -1,13 +1,13 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:09:23 GMT", + "date" : "Thu, 16 Jul 2020 05:15:36 GMT", "content-length" : "315", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-writes" : "1199", @@ -15,192 +15,192 @@ "StatusCode" : "201", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "a6f1f317-43cf-4473-8596-783b15ee247e", + "x-ms-correlation-request-id" : "60ecd2d5-72dd-4c49-b4b1-6a1d98021b26", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T070924Z:a6f1f317-43cf-4473-8596-783b15ee247e", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051537Z:60ecd2d5-72dd-4c49-b4b1-6a1d98021b26", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "a6f1f317-43cf-4473-8596-783b15ee247e", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023\",\"name\":\"rg76e16023\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"southcentralus\",\"tags\":{\"date\":\"2020-03-23T07:09:18.576579200Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + "x-ms-request-id" : "60ecd2d5-72dd-4c49-b4b1-6a1d98021b26", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715\",\"name\":\"rg71866715\",\"type\":\"Microsoft.Resources/resourceGroups\",\"location\":\"southcentralus\",\"tags\":{\"date\":\"2020-07-16T05:15:30.388622300Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" } }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:09:28 GMT", + "date" : "Thu, 16 Jul 2020 05:15:45 GMT", "content-length" : "2557", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-writes" : "1198", "retry-after" : "0", "StatusCode" : "201", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "3526c738-2290-4f3f-9eef-e2b56cafdc3e", + "x-ms-correlation-request-id" : "45861da2-a515-4f6a-a93c-f932021ea153", "strict-transport-security" : "max-age=31536000; includeSubDomains", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T070929Z:3526c738-2290-4f3f-9eef-e2b56cafdc3e", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051545Z:45861da2-a515-4f6a-a93c-f932021ea153", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "3526c738-2290-4f3f-9eef-e2b56cafdc3e", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023\",\"name\":\"dpA76e16023\",\"type\":\"Microsoft.Resources/deployments\",\"properties\":{\"templateLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json\",\"contentVersion\":\"1.0.0.0\"},\"templateHash\":\"12083796291331454487\",\"parametersLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.parameters.json\",\"contentVersion\":\"1.0.0.0\"},\"parameters\":{\"vnetName\":{\"type\":\"String\",\"value\":\"VNet1\"},\"vnetAddressPrefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/16\"},\"subnet1Prefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/24\"},\"subnet1Name\":{\"type\":\"String\",\"value\":\"Subnet1\"},\"subnet2Prefix\":{\"type\":\"String\",\"value\":\"10.0.1.0/24\"},\"subnet2Name\":{\"type\":\"String\",\"value\":\"Subnet2\"},\"location\":{\"type\":\"String\",\"value\":\"southcentralus\"}},\"mode\":\"Complete\",\"provisioningState\":\"Accepted\",\"timestamp\":\"2020-03-23T07:09:28.6728462Z\",\"duration\":\"PT3.0386085S\",\"correlationId\":\"3526c738-2290-4f3f-9eef-e2b56cafdc3e\",\"providers\":[{\"namespace\":\"Microsoft.Network\",\"resourceTypes\":[{\"resourceType\":\"virtualNetworks\",\"locations\":[\"southcentralus\"]},{\"resourceType\":\"virtualNetworks/subnets\",\"locations\":[\"southcentralus\"]}]}],\"dependencies\":[{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"},{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}]}}", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operationStatuses/08586166595198433852?api-version=2019-08-01" + "x-ms-request-id" : "45861da2-a515-4f6a-a93c-f932021ea153", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715\",\"name\":\"dpA71866715\",\"type\":\"Microsoft.Resources/deployments\",\"properties\":{\"templateLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json\",\"contentVersion\":\"1.0.0.0\"},\"templateHash\":\"12083796291331454487\",\"parametersLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.parameters.json\",\"contentVersion\":\"1.0.0.0\"},\"parameters\":{\"vnetName\":{\"type\":\"String\",\"value\":\"VNet1\"},\"vnetAddressPrefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/16\"},\"subnet1Prefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/24\"},\"subnet1Name\":{\"type\":\"String\",\"value\":\"Subnet1\"},\"subnet2Prefix\":{\"type\":\"String\",\"value\":\"10.0.1.0/24\"},\"subnet2Name\":{\"type\":\"String\",\"value\":\"Subnet2\"},\"location\":{\"type\":\"String\",\"value\":\"southcentralus\"}},\"mode\":\"Complete\",\"provisioningState\":\"Accepted\",\"timestamp\":\"2020-07-16T05:15:43.5068568Z\",\"duration\":\"PT3.2419107S\",\"correlationId\":\"45861da2-a515-4f6a-a93c-f932021ea153\",\"providers\":[{\"namespace\":\"Microsoft.Network\",\"resourceTypes\":[{\"resourceType\":\"virtualNetworks\",\"locations\":[\"southcentralus\"]},{\"resourceType\":\"virtualNetworks/subnets\",\"locations\":[\"southcentralus\"]}]}],\"dependencies\":[{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"},{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}]}}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operationStatuses/08586067303452126861?api-version=2019-08-01" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operationStatuses/08586166595198433852?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operationStatuses/08586067303452126861?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:10:00 GMT", - "content-length" : "20", + "date" : "Thu, 16 Jul 2020 05:16:16 GMT", + "content-length" : "22", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "x-ms-ratelimit-remaining-subscription-reads" : "11991", "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "ebca7d99-4971-4bc1-b4e0-20b29be50fad", + "x-ms-correlation-request-id" : "c29d8af4-b05f-420b-a5a4-0b7f8780d330", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071000Z:ebca7d99-4971-4bc1-b4e0-20b29be50fad", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051616Z:c29d8af4-b05f-420b-a5a4-0b7f8780d330", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "ebca7d99-4971-4bc1-b4e0-20b29be50fad", - "Body" : "{\"status\":\"Running\"}" + "x-ms-request-id" : "c29d8af4-b05f-420b-a5a4-0b7f8780d330", + "Body" : "{\"status\":\"Succeeded\"}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operationStatuses/08586166595198433852?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:10:30 GMT", - "content-length" : "22", + "date" : "Thu, 16 Jul 2020 05:16:17 GMT", + "content-length" : "3022", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "x-ms-ratelimit-remaining-subscription-reads" : "11990", "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "54b45db3-abf7-4ba8-9d4a-7778de0ecfd8", + "x-ms-correlation-request-id" : "550b6066-0476-4089-a44d-240edb03ab37", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071030Z:54b45db3-abf7-4ba8-9d4a-7778de0ecfd8", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051617Z:550b6066-0476-4089-a44d-240edb03ab37", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "54b45db3-abf7-4ba8-9d4a-7778de0ecfd8", - "Body" : "{\"status\":\"Succeeded\"}" + "x-ms-request-id" : "550b6066-0476-4089-a44d-240edb03ab37", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715\",\"name\":\"dpA71866715\",\"type\":\"Microsoft.Resources/deployments\",\"properties\":{\"templateLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json\",\"contentVersion\":\"1.0.0.0\"},\"templateHash\":\"12083796291331454487\",\"parametersLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.parameters.json\",\"contentVersion\":\"1.0.0.0\"},\"parameters\":{\"vnetName\":{\"type\":\"String\",\"value\":\"VNet1\"},\"vnetAddressPrefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/16\"},\"subnet1Prefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/24\"},\"subnet1Name\":{\"type\":\"String\",\"value\":\"Subnet1\"},\"subnet2Prefix\":{\"type\":\"String\",\"value\":\"10.0.1.0/24\"},\"subnet2Name\":{\"type\":\"String\",\"value\":\"Subnet2\"},\"location\":{\"type\":\"String\",\"value\":\"southcentralus\"}},\"mode\":\"Complete\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:15.9172597Z\",\"duration\":\"PT35.6523136S\",\"correlationId\":\"45861da2-a515-4f6a-a93c-f932021ea153\",\"providers\":[{\"namespace\":\"Microsoft.Network\",\"resourceTypes\":[{\"resourceType\":\"virtualNetworks\",\"locations\":[\"southcentralus\"]},{\"resourceType\":\"virtualNetworks/subnets\",\"locations\":[\"southcentralus\"]}]}],\"dependencies\":[{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"},{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}],\"outputResources\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\"}]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Resources/deployments/?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", + "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:00 GMT", - "content-length" : "3022", + "date" : "Thu, 16 Jul 2020 05:16:18 GMT", + "content-length" : "3034", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "x-ms-ratelimit-remaining-subscription-reads" : "11989", "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "bbbe0856-3f4e-4929-92c9-aa146d85b5bf", + "x-ms-correlation-request-id" : "912b4b76-d8e2-4395-babd-a47e16aeafef", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071101Z:bbbe0856-3f4e-4929-92c9-aa146d85b5bf", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051618Z:912b4b76-d8e2-4395-babd-a47e16aeafef", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "bbbe0856-3f4e-4929-92c9-aa146d85b5bf", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023\",\"name\":\"dpA76e16023\",\"type\":\"Microsoft.Resources/deployments\",\"properties\":{\"templateLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json\",\"contentVersion\":\"1.0.0.0\"},\"templateHash\":\"12083796291331454487\",\"parametersLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.parameters.json\",\"contentVersion\":\"1.0.0.0\"},\"parameters\":{\"vnetName\":{\"type\":\"String\",\"value\":\"VNet1\"},\"vnetAddressPrefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/16\"},\"subnet1Prefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/24\"},\"subnet1Name\":{\"type\":\"String\",\"value\":\"Subnet1\"},\"subnet2Prefix\":{\"type\":\"String\",\"value\":\"10.0.1.0/24\"},\"subnet2Name\":{\"type\":\"String\",\"value\":\"Subnet2\"},\"location\":{\"type\":\"String\",\"value\":\"southcentralus\"}},\"mode\":\"Complete\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:10:05.2180555Z\",\"duration\":\"PT39.5838178S\",\"correlationId\":\"3526c738-2290-4f3f-9eef-e2b56cafdc3e\",\"providers\":[{\"namespace\":\"Microsoft.Network\",\"resourceTypes\":[{\"resourceType\":\"virtualNetworks\",\"locations\":[\"southcentralus\"]},{\"resourceType\":\"virtualNetworks/subnets\",\"locations\":[\"southcentralus\"]}]}],\"dependencies\":[{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"},{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}],\"outputResources\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\"}]}}" + "x-ms-request-id" : "912b4b76-d8e2-4395-babd-a47e16aeafef", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715\",\"name\":\"dpA71866715\",\"type\":\"Microsoft.Resources/deployments\",\"properties\":{\"templateLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json\",\"contentVersion\":\"1.0.0.0\"},\"templateHash\":\"12083796291331454487\",\"parametersLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.parameters.json\",\"contentVersion\":\"1.0.0.0\"},\"parameters\":{\"vnetName\":{\"type\":\"String\",\"value\":\"VNet1\"},\"vnetAddressPrefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/16\"},\"subnet1Prefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/24\"},\"subnet1Name\":{\"type\":\"String\",\"value\":\"Subnet1\"},\"subnet2Prefix\":{\"type\":\"String\",\"value\":\"10.0.1.0/24\"},\"subnet2Name\":{\"type\":\"String\",\"value\":\"Subnet2\"},\"location\":{\"type\":\"String\",\"value\":\"southcentralus\"}},\"mode\":\"Complete\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:15.9172597Z\",\"duration\":\"PT35.6523136S\",\"correlationId\":\"45861da2-a515-4f6a-a93c-f932021ea153\",\"providers\":[{\"namespace\":\"Microsoft.Network\",\"resourceTypes\":[{\"resourceType\":\"virtualNetworks\",\"locations\":[\"southcentralus\"]},{\"resourceType\":\"virtualNetworks/subnets\",\"locations\":[\"southcentralus\"]}]}],\"dependencies\":[{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"},{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}],\"outputResources\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\"}]}}]}" } }, { - "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Resources/deployments/?api-version=2019-08-01", + "Method" : "HEAD", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:01 GMT", - "content-length" : "3034", + "date" : "Thu, 16 Jul 2020 05:16:19 GMT", + "content-length" : "0", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11996", - "StatusCode" : "200", + "x-ms-ratelimit-remaining-subscription-reads" : "11988", + "StatusCode" : "204", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "8609d533-c509-4c27-b179-dafccfcfe42b", + "x-ms-correlation-request-id" : "89d9b019-cca4-4ec2-8d71-13ec4615aa16", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071101Z:8609d533-c509-4c27-b179-dafccfcfe42b", - "content-type" : "application/json; charset=utf-8", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051619Z:89d9b019-cca4-4ec2-8d71-13ec4615aa16", "cache-control" : "no-cache", - "x-ms-request-id" : "8609d533-c509-4c27-b179-dafccfcfe42b", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023\",\"name\":\"dpA76e16023\",\"type\":\"Microsoft.Resources/deployments\",\"properties\":{\"templateLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json\",\"contentVersion\":\"1.0.0.0\"},\"templateHash\":\"12083796291331454487\",\"parametersLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.parameters.json\",\"contentVersion\":\"1.0.0.0\"},\"parameters\":{\"vnetName\":{\"type\":\"String\",\"value\":\"VNet1\"},\"vnetAddressPrefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/16\"},\"subnet1Prefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/24\"},\"subnet1Name\":{\"type\":\"String\",\"value\":\"Subnet1\"},\"subnet2Prefix\":{\"type\":\"String\",\"value\":\"10.0.1.0/24\"},\"subnet2Name\":{\"type\":\"String\",\"value\":\"Subnet2\"},\"location\":{\"type\":\"String\",\"value\":\"southcentralus\"}},\"mode\":\"Complete\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:10:05.2180555Z\",\"duration\":\"PT39.5838178S\",\"correlationId\":\"3526c738-2290-4f3f-9eef-e2b56cafdc3e\",\"providers\":[{\"namespace\":\"Microsoft.Network\",\"resourceTypes\":[{\"resourceType\":\"virtualNetworks\",\"locations\":[\"southcentralus\"]},{\"resourceType\":\"virtualNetworks/subnets\",\"locations\":[\"southcentralus\"]}]}],\"dependencies\":[{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"},{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}],\"outputResources\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\"}]}}]}" + "x-ms-request-id" : "89d9b019-cca4-4ec2-8d71-13ec4615aa16", + "Body" : "" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:02 GMT", + "date" : "Thu, 16 Jul 2020 05:16:20 GMT", "content-length" : "3022", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "x-ms-ratelimit-remaining-subscription-reads" : "11987", "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "033dd6d2-0550-4497-b37e-535354bd56a9", + "x-ms-correlation-request-id" : "5a724852-d58e-4afd-8f9c-45170267f2fb", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071102Z:033dd6d2-0550-4497-b37e-535354bd56a9", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051620Z:5a724852-d58e-4afd-8f9c-45170267f2fb", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "033dd6d2-0550-4497-b37e-535354bd56a9", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023\",\"name\":\"dpA76e16023\",\"type\":\"Microsoft.Resources/deployments\",\"properties\":{\"templateLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json\",\"contentVersion\":\"1.0.0.0\"},\"templateHash\":\"12083796291331454487\",\"parametersLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.parameters.json\",\"contentVersion\":\"1.0.0.0\"},\"parameters\":{\"vnetName\":{\"type\":\"String\",\"value\":\"VNet1\"},\"vnetAddressPrefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/16\"},\"subnet1Prefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/24\"},\"subnet1Name\":{\"type\":\"String\",\"value\":\"Subnet1\"},\"subnet2Prefix\":{\"type\":\"String\",\"value\":\"10.0.1.0/24\"},\"subnet2Name\":{\"type\":\"String\",\"value\":\"Subnet2\"},\"location\":{\"type\":\"String\",\"value\":\"southcentralus\"}},\"mode\":\"Complete\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:10:05.2180555Z\",\"duration\":\"PT39.5838178S\",\"correlationId\":\"3526c738-2290-4f3f-9eef-e2b56cafdc3e\",\"providers\":[{\"namespace\":\"Microsoft.Network\",\"resourceTypes\":[{\"resourceType\":\"virtualNetworks\",\"locations\":[\"southcentralus\"]},{\"resourceType\":\"virtualNetworks/subnets\",\"locations\":[\"southcentralus\"]}]}],\"dependencies\":[{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"},{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}],\"outputResources\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\"}]}}" + "x-ms-request-id" : "5a724852-d58e-4afd-8f9c-45170267f2fb", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715\",\"name\":\"dpA71866715\",\"type\":\"Microsoft.Resources/deployments\",\"properties\":{\"templateLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json\",\"contentVersion\":\"1.0.0.0\"},\"templateHash\":\"12083796291331454487\",\"parametersLink\":{\"uri\":\"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.parameters.json\",\"contentVersion\":\"1.0.0.0\"},\"parameters\":{\"vnetName\":{\"type\":\"String\",\"value\":\"VNet1\"},\"vnetAddressPrefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/16\"},\"subnet1Prefix\":{\"type\":\"String\",\"value\":\"10.0.0.0/24\"},\"subnet1Name\":{\"type\":\"String\",\"value\":\"Subnet1\"},\"subnet2Prefix\":{\"type\":\"String\",\"value\":\"10.0.1.0/24\"},\"subnet2Name\":{\"type\":\"String\",\"value\":\"Subnet2\"},\"location\":{\"type\":\"String\",\"value\":\"southcentralus\"}},\"mode\":\"Complete\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:15.9172597Z\",\"duration\":\"PT35.6523136S\",\"correlationId\":\"45861da2-a515-4f6a-a93c-f932021ea153\",\"providers\":[{\"namespace\":\"Microsoft.Network\",\"resourceTypes\":[{\"resourceType\":\"virtualNetworks\",\"locations\":[\"southcentralus\"]},{\"resourceType\":\"virtualNetworks/subnets\",\"locations\":[\"southcentralus\"]}]}],\"dependencies\":[{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"},{\"dependsOn\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}],\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}],\"outputResources\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\"}]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Network//virtualnetworks/VNet1?api-version=2015-06-15", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Network//virtualnetworks/VNet1?api-version=2015-06-15", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:01 GMT", + "date" : "Thu, 16 Jul 2020 05:16:20 GMT", "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "1455", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "x-ms-ratelimit-remaining-subscription-reads" : "11986", "StatusCode" : "200", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "e96abb3b-6565-4904-92e5-0c2c24a29bfe", + "x-ms-correlation-request-id" : "4a134ecc-b7d3-4c93-8ca6-7577595a3743", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-arm-service-request-id" : "fbc6a2e2-7c03-4f4a-b79d-1f29b8516c6c", + "x-ms-arm-service-request-id" : "4f5033cb-e935-4d86-8e67-7fd9037bdb67", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071102Z:e96abb3b-6565-4904-92e5-0c2c24a29bfe", - "etag" : "W/\"836f6e7c-d361-4f50-b3ab-a72f553c4098\"", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051620Z:4a134ecc-b7d3-4c93-8ca6-7577595a3743", + "etag" : "W/\"dba4bd4e-3521-4a26-97a6-a940d37e0883\"", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "8f01e5e8-00e3-4921-94fe-74be7e9e6772", - "Body" : "{\r\n \"name\": \"VNet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\r\n \"etag\": \"W/\\\"836f6e7c-d361-4f50-b3ab-a72f553c4098\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"7a451128-5ed1-4164-91c4-feaccd49081a\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"Subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\r\n \"etag\": \"W/\\\"836f6e7c-d361-4f50-b3ab-a72f553c4098\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n },\r\n {\r\n \"name\": \"Subnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\r\n \"etag\": \"W/\\\"836f6e7c-d361-4f50-b3ab-a72f553c4098\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ]\r\n }\r\n}" + "x-ms-request-id" : "2fc014a4-0f69-49f5-84ad-2f3ac0834891", + "Body" : "{\r\n \"name\": \"VNet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\r\n \"etag\": \"W/\\\"dba4bd4e-3521-4a26-97a6-a940d37e0883\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"c6ae76f8-49c7-4891-aa58-283ca2a6acb7\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"Subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\r\n \"etag\": \"W/\\\"dba4bd4e-3521-4a26-97a6-a940d37e0883\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n },\r\n {\r\n \"name\": \"Subnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\r\n \"etag\": \"W/\\\"dba4bd4e-3521-4a26-97a6-a940d37e0883\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ]\r\n }\r\n}" } }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/exportTemplate?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/exportTemplate?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:03 GMT", + "date" : "Thu, 16 Jul 2020 05:16:21 GMT", "content-length" : "1648", "expires" : "-1", "x-ms-ratelimit-remaining-subscription-writes" : "1199", @@ -208,212 +208,214 @@ "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "41adbab3-13e9-40ce-ba8c-de87d9f4368e", + "x-ms-correlation-request-id" : "47725d23-f40a-4838-ba68-1a7cb48eae6e", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071103Z:41adbab3-13e9-40ce-ba8c-de87d9f4368e", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051622Z:47725d23-f40a-4838-ba68-1a7cb48eae6e", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "41adbab3-13e9-40ce-ba8c-de87d9f4368e", + "x-ms-request-id" : "47725d23-f40a-4838-ba68-1a7cb48eae6e", "Body" : "{\"template\":{\"$schema\":\"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"parameters\":{\"vnetName\":{\"defaultValue\":\"VNet1\",\"type\":\"String\",\"metadata\":{\"description\":\"VNet name\"}},\"vnetAddressPrefix\":{\"defaultValue\":\"10.0.0.0/16\",\"type\":\"String\",\"metadata\":{\"description\":\"Address prefix\"}},\"subnet1Prefix\":{\"defaultValue\":\"10.0.0.0/24\",\"type\":\"String\",\"metadata\":{\"description\":\"Subnet 1 Prefix\"}},\"subnet1Name\":{\"defaultValue\":\"Subnet1\",\"type\":\"String\",\"metadata\":{\"description\":\"Subnet 1 Name\"}},\"subnet2Prefix\":{\"defaultValue\":\"10.0.1.0/24\",\"type\":\"String\",\"metadata\":{\"description\":\"Subnet 2 Prefix\"}},\"subnet2Name\":{\"defaultValue\":\"Subnet2\",\"type\":\"String\",\"metadata\":{\"description\":\"Subnet 2 Name\"}},\"location\":{\"defaultValue\":\"[resourceGroup().location]\",\"type\":\"String\",\"metadata\":{\"description\":\"Location for all resources.\"}}},\"variables\":{},\"resources\":[{\"type\":\"Microsoft.Network/virtualNetworks\",\"apiVersion\":\"2018-10-01\",\"name\":\"[parameters('vnetName')]\",\"location\":\"[parameters('location')]\",\"properties\":{\"addressSpace\":{\"addressPrefixes\":[\"[parameters('vnetAddressPrefix')]\"]}},\"resources\":[{\"type\":\"subnets\",\"apiVersion\":\"2018-10-01\",\"name\":\"[parameters('subnet1Name')]\",\"location\":\"[parameters('location')]\",\"dependsOn\":[\"[parameters('vnetName')]\"],\"properties\":{\"addressPrefix\":\"[parameters('subnet1Prefix')]\"}},{\"type\":\"subnets\",\"apiVersion\":\"2018-10-01\",\"name\":\"[parameters('subnet2Name')]\",\"location\":\"[parameters('location')]\",\"dependsOn\":[\"[parameters('vnetName')]\",\"[parameters('subnet1Name')]\"],\"properties\":{\"addressPrefix\":\"[parameters('subnet2Prefix')]\"}}]}]}}" } }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/exportTemplate?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/exportTemplate?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:04 GMT", + "date" : "Thu, 16 Jul 2020 05:16:24 GMT", "content-length" : "2265", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "x-ms-ratelimit-remaining-subscription-reads" : "11985", "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "68e46fc5-6e96-4262-bd93-0f36a9dcbae5", + "x-ms-correlation-request-id" : "7ff5193e-7715-4a48-b6b9-5af99cc8625b", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071105Z:68e46fc5-6e96-4262-bd93-0f36a9dcbae5", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051624Z:7ff5193e-7715-4a48-b6b9-5af99cc8625b", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "68e46fc5-6e96-4262-bd93-0f36a9dcbae5", - "Body" : "{\"template\":{\"$schema\":\"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"parameters\":{\"virtualNetworks_VNet1_name\":{\"defaultValue\":\"VNet1\",\"type\":\"String\"}},\"variables\":{},\"resources\":[{\"type\":\"Microsoft.Network/virtualNetworks\",\"apiVersion\":\"2019-11-01\",\"name\":\"[parameters('virtualNetworks_VNet1_name')]\",\"comments\":\"Generalized from resource: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1'.\",\"location\":\"southcentralus\",\"properties\":{\"addressSpace\":{\"addressPrefixes\":[\"10.0.0.0/16\"]},\"subnets\":[{\"name\":\"Subnet1\",\"properties\":{\"addressPrefix\":\"10.0.0.0/24\",\"delegations\":[],\"privateEndpointNetworkPolicies\":\"Enabled\",\"privateLinkServiceNetworkPolicies\":\"Enabled\"}},{\"name\":\"Subnet2\",\"properties\":{\"addressPrefix\":\"10.0.1.0/24\",\"delegations\":[],\"privateEndpointNetworkPolicies\":\"Enabled\",\"privateLinkServiceNetworkPolicies\":\"Enabled\"}}],\"virtualNetworkPeerings\":[],\"enableDdosProtection\":false,\"enableVmProtection\":false}},{\"type\":\"Microsoft.Network/virtualNetworks/subnets\",\"apiVersion\":\"2019-11-01\",\"name\":\"[concat(parameters('virtualNetworks_VNet1_name'), '/Subnet1')]\",\"comments\":\"Generalized from resource: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1'.\",\"dependsOn\":[\"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_VNet1_name'))]\"],\"properties\":{\"addressPrefix\":\"10.0.0.0/24\",\"delegations\":[],\"privateEndpointNetworkPolicies\":\"Enabled\",\"privateLinkServiceNetworkPolicies\":\"Enabled\"}},{\"type\":\"Microsoft.Network/virtualNetworks/subnets\",\"apiVersion\":\"2019-11-01\",\"name\":\"[concat(parameters('virtualNetworks_VNet1_name'), '/Subnet2')]\",\"comments\":\"Generalized from resource: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2'.\",\"dependsOn\":[\"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_VNet1_name'))]\"],\"properties\":{\"addressPrefix\":\"10.0.1.0/24\",\"delegations\":[],\"privateEndpointNetworkPolicies\":\"Enabled\",\"privateLinkServiceNetworkPolicies\":\"Enabled\"}}]}}" + "x-ms-request-id" : "7ff5193e-7715-4a48-b6b9-5af99cc8625b", + "Body" : "{\"template\":{\"$schema\":\"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"parameters\":{\"virtualNetworks_VNet1_name\":{\"defaultValue\":\"VNet1\",\"type\":\"String\"}},\"variables\":{},\"resources\":[{\"type\":\"Microsoft.Network/virtualNetworks\",\"apiVersion\":\"2020-05-01\",\"name\":\"[parameters('virtualNetworks_VNet1_name')]\",\"comments\":\"Generalized from resource: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1'.\",\"location\":\"southcentralus\",\"properties\":{\"addressSpace\":{\"addressPrefixes\":[\"10.0.0.0/16\"]},\"subnets\":[{\"name\":\"Subnet1\",\"properties\":{\"addressPrefix\":\"10.0.0.0/24\",\"delegations\":[],\"privateEndpointNetworkPolicies\":\"Enabled\",\"privateLinkServiceNetworkPolicies\":\"Enabled\"}},{\"name\":\"Subnet2\",\"properties\":{\"addressPrefix\":\"10.0.1.0/24\",\"delegations\":[],\"privateEndpointNetworkPolicies\":\"Enabled\",\"privateLinkServiceNetworkPolicies\":\"Enabled\"}}],\"virtualNetworkPeerings\":[],\"enableDdosProtection\":false,\"enableVmProtection\":false}},{\"type\":\"Microsoft.Network/virtualNetworks/subnets\",\"apiVersion\":\"2020-05-01\",\"name\":\"[concat(parameters('virtualNetworks_VNet1_name'), '/Subnet1')]\",\"comments\":\"Generalized from resource: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1'.\",\"dependsOn\":[\"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_VNet1_name'))]\"],\"properties\":{\"addressPrefix\":\"10.0.0.0/24\",\"delegations\":[],\"privateEndpointNetworkPolicies\":\"Enabled\",\"privateLinkServiceNetworkPolicies\":\"Enabled\"}},{\"type\":\"Microsoft.Network/virtualNetworks/subnets\",\"apiVersion\":\"2020-05-01\",\"name\":\"[concat(parameters('virtualNetworks_VNet1_name'), '/Subnet2')]\",\"comments\":\"Generalized from resource: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2'.\",\"dependsOn\":[\"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_VNet1_name'))]\"],\"properties\":{\"addressPrefix\":\"10.0.1.0/24\",\"delegations\":[],\"privateEndpointNetworkPolicies\":\"Enabled\",\"privateLinkServiceNetworkPolicies\":\"Enabled\"}}]}}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/deployments/dpA76e16023/operations?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/deployments/dpA71866715/operations?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:05 GMT", - "content-length" : "2665", + "date" : "Thu, 16 Jul 2020 05:16:25 GMT", + "content-length" : "2663", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "x-ms-ratelimit-remaining-subscription-reads" : "11984", "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "45058ffb-9d81-4b74-9675-31f71b2cf0bc", + "x-ms-correlation-request-id" : "82a439c6-acf4-49b5-9716-b71924ed30f3", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071106Z:45058ffb-9d81-4b74-9675-31f71b2cf0bc", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051625Z:82a439c6-acf4-49b5-9716-b71924ed30f3", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "45058ffb-9d81-4b74-9675-31f71b2cf0bc", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/A05C097753F49758\",\"operationId\":\"A05C097753F49758\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:10:04.1901518Z\",\"duration\":\"PT6.3243881S\",\"trackingId\":\"8a74cabe-cb46-46ac-ae56-55e4da61bf78\",\"serviceRequestId\":\"76b8fd52-4aaf-44d3-ba4b-dc36b98e0847\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/3C29AAFA2F93A1DD\",\"operationId\":\"3C29AAFA2F93A1DD\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:09:57.7177324Z\",\"duration\":\"PT7.7747916S\",\"trackingId\":\"8fbd0008-198e-4679-a722-2385cf62ccb8\",\"serviceRequestId\":\"41aab892-080c-4aae-8bce-17d3cada8785\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/043062AB370BA4AD\",\"operationId\":\"043062AB370BA4AD\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:09:49.7803874Z\",\"duration\":\"PT16.6266378S\",\"trackingId\":\"52e9b397-45fc-42ff-aae0-815acc5de893\",\"serviceRequestId\":\"54e66886-4652-4177-90df-75ac15a0d41d\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/08586166595198433852\",\"operationId\":\"08586166595198433852\",\"properties\":{\"provisioningOperation\":\"EvaluateDeploymentOutput\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:10:04.9967424Z\",\"duration\":\"PT0.2939247S\",\"trackingId\":\"15c88d18-22d7-4e6e-8ae4-02dce5bf5345\",\"statusCode\":\"OK\",\"statusMessage\":null}}]}" + "x-ms-request-id" : "82a439c6-acf4-49b5-9716-b71924ed30f3", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/0D4F50D3D75AAA8D\",\"operationId\":\"0D4F50D3D75AAA8D\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:15.5229217Z\",\"duration\":\"PT8.7983157S\",\"trackingId\":\"33d2f87c-fb7d-420f-9415-a67b5ef7ca73\",\"serviceRequestId\":\"b50902c8-1fb1-446f-a1d1-14bf7f244230\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/3264228384830D4F\",\"operationId\":\"3264228384830D4F\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:06.6926907Z\",\"duration\":\"PT8.2065837S\",\"trackingId\":\"ac4ea0d3-3b8a-4ad2-a429-204ce5b4ba60\",\"serviceRequestId\":\"405819d5-b3b5-4bdb-a82d-f68bf09f0e91\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/08D9091E6E7B73CC\",\"operationId\":\"08D9091E6E7B73CC\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:15:58.4497597Z\",\"duration\":\"PT15.1380388S\",\"trackingId\":\"57ed9772-add2-4399-af3f-2f2ad413bc41\",\"serviceRequestId\":\"8ad81f7b-6175-4903-a9d7-85aa48136096\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/08586067303452126861\",\"operationId\":\"08586067303452126861\",\"properties\":{\"provisioningOperation\":\"EvaluateDeploymentOutput\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:15.8999839Z\",\"duration\":\"PT0.07745S\",\"trackingId\":\"32550a2b-c018-45f6-b074-80bab5de27ed\",\"statusCode\":\"OK\",\"statusMessage\":null}}]}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/deployments/dpA76e16023/operations?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/deployments/dpA71866715/operations?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:06 GMT", - "content-length" : "2665", + "date" : "Thu, 16 Jul 2020 05:16:26 GMT", + "content-length" : "2663", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "x-ms-ratelimit-remaining-subscription-reads" : "11983", "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "0454d417-c925-4a36-ae92-4f57501ccf41", + "x-ms-correlation-request-id" : "f0b7dade-d5f3-402b-a5f7-5cbf5fbfc7ed", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071107Z:0454d417-c925-4a36-ae92-4f57501ccf41", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051626Z:f0b7dade-d5f3-402b-a5f7-5cbf5fbfc7ed", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "0454d417-c925-4a36-ae92-4f57501ccf41", - "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/A05C097753F49758\",\"operationId\":\"A05C097753F49758\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:10:04.1901518Z\",\"duration\":\"PT6.3243881S\",\"trackingId\":\"8a74cabe-cb46-46ac-ae56-55e4da61bf78\",\"serviceRequestId\":\"76b8fd52-4aaf-44d3-ba4b-dc36b98e0847\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/3C29AAFA2F93A1DD\",\"operationId\":\"3C29AAFA2F93A1DD\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:09:57.7177324Z\",\"duration\":\"PT7.7747916S\",\"trackingId\":\"8fbd0008-198e-4679-a722-2385cf62ccb8\",\"serviceRequestId\":\"41aab892-080c-4aae-8bce-17d3cada8785\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/043062AB370BA4AD\",\"operationId\":\"043062AB370BA4AD\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:09:49.7803874Z\",\"duration\":\"PT16.6266378S\",\"trackingId\":\"52e9b397-45fc-42ff-aae0-815acc5de893\",\"serviceRequestId\":\"54e66886-4652-4177-90df-75ac15a0d41d\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/08586166595198433852\",\"operationId\":\"08586166595198433852\",\"properties\":{\"provisioningOperation\":\"EvaluateDeploymentOutput\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:10:04.9967424Z\",\"duration\":\"PT0.2939247S\",\"trackingId\":\"15c88d18-22d7-4e6e-8ae4-02dce5bf5345\",\"statusCode\":\"OK\",\"statusMessage\":null}}]}" + "x-ms-request-id" : "f0b7dade-d5f3-402b-a5f7-5cbf5fbfc7ed", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/0D4F50D3D75AAA8D\",\"operationId\":\"0D4F50D3D75AAA8D\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:15.5229217Z\",\"duration\":\"PT8.7983157S\",\"trackingId\":\"33d2f87c-fb7d-420f-9415-a67b5ef7ca73\",\"serviceRequestId\":\"b50902c8-1fb1-446f-a1d1-14bf7f244230\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/3264228384830D4F\",\"operationId\":\"3264228384830D4F\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:06.6926907Z\",\"duration\":\"PT8.2065837S\",\"trackingId\":\"ac4ea0d3-3b8a-4ad2-a429-204ce5b4ba60\",\"serviceRequestId\":\"405819d5-b3b5-4bdb-a82d-f68bf09f0e91\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet1\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/08D9091E6E7B73CC\",\"operationId\":\"08D9091E6E7B73CC\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:15:58.4497597Z\",\"duration\":\"PT15.1380388S\",\"trackingId\":\"57ed9772-add2-4399-af3f-2f2ad413bc41\",\"serviceRequestId\":\"8ad81f7b-6175-4903-a9d7-85aa48136096\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1\",\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"resourceName\":\"VNet1\"}}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/08586067303452126861\",\"operationId\":\"08586067303452126861\",\"properties\":{\"provisioningOperation\":\"EvaluateDeploymentOutput\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:15.8999839Z\",\"duration\":\"PT0.07745S\",\"trackingId\":\"32550a2b-c018-45f6-b074-80bab5de27ed\",\"statusCode\":\"OK\",\"statusMessage\":null}}]}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/deployments/dpA76e16023/operations/A05C097753F49758?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/deployments/dpA71866715/operations/0D4F50D3D75AAA8D?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:07 GMT", + "date" : "Thu, 16 Jul 2020 05:16:27 GMT", "content-length" : "738", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "x-ms-ratelimit-remaining-subscription-reads" : "11982", "StatusCode" : "200", "strict-transport-security" : "max-age=31536000; includeSubDomains", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "3ab544bc-2c2d-4ab2-921b-c078753b999a", + "x-ms-correlation-request-id" : "6543b4b3-e74e-44da-af37-45ed82e7f58b", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071107Z:3ab544bc-2c2d-4ab2-921b-c078753b999a", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051627Z:6543b4b3-e74e-44da-af37-45ed82e7f58b", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "3ab544bc-2c2d-4ab2-921b-c078753b999a", - "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Resources/deployments/dpA76e16023/operations/A05C097753F49758\",\"operationId\":\"A05C097753F49758\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-03-23T07:10:04.1901518Z\",\"duration\":\"PT6.3243881S\",\"trackingId\":\"8a74cabe-cb46-46ac-ae56-55e4da61bf78\",\"serviceRequestId\":\"76b8fd52-4aaf-44d3-ba4b-dc36b98e0847\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg76e16023/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}}}" + "x-ms-request-id" : "6543b4b3-e74e-44da-af37-45ed82e7f58b", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Resources/deployments/dpA71866715/operations/0D4F50D3D75AAA8D\",\"operationId\":\"0D4F50D3D75AAA8D\",\"properties\":{\"provisioningOperation\":\"Create\",\"provisioningState\":\"Succeeded\",\"timestamp\":\"2020-07-16T05:16:15.5229217Z\",\"duration\":\"PT8.7983157S\",\"trackingId\":\"33d2f87c-fb7d-420f-9415-a67b5ef7ca73\",\"serviceRequestId\":\"b50902c8-1fb1-446f-a1d1-14bf7f244230\",\"statusCode\":\"OK\",\"targetResource\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg71866715/providers/Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet2\",\"resourceType\":\"Microsoft.Network/virtualNetworks/subnets\",\"resourceName\":\"VNet1/Subnet2\"}}}" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023/providers/Microsoft.Network//virtualnetworks/VNet1?api-version=2015-06-15", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715/providers/Microsoft.Network//virtualnetworks/VNet1?api-version=2015-06-15", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:08 GMT", + "date" : "Thu, 16 Jul 2020 05:16:28 GMT", "server" : "Microsoft-HTTPAPI/2.0", + "azure-asyncnotification" : "Enabled", "content-length" : "0", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14999", + "x-ms-ratelimit-remaining-subscription-deletes" : "14998", "retry-after" : "0", "StatusCode" : "202", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "c0903f79-a49e-4e73-8506-74114e2c7b1b", + "x-ms-correlation-request-id" : "ebc15ff7-e095-4ca2-98da-99001235cbb8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-arm-service-request-id" : "f8c41291-d0f0-4118-821a-6f39c1eda2fe", + "x-ms-arm-service-request-id" : "7099a698-0a56-4fc6-864f-718117da1a14", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071108Z:c0903f79-a49e-4e73-8506-74114e2c7b1b", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operationResults/8686e17d-6d70-4ffe-9998-9d97c4c6e727?api-version=2015-06-15", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051628Z:ebc15ff7-e095-4ca2-98da-99001235cbb8", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operationResults/b01c57e5-767e-4148-800a-ad985725200a?api-version=2015-06-15", "cache-control" : "no-cache", - "x-ms-request-id" : "8686e17d-6d70-4ffe-9998-9d97c4c6e727", + "x-ms-request-id" : "b01c57e5-767e-4148-800a-ad985725200a", "Body" : "", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operations/8686e17d-6d70-4ffe-9998-9d97c4c6e727?api-version=2015-06-15" + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operations/b01c57e5-767e-4148-800a-ad985725200a?api-version=2015-06-15" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operations/8686e17d-6d70-4ffe-9998-9d97c4c6e727?api-version=2015-06-15", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operations/b01c57e5-767e-4148-800a-ad985725200a?api-version=2015-06-15", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:11:38 GMT", + "date" : "Thu, 16 Jul 2020 05:16:40 GMT", "server" : "Microsoft-HTTPAPI/2.0", "content-length" : "29", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11993", + "x-ms-ratelimit-remaining-subscription-reads" : "11981", "StatusCode" : "200", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "0cbf3f2e-2783-47a7-ab11-e373fcc7fc6a", + "x-ms-correlation-request-id" : "78e6cbc6-9a13-4254-9378-511c36180c8f", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-arm-service-request-id" : "23bf45a8-a9ba-4aad-9596-3d89899a2c2a", + "x-ms-arm-service-request-id" : "1d2e15e0-daaf-415f-8b69-01568b606d39", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071139Z:0cbf3f2e-2783-47a7-ab11-e373fcc7fc6a", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051640Z:78e6cbc6-9a13-4254-9378-511c36180c8f", "content-type" : "application/json; charset=utf-8", "cache-control" : "no-cache", - "x-ms-request-id" : "3910001a-7573-4674-ba7b-5197bf2182a4", + "x-ms-request-id" : "88887f89-6e68-4d81-8891-9c43c33e4c31", "Body" : "{\r\n \"status\": \"Succeeded\"\r\n}" } }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operationResults/8686e17d-6d70-4ffe-9998-9d97c4c6e727?api-version=2015-06-15", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operationResults/b01c57e5-767e-4148-800a-ad985725200a?api-version=2015-06-15", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)" + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (14.0.1; Windows 10; 10.0)" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:12:09 GMT", + "date" : "Thu, 16 Jul 2020 05:16:40 GMT", "server" : "Microsoft-HTTPAPI/2.0", + "azure-asyncnotification" : "Enabled", "expires" : "-1", "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11991", + "x-ms-ratelimit-remaining-subscription-reads" : "11980", "StatusCode" : "204", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "c0903f79-a49e-4e73-8506-74114e2c7b1b", + "x-ms-correlation-request-id" : "ebc15ff7-e095-4ca2-98da-99001235cbb8", "strict-transport-security" : "max-age=31536000; includeSubDomains", - "x-ms-arm-service-request-id" : "f8c41291-d0f0-4118-821a-6f39c1eda2fe", + "x-ms-arm-service-request-id" : "7099a698-0a56-4fc6-864f-718117da1a14", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071209Z:952123b9-bc32-4964-a3d4-96fd86602efd", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051641Z:9f01bc13-d04e-448d-8f74-302e9c474b54", "content-type" : "application/json; charset=utf-8", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operationResults/8686e17d-6d70-4ffe-9998-9d97c4c6e727?api-version=2015-06-15", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operationResults/b01c57e5-767e-4148-800a-ad985725200a?api-version=2015-06-15", "cache-control" : "no-cache", - "x-ms-request-id" : "8686e17d-6d70-4ffe-9998-9d97c4c6e727", + "x-ms-request-id" : "b01c57e5-767e-4148-800a-ad985725200a", "Body" : "", - "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operations/8686e17d-6d70-4ffe-9998-9d97c4c6e727?api-version=2015-06-15" + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/southcentralus/operations/b01c57e5-767e-4148-800a-ad985725200a?api-version=2015-06-15" } }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg76e16023?api-version=2019-08-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg71866715?api-version=2019-08-01", "Headers" : { - "User-Agent" : "azsdk-java-com.azure.management/null (13.0.1; Windows 10 10.0)", + "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources/2.0.0-SNAPSHOT (14.0.1; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "date" : "Mon, 23 Mar 2020 07:12:11 GMT", + "date" : "Thu, 16 Jul 2020 05:16:45 GMT", "content-length" : "0", "expires" : "-1", - "x-ms-ratelimit-remaining-subscription-deletes" : "14998", + "x-ms-ratelimit-remaining-subscription-deletes" : "14997", "retry-after" : "0", "StatusCode" : "202", "pragma" : "no-cache", - "x-ms-correlation-request-id" : "8f0a02fd-d463-4b23-81ee-6fb3c6c962cf", + "x-ms-correlation-request-id" : "b39aa1e8-de6d-4db4-92b4-e7ce9f11c644", "strict-transport-security" : "max-age=31536000; includeSubDomains", "x-content-type-options" : "nosniff", - "x-ms-routing-request-id" : "SOUTHEASTASIA:20200323T071212Z:8f0a02fd-d463-4b23-81ee-6fb3c6c962cf", - "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzc2RTE2MDIzLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2019-08-01", + "x-ms-routing-request-id" : "SOUTHEASTASIA:20200716T051645Z:b39aa1e8-de6d-4db4-92b4-e7ce9f11c644", + "location" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRzcxODY2NzE1LVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2019-08-01", "cache-control" : "no-cache", - "x-ms-request-id" : "8f0a02fd-d463-4b23-81ee-6fb3c6c962cf", + "x-ms-request-id" : "b39aa1e8-de6d-4db4-92b4-e7ce9f11c644", "Body" : "" } } ], - "variables" : [ "76e16023" ] + "variables" : [ "71866715" ] } \ No newline at end of file diff --git a/sdk/schemaregistry/azure-data-schemaregistry-avro/pom.xml b/sdk/schemaregistry/azure-data-schemaregistry-avro/pom.xml index 519ee9b2104e..ff9d8f470bf9 100644 --- a/sdk/schemaregistry/azure-data-schemaregistry-avro/pom.xml +++ b/sdk/schemaregistry/azure-data-schemaregistry-avro/pom.xml @@ -85,7 +85,6 @@ - com.azure:* org.apache.avro:avro:[1.9.2] diff --git a/sdk/schemaregistry/azure-data-schemaregistry/swagger/swagger.json b/sdk/schemaregistry/azure-data-schemaregistry/swagger/swagger.json index d0a5c092a97c..1d4a5a5ec7d4 100644 --- a/sdk/schemaregistry/azure-data-schemaregistry/swagger/swagger.json +++ b/sdk/schemaregistry/azure-data-schemaregistry/swagger/swagger.json @@ -95,9 +95,20 @@ ] }, "put": { - "summary": "Create schema group", - "description": "Create schema group with specified schema type in registry namespace.", - "operationId": "createGroup", + "summary": "Create or update a schema group", + "description": "Create or update schema group with specified schema type in registry namespace.", + "operationId": "createOrUpdateGroup", + "parameters": [ + { + "name": "If-Match", + "description": "Specify an ETag value to perform update operation only on schema group with a matching Guid value. If a '*' is supplied then update is performed without ETag check. Supplying empty value will enforce the create-only behavior", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], "requestBody": { "description": "schema group description", "required": true, @@ -472,6 +483,10 @@ "schemaType": { "type": "string" }, + "etag": { + "type": "string", + "description": "Define an read-only identifier that uniquely describe an instance of the group. This is returned from get call for update purposes. Setting this on create or update has no effect." + }, "schemaCompatibility": { "type": "integer", "description": "schema compatibility mode enum, defined by supported schema type" diff --git a/sdk/search/azure-search-documents/CHANGELOG.md b/sdk/search/azure-search-documents/CHANGELOG.md index 21c771d16e24..a0fdd1a21cff 100644 --- a/sdk/search/azure-search-documents/CHANGELOG.md +++ b/sdk/search/azure-search-documents/CHANGELOG.md @@ -1,10 +1,27 @@ # Release History -## 11.0.0 (Unreleased) +## 11.1.0-beta.1 (Unreleased) + + +## 11.0.0 (2020-07-13) + - Changed version to 11.0.0. -- Removed preview version `SearchClientOptions.ServiceVersion.V2019_05_06_Preview` - and added version `SearchClientOptions.ServiceVersion.V2020_06_30`. -- Added value constructors for required parameters. +- Removed preview version `SearchClientOptions.ServiceVersion.V2019_05_06_Preview` and added version `SearchClientOptions.ServiceVersion.V2020_06_30`. + +### New Features + +- Added `IndexDocumentsOptions` used to configure document operations. + +### Breaking Changes + +- Moved search result metadata to `SearchPagedFlux` and `SearchPagedIterable` from `SearchPagedResponse`. +- Changed many model classes from fluent setter pattern to immutable constructor pattern. +- Removed `RequestOptions` from APIs, instead use pipeline context to pass per method contextual information. +- Removed strongly type GeoJSON classes. + +### Bug Fixes + +- Removed `implementation` classes from APIs. ## 1.0.0-beta.4 (2020-06-09) - Split `SearchServiceClient` into two clients `SearchIndexClient`, `SearchIndexerClient`. diff --git a/sdk/search/azure-search-documents/README.md b/sdk/search/azure-search-documents/README.md index 3c03e0a53da1..9f1a519d1448 100644 --- a/sdk/search/azure-search-documents/README.md +++ b/sdk/search/azure-search-documents/README.md @@ -21,7 +21,7 @@ The Azure Cognitive Search service is well suited for the following * In a search client application, implement query logic and user experiences similar to commercial web search engines. -Use the Azure Search client library to: +Use the Azure Cognitive Search client library to: * Submit queries for simple and advanced query forms that include fuzzy search, wildcard search, regular expressions. diff --git a/sdk/search/azure-search-documents/pom.xml b/sdk/search/azure-search-documents/pom.xml index 6491151c189a..3429bc5009fa 100644 --- a/sdk/search/azure-search-documents/pom.xml +++ b/sdk/search/azure-search-documents/pom.xml @@ -11,12 +11,12 @@ ../../parents/azure-client-sdk-parent - Microsoft Azure Search client for Java - This package contains client functionality for Microsoft Azure Search + Microsoft Azure Cognitive Search client for Java + This package contains client functionality for Microsoft Azure Cognitive Search com.azure azure-search-documents - 11.0.0 + 11.1.0-beta.1 jar diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java index 66950b98e0b9..4320fc63a350 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchAsyncClient.java @@ -69,7 +69,10 @@ import static com.azure.core.util.FluxUtil.withContext; /** - * Cognitive Search Asynchronous Client to query an index and upload, merge, or delete documents + * This class provides a client that contains the operations for querying an index and uploading, merging, or deleting + * documents in an Azure Cognitive Search service. + * + * @see SearchClientBuilder */ @ServiceClient(builder = SearchClientBuilder.class, isAsync = true) public final class SearchAsyncClient { @@ -213,8 +216,7 @@ public Mono> uploadDocumentsWithResponse(Iterable Mono> uploadDocumentsWithResponse(Iterable documents, IndexDocumentsOptions options, Context context) { - return indexDocumentsWithResponse(buildIndexBatch(documents, IndexActionType.UPLOAD), options, - context); + return indexDocumentsWithResponse(buildIndexBatch(documents, IndexActionType.UPLOAD), options, context); } /** @@ -283,8 +285,7 @@ public Mono> mergeDocumentsWithResponse(Iterable< Mono> mergeDocumentsWithResponse(Iterable documents, IndexDocumentsOptions options, Context context) { - return indexDocumentsWithResponse(buildIndexBatch(documents, IndexActionType.MERGE), options, - context); + return indexDocumentsWithResponse(buildIndexBatch(documents, IndexActionType.MERGE), options, context); } /** @@ -411,8 +412,7 @@ public Mono> deleteDocumentsWithResponse(Iterable Mono> deleteDocumentsWithResponse(Iterable documents, IndexDocumentsOptions options, Context context) { - return indexDocumentsWithResponse(buildIndexBatch(documents, IndexActionType.DELETE), options, - context); + return indexDocumentsWithResponse(buildIndexBatch(documents, IndexActionType.DELETE), options, context); } /** @@ -468,11 +468,9 @@ public Mono> indexDocumentsWithResponse(IndexDocu Mono> indexDocumentsWithResponse(IndexDocumentsBatch batch, IndexDocumentsOptions options, Context context) { try { - IndexDocumentsOptions documentsOptions = (options == null) - ? new IndexDocumentsOptions() : options; + IndexDocumentsOptions documentsOptions = (options == null) ? new IndexDocumentsOptions() : options; return restClient.getDocuments() - .indexWithResponseAsync(IndexBatchBaseConverter.map(batch), null, - context) + .indexWithResponseAsync(IndexBatchBaseConverter.map(batch), null, context) .onErrorMap(MappingUtils::exceptionMapper) .flatMap(response -> (response.getStatusCode() == MULTI_STATUS_CODE && documentsOptions.throwOnAnyError()) @@ -527,22 +525,21 @@ public Mono getDocument(String key, Class modelClass) { * @see Lookup document */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getDocumentWithResponse(String key, Class modelClass, - List selectedFields) { - return withContext(context -> getDocumentWithResponse(key, modelClass, - selectedFields, context)); + public Mono> getDocumentWithResponse(String key, Class modelClass, List selectedFields) { + return withContext(context -> getDocumentWithResponse(key, modelClass, selectedFields, context)); } @SuppressWarnings("unchecked") - Mono> getDocumentWithResponse(String key, Class modelClass, - List selectedFields, Context context) { + Mono> getDocumentWithResponse(String key, Class modelClass, List selectedFields, + Context context) { try { return restClient.getDocuments() .getWithResponseAsync(key, selectedFields, null, context) .onErrorMap(DocumentResponseConversions::exceptionMapper) .map(res -> { if (SearchDocument.class == modelClass) { - TypeReference> typeReference = new TypeReference>() { }; + TypeReference> typeReference = new TypeReference>() { + }; SearchDocument doc = new SearchDocument(MAPPER.convertValue(res.getValue(), typeReference)); return new SimpleResponse(res, (T) doc); } @@ -603,7 +600,7 @@ Mono> getDocumentCountWithResponse(Context context) { *

    * If {@code searchText} is set to {@code null} or {@code "*"} all documents will be matched, see * simple query - * syntax in Azure Search for more information about search query syntax. + * syntax in Azure Cognitive Search for more information about search query syntax. * *

    Code Sample

    * @@ -617,8 +614,9 @@ Mono> getDocumentCountWithResponse(Context context) { * information. * @see Search documents */ + @ServiceMethod(returns = ReturnType.COLLECTION) public SearchPagedFlux search(String searchText) { - return this.search(searchText, null, null); + return this.search(searchText, null); } /** @@ -626,7 +624,7 @@ public SearchPagedFlux search(String searchText) { *

    * If {@code searchText} is set to {@code null} or {@code "*"} all documents will be matched, see * simple query - * syntax in Azure Search for more information about search query syntax. + * syntax in Azure Cognitive Search for more information about search query syntax. * *

    Code Sample

    * @@ -641,6 +639,7 @@ public SearchPagedFlux search(String searchText) { * information. * @see Search documents */ + @ServiceMethod(returns = ReturnType.COLLECTION) public SearchPagedFlux search(String searchText, SearchOptions searchOptions) { SearchRequest request = createSearchRequest(searchText, searchOptions); // The firstPageResponse shared among all fucntional calls below. @@ -661,16 +660,16 @@ SearchPagedFlux search(String searchText, SearchOptions searchOptions, Context c return new SearchPagedFlux(() -> func.apply(null), func); } - private Mono search(SearchRequest request, - String continuationToken, SearchFirstPageResponseWrapper firstPageResponseWrapper, Context context) { + private Mono search(SearchRequest request, String continuationToken, + SearchFirstPageResponseWrapper firstPageResponseWrapper, Context context) { if (continuationToken == null && firstPageResponseWrapper.getFirstPageResponse() != null) { return Mono.just(firstPageResponseWrapper.getFirstPageResponse()); } - SearchRequest requestToUse = (continuationToken == null) ? request + SearchRequest requestToUse = (continuationToken == null) + ? request : SearchContinuationToken.deserializeToken(serviceVersion.getVersion(), continuationToken); - return restClient.getDocuments().searchPostWithResponseAsync(requestToUse, - null, context) + return restClient.getDocuments().searchPostWithResponseAsync(requestToUse, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(response -> { SearchDocumentsResult result = response.getValue(); @@ -726,6 +725,7 @@ private static Map> getFacets(SearchDocumentsResult re * {@link SuggestPagedResponse} object for each page containing HTTP response and coverage information. * @see Suggestions */ + @ServiceMethod(returns = ReturnType.COLLECTION) public SuggestPagedFlux suggest(String searchText, String suggesterName) { return suggest(searchText, suggesterName, null); } @@ -747,6 +747,7 @@ public SuggestPagedFlux suggest(String searchText, String suggesterName) { * {@link SuggestPagedResponse} object for each page containing HTTP response and coverage information. * @see Suggestions */ + @ServiceMethod(returns = ReturnType.COLLECTION) public SuggestPagedFlux suggest(String searchText, String suggesterName, SuggestOptions suggestOptions) { SuggestRequest suggestRequest = createSuggestRequest(searchText, suggesterName, SuggestOptionsHandler.ensureSuggestOptions(suggestOptions)); @@ -762,8 +763,7 @@ SuggestPagedFlux suggest(String searchText, String suggesterName, SuggestOptions } private Mono suggest(SuggestRequest suggestRequest, Context context) { - return restClient.getDocuments().suggestPostWithResponseAsync(suggestRequest, - null, context) + return restClient.getDocuments().suggestPostWithResponseAsync(suggestRequest, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(response -> { SuggestDocumentsResult result = response.getValue(); @@ -792,8 +792,9 @@ private static List getSuggestResults(SuggestDocumentsResult resu * @param suggesterName suggester name * @return auto complete result. */ + @ServiceMethod(returns = ReturnType.COLLECTION) public AutocompletePagedFlux autocomplete(String searchText, String suggesterName) { - return autocomplete(searchText, suggesterName, null, null); + return autocomplete(searchText, suggesterName, null); } /** @@ -825,8 +826,7 @@ AutocompletePagedFlux autocomplete(String searchText, String suggesterName, Auto } private Mono autocomplete(AutocompleteRequest request, Context context) { - return restClient.getDocuments().autocompletePostWithResponseAsync(request, - null, context) + return restClient.getDocuments().autocompletePostWithResponseAsync(request, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingAutocompleteResponse); } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java index 52964b5a4aba..7e776fa2993e 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java @@ -27,7 +27,10 @@ import java.util.List; /** - * Cognitive Search Synchronous Client to query an index and upload, merge, or delete documents + * This class provides a client that contains the operations for querying an index and uploading, merging, or deleting + * documents in an Azure Cognitive Search service. + * + * @see SearchClientBuilder */ @ServiceClient(builder = SearchClientBuilder.class) public final class SearchClient { @@ -182,7 +185,7 @@ public IndexDocumentsResult mergeDocuments(Iterable documents) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response mergeDocumentsWithResponse(Iterable documents, - IndexDocumentsOptions options, Context context) { + IndexDocumentsOptions options, Context context) { return asyncClient.mergeDocumentsWithResponse(documents, options, context).block(); } @@ -249,7 +252,7 @@ public IndexDocumentsResult mergeOrUploadDocuments(Iterable documents) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response mergeOrUploadDocumentsWithResponse(Iterable documents, - IndexDocumentsOptions options, Context context) { + IndexDocumentsOptions options, Context context) { return asyncClient.mergeOrUploadDocumentsWithResponse(documents, options, context).block(); } @@ -443,7 +446,7 @@ public Response getDocumentCountWithResponse(Context context) { *

    * If {@code searchText} is set to {@code null} or {@code "*"} all documents will be matched, see * simple query - * syntax in Azure Search for more information about search query syntax. + * syntax in Azure Cognitive Search for more information about search query syntax. * *

    Code Sample

    * @@ -457,6 +460,7 @@ public Response getDocumentCountWithResponse(Context context) { * information. * @see Search documents */ + @ServiceMethod(returns = ReturnType.COLLECTION) public SearchPagedIterable search(String searchText) { return search(searchText, null, Context.NONE); } @@ -466,7 +470,7 @@ public SearchPagedIterable search(String searchText) { *

    * If {@code searchText} is set to {@code null} or {@code "*"} all documents will be matched, see * simple query - * syntax in Azure Search for more information about search query syntax. + * syntax in Azure Cognitive Search for more information about search query syntax. * *

    Code Sample

    * @@ -482,6 +486,7 @@ public SearchPagedIterable search(String searchText) { * information. * @see Search documents */ + @ServiceMethod(returns = ReturnType.COLLECTION) public SearchPagedIterable search(String searchText, SearchOptions searchOptions, Context context) { return new SearchPagedIterable(asyncClient.search(searchText, searchOptions, context)); } @@ -502,6 +507,7 @@ public SearchPagedIterable search(String searchText, SearchOptions searchOptions * the {@link SuggestPagedResponse} object for each page containing HTTP response and coverage information. * @see Suggestions */ + @ServiceMethod(returns = ReturnType.COLLECTION) public SuggestPagedIterable suggest(String searchText, String suggesterName) { return suggest(searchText, suggesterName, null, Context.NONE); } @@ -524,10 +530,10 @@ public SuggestPagedIterable suggest(String searchText, String suggesterName) { * the {@link SuggestPagedResponse} object for each page containing HTTP response and coverage information. * @see Suggestions */ + @ServiceMethod(returns = ReturnType.COLLECTION) public SuggestPagedIterable suggest(String searchText, String suggesterName, SuggestOptions suggestOptions, Context context) { - return new SuggestPagedIterable(asyncClient.suggest(searchText, suggesterName, suggestOptions, - context)); + return new SuggestPagedIterable(asyncClient.suggest(searchText, suggesterName, suggestOptions, context)); } /** @@ -543,6 +549,7 @@ public SuggestPagedIterable suggest(String searchText, String suggesterName, Sug * @param suggesterName suggester name * @return auto complete result. */ + @ServiceMethod(returns = ReturnType.COLLECTION) public AutocompletePagedIterable autocomplete(String searchText, String suggesterName) { return autocomplete(searchText, suggesterName, null, Context.NONE); } @@ -562,6 +569,7 @@ public AutocompletePagedIterable autocomplete(String searchText, String suggeste * @param context additional context that is passed through the HTTP pipeline during the service call * @return auto complete result. */ + @ServiceMethod(returns = ReturnType.COLLECTION) public AutocompletePagedIterable autocomplete(String searchText, String suggesterName, AutocompleteOptions autocompleteOptions, Context context) { return new AutocompletePagedIterable(asyncClient.autocomplete(searchText, suggesterName, autocompleteOptions, diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClientBuilder.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClientBuilder.java index 17056e6cd6f6..50421a2b514a 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClientBuilder.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClientBuilder.java @@ -33,15 +33,13 @@ /** * This class provides a fluent builder API to help aid the configuration and instantiation of {@link SearchClient - * SearchClients} and {@link SearchAsyncClient SearchAsyncClients}. Call {@link #buildClient() - * buildClient} and {@link #buildAsyncClient() buildAsyncClient} respectively to construct an instance of the desired - * client. + * SearchClients} and {@link SearchAsyncClient SearchAsyncClients}. Call {@link #buildClient() buildClient} and {@link + * #buildAsyncClient() buildAsyncClient} respectively to construct an instance of the desired client. *

    - * The client needs to at least provide the following required fields - *

    + * The following must be provided to construct a client instance. *
      - *
    • the service endpoint of the Azure Cognitive Search to access the resource service.
    • - *
    • {@link #credential(AzureKeyCredential)} gives the builder access credential.
    • + *
    • The Azure Cognitive Search service URL.
    • + *
    • An {@link AzureKeyCredential} that grants access to the Azure Cognitive Search service.
    • *
    • The search index name.
    • *
    * @@ -89,8 +87,8 @@ public final class SearchClientBuilder { /** - * Creates a builder instance that is able to configure and construct {@link SearchClient SearchClients} - * and {@link SearchAsyncClient SearchAsyncClients}. + * Creates a builder instance that is able to configure and construct {@link SearchClient SearchClients} and {@link + * SearchAsyncClient SearchAsyncClients}. */ public SearchClientBuilder() { Map properties = CoreUtils.getProperties(SEARCH_PROPERTIES); @@ -99,12 +97,12 @@ public SearchClientBuilder() { } /** - * Creates a {@link SearchClient} based on options set in the Builder. Every time {@code buildClient()} is - * called a new instance of {@link SearchClient} is created. + * Creates a {@link SearchClient} based on options set in the builder. Every time {@code buildClient()} is called a + * new instance of {@link SearchClient} is created. *

    * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline}, {@link #endpoint(String) - * endpoint}, and {@link #indexName(String) indexName} are used to create the {@link SearchClient client}. - * All other builder settings are ignored. + * endpoint}, and {@link #indexName(String) indexName} are used to create the {@link SearchClient client}. All other + * builder settings are ignored. * * @return A SearchClient with the options set from the builder. * @throws NullPointerException If {@code indexName} or {@code endpoint} are {@code null}. @@ -114,12 +112,12 @@ public SearchClient buildClient() { } /** - * Creates a {@link SearchAsyncClient} based on options set in the Builder. Every time - * {@code buildAsyncClient()} is called a new instance of {@link SearchAsyncClient} is created. + * Creates a {@link SearchAsyncClient} based on options set in the builder. Every time {@code buildAsyncClient()} is + * called a new instance of {@link SearchAsyncClient} is created. *

    * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline}, {@link #endpoint(String) - * endpoint}, and {@link #indexName(String) indexName} are used to create the {@link SearchAsyncClient client}. - * All other builder settings are ignored. + * endpoint}, and {@link #indexName(String) indexName} are used to create the {@link SearchAsyncClient client}. All + * other builder settings are ignored. * * @return A SearchClient with the options set from the builder. * @throws NullPointerException If {@code indexName} or {@code endpoint} are {@code null}. @@ -170,9 +168,9 @@ public SearchAsyncClient buildAsyncClient() { } /** - * Sets the service endpoint for the Azure Search instance. + * Sets the service endpoint for the Azure Cognitive Search instance. * - * @param endpoint The URL of the Azure Search instance. + * @param endpoint The URL of the Azure Cognitive Search instance. * @return The updated SearchClientBuilder object. * @throws IllegalArgumentException If {@code endpoint} is null or it cannot be parsed into a valid URL. */ @@ -307,7 +305,7 @@ public SearchClientBuilder retryPolicy(RetryPolicy retryPolicy) { * Sets the {@link SearchServiceVersion} that is used when making API requests. *

    * If a service version is not provided, {@link SearchServiceVersion#getLatest()} will be used as a default. When - * this default is used updating to a newer client library may result in a newer version of the service being used. + * the default is used, updating to a newer client library may implicitly use a newer version of the service. * * @param serviceVersion The version of the service to be used when making requests. * @return The updated SearchClientBuilder object. diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchDocument.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchDocument.java index c15e2b4b3b18..39a92ae538ab 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchDocument.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchDocument.java @@ -7,26 +7,22 @@ import java.util.Map; /** - * Represents a document - *

    - * A property bag is used for scenarios where the index schema is only known at run-time - *

    - * If the schema is known, user can convert the properties to a specific object type + * Represents an untyped document returned from a search or document lookup. */ public final class SearchDocument extends HashMap { private static final long serialVersionUID = 1L; /** - * Default empty constructor + * Initializes a new instance of the SearchDocument class. */ public SearchDocument() { super(); } /** - * Constructs a new {@code Document} with the same mappings as the specified {@code Map}. + * Initializes a new instance of the SearchDocument class with initial values. * - * @param propertyMap the map whose mappings are to be placed in this map + * @param propertyMap Initial values of the document. */ public SearchDocument(Map propertyMap) { super(propertyMap); diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchServiceVersion.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchServiceVersion.java index 0751e21c93a6..bc33b3df930d 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchServiceVersion.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchServiceVersion.java @@ -6,7 +6,7 @@ import com.azure.core.util.ServiceVersion; /** - * The versions of Azure Search supported by this client library. + * The versions of Azure Cognitive Search supported by this client library. */ public enum SearchServiceVersion implements ServiceVersion { V2020_06_30("2020-06-30"); @@ -26,9 +26,9 @@ public String getVersion() { } /** - * Gets the latest service version supported by this client library + * Gets the latest service version supported by this client library. * - * @return the latest {@link SearchServiceVersion} + * @return The latest version supported by this client library. */ public static SearchServiceVersion getLatest() { return V2020_06_30; diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java index c35dd69c612d..a2e67069e3bf 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java @@ -38,7 +38,10 @@ import static com.azure.core.util.FluxUtil.withContext; /** - * Asynchronous Client to manage and query indexes, as well as Synonym Map, on a Cognitive Search service + * This class provides a client that contains the operations for creating, getting, listing, updating, or deleting + * indexes or synonym map and analyzing text in an Azure Cognitive Search service. + * + * @see SearchIndexClientBuilder */ @ServiceClient(builder = SearchIndexClientBuilder.class, isAsync = true) public final class SearchIndexAsyncClient { @@ -75,7 +78,7 @@ public final class SearchIndexAsyncClient { this.restClient = new SearchServiceClientImplBuilder() .endpoint(endpoint) - // .apiVersion(serviceVersion.getVersion()) + // .apiVersion(serviceVersion.getVersion()) .pipeline(httpPipeline) .buildClient(); } @@ -308,8 +311,7 @@ public PagedFlux listIndexNames() { PagedFlux listIndexNames(Context context) { try { return new PagedFlux<>(() -> this.listIndexesWithResponse("name", context) - .map(MappingUtils::mappingPagingSearchIndexNames) - ); + .map(MappingUtils::mappingPagingSearchIndexNames)); } catch (RuntimeException ex) { return pagedFluxError(logger, ex); } @@ -371,8 +373,7 @@ Mono> createOrUpdateIndexWithResponse(SearchIndex index, b String ifMatch = onlyIfUnchanged ? index.getETag() : null; return restClient.getIndexes() .createOrUpdateWithResponseAsync(index.getName(), SearchIndexConverter.map(index), - allowIndexDowntime, ifMatch, null, - null, context) + allowIndexDowntime, ifMatch, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalSearchIndex); } catch (RuntimeException ex) { @@ -421,8 +422,7 @@ public Mono> deleteIndexWithResponse(SearchIndex index, boolean o Mono> deleteIndexWithResponse(String indexName, String etag, Context context) { try { return restClient.getIndexes() - .deleteWithResponseAsync(indexName, etag, null, - null, context) + .deleteWithResponseAsync(indexName, etag, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(Function.identity()); } catch (RuntimeException ex) { @@ -465,8 +465,7 @@ PagedFlux analyzeText(String indexName, AnalyzeTextOptions an private Mono> analyzeTextWithResponse(String indexName, AnalyzeTextOptions analyzeTextOptions, Context context) { return restClient.getIndexes() - .analyzeWithResponseAsync(indexName, AnalyzeRequestConverter.map(analyzeTextOptions), - null, context) + .analyzeWithResponseAsync(indexName, AnalyzeRequestConverter.map(analyzeTextOptions), null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingTokenInfo); } @@ -510,8 +509,7 @@ Mono> createSynonymMapWithResponse(SynonymMap synonymMap, Objects.requireNonNull(synonymMap, "'SynonymMap' cannot be null."); try { return restClient.getSynonymMaps() - .createWithResponseAsync(SynonymMapConverter.map(synonymMap), - null, context) + .createWithResponseAsync(SynonymMapConverter.map(synonymMap), null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalSynonymMap); } catch (RuntimeException ex) { @@ -553,8 +551,7 @@ public Mono> getSynonymMapWithResponse(String synonymMapNam return withContext(context -> getSynonymMapWithResponse(synonymMapName, context)); } - Mono> getSynonymMapWithResponse(String synonymMapName, - Context context) { + Mono> getSynonymMapWithResponse(String synonymMapName, Context context) { try { return restClient.getSynonymMaps() .getWithResponseAsync(synonymMapName, null, context) @@ -627,8 +624,7 @@ PagedFlux listSynonymMapNames(Context context) { } } - private Mono> listSynonymMapsWithResponse(String select, - Context context) { + private Mono> listSynonymMapsWithResponse(String select, Context context) { return restClient.getSynonymMaps() .listWithResponseAsync(select, null, context) .onErrorMap(MappingUtils::exceptionMapper); @@ -679,9 +675,7 @@ Mono> createOrUpdateSynonymMapWithResponse(SynonymMap synon try { return restClient.getSynonymMaps() .createOrUpdateWithResponseAsync(synonymMap.getName(), SynonymMapConverter.map(synonymMap), - ifMatch, null, - null, - context) + ifMatch, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalSynonymMap); } catch (RuntimeException ex) { @@ -725,16 +719,14 @@ public Mono deleteSynonymMap(String synonymMapName) { public Mono> deleteSynonymMapWithResponse(SynonymMap synonymMap, boolean onlyIfUnchanged) { Objects.requireNonNull(synonymMap, "'SynonymMap' cannot be null"); String etag = onlyIfUnchanged ? synonymMap.getETag() : null; - return withContext(context -> - deleteSynonymMapWithResponse(synonymMap.getName(), etag, context)); + return withContext(context -> deleteSynonymMapWithResponse(synonymMap.getName(), etag, context)); } Mono> deleteSynonymMapWithResponse(String synonymMapName, String etag, Context context) { try { return restClient.getSynonymMaps() - .deleteWithResponseAsync(synonymMapName, etag, null, - null, context) + .deleteWithResponseAsync(synonymMapName, etag, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(Function.identity()); } catch (RuntimeException ex) { diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java index 7988efe02473..e5fde4706f60 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java @@ -20,7 +20,10 @@ import com.azure.search.documents.indexes.models.SynonymMap; /** - * Synchronous Client to manage and query indexes, as well as manage Synonym Map, on a Cognitive Search service + * This class provides a client that contains the operations for creating, getting, listing, updating, or deleting + * indexes or synonym map and analyzing text in an Azure Cognitive Search service. + * + * @see SearchIndexClientBuilder */ @ServiceClient(builder = SearchIndexClientBuilder.class) public final class SearchIndexClient { diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClientBuilder.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClientBuilder.java index c7bcd43d5b1e..a5b20e7ee701 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClientBuilder.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClientBuilder.java @@ -32,16 +32,15 @@ import java.util.Objects; /** - * This class provides a fluent builder API to help aid the configuration and instantiation of {@link - * SearchIndexClient SearchIndexClients} and {@link SearchIndexAsyncClient SearchIndexAsyncClients}. Call {@link - * #buildClient() buildClient} and {@link #buildAsyncClient() buildAsyncClient} respectively to construct an instance of - * the desired client. + * This class provides a fluent builder API to help aid the configuration and instantiation of {@link SearchIndexClient + * SearchIndexClients} and {@link SearchIndexAsyncClient SearchIndexAsyncClients}. Call {@link #buildClient() + * buildClient} and {@link #buildAsyncClient() buildAsyncClient} respectively to construct an instance of the desired + * client. *

    - * The client needs to at least provide the following required fields - *

    + * The following must be provided to construct a client instance. *
      - *
    • the service endpoint of the Azure Cognitive Search to access the resource service.
    • - *
    • {@link #credential(AzureKeyCredential)} gives the builder access credential.
    • + *
    • The Azure Cognitive Search service URL.
    • + *
    • An {@link AzureKeyCredential} that grants access to the Azure Cognitive Search service.
    • *
    * *

    Instantiating an asynchronous Search Index Client

    @@ -86,8 +85,8 @@ public final class SearchIndexClientBuilder { private RetryPolicy retryPolicy; /** - * Creates a builder instance that is able to configure and construct {@link SearchIndexClient - * SearchIndexClients} and {@link SearchIndexAsyncClient SearchIndexAsyncClients}. + * Creates a builder instance that is able to configure and construct {@link SearchIndexClient SearchIndexClients} + * and {@link SearchIndexAsyncClient SearchIndexAsyncClients}. */ public SearchIndexClientBuilder() { Map properties = CoreUtils.getProperties(SEARCH_PROPERTIES); @@ -114,8 +113,7 @@ public SearchIndexClient buildClient() { * buildAsyncClient()} is called a new instance of {@link SearchIndexAsyncClient} is created. *

    * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline} and {@link #endpoint(String) - * endpoint} are used to create the {@link SearchIndexAsyncClient client}. All other builder settings are - * ignored. + * endpoint} are used to create the {@link SearchIndexAsyncClient client}. All other builder settings are ignored. * * @return A SearchIndexAsyncClient with the options set from the builder. * @throws NullPointerException If {@code endpoint} are {@code null}. @@ -165,9 +163,9 @@ public SearchIndexAsyncClient buildAsyncClient() { } /** - * Sets the service endpoint for the Azure Search instance. + * Sets the service endpoint for the Azure Cognitive Search instance. * - * @param endpoint The URL of the Azure Search instance. + * @param endpoint The URL of the Azure Cognitive Search instance. * @return The updated SearchIndexClientBuilder object. * @throws IllegalArgumentException If {@code endpoint} is null or it cannot be parsed into a valid URL. */ diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerAsyncClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerAsyncClient.java index 141f6096f4f6..ad4d89e99dc8 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerAsyncClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerAsyncClient.java @@ -4,6 +4,7 @@ package com.azure.search.documents.indexes; import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; @@ -35,8 +36,12 @@ import static com.azure.core.util.FluxUtil.withContext; /** - * Asynchronous Client to manage and query indexers, as well as manage other resources, on a Cognitive Search service + * This class provides a client that contains the operations for creating, getting, listing, updating, or deleting data + * source connections, indexers, or skillsets and running or resetting indexers in an Azure Cognitive Search service. + * + * @see SearchIndexerClientBuilder */ +@ServiceClient(builder = SearchIndexerClientBuilder.class, isAsync = true) public class SearchIndexerAsyncClient { /** * Search REST API Version @@ -70,7 +75,7 @@ public class SearchIndexerAsyncClient { this.restClient = new SearchServiceClientImplBuilder() .endpoint(endpoint) - // .apiVersion(serviceVersion.getVersion()) + // .apiVersion(serviceVersion.getVersion()) .pipeline(httpPipeline) .buildClient(); } @@ -133,8 +138,7 @@ public Mono> createOrUpdateDataSourc } Mono> createOrUpdateDataSourceConnectionWithResponse( - SearchIndexerDataSourceConnection dataSource, - boolean onlyIfUnchanged, Context context) { + SearchIndexerDataSourceConnection dataSource, boolean onlyIfUnchanged, Context context) { Objects.requireNonNull(dataSource, "'DataSource' cannot be null."); String ifMatch = onlyIfUnchanged ? dataSource.getETag() : null; if (dataSource.getConnectionString() == null) { @@ -143,9 +147,8 @@ Mono> createOrUpdateDataSourceConnec try { return restClient .getDataSources() - .createOrUpdateWithResponseAsync(dataSource.getName(), - SearchIndexerDataSourceConverter.map(dataSource), ifMatch, null, - null, context) + .createOrUpdateWithResponseAsync(dataSource.getName(), SearchIndexerDataSourceConverter.map(dataSource), + ifMatch, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalDataSource); } catch (RuntimeException ex) { @@ -193,8 +196,7 @@ Mono> createDataSourceConnectionWith SearchIndexerDataSourceConnection dataSource, Context context) { try { return restClient.getDataSources() - .createWithResponseAsync(SearchIndexerDataSourceConverter.map(dataSource), - null, context) + .createWithResponseAsync(SearchIndexerDataSourceConverter.map(dataSource), null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalDataSource); } catch (RuntimeException ex) { @@ -237,7 +239,6 @@ public Mono> getDataSourceConnection return withContext(context -> getDataSourceConnectionWithResponse(dataSourceName, context)); } - @ServiceMethod(returns = ReturnType.SINGLE) Mono> getDataSourceConnectionWithResponse(String dataSourceName, Context context) { try { @@ -292,6 +293,7 @@ PagedFlux listDataSourceConnections(Context c * * @return a list of DataSource names */ + @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listDataSourceConnectionNames() { try { return new PagedFlux<>(() -> @@ -332,8 +334,8 @@ private Mono> listDataSourceConnectionsWithRespo */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteDataSourceConnection(String dataSourceName) { - return withContext(context -> - deleteDataSourceConnectionWithResponse(dataSourceName, null, context).flatMap(FluxUtil::toMono)); + return withContext(context -> deleteDataSourceConnectionWithResponse(dataSourceName, null, context) + .flatMap(FluxUtil::toMono)); } /** @@ -355,19 +357,13 @@ public Mono> deleteDataSourceConnectionWithResponse(SearchIndexer boolean onlyIfUnchanged) { Objects.requireNonNull(dataSource, "'DataSource' cannot be null"); String etag = onlyIfUnchanged ? dataSource.getETag() : null; - return withContext(context -> - deleteDataSourceConnectionWithResponse(dataSource.getName(), etag, context)); + return withContext(context -> deleteDataSourceConnectionWithResponse(dataSource.getName(), etag, context)); } - Mono> deleteDataSourceConnectionWithResponse(String dataSourceName, String etag, - Context context) { + Mono> deleteDataSourceConnectionWithResponse(String dataSourceName, String etag, Context context) { try { return restClient.getDataSources() - .deleteWithResponseAsync( - dataSourceName, - etag, null, - null, - context) + .deleteWithResponseAsync(dataSourceName, etag, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(Function.identity()); } catch (RuntimeException ex) { @@ -409,12 +405,10 @@ public Mono> createIndexerWithResponse(SearchIndexer ind return withContext(context -> createIndexerWithResponse(indexer, context)); } - Mono> createIndexerWithResponse(SearchIndexer indexer, - Context context) { + Mono> createIndexerWithResponse(SearchIndexer indexer, Context context) { try { return restClient.getIndexers() - .createWithResponseAsync(SearchIndexerConverter.map(indexer), - null, context) + .createWithResponseAsync(SearchIndexerConverter.map(indexer), null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalSearchIndexer); } catch (RuntimeException ex) { @@ -456,8 +450,7 @@ public Mono createOrUpdateIndexer(SearchIndexer indexer) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateIndexerWithResponse(SearchIndexer indexer, boolean onlyIfUnchanged) { - return withContext(context -> - createOrUpdateIndexerWithResponse(indexer, onlyIfUnchanged, context)); + return withContext(context -> createOrUpdateIndexerWithResponse(indexer, onlyIfUnchanged, context)); } Mono> createOrUpdateIndexerWithResponse(SearchIndexer indexer, boolean onlyIfUnchanged, @@ -466,10 +459,8 @@ Mono> createOrUpdateIndexerWithResponse(SearchIndexer in String ifMatch = onlyIfUnchanged ? indexer.getETag() : null; try { return restClient.getIndexers() - .createOrUpdateWithResponseAsync(indexer.getName(), SearchIndexerConverter.map(indexer), ifMatch, - null, - null, - context) + .createOrUpdateWithResponseAsync(indexer.getName(), SearchIndexerConverter.map(indexer), ifMatch, null, + null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalSearchIndexer); } catch (RuntimeException ex) { @@ -511,8 +502,7 @@ public Mono> getIndexerWithResponse(String indexerName) return withContext(context -> getIndexerWithResponse(indexerName, context)); } - Mono> getIndexerWithResponse(String indexerName, - Context context) { + Mono> getIndexerWithResponse(String indexerName, Context context) { try { return restClient.getIndexers() .getWithResponseAsync(indexerName, null, context) @@ -585,8 +575,7 @@ PagedFlux listIndexerNames(Context context) { } } - private Mono> listIndexersWithResponse(String select, - Context context) { + private Mono> listIndexersWithResponse(String select, Context context) { return restClient.getIndexers() .listWithResponseAsync(select, null, context) .onErrorMap(MappingUtils::exceptionMapper); @@ -639,12 +628,10 @@ public Mono> deleteIndexerWithResponse(SearchIndexer indexer, boo * @param context the context * @return a response signalling completion. */ - Mono> deleteIndexerWithResponse(String indexerName, String etag, - Context context) { + Mono> deleteIndexerWithResponse(String indexerName, String etag, Context context) { try { return restClient.getIndexers() - .deleteWithResponseAsync(indexerName, etag, null, - null, context) + .deleteWithResponseAsync(indexerName, etag, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(Function.identity()); } catch (RuntimeException ex) { @@ -733,8 +720,7 @@ public Mono> runIndexerWithResponse(String indexerName) { Mono> runIndexerWithResponse(String indexerName, Context context) { try { - return restClient.getIndexers().runWithResponseAsync(indexerName, - null, context) + return restClient.getIndexers().runWithResponseAsync(indexerName, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(Function.identity()); } catch (RuntimeException ex) { @@ -776,12 +762,10 @@ public Mono> getIndexerStatusWithResponse(String i return withContext(context -> getIndexerStatusWithResponse(indexerName, context)); } - Mono> getIndexerStatusWithResponse(String indexerName, - Context context) { + Mono> getIndexerStatusWithResponse(String indexerName, Context context) { try { return restClient.getIndexers() - .getStatusWithResponseAsync(indexerName, null, - context) + .getStatusWithResponseAsync(indexerName, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingIndexerStatus); } catch (RuntimeException ex) { @@ -823,13 +807,11 @@ public Mono> createSkillsetWithResponse(SearchIn return withContext(context -> createSkillsetWithResponse(skillset, context)); } - Mono> createSkillsetWithResponse(SearchIndexerSkillset skillset, - Context context) { + Mono> createSkillsetWithResponse(SearchIndexerSkillset skillset, Context context) { Objects.requireNonNull(skillset, "'Skillset' cannot be null."); try { return restClient.getSkillsets() - .createWithResponseAsync(SearchIndexerSkillsetConverter.map(skillset), - null, context) + .createWithResponseAsync(SearchIndexerSkillsetConverter.map(skillset), null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalSkillset); } catch (RuntimeException ex) { @@ -871,8 +853,7 @@ public Mono> getSkillsetWithResponse(String skil return withContext(context -> getSkillsetWithResponse(skillsetName, context)); } - Mono> getSkillsetWithResponse(String skillsetName, - Context context) { + Mono> getSkillsetWithResponse(String skillsetName, Context context) { try { return this.restClient.getSkillsets() .getWithResponseAsync(skillsetName, null, context) @@ -985,8 +966,7 @@ public Mono createOrUpdateSkillset(SearchIndexerSkillset @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateSkillsetWithResponse(SearchIndexerSkillset skillset, boolean onlyIfUnchanged) { - return withContext(context -> - createOrUpdateSkillsetWithResponse(skillset, onlyIfUnchanged, context)); + return withContext(context -> createOrUpdateSkillsetWithResponse(skillset, onlyIfUnchanged, context)); } Mono> createOrUpdateSkillsetWithResponse(SearchIndexerSkillset skillset, @@ -996,9 +976,7 @@ Mono> createOrUpdateSkillsetWithResponse(SearchI try { return restClient.getSkillsets() .createOrUpdateWithResponseAsync(skillset.getName(), SearchIndexerSkillsetConverter.map(skillset), - ifMatch, null, - null, - context) + ifMatch, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(MappingUtils::mappingExternalSkillset); } catch (RuntimeException ex) { @@ -1042,16 +1020,13 @@ public Mono deleteSkillset(String skillsetName) { public Mono> deleteSkillsetWithResponse(SearchIndexerSkillset skillset, boolean onlyIfUnchanged) { Objects.requireNonNull(skillset, "'Skillset' cannot be null."); String etag = onlyIfUnchanged ? skillset.getETag() : null; - return withContext(context -> - deleteSkillsetWithResponse(skillset.getName(), etag, context)); + return withContext(context -> deleteSkillsetWithResponse(skillset.getName(), etag, context)); } - Mono> deleteSkillsetWithResponse(String skillsetName, String etag, - Context context) { + Mono> deleteSkillsetWithResponse(String skillsetName, String etag, Context context) { try { return restClient.getSkillsets() - .deleteWithResponseAsync(skillsetName, etag, null, - null, context) + .deleteWithResponseAsync(skillsetName, etag, null, null, context) .onErrorMap(MappingUtils::exceptionMapper) .map(Function.identity()); } catch (RuntimeException ex) { diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClient.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClient.java index 819cdf381f3c..c04749b1389a 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClient.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClient.java @@ -4,6 +4,7 @@ package com.azure.search.documents.indexes; import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; @@ -15,8 +16,12 @@ import com.azure.search.documents.indexes.models.SearchIndexerStatus; /** - * Synchronous Client to manage and query indexers, as well as manage other resources, on a Cognitive Search service + * This class provides a client that contains the operations for creating, getting, listing, updating, or deleting data + * source connections, indexers, or skillsets and running or resetting indexers in an Azure Cognitive Search service. + * + * @see SearchIndexerClientBuilder */ +@ServiceClient(builder = SearchIndexerClientBuilder.class) public class SearchIndexerClient { private final SearchIndexerAsyncClient asyncClient; @@ -57,8 +62,7 @@ public String getEndpoint() { @ServiceMethod(returns = ReturnType.SINGLE) public SearchIndexerDataSourceConnection createOrUpdateDataSourceConnection( SearchIndexerDataSourceConnection dataSourceConnection) { - return createOrUpdateDataSourceConnectionWithResponse(dataSourceConnection, false, - Context.NONE).getValue(); + return createOrUpdateDataSourceConnectionWithResponse(dataSourceConnection, false, Context.NONE).getValue(); } /** @@ -236,7 +240,7 @@ public PagedIterable listDataSourceConnectionNames(Context context) { * * @param dataSourceConnectionName the name of the data source to be deleted */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.SINGLE) public void deleteDataSourceConnection(String dataSourceConnectionName) { deleteDataSourceConnectionWithResponse(new SearchIndexerDataSourceConnection(dataSourceConnectionName), false, Context.NONE); @@ -262,8 +266,8 @@ public void deleteDataSourceConnection(String dataSourceConnectionName) { public Response deleteDataSourceConnectionWithResponse(SearchIndexerDataSourceConnection dataSourceConnection, boolean onlyIfUnchanged, Context context) { String etag = onlyIfUnchanged ? dataSourceConnection.getETag() : null; - return asyncClient.deleteDataSourceConnectionWithResponse(dataSourceConnection.getName(), etag, - context).block(); + return asyncClient.deleteDataSourceConnectionWithResponse(dataSourceConnection.getName(), etag, context) + .block(); } /** @@ -297,8 +301,7 @@ public SearchIndexer createIndexer(SearchIndexer indexer) { * @return a response containing the created Indexer. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createIndexerWithResponse(SearchIndexer indexer, - Context context) { + public Response createIndexerWithResponse(SearchIndexer indexer, Context context) { return asyncClient.createIndexerWithResponse(indexer, context).block(); } @@ -437,8 +440,7 @@ public SearchIndexer getIndexer(String indexerName) { * @return a response containing the indexer. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getIndexerWithResponse(String indexerName, - Context context) { + public Response getIndexerWithResponse(String indexerName, Context context) { return asyncClient.getIndexerWithResponse(indexerName, context).block(); } @@ -474,8 +476,7 @@ public void deleteIndexer(String indexerName) { * @return a response signalling completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteIndexerWithResponse(SearchIndexer indexer, boolean onlyIfUnchanged, - Context context) { + public Response deleteIndexerWithResponse(SearchIndexer indexer, boolean onlyIfUnchanged, Context context) { String etag = onlyIfUnchanged ? indexer.getETag() : null; return asyncClient.deleteIndexerWithResponse(indexer.getName(), etag, context).block(); } @@ -579,8 +580,7 @@ public SearchIndexerStatus getIndexerStatus(String indexerName) { * @return a response with the indexer execution info. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getIndexerStatusWithResponse(String indexerName, - Context context) { + public Response getIndexerStatusWithResponse(String indexerName, Context context) { return asyncClient.getIndexerStatusWithResponse(indexerName, context).block(); } @@ -616,8 +616,7 @@ public SearchIndexerSkillset createSkillset(SearchIndexerSkillset skillset) { * @return a response containing the created SearchIndexerSkillset. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createSkillsetWithResponse(SearchIndexerSkillset skillset, - Context context) { + public Response createSkillsetWithResponse(SearchIndexerSkillset skillset, Context context) { return asyncClient.createSkillsetWithResponse(skillset, context).block(); } @@ -652,8 +651,7 @@ public SearchIndexerSkillset getSkillset(String skillsetName) { * @return a response containing the SearchIndexerSkillset. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSkillsetWithResponse(String skillsetName, - Context context) { + public Response getSkillsetWithResponse(String skillsetName, Context context) { return asyncClient.getSkillsetWithResponse(skillsetName, context).block(); } diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClientBuilder.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClientBuilder.java index 7874238e497f..f83a3f743d97 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClientBuilder.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerClientBuilder.java @@ -38,11 +38,10 @@ * #buildClient() buildClient} and {@link #buildAsyncClient() buildAsyncClient} respectively to construct an instance of * the desired client. *

    - * The client needs to at least provide the following required fields - *

    + * The following must be provided to construct a client instance. *
      - *
    • the service endpoint of the Azure Cognitive Search to access the resource service.
    • - *
    • {@link #credential(AzureKeyCredential)} gives the builder access credential.
    • + *
    • The Azure Cognitive Search service URL.
    • + *
    • An {@link AzureKeyCredential} that grants access to the Azure Cognitive Search service.
    • *
    * *

    Instantiating an asynchronous Search Indexer Client

    @@ -166,9 +165,9 @@ public SearchIndexerAsyncClient buildAsyncClient() { } /** - * Sets the service endpoint for the Azure Search instance. + * Sets the service endpoint for the Azure Cognitive Search instance. * - * @param endpoint The URL of the Azure Search instance. + * @param endpoint The URL of the Azure Cognitive Search instance. * @return The updated SearchIndexerClientBuilder object. * @throws IllegalArgumentException If {@code endpoint} is null or it cannot be parsed into a valid URL. */ diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerDataSources.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerDataSources.java index 82b6746da476..92a35395bdf1 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerDataSources.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexerDataSources.java @@ -12,7 +12,8 @@ import com.azure.search.documents.indexes.models.SearchIndexerDataSourceType; /** - * Utility class that aids in the creation of {@link SearchIndexerDataSourceConnection SearchIndexerDataSources}. + * Utility class that aids in the creation of {@link SearchIndexerDataSourceConnection + * SearchIndexerDataSourceConnections}. */ public final class SearchIndexerDataSources { diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/package-info.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/package-info.java index a95b4570dd2c..cf1d4ff54de3 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/package-info.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/package-info.java @@ -2,8 +2,7 @@ // Licensed under the MIT License. /** - * Package containing the data models for SearchServiceRestClient. - * Client that can be used to manage and query indexes and documents, as well - * as manage other resources, on a search service. + * Package containing classes used for resource management operations that are being sent-to and received-from an + * Azure Cognitive Search service. */ package com.azure.search.documents.indexes.models; diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/package-info.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/package-info.java index f3976eff94c2..d970f63ef906 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/package-info.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/package-info.java @@ -2,7 +2,10 @@ // Licensed under the MIT License. /** - * Package containing the annotations used by FieldBuilder which help convert - * model class to a list of Field classes for building Index. + * Package containing classes for creating {@link com.azure.search.documents.indexes.SearchIndexClient}, + * {@link com.azure.search.documents.indexes.SearchIndexAsyncClient}, + * {@link com.azure.search.documents.indexes.SearchIndexerClient}, or + * {@link com.azure.search.documents.indexes.SearchIndexerAsyncClient} used to perform resource management operations + * on an Azure Cognitive Search service. */ package com.azure.search.documents.indexes; diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/models/package-info.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/models/package-info.java new file mode 100644 index 000000000000..a052f26e2a17 --- /dev/null +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/models/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing classes used for document management, autocomplete, search, or suggestion operations that are + * being sent-to and received-from an Azure Cognitive Search service index. + */ +package com.azure.search.documents.models; diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/package-info.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/package-info.java index 11f33ee1ee8c..38b8b14ef0e8 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/package-info.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/package-info.java @@ -5,7 +5,8 @@ // regenerated. /** - * Package containing the classes for SearchIndexRestClient. Client that can be used to query an index and upload, - * merge, or delete documents. + * Package containing classes for creating {@link com.azure.search.documents.SearchClient} or + * {@link com.azure.search.documents.SearchAsyncClient} used to perform document management, autocomplete, search, or + * suggestion operations using an Azure Cognitive Search service index. */ package com.azure.search.documents; diff --git a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/util/package-info.java b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/util/package-info.java index a60d24405cd5..800c51a81b69 100644 --- a/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/util/package-info.java +++ b/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/util/package-info.java @@ -2,6 +2,6 @@ // Licensed under the MIT License. /** - * Package containing Search utility classes. + * Package containing Azure Cognitive Search paged response classes. */ package com.azure.search.documents.util; diff --git a/sdk/search/azure-search-documents/src/main/java/module-info.java b/sdk/search/azure-search-documents/src/main/java/module-info.java index a25a9e84ecf5..44e0917971da 100644 --- a/sdk/search/azure-search-documents/src/main/java/module-info.java +++ b/sdk/search/azure-search-documents/src/main/java/module-info.java @@ -17,6 +17,7 @@ opens com.azure.search.documents.implementation.util to com.fasterxml.jackson.databind; exports com.azure.search.documents; + exports com.azure.search.documents.indexes; exports com.azure.search.documents.indexes.models; exports com.azure.search.documents.models; exports com.azure.search.documents.util; diff --git a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/RefineSearchCapabilitiesExample.java b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/RefineSearchCapabilitiesExample.java index 88ce4b28826b..b830c0748fa3 100644 --- a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/RefineSearchCapabilitiesExample.java +++ b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/RefineSearchCapabilitiesExample.java @@ -31,7 +31,7 @@ /** * This scenario assumes an existing search solution, with index and an indexer setup (see LifecycleSetupExample) - * For more information visit Azure Search Sample Data + * For more information visit Azure Cognitive Search Sample Data * https://docs.microsoft.com/en-us/samples/azure-samples/azure-search-sample-data/azure-search-sample-data/ */ public class RefineSearchCapabilitiesExample { diff --git a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/RunningSearchSolutionExample.java b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/RunningSearchSolutionExample.java index 259ba3ab0fd2..9e5fe4c57710 100644 --- a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/RunningSearchSolutionExample.java +++ b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/RunningSearchSolutionExample.java @@ -27,7 +27,7 @@ /** * This scenario assumes an existing search solution, with index and an indexer setup (see LifecycleSetupExample) - * Azure Search Sample Data + * Azure Cognitive Search Sample Data * https://docs.microsoft.com/en-us/samples/azure-samples/azure-search-sample-data/azure-search-sample-data/ */ public class RunningSearchSolutionExample { diff --git a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/indexes/LifecycleSetupExample.java b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/indexes/LifecycleSetupExample.java index c6acd454d1b8..eff3c0a9775d 100644 --- a/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/indexes/LifecycleSetupExample.java +++ b/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/indexes/LifecycleSetupExample.java @@ -29,7 +29,7 @@ /** * This scenario assumes an existing search solution and uses a pre-population data source with sample data set - * For more information visit Azure Search Sample Data: + * For more information visit Azure Cognitive Search Sample Data: * https://docs.microsoft.com/en-us/samples/azure-samples/azure-search-sample-data/azure-search-sample-data/ */ public class LifecycleSetupExample { diff --git a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/TestHelpers.java b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/TestHelpers.java index da20ef304172..d31986de974c 100644 --- a/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/TestHelpers.java +++ b/sdk/search/azure-search-documents/src/test/java/com/azure/search/documents/TestHelpers.java @@ -39,7 +39,7 @@ import static org.junit.jupiter.api.Assertions.fail; /** - * This class contains helper methods for running Azure Search tests. + * This class contains helper methods for running Azure Cognitive Search tests. */ public final class TestHelpers { private static final TestMode TEST_MODE = setupTestMode(); diff --git a/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md b/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md index b59c2cf0196d..68344bf8adb4 100644 --- a/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-messaging-servicebus/CHANGELOG.md @@ -1,10 +1,15 @@ # Release History -## 7.0.0-beta.4 (Unreleased) - +## 7.0.0-beta.4 (2020-07-10) +- Add support for send messages via another entity. +- Add support for management operations on a topic, subscription, or namespace. +- Add support for receiving messages from the dead letter queue. +- Change suffixes for receive methods by adding `Message` or `Messages`. +- Remove `MessageLockToken` interface in favour of passing a lock token string. ## 7.0.0-beta.3 (2020-06-08) - Add support for transaction feature in all the clients. +- Add support for management operations on a Queue. ## 7.0.0-beta.2 (2020-05-07) diff --git a/sdk/servicebus/azure-messaging-servicebus/README.md b/sdk/servicebus/azure-messaging-servicebus/README.md index e061bfd600c4..9fbf8a0aee68 100644 --- a/sdk/servicebus/azure-messaging-servicebus/README.md +++ b/sdk/servicebus/azure-messaging-servicebus/README.md @@ -37,7 +37,7 @@ To quickly create the needed Service Bus resources in Azure and to receive a con com.azure azure-messaging-servicebus - 7.0.0-beta.3 + 7.0.0-beta.4 ``` [//]: # ({x-version-update-end}) @@ -86,7 +86,7 @@ platform. First, add the package: com.azure azure-identity - 1.0.6 + 1.0.9 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/servicebus/azure-messaging-servicebus/pom.xml b/sdk/servicebus/azure-messaging-servicebus/pom.xml index ca1134023885..efd0bd6474ac 100644 --- a/sdk/servicebus/azure-messaging-servicebus/pom.xml +++ b/sdk/servicebus/azure-messaging-servicebus/pom.xml @@ -71,7 +71,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/spring/CONTRIBUTING.md b/sdk/spring/CONTRIBUTING.md index 87b09e0025e9..e7b9b7abf19f 100644 --- a/sdk/spring/CONTRIBUTING.md +++ b/sdk/spring/CONTRIBUTING.md @@ -33,36 +33,31 @@ submission is consistent with the project standards and is ready to be accepted ## Building from source -To build the project, open a command prompt/terminal: +If it's the first time you try to build the project or you pull new commits from github, then you need to build the whole SDK project with the below command: 1. Execute `git clone https://github.com/Azure/azure-sdk-for-java.git` -1. Traverse to the spring directory: +1. Traverse to the root directory: +1. Build the whole product by executing the following command which may take several minutes: + * `mvn clean install -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Djacoco.skip=true​ -DskipTests -Dparallel-test-playback` + +After executing the above steps, you can build the spring project only for the developing purpose: +1. Traverse to spring directory: * `cd sdk\spring` -1. Build the product by executing: - * `mvn clean package -DskipTests` +1. Build the spring project: + * `mvn clean install -DskipTests` + ## Running tests After following instructions above, you can run the unit tests by executing: ```shell -mvn clean test +mvn test ``` For unit tests, there are no special considerations; these are self-contained and execute locally without any reliance on external resources. These tests are run for all PR validations. -## FAQ - -When building Spring Boot project, if it fails on the sample `azure-spring-boot-sample-servicebus`, please deploy the -`com.azure:azure-messaging-servicebus` to your local repository manually by: -```shell -cd sdk\servicebus\azure-messaging-service -mvn clean install -DskipTests -``` -This is because the version of `com.azure:azure-messaging-servicebus` library the sample depends on is from this SDK -repository instead of Maven. - ## Version management Developing version naming convention is like `0.1.2-beta.1`. Release version naming convention is like `0.1.2`. diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/AzureADB2COIDCSampleApplication.java b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/AzureADB2COIDCSampleApplication.java similarity index 91% rename from sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/AzureADB2COIDCSampleApplication.java rename to sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/AzureADB2COIDCSampleApplication.java index 2a9ba33644b1..15d40cddcbd8 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/AzureADB2COIDCSampleApplication.java +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/AzureADB2COIDCSampleApplication.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.aad.btoc; +package com.microsoft.azure.aad.b2c; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/controller/WebController.java b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/controller/WebController.java new file mode 100644 index 000000000000..ad38e4965aef --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/controller/WebController.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.aad.b2c.controller; + +import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken; +import org.springframework.security.oauth2.core.user.OAuth2User; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class WebController { + + private void initializeModel(Model model, OAuth2AuthenticationToken token) { + if (token != null) { + final OAuth2User user = token.getPrincipal(); + + model.addAttribute("grant_type", user.getAuthorities()); + model.addAllAttributes(user.getAttributes()); + } + } + + @GetMapping(value = "/") + public String index(Model model, OAuth2AuthenticationToken token) { + initializeModel(model, token); + + return "home"; + } + + @GetMapping(value = "/greeting") + public String greeting(Model model, OAuth2AuthenticationToken token) { + initializeModel(model, token); + + return "greeting"; + } + + @GetMapping(value = "/home") + public String home(Model model, OAuth2AuthenticationToken token) { + initializeModel(model, token); + + return "home"; + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/security/WebSecurityConfiguration.java b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/security/WebSecurityConfiguration.java similarity index 87% rename from sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/security/WebSecurityConfiguration.java rename to sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/security/WebSecurityConfiguration.java index 4c1fd4ae3d40..c2096ee6420c 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/security/WebSecurityConfiguration.java +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/b2c/security/WebSecurityConfiguration.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.aad.btoc.security; +package com.microsoft.azure.aad.b2c.security; -import com.microsoft.azure.spring.autoconfigure.btoc.AADB2COidcLoginConfigurer; +import com.microsoft.azure.spring.autoconfigure.b2c.AADB2COidcLoginConfigurer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/controller/WebController.java b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/controller/WebController.java deleted file mode 100644 index dcd7810e546d..000000000000 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/src/main/java/com/microsoft/azure/aad/btoc/controller/WebController.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.microsoft.azure.aad.btoc.controller; - -import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken; -import org.springframework.security.oauth2.core.user.OAuth2User; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.GetMapping; - -@Controller -public class WebController { - - private void initializeModel(Model model, OAuth2AuthenticationToken token) { - if (token != null) { - final OAuth2User user = token.getPrincipal(); - - model.addAttribute("grant_type", user.getAuthorities()); - model.addAllAttributes(user.getAttributes()); - } - } - - @GetMapping(value = "/") - public String index(Model model, OAuth2AuthenticationToken token) { - initializeModel(model, token); - - return "home"; - } - - @GetMapping(value = "/greeting") - public String greeting(Model model, OAuth2AuthenticationToken token) { - initializeModel(model, token); - - return "greeting"; - } - - @GetMapping(value = "/home") - public String home(Model model, OAuth2AuthenticationToken token) { - initializeModel(model, token); - - return "home"; - } -} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/pom.xml new file mode 100644 index 000000000000..23daf6c19758 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.3.0.RELEASE + + + com.azure + azure-spring-data-sample-gremlin-web-service + Spring Data gremlin - Web Service + + + + org.springframework.boot + spring-boot + + + + org.springframework.boot + spring-boot-autoconfigure + + + + org.springframework.boot + spring-boot-starter-web + + + + com.jayway.jsonpath + json-path + + + + com.azure + azure-spring-data-gremlin + 2.3.1-beta.1 + + + + + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/Application.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/Application.java new file mode 100644 index 000000000000..f8dab928682b --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/Application.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/config/GremlinProperties.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/config/GremlinProperties.java new file mode 100644 index 000000000000..d1d3f7e2deb4 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/config/GremlinProperties.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.config; + +import org.apache.tinkerpop.gremlin.driver.ser.Serializers; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@ConfigurationProperties("gremlin") +public class GremlinProperties { + private String endpoint; + + private int port; + + private String username; + + private String password; + + private boolean sslEnabled; + + private boolean telemetryAllowed = true; + + private String serializer = Serializers.GRAPHSON.toString(); + + private int maxContentLength; + + public GremlinProperties() { + } + + public GremlinProperties(String endpoint, int port, String username, String password, boolean sslEnabled, + boolean telemetryAllowed, String serializer, int maxContentLength) { + this.endpoint = endpoint; + this.port = port; + this.username = username; + this.password = password; + this.sslEnabled = sslEnabled; + this.telemetryAllowed = telemetryAllowed; + this.serializer = serializer; + this.maxContentLength = maxContentLength; + } + + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public boolean isSslEnabled() { + return sslEnabled; + } + + public void setSslEnabled(boolean sslEnabled) { + this.sslEnabled = sslEnabled; + } + + public boolean isTelemetryAllowed() { + return telemetryAllowed; + } + + public void setTelemetryAllowed(boolean telemetryAllowed) { + this.telemetryAllowed = telemetryAllowed; + } + + public String getSerializer() { + return serializer; + } + + public void setSerializer(String serializer) { + this.serializer = serializer; + } + + public int getMaxContentLength() { + return maxContentLength; + } + + public void setMaxContentLength(int maxContentLength) { + this.maxContentLength = maxContentLength; + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/config/UserRepositoryConfiguration.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/config/UserRepositoryConfiguration.java new file mode 100644 index 000000000000..7af294f9358a --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/config/UserRepositoryConfiguration.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.config; + +import com.microsoft.spring.data.gremlin.common.GremlinConfig; +import com.microsoft.spring.data.gremlin.config.AbstractGremlinConfiguration; +import com.microsoft.spring.data.gremlin.repository.config.EnableGremlinRepositories; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +@Configuration +@EnableGremlinRepositories(basePackages = "com.microsoft.azure.spring.data.gremlin.web.service.repository") +@EnableConfigurationProperties(GremlinProperties.class) +@PropertySource("classpath:application.properties") +public class UserRepositoryConfiguration extends AbstractGremlinConfiguration { + + @Autowired + private GremlinProperties gremlinProps; + + @Override + public GremlinConfig getGremlinConfig() { + return GremlinConfig.defaultBuilder() + .endpoint(gremlinProps.getEndpoint()) + .port(gremlinProps.getPort()) + .username(gremlinProps.getUsername()) + .password(gremlinProps.getPassword()) + .sslEnabled(gremlinProps.isSslEnabled()) + .telemetryAllowed(gremlinProps.isTelemetryAllowed()) + .serializer(gremlinProps.getSerializer()) + .maxContentLength(gremlinProps.getMaxContentLength()) + .build(); + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/MicroService.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/MicroService.java new file mode 100644 index 000000000000..1fd5baf7da98 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/MicroService.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import org.springframework.data.annotation.Id; + +import java.util.HashMap; +import java.util.Map; + +@Vertex +public class MicroService { + + @Id + private String id; + + private Map properties = new HashMap<>(); + + public MicroService() { + } + + public MicroService(String id, Map properties) { + this.id = id; + this.properties = properties; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/ServicesDataFlow.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/ServicesDataFlow.java new file mode 100644 index 000000000000..9d8e6c419d2d --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/ServicesDataFlow.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import org.springframework.data.annotation.Id; + +import java.util.HashMap; +import java.util.Map; + +@Edge +public class ServicesDataFlow { + + @Id + private String id; + + @EdgeFrom + private MicroService serviceFrom; + + @EdgeTo + private MicroService serviceTo; + + private Map properties = new HashMap<>(); + + public ServicesDataFlow() { + } + + public ServicesDataFlow(String id, MicroService serviceFrom, MicroService serviceTo, + Map properties) { + this.id = id; + this.serviceFrom = serviceFrom; + this.serviceTo = serviceTo; + this.properties = properties; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public MicroService getServiceFrom() { + return serviceFrom; + } + + public void setServiceFrom(MicroService serviceFrom) { + this.serviceFrom = serviceFrom; + } + + public MicroService getServiceTo() { + return serviceTo; + } + + public void setServiceTo(MicroService serviceTo) { + this.serviceTo = serviceTo; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/SpringCloudServiceNetwork.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/SpringCloudServiceNetwork.java new file mode 100644 index 000000000000..bb5c2e6913e4 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/domain/SpringCloudServiceNetwork.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.domain; + +import com.microsoft.spring.data.gremlin.annotation.EdgeSet; +import com.microsoft.spring.data.gremlin.annotation.Graph; +import com.microsoft.spring.data.gremlin.annotation.VertexSet; +import org.springframework.data.annotation.Id; + +import java.util.ArrayList; +import java.util.List; + +@Graph +public class SpringCloudServiceNetwork { + + @Id + private String id; + + @EdgeSet + private List edges = new ArrayList<>(); + + @VertexSet + private List vertexes = new ArrayList<>(); + + public List getEdges() { + return edges; + } + + public List getVertexes() { + return vertexes; + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/MicroServiceRepository.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/MicroServiceRepository.java new file mode 100644 index 000000000000..7036cbca53e4 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/MicroServiceRepository.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.repository; + +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import com.microsoft.spring.data.gremlin.web.service.domain.MicroService; +import org.springframework.stereotype.Repository; + +@Repository +public interface MicroServiceRepository extends GremlinRepository { +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/ServicesDataFlowRepository.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/ServicesDataFlowRepository.java new file mode 100644 index 000000000000..e6a906c87826 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/ServicesDataFlowRepository.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.repository; + +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import com.microsoft.spring.data.gremlin.web.service.domain.ServicesDataFlow; +import org.springframework.stereotype.Repository; + +@Repository +public interface ServicesDataFlowRepository extends GremlinRepository { +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/SpringCloudServiceNetworkRepository.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/SpringCloudServiceNetworkRepository.java new file mode 100644 index 000000000000..295e187c4f65 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/repository/SpringCloudServiceNetworkRepository.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.repository; + +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import com.microsoft.spring.data.gremlin.web.service.domain.SpringCloudServiceNetwork; +import org.springframework.stereotype.Repository; + +@Repository +public interface SpringCloudServiceNetworkRepository extends GremlinRepository { +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/web/Controller/WebController.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/web/Controller/WebController.java new file mode 100644 index 000000000000..f0ca51af9a0e --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/web/Controller/WebController.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.web.Controller; + +import com.microsoft.spring.data.gremlin.web.service.repository.ServicesDataFlowRepository; +import com.microsoft.spring.data.gremlin.web.service.web.domain.Greeting; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.microsoft.spring.data.gremlin.web.service.domain.MicroService; +import com.microsoft.spring.data.gremlin.web.service.domain.ServicesDataFlow; +import com.microsoft.spring.data.gremlin.web.service.repository.MicroServiceRepository; + +import java.util.List; +import java.util.Optional; +import java.util.concurrent.atomic.AtomicLong; + +@RestController +public class WebController { + + @Autowired + private MicroServiceRepository microServiceRepo; + + @Autowired + private ServicesDataFlowRepository dataFlowRepo; + + private final AtomicLong counter = new AtomicLong(); + + @RequestMapping(value = "/greeting", method = RequestMethod.GET) + public Greeting greeting() { + return new Greeting(String.valueOf(this.counter.incrementAndGet()), "Greetings to User."); + } + + @RequestMapping(value = "/services/{id}", method = RequestMethod.GET) + public MicroService getService(@PathVariable String id) { + + final Optional foundService = this.microServiceRepo.findById(id); + + return foundService.orElse(null); + } + + @RequestMapping(value = "/services/{id}", method = RequestMethod.PUT) + public MicroService putService(@PathVariable String id, @RequestBody MicroService service) { + + if (!service.getId().equals(id)) { + service.setId(id); + } + + this.microServiceRepo.save(service); + + return service; + } + + @RequestMapping(value = "/services/{id}", method = RequestMethod.DELETE) + public void deleteService(@PathVariable String id) { + this.microServiceRepo.deleteById(id); + } + + @RequestMapping(value = "/services/", method = RequestMethod.DELETE) + public void deleteService(@RequestBody MicroService service) { + this.microServiceRepo.delete(service); + } + + @RequestMapping(value = "/services/all", method = RequestMethod.DELETE) + public void deleteServicesAll() { + this.microServiceRepo.deleteAll(); + } + + @RequestMapping(value = "/services/", method = RequestMethod.PUT) + public MicroService putService(@RequestBody MicroService service) { + + this.microServiceRepo.save(service); + + return service; + } + + @RequestMapping(value = "/services/", method = RequestMethod.GET) + public List getServiceList() { + return (List) this.microServiceRepo.findAll(MicroService.class); + } + + @RequestMapping(value = "/services/create/{id}", method = RequestMethod.PUT) + public MicroService createService(@PathVariable String id, @RequestBody MicroService service) { + return this.putService(id, service); + } + + @RequestMapping(value = "/services/create/", method = RequestMethod.PUT) + public MicroService createService(@RequestBody MicroService service) { + return this.putService(service); + } + + @RequestMapping(value = "/dataflow/{id}", method = RequestMethod.GET) + public ServicesDataFlow getServicesDataFlow(@PathVariable String id) { + + final Optional foundDataFlow = this.dataFlowRepo.findById(id); + + return foundDataFlow.orElse(null); + } + + @RequestMapping(value = "/dataflow/{id}", method = RequestMethod.PUT) + public ServicesDataFlow putServicesDataFlow(@PathVariable String id, @RequestBody ServicesDataFlow dataFlow) { + + if (!dataFlow.getId().equals(id)) { + dataFlow.setId(id); + } + + this.dataFlowRepo.save(dataFlow); + + return dataFlow; + } + + @RequestMapping(value = "/dataflow/", method = RequestMethod.PUT) + public ServicesDataFlow putServicesDataFlow(@RequestBody ServicesDataFlow dataFlow) { + + this.dataFlowRepo.save(dataFlow); + + return dataFlow; + } + + @RequestMapping(value = "/dataflow/", method = RequestMethod.GET) + public List getServicesDataFlowList() { + return (List) this.dataFlowRepo.findAll(ServicesDataFlow.class); + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/web/domain/Greeting.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/web/domain/Greeting.java new file mode 100644 index 000000000000..ff8bd6b4e652 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/java/com/microsoft/spring/data/gremlin/web/service/web/domain/Greeting.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.web.service.web.domain; + + +public class Greeting { + + private String id; + + private String content; + + public Greeting() { + } + + public Greeting(String id, String content) { + this.id = id; + this.content = content; + } + + public String getId() { + return id; + } + + public String getContent() { + return content; + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/resources/application.properties b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/resources/application.properties new file mode 100644 index 000000000000..f722d685d53c --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service/src/main/resources/application.properties @@ -0,0 +1,7 @@ +gremlin.endpoint=localhost +gremlin.port=8889 +gremlin.username=your-username +gremlin.password=your-password +gremlin.sslEnabled=false +gremlin.telemetryAllowed=true +gremlin.maxContentLength=1000 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/pom.xml new file mode 100644 index 000000000000..ba8b3089ed1f --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.3.0.RELEASE + + + com.azure + azure-spring-data-sample-gremlin + Spring Data gremlin - Sample + + + + org.springframework.boot + spring-boot + + + + org.springframework.boot + spring-boot-autoconfigure + + + + org.springframework.boot + spring-boot-starter-data-rest + + + + com.azure + azure-spring-data-gremlin + 2.3.1-beta.1 + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/Application.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/Application.java new file mode 100644 index 000000000000..c47b5d4e1634 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/Application.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin; + +import com.microsoft.spring.data.gremlin.common.GremlinFactory; +import com.microsoft.spring.data.gremlin.domain.Network; +import com.microsoft.spring.data.gremlin.domain.Person; +import com.microsoft.spring.data.gremlin.domain.Relation; +import com.microsoft.spring.data.gremlin.repository.NetworkRepository; +import com.microsoft.spring.data.gremlin.repository.PersonRepository; +import com.microsoft.spring.data.gremlin.repository.RelationRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +import javax.annotation.PostConstruct; + +@SpringBootApplication +public class Application { + + private static final String PERSON_ID = "89757"; + private static final String PERSON_ID_0 = "0123456789"; + private static final String PERSON_ID_1 = "666666"; + private static final String PERSON_NAME = "person-name"; + private static final String PERSON_NAME_0 = "person-No.0"; + private static final String PERSON_NAME_1 = "person-No.1"; + private static final String PERSON_AGE = "4"; + private static final String PERSON_AGE_0 = "18"; + private static final String PERSON_AGE_1 = "27"; + + private static final String RELATION_ID = "2333"; + private static final String RELATION_NAME = "brother"; + + private final Person person = new Person(PERSON_ID, PERSON_NAME, PERSON_AGE); + private final Person person0 = new Person(PERSON_ID_0, PERSON_NAME_0, PERSON_AGE_0); + private final Person person1 = new Person(PERSON_ID_1, PERSON_NAME_1, PERSON_AGE_1); + private final Relation relation = new Relation(RELATION_ID, RELATION_NAME, person0, person1); + private final Network network = new Network(); + + @Autowired + private PersonRepository personRepo; + + @Autowired + private RelationRepository relationRepo; + + @Autowired + private NetworkRepository networkRepo; + + @Autowired + private GremlinFactory factory; + + public static void main(String... args) { + SpringApplication.run(Application.class, args); + } + + @PostConstruct + public void setup() { + this.networkRepo.deleteAll(); + + this.network.getEdges().add(this.relation); + this.network.getVertexes().add(this.person); + this.network.getVertexes().add(this.person0); + this.network.getVertexes().add(this.person1); + + this.networkRepo.save(this.network); + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/GremlinProperties.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/GremlinProperties.java new file mode 100644 index 000000000000..02a3c692d510 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/GremlinProperties.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.config; + +import org.apache.tinkerpop.gremlin.driver.ser.Serializers; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@ConfigurationProperties("gremlin") +public class GremlinProperties { + + private String endpoint; + + private int port; + + private String username; + + private String password; + + private boolean sslEnabled; + + private boolean telemetryAllowed = true; + + private String serializer = Serializers.GRAPHSON.toString(); + + private int maxContentLength; + + public GremlinProperties() { + } + + public GremlinProperties(String endpoint, int port, String username, String password, boolean sslEnabled, + boolean telemetryAllowed, String serializer, int maxContentLength) { + this.endpoint = endpoint; + this.port = port; + this.username = username; + this.password = password; + this.sslEnabled = sslEnabled; + this.telemetryAllowed = telemetryAllowed; + this.serializer = serializer; + this.maxContentLength = maxContentLength; + } + + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public boolean isSslEnabled() { + return sslEnabled; + } + + public void setSslEnabled(boolean sslEnabled) { + this.sslEnabled = sslEnabled; + } + + public boolean isTelemetryAllowed() { + return telemetryAllowed; + } + + public void setTelemetryAllowed(boolean telemetryAllowed) { + this.telemetryAllowed = telemetryAllowed; + } + + public String getSerializer() { + return serializer; + } + + public void setSerializer(String serializer) { + this.serializer = serializer; + } + + public int getMaxContentLength() { + return maxContentLength; + } + + public void setMaxContentLength(int maxContentLength) { + this.maxContentLength = maxContentLength; + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/UserRepositoryConfiguration.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/UserRepositoryConfiguration.java new file mode 100644 index 000000000000..7c29028f7c62 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/UserRepositoryConfiguration.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.config; + +import com.microsoft.spring.data.gremlin.common.GremlinConfig; +import com.microsoft.spring.data.gremlin.repository.config.EnableGremlinRepositories; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +@Configuration +@EnableGremlinRepositories(basePackages = "com.microsoft.azure.spring.data.gremlin.repository") +@EnableConfigurationProperties(GremlinProperties.class) +@PropertySource("classpath:application.properties") +public class UserRepositoryConfiguration extends AbstractGremlinConfiguration { + + @Autowired + private GremlinProperties gremlinProps; + + @Override + public GremlinConfig getGremlinConfig() { + return GremlinConfig.defaultBuilder() + .endpoint(gremlinProps.getEndpoint()) + .port(gremlinProps.getPort()) + .username(gremlinProps.getUsername()) + .password(gremlinProps.getPassword()) + .sslEnabled(gremlinProps.isSslEnabled()) + .telemetryAllowed(gremlinProps.isTelemetryAllowed()) + .serializer(gremlinProps.getSerializer()) + .maxContentLength(gremlinProps.getMaxContentLength()) + .build(); + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Network.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Network.java new file mode 100644 index 000000000000..6eeb3094dd49 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Network.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.domain; + +import com.microsoft.spring.data.gremlin.annotation.EdgeSet; +import com.microsoft.spring.data.gremlin.annotation.Graph; +import com.microsoft.spring.data.gremlin.annotation.VertexSet; +import org.springframework.data.annotation.Id; + +import java.util.ArrayList; +import java.util.List; + +@Graph +public class Network { + + @Id + private String id; + + public Network() { + this.edges = new ArrayList<>(); + this.vertexes = new ArrayList<>(); + } + + @EdgeSet + private List edges; + + @VertexSet + private List vertexes; + + public List getEdges() { + return edges; + } + + public List getVertexes() { + return vertexes; + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Person.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Person.java new file mode 100644 index 000000000000..950ee1f6e01a --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Person.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import org.springframework.data.annotation.Id; + +@Vertex +public class Person { + + @Id + private String id; + + private String name; + + private String age; + + public Person() { + } + + public Person(String id, String name, String age) { + this.id = id; + this.name = name; + this.age = age; + } + + public String getId() { + return id; + } + + public String getName() { + return name; + } + + public String getAge() { + return age; + } + + public void setId(String id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setAge(String age) { + this.age = age; + } +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Relation.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Relation.java new file mode 100644 index 000000000000..3b89d64a4f6a --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/domain/Relation.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import org.springframework.data.annotation.Id; + +@Edge +public class Relation { + + @Id + private String id; + + private String name; + + @EdgeFrom + private Person personFrom; + + @EdgeTo + private Person personTo; + + public Relation() { + } + + public Relation(String id, String name, Person personFrom, Person personTo) { + this.id = id; + this.name = name; + this.personFrom = personFrom; + this.personTo = personTo; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Person getPersonFrom() { + return personFrom; + } + + public void setPersonFrom(Person personFrom) { + this.personFrom = personFrom; + } + + public Person getPersonTo() { + return personTo; + } + + public void setPersonTo(Person personTo) { + this.personTo = personTo; + } +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/NetworkRepository.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/NetworkRepository.java new file mode 100644 index 000000000000..5118e31471bd --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/NetworkRepository.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.domain.Network; +import org.springframework.stereotype.Repository; + +@Repository +public interface NetworkRepository extends GremlinRepository { +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/PersonRepository.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/PersonRepository.java new file mode 100644 index 000000000000..d65f44596dda --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/PersonRepository.java @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.domain.Person; +import org.springframework.data.rest.webmvc.RepositoryRestController; +import org.springframework.stereotype.Repository; + +@Repository +@RepositoryRestController +public interface PersonRepository extends GremlinRepository { +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/RelationRepository.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/RelationRepository.java new file mode 100644 index 000000000000..0b7b1cf8cabc --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/RelationRepository.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.domain.Relation; +import org.springframework.stereotype.Repository; + +@Repository +public interface RelationRepository extends GremlinRepository { +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/resources/application.properties b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/resources/application.properties new file mode 100644 index 000000000000..f722d685d53c --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/main/resources/application.properties @@ -0,0 +1,7 @@ +gremlin.endpoint=localhost +gremlin.port=8889 +gremlin.username=your-username +gremlin.password=your-password +gremlin.sslEnabled=false +gremlin.telemetryAllowed=true +gremlin.maxContentLength=1000 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/java/com/microsoft/spring/data/gremlin/GremlinRepositoryIntegrationTest.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/java/com/microsoft/spring/data/gremlin/GremlinRepositoryIntegrationTest.java new file mode 100644 index 000000000000..8a69fe6bc49d --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/java/com/microsoft/spring/data/gremlin/GremlinRepositoryIntegrationTest.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin; + +import com.microsoft.spring.data.gremlin.domain.Network; +import com.microsoft.spring.data.gremlin.domain.Person; +import com.microsoft.spring.data.gremlin.domain.Relation; +import com.microsoft.spring.data.gremlin.repository.NetworkRepository; +import com.microsoft.spring.data.gremlin.repository.PersonRepository; +import com.microsoft.spring.data.gremlin.repository.RelationRepository; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Optional; + +@SpringBootTest +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = RepositoryConfiguration.class) +@Ignore +public class GremlinRepositoryIntegrationTest { + private static final String PERSON_ID = "89757"; + private static final String PERSON_ID_0 = "0123456789"; + private static final String PERSON_ID_1 = "666666"; + private static final String PERSON_NAME = "person-name"; + private static final String PERSON_NAME_0 = "person-No.0"; + private static final String PERSON_NAME_1 = "person-No.1"; + private static final String PERSON_AGE = "4"; + private static final String PERSON_AGE_0 = "18"; + private static final String PERSON_AGE_1 = "27"; + + private static final String RELATION_ID = "2333"; + private static final String RELATION_NAME = "brother"; + + private final Person person = new Person(PERSON_ID, PERSON_NAME, PERSON_AGE); + private final Person person0 = new Person(PERSON_ID_0, PERSON_NAME_0, PERSON_AGE_0); + private final Person person1 = new Person(PERSON_ID_1, PERSON_NAME_1, PERSON_AGE_1); + private final Relation relation = new Relation(RELATION_ID, RELATION_NAME, person0, person1); + private final Network network = new Network(); + + @Autowired + private PersonRepository personRepo; + + @Autowired + private RelationRepository relationRepo; + + @Autowired + private NetworkRepository networkRepo; + + @Before + public void setup() { + this.networkRepo.deleteAll(); + } + + @After + public void cleanup() { + this.networkRepo.deleteAll(); + } + + @Test + public void testRepository() { + this.network.getVertexes().add(this.person); + this.network.getVertexes().add(this.person0); + this.network.getVertexes().add(this.person1); + this.network.getEdges().add(this.relation); + + this.networkRepo.save(this.network); + + final Optional personOptional = this.personRepo.findById(this.person.getId()); + Assert.assertTrue(personOptional.isPresent()); + + final Person personFound = personOptional.get(); + Assert.assertEquals(personFound.getId(), this.person.getId()); + Assert.assertEquals(personFound.getName(), this.person.getName()); + Assert.assertEquals(personFound.getAge(), this.person.getAge()); + + final Optional relationOptional = this.relationRepo.findById(this.relation.getId()); + Assert.assertTrue(relationOptional.isPresent()); + + final Relation relationFound = relationOptional.get(); + + Assert.assertEquals(relationFound.getId(), this.relation.getId()); + Assert.assertEquals(relationFound.getName(), this.relation.getName()); + } +} + diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/java/com/microsoft/spring/data/gremlin/RepositoryConfiguration.java b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/java/com/microsoft/spring/data/gremlin/RepositoryConfiguration.java new file mode 100644 index 000000000000..d94d8cdb6d31 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/java/com/microsoft/spring/data/gremlin/RepositoryConfiguration.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin; + +import com.microsoft.spring.data.gremlin.common.GremlinConfig; +import com.microsoft.spring.data.gremlin.config.AbstractGremlinConfiguration; +import com.microsoft.spring.data.gremlin.config.GremlinProperties; +import com.microsoft.spring.data.gremlin.repository.config.EnableGremlinRepositories; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + + +@Configuration +@EnableGremlinRepositories(basePackages = "com.microsoft.azure.spring.data.gremlin.repository") +@EnableConfigurationProperties(GremlinProperties.class) +@PropertySource("classpath:application.yml") +public class RepositoryConfiguration extends AbstractGremlinConfiguration { + + @Autowired + private GremlinProperties gremlinProps; + + @Override + public GremlinConfig getGremlinConfig() { + return GremlinConfig.defaultBuilder() + .endpoint(gremlinProps.getEndpoint()) + .port(gremlinProps.getPort()) + .username(gremlinProps.getUsername()) + .password(gremlinProps.getPassword()) + .sslEnabled(gremlinProps.isSslEnabled()) + .telemetryAllowed(gremlinProps.isTelemetryAllowed()) + .serializer(gremlinProps.getSerializer()) + .maxContentLength(gremlinProps.getMaxContentLength()) + .build(); + } +} diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/resources/application.yml b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/resources/application.yml new file mode 100644 index 000000000000..85d68b1b5cc9 --- /dev/null +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-data-sample-gremlin/src/test/resources/application.yml @@ -0,0 +1,7 @@ +gremlin: + endpoint: your-endpoint.gremlin.cosmosdb.azure.com + port: 443 + username: your-username + password: your-password + sslEnabled: false + telemetryAllowed: true diff --git a/sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml b/sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml index e3c29d91fa49..619eaf437442 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml @@ -114,7 +114,7 @@ - + + empty-javadoc-jar-with-readme package @@ -155,6 +156,20 @@ ${project.basedir}/javadocTemp + + + + empty-sources-jar-with-readme + package + + jar + + + sources + ${project.basedir}/sourceTemp + + + @@ -181,9 +196,39 @@ run + + copy-readme-to-sourceTemp + prepare-package + + + Deleting existing ${project.basedir}/sourceTemp + + + + Copying ${project.basedir}/README.md to + ${project.basedir}/sourceTemp/README.md + + + + + + run + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + none + - + diff --git a/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml b/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml index 4a7746e1303c..8b27f7d3079a 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-active-directory/pom.xml @@ -58,7 +58,7 @@ com.microsoft.azure msal4j - 1.3.0 + 1.6.1 com.nimbusds @@ -84,7 +84,7 @@ com.microsoft.azure:azure-spring-boot:[2.3.3-beta.1] --> com.fasterxml.jackson.core:jackson-databind:[2.10.1] - com.microsoft.azure:msal4j:[1.3.0] + com.microsoft.azure:msal4j:[1.6.1] com.nimbusds:nimbus-jose-jwt:[7.9] org.springframework:spring-web:[5.2.6.RELEASE] org.springframework.boot:spring-boot-starter:[2.3.0.RELEASE] @@ -97,7 +97,7 @@ - + + empty-javadoc-jar-with-readme package @@ -138,6 +139,20 @@ ${project.basedir}/javadocTemp + + + + empty-sources-jar-with-readme + package + + jar + + + sources + ${project.basedir}/sourceTemp + + + @@ -164,9 +179,39 @@ run + + copy-readme-to-sourceTemp + prepare-package + + + Deleting existing ${project.basedir}/sourceTemp + + + + Copying ${project.basedir}/README.md to + ${project.basedir}/sourceTemp/README.md + + + + + + run + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + none + - + diff --git a/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml index c4c36f84f876..1ae3acb700d3 100644 --- a/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-cosmosdb/pom.xml @@ -61,7 +61,7 @@ - + + empty-javadoc-jar-with-readme package @@ -102,6 +103,20 @@ ${project.basedir}/javadocTemp + + + + empty-sources-jar-with-readme + package + + jar + + + sources + ${project.basedir}/sourceTemp + + + @@ -128,9 +143,39 @@ run + + copy-readme-to-sourceTemp + prepare-package + + + Deleting existing ${project.basedir}/sourceTemp + + + + Copying ${project.basedir}/README.md to + ${project.basedir}/sourceTemp/README.md + + + + + + run + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + none + - + diff --git a/sdk/spring/azure-spring-boot-starter-data-gremlin/pom.xml b/sdk/spring/azure-spring-boot-starter-data-gremlin/pom.xml index ec9a83c55118..41e808004868 100644 --- a/sdk/spring/azure-spring-boot-starter-data-gremlin/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-data-gremlin/pom.xml @@ -37,7 +37,7 @@ com.microsoft.spring.data.gremlin spring-data-gremlin - 2.2.3 + 2.3.0 com.fasterxml.jackson.core @@ -58,7 +58,7 @@ com.microsoft.azure:azure-spring-boot:[2.3.3-beta.1] com.fasterxml.jackson.core:jackson-core:[2.10.1] - com.microsoft.spring.data.gremlin:spring-data-gremlin:[2.2.3] + com.microsoft.spring.data.gremlin:spring-data-gremlin:[2.3.0] org.springframework.boot:spring-boot-starter:[2.3.0.RELEASE] org.springframework.boot:spring-boot-starter-validation:[2.3.0.RELEASE] @@ -66,7 +66,7 @@ - + + empty-javadoc-jar-with-readme package @@ -107,6 +108,20 @@ ${project.basedir}/javadocTemp + + + + empty-sources-jar-with-readme + package + + jar + + + sources + ${project.basedir}/sourceTemp + + + @@ -133,9 +148,39 @@ run + + copy-readme-to-sourceTemp + prepare-package + + + Deleting existing ${project.basedir}/sourceTemp + + + + Copying ${project.basedir}/README.md to + ${project.basedir}/sourceTemp/README.md + + + + + + run + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + none + - + diff --git a/sdk/spring/azure-spring-boot-starter-keyvault-secrets/pom.xml b/sdk/spring/azure-spring-boot-starter-keyvault-secrets/pom.xml index f0286a675c3d..cd77b00042ba 100644 --- a/sdk/spring/azure-spring-boot-starter-keyvault-secrets/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-keyvault-secrets/pom.xml @@ -60,7 +60,7 @@ - + + empty-javadoc-jar-with-readme package @@ -101,6 +102,20 @@ ${project.basedir}/javadocTemp + + + + empty-sources-jar-with-readme + package + + jar + + + sources + ${project.basedir}/sourceTemp + + + @@ -127,44 +142,6 @@ run - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.0.1 - - - attach-sources - none - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - empty-sources-jar-with-readme - package - - jar - - - sources - ${project.basedir}/sourceTemp - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - copy-readme-to-sourceTemp prepare-package @@ -186,7 +163,18 @@ - + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + none + + + + diff --git a/sdk/spring/azure-spring-boot-starter-metrics/pom.xml b/sdk/spring/azure-spring-boot-starter-metrics/pom.xml index 325298cb0163..d1403b8fb337 100644 --- a/sdk/spring/azure-spring-boot-starter-metrics/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-metrics/pom.xml @@ -68,7 +68,7 @@ - + + empty-javadoc-jar-with-readme package @@ -109,6 +110,20 @@ ${project.basedir}/javadocTemp + + + + empty-sources-jar-with-readme + package + + jar + + + sources + ${project.basedir}/sourceTemp + + + @@ -135,9 +150,39 @@ run + + copy-readme-to-sourceTemp + prepare-package + + + Deleting existing ${project.basedir}/sourceTemp + + + + Copying ${project.basedir}/README.md to + ${project.basedir}/sourceTemp/README.md + + + + + + run + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + none + - + diff --git a/sdk/spring/azure-spring-boot-starter-servicebus-jms/pom.xml b/sdk/spring/azure-spring-boot-starter-servicebus-jms/pom.xml index 984c7399811e..c298114745ab 100644 --- a/sdk/spring/azure-spring-boot-starter-servicebus-jms/pom.xml +++ b/sdk/spring/azure-spring-boot-starter-servicebus-jms/pom.xml @@ -64,7 +64,7 @@ - + + empty-javadoc-jar-with-readme package @@ -105,6 +106,20 @@ ${project.basedir}/javadocTemp + + + + empty-sources-jar-with-readme + package + + jar + + + sources + ${project.basedir}/sourceTemp + + + @@ -131,9 +146,39 @@ run + + copy-readme-to-sourceTemp + prepare-package + + + Deleting existing ${project.basedir}/sourceTemp + + + + Copying ${project.basedir}/README.md to + ${project.basedir}/sourceTemp/README.md + + + + + + run + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + none + - + diff --git a/sdk/spring/azure-spring-boot-test-aad/CHANGELOG.md b/sdk/spring/azure-spring-boot-test-aad/CHANGELOG.md new file mode 100644 index 000000000000..3bae488de73c --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-aad/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0 (Unreleased) diff --git a/sdk/spring/azure-spring-boot-test-aad/pom.xml b/sdk/spring/azure-spring-boot-test-aad/pom.xml index f263520b730b..e7f5ff2a695a 100644 --- a/sdk/spring/azure-spring-boot-test-aad/pom.xml +++ b/sdk/spring/azure-spring-boot-test-aad/pom.xml @@ -47,8 +47,7 @@ - com.azure:* - com.microsoft.azure:* + com.microsoft.azure:azure-active-directory-spring-boot-starter:[2.3.3-beta.1] org.springframework.boot:spring-boot-starter-web:[2.3.0.RELEASE] diff --git a/sdk/spring/azure-spring-boot-test-core/CHANGELOG.md b/sdk/spring/azure-spring-boot-test-core/CHANGELOG.md new file mode 100644 index 000000000000..3bae488de73c --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-core/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0 (Unreleased) diff --git a/sdk/spring/azure-spring-boot-test-core/pom.xml b/sdk/spring/azure-spring-boot-test-core/pom.xml index 1752fd094fcd..63c8380ae950 100644 --- a/sdk/spring/azure-spring-boot-test-core/pom.xml +++ b/sdk/spring/azure-spring-boot-test-core/pom.xml @@ -95,8 +95,8 @@ - com.azure:* - com.microsoft.azure:* + com.microsoft.azure:azure:[1.34.0] + com.microsoft.azure:azure-spring-boot-starter:[2.3.3-beta.1] com.jcraft:jsch:[0.1.53] com.github.cverges.expect4j:expect4j:[1.6] org.apache.maven:maven-embedder:[3.6.2] diff --git a/sdk/spring/azure-spring-boot-test-cosmosdb/CHANGELOG.md b/sdk/spring/azure-spring-boot-test-cosmosdb/CHANGELOG.md new file mode 100644 index 000000000000..3bae488de73c --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-cosmosdb/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0 (Unreleased) diff --git a/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml b/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml index 37f3956c8e7a..6f9aaea13ac7 100644 --- a/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml +++ b/sdk/spring/azure-spring-boot-test-cosmosdb/pom.xml @@ -47,8 +47,7 @@ - com.azure:* - com.microsoft.azure:* + com.microsoft.azure:azure-cosmosdb-spring-boot-starter:[2.3.3-beta.1] org.springframework.boot:spring-boot-starter-web:[2.3.0.RELEASE] diff --git a/sdk/spring/azure-spring-boot-test-keyvault/CHANGELOG.md b/sdk/spring/azure-spring-boot-test-keyvault/CHANGELOG.md new file mode 100644 index 000000000000..3bae488de73c --- /dev/null +++ b/sdk/spring/azure-spring-boot-test-keyvault/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 1.0.0 (Unreleased) diff --git a/sdk/spring/azure-spring-boot-test-keyvault/pom.xml b/sdk/spring/azure-spring-boot-test-keyvault/pom.xml index d206c8c9c94b..b2aad1fe2aca 100644 --- a/sdk/spring/azure-spring-boot-test-keyvault/pom.xml +++ b/sdk/spring/azure-spring-boot-test-keyvault/pom.xml @@ -72,8 +72,8 @@ - com.azure:* - com.microsoft.azure:* + com.microsoft.azure:azure:[1.34.0] + com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter:[2.3.3-beta.1] org.springframework.boot:spring-boot-starter-actuator:[2.3.0.RELEASE] org.springframework.boot:spring-boot-starter-web:[2.3.0.RELEASE] diff --git a/sdk/spring/azure-spring-boot/pom.xml b/sdk/spring/azure-spring-boot/pom.xml index a42f22507028..66615f467ec5 100644 --- a/sdk/spring/azure-spring-boot/pom.xml +++ b/sdk/spring/azure-spring-boot/pom.xml @@ -106,11 +106,11 @@ true - + com.microsoft.spring.data.gremlin spring-data-gremlin - 2.2.3 + 2.3.0 true @@ -159,14 +159,14 @@ com.microsoft.azure msal4j - 1.3.0 + 1.6.1 true com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 @@ -263,14 +263,12 @@ - com.azure:* com.fasterxml.jackson.core:jackson-databind:[2.10.1] - com.google.code.findbugs:jsr305:[3.0.2] net.minidev:json-smart:[2.3] com.microsoft.azure:azure-servicebus-jms:[0.0.2] - com.microsoft.azure:msal4j:[1.3.0] + com.microsoft.azure:msal4j:[1.6.1] com.microsoft.azure:spring-data-cosmosdb:[2.3.0] - com.microsoft.spring.data.gremlin:spring-data-gremlin:[2.2.3] + com.microsoft.spring.data.gremlin:spring-data-gremlin:[2.3.0] com.nimbusds:nimbus-jose-jwt:[7.9] io.micrometer:micrometer-core:[1.3.0] io.micrometer:micrometer-registry-azure-monitor:[1.3.0] diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java index 500d96d3aa29..abd5cbf428f0 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java @@ -34,6 +34,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; @@ -51,6 +52,8 @@ public class AzureADGraphClient { private static final String DEFAULT_ROLE_PREFIX = "ROLE_"; private static final String MICROSOFT_GRAPH_SCOPE = "https://graph.microsoft.com/user.read"; private static final String AAD_GRAPH_API_SCOPE = "https://graph.windows.net/user.read"; + // We use "aadfeed5" as suffix when client library is ADAL, upgrade to "aadfeed6" for MSAL + private static final String REQUEST_ID_SUFFIX = "aadfeed6"; private final String clientId; private final String clientSecret; @@ -206,6 +209,7 @@ public IAuthenticationResult acquireTokenForGraphApi(String idToken, String tena final ConfidentialClientApplication application = ConfidentialClientApplication .builder(clientId, clientCredential) .authority(serviceEndpoints.getAadSigninUri() + tenantId + "/") + .correlationId(getCorrelationId()) .build(); final Set scopes = new HashSet<>(); @@ -238,4 +242,9 @@ public IAuthenticationResult acquireTokenForGraphApi(String idToken, String tena } return result; } + + private static String getCorrelationId() { + final String uuid = UUID.randomUUID().toString(); + return uuid.substring(0, uuid.length() - REQUEST_ID_SUFFIX.length()) + REQUEST_ID_SUFFIX; + } } diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAuthorizationRequestResolver.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAuthorizationRequestResolver.java similarity index 98% rename from sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAuthorizationRequestResolver.java rename to sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAuthorizationRequestResolver.java index c7e10953e45d..9ab1f38de882 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAuthorizationRequestResolver.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAuthorizationRequestResolver.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.springframework.lang.NonNull; import org.springframework.lang.Nullable; diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAutoConfiguration.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAutoConfiguration.java similarity index 96% rename from sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAutoConfiguration.java rename to sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAutoConfiguration.java index 37ad3ec63e4b..abd155695108 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAutoConfiguration.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAutoConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import com.microsoft.azure.telemetry.TelemetrySender; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -27,8 +27,8 @@ import java.util.List; import java.util.Map; -import static com.microsoft.azure.spring.autoconfigure.btoc.AADB2CProperties.PREFIX; -import static com.microsoft.azure.spring.autoconfigure.btoc.AADB2CProperties.USER_FLOW_SIGN_UP_OR_SIGN_IN; +import static com.microsoft.azure.spring.autoconfigure.b2c.AADB2CProperties.PREFIX; +import static com.microsoft.azure.spring.autoconfigure.b2c.AADB2CProperties.USER_FLOW_SIGN_UP_OR_SIGN_IN; import static com.microsoft.azure.telemetry.TelemetryData.SERVICE_NAME; import static com.microsoft.azure.telemetry.TelemetryData.TENANT_NAME; import static com.microsoft.azure.telemetry.TelemetryData.getClassPackageSimpleName; diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CConfigurationException.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CConfigurationException.java similarity index 88% rename from sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CConfigurationException.java rename to sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CConfigurationException.java index 274d83843b25..df2e2f035fbd 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CConfigurationException.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CConfigurationException.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; /** * Throw runtime exception for configuration. diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CLogoutSuccessHandler.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CLogoutSuccessHandler.java similarity index 96% rename from sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CLogoutSuccessHandler.java rename to sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CLogoutSuccessHandler.java index c2ded434692a..4b5a811b5b70 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CLogoutSuccessHandler.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CLogoutSuccessHandler.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.springframework.lang.NonNull; import org.springframework.security.core.Authentication; diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2COidcLoginConfigurer.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2COidcLoginConfigurer.java similarity index 95% rename from sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2COidcLoginConfigurer.java rename to sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2COidcLoginConfigurer.java index d07bebfba0a6..3053474c8f57 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2COidcLoginConfigurer.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2COidcLoginConfigurer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CProperties.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CProperties.java similarity index 99% rename from sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CProperties.java rename to sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CProperties.java index ba51aa078570..730ecbf71dd2 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CProperties.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.hibernate.validator.constraints.URL; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CURL.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CURL.java similarity index 97% rename from sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CURL.java rename to sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CURL.java index 84b075de97d8..f98c8fc375af 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CURL.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CURL.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.springframework.util.Assert; diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/gremlin/GremlinAutoConfiguration.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/gremlin/GremlinAutoConfiguration.java index a872ec1a738a..1c0b5b920e4f 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/gremlin/GremlinAutoConfiguration.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/gremlin/GremlinAutoConfiguration.java @@ -28,6 +28,7 @@ import static com.microsoft.azure.telemetry.TelemetryData.SERVICE_NAME; import static com.microsoft.azure.telemetry.TelemetryData.getClassPackageSimpleName; + /** * To create Gremlin factory and template for auto-configure Gremlin properties. */ @@ -62,7 +63,8 @@ private void sendTelemetry() { @Bean @ConditionalOnMissingBean public GremlinConfig getGremlinConfig() { - return GremlinConfig.builder(properties.getEndpoint(), properties.getUsername(), properties.getPassword()) + return GremlinConfig.builder(properties.getEndpoint(), properties.getUsername(), + properties.getPassword()) .port(properties.getPort()) .sslEnabled(properties.isSslEnabled()) .telemetryAllowed(properties.isTelemetryAllowed()) diff --git a/sdk/spring/azure-spring-boot/src/main/resources/META-INF/spring.factories b/sdk/spring/azure-spring-boot/src/main/resources/META-INF/spring.factories index 77ad8951f70a..5f88a537624a 100644 --- a/sdk/spring/azure-spring-boot/src/main/resources/META-INF/spring.factories +++ b/sdk/spring/azure-spring-boot/src/main/resources/META-INF/spring.factories @@ -7,6 +7,6 @@ com.microsoft.azure.spring.autoconfigure.gremlin.GremlinAutoConfiguration,\ com.microsoft.azure.spring.autoconfigure.gremlin.GremlinRepositoriesAutoConfiguration,\ com.microsoft.azure.spring.autoconfigure.aad.AADAuthenticationFilterAutoConfiguration,\ com.microsoft.azure.spring.autoconfigure.aad.AADOAuth2AutoConfiguration,\ -com.microsoft.azure.spring.autoconfigure.btoc.AADB2CAutoConfiguration,\ +com.microsoft.azure.spring.autoconfigure.b2c.AADB2CAutoConfiguration,\ com.microsoft.azure.spring.autoconfigure.metrics.AzureMonitorMetricsExportAutoConfiguration,\ com.microsoft.azure.spring.autoconfigure.jms.ServiceBusJMSAutoConfiguration diff --git a/sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/btoc/AADB2COidcLoginConfigSample.java b/sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/b2c/AADB2COidcLoginConfigSample.java similarity index 91% rename from sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/btoc/AADB2COidcLoginConfigSample.java rename to sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/b2c/AADB2COidcLoginConfigSample.java index 23ed8f070cfb..115830b10809 100644 --- a/sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/btoc/AADB2COidcLoginConfigSample.java +++ b/sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/b2c/AADB2COidcLoginConfigSample.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.spring.btoc; +package com.azure.spring.b2c; -import com.microsoft.azure.spring.autoconfigure.btoc.AADB2COidcLoginConfigurer; +import com.microsoft.azure.spring.autoconfigure.b2c.AADB2COidcLoginConfigurer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; diff --git a/sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/btoc/AADB2CWebController.java b/sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/b2c/AADB2CWebController.java similarity index 98% rename from sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/btoc/AADB2CWebController.java rename to sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/b2c/AADB2CWebController.java index c06ee37b0da8..b3864861c0d7 100644 --- a/sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/btoc/AADB2CWebController.java +++ b/sdk/spring/azure-spring-boot/src/samples/java/com/azure/spring/b2c/AADB2CWebController.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.spring.btoc; +package com.azure.spring.b2c; import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken; import org.springframework.security.oauth2.core.user.OAuth2User; diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAuthorizationRequestResolverTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAuthorizationRequestResolverTest.java similarity index 95% rename from sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAuthorizationRequestResolverTest.java rename to sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAuthorizationRequestResolverTest.java index 367c69e719ca..3a11618adc9d 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAuthorizationRequestResolverTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAuthorizationRequestResolverTest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.junit.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; @@ -12,7 +12,7 @@ import javax.servlet.http.HttpServletRequest; -import static com.microsoft.azure.spring.autoconfigure.btoc.AADB2CConstants.*; +import static com.microsoft.azure.spring.autoconfigure.b2c.AADB2CConstants.*; import static org.assertj.core.api.Java6Assertions.assertThat; public class AADB2CAuthorizationRequestResolverTest { diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAutoConfigurationTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAutoConfigurationTest.java similarity index 95% rename from sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAutoConfigurationTest.java rename to sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAutoConfigurationTest.java index 60114aad61bf..386cf665c56e 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CAutoConfigurationTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CAutoConfigurationTest.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.junit.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; -import static com.microsoft.azure.spring.autoconfigure.btoc.AADB2CConstants.*; +import static com.microsoft.azure.spring.autoconfigure.b2c.AADB2CConstants.*; import static org.assertj.core.api.Java6Assertions.assertThat; public class AADB2CAutoConfigurationTest { diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CConstants.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CConstants.java similarity index 82% rename from sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CConstants.java rename to sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CConstants.java index c68f2449aaa0..8a296c767fe0 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CConstants.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CConstants.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; -import static com.microsoft.azure.spring.autoconfigure.btoc.AADB2CProperties.PREFIX; -import static com.microsoft.azure.spring.autoconfigure.btoc.AADB2CProperties.USER_FLOW_SIGN_UP_OR_SIGN_IN; +import static com.microsoft.azure.spring.autoconfigure.b2c.AADB2CProperties.PREFIX; +import static com.microsoft.azure.spring.autoconfigure.b2c.AADB2CProperties.USER_FLOW_SIGN_UP_OR_SIGN_IN; public class AADB2CConstants { diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CLogoutSuccessHandlerTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CLogoutSuccessHandlerTest.java similarity index 96% rename from sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CLogoutSuccessHandlerTest.java rename to sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CLogoutSuccessHandlerTest.java index 0262f0ced51e..3901d098cf3c 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CLogoutSuccessHandlerTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CLogoutSuccessHandlerTest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.junit.Before; import org.junit.Test; diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CURLTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CURLTest.java similarity index 97% rename from sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CURLTest.java rename to sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CURLTest.java index 7d55ffa859c3..17180eb7e7a6 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/btoc/AADB2CURLTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/b2c/AADB2CURLTest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.microsoft.azure.spring.autoconfigure.btoc; +package com.microsoft.azure.spring.autoconfigure.b2c; import org.junit.Test; diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/gremlin/GremlinAutoConfigurationUnitTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/gremlin/GremlinAutoConfigurationUnitTest.java index 8a94a8d10e33..c5b13e9d373a 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/gremlin/GremlinAutoConfigurationUnitTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/gremlin/GremlinAutoConfigurationUnitTest.java @@ -11,7 +11,11 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; -import static com.microsoft.azure.spring.autoconfigure.gremlin.PropertiesUtil.*; +import static com.microsoft.azure.spring.autoconfigure.gremlin.PropertiesUtil.GREMLIN_ENDPOINT_CONFIG; +import static com.microsoft.azure.spring.autoconfigure.gremlin.PropertiesUtil.GREMLIN_PASSWORD_CONFIG; +import static com.microsoft.azure.spring.autoconfigure.gremlin.PropertiesUtil.GREMLIN_PORT_CONFIG; +import static com.microsoft.azure.spring.autoconfigure.gremlin.PropertiesUtil.GREMLIN_TELEMETRY_CONFIG_ALLOWED; +import static com.microsoft.azure.spring.autoconfigure.gremlin.PropertiesUtil.GREMLIN_USERNAME_CONFIG; public class GremlinAutoConfigurationUnitTest { diff --git a/sdk/spring/azure-spring-data-gremlin/CHANGELOG.md b/sdk/spring/azure-spring-data-gremlin/CHANGELOG.md new file mode 100644 index 000000000000..d98c3d0f2282 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## 2.3.1-beta.1 (Unreleased) diff --git a/sdk/spring/azure-spring-data-gremlin/DESIGN.md b/sdk/spring/azure-spring-data-gremlin/DESIGN.md new file mode 100644 index 000000000000..f06e8e581500 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/DESIGN.md @@ -0,0 +1,93 @@ +# Spring Data Gremlin Design + +### Orientation + +Gremlin is a functional, data-flow language that enables users to succinctly express complex +traversals on (or queries of) their application's property graph. It hides the details of backend +database implementation (like azure cosmosdb support Graph API). + +Apache Tinkerpop gremlin java driver allows you to launch gremlin query, but it is not easy to +get familiar with gremlin syntax. You have to generate all gremlin queries by yourself as following. + +```java + static final String[] gremlinQueries = new String[] { + "g.V().drop()", + "g.addV('person').property('id', '1').property('name', 'pli').property('age', 31)", + "g.addV('person').property('id', '4').property('name', 'incarnation').property('age', 27)", + "g.addV('software').property('id', '2').property('name', 'spring-boot-sample').property('lang', 'java')", + "g.V('1').addE('created').to(g.V('2')).property('weight', 0.8)", + "g.V('1').addE('contributed').to(g.V('2')).property('weight', 0.1)", + "g.V('4').addE('contributed').to(g.V('2')).property('weight', 0.4)" + }; +``` + +We'd like to make things easier by hiding the process of mapping Java instance to graph database +persistent entity, with the help of spring-data-commons. + +### From Users' View +How do users use graph db? They can use gremlin driver to generate the query literal in Java class instance. +It's not impossible but yet isn't easy. We want to figure out a more Spring natural way by leveraging +Spring annotations to map Java instance to database entity. + +### From Graph database View +As we know, there may be some concept like `Vertex`, `Edge` and `Graph` when we talk about +graph. Naturally the object instance needs to be mapped to one and the only one of these +element in graph. Simply we add some annotations to reach this. + +```java + @Vertex // maps an Object to a Vertex + @VertexSet // maps a set of Vertex in Graph + @Edge // maps an Object to an Edge + @EdgeSet // maps to a set of Edge in Graph + @EdgeFrom // maps to the head Vertex of an Edge + @EdgeTo // maps to the tail Vertex of an Edge + @Graph // maps to an Object to a Graph +``` + +### CRUD based query +The `@GremlinRepository` extends `@CrudReposiotry` is providing basic queries, like insert, +save, find, delete and count. Let's take insert as example to the details of implementation. + +##### Some Constrictions +* Gremlin describes the `Vertex` and `Edge` in a flat layout, with fixed property `id`, `label`, +and any other properties organized as key-value pair. +* Gremlin properties name must be `String`, and values can be `Number`, `Boolean` and `String`. +* No nested structure in `Vertex` and `Edge`. +* `Edge` is directed. + +##### GremlinSource +Before we start to insert a `Vertex` instance to database, we need one abstract layer into +isolate the dependency between instance and entity in database. We define one class to +represent all instance stored in database. This class not only needs to hold all information from +instance object, but also has the flat structure like entity in database. It is the bridge between +instance in java and persistent entity in database. Here we call it `GremlinSource`. + +With the above constriction of gremlin, `GremlinSource` has field `id` and `label` for mapping, +and keep all other fields into one `Map`. When we try to insert a instance from +java to `GremlinSource`, we perform a **WRITE** operation and convert the instance to a `GremlinSource`. +Operation **WRITE** will convert all the data of one instance to `GremlinSource`, and take care of +`id` or `@Id` field. + +The `GremlinSourceWriter` converts Java instance to `GremlinSource`. + +##### GremlinResult +There must be one **READ** operation for retrieving instance from database entity. For example, +the `find` query will return the persistent data from database with the type `Result`, provided +by apache SDK. For insulating the dependency between instance and `Result`, just like what we do +in **WRITE**. We also use `GremlinSource` as the bridge from `Result` to instance. Simply there +are two steps after query from database. First the `Result` from database will be converted to +`GremlinSource`. And then the `GremlinSource` will be converted to Java instance, just like what +we do in **WRITE** operation. + +The `GremlinResultReader` converts `Result` to `GremlinSource`. +The `GremlinSourceReader` converts `GremlinSource` to Java instance. + +##### GremlinScript +GremlinScript will generate the query based on `GremlinSource`. It converts the data like +`id`, `label` and `properites` into gremlin query literal Strings. For type `String`, `Number` +and `Boolean`, the query will store them as primitive types (supported by gremlin). And any +other type of instance field will be converted to Json-like `String` except type `Date`, it will +be converted to milliSeconds and stored as `Number`. Then the gremlin client will execute the query +to access database. + +The `GremlinScriptLiteral` generates literal query based on `GremlinSource`. diff --git a/sdk/spring/azure-spring-data-gremlin/README.md b/sdk/spring/azure-spring-data-gremlin/README.md new file mode 100644 index 000000000000..537933410868 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/README.md @@ -0,0 +1,193 @@ +# Azure Spring Data Gremlin client library for Java + +## Key concepts + +**Spring Data Gremlin** provides initial Spring Data support for those databases using Gremlin query language. With annotation oriented programming model, it simplified the mapping to the database entity. It also provides supports for basic and custom query. + +This project works with *any Gremlin-compatible* data store, and also with [Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/introduction). Cosmos is a globally-distributed database service that allows developers to work with data using a variety of standard APIs, such as Graph, MongoDB, and SQL. Spring Data Gremlin provides a delightful experience to interact with Azure Cosmos DB Graph API. + +### Feature List +- Spring Data CRUDRepository basic CRUD functionality + - save + - findAll + - findById + - deleteAll + - deleteById +- Spring Data [@Id](https://github.com/spring-projects/spring-data-commons/blob/master/src/main/java/org/springframework/data/annotation/Id.java) annotation. + There're 2 ways to map a field in domain class to `id` field of a database entity. + - annotate a field in domain class with `@Id` + - set name of this field to `id` +- Default annotation + - `@Vertex` maps an `Object` to a `Vertex` + - `@VertexSet` maps a set of `Vertex` + - `@Edge` maps an `Object` to an `Edge` + - `@EdgeSet` maps to a set of `Edge` + - `@EdgeFrom` maps to the head `Vertex` of an `Edge` + - `@EdgeTo` maps to the tail `Vertex` of an `Edge` + - `@Graph` maps to an `Object` to a `Graph` +- Supports advanced operations + - ` T findVertexById(Object id, Class domainClass);` + - ` T findEdgeById(Object id, Class domainClass);` + - ` boolean isEmptyGraph(T object)` + - `long vertexCount()` + - `long edgeCount()` +- Supports [Spring Data custom query](https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.query-methods.details) find operation, e.g., `findByAFieldAndBField` +- Supports any class type in domain class including collection and nested type. + + +### Spring Data Version Support +This repository only supports Spring Data 2.x. Version mapping between spring boot and spring-data-gremlin: + +| Spring boot version | spring-data-gremlin version | +|:-----------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| ![version](https://img.shields.io/badge/version-2.3.x-blue) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.spring.data.gremlin/spring-data-gremlin/2.3.svg)](https://search.maven.org/search?q=g:com.microsoft.spring.data.gremlin%20AND%20a:spring-data-gremlin%20AND%20v:2.3.*) | +| ![version](https://img.shields.io/badge/version-2.2.x-blue) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.spring.data.gremlin/spring-data-gremlin/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.spring.data.gremlin%20AND%20a:spring-data-gremlin%20AND%20v:2.2.*) | +| ![version](https://img.shields.io/badge/version-2.1.x-blue) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.spring.data.gremlin/spring-data-gremlin/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.spring.data.gremlin%20AND%20a:spring-data-gremlin%20AND%20v:2.1.*) | +| ![version](https://img.shields.io/badge/version-2.0.x-blue) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.spring.data.gremlin/spring-data-gremlin/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.spring.data.gremlin%20AND%20a:spring-data-gremlin%20AND%20v:2.0.*) | + +## Getting started + +### Add the dependency +`spring-data-gremlin` is published on Maven Central Repository. +If you are using Maven, add the following dependency. + +[//]: # ({x-version-update-start;com.azure:azure-spring-data-gremlin;current}) +```xml + + com.azure + azure-spring-data-gremlin + 2.3.1-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Setup Configuration +Setup `application.yml` file.(Use Azure Cosmos DB Graph as an example.) + +```yml +gremlin: + endpoint: url-of-endpoint + port: 443 + username: /dbs/your-db-name/colls/your-collection-name + password: your-password + telemetryAllowed: true # set false to disable telemetry + +``` + +### Define an entity +Define a simple Vertex entity with `@Vertex`. + + +```java +@Vertex +public class Person { + + @Id + private String id; + + private String name; + + private String age; + + public Person() { + + } + + public Person(String id, String name, String age) { + this.id = id; + this.name = name; + this.age = age; + } +} +``` + +Define a simple Edge entity with `@Edge`. + +```java +@Edge +public class Relation { + + @Id + private String id; + + private String name; + + @EdgeFrom + private Person personFrom; + + @EdgeTo + private Person personTo; + +} +``` +Define a simple Graph entity with `@Graph`. + +```java +@Graph +public class Network { + + @Id + private String id; + + public Network() { + this.edges = new ArrayList<>(); + this.vertexes = new ArrayList<>(); + } + + @EdgeSet + private List edges; + + @VertexSet + private List vertexes; + +} +``` + +### Create repositories +Extends GremlinRepository interface, which provides Spring Data repository support. + +```java +@Repository +public interface PersonRepository extends GremlinRepository { + + List findByName(String name); + +} +``` +`findByName` method is custom query method, it will find the person with the `name` property. + +### Create an application +Here create an application class with all the components + +```java +@SpringBootApplication +public class SampleApplication implements CommandLineRunner { + + @Autowired + private PersonRepository repository; + + public static void main(String[] args) { + SpringApplication.run(SampleApplication.class, args); + } + + public void run(String... var1) { + + final Person testUser = new Person("PERSON_ID", "PERSON_NAME", "PERSON_AGE"); + repository.deleteAll(); + repository.save(testUser); + } + +} +``` +Autowired UserRepository interface, then can do save, delete and find operations. + +## Examples +Please refer to [sample project](./azure-spring-boot-samples/azure-spring-data-sample-gremlin/) and [web sample project]((./azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service)). + +## Data / Telemetry + +This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy](https://privacy.microsoft.com/privacystatement) statement to learn more. + +## Contributing +## Troubleshooting +## Next steps diff --git a/sdk/spring/azure-spring-data-gremlin/config/gremlin-server-ci.properties b/sdk/spring/azure-spring-data-gremlin/config/gremlin-server-ci.properties new file mode 100644 index 000000000000..65cd869df34e --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/config/gremlin-server-ci.properties @@ -0,0 +1,2 @@ +gremlin.graph=org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph +gremlin.tinkergraph.vertexIdManager=ANY diff --git a/sdk/spring/azure-spring-data-gremlin/config/gremlin-server-ci.yaml b/sdk/spring/azure-spring-data-gremlin/config/gremlin-server-ci.yaml new file mode 100644 index 000000000000..d7947fba31b0 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/config/gremlin-server-ci.yaml @@ -0,0 +1,19 @@ +host: localhost +port: 8889 +gremlinPool: 8 +threadPoolWorker: 8 +scriptEvaluationTimeout: 30000 +channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer +graphs: { graph: conf/gremlin-server-ci.properties } + +scriptEngines: { + gremlin-groovy: { + plugins: { org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {}, + org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {}, + org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]}, + org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}} + +serializers: + - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { serializeResultToString: true }} +ssl: { enabled: false } + diff --git a/sdk/spring/azure-spring-data-gremlin/package/apache-tinkerpop-gremlin-server-minimal-3.3.4.tar.gz b/sdk/spring/azure-spring-data-gremlin/package/apache-tinkerpop-gremlin-server-minimal-3.3.4.tar.gz new file mode 100644 index 000000000000..e2b7f019f4b5 Binary files /dev/null and b/sdk/spring/azure-spring-data-gremlin/package/apache-tinkerpop-gremlin-server-minimal-3.3.4.tar.gz differ diff --git a/sdk/spring/azure-spring-data-gremlin/pom.xml b/sdk/spring/azure-spring-data-gremlin/pom.xml new file mode 100644 index 000000000000..9cb45194fefd --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/pom.xml @@ -0,0 +1,163 @@ + + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-spring-data-gremlin + 2.3.1-beta.1 + + Spring Data Gremlin + Gremlin support for Spring Data + https://github.com/Azure/azure-sdk-for-java + + + + + org.springframework + spring-core + 5.2.6.RELEASE + + + commons-logging + commons-logging + + + + + + + org.springframework + spring-context + 5.2.6.RELEASE + + + + + org.springframework + spring-tx + 5.2.6.RELEASE + + + + + org.springframework + spring-web + 5.2.6.RELEASE + + + + + org.springframework.data + spring-data-commons + 2.3.0.RELEASE + + + + + org.springframework.boot + spring-boot-starter-test + 2.3.0.RELEASE + test + + + + javax.annotation + javax.annotation-api + 1.3.2 + + + + + org.apache.tinkerpop + gremlin-driver + 3.2.4 + + + + + org.apache.commons + commons-lang3 + 3.8.1 + + + + + org.mockito + mockito-core + 3.0.0 + test + + + + + com.fasterxml.jackson.core + jackson-databind + 2.10.1 + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + provided + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + + + com.fasterxml.jackson.core:jackson-databind:[2.10.1] + org.apache.commons:commons-lang3:[3.8.1] + org.apache.tinkerpop:gremlin-driver:[3.2.4] + javax.annotation:javax.annotation-api:[1.3.2] + org.springframework:spring-context:[5.2.6.RELEASE] + org.springframework:spring-core:[5.2.6.RELEASE] + org.springframework:spring-tx:[5.2.6.RELEASE] + org.springframework:spring-web:[5.2.6.RELEASE] + org.springframework.data:spring-data-commons:[2.3.0.RELEASE] + org.springframework.boot:spring-boot-starter-test:[2.3.0.RELEASE] + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + + com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentProperty.java + + + + org.projectlombok + lombok + 1.18.12 + + + + + + + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Edge.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Edge.java new file mode 100644 index 000000000000..914d5c6852c3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Edge.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import com.microsoft.spring.data.gremlin.common.Constants; +import org.springframework.data.annotation.Persistent; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Specifies the class as edge in graph, with one optional label(String). + */ +@Persistent +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface Edge { + /** + * The label(gremlin reserved) of given Edge, can add Edge by label. + * + * @return class name if not specify. + */ + String label() default Constants.DEFAULT_EDGE_LABEL; +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeFrom.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeFrom.java new file mode 100644 index 000000000000..6792d1dd8941 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeFrom.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import org.springframework.data.annotation.Persistent; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Specifies the field as source of one edge. + */ +@Persistent +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface EdgeFrom { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeSet.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeSet.java new file mode 100644 index 000000000000..c6cdece82683 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeSet.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import org.springframework.data.annotation.Persistent; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Specifies the field as EdgeSet of graph. + */ +@Persistent +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface EdgeSet { +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeTo.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeTo.java new file mode 100644 index 000000000000..7d54df8071cf --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/EdgeTo.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import org.springframework.data.annotation.Persistent; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Specifies the field as target of one edge. + */ +@Persistent +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface EdgeTo { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/GeneratedValue.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/GeneratedValue.java new file mode 100644 index 000000000000..9deb31eead21 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/GeneratedValue.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Specifies that a field's value is to be generated (and not explicitly specified in the domain object). + * This annotation should only be used on an id field. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface GeneratedValue { + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Graph.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Graph.java new file mode 100644 index 000000000000..1d0a56f0e303 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Graph.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import com.microsoft.spring.data.gremlin.common.Constants; +import org.springframework.data.annotation.Persistent; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Specifies the domain class as graph, with one optional collection(String). + */ +@Persistent +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface Graph { + /** + * The collection of given Graph. + * + * @return class name if not specify. + */ + String collection() default Constants.DEFAULT_COLLECTION_NAME; +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Vertex.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Vertex.java new file mode 100644 index 000000000000..53a5919df7e3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/Vertex.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import com.microsoft.spring.data.gremlin.common.Constants; +import org.springframework.data.annotation.Persistent; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Specifies the class as vertex in graph, with one optional label(String). + */ +@Persistent +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface Vertex { + /** + * The label(gremlin reserved) of given Vertex, can add Vertex by label. + * + * @return class name if not specify. + */ + String label() default Constants.DEFAULT_VERTEX_LABEL; +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/VertexSet.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/VertexSet.java new file mode 100644 index 000000000000..ce48a8303310 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/annotation/VertexSet.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import org.springframework.data.annotation.Persistent; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Specifies the field as VertexSet of graph. + */ +@Persistent +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface VertexSet { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/Constants.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/Constants.java new file mode 100644 index 000000000000..bb3afdf56520 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/Constants.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +public final class Constants { + + public static final String PROPERTY_ID = "id"; + public static final String PROPERTY_LABEL = "label"; + public static final String PROPERTY_TYPE = "type"; + public static final String PROPERTY_VALUE = "value"; + public static final String PROPERTY_PROPERTIES = "properties"; + public static final String PROPERTY_INV = "inV"; + public static final String PROPERTY_OUTV = "outV"; + + public static final String RESULT_TYPE_VERTEX = "vertex"; + public static final String RESULT_TYPE_EDGE = "edge"; + + public static final String DEFAULT_VERTEX_LABEL = ""; + public static final String DEFAULT_EDGE_LABEL = ""; + public static final String DEFAULT_COLLECTION_NAME = ""; + public static final int DEFAULT_ENDPOINT_PORT = 443; + public static final String DEFAULT_REPOSITORY_IMPLEMENT_POSTFIX = "Impl"; + + public static final String GREMLIN_MODULE_NAME = "Gremlin"; + public static final String GREMLIN_MODULE_PREFIX = "gremlin"; + public static final String GREMLIN_MAPPING_CONTEXT = "gremlinMappingContext"; + + public static final String GREMLIN_PRIMITIVE_GRAPH = "g"; + public static final String GREMLIN_PRIMITIVE_INVOKE = "."; + public static final String GREMLIN_PRIMITIVE_DROP = "drop()"; + + public static final String GREMLIN_PRIMITIVE_EDGE_ALL = "E()"; + + public static final String GREMLIN_PRIMITIVE_VERTEX_ALL = "V()"; + + public static final String GREMLIN_PRIMITIVE_HAS_STRING = "has('%s', '%s')"; + public static final String GREMLIN_PRIMITIVE_HAS_NUMBER = "has('%s', %d)"; + public static final String GREMLIN_PRIMITIVE_HAS_BOOLEAN = "has('%s', %b)"; + + public static final String GREMLIN_PRIMITIVE_PROPERTY_STRING = "property('%s', '%s')"; + public static final String GREMLIN_PRIMITIVE_PROPERTY_NUMBER = "property('%s', %d)"; + public static final String GREMLIN_PRIMITIVE_PROPERTY_BOOLEAN = "property('%s', %b)"; + + public static final String GREMLIN_PRIMITIVE_AND = "and()"; + public static final String GREMLIN_PRIMITIVE_OR = "or()"; + public static final String GREMLIN_PRIMITIVE_WHERE = "where(%s)"; + + public static final String GREMLIN_QUERY_BARRIER = "barrier"; + + public static final String GREMLIN_PRIMITIVE_VALUES = "values('%s')"; + public static final String GREMLIN_PRIMITIVE_IS = "is(%s)"; + public static final String GREMLIN_PRIMITIVE_GT = "gt(%d)"; + public static final String GREMLIN_PRIMITIVE_LT = "lt(%d)"; + public static final String GREMLIN_PRIMITIVE_BETWEEN = "between(%d, %d)"; + + public static final String GREMLIN_PRIMITIVE_IS_GT = String.format(GREMLIN_PRIMITIVE_IS, GREMLIN_PRIMITIVE_GT); + public static final String GREMLIN_PRIMITIVE_IS_LT = String.format(GREMLIN_PRIMITIVE_IS, GREMLIN_PRIMITIVE_LT); + public static final String GREMLIN_PRIMITIVE_IS_BETWEEN = String.format( + GREMLIN_PRIMITIVE_IS, + GREMLIN_PRIMITIVE_BETWEEN + ); + + public static final String GREMLIN_SCRIPT_EDGE_ALL = String.join(GREMLIN_PRIMITIVE_INVOKE, + GREMLIN_PRIMITIVE_GRAPH, + GREMLIN_PRIMITIVE_EDGE_ALL + ); + + public static final String GREMLIN_SCRIPT_VERTEX_ALL = String.join(GREMLIN_PRIMITIVE_INVOKE, + GREMLIN_PRIMITIVE_GRAPH, + GREMLIN_PRIMITIVE_VERTEX_ALL + ); + + public static final String GREMLIN_SCRIPT_EDGE_DROP_ALL = String.join(GREMLIN_PRIMITIVE_INVOKE, + GREMLIN_PRIMITIVE_GRAPH, + GREMLIN_PRIMITIVE_EDGE_ALL, + GREMLIN_PRIMITIVE_DROP + ); + + public static final String GREMLIN_SCRIPT_VERTEX_DROP_ALL = String.join(GREMLIN_PRIMITIVE_INVOKE, + GREMLIN_PRIMITIVE_GRAPH, + GREMLIN_PRIMITIVE_VERTEX_ALL, + GREMLIN_PRIMITIVE_DROP + ); + + public static final String GREMLIN_PROPERTY_CLASSNAME = "_classname"; + + public static final int DEFAULT_MAX_CONTENT_LENGTH = 65536; + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinConfig.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinConfig.java new file mode 100644 index 000000000000..9a08642d50bd --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinConfig.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import org.apache.tinkerpop.gremlin.driver.ser.Serializers; + +import java.beans.ConstructorProperties; + +public final class GremlinConfig { + + private String endpoint; + + private int port; + + private String username; + + private String password; + + private boolean sslEnabled; + + private boolean telemetryAllowed; + + private String serializer; + + private int maxContentLength; + + @ConstructorProperties({"endpoint", "port", "username", "password", "sslEnabled", "telemetryAllowed", "serializer", + "maxContentLength"}) + private GremlinConfig(String endpoint, int port, String username, String password, boolean sslEnabled, + boolean telemetryAllowed, String serializer, int maxContentLength) { + this.endpoint = endpoint; + this.port = port; + this.username = username; + this.password = password; + this.sslEnabled = sslEnabled; + this.telemetryAllowed = telemetryAllowed; + this.serializer = serializer; + this.maxContentLength = maxContentLength; + } + + public static GremlinConfig.GremlinConfigBuilder defaultBuilder() { + return new GremlinConfig.GremlinConfigBuilder(); + } + + public static GremlinConfigBuilder builder(String endpoint, String username, String password) { + return defaultBuilder() + .endpoint(endpoint) + .username(username) + .password(password) + .port(Constants.DEFAULT_ENDPOINT_PORT) + .sslEnabled(true) + .serializer(Serializers.GRAPHSON.toString()) + .telemetryAllowed(true); + } + + public static class GremlinConfigBuilder { + private String endpoint; + private int port; + private String username; + private String password; + private boolean sslEnabled; + private boolean telemetryAllowed; + private String serializer; + private int maxContentLength; + + public GremlinConfig.GremlinConfigBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + public GremlinConfig.GremlinConfigBuilder port(int port) { + this.port = port; + return this; + } + + public GremlinConfig.GremlinConfigBuilder username(String username) { + this.username = username; + return this; + } + + public GremlinConfig.GremlinConfigBuilder password(String password) { + this.password = password; + return this; + } + + public GremlinConfig.GremlinConfigBuilder sslEnabled(boolean sslEnabled) { + this.sslEnabled = sslEnabled; + return this; + } + + public GremlinConfig.GremlinConfigBuilder telemetryAllowed(boolean telemetryAllowed) { + this.telemetryAllowed = telemetryAllowed; + return this; + } + + public GremlinConfig.GremlinConfigBuilder serializer(String serializer) { + this.serializer = serializer; + return this; + } + + public GremlinConfig.GremlinConfigBuilder maxContentLength(int maxContentLength) { + this.maxContentLength = maxContentLength; + return this; + } + + public GremlinConfig build() { + return new GremlinConfig(this.endpoint, this.port, this.username, this.password, this.sslEnabled, this.telemetryAllowed, this.serializer, this.maxContentLength); + } + + public String toString() { + return "GremlinConfig.GremlinConfigBuilder(endpoint=" + this.endpoint + ", port=" + this.port + ", username=" + this.username + ", password=" + this.password + ", sslEnabled=" + this.sslEnabled + ", telemetryAllowed=" + this.telemetryAllowed + ", serializer=" + this.serializer + ", maxContentLength=" + this.maxContentLength + ")"; + } + } + + public String getEndpoint() { + return endpoint; + } + + public int getPort() { + return port; + } + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } + + public boolean isSslEnabled() { + return sslEnabled; + } + + public boolean isTelemetryAllowed() { + return telemetryAllowed; + } + + public String getSerializer() { + return serializer; + } + + public int getMaxContentLength() { + return maxContentLength; + } + + public void setPort(int port) { + this.port = port; + } + + public void setMaxContentLength(int maxContentLength) { + this.maxContentLength = maxContentLength; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinEntityType.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinEntityType.java new file mode 100644 index 000000000000..744826a6ddec --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinEntityType.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import org.springframework.lang.NonNull; + +import java.util.function.Supplier; + +public enum GremlinEntityType { + + VERTEX(GremlinSourceVertex::new), + EDGE(GremlinSourceEdge::new), + GRAPH(GremlinSourceGraph::new); + + private Supplier> creator; + + GremlinEntityType(@NonNull Supplier> creator) { + this.creator = creator; + } + + public GremlinSource createGremlinSource() { + return this.creator.get(); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinFactory.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinFactory.java new file mode 100644 index 000000000000..a1436808c5b2 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinFactory.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import com.microsoft.spring.data.gremlin.exception.GremlinIllegalConfigurationException; +import com.microsoft.spring.data.gremlin.telemetry.TelemetrySender; +import org.apache.tinkerpop.gremlin.driver.Client; +import org.apache.tinkerpop.gremlin.driver.Cluster; +import org.apache.tinkerpop.gremlin.driver.ser.Serializers; +import org.springframework.lang.NonNull; + +import javax.annotation.PostConstruct; + + +public class GremlinFactory { + + private Cluster gremlinCluster; + + private GremlinConfig gremlinConfig; + + public GremlinFactory(@NonNull GremlinConfig gremlinConfig) { + final int port = gremlinConfig.getPort(); + if (port <= 0 || port > 65535) { + gremlinConfig.setPort(Constants.DEFAULT_ENDPOINT_PORT); + } + + final int maxContentLength = gremlinConfig.getMaxContentLength(); + if (maxContentLength <= 0) { + gremlinConfig.setMaxContentLength(Constants.DEFAULT_MAX_CONTENT_LENGTH); + } + + this.gremlinConfig = gremlinConfig; + } + + private Cluster createGremlinCluster() throws GremlinIllegalConfigurationException { + final Cluster cluster; + + try { + cluster = Cluster.build(this.gremlinConfig.getEndpoint()) + .serializer(Serializers.valueOf(this.gremlinConfig.getSerializer()).simpleInstance()) + .credentials(this.gremlinConfig.getUsername(), this.gremlinConfig.getPassword()) + .enableSsl(this.gremlinConfig.isSslEnabled()) + .maxContentLength(this.gremlinConfig.getMaxContentLength()) + .port(this.gremlinConfig.getPort()) + .create(); + } catch (IllegalArgumentException e) { + throw new GremlinIllegalConfigurationException("Invalid configuration of Gremlin", e); + } + + return cluster; + } + + public Client getGremlinClient() { + + if (this.gremlinCluster == null) { + this.gremlinCluster = this.createGremlinCluster(); + } + + return this.gremlinCluster.connect(); + } + + @PostConstruct + private void sendTelemetry() { + + if (gremlinConfig.isTelemetryAllowed()) { + final TelemetrySender sender = new TelemetrySender(); + + sender.send(this.getClass().getSimpleName()); + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinUtils.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinUtils.java new file mode 100644 index 000000000000..efbbc066b73a --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/common/GremlinUtils.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import com.microsoft.spring.data.gremlin.annotation.GeneratedValue; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.exception.GremlinIllegalConfigurationException; +import com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.repository.support.GremlinEntityInformation; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.apache.tinkerpop.shaded.jackson.databind.MapperFeature; +import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper; +import org.springframework.data.annotation.Id; +import org.springframework.lang.NonNull; +import org.springframework.util.ReflectionUtils; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GremlinUtils { + + private static final ObjectMapper MAPPER = new ObjectMapper(); + + static { + MAPPER.configure(MapperFeature.AUTO_DETECT_FIELDS, false); + } + + public static ObjectMapper getObjectMapper() { + return MAPPER; + } + + public static T createInstance(@NonNull Class type) { + final T instance; + + try { + instance = type.newInstance(); + } catch (IllegalAccessException e) { + throw new IllegalArgumentException("can not access type constructor", e); + } catch (InstantiationException e) { + throw new IllegalArgumentException("failed to create instance of given type", e); + } + + return instance; + } + + public static Field getIdField(@NonNull Class domainClass) { + final Field idField; + final List idFields = FieldUtils.getFieldsListWithAnnotation(domainClass, Id.class); + final List generatedValueFields = + FieldUtils.getFieldsListWithAnnotation(domainClass, GeneratedValue.class); + + if (generatedValueFields.size() > 1) { + throw new GremlinIllegalConfigurationException("Only one field, the id field, can have the optional " + + "@GeneratedValue annotation!"); + } + + if (idFields.isEmpty()) { + idField = ReflectionUtils.findField(domainClass, Constants.PROPERTY_ID); + } else if (idFields.size() == 1) { + idField = idFields.get(0); + } else { + throw new GremlinInvalidEntityIdFieldException("only one @Id field is allowed"); + } + + if (idField == null) { + throw new GremlinInvalidEntityIdFieldException("no field named id in class"); + } else if (idField.getType() != String.class + && idField.getType() != Long.class && idField.getType() != Integer.class) { + throw new GremlinInvalidEntityIdFieldException("the type of @Id/id field should be String/Integer/Long"); + } + + if (generatedValueFields.size() == 1 && !generatedValueFields.get(0).equals(idField)) { + throw new GremlinIllegalConfigurationException("Only the id field can have the optional " + + "@GeneratedValue annotation!"); + } + + return idField; + } + + public static long timeToMilliSeconds(@NonNull Object time) { + if (time instanceof Date) { + return ((Date) time).getTime(); + } else { + throw new UnsupportedOperationException("Unsupported time type"); + } + } + + public static long toPrimitiveLong(@NonNull Object object) { + if (object instanceof Date) { + return timeToMilliSeconds(object); + } else if (object instanceof Integer) { + return (long) (int) object; + } else if (object instanceof Long) { + return (long) object; + } else { + throw new UnsupportedOperationException("Unsupported object type to long"); + } + } + + public static GremlinSource toGremlinSource(@NonNull Class domainClass) { + return new GremlinEntityInformation<>(domainClass).createGremlinSource(); + } + + public static List> toParallelQueryList(@NonNull List queries) { + final List> parallelQueries = new ArrayList<>(); + List parallelQuery = new ArrayList<>(); + + for (final String query : queries) { + if (query.equals(Constants.GREMLIN_QUERY_BARRIER)) { + parallelQueries.add(parallelQuery); + parallelQuery = new ArrayList<>(); + } else { + parallelQuery.add(query); + } + } + + parallelQueries.add(parallelQuery); + + return parallelQueries; + } + + public static Class toEntityClass(@NonNull String className) { + try { + return Class.forName(className); + } catch (ClassNotFoundException e) { + throw new GremlinUnexpectedSourceTypeException("failed to retrieve class: " + className, e); + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/AbstractGremlinConfiguration.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/AbstractGremlinConfiguration.java new file mode 100644 index 000000000000..04090613bfcd --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/AbstractGremlinConfiguration.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.config; + +import com.microsoft.spring.data.gremlin.common.GremlinConfig; +import com.microsoft.spring.data.gremlin.common.GremlinFactory; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.query.GremlinTemplate; +import org.springframework.context.annotation.Bean; + +public abstract class AbstractGremlinConfiguration extends GremlinConfigurationSupport { + + public abstract GremlinConfig getGremlinConfig(); + + @Bean + public GremlinFactory gremlinFactory() { + return new GremlinFactory(getGremlinConfig()); + } + + @Bean + public MappingGremlinConverter mappingGremlinConverter() throws ClassNotFoundException { + return new MappingGremlinConverter(gremlinMappingContext()); + } + + @Bean + public GremlinTemplate gremlinTemplate(GremlinFactory factory) throws ClassNotFoundException { + return new GremlinTemplate(factory, mappingGremlinConverter()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/GremlinConfigurationSupport.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/GremlinConfigurationSupport.java new file mode 100644 index 000000000000..cf52ba657cba --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/config/GremlinConfigurationSupport.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.config; + +import com.microsoft.spring.data.gremlin.mapping.GremlinMappingContext; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; +import org.springframework.core.type.filter.AnnotationTypeFilter; +import org.springframework.data.annotation.Persistent; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; +import org.springframework.util.ClassUtils; +import org.springframework.util.StringUtils; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +public abstract class GremlinConfigurationSupport { + + protected Collection getMappingBasePackages() { + final Package basePackage = this.getClass().getPackage(); + + return Collections.singleton(basePackage == null ? null : basePackage.getName()); + } + + protected Set> scanEntities(@NonNull String basePackage) throws ClassNotFoundException { + if (!StringUtils.hasText(basePackage)) { + return Collections.emptySet(); + } + + final Set> entitySet = new HashSet<>(); + final ClassPathScanningCandidateComponentProvider provider = + new ClassPathScanningCandidateComponentProvider(false); + + provider.addIncludeFilter(new AnnotationTypeFilter(Persistent.class)); + + for (final BeanDefinition candidate : provider.findCandidateComponents(basePackage)) { + final String className = candidate.getBeanClassName(); + Assert.notNull(GremlinConfigurationSupport.class.getClassLoader(), "Class loader cannot be null"); + + entitySet.add(ClassUtils.forName(className, GremlinConfigurationSupport.class.getClassLoader())); + } + + return entitySet; + } + + protected Set> getInitialEntitySet() throws ClassNotFoundException { + final Set> entitySet = new HashSet<>(); + + for (final String basePackage : this.getMappingBasePackages()) { + entitySet.addAll(this.scanEntities(basePackage)); + } + + return entitySet; + } + + @Bean + public GremlinMappingContext gremlinMappingContext() throws ClassNotFoundException { + final GremlinMappingContext context = new GremlinMappingContext(); + + context.setInitialEntitySet(this.getInitialEntitySet()); + + return context; + } + +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/MappingGremlinConverter.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/MappingGremlinConverter.java new file mode 100644 index 000000000000..8ccfb53e6397 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/MappingGremlinConverter.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion; + +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentEntity; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.core.convert.ConversionService; +import org.springframework.core.convert.support.GenericConversionService; +import org.springframework.data.convert.EntityConverter; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.data.mapping.PersistentPropertyAccessor; +import org.springframework.data.mapping.context.MappingContext; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +public class MappingGremlinConverter + implements EntityConverter, GremlinPersistentProperty, Object, GremlinSource>, + ApplicationContextAware { + + protected final MappingContext, GremlinPersistentProperty> mappingContext; + protected GenericConversionService conversionService; + private ApplicationContext applicationContext; + + public MappingGremlinConverter(MappingContext, GremlinPersistentProperty> + context) { + this.mappingContext = context; + this.conversionService = new GenericConversionService(); + } + + public ApplicationContext getApplicationContext() { + return this.applicationContext; + } + + @Override + public MappingContext, GremlinPersistentProperty> getMappingContext() { + return this.mappingContext; + } + + @Override + public void setApplicationContext(ApplicationContext context) { + this.applicationContext = context; + } + + @Override + public ConversionService getConversionService() { + return this.conversionService; + } + + @Override + public T read(Class domainClass, @NonNull GremlinSource source) { + @SuppressWarnings("unchecked") final GremlinSource gremlinSource = (GremlinSource) source; + + return gremlinSource.doGremlinSourceRead(domainClass, this); + } + + @Override + public void write(@NonNull Object domain, @NonNull GremlinSource source) { + source.doGremlinSourceWrite(domain, this); + } + + public ConvertingPropertyAccessor getPropertyAccessor(@NonNull T domain) { + final GremlinPersistentEntity persistentEntity = this.getPersistentEntity(domain.getClass()); + Assert.notNull(persistentEntity, "persistentEntity should not be null"); + + final PersistentPropertyAccessor accessor = persistentEntity.getPropertyAccessor(domain); + + return new ConvertingPropertyAccessor<>(accessor, this.conversionService); + } + + public GremlinPersistentEntity getPersistentEntity(@NonNull Class domainClass) { + return mappingContext.getPersistentEntity(domainClass); + } + + private String getIdFieldName(@NonNull Object domain) { + return GremlinUtils.getIdField(domain.getClass()).getName(); + } + + private Object getFieldValue(@NonNull T domain, @NonNull String fieldName) { + final ConvertingPropertyAccessor accessor = this.getPropertyAccessor(domain); + final GremlinPersistentEntity persistentEntity = this.getPersistentEntity(domain.getClass()); + final PersistentProperty property = persistentEntity.getPersistentProperty(fieldName); + + return property != null ? accessor.getProperty(property) : null; + } + + public Object getIdFieldValue(@NonNull Object domain) { + return this.getFieldValue(domain, this.getIdFieldName(domain)); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/AbstractGremlinResultReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/AbstractGremlinResultReader.java new file mode 100644 index 000000000000..9b57d88161f7 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/AbstractGremlinResultReader.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.result; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.Map; + +// TODO: seems only for Vertex. +public abstract class AbstractGremlinResultReader implements GremlinResultsReader { + + /** + * properties's organization is a little complicated. + *

    + * properties is {@link LinkedHashMap}<K, V>
    + * K is {@link String}
    + * V is {@link ArrayList}<T>
    + * T is {@link LinkedHashMap}<{@link String}, {@link String}> + */ + private Object readProperty(@NonNull Object value) { + Assert.isInstanceOf(ArrayList.class, value, "should be instance of ArrayList"); + + @SuppressWarnings("unchecked") final ArrayList> mapList + = (ArrayList>) value; + + Assert.isTrue(mapList.size() == 1, "should be only 1 element in ArrayList"); + + return mapList.get(0).get(Constants.PROPERTY_VALUE); + } + + protected void readResultProperties(@NonNull Map properties, @NonNull GremlinSource source) { + source.getProperties().clear(); + properties.forEach((key, value) -> source.setProperty(key, this.readProperty(value))); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultEdgeReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultEdgeReader.java new file mode 100644 index 000000000000..be85f5d503ac --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultEdgeReader.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.result; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import org.apache.tinkerpop.gremlin.driver.Result; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; +import org.springframework.util.Assert; + +import java.util.List; +import java.util.Map; + +public class GremlinResultEdgeReader extends AbstractGremlinResultReader { + + private void readProperties(@NonNull GremlinSource source, @Nullable Map properties) { + Assert.notNull(source, "source should not be null"); + if (properties != null) { + properties.forEach(source::setProperty); + } + } + + private void validate(List results, GremlinSource source) { + Assert.notNull(results, "Results should not be null."); + Assert.notNull(source, "GremlinSource should not be null."); + Assert.isTrue(results.size() == 1, "Edge should contain only one result."); + + final Result result = results.get(0); + + Assert.isInstanceOf(Map.class, result.getObject(), "should be one instance of Map"); + + @SuppressWarnings("unchecked") final Map map = (Map) result.getObject(); + + Assert.isTrue(map.containsKey(Constants.PROPERTY_ID), "should contain id property"); + Assert.isTrue(map.containsKey(Constants.PROPERTY_LABEL), "should contain label property"); + Assert.isTrue(map.containsKey(Constants.PROPERTY_TYPE), "should contain type property"); + Assert.isTrue(map.containsKey(Constants.PROPERTY_INV), "should contain inV property"); + Assert.isTrue(map.containsKey(Constants.PROPERTY_OUTV), "should contain outV property"); + Assert.isTrue(map.get(Constants.PROPERTY_TYPE).equals(Constants.RESULT_TYPE_EDGE), "must be vertex type"); + } + + @Override + @SuppressWarnings("unchecked") + public void read(@NonNull List results, @NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("Should be instance of GremlinSourceEdge"); + } + + validate(results, source); + + final GremlinSourceEdge sourceEdge = (GremlinSourceEdge) source; + final Map map = (Map) results.get(0).getObject(); + + this.readProperties(source, (Map) map.get(Constants.PROPERTY_PROPERTIES)); + + final String className = source.getProperties().get(Constants.GREMLIN_PROPERTY_CLASSNAME).toString(); + + sourceEdge.setIdField(GremlinUtils.getIdField(GremlinUtils.toEntityClass(className))); + sourceEdge.setId(map.get(Constants.PROPERTY_ID)); + sourceEdge.setLabel(map.get(Constants.PROPERTY_LABEL).toString()); + sourceEdge.setVertexIdFrom(map.get(Constants.PROPERTY_OUTV)); + sourceEdge.setVertexIdTo(map.get(Constants.PROPERTY_INV)); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultVertexReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultVertexReader.java new file mode 100644 index 000000000000..60d047041462 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultVertexReader.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.result; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import org.apache.tinkerpop.gremlin.driver.Result; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.util.List; +import java.util.Map; + +public class GremlinResultVertexReader extends AbstractGremlinResultReader { + + private void validate(List results, GremlinSource source) { + Assert.notNull(results, "Results should not be null."); + Assert.notNull(source, "GremlinSource should not be null."); + Assert.isTrue(results.size() == 1, "Vertex should contain only one result."); + + final Result result = results.get(0); + + Assert.isInstanceOf(Map.class, result.getObject(), "should be one instance of Map"); + + @SuppressWarnings("unchecked") final Map map = (Map) result.getObject(); + + Assert.isTrue(map.containsKey(Constants.PROPERTY_ID), "should contain id property"); + Assert.isTrue(map.containsKey(Constants.PROPERTY_LABEL), "should contain label property"); + Assert.isTrue(map.containsKey(Constants.PROPERTY_TYPE), "should contain type property"); + Assert.isTrue(map.containsKey(Constants.PROPERTY_PROPERTIES), "should contain properties property"); + Assert.isTrue(map.get(Constants.PROPERTY_TYPE).equals(Constants.RESULT_TYPE_VERTEX), "must be vertex type"); + + Assert.isInstanceOf(Map.class, map.get(Constants.PROPERTY_PROPERTIES), "should be one instance of Map"); + } + + @Override + @SuppressWarnings("unchecked") + public void read(@NonNull List results, @NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("Should be instance of GremlinSourceVertex"); + } + + validate(results, source); + + final Map map = (Map) results.get(0).getObject(); + final Map properties = (Map) map.get(Constants.PROPERTY_PROPERTIES); + + super.readResultProperties(properties, source); + + final String className = source.getProperties().get(Constants.GREMLIN_PROPERTY_CLASSNAME).toString(); + + source.setIdField(GremlinUtils.getIdField(GremlinUtils.toEntityClass(className))); + source.setId(map.get(Constants.PROPERTY_ID)); + source.setLabel(map.get(Constants.PROPERTY_LABEL).toString()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultsGraphReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultsGraphReader.java new file mode 100644 index 000000000000..93ec56f8c92c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultsGraphReader.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.result; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import org.apache.tinkerpop.gremlin.driver.Result; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.util.List; +import java.util.Map; + +import static java.util.Collections.singletonList; + +public class GremlinResultsGraphReader extends AbstractGremlinResultReader { + + private final GremlinResultVertexReader vertexResultReader; + private final GremlinResultEdgeReader edgeResultReader; + + public GremlinResultsGraphReader() { + vertexResultReader = new GremlinResultVertexReader(); + edgeResultReader = new GremlinResultEdgeReader(); + } + + @Override + public void read(@NonNull List results, @NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceGraph)) { + throw new GremlinUnexpectedSourceTypeException("Should be instance of GremlinSourceGraph"); + } + + final GremlinSourceGraph graphSource = (GremlinSourceGraph) source; + + graphSource.getVertexSet().clear(); + graphSource.getEdgeSet().clear(); + + results.stream().map(this::processResult).forEach(graphSource::addGremlinSource); + } + + private GremlinSource processResult(Result result) { + final GremlinSource source; + final Object obj = result.getObject(); + + Assert.isInstanceOf(Map.class, obj, "should be an instance of Map"); + @SuppressWarnings("unchecked") final Map map = (Map) result.getObject(); + + Assert.isTrue(map.containsKey(Constants.PROPERTY_TYPE), "should contain a type property"); + final String type = (String) map.get(Constants.PROPERTY_TYPE); + + switch (type) { + case Constants.RESULT_TYPE_VERTEX: + source = new GremlinSourceVertex<>(); + vertexResultReader.read(singletonList(result), source); + break; + case Constants.RESULT_TYPE_EDGE: + source = new GremlinSourceEdge<>(); + edgeResultReader.read(singletonList(result), source); + break; + default: + throw new GremlinUnexpectedEntityTypeException("Unexpected result type: " + type); + } + + return source; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultsReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultsReader.java new file mode 100644 index 000000000000..c6def579ccaf --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultsReader.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.result; + +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import org.apache.tinkerpop.gremlin.driver.Result; + +import java.util.List; + +public interface GremlinResultsReader { + /** + * Read the Gremlin returned Results to GremlinSource. + * + * @param The type of the source domain. + * @param results Results retrieved from the Gremlin server. + * @param source The GremlinSource of the results. + */ + void read(List results, GremlinSource source); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteral.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteral.java new file mode 100644 index 000000000000..1a54eb107eb3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteral.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; + +import java.util.List; + +/** + * Provider interface to generate different query to gremlin server. + * The scripts return queries in steps, organized by List. + */ +public interface GremlinScriptLiteral { + /** + * Generate the insert query from source (Vertex, Edge or Graph). + * @param The type of domain. + * @param source the gremlin source + * @return insert script + */ + List generateInsertScript(GremlinSource source); + + /** + * Generate the deleteAll query from source (Vertex, Edge or Graph). + * + * @return deleteAll script + */ + List generateDeleteAllScript(); + + /** + * Generate the deleteAll By Domain Class query from source (Vertex, Edge or Graph). + * @param The type of domain. + * @param source the gremlin source + * @return deleteAllByClass script + */ + List generateDeleteAllByClassScript(GremlinSource source); + + /** + * Generate the findById query from source (Vertex, Edge). + * + * @param The type of domain. + * @param source the gremlin source + * @return findById script script + */ + List generateFindByIdScript(GremlinSource source); + + /** + * Generate the update query from source (Vertex, Edge or Graph). + * + * @param The type of domain. + * @param source the gremlin source + * @return update script + */ + List generateUpdateScript(GremlinSource source); + + /** + * Generate the findAll query from source (Vertex, Edge or Graph). + * + * @param The type of domain. + * @param source the gremlin source + * @return findAll script + */ + List generateFindAllScript(GremlinSource source); + + /** + * Generate the DeleteById query from source (Vertex, Edge or Graph). + * + * @param The type of domain. + * @param source the gremlin source + * @return deleteById script + */ + List generateDeleteByIdScript(GremlinSource source); + + /** + * Generate the Count query from Source (Vertex, Edge) + * + * @param The type of domain. + * @param source the gremlin source + * @return count query + */ + List generateCountScript(GremlinSource source); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralEdge.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralEdge.java new file mode 100644 index 000000000000..29d76ec72f45 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralEdge.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class GremlinScriptLiteralEdge implements GremlinScriptLiteral { + + private static final String FROM_ALIAS = "from"; + private static final String TO_ALIAS = "to"; + + private String generateEdgeDirection(@NonNull String from, @NonNull String to) { + Assert.notNull(from, "from should not be null"); + Assert.notNull(to, "to should not be null"); + return String.format("from('%s').to('%s')", from, to); + } + + @Override + public List generateInsertScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + final GremlinSourceEdge sourceEdge = (GremlinSourceEdge) source; + final List scriptList = new ArrayList<>(); + + scriptList.add(Constants.GREMLIN_PRIMITIVE_GRAPH); // g + scriptList.add(GremlinScriptLiteralHelper.generateEntityWithRequiredId(sourceEdge.getVertexIdFrom(), GremlinEntityType.VERTEX)); // V(id) + scriptList.add(GremlinScriptLiteralHelper.generateAsWithAlias(FROM_ALIAS)); // from('from') + scriptList.add(GremlinScriptLiteralHelper.generateEntityWithRequiredId(sourceEdge.getVertexIdTo(), GremlinEntityType.VERTEX)); // V(id) + scriptList.add(GremlinScriptLiteralHelper.generateAsWithAlias(TO_ALIAS)); // to('to') + scriptList.add(GremlinScriptLiteralHelper.generateAddEntityWithLabel(sourceEdge.getLabel(), GremlinEntityType.EDGE)); // addE(label) + scriptList.add(generateEdgeDirection(FROM_ALIAS, TO_ALIAS)); // from('from').to('to') + + source.getId().ifPresent(id -> scriptList.add(GremlinScriptLiteralHelper.generatePropertyWithRequiredId(id))); // property(id, xxx) + + scriptList.addAll(GremlinScriptLiteralHelper.generateProperties(source.getProperties())); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateDeleteAllScript() { + return Collections.singletonList(Constants.GREMLIN_SCRIPT_EDGE_DROP_ALL); + } + + @Override + public List generateDeleteAllByClassScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + final List scriptList = Arrays.asList( + Constants.GREMLIN_PRIMITIVE_GRAPH, // g + Constants.GREMLIN_PRIMITIVE_EDGE_ALL, // E() + GremlinScriptLiteralHelper.generateHasLabel(source.getLabel()), // has(label, 'label') + Constants.GREMLIN_PRIMITIVE_DROP // drop() + ); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateFindByIdScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + Assert.isTrue(source.getId().isPresent(), "GremlinSource should contain id."); + + final List scriptList = Arrays.asList( + Constants.GREMLIN_PRIMITIVE_GRAPH, // g + Constants.GREMLIN_PRIMITIVE_EDGE_ALL, // E() + GremlinScriptLiteralHelper.generateHasId(source.getId().get(), source.getIdField()) // hasId(xxx) + ); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateUpdateScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + final List scriptList = new ArrayList<>(); + + Assert.isTrue(source.getId().isPresent(), "GremlinSource should contain id."); + + scriptList.add(Constants.GREMLIN_PRIMITIVE_GRAPH); // g + scriptList.add(GremlinScriptLiteralHelper.generateEntityWithRequiredId(source.getId().get(), GremlinEntityType.EDGE)); // E(id) + + scriptList.addAll(GremlinScriptLiteralHelper.generateProperties(source.getProperties())); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateFindAllScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + final String className = source.getProperties().get(Constants.GREMLIN_PROPERTY_CLASSNAME).toString(); + Assert.notNull(className, "GremlinSource should contain predefined className"); + + final List scriptList = Arrays.asList( + Constants.GREMLIN_PRIMITIVE_GRAPH, // g + Constants.GREMLIN_PRIMITIVE_EDGE_ALL, // E() + GremlinScriptLiteralHelper.generateHasLabel(source.getLabel()), // has(label, 'label') + GremlinScriptLiteralHelper.generateHas(Constants.GREMLIN_PROPERTY_CLASSNAME, className) // has(_classname, 'xxxxxx') + ); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateDeleteByIdScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + Assert.isTrue(source.getId().isPresent(), "GremlinSource should contain id."); + + final List scriptList = Arrays.asList( + Constants.GREMLIN_PRIMITIVE_GRAPH, // g + Constants.GREMLIN_PRIMITIVE_EDGE_ALL, // E() + GremlinScriptLiteralHelper.generateHasId(source.getId().get(), source.getIdField()), // hasId(xxx) + Constants.GREMLIN_PRIMITIVE_DROP // drop() + ); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateCountScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + return Collections.singletonList(Constants.GREMLIN_SCRIPT_EDGE_ALL); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralGraph.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralGraph.java new file mode 100644 index 000000000000..033cf2f0204c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralGraph.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.function.Function; + +public class GremlinScriptLiteralGraph implements GremlinScriptLiteral { + + private final GremlinScriptLiteralVertex scriptVertex = new GremlinScriptLiteralVertex(); + + private final GremlinScriptLiteralEdge scriptEdge = new GremlinScriptLiteralEdge(); + + @Override + public List generateInsertScript(@NonNull GremlinSource source) { + return generateInsertUpdateScript(source, + scriptVertex::generateInsertScript, + scriptEdge::generateInsertScript); + } + + @Override + public List generateDeleteAllScript() { + return Arrays.asList(Constants.GREMLIN_SCRIPT_EDGE_DROP_ALL, Constants.GREMLIN_QUERY_BARRIER, Constants.GREMLIN_SCRIPT_VERTEX_DROP_ALL); + } + + @Override + public List generateDeleteAllByClassScript(@NonNull GremlinSource source) { + return generateDeleteAllScript(); + } + + @Override + public List generateFindByIdScript(@Nullable GremlinSource source) { + throw new UnsupportedOperationException("Gremlin graph cannot findById by single query."); + } + + @Override + public List generateUpdateScript(@NonNull GremlinSource source) { + return generateInsertUpdateScript(source, + scriptVertex::generateUpdateScript, + scriptEdge::generateUpdateScript); + } + + private List generateInsertUpdateScript(@NonNull GremlinSource source, + @NonNull Function, List> vertexHandler, + @NonNull Function, List> edgeHandler) { + if (!(source instanceof GremlinSourceGraph)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceGraph"); + } + + final List scriptList = new ArrayList<>(); + final GremlinSourceGraph sourceGraph = (GremlinSourceGraph) source; + final List> vertexes = sourceGraph.getVertexSet(); + final List> edges = sourceGraph.getEdgeSet(); + + vertexes.forEach(vertex -> scriptList.addAll(vertexHandler.apply(vertex))); + scriptList.add(Constants.GREMLIN_QUERY_BARRIER); + edges.forEach(edge -> scriptList.addAll(edgeHandler.apply(edge))); + + return scriptList; + } + + @Override + public List generateDeleteByIdScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceGraph)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceGraph"); + } + + return this.generateDeleteAllScript(); + } + + @Override + public List generateFindAllScript(@NonNull GremlinSource source) { + throw new UnsupportedOperationException("Gremlin graph cannot be findAll."); + } + + public List generateIsEmptyScript() { + final List scriptList = Arrays.asList(Constants.GREMLIN_PRIMITIVE_GRAPH, Constants.GREMLIN_PRIMITIVE_VERTEX_ALL); + final String query = String.join(Constants.GREMLIN_PRIMITIVE_INVOKE, scriptList); + + return Collections.singletonList(query); + } + + @Override + public List generateCountScript(@NonNull GremlinSource source) { + throw new UnsupportedOperationException("Gremlin graph counting is not available."); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralHelper.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralHelper.java new file mode 100644 index 000000000000..b9f94ae98412 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralHelper.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.annotation.GeneratedValue; +import com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import org.apache.tinkerpop.shaded.jackson.core.JsonProcessingException; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Map; + +public class GremlinScriptLiteralHelper { + + static String generateEntityWithRequiredId(@NonNull Object id, GremlinEntityType type) { + Assert.notNull(id, "id should not be null"); + Assert.isTrue(type == GremlinEntityType.EDGE || type == GremlinEntityType.VERTEX, "should be edge/vertex type"); + + final String prefix = (type == GremlinEntityType.VERTEX) ? "V" : "E"; + + if (id instanceof String) { + return prefix + String.format("('%s')", id); + } else if (id instanceof Integer) { + return prefix + String.format("(%d)", id); + } else if (id instanceof Long) { + return prefix + String.format("(%d)", id); + } + + throw new GremlinInvalidEntityIdFieldException("Only String/Integer/Long of id is supported"); + } + + static String generatePropertyWithRequiredId(@NonNull Object id) { + if (id instanceof String) { + return String.format("property(id, '%s')", id); + } else if (id instanceof Integer) { + return String.format("property(id, %d)", id); + } else if (id instanceof Long) { + return String.format("property(id, %d)", id); + } + + throw new GremlinInvalidEntityIdFieldException("Only String/Integer/Long of id is supported"); + } + + static String generateAsWithAlias(@NonNull String alias) { + return String.format("as('%s')", alias); + } + + static String generateAddEntityWithLabel(@NonNull String label, GremlinEntityType type) { + Assert.isTrue(type == GremlinEntityType.EDGE || type == GremlinEntityType.VERTEX, "should be edge/vertex type"); + + final String prefix = (type == GremlinEntityType.VERTEX) ? "addV" : "addE"; + + return prefix + String.format("('%s')", label); + } + + static List completeScript(@NonNull List scriptList) { + return Collections.singletonList(String.join(Constants.GREMLIN_PRIMITIVE_INVOKE, scriptList)); + } + + public static String generateHasLabel(@NonNull String label) { + return String.format("has(label, '%s')", label); + } + + public static String generateHasId(@NonNull Object id) { + if (id instanceof String) { + return String.format("hasId('%s')", id); + } else if (id instanceof Integer) { + return String.format("hasId(%d)", id); + } else if (id instanceof Long) { + return String.format("hasId(%d)", id); + } else { + throw new GremlinInvalidEntityIdFieldException("the type of @Id/id field should be String/Integer/Long"); + } + } + + public static String generateHasId(@NonNull Object id, @NonNull Field idFiled) { + if (!idFiled.isAnnotationPresent(GeneratedValue.class)) { + return generateHasId(id); + } else if (id instanceof String) { + return String.format("hasId('%s')", id); + } else if (id instanceof Integer) { + return String.format("hasId(%dL)", id); + } else if (id instanceof Long) { + return String.format("hasId(%dL)", id); + } else { + throw new GremlinInvalidEntityIdFieldException("the type of @Id/id field should be String/Integer/Long"); + } + } + + private static String generateProperty(@NonNull String name, @NonNull String value) { + return String.format(Constants.GREMLIN_PRIMITIVE_PROPERTY_STRING, name, value); + } + + private static String generateProperty(@NonNull String name, @NonNull Integer value) { + return String.format(Constants.GREMLIN_PRIMITIVE_PROPERTY_NUMBER, name, value); + } + + private static String generateProperty(@NonNull String name, @NonNull Boolean value) { + return String.format(Constants.GREMLIN_PRIMITIVE_PROPERTY_BOOLEAN, name, value); + } + + private static String generateProperty(@NonNull String name, @NonNull Long value) { + return String.format(Constants.GREMLIN_PRIMITIVE_PROPERTY_NUMBER, name, value); + } + + private static String generateProperty(@NonNull String name, @NonNull Object value) { + if (value instanceof Integer) { + return generateProperty(name, (Integer) value); + } else if (value instanceof Boolean) { + return generateProperty(name, (Boolean) value); + } else if (value instanceof String) { + return generateProperty(name, (String) value); + } else if (value instanceof Date) { + return generateProperty(name, GremlinUtils.timeToMilliSeconds(value)); + } else { + final String propertyScript; + + try { + propertyScript = generateProperty(name, GremlinUtils.getObjectMapper().writeValueAsString(value)); + } catch (JsonProcessingException e) { + throw new GremlinUnexpectedEntityTypeException("Failed to write object to String", e); + } + + return propertyScript; + } + } + + protected static List generateProperties(@NonNull final Map properties) { + final List scripts = new ArrayList<>(); + + properties.entrySet().stream().filter(e -> e.getValue() != null) + .forEach(e -> scripts.add(generateProperty(e.getKey(), e.getValue()))); + + return scripts; + } + + private static String generateHas(@NonNull String name, @NonNull Integer value) { + return String.format(Constants.GREMLIN_PRIMITIVE_HAS_NUMBER, name, value); + } + + private static String generateHas(@NonNull String name, @NonNull Boolean value) { + return String.format(Constants.GREMLIN_PRIMITIVE_HAS_BOOLEAN, name, value); + } + + private static String generateHas(@NonNull String name, @NonNull String value) { + return String.format(Constants.GREMLIN_PRIMITIVE_HAS_STRING, name, value); + } + + private static String generateHas(@NonNull String name, @NonNull Long value) { + return String.format(Constants.GREMLIN_PRIMITIVE_HAS_NUMBER, name, value); + } + + // TODO: should move to query method part. + public static String generateHas(@NonNull String name, @NonNull Object value) { + + if (value instanceof Integer) { + return generateHas(name, (Integer) value); + } else if (value instanceof Boolean) { + return generateHas(name, (Boolean) value); + } else if (value instanceof String) { + return generateHas(name, (String) value); + } else if (value instanceof Date) { + return generateHas(name, GremlinUtils.timeToMilliSeconds(value)); + } else { + final String hasScript; + + try { + hasScript = generateHas(name, GremlinUtils.getObjectMapper().writeValueAsString(value)); + } catch (JsonProcessingException e) { + throw new GremlinUnexpectedEntityTypeException("Failed to write object to String", e); + } + + return hasScript; + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralVertex.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralVertex.java new file mode 100644 index 000000000000..44dedb456946 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralVertex.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class GremlinScriptLiteralVertex implements GremlinScriptLiteral { + + @Override + public List generateInsertScript(@NonNull GremlinSource source) { + Assert.notNull(source, "source should not be null"); + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceVertex"); + } + + final List scriptList = new ArrayList<>(); + + scriptList.add(Constants.GREMLIN_PRIMITIVE_GRAPH); // g + scriptList.add(GremlinScriptLiteralHelper.generateAddEntityWithLabel(source.getLabel(), GremlinEntityType.VERTEX)); // addV('label') + + source.getId().ifPresent(id -> scriptList.add(GremlinScriptLiteralHelper.generatePropertyWithRequiredId(id))); // property(id, xxx) + + scriptList.addAll(GremlinScriptLiteralHelper.generateProperties(source.getProperties())); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateDeleteAllScript() { + return Collections.singletonList(Constants.GREMLIN_SCRIPT_VERTEX_DROP_ALL); + } + + @Override + public List generateDeleteAllByClassScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceVertex"); + } + + final List scriptList = Arrays.asList( + Constants.GREMLIN_PRIMITIVE_GRAPH, // g + Constants.GREMLIN_PRIMITIVE_VERTEX_ALL, // V() + GremlinScriptLiteralHelper.generateHasLabel(source.getLabel()), // has(label, 'label') + Constants.GREMLIN_PRIMITIVE_DROP // drop() + ); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateFindByIdScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceVertex"); + } + + Assert.isTrue(source.getId().isPresent(), "GremlinSource should contain id."); + + final List scriptList = Arrays.asList( + Constants.GREMLIN_PRIMITIVE_GRAPH, // g + Constants.GREMLIN_PRIMITIVE_VERTEX_ALL, // V() + GremlinScriptLiteralHelper.generateHasId(source.getId().get(), source.getIdField()) // hasId(xxx) + ); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateUpdateScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceVertex"); + } + + final List scriptList = new ArrayList<>(); + + Assert.isTrue(source.getId().isPresent(), "GremlinSource should contain id."); + + scriptList.add(Constants.GREMLIN_PRIMITIVE_GRAPH); // g + scriptList.add(GremlinScriptLiteralHelper.generateEntityWithRequiredId(source.getId().get(), GremlinEntityType.VERTEX)); // V(id) + scriptList.addAll(GremlinScriptLiteralHelper.generateProperties(source.getProperties())); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateFindAllScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceVertex"); + } + + final String classname = source.getProperties().get(Constants.GREMLIN_PROPERTY_CLASSNAME).toString(); + Assert.notNull(classname, "GremlinSource should contain predefined classname"); + + final List scriptList = Arrays.asList( + Constants.GREMLIN_PRIMITIVE_GRAPH, // g + Constants.GREMLIN_PRIMITIVE_VERTEX_ALL, // V() + GremlinScriptLiteralHelper.generateHasLabel(source.getLabel()), // has(label, 'label') + GremlinScriptLiteralHelper.generateHas(Constants.GREMLIN_PROPERTY_CLASSNAME, classname) // has(_classname, 'xxxxxx') + ); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateDeleteByIdScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceVertex"); + } + + Assert.isTrue(source.getId().isPresent(), "GremlinSource should contain id."); + + final List scriptList = Arrays.asList( + Constants.GREMLIN_PRIMITIVE_GRAPH, // g + Constants.GREMLIN_PRIMITIVE_VERTEX_ALL, // E() + GremlinScriptLiteralHelper.generateHasId(source.getId().get(), source.getIdField()), // hasId(xxx) + Constants.GREMLIN_PRIMITIVE_DROP // drop() + ); + + return GremlinScriptLiteralHelper.completeScript(scriptList); + } + + @Override + public List generateCountScript(@NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceVertex"); + } + + return Collections.singletonList(Constants.GREMLIN_SCRIPT_VERTEX_ALL); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/AbstractGremlinSource.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/AbstractGremlinSource.java new file mode 100644 index 000000000000..602b04aa5b4b --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/AbstractGremlinSource.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.annotation.GeneratedValue; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.conversion.result.GremlinResultsReader; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteral; +import com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException; +import org.apache.tinkerpop.gremlin.driver.Result; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +public abstract class AbstractGremlinSource implements GremlinSource { + + private Object id; + + private String label; + + private Field idField; + + private Class domainClass; + + private Map properties; + + private GremlinScriptLiteral scriptLiteral; + + private GremlinSourceWriter sourceWriter; + + private GremlinSourceReader sourceReader; + + private GremlinResultsReader resultReader; + + protected AbstractGremlinSource() { + this.properties = new HashMap<>(); + } + + protected AbstractGremlinSource(Class domainClass) { + this.domainClass = domainClass; + this.properties = new HashMap<>(); + + setProperty(Constants.GREMLIN_PROPERTY_CLASSNAME, domainClass.getName()); + } + + @Override + public Optional getId() { + return Optional.ofNullable(this.id); + } + + /** + * The type of Id keep the consistency with the result from gremlin server, for generate query correctly. So if the + * id is ${@link GeneratedValue}, which may have different type against entity id field. + * + * @param id the given id from query. + */ + @Override + public void setId(Object id) { + final Field idField = getIdField(); + + if (idField == null) { + throw new GremlinInvalidEntityIdFieldException("Id Field of GremlinSource cannot be null"); + } + + if (idField.isAnnotationPresent(GeneratedValue.class) && id instanceof String) { + try { + this.id = Long.valueOf((String) id); // Gremlin server default id type is Long. + } catch (NumberFormatException ignore) { + this.id = id; + } + } else { + this.id = id; + } + } + + @Override + public void setGremlinScriptStrategy(@NonNull GremlinScriptLiteral script) { + this.scriptLiteral = script; + } + + @Override + public void setGremlinSourceWriter(@NonNull GremlinSourceWriter writer) { + this.sourceWriter = writer; + } + + @Override + public void setGremlinSourceReader(@NonNull GremlinSourceReader reader) { + this.sourceReader = reader; + } + + @Override + public void setGremlinResultReader(@NonNull GremlinResultsReader reader) { + this.resultReader = reader; + } + + @Override + public GremlinScriptLiteral getGremlinScriptLiteral() { + return this.scriptLiteral; + } + + @Override + public void doGremlinSourceWrite(@NonNull Object domain, @NonNull MappingGremlinConverter converter) { + Assert.notNull(this.sourceWriter, "the sourceWriter must be set before do writing"); + + this.sourceWriter.write(domain, converter, this); + } + + @Override + public T doGremlinSourceRead(@NonNull Class domainClass, @NonNull MappingGremlinConverter converter) { + Assert.notNull(this.sourceReader, "the sourceReader must be set before do reading"); + + return this.sourceReader.read(domainClass, converter, this); + } + + @Override + public void doGremlinResultRead(@NonNull List results) { + Assert.notNull(this.resultReader, "the resultReader must be set before do reading"); + + this.resultReader.read(results, this); + } + + private boolean hasProperty(String key) { + return this.properties.get(key) != null; + } + + @Override + public void setProperty(String key, Object value) { + if (this.hasProperty(key) && value == null) { + this.properties.remove(key); + } else { + this.properties.put(key, value); + } + } + + public void setIdField(Field idField) { + this.idField = idField; + } + + @Override + public String getLabel() { + return label; + } + + @Override + public void setLabel(String label) { + this.label = label; + } + + @Override + public Field getIdField() { + return idField; + } + + @Override + public Class getDomainClass() { + return domainClass; + } + + @Override + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/AbstractGremlinSourceReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/AbstractGremlinSourceReader.java new file mode 100644 index 000000000000..61d0c05af195 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/AbstractGremlinSourceReader.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.exception.GremlinEntityInformationException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import org.apache.tinkerpop.shaded.jackson.databind.JavaType; +import org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; +import org.springframework.util.Assert; + +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.Date; + +public abstract class AbstractGremlinSourceReader implements GremlinSourceReader { + + protected Object readProperty(@NonNull PersistentProperty property, + @Nullable Object value) { + Assert.notNull(property, "property should not be null"); + final Class type = property.getTypeInformation().getType(); + final JavaType javaType = TypeFactory.defaultInstance().constructType(property.getType()); + + if (value == null) { + return null; + } else if (type == int.class || type == Integer.class + || type == Boolean.class || type == boolean.class + || type == String.class) { + return value; + } else if (type == Date.class) { + Assert.isTrue(value instanceof Long, "Date store value must be instance of long"); + return new Date((Long) value); + } else { + final Object object; + + try { + object = GremlinUtils.getObjectMapper().readValue(value.toString(), javaType); + } catch (IOException e) { + throw new GremlinUnexpectedEntityTypeException("Failed to read String to Object", e); + } + + return object; + } + } + + protected Object getGremlinSourceId(@NonNull GremlinSource source) { + Assert.notNull(source, "source should not be null"); + if (!source.getId().isPresent()) { + return null; + } + + final Object id = source.getId().get(); + final Field idField = source.getIdField(); + + if (idField.getType() == String.class) { + return id.toString(); + } else if (idField.getType() == Integer.class) { + Assert.isTrue(id instanceof Integer, "source Id should be Integer."); + return id; + } else if (idField.getType() == Long.class && id instanceof Integer) { + return Long.valueOf((Integer) id); + } else if (idField.getType() == Long.class && id instanceof Long) { + return id; + } + + throw new GremlinEntityInformationException("unsupported id field type: " + id.getClass().getSimpleName()); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSource.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSource.java new file mode 100644 index 000000000000..57bcdcf06fbe --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSource.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.conversion.result.GremlinResultsReader; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteral; +import org.apache.tinkerpop.gremlin.driver.Result; +import org.springframework.lang.NonNull; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * Provider interface to obtain and store information from domain class. + * For Vertex and Edge, they consist of id (String, Reserved), label (String, Reserved) and + * a set of properties. + * The property key should be String, and value can be one of String, number and boolean. + * + * @param The type of domain. + */ +public interface GremlinSource { + + /** + * Set the property map of domain + * + * @param key The key of the property. + * @param value The value of the property. + */ + void setProperty(String key, Object value); + + /** + * Get the id of domain + * + * @return the Optional of id + */ + Optional getId(); + + /** + * Set the id of domain + * + * @param id The id of the domain object. + */ + void setId(Object id); + + /** + * Get the id Field of domain + * + * @return will never be null + */ + Field getIdField(); + + /** + * Set the id of domain + * + * @param id The id field. + */ + void setIdField(Field id); + + /** + * Get the label of domain + * + * @return will never be null + */ + @NonNull + String getLabel(); + + /** + * Set the label of domain + * + * @param label The label of the domain object. + */ + void setLabel(String label); + + /** + * Get the Class type of domain + * + * @return will never be null + */ + @NonNull + Class getDomainClass(); + + /** + * Get the properties of domain + * + * @return The properties map of the domain, and it will never be null. + */ + Map getProperties(); + + /** + * do the real write from domain to GremlinSource + * + * @param domain The domain object which needed to be written to GremlinSource. + * @param converter The entity converter. + */ + void doGremlinSourceWrite(Object domain, MappingGremlinConverter converter); + + /** + * do the real reading from Result to GremlinSource + * + * @param results The results retrieved from Gremlin server. + */ + void doGremlinResultRead(List results); + + /** + * do the real reading from GremlinSource to domain + * + * @param domainClass The class type of domain object. + * @param converter The entity converter. + * + * @return The domain object read from gremlin source. + */ + T doGremlinSourceRead(Class domainClass, MappingGremlinConverter converter); + + /** + * @return the GremlinScriptLiteral + */ + GremlinScriptLiteral getGremlinScriptLiteral(); + + /** + * Set the script Strategy of GremlinSource + * + * @param script The script literal. + */ + void setGremlinScriptStrategy(GremlinScriptLiteral script); + + /** + * Set the SourceWriter of GremlinSource + * + * @param writer The source writer to use. + */ + void setGremlinSourceWriter(GremlinSourceWriter writer); + + /** + * Set the ResultReader for reading data from Gremlin Result to GremlinSource + * + * @param reader The results reader to use. + */ + void setGremlinResultReader(GremlinResultsReader reader); + + /** + * Set the SourceReader for reading data from GremlinSource to domain + * + * @param reader The source reader to use. + */ + void setGremlinSourceReader(GremlinSourceReader reader); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdge.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdge.java new file mode 100644 index 000000000000..ca02337774aa --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdge.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.conversion.result.GremlinResultEdgeReader; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralEdge; + +public class GremlinSourceEdge extends AbstractGremlinSource { + + private Object vertexIdFrom; + + private Object vertexIdTo; + + public GremlinSourceEdge() { + super(); + initializeGremlinStrategy(); + } + + public GremlinSourceEdge(Class domainClass) { + super(domainClass); + initializeGremlinStrategy(); + } + + private void initializeGremlinStrategy() { + this.setGremlinScriptStrategy(new GremlinScriptLiteralEdge()); + this.setGremlinResultReader(new GremlinResultEdgeReader()); + this.setGremlinSourceReader(new GremlinSourceEdgeReader<>()); + this.setGremlinSourceWriter(new GremlinSourceEdgeWriter<>()); + } + + public Object getVertexIdFrom() { + return vertexIdFrom; + } + + public void setVertexIdFrom(Object vertexIdFrom) { + this.vertexIdFrom = vertexIdFrom; + } + + public Object getVertexIdTo() { + return vertexIdTo; + } + + public void setVertexIdTo(Object vertexIdTo) { + this.vertexIdTo = vertexIdTo; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdgeReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdgeReader.java new file mode 100644 index 000000000000..422f098c7f8b --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdgeReader.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentEntity; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.springframework.data.annotation.Id; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.lang.reflect.Field; + +public class GremlinSourceEdgeReader extends AbstractGremlinSourceReader { + + @Override + public T read(@NonNull Class domainClass, @NonNull MappingGremlinConverter converter, + @NonNull GremlinSource source) { + Assert.notNull(domainClass, "domainClass should not be null"); + Assert.notNull(converter, "converter should not be null"); + Assert.notNull(source, "source should not be null"); + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be instance of GremlinSourceEdge"); + } + + final T domain = GremlinUtils.createInstance(domainClass); + final ConvertingPropertyAccessor accessor = converter.getPropertyAccessor(domain); + final GremlinPersistentEntity persistentEntity = converter.getPersistentEntity(domainClass); + + for (final Field field : FieldUtils.getAllFields(domainClass)) { + final PersistentProperty property = persistentEntity.getPersistentProperty(field + .getName()); + if (property == null) { + continue; + } + if (field.getName().equals(Constants.PROPERTY_ID) || field.getAnnotation(Id.class) != null) { + accessor.setProperty(property, super.getGremlinSourceId(source)); + continue; + } else if (field.getAnnotation(EdgeFrom.class) != null || field.getAnnotation(EdgeTo.class) != null) { + // We cannot do that here as the gremlin will not tell more information about vertex except Id. After + // the query of Edge end, we can get the Id of vertex from/to. And then we will do extra 2 query to + // obtain the 2 vertex and complete the edge. + // + // That work will be wrapped in GremlinTemplate insert, and skip the property here. + continue; + } + + final Object value = super.readProperty(property, source.getProperties().get(field.getName())); + accessor.setProperty(property, value); + } + + return domain; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdgeWriter.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdgeWriter.java new file mode 100644 index 000000000000..960ac78cd166 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceEdgeWriter.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.exception.GremlinEntityInformationException; +import com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentEntity; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.springframework.data.annotation.Id; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.lang.NonNull; + +import java.lang.reflect.Field; + +public class GremlinSourceEdgeWriter implements GremlinSourceWriter { + + private Object getIdValue(@NonNull Object object, @NonNull MappingGremlinConverter converter) { + if (object instanceof String || object instanceof Long || object instanceof Integer) { + return object; + } else if (object.getClass().isPrimitive()) { + throw new GremlinUnexpectedEntityTypeException("only String type of primitive is allowed"); + } else { + return converter.getIdFieldValue(object); + } + } + + @Override + @SuppressWarnings("unchecked") + public void write(@NonNull Object domain, @NonNull MappingGremlinConverter converter, + @NonNull GremlinSource source) throws GremlinInvalidEntityIdFieldException { + if (!(source instanceof GremlinSourceEdge)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + source.setId(converter.getIdFieldValue(domain)); + + final GremlinSourceEdge sourceEdge = (GremlinSourceEdge) source; + final GremlinPersistentEntity persistentEntity = converter.getPersistentEntity(domain.getClass()); + final ConvertingPropertyAccessor accessor = (ConvertingPropertyAccessor) converter.getPropertyAccessor(domain); + + for (final Field field : FieldUtils.getAllFields(domain.getClass())) { + final PersistentProperty property = persistentEntity.getPersistentProperty(field + .getName()); + if (property == null) { + continue; + } + + final Object object = accessor.getProperty(property); + + if (field.getName().equals(Constants.PROPERTY_ID) || field.getAnnotation(Id.class) != null) { + continue; + } else if (field.getName().equals(Constants.GREMLIN_PROPERTY_CLASSNAME)) { + throw new GremlinEntityInformationException("Domain Cannot use pre-defined field name: " + + Constants.GREMLIN_PROPERTY_CLASSNAME); + } else if (field.getAnnotation(EdgeFrom.class) != null) { + final Object vertexId = this.getIdValue(object, converter); + if (vertexId == null) { + throw new GremlinInvalidEntityIdFieldException("The vertex id for the from vertex cannot be null!"); + } + sourceEdge.setVertexIdFrom(vertexId); + } else if (field.getAnnotation(EdgeTo.class) != null) { + final Object vertexId = this.getIdValue(object, converter); + if (vertexId == null) { + throw new GremlinInvalidEntityIdFieldException("The vertex id for the to vertex cannot be null!"); + } + sourceEdge.setVertexIdTo(vertexId); + } + source.setProperty(field.getName(), accessor.getProperty(property)); + } + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraph.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraph.java new file mode 100644 index 000000000000..005a0d3665ac --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraph.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.conversion.result.GremlinResultsGraphReader; +import com.microsoft.spring.data.gremlin.conversion.result.GremlinResultsReader; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralGraph; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; + +import java.util.ArrayList; +import java.util.List; + +public class GremlinSourceGraph extends AbstractGremlinSource { + + private List> vertexSet = new ArrayList<>(); + + private List> edgeSet = new ArrayList<>(); + + private GremlinResultsReader resultsReader; + + public GremlinSourceGraph() { + super(); + initializeGremlinStrategy(); + this.setGremlinSourceReader(new GremlinSourceGraphReader<>()); + this.resultsReader = new GremlinResultsGraphReader(); + } + + public GremlinSourceGraph(Class domainClass) { + super(domainClass); + initializeGremlinStrategy(); + this.setGremlinSourceReader(new GremlinSourceGraphReader()); + this.resultsReader = new GremlinResultsGraphReader(); + } + + public void addGremlinSource(GremlinSource source) { + if (source instanceof GremlinSourceVertex) { + this.vertexSet.add(source); + } else if (source instanceof GremlinSourceEdge) { + this.edgeSet.add(source); + } else { + throw new GremlinUnexpectedSourceTypeException("source type can only be Vertex or Edge"); + } + } + + private void initializeGremlinStrategy() { + this.setGremlinScriptStrategy(new GremlinScriptLiteralGraph()); + this.setGremlinSourceWriter(new GremlinSourceGraphWriter<>()); + } + + public List> getVertexSet() { + return vertexSet; + } + + public List> getEdgeSet() { + return edgeSet; + } + + public GremlinResultsReader getResultsReader() { + return resultsReader; + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraphReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraphReader.java new file mode 100644 index 000000000000..54a78c66c653 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraphReader.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.annotation.EdgeSet; +import com.microsoft.spring.data.gremlin.annotation.VertexSet; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentEntity; +import com.microsoft.spring.data.gremlin.repository.support.GremlinEntityInformation; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.springframework.data.annotation.Id; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.lang.NonNull; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; + +public class GremlinSourceGraphReader extends AbstractGremlinSourceReader { + + @Override + public T read(@NonNull Class type, @NonNull MappingGremlinConverter converter, + @NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceGraph)) { + throw new GremlinUnexpectedSourceTypeException("Should be instance of GremlinSourceGraph"); + } + + final GremlinSourceGraph graphSource = (GremlinSourceGraph) source; + final T entity = GremlinUtils.createInstance(type); + final ConvertingPropertyAccessor accessor = converter.getPropertyAccessor(entity); + final GremlinPersistentEntity persistentEntity = converter.getPersistentEntity(type); + + for (final Field field : FieldUtils.getAllFields(type)) { + final PersistentProperty property = persistentEntity.getPersistentProperty(field + .getName()); + if (property == null) { + continue; + } + + if ((field.getName().equals(Constants.PROPERTY_ID) || field.getAnnotation(Id.class) != null)) { + accessor.setProperty(property, super.getGremlinSourceId(graphSource)); + } else if (field.isAnnotationPresent(VertexSet.class)) { + accessor.setProperty(property, readEntitySet(graphSource.getVertexSet(), converter)); + } else if (field.isAnnotationPresent(EdgeSet.class)) { + accessor.setProperty(property, readEntitySet(graphSource.getEdgeSet(), converter)); + } + } + + return entity; + } + + private List readEntitySet(List> sources, MappingGremlinConverter converter) { + final List domainObjects = new ArrayList<>(); + + for (final GremlinSource source : sources) { + domainObjects.add(doGremlinSourceRead(source, converter)); + } + + return domainObjects; + } + + @SuppressWarnings("unchecked") + private T doGremlinSourceRead(GremlinSource source, MappingGremlinConverter converter) { + try { + Class domainClass = (Class) Class.forName((String) source.getProperties() + .get(Constants.GREMLIN_PROPERTY_CLASSNAME)); + source.setIdField(new GremlinEntityInformation<>(domainClass).getIdField()); + return source.doGremlinSourceRead(domainClass, converter); + } catch (ClassNotFoundException e) { + throw new GremlinUnexpectedSourceTypeException("No Java class found for source property " + + Constants.GREMLIN_PROPERTY_CLASSNAME, e); + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraphWriter.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraphWriter.java new file mode 100644 index 000000000000..5cd0d46be243 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraphWriter.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.annotation.EdgeSet; +import com.microsoft.spring.data.gremlin.annotation.VertexSet; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentEntity; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.springframework.data.annotation.Id; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.lang.reflect.Field; +import java.util.List; + +public class GremlinSourceGraphWriter implements GremlinSourceWriter { + + private void writeGraphSet(@NonNull List objectList, @NonNull MappingGremlinConverter mappingConverter, + @NonNull GremlinSourceGraph sourceGraph) { + Assert.notNull(objectList, "objectList should not be null"); + Assert.notNull(mappingConverter, "mappingConverter should not be null"); + Assert.notNull(sourceGraph, "sourceGraph should not be null"); + Assert.isInstanceOf(GremlinSourceGraph.class, sourceGraph, "should be instance of GremlinSourceGraph "); + + for (final Object object : objectList) { + final GremlinSource source = GremlinUtils.toGremlinSource(object.getClass()); + source.doGremlinSourceWrite(object, mappingConverter); + sourceGraph.addGremlinSource(source); + } + } + + @Override + @SuppressWarnings("unchecked") + public void write(@NonNull Object domain, @NonNull MappingGremlinConverter converter, + @NonNull GremlinSource source) { + Assert.notNull(domain, "domain should not be null"); + Assert.notNull(converter, "converter should not be null"); + Assert.notNull(source, "source should not be null"); + if (!(source instanceof GremlinSourceGraph)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge"); + } + + final GremlinSourceGraph sourceGraph = (GremlinSourceGraph) source; + final GremlinPersistentEntity persistentEntity = converter.getPersistentEntity(domain.getClass()); + final ConvertingPropertyAccessor accessor = converter.getPropertyAccessor((T) domain); + + for (final Field field : FieldUtils.getAllFields(domain.getClass())) { + final PersistentProperty property = persistentEntity.getPersistentProperty(field + .getName()); + if (property == null) { + continue; + } + + if (field.getName().equals(Constants.PROPERTY_ID) || field.getAnnotation(Id.class) != null) { + continue; + } + + @SuppressWarnings("unchecked") final List objects = (List) accessor.getProperty(property); + + if (field.getAnnotation(VertexSet.class) != null || field.getAnnotation(EdgeSet.class) != null) { + this.writeGraphSet(objects, converter, sourceGraph); + } + } + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceReader.java new file mode 100644 index 000000000000..f8190073e36e --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceReader.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; + +/** + * Provider Entity type dependent read method. + */ +public interface GremlinSourceReader { + /** + * Read data from GremlinSource to domain + * + * @param domainClass The class type for the domain object. + * @param converter The entity converter. + * @param source The gremlin source object. + * + * @return The domain object read from gremlin source. + */ + T read(Class domainClass, MappingGremlinConverter converter, GremlinSource source); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertex.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertex.java new file mode 100644 index 000000000000..22cb310027d9 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertex.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.conversion.result.GremlinResultVertexReader; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralVertex; + +public class GremlinSourceVertex extends AbstractGremlinSource { + + public GremlinSourceVertex() { + super(); + initializeGremlinStrategy(); + } + + public GremlinSourceVertex(Class domainClass) { + super(domainClass); + initializeGremlinStrategy(); + } + + private void initializeGremlinStrategy() { + this.setGremlinScriptStrategy(new GremlinScriptLiteralVertex()); + this.setGremlinResultReader(new GremlinResultVertexReader()); + this.setGremlinSourceReader(new GremlinSourceVertexReader<>()); + this.setGremlinSourceWriter(new GremlinSourceVertexWriter<>()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertexReader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertexReader.java new file mode 100644 index 000000000000..ad735025dfce --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertexReader.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentEntity; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.springframework.data.annotation.Id; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.lang.NonNull; + +import java.lang.reflect.Field; + +public class GremlinSourceVertexReader extends AbstractGremlinSourceReader { + + @Override + public T read(@NonNull Class domainClass, @NonNull MappingGremlinConverter converter, + @NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be instance of GremlinSourceVertex"); + } + + final T domain = GremlinUtils.createInstance(domainClass); + final ConvertingPropertyAccessor accessor = converter.getPropertyAccessor(domain); + final GremlinPersistentEntity persistentEntity = converter.getPersistentEntity(domainClass); + + for (final Field field : FieldUtils.getAllFields(domainClass)) { + final PersistentProperty property = persistentEntity.getPersistentProperty(field + .getName()); + if (property == null) { + continue; + } + + if (field.getName().equals(Constants.PROPERTY_ID) || field.getAnnotation(Id.class) != null) { + accessor.setProperty(property, super.getGremlinSourceId(source)); + } else { + final Object value = super.readProperty(property, source.getProperties().get(field.getName())); + accessor.setProperty(property, value); + } + } + + return domain; + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertexWriter.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertexWriter.java new file mode 100644 index 000000000000..70009ce48e52 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceVertexWriter.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.exception.GremlinEntityInformationException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentEntity; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.springframework.data.annotation.Id; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.lang.NonNull; + +import java.lang.reflect.Field; + +public class GremlinSourceVertexWriter implements GremlinSourceWriter { + + @Override + @SuppressWarnings("unchecked") + public void write(@NonNull Object domain, @NonNull MappingGremlinConverter converter, + @NonNull GremlinSource source) { + if (!(source instanceof GremlinSourceVertex)) { + throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceVertex"); + } + + source.setId(converter.getIdFieldValue(domain)); + + final GremlinPersistentEntity persistentEntity = converter.getPersistentEntity(domain.getClass()); + final ConvertingPropertyAccessor accessor = (ConvertingPropertyAccessor) converter.getPropertyAccessor(domain); + + for (final Field field : FieldUtils.getAllFields(domain.getClass())) { + final PersistentProperty property = persistentEntity.getPersistentProperty(field.getName()); + if (property == null) { + continue; + } + + if (field.getName().equals(Constants.PROPERTY_ID) || field.getAnnotation(Id.class) != null) { + continue; + } else if (field.getName().equals(Constants.GREMLIN_PROPERTY_CLASSNAME)) { + throw new GremlinEntityInformationException("Domain Cannot use pre-defined field name: " + + Constants.GREMLIN_PROPERTY_CLASSNAME); + } + + source.setProperty(field.getName(), accessor.getProperty(property)); + } + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceWriter.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceWriter.java new file mode 100644 index 000000000000..4bdf4f0876fc --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceWriter.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; + +/** + * Provider Entity type dependent write method. + */ +public interface GremlinSourceWriter { + /** + * Write the domain class information to GremlinSource + * + * @param domain The domain object needed to be written into the gremlin source. + * @param converter The entity converter. + * @param source The gremlin source to write the information from domain object. + */ + void write(Object domain, MappingGremlinConverter converter, GremlinSource source); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinEntityInformationException.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinEntityInformationException.java new file mode 100644 index 000000000000..68b4d4eac343 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinEntityInformationException.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.exception; + +import org.springframework.dao.TypeMismatchDataAccessException; + +public class GremlinEntityInformationException extends TypeMismatchDataAccessException { + + public GremlinEntityInformationException(String msg) { + super(msg); + } + + public GremlinEntityInformationException(String msg, Throwable cause) { + super(msg, cause); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinIllegalConfigurationException.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinIllegalConfigurationException.java new file mode 100644 index 000000000000..7ca91c9db1b3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinIllegalConfigurationException.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.exception; + +import org.springframework.dao.InvalidDataAccessApiUsageException; + +public class GremlinIllegalConfigurationException extends InvalidDataAccessApiUsageException { + + public GremlinIllegalConfigurationException(String msg) { + super(msg); + } + + public GremlinIllegalConfigurationException(String msg, Throwable cause) { + super(msg, cause); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinInvalidEntityIdFieldException.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinInvalidEntityIdFieldException.java new file mode 100644 index 000000000000..09b4d2105867 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinInvalidEntityIdFieldException.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.exception; + +public class GremlinInvalidEntityIdFieldException extends GremlinEntityInformationException { + + public GremlinInvalidEntityIdFieldException(String msg) { + super(msg); + } + + public GremlinInvalidEntityIdFieldException(String msg, Throwable cause) { + super(msg, cause); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinQueryException.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinQueryException.java new file mode 100644 index 000000000000..9efc480647bc --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinQueryException.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.exception; + +import org.springframework.dao.DataAccessResourceFailureException; + +public class GremlinQueryException extends DataAccessResourceFailureException { + + public GremlinQueryException(String msg) { + super(msg); + } + + public GremlinQueryException(String msg, Throwable cause) { + super(msg, cause); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinUnexpectedEntityTypeException.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinUnexpectedEntityTypeException.java new file mode 100644 index 000000000000..f71c99c27b82 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinUnexpectedEntityTypeException.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.exception; + +public class GremlinUnexpectedEntityTypeException extends GremlinEntityInformationException { + + public GremlinUnexpectedEntityTypeException(String msg) { + super(msg); + } + + public GremlinUnexpectedEntityTypeException(String msg, Throwable cause) { + super(msg, cause); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinUnexpectedSourceTypeException.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinUnexpectedSourceTypeException.java new file mode 100644 index 000000000000..b993111c53bd --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/exception/GremlinUnexpectedSourceTypeException.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.exception; + +import org.springframework.dao.TypeMismatchDataAccessException; + +public class GremlinUnexpectedSourceTypeException extends TypeMismatchDataAccessException { + + public GremlinUnexpectedSourceTypeException(String msg) { + super(msg); + } + + public GremlinUnexpectedSourceTypeException(String msg, Throwable cause) { + super(msg, cause); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentEntity.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentEntity.java new file mode 100644 index 000000000000..24721498d33c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentEntity.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.mapping; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.expression.BeanFactoryAccessor; +import org.springframework.context.expression.BeanFactoryResolver; +import org.springframework.data.mapping.model.BasicPersistentEntity; +import org.springframework.data.util.TypeInformation; +import org.springframework.expression.spel.support.StandardEvaluationContext; + +public class BasicGremlinPersistentEntity extends BasicPersistentEntity + implements GremlinPersistentEntity, ApplicationContextAware { + + private final StandardEvaluationContext context; + + public BasicGremlinPersistentEntity(TypeInformation information) { + super(information); + + this.context = new StandardEvaluationContext(); + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.context.addPropertyAccessor(new BeanFactoryAccessor()); + this.context.setBeanResolver(new BeanFactoryResolver(applicationContext)); + this.context.setRootObject(applicationContext); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentProperty.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentProperty.java new file mode 100644 index 000000000000..2c6125f0de52 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentProperty.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.mapping; + +import com.microsoft.spring.data.gremlin.common.Constants; +import org.springframework.data.mapping.Association; +import org.springframework.data.mapping.model.AnnotationBasedPersistentProperty; +import org.springframework.data.mapping.model.Property; +import org.springframework.data.mapping.model.SimpleTypeHolder; + +public class BasicGremlinPersistentProperty extends AnnotationBasedPersistentProperty + implements GremlinPersistentProperty { + + public BasicGremlinPersistentProperty(Property property, GremlinPersistentEntity owner, + SimpleTypeHolder holder) { + super(property, owner, holder); + } + + @Override + protected Association createAssociation() { + return new Association<>(this, null); + } + + @Override + public boolean isIdProperty() { + return super.isIdProperty() || getName().equals(Constants.PROPERTY_ID); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinMappingContext.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinMappingContext.java new file mode 100644 index 000000000000..68c7b3a2249e --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinMappingContext.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.mapping; + +import org.springframework.context.ApplicationContext; +import org.springframework.data.mapping.context.AbstractMappingContext; +import org.springframework.data.mapping.model.Property; +import org.springframework.data.mapping.model.SimpleTypeHolder; +import org.springframework.data.util.TypeInformation; + +public class GremlinMappingContext + extends AbstractMappingContext, GremlinPersistentProperty> { + private ApplicationContext context; + + @Override + public void setApplicationContext(ApplicationContext context) { + this.context = context; + } + + @Override + public GremlinPersistentProperty createPersistentProperty(Property property, + BasicGremlinPersistentEntity owner, + SimpleTypeHolder holder) { + return new BasicGremlinPersistentProperty(property, owner, holder); + } + + @Override + protected BasicGremlinPersistentEntity createPersistentEntity(TypeInformation typeInformation) { + final BasicGremlinPersistentEntity entity = new BasicGremlinPersistentEntity<>(typeInformation); + + if (this.context != null) { + entity.setApplicationContext(this.context); + } + + return entity; + } + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinPersistentEntity.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinPersistentEntity.java new file mode 100644 index 000000000000..14f5fa0e062d --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinPersistentEntity.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.mapping; + +import org.springframework.data.mapping.PersistentEntity; + +public interface GremlinPersistentEntity extends PersistentEntity { + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinPersistentProperty.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinPersistentProperty.java new file mode 100644 index 000000000000..c36b586f89a2 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/mapping/GremlinPersistentProperty.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.mapping; + +import org.springframework.data.mapping.PersistentProperty; + +public interface GremlinPersistentProperty extends PersistentProperty { + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinEntityMetadata.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinEntityMetadata.java new file mode 100644 index 000000000000..28f00d0b3924 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinEntityMetadata.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query; + +import org.springframework.data.repository.core.EntityMetadata; + +public interface GremlinEntityMetadata extends EntityMetadata { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinOperations.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinOperations.java new file mode 100644 index 000000000000..78f15cb58815 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinOperations.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.query.query.GremlinQuery; + +import java.util.List; + +/** + * Provider interface for basic Operations with Gremlin + */ +public interface GremlinOperations { + + void deleteAll(); + + void deleteAll(GremlinEntityType type); + + void deleteAll(GremlinSource source); + + boolean isEmptyGraph(GremlinSource source); + + boolean existsById(Object id, GremlinSource source); + + void deleteById(Object id, GremlinSource source); + + T insert(T object, GremlinSource source); + + T findById(Object id, GremlinSource source); + + T findVertexById(Object id, GremlinSource source); + + T findEdgeById(Object id, GremlinSource source); + + T update(T object, GremlinSource source); + + T save(T object, GremlinSource source); + + List findAll(GremlinSource source); + + long vertexCount(); + + long edgeCount(); + + List find(GremlinQuery query, GremlinSource source); + + MappingGremlinConverter getMappingConverter(); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinTemplate.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinTemplate.java new file mode 100644 index 000000000000..e6d7978af4cf --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/GremlinTemplate.java @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import com.microsoft.spring.data.gremlin.annotation.GeneratedValue; +import com.microsoft.spring.data.gremlin.common.GremlinFactory; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteral; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralEdge; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralGraph; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralVertex; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinEntityInformationException; +import com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException; +import com.microsoft.spring.data.gremlin.exception.GremlinQueryException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentEntity; +import com.microsoft.spring.data.gremlin.query.query.GremlinQuery; +import com.microsoft.spring.data.gremlin.query.query.QueryFindScriptGenerator; +import com.microsoft.spring.data.gremlin.query.query.QueryScriptGenerator; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.apache.tinkerpop.gremlin.driver.Client; +import org.apache.tinkerpop.gremlin.driver.Result; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.data.mapping.PersistentProperty; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Field; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.ExecutionException; + +import static java.util.stream.Collectors.toList; + +public class GremlinTemplate implements GremlinOperations, ApplicationContextAware { + + private final GremlinFactory factory; + private final MappingGremlinConverter mappingConverter; + + private Client gremlinClient; + private ApplicationContext context; + + public GremlinTemplate(@NonNull GremlinFactory factory, @NonNull MappingGremlinConverter converter) { + this.factory = factory; + this.mappingConverter = converter; + } + + @Override + public MappingGremlinConverter getMappingConverter() { + return this.mappingConverter; + } + + public ApplicationContext getApplicationContext() { + return this.context; + } + + @Override + public void setApplicationContext(@NonNull ApplicationContext context) throws BeansException { + this.context = context; + } + + public Client getGremlinClient() { + if (this.gremlinClient == null) { + this.gremlinClient = this.factory.getGremlinClient(); + } + + return this.gremlinClient; + } + + @NonNull + private List executeQuery(@NonNull List queries) { + final List> parallelQueries = GremlinUtils.toParallelQueryList(queries); + + return parallelQueries.stream().flatMap(q -> executeQueryParallel(q).stream()).collect(toList()); + } + + @NonNull + private List executeQueryParallel(@NonNull List queries) { + return queries.parallelStream() + .map(q -> getGremlinClient().submit(q).all()) + .collect(toList()).parallelStream().flatMap(f -> { + try { + return f.get().stream(); + } catch (InterruptedException | ExecutionException e) { + throw new GremlinQueryException("unable to complete query from gremlin", e); + } + }) + .collect(toList()); + } + + @Override + public void deleteAll() { + final GremlinScriptLiteral script = new GremlinScriptLiteralGraph(); + final List queryList = script.generateDeleteAllScript(); + + executeQuery(queryList); + } + + @Override + public void deleteAll(GremlinEntityType type) { + final GremlinSource source = type.createGremlinSource(); + + executeQuery(source.getGremlinScriptLiteral().generateDeleteAllScript()); + } + + @Override + public void deleteAll(GremlinSource source) { + executeQuery(source.getGremlinScriptLiteral().generateDeleteAllByClassScript(source)); + } + + private List insertInternal(@NonNull T object, @NonNull GremlinSource source) { + this.mappingConverter.write(object, source); + + return executeQuery(source.getGremlinScriptLiteral().generateInsertScript(source)); + } + + @Override + public T insert(@NonNull T object, GremlinSource source) { + final boolean entityGraph = source instanceof GremlinSourceGraph; + + if (!entityGraph && source.getIdField().isAnnotationPresent(GeneratedValue.class) + && source.getId().isPresent()) { + throw new GremlinInvalidEntityIdFieldException("The entity meant to be created has a non-null id " + + "that is marked as @GeneratedValue"); + } + + // The current implementation doesn't support creating graphs that contain both edges + // and vertices that have null (generated) ids. In this case, vertex and edge creation + // need to be performed in two consecutive steps. + // TODO(SOON) Add this verification in the GremlinSourceGraphWriter + + final List results = insertInternal(object, source); + + if (!results.isEmpty()) { + if (entityGraph) { + return recoverGraphDomain((GremlinSourceGraph) source, results); + } else { + return recoverDomain(source, results); + } + } + + return null; + } + + @Override + public T findVertexById(@NonNull Object id, GremlinSource source) { + if (source instanceof GremlinSourceVertex) { + source.setId(id); + return this.findByIdInternal(source); + } + + throw new GremlinUnexpectedEntityTypeException("should be vertex domain for findVertexById"); + } + + private Object getEdgeAnnotatedFieldValue(@NonNull Field field, @NonNull Object vertexId) { + if (field.getType() == String.class || field.getType() == Long.class || field.getType() == Integer.class) { + return vertexId; + } else if (field.getType().isPrimitive()) { + throw new GremlinUnexpectedEntityTypeException("only String/Long/Integer type of Id Field is allowed"); + } else { + return this.findVertexById(vertexId, GremlinUtils.toGremlinSource(field.getType())); + } + } + + @NonNull + private Field getEdgeAnnotatedField(@NonNull Class domainClass, + @NonNull Class annotationClass) { + final List fields = FieldUtils.getFieldsListWithAnnotation(domainClass, annotationClass); + + if (fields.size() != 1) { + throw new GremlinEntityInformationException("should be only one Annotation"); + } + + return fields.get(0); + } + + /** + * Find Edge need another two query to obtain edgeFrom and edgeTo. + * This function will do that and make edge domain completion. + */ + @SuppressWarnings("unchecked") + private void completeEdge(@NonNull T domain, @NonNull GremlinSourceEdge source) { + final ConvertingPropertyAccessor accessor = this.mappingConverter.getPropertyAccessor(domain); + final GremlinPersistentEntity persistentEntity = (GremlinPersistentEntity) this.mappingConverter + .getPersistentEntity(domain.getClass()); + + final Field fromField = this.getEdgeAnnotatedField(domain.getClass(), EdgeFrom.class); + final Field toField = this.getEdgeAnnotatedField(domain.getClass(), EdgeTo.class); + + final PersistentProperty propertyFrom = persistentEntity + .getPersistentProperty(fromField.getName()); + final PersistentProperty propertyTo = persistentEntity + .getPersistentProperty(toField.getName()); + + Assert.notNull(propertyFrom, "persistence property should not be null"); + Assert.notNull(propertyTo, "persistence property should not be null"); + + accessor.setProperty(propertyFrom, this.getEdgeAnnotatedFieldValue(fromField, source.getVertexIdFrom())); + accessor.setProperty(propertyTo, this.getEdgeAnnotatedFieldValue(toField, source.getVertexIdTo())); + } + + @Override + public T findEdgeById(@NonNull Object id, @NonNull GremlinSource source) { + if (source instanceof GremlinSourceEdge) { + return this.findById(id, source); + } + + throw new GremlinUnexpectedEntityTypeException("should be edge domain for findEdge"); + } + + private T findByIdInternal(@NonNull GremlinSource source) { + final List queryList = source.getGremlinScriptLiteral().generateFindByIdScript(source); + final List results = this.executeQuery(queryList); + + if (results.isEmpty()) { + return null; + } + + return recoverDomain(source, results); + } + + @Override + public T findById(@NonNull Object id, @NonNull GremlinSource source) { + if (source instanceof GremlinSourceGraph) { + throw new UnsupportedOperationException("Gremlin graph cannot be findById."); + } + + source.setId(id); + + return findByIdInternal(source); + } + + private T updateInternal(@NonNull T object, @NonNull GremlinSource source) { + this.mappingConverter.write(object, source); + + final List queryList = source.getGremlinScriptLiteral().generateUpdateScript(source); + + executeQuery(queryList); + + return object; + } + + @Override + public T update(@NonNull T object, @NonNull GremlinSource source) { + final Optional optional = source.getId(); + + if (!(source instanceof GremlinSourceGraph) + && (!optional.isPresent() || notExistsById(optional.get(), source))) { + throw new GremlinQueryException("cannot update the object doesn't exist"); + } + + return this.updateInternal(object, source); + } + + @Override + public T save(@NonNull T object, @NonNull GremlinSource source) { + final Optional optional = source.getId(); + final boolean entityGraph = source instanceof GremlinSourceGraph; + + if (entityGraph && this.isEmptyGraph(source)) { + return insert(object, source); + } else if (!entityGraph && (!optional.isPresent() || notExistsById(optional.get(), source))) { + return insert(object, source); + } else { + return updateInternal(object, source); + } + } + + @Override + public List findAll(@NonNull GremlinSource source) { + if (source instanceof GremlinSourceGraph) { + throw new UnsupportedOperationException("Gremlin graph cannot be findAll."); + } + + final List queryList = source.getGremlinScriptLiteral().generateFindAllScript(source); + final List results = executeQuery(queryList); + + if (results.isEmpty()) { + return Collections.emptyList(); + } + + return recoverDomainList(source, results); + } + + @Override + public void deleteById(@NonNull Object id, @NonNull GremlinSource source) { + source.setId(id); + + final List queryList = source.getGremlinScriptLiteral().generateDeleteByIdScript(source); + + executeQuery(queryList); + } + + @Override + public boolean isEmptyGraph(@NonNull GremlinSource source) { + if (source instanceof GremlinSourceGraph) { + final GremlinScriptLiteralGraph literalGraph = (GremlinScriptLiteralGraph) source.getGremlinScriptLiteral(); + final List queryList = literalGraph.generateIsEmptyScript(); + final List results = this.executeQuery(queryList); + + return results.isEmpty(); + } + + throw new GremlinQueryException("only graph domain is allowed."); + } + + @Override + public long vertexCount() { + final GremlinScriptLiteral script = new GremlinScriptLiteralVertex(); + final List queryList = script.generateCountScript(new GremlinSourceVertex<>()); + final List results = this.executeQuery(queryList); + + return results.size(); + } + + @Override + public long edgeCount() { + final GremlinScriptLiteral script = new GremlinScriptLiteralEdge(); + final List queryList = script.generateCountScript(new GremlinSourceEdge<>()); + final List results = this.executeQuery(queryList); + + return results.size(); + } + + private T recoverDomain(@NonNull GremlinSource source, @NonNull List results) { + final T domain; + final Class domainClass = source.getDomainClass(); + + source.doGremlinResultRead(results); + domain = this.mappingConverter.read(domainClass, source); + + if (source instanceof GremlinSourceEdge) { + this.completeEdge(domain, (GremlinSourceEdge) source); + } + + return domain; + } + + private List recoverDomainList(@NonNull GremlinSource source, @NonNull List results) { + return results.stream().map(r -> recoverDomain(source, Collections.singletonList(r))).collect(toList()); + } + + private T recoverGraphDomain(@NonNull GremlinSourceGraph source, @NonNull List results) { + final T domain; + final Class domainClass = source.getDomainClass(); + + source.getResultsReader().read(results, source); + domain = source.doGremlinSourceRead(domainClass, mappingConverter); + return domain; + } + + private boolean notExistsById(@NonNull Object id, @NonNull GremlinSource source) { + return !existsById(id, source); + } + + @Override + public boolean existsById(@NonNull Object id, @NonNull GremlinSource source) { + return findById(id, source) != null; + } + + @Override + public List find(@NonNull GremlinQuery query, @NonNull GremlinSource source) { + final QueryScriptGenerator generator = new QueryFindScriptGenerator<>(source); + final List queryList = generator.generate(query); + final List results = this.executeQuery(queryList); + + if (results.isEmpty()) { + return Collections.emptyList(); + } + + return this.recoverDomainList(source, results); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/SimpleGremlinEntityMetadata.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/SimpleGremlinEntityMetadata.java new file mode 100644 index 000000000000..cfad80f8387b --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/SimpleGremlinEntityMetadata.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query; + +public class SimpleGremlinEntityMetadata implements GremlinEntityMetadata { + + private final Class type; + + public SimpleGremlinEntityMetadata(Class type) { + this.type = type; + } + + public Class getJavaType() { + return this.type; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/criteria/Criteria.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/criteria/Criteria.java new file mode 100644 index 000000000000..a41c84d215bc --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/criteria/Criteria.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.criteria; + +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.util.ArrayList; +import java.util.List; + +public final class Criteria { + + private String subject; + private List subValues; + private final CriteriaType type; + private final List subCriteria; + + private Criteria(CriteriaType type) { + this.type = type; + this.subCriteria = new ArrayList<>(); + } + + private static boolean isBinaryOperation(CriteriaType type) { + switch (type) { + case AND: + case OR: + return true; + default: + return false; + } + } + + private static boolean isUnaryOperation(CriteriaType type) { + switch (type) { + case EXISTS: + case AFTER: + case BEFORE: + case BETWEEN: + case IS_EQUAL: + return true; + default: + return false; + } + } + + public static Criteria getUnaryInstance(CriteriaType type, @NonNull String subject, @NonNull List values) { + Assert.isTrue(isUnaryOperation(type), "type should be Unary operation"); + + final Criteria criteria = new Criteria(type); + + criteria.subject = subject; + criteria.subValues = values; + + return criteria; + } + + public static Criteria getBinaryInstance(CriteriaType type, @NonNull Criteria left, @NonNull Criteria right) { + Assert.isTrue(isBinaryOperation(type), "type should be Binary operation"); + + final Criteria criteria = new Criteria(type); + + criteria.subCriteria.add(left); + criteria.subCriteria.add(right); + + Assert.isTrue(criteria.getSubCriteria().size() == 2, "Binary should contain 2 subCriteria"); + + return criteria; + } + + public String getSubject() { + return subject; + } + + public List getSubValues() { + return subValues; + } + + public CriteriaType getType() { + return type; + } + + public List getSubCriteria() { + return subCriteria; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/criteria/CriteriaType.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/criteria/CriteriaType.java new file mode 100644 index 000000000000..5c29af70194c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/criteria/CriteriaType.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.criteria; + +import com.microsoft.spring.data.gremlin.common.Constants; + +public enum CriteriaType { + IS_EQUAL, + OR, + AND, + EXISTS, + AFTER, + BEFORE, + BETWEEN; + + public static String criteriaTypeToGremlin(CriteriaType type) { + switch (type) { + case OR: + return Constants.GREMLIN_PRIMITIVE_OR; + case AND: + return Constants.GREMLIN_PRIMITIVE_AND; + case AFTER: + return Constants.GREMLIN_PRIMITIVE_IS_GT; + case BEFORE: + return Constants.GREMLIN_PRIMITIVE_IS_LT; + case BETWEEN: + return Constants.GREMLIN_PRIMITIVE_IS_BETWEEN; + default: + throw new UnsupportedOperationException("Unsupported criteria type."); + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameter.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameter.java new file mode 100644 index 000000000000..848b11048948 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameter.java @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.paramerter; + +import org.springframework.core.MethodParameter; +import org.springframework.data.repository.query.Parameter; + +public class GremlinParameter extends Parameter { + + public GremlinParameter(MethodParameter parameter) { + super(parameter); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameterAccessor.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameterAccessor.java new file mode 100644 index 000000000000..dfe4490ecd9f --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameterAccessor.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.paramerter; + +import org.springframework.data.repository.query.ParameterAccessor; + +public interface GremlinParameterAccessor extends ParameterAccessor { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameters.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameters.java new file mode 100644 index 000000000000..f52a3573e594 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParameters.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.paramerter; + +import org.springframework.core.MethodParameter; +import org.springframework.data.repository.query.Parameters; + +import java.lang.reflect.Method; +import java.util.List; + +public class GremlinParameters extends Parameters { + + public GremlinParameters(Method method) { + super(method); + } + + private GremlinParameters(List parameters) { + super(parameters); + } + + @Override + protected GremlinParameters createFrom(List parameters) { + return new GremlinParameters(parameters); + } + + @Override + protected GremlinParameter createParameter(MethodParameter parameter) { + return new GremlinParameter(parameter); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParametersParameterAccessor.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParametersParameterAccessor.java new file mode 100644 index 000000000000..99406a011362 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/paramerter/GremlinParametersParameterAccessor.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.paramerter; + +import com.microsoft.spring.data.gremlin.query.query.GremlinQueryMethod; +import org.springframework.data.repository.query.ParametersParameterAccessor; + +public class GremlinParametersParameterAccessor extends ParametersParameterAccessor + implements GremlinParameterAccessor { + + public GremlinParametersParameterAccessor(GremlinQueryMethod method, Object[] values) { + super(method.getParameters(), values); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/AbstractGremlinQuery.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/AbstractGremlinQuery.java new file mode 100644 index 000000000000..d152e9264406 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/AbstractGremlinQuery.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.query; + +import com.microsoft.spring.data.gremlin.query.GremlinOperations; +import com.microsoft.spring.data.gremlin.query.paramerter.GremlinParameterAccessor; +import com.microsoft.spring.data.gremlin.query.paramerter.GremlinParametersParameterAccessor; +import org.springframework.data.repository.query.RepositoryQuery; +import org.springframework.data.repository.query.ResultProcessor; +import org.springframework.lang.NonNull; + +public abstract class AbstractGremlinQuery implements RepositoryQuery { + + private final GremlinQueryMethod method; + private final GremlinOperations operations; + + public AbstractGremlinQuery(@NonNull GremlinQueryMethod method, @NonNull GremlinOperations operations) { + this.method = method; + this.operations = operations; + } + + protected abstract GremlinQuery createQuery(GremlinParameterAccessor accessor); + + protected boolean isDeleteQuery() { + // panli: always return false as only take care find in one PR. + return false; + } + + @Override + public Object execute(@NonNull Object[] parameters) { + final GremlinParameterAccessor accessor = new GremlinParametersParameterAccessor(this.method, parameters); + + final GremlinQuery query = this.createQuery(accessor); + final ResultProcessor processor = method.getResultProcessor().withDynamicProjection(accessor); + final GremlinQueryExecution execution = this.getExecution(); + + return execution.execute(query, processor.getReturnedType().getDomainType()); + } + + @Override + @NonNull + public GremlinQueryMethod getQueryMethod() { + return this.method; + } + + @NonNull + private GremlinQueryExecution getExecution() { + if (this.isDeleteQuery()) { + throw new UnsupportedOperationException("Not implemented yet"); + } else { + return new GremlinQueryExecution.FindExecution(this.operations); + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQuery.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQuery.java new file mode 100644 index 000000000000..bd6875312186 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQuery.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.query; + +import com.microsoft.spring.data.gremlin.query.criteria.Criteria; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +public class GremlinQuery { + + private final Criteria criteria; + + public GremlinQuery(@NonNull Criteria criteria) { + Assert.notNull(criteria, "criteria should not be null"); + this.criteria = criteria; + } + + public Criteria getCriteria() { + return criteria; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryCreator.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryCreator.java new file mode 100644 index 000000000000..ebae283ae145 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryCreator.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.query; + +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.query.criteria.Criteria; +import com.microsoft.spring.data.gremlin.query.criteria.CriteriaType; +import com.microsoft.spring.data.gremlin.query.paramerter.GremlinParameterAccessor; +import org.springframework.data.domain.Sort; +import org.springframework.data.mapping.context.MappingContext; +import org.springframework.data.repository.query.parser.AbstractQueryCreator; +import org.springframework.data.repository.query.parser.Part; +import org.springframework.data.repository.query.parser.PartTree; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +public class GremlinQueryCreator extends AbstractQueryCreator { + + private final MappingContext mappingContext; + private static final Map CRITERIA_MAP; + + static { + final Map map = new HashMap<>(); + + map.put(Part.Type.AFTER, CriteriaType.AFTER); + map.put(Part.Type.BEFORE, CriteriaType.BEFORE); + map.put(Part.Type.BETWEEN, CriteriaType.BETWEEN); + map.put(Part.Type.SIMPLE_PROPERTY, CriteriaType.IS_EQUAL); + map.put(Part.Type.EXISTS, CriteriaType.EXISTS); + + CRITERIA_MAP = Collections.unmodifiableMap(map); + } + + public GremlinQueryCreator(@NonNull PartTree partTree, @NonNull GremlinParameterAccessor accessor, + @NonNull MappingContext mappingContext) { + super(partTree, accessor); + + this.mappingContext = mappingContext; + } + + @Override // Note (panli): side effect here, this method will change the iterator status of parameters. + protected Criteria create(@NonNull Part part, @NonNull Iterator parameters) { + final Part.Type type = part.getType(); + final String subject = this.mappingContext.getPersistentPropertyPath(part.getProperty()).toDotPath(); + final List values = new ArrayList<>(); + + if (!CRITERIA_MAP.containsKey(type)) { + throw new UnsupportedOperationException("Unsupported keyword: " + type.toString()); + } + + for (int i = 0; i < part.getNumberOfArguments(); i++) { + Assert.isTrue(parameters.hasNext(), "should not reach the end of iterator"); + values.add(parameters.next()); + } + + return Criteria.getUnaryInstance(CRITERIA_MAP.get(type), subject, values); + } + + @Override + protected Criteria and(@NonNull Part part, @NonNull Criteria base, @NonNull Iterator parameters) { + final Criteria right = this.create(part, parameters); + + return Criteria.getBinaryInstance(CriteriaType.AND, base, right); + } + + @Override + protected Criteria or(@NonNull Criteria base, @NonNull Criteria criteria) { + return Criteria.getBinaryInstance(CriteriaType.OR, base, criteria); + } + + @Override + protected GremlinQuery complete(@NonNull Criteria criteria, @NonNull Sort sort) { + return new GremlinQuery(criteria); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryExecution.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryExecution.java new file mode 100644 index 000000000000..8d417ccd7032 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryExecution.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.query; + +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.query.GremlinOperations; +import org.springframework.lang.NonNull; + +public interface GremlinQueryExecution { + Object execute(GremlinQuery query, Class type); + + final class FindExecution implements GremlinQueryExecution { + + private final GremlinOperations operations; + + public FindExecution(@NonNull GremlinOperations operations) { + this.operations = operations; + } + + @Override + public Object execute(@NonNull GremlinQuery query, @NonNull Class domainClass) { + final GremlinSource source = GremlinUtils.toGremlinSource(domainClass); + + return this.operations.find(query, source); + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryMethod.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryMethod.java new file mode 100644 index 000000000000..0fafe5a93616 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/GremlinQueryMethod.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.query; + +import com.microsoft.spring.data.gremlin.query.GremlinEntityMetadata; +import com.microsoft.spring.data.gremlin.query.SimpleGremlinEntityMetadata; +import org.springframework.data.projection.ProjectionFactory; +import org.springframework.data.repository.core.EntityMetadata; +import org.springframework.data.repository.core.RepositoryMetadata; +import org.springframework.data.repository.query.QueryMethod; + +import java.lang.reflect.Method; + +public class GremlinQueryMethod extends QueryMethod { + + private GremlinEntityMetadata metadata; + + public GremlinQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory) { + super(method, metadata, factory); + } + + @Override + public EntityMetadata getEntityInformation() { + @SuppressWarnings("unchecked") final Class domainClass = (Class) super.getDomainClass(); + + this.metadata = new SimpleGremlinEntityMetadata<>(domainClass); + + return this.metadata; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/PartTreeGremlinQuery.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/PartTreeGremlinQuery.java new file mode 100644 index 000000000000..368babbd6520 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/PartTreeGremlinQuery.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.query; + +import com.microsoft.spring.data.gremlin.mapping.GremlinPersistentProperty; +import com.microsoft.spring.data.gremlin.query.GremlinOperations; +import com.microsoft.spring.data.gremlin.query.paramerter.GremlinParameterAccessor; +import org.springframework.data.mapping.context.MappingContext; +import org.springframework.data.repository.query.ResultProcessor; +import org.springframework.data.repository.query.parser.PartTree; +import org.springframework.lang.NonNull; + +public class PartTreeGremlinQuery extends AbstractGremlinQuery { + + private final PartTree partTree; + private final ResultProcessor processor; + private final MappingContext mappingContext; + + public PartTreeGremlinQuery(@NonNull GremlinQueryMethod method, @NonNull GremlinOperations operations) { + super(method, operations); + + this.processor = method.getResultProcessor(); + this.partTree = new PartTree(method.getName(), processor.getReturnedType().getDomainType()); + this.mappingContext = operations.getMappingConverter().getMappingContext(); + } + + @Override + protected GremlinQuery createQuery(@NonNull GremlinParameterAccessor accessor) { + final GremlinQueryCreator creator = new GremlinQueryCreator(this.partTree, accessor, this.mappingContext); + + if (this.partTree.isLimiting()) { + throw new UnsupportedOperationException("Limitation is not supported yet"); + } + + return creator.createQuery(); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/QueryFindScriptGenerator.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/QueryFindScriptGenerator.java new file mode 100644 index 000000000000..ace11eab3348 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/QueryFindScriptGenerator.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.query; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralHelper; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.query.criteria.Criteria; +import com.microsoft.spring.data.gremlin.query.criteria.CriteriaType; +import org.springframework.lang.NonNull; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class QueryFindScriptGenerator implements QueryScriptGenerator { + + private final GremlinSource source; + + public QueryFindScriptGenerator(@NonNull GremlinSource source) { + this.source = source; + } + + private String getCriteriaSubject(@NonNull Criteria criteria) { + String subject = criteria.getSubject(); + + if (subject.equals(this.source.getIdField().getName())) { + subject = Constants.PROPERTY_ID; // If subject is @Id/id field, use id property in database. + } + + return subject; + } + + private String generateIsEqual(@NonNull Criteria criteria) { + final String subject = getCriteriaSubject(criteria); + + if (subject.equals(Constants.PROPERTY_ID)) { + return String.format(Constants.GREMLIN_PRIMITIVE_WHERE, GremlinScriptLiteralHelper.generateHasId(criteria.getSubValues().get(0))); + } else { + return String.format(Constants.GREMLIN_PRIMITIVE_WHERE, GremlinScriptLiteralHelper.generateHas(subject, criteria.getSubValues().get(0))); + } + } + + /** + * Generate script with only one subject and no subValue, like findByActiveExists(). + * + * @param criteria given query represent a query subject + * @return simple script with keyword from criteria type + */ + private String generateEmptyScript(@NonNull Criteria criteria) { + final String subject = this.getCriteriaSubject(criteria); + final String has = GremlinScriptLiteralHelper.generateHas(subject, true); + + return String.format(Constants.GREMLIN_PRIMITIVE_WHERE, has); + } + + /** + * Generate script with only one subject and only one subValue, like findByCreateAtBefore(Date start). + * + * @param criteria given query represent a query subject + * @return simple script with keyword from criteria type + */ + private String generateSingleScript(@NonNull Criteria criteria) { + final CriteriaType type = criteria.getType(); + final String subject = this.getCriteriaSubject(criteria); + final long milliSeconds = GremlinUtils.timeToMilliSeconds(criteria.getSubValues().get(0)); + + final String values = String.format(Constants.GREMLIN_PRIMITIVE_VALUES, subject); + final String query = String.format(CriteriaType.criteriaTypeToGremlin(type), milliSeconds); + final String content = String.join(Constants.GREMLIN_PRIMITIVE_INVOKE, values, query); + + return String.format(Constants.GREMLIN_PRIMITIVE_WHERE, content); + } + + /** + * Generate script with only one subject and two subValue, like findByCreateAtBetween(Date start, Date end). + * + * @param criteria given query represent a query subject + * @return simple script with keyword from criteria type + */ + private String generateDoubleScript(Criteria criteria) { + final CriteriaType type = criteria.getType(); + final String subject = this.getCriteriaSubject(criteria); + final long start = GremlinUtils.toPrimitiveLong(criteria.getSubValues().get(0)); + final long end = GremlinUtils.toPrimitiveLong(criteria.getSubValues().get(1)); + + final String values = String.format(Constants.GREMLIN_PRIMITIVE_VALUES, subject); + final String query = String.format(CriteriaType.criteriaTypeToGremlin(type), start, end); + final String content = String.join(Constants.GREMLIN_PRIMITIVE_INVOKE, values, query); + + return String.format(Constants.GREMLIN_PRIMITIVE_WHERE, content); + } + + /** + * Generate script combined by AND/OR keyword. + * + * @param left sub script on left + * @param right sub script on right + * @param type should be AND/OR + * @return combined script with AND/OR + */ + private String generateCombinedScript(@NonNull String left, @NonNull String right, CriteriaType type) { + final String operation = CriteriaType.criteriaTypeToGremlin(type); + final String content = String.join(Constants.GREMLIN_PRIMITIVE_INVOKE, left, operation, right); + + return String.format(Constants.GREMLIN_PRIMITIVE_WHERE, content); + } + + + private String generateScriptTraversal(@NonNull Criteria criteria) { + final CriteriaType type = criteria.getType(); + + switch (type) { + case IS_EQUAL: + return this.generateIsEqual(criteria); + case AND: + case OR: + final String left = this.generateScriptTraversal(criteria.getSubCriteria().get(0)); + final String right = this.generateScriptTraversal(criteria.getSubCriteria().get(1)); + + return this.generateCombinedScript(left, right, type); + case AFTER: + case BEFORE: + return this.generateSingleScript(criteria); + case BETWEEN: + return this.generateDoubleScript(criteria); + case EXISTS: + return this.generateEmptyScript(criteria); + default: + throw new UnsupportedOperationException("unsupported Criteria type"); + } + } + + private List generateScript(@NonNull GremlinQuery query) { + final Criteria criteria = query.getCriteria(); + final List scriptList = new ArrayList<>(); + + scriptList.add(Constants.GREMLIN_PRIMITIVE_GRAPH); + + if (this.source instanceof GremlinSourceVertex) { + scriptList.add(Constants.GREMLIN_PRIMITIVE_VERTEX_ALL); + } else if (this.source instanceof GremlinSourceEdge) { + scriptList.add(Constants.GREMLIN_PRIMITIVE_EDGE_ALL); + } else { + throw new UnsupportedOperationException("Cannot generate script from graph entity"); + } + + scriptList.add(GremlinScriptLiteralHelper.generateHasLabel(this.source.getLabel())); + scriptList.add(this.generateScriptTraversal(criteria)); + + return scriptList; + } + + @Override + public List generate(@NonNull GremlinQuery query) { + final List scriptList = new ArrayList<>(this.generateScript(query)); + return Collections.singletonList(String.join(Constants.GREMLIN_PRIMITIVE_INVOKE, scriptList)); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/QueryScriptGenerator.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/QueryScriptGenerator.java new file mode 100644 index 000000000000..17f5dd0021b2 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/query/query/QueryScriptGenerator.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.query; + +import java.util.List; + +public interface QueryScriptGenerator { + + List generate(GremlinQuery query); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/GremlinRepository.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/GremlinRepository.java new file mode 100644 index 000000000000..8bb77a651dd3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/GremlinRepository.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.NoRepositoryBean; + +import java.io.Serializable; + +@NoRepositoryBean +public interface GremlinRepository extends CrudRepository { + + Iterable findAll(Class domainClass); + + void deleteAll(GremlinEntityType type); + + void deleteAll(Class domainClass); + + long vertexCount(); + + long edgeCount(); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/EnableGremlinRepositories.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/EnableGremlinRepositories.java new file mode 100644 index 000000000000..583e96cf4904 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/EnableGremlinRepositories.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.config; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.repository.support.GremlinRepositoryFactoryBean; +import org.springframework.context.annotation.ComponentScan.Filter; +import org.springframework.context.annotation.Import; +import org.springframework.data.repository.config.DefaultRepositoryBaseClass; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +@Import(GremlinRepositoryRegistrar.class) +public @interface EnableGremlinRepositories { + + /** + * @return Alias for basePackages(). + */ + String[] value() default {}; + + /** + * @return Base packages to scan for components with annotations. + */ + String[] basePackages() default {}; + + /** + * @return Type-safe alternative to basePackages() for specifying the packages to scan. The package of each class + * specified will be scanned. + */ + Class[] basePackageClasses() default {}; + + /** + * @return Types are eligible for component scanning. + */ + Filter[] includeFilters() default {}; + + /** + * @return Types are not eligible for component scanning. + */ + Filter[] excludeFilters() default {}; + + /** + * @return Specifics the postfix to be used for custom repository implementation class name. + */ + String repositoryImplementationPostfix() default Constants.DEFAULT_REPOSITORY_IMPLEMENT_POSTFIX; + + /** + * @return Configures the repository base class to be used to create repository. + */ + Class repositoryBaseClass() default DefaultRepositoryBaseClass.class; + + /** + * @return Configures whether nested repository interface. + */ + boolean considerNestedRepositories() default false; + + /** + * @return Configure the class of repository factory bean. + */ + Class repositoryFactoryBeanClass() default GremlinRepositoryFactoryBean.class; + + /** + * @return Specific the namedQuery location. + */ + String namedQueriesLocation() default ""; +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryConfigurationExtension.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryConfigurationExtension.java new file mode 100644 index 000000000000..cd8837ba2781 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryConfigurationExtension.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.config; + +import com.microsoft.spring.data.gremlin.common.Constants; +import com.microsoft.spring.data.gremlin.mapping.GremlinMappingContext; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.apache.commons.lang3.NotImplementedException; +import org.springframework.beans.factory.support.AbstractBeanDefinition; +import org.springframework.beans.factory.support.BeanDefinitionBuilder; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport; +import org.springframework.data.repository.config.RepositoryConfigurationSource; + +import java.lang.annotation.Annotation; +import java.util.Collection; +import java.util.Collections; + +public class GremlinRepositoryConfigurationExtension extends RepositoryConfigurationExtensionSupport { + + @Override + public String getModuleName() { + return Constants.GREMLIN_MODULE_NAME; + } + + @Override + public String getModulePrefix() { + return Constants.GREMLIN_MODULE_PREFIX; + } + + @Override + public String getRepositoryFactoryBeanClassName() { + throw new NotImplementedException("Gremlin RepositoryFactoryBean is not implemented"); + } + + @Override + public Collection> getIdentifyingTypes() { + return Collections.singleton(GremlinRepository.class); + } + + @Override + public Collection> getIdentifyingAnnotations() { + return Collections.emptyList(); + } + + @Override + public void registerBeansForRoot(BeanDefinitionRegistry registry, RepositoryConfigurationSource config) { + super.registerBeansForRoot(registry, config); + + if (!registry.containsBeanDefinition(Constants.GREMLIN_MAPPING_CONTEXT)) { + final RootBeanDefinition definition = new RootBeanDefinition(GremlinMappingContext.class); + + definition.setRole(AbstractBeanDefinition.ROLE_INFRASTRUCTURE); + definition.setSource(config.getSource()); + + registry.registerBeanDefinition(Constants.GREMLIN_MAPPING_CONTEXT, definition); + } + } + + @Override + public void postProcess(BeanDefinitionBuilder builder, RepositoryConfigurationSource source) { + super.postProcess(builder, source); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryRegistrar.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryRegistrar.java new file mode 100644 index 000000000000..50d9d9f7f9e6 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryRegistrar.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.config; + +import org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport; +import org.springframework.data.repository.config.RepositoryConfigurationExtension; + +import java.lang.annotation.Annotation; + +public class GremlinRepositoryRegistrar extends RepositoryBeanDefinitionRegistrarSupport { + + @Override + protected Class getAnnotation() { + return EnableGremlinRepositories.class; + } + + @Override + protected RepositoryConfigurationExtension getExtension() { + return new GremlinRepositoryConfigurationExtension(); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinEntityInformation.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinEntityInformation.java new file mode 100644 index 000000000000..dd1a133bf6f5 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinEntityInformation.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.support; + +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.GeneratedValue; +import com.microsoft.spring.data.gremlin.annotation.Graph; +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import org.springframework.data.repository.core.support.AbstractEntityInformation; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; +import org.springframework.util.ReflectionUtils; + +import java.lang.reflect.Field; + + +public class GremlinEntityInformation extends AbstractEntityInformation { + + private final Field idField; + + public GremlinEntityInformation(@NonNull Class domainClass) { + super(domainClass); + + this.idField = this.getIdField(domainClass); + } + + private GremlinSource createGremlinSource(@NonNull Class domainClass, @NonNull Field idField) { + final String label; + final String domainClassName = domainClass.getSimpleName(); + final Vertex vertex = domainClass.getAnnotation(Vertex.class); + final Edge edge = domainClass.getAnnotation(Edge.class); + final Graph graph = domainClass.getAnnotation(Graph.class); + final GremlinSource source; + + if (vertex != null && edge == null && graph == null) { + source = new GremlinSourceVertex<>(domainClass); + label = vertex.label().isEmpty() ? domainClassName : vertex.label(); + } else if (edge != null && vertex == null && graph == null) { + source = new GremlinSourceEdge<>(domainClass); + label = edge.label().isEmpty() ? domainClassName : edge.label(); + } else if (graph != null && vertex == null && edge == null) { + source = new GremlinSourceGraph<>(domainClass); + label = ""; + } else { + throw new GremlinUnexpectedEntityTypeException("Unexpected gremlin entity type"); + } + + source.setLabel(label); + source.setIdField(idField); + + return source; + } + + public GremlinSource createGremlinSource() { + return createGremlinSource(super.getJavaType(), idField); + } + + @Override + @Nullable + public ID getId(T entity) { + final Field idField = this.idField; + @SuppressWarnings("unchecked") final ID id = (ID) ReflectionUtils.getField(idField, entity); + + if (id == null && !(super.getJavaType().isAnnotationPresent(Graph.class)) + && !idField.isAnnotationPresent(GeneratedValue.class)) { + throw new GremlinInvalidEntityIdFieldException("A non-generated id field cannot be null!"); + } + return id; + } + + @Override + public Class getIdType() { + @SuppressWarnings("unchecked") final Class idClass = (Class) this.idField.getType(); + + return idClass; + } + + @NonNull + private Field getIdField(@NonNull Class domainClass) { + final Field idField = GremlinUtils.getIdField(domainClass); + + ReflectionUtils.makeAccessible(idField); + + return idField; + } + + public Field getIdField() { + return idField; + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactory.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactory.java new file mode 100644 index 000000000000..874c4e8dec35 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactory.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.support; + +import com.microsoft.spring.data.gremlin.query.GremlinOperations; +import com.microsoft.spring.data.gremlin.query.query.GremlinQueryMethod; +import com.microsoft.spring.data.gremlin.query.query.PartTreeGremlinQuery; +import org.springframework.context.ApplicationContext; +import org.springframework.data.projection.ProjectionFactory; +import org.springframework.data.repository.core.EntityInformation; +import org.springframework.data.repository.core.NamedQueries; +import org.springframework.data.repository.core.RepositoryInformation; +import org.springframework.data.repository.core.RepositoryMetadata; +import org.springframework.data.repository.core.support.RepositoryFactorySupport; +import org.springframework.data.repository.query.QueryLookupStrategy; +import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider; +import org.springframework.data.repository.query.RepositoryQuery; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.Optional; + +public class GremlinRepositoryFactory extends RepositoryFactorySupport { + + private final ApplicationContext context; + private final GremlinOperations operations; + + public GremlinRepositoryFactory(@NonNull GremlinOperations operations, ApplicationContext context) { + this.operations = operations; + this.context = context; + } + + @Override + protected Class getRepositoryBaseClass(RepositoryMetadata metadata) { + return SimpleGremlinRepository.class; + } + + @Override + protected Object getTargetRepository(RepositoryInformation information) { + final EntityInformation entityInfo = this.getEntityInformation(information.getDomainType()); + + return getTargetRepositoryViaReflection(information, entityInfo, this.context); + } + + @Override + public EntityInformation getEntityInformation(Class domainClass) { + return new GremlinEntityInformation<>(domainClass); + } + + @Override + protected Optional getQueryLookupStrategy( + QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider provider) { + return Optional.of(new GremlinQueryLookupStrategy(this.operations)); + } + + private static class GremlinQueryLookupStrategy implements QueryLookupStrategy { + + private final GremlinOperations operations; + + GremlinQueryLookupStrategy(@NonNull GremlinOperations operations) { + this.operations = operations; + } + + @Override + public RepositoryQuery resolveQuery(@NonNull Method method, RepositoryMetadata metadata, + ProjectionFactory factory, NamedQueries namedQueries) { + final GremlinQueryMethod queryMethod = new GremlinQueryMethod(method, metadata, factory); + + Assert.notNull(queryMethod, "queryMethod should not be null"); + Assert.notNull(this.operations, "operations should not be null"); + + return new PartTreeGremlinQuery(queryMethod, this.operations); + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryBean.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryBean.java new file mode 100644 index 000000000000..9ae405f0719c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryBean.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.support; + +import com.microsoft.spring.data.gremlin.mapping.GremlinMappingContext; +import com.microsoft.spring.data.gremlin.query.GremlinOperations; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.data.mapping.context.MappingContext; +import org.springframework.data.repository.Repository; +import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport; +import org.springframework.data.repository.core.support.RepositoryFactorySupport; + +import java.io.Serializable; + +public class GremlinRepositoryFactoryBean, S, ID extends Serializable> + extends RepositoryFactoryBeanSupport implements ApplicationContextAware { + + private ApplicationContext context; + private GremlinOperations operations; + private boolean mappingContextConfigured = false; + + public GremlinRepositoryFactoryBean(Class repositoryInterface) { + super(repositoryInterface); + } + + @Autowired + public void setGremlinOperations(GremlinOperations operations) { + this.operations = operations; + } + + protected RepositoryFactorySupport getFactoryInstance(ApplicationContext context) { + return new GremlinRepositoryFactory(this.operations, context); + } + + @Override + protected final RepositoryFactorySupport createRepositoryFactory() { + return this.getFactoryInstance(this.context); + } + + @Override + public void setApplicationContext(ApplicationContext context) throws BeansException { + this.context = context; + } + + @Override + protected void setMappingContext(MappingContext mappingContext) { + super.setMappingContext(mappingContext); + + this.mappingContextConfigured = true; + } + + @Override + public void afterPropertiesSet() { + super.afterPropertiesSet(); + + if (!this.mappingContextConfigured) { + if (this.operations == null) { + this.setMappingContext(new GremlinMappingContext()); + } else { + this.setMappingContext(this.operations.getMappingConverter().getMappingContext()); + } + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/SimpleGremlinRepository.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/SimpleGremlinRepository.java new file mode 100644 index 000000000000..3c1b5b2e8de8 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/repository/support/SimpleGremlinRepository.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.support; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import com.microsoft.spring.data.gremlin.query.GremlinOperations; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.springframework.context.ApplicationContext; +import org.springframework.lang.NonNull; + +import java.io.Serializable; +import java.util.List; +import java.util.Optional; +import java.util.stream.StreamSupport; + +import static java.util.stream.Collectors.toList; + +public class SimpleGremlinRepository implements GremlinRepository { + + private final GremlinEntityInformation information; + + private final GremlinOperations operations; + + public SimpleGremlinRepository(GremlinEntityInformation information, @NonNull ApplicationContext context) { + this(information, context.getBean(GremlinOperations.class)); + } + + public SimpleGremlinRepository(GremlinEntityInformation information, @NonNull GremlinOperations operations) { + this.operations = operations; + this.information = information; + } + + @Override + @SuppressWarnings("unchecked") + public S save(@NonNull S domain) { + final GremlinSource source = this.information.createGremlinSource(); + + source.setId(this.information.getId(domain)); + + return (S) this.operations.save(domain, source); + } + + @Override + public Iterable saveAll(@NonNull Iterable domains) { + return StreamSupport.stream(domains.spliterator(), true).map(this::save).collect(toList()); + } + + @Override + public Iterable findAll() { + final GremlinSource source = this.information.createGremlinSource(); + + if (source instanceof GremlinSourceGraph) { + throw new UnsupportedOperationException("findAll of Graph is not supported"); + } + + return this.operations.findAll(source); + } + + @Override + public List findAllById(@NonNull Iterable ids) { + return StreamSupport.stream(ids.spliterator(), true).map(this::findById) + .filter(Optional::isPresent).map(Optional::get).collect(toList()); + } + + @Override + public Optional findById(@NonNull ID id) { + final T domain = this.operations.findById(id, this.information.createGremlinSource()); + + return domain == null ? Optional.empty() : Optional.of(domain); + } + + @Override + public Iterable findAll(@NonNull Class domainClass) { + return findAll(); + } + + @Override + public long vertexCount() { + return this.operations.vertexCount(); + } + + @Override + public long edgeCount() { + return this.operations.edgeCount(); + } + + /** + * The total number of vertex and edge, vertexCount and edgeCount is also available. + * + * @return the count of both vertex and edge. + */ + @Override + public long count() { + return this.vertexCount() + this.edgeCount(); + } + + @Override + public void delete(@NonNull T domain) { + this.operations.deleteById(this.information.getId(domain), this.information.createGremlinSource()); + } + + @Override + public void deleteById(@NonNull ID id) { + this.operations.deleteById(id, this.information.createGremlinSource()); + } + + @Override + public void deleteAll() { + this.operations.deleteAll(); + } + + @Override + public void deleteAll(GremlinEntityType type) { + this.operations.deleteAll(type); + } + + @Override + public void deleteAll(@NonNull Iterable domains) { + domains.forEach(this::delete); + } + + @Override + public void deleteAll(@NonNull Class domainClass) { + this.operations.deleteAll(this.information.createGremlinSource()); + } + + @Override + public boolean existsById(@NonNull ID id) { + return this.operations.existsById(id, this.information.createGremlinSource()); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/MacAddress.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/MacAddress.java new file mode 100644 index 000000000000..1d2024f1ebb2 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/MacAddress.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/* + * Disclaimer: + * This class is copied from https://github.com/Microsoft/azure-tools-for-java/ with minor modification (fixing + * static analysis error). + * Location in the repo: /Utils/azuretools-core/src/com/microsoft/azuretools/azurecommons/util/MacAddress.java + */ +package com.microsoft.spring.data.gremlin.telemetry; + +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Locale; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static java.nio.charset.StandardCharsets.UTF_8; + +public class MacAddress { + + private static final String UNKNOWN_MAC_ADDRESS = "Unknown-Mac-Address"; + private static final String MAC_REGEX = "([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}"; + private static final String MAC_REGEX_ZERO = "([0]{2}[:-]){5}[0]{2}"; + private static final String HASHED_MAC_REGEX = "[0-9a-f]{64}"; + + public static boolean isValidHashMacFormat(@NonNull String hashMac) { + Assert.notNull(hashMac, "hashMac should not be null"); + if (hashMac.isEmpty()) { + return false; + } + + return Pattern.compile(HASHED_MAC_REGEX).matcher(hashMac).matches(); + } + + private static String getRawMac() { + final List commands; + final String os = System.getProperty("os.name"); + final StringBuilder macBuilder = new StringBuilder(); + + if (os != null && !os.isEmpty() && os.toLowerCase(Locale.US).startsWith("win")) { + commands = Collections.singletonList("getmac"); + } else { + commands = Arrays.asList("ifconfig", "-a"); + } + + try { + String tmp; + final ProcessBuilder builder = new ProcessBuilder(commands); + final Process process = builder.start(); + try (InputStreamReader streamReader = new InputStreamReader(process.getInputStream(), UTF_8); + BufferedReader reader = new BufferedReader(streamReader)) { + while ((tmp = reader.readLine()) != null) { + macBuilder.append(tmp); + } + } + } catch (IOException e) { + return ""; + } + return macBuilder.toString(); + } + + private static String getHexDigest(byte digest) { + final String hex = Integer.toString((digest & 0xff) + 0x100, 16); + + return hex.substring(1); + } + + private static String hash(@NonNull String mac) { + Assert.notNull(mac, "mac should not be null"); + if (mac.isEmpty()) { + return ""; + } + + final StringBuilder builder = new StringBuilder(); + + try { + final MessageDigest messageDigest = MessageDigest.getInstance("SHA-256"); + + messageDigest.update(mac.getBytes(UTF_8)); + + final byte[] digestBytes = messageDigest.digest(); + + for (final byte digest : digestBytes) { + builder.append(getHexDigest(digest)); + } + } catch (NoSuchAlgorithmException ex) { + return ""; + } + + Assert.isTrue( + + isValidHashMacFormat(builder.toString()), "Invalid format for HashMac"); + + return builder.toString(); + } + + public static String getHashMac() { + final String rawMac = getRawMac(); + + if (rawMac.isEmpty()) { + return UNKNOWN_MAC_ADDRESS; + } + + final Pattern pattern = Pattern.compile(MAC_REGEX); + final Pattern patternZero = Pattern.compile(MAC_REGEX_ZERO); + final Matcher matcher = pattern.matcher(rawMac); + + String mac = ""; + + while (matcher.find()) { + mac = matcher.group(0); + + if (!patternZero.matcher(mac).matches()) { + break; + } + } + + final String hashMac = hash(mac); + + if (StringUtils.hasText(hashMac)) { + return hashMac; + } + + return UNKNOWN_MAC_ADDRESS; + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/PropertyLoader.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/PropertyLoader.java new file mode 100644 index 000000000000..8ffb663411d3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/PropertyLoader.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.telemetry; + +import org.springframework.lang.NonNull; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +public final class PropertyLoader { + + private PropertyLoader() { + + } + + private static final String PROJECT_PROPERTY_FILE = "/META-INF/project.properties"; + + private static final String TELEMETRY_CONFIG_FILE = "/telemetry.config"; + + public static String getProjectVersion() { + return getPropertyByName("project.version", PROJECT_PROPERTY_FILE); + } + + public static String getTelemetryInstrumentationKey() { + return getPropertyByName("telemetry.instrumentationKey", TELEMETRY_CONFIG_FILE); + } + + private static String getPropertyByName(@NonNull String name, @NonNull String filename) { + final Properties properties = new Properties(); + final InputStream inputStream = PropertyLoader.class.getResourceAsStream(filename); + + if (inputStream == null) { + return null; + } + + try { + properties.load(inputStream); + } catch (IOException e) { + // Omitted + } finally { + try { + inputStream.close(); + } catch (IOException e) { + // Omitted + } + } + + return properties.getProperty(name); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/TelemetryEventData.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/TelemetryEventData.java new file mode 100644 index 000000000000..87ad6ba2b9b9 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/TelemetryEventData.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.telemetry; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import java.time.Instant; +import java.util.Map; + +public class TelemetryEventData { + + private final String name; + + @JsonProperty("iKey") + private final String instrumentationKey; + + private final Tags tags = new Tags("Spring-on-azure", "Java-maven-plugin"); + + private final EventData data = new EventData("EventData"); + + private final String time; + + public TelemetryEventData(String eventName, @NonNull Map properties) { + Assert.notNull(properties, "properties should not be null"); + Assert.hasText(eventName, "Event name should contain text."); + + name = "Microsoft.ApplicationInsights.Event"; + instrumentationKey = PropertyLoader.getTelemetryInstrumentationKey(); + + data.getBaseData().setName(eventName); + data.getBaseData().setProperties(properties); + time = Instant.now().toString(); + } + + private static class Tags { + + @JsonProperty("ai.cloud.roleInstance") + private final String aiCloudRoleInstance; + + @JsonProperty("ai.internal.sdkVersion") + private final String aiInternalSdkVersion; + + Tags(String instance, String sdkVersion) { + aiCloudRoleInstance = instance; + aiInternalSdkVersion = sdkVersion; + } + + public String getAiCloudRoleInstance() { + return aiCloudRoleInstance; + } + + public String getAiInternalSdkVersion() { + return aiInternalSdkVersion; + } + } + + private static class EventData { + + private final String baseType; + + private final CustomData baseData = new CustomData(); + + EventData(String baseType) { + this.baseType = baseType; + } + + private static class CustomData { + + private final Integer ver = 2; + + private String name; + + private Map properties; + + public Integer getVer() { + return ver; + } + + public String getName() { + return name; + } + + public Map getProperties() { + return properties; + } + + private void setName(String name) { + this.name = name; + } + + private void setProperties(Map properties) { + this.properties = properties; + } + } + + public String getBaseType() { + return baseType; + } + + public CustomData getBaseData() { + return baseData; + } + } + + public String getName() { + return name; + } + + public String getInstrumentationKey() { + return instrumentationKey; + } + + public Tags getTags() { + return tags; + } + + public EventData getData() { + return data; + } + + public String getTime() { + return time; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/TelemetrySender.java b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/TelemetrySender.java new file mode 100644 index 000000000000..3bc2cc002f11 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/java/com/microsoft/spring/data/gremlin/telemetry/TelemetrySender.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.telemetry; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; + +import java.util.HashMap; +import java.util.Map; + +import static org.springframework.util.MimeTypeUtils.APPLICATION_JSON; + +public class TelemetrySender { + + private static final Logger LOGGER = LoggerFactory.getLogger(TelemetrySender.class); + + private static final String PROPERTY_INSTALLATION_ID = "installationId"; + + private static final String PROPERTY_VERSION = "version"; + + private static final String PROPERTY_SERVICE_NAME = "serviceName"; + + private static final String PROJECT_INFO = "spring-data-gremlin/" + PropertyLoader.getProjectVersion(); + + private static final String TELEMETRY_TARGET_URL = "https://dc.services.visualstudio.com/v2/track"; + + private static final ObjectMapper MAPPER = new ObjectMapper(); + + private static final int RETRY_LIMIT = 3; // Align the retry times with sdk + + private static final RestTemplate REST_TEMPLATE = new RestTemplate(); + + private static final HttpHeaders HEADERS = new HttpHeaders(); + + static { + HEADERS.add(HttpHeaders.CONTENT_TYPE, APPLICATION_JSON.toString()); + } + + private ResponseEntity executeRequest(final TelemetryEventData eventData) { + try { + final HttpEntity body = new HttpEntity<>(MAPPER.writeValueAsString(eventData), HEADERS); + + return REST_TEMPLATE.exchange(TELEMETRY_TARGET_URL, HttpMethod.POST, body, String.class); + } catch (RestClientException | JsonProcessingException e) { + LOGGER.trace("Failed to exchange telemetry request, {}.", e.getMessage()); + } + + return null; + } + + private void sendTelemetryData(@NonNull TelemetryEventData eventData) { + Assert.notNull(eventData, "eventData should not be null"); + ResponseEntity response = null; + + for (int i = 0; i < RETRY_LIMIT; i++) { + response = executeRequest(eventData); + + if (response != null && response.getStatusCode() == HttpStatus.OK) { + return; + } + } + + if (response != null && response.getStatusCode() != HttpStatus.OK) { + LOGGER.trace("Failed to send telemetry data, response status code {}.", response.getStatusCode().toString()); + } + } + + public void send(String name) { + Assert.hasText(name, "Event name should contain text."); + + sendTelemetryData(new TelemetryEventData(name, getProperties())); + } + + private Map getProperties() { + final Map properties = new HashMap<>(); + + properties.put(PROPERTY_VERSION, PROJECT_INFO); + properties.put(PROPERTY_SERVICE_NAME, "gremlin"); + properties.put(PROPERTY_INSTALLATION_ID, MacAddress.getHashMac()); + + return properties; + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/resources/META-INF/project.properties b/sdk/spring/azure-spring-data-gremlin/src/main/resources/META-INF/project.properties new file mode 100644 index 000000000000..90d42083480f --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/resources/META-INF/project.properties @@ -0,0 +1 @@ +project.version=@project.version@ diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/resources/META-INF/spring.factories b/sdk/spring/azure-spring-data-gremlin/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000000..d0072b45607c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.data.repository.core.support.RepositoryFactorySupport=com.microsoft.spring.data.gremlin.repository.support.GremlinRepositoryFactory + diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/resources/application.properties b/sdk/spring/azure-spring-data-gremlin/src/main/resources/application.properties new file mode 100644 index 000000000000..42947c4763dc --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/resources/application.properties @@ -0,0 +1,4 @@ +gremlin.endpoint=endpoint.gremlin.cosmosdb.azure.com +gremlin.port=443 +gremlin.username=/dbs/database/colls/collection +gremlin.password=password diff --git a/sdk/spring/azure-spring-data-gremlin/src/main/resources/telemetry.config b/sdk/spring/azure-spring-data-gremlin/src/main/resources/telemetry.config new file mode 100644 index 000000000000..61b615fa0ef1 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/main/resources/telemetry.config @@ -0,0 +1 @@ +telemetry.instrumentationKey=@telemetry.instrumentationKey@ \ No newline at end of file diff --git a/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Network.java b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Network.java new file mode 100644 index 000000000000..a7a7de0cc2be --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Network.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.data.gremlin; + +import com.microsoft.spring.data.gremlin.annotation.EdgeSet; +import com.microsoft.spring.data.gremlin.annotation.Graph; +import com.microsoft.spring.data.gremlin.annotation.VertexSet; +import org.springframework.data.annotation.Id; + +import java.util.ArrayList; +import java.util.List; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + *

    + * Code samples for the spring-data-gremlin in README.md + */ +@Graph +public class Network { + + @Id + private String id; + + public Network() { + this.edges = new ArrayList<>(); + this.vertexes = new ArrayList<>(); + } + + @EdgeSet + private List edges; + + @VertexSet + private List vertexes; + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Person.java b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Person.java new file mode 100644 index 000000000000..da702a98e35d --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Person.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.data.gremlin; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import org.springframework.data.annotation.Id; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + *

    + * Code samples for the spring-data-gremlin in README.md + */ +@Vertex +public class Person { + + @Id + private String id; + + private String name; + + private String age; + + public Person() { + + } + + public Person(String id, String name, String age) { + this.id = id; + this.name = name; + this.age = age; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/PersonRepository.java b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/PersonRepository.java new file mode 100644 index 000000000000..05dca133db2f --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/PersonRepository.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.data.gremlin; + +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + *

    + * Code samples for the spring-data-gremlin in README.md + */ +@Repository +public interface PersonRepository extends GremlinRepository { + + List findByName(String name); + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Relation.java b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Relation.java new file mode 100644 index 000000000000..eddb6e5bff18 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/Relation.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.data.gremlin; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import org.springframework.data.annotation.Id; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + *

    + * Code samples for the spring-data-gremlin in README.md + */ +@Edge +public class Relation { + + @Id + private String id; + + private String name; + + @EdgeFrom + private Person personFrom; + + @EdgeTo + private Person personTo; + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/SampleApplication.java b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/SampleApplication.java new file mode 100644 index 000000000000..e5066b7966cc --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/samples/java/com/azure/spring/data/gremlin/SampleApplication.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.data.gremlin; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + *

    + * Code samples for the spring-data-gremlin in README.md + */ +@SpringBootApplication +public class SampleApplication implements CommandLineRunner { + + @Autowired + private PersonRepository repository; + + public static void main(String[] args) { + SpringApplication.run(SampleApplication.class, args); + } + + public void run(String... var1) { + + final Person testUser = new Person("PERSON_ID", "PERSON_NAME", "PERSON_AGE"); + repository.deleteAll(); + repository.save(testUser); + } + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationEdgeUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationEdgeUnitTest.java new file mode 100644 index 000000000000..c79c7acd5d40 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationEdgeUnitTest.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.common.domain.Dependency; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import org.junit.Assert; +import org.junit.Test; + +public class AnnotationEdgeUnitTest { + + @Test + public void testAnnotationEdgeDefaultLabel() { + final GremlinSource source = GremlinUtils.toGremlinSource(Dependency.class); + + Assert.assertTrue(source instanceof GremlinSourceEdge); + Assert.assertNotNull(source.getLabel()); + Assert.assertEquals(source.getLabel(), Dependency.class.getSimpleName()); + } + + @Test + public void testAnnotationEdgeSpecifiedLabel() { + final GremlinSource source = GremlinUtils.toGremlinSource(Relationship.class); + + Assert.assertTrue(source instanceof GremlinSourceEdge); + Assert.assertNotNull(source.getLabel()); + Assert.assertEquals(source.getLabel(), TestConstants.EDGE_RELATIONSHIP_LABEL); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationGraphUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationGraphUnitTest.java new file mode 100644 index 000000000000..548ed1a0b474 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationGraphUnitTest.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.common.domain.Network; +import com.microsoft.spring.data.gremlin.common.domain.Roadmap; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import org.junit.Assert; +import org.junit.Test; + +public class AnnotationGraphUnitTest { + + @Test + public void testAnnotationGraphDefaultCollection() { + final GremlinSource source = GremlinUtils.toGremlinSource(Network.class); + + Assert.assertTrue(source instanceof GremlinSourceGraph); + Assert.assertTrue(source.getLabel().isEmpty()); + } + + @Test + public void testAnnotationGraphSpecifiedCollection() { + final GremlinSource source = GremlinUtils.toGremlinSource(Roadmap.class); + + Assert.assertTrue(source instanceof GremlinSourceGraph); + Assert.assertTrue(source.getLabel().isEmpty()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationVertexUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationVertexUnitTest.java new file mode 100644 index 000000000000..f620f9f4b69b --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/annotation/AnnotationVertexUnitTest.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.annotation; + +import com.microsoft.spring.data.gremlin.common.GremlinUtils; +import com.microsoft.spring.data.gremlin.common.domain.Library; +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import org.junit.Assert; +import org.junit.Test; + +public class AnnotationVertexUnitTest { + + @Test + public void testAnnotationVertexDefaultLabel() { + final GremlinSource source = GremlinUtils.toGremlinSource(Library.class); + + Assert.assertTrue(source instanceof GremlinSourceVertex); + Assert.assertNotNull(source.getLabel()); + Assert.assertEquals(source.getLabel(), Library.class.getSimpleName()); + } + + @Test + public void testAnnotationVertexSpecifiedLabel() { + final GremlinSource source = GremlinUtils.toGremlinSource(Person.class); + + Assert.assertTrue(source instanceof GremlinSourceVertex); + Assert.assertNotNull(source.getLabel()); + Assert.assertEquals(source.getLabel(), TestConstants.VERTEX_PERSON_LABEL); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/GremlinFactoryUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/GremlinFactoryUnitTest.java new file mode 100644 index 000000000000..fe75d45ac789 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/GremlinFactoryUnitTest.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import com.microsoft.spring.data.gremlin.exception.GremlinIllegalConfigurationException; +import org.apache.tinkerpop.gremlin.driver.Client; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import static com.microsoft.spring.data.gremlin.common.TestConstants.EMPTY_STRING; +import static com.microsoft.spring.data.gremlin.common.TestConstants.ILLEGAL_ENDPOINT_PORT; + +@ContextConfiguration(classes = {GremlinFactoryUnitTest.TestConfiguration.class}) +@RunWith(SpringJUnit4ClassRunner.class) +public class GremlinFactoryUnitTest { + + @Autowired + private GremlinFactory factory; + + @Test(expected = GremlinIllegalConfigurationException.class) + public void testGremlinFactoryException() { + final GremlinConfig config = GremlinConfig.builder(TestConstants.FAKE_ENDPOINT, TestConstants.FAKE_USERNAME, + TestConstants.FAKE_PASSWORD).build(); + + new GremlinFactory(config).getGremlinClient(); + } + + @Test + public void testGremlinFactoryNormal() { + final Client client = factory.getGremlinClient(); + + Assert.assertEquals(client.getCluster().getPort(), TestConstants.DEFAULT_ENDPOINT_PORT); + Assert.assertFalse(client.getSettings().getSession().isPresent()); + } + + @Configuration + static class TestConfiguration { + + @Bean + public GremlinFactory getGremlinFactory() { + return new GremlinFactory(getGremlinConfig()); + } + + @Bean + public GremlinConfig getGremlinConfig() { + return GremlinConfig.builder(EMPTY_STRING, EMPTY_STRING, EMPTY_STRING) + .port(ILLEGAL_ENDPOINT_PORT) + .build(); + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/GremlinUtilsUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/GremlinUtilsUnitTest.java new file mode 100644 index 000000000000..0a799fbcb9cf --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/GremlinUtilsUnitTest.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import com.microsoft.spring.data.gremlin.common.domain.Service; +import com.microsoft.spring.data.gremlin.conversion.source.AbstractGremlinSource; +import org.junit.Assert; +import org.junit.Test; + +public class GremlinUtilsUnitTest { + + @Test(expected = IllegalArgumentException.class) + public void testCreateIntegerInstance() { + GremlinUtils.createInstance(Integer.class); + } + + @Test(expected = IllegalArgumentException.class) + public void testCreateTestConstantsInstance() { + GremlinUtils.createInstance(TestConstants.class); + } + + @Test(expected = IllegalArgumentException.class) + public void testCreateAbstractInstance() { + GremlinUtils.createInstance(AbstractGremlinSource.class); + } + + @Test(expected = UnsupportedOperationException.class) + public void testTimeToMilliSecondsException() { + GremlinUtils.timeToMilliSeconds(new Service()); + } + + @Test(expected = UnsupportedOperationException.class) + public void testToPrimitiveLongException() { + GremlinUtils.toPrimitiveLong((short) 2); + } + + @Test + public void testToPrimitiveLong() { + Assert.assertEquals(3, GremlinUtils.toPrimitiveLong(3L)); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/MacAddressUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/MacAddressUnitTest.java new file mode 100644 index 000000000000..2eb256ac2937 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/MacAddressUnitTest.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import com.microsoft.spring.data.gremlin.telemetry.MacAddress; +import org.junit.Assert; +import org.junit.Test; + +public class MacAddressUnitTest { + + @Test + public void testGetHashMacNormal() { + Assert.assertNotNull(MacAddress.getHashMac()); + Assert.assertFalse(MacAddress.getHashMac().isEmpty()); + Assert.assertFalse(MacAddress.isValidHashMacFormat("")); + Assert.assertTrue(MacAddress.isValidHashMacFormat(MacAddress.getHashMac())); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestConstants.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestConstants.java new file mode 100644 index 000000000000..b3efdfdbe2e5 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestConstants.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +public final class TestConstants { + + private TestConstants() { + + } + + public static final int DEFAULT_ENDPOINT_PORT = 443; + public static final int ILLEGAL_ENDPOINT_PORT = -1; + public static final String FAKE_ENDPOINT = "XXX-xxx.XXX-xxx.cosmosdb.azure.com"; + public static final String FAKE_USERNAME = "XXX-xxx.username"; + public static final String FAKE_PASSWORD = "XXX-xxx.password"; + public static final String EMPTY_STRING = ""; + + public static final String PROPERTY_ID = "id"; + public static final String PROPERTY_NAME = "name"; + public static final String PROPERTY_LOCATION = "location"; + + public static final String VERTEX_PERSON_LABEL = "label-person"; + public static final String VERTEX_PROJECT_LABEL = "label-project"; + public static final String EDGE_RELATIONSHIP_LABEL = "label-relationship"; + public static final String GRAPH_ROADMAP_COLLECTION_NAME = "roadmap-collection"; + + public static final String VERTEX_PERSON_ID = "233333"; + public static final String VERTEX_PERSON_NAME = "incarnation-p-lee"; + + public static final String VERTEX_PERSON_0_ID = "000000"; + public static final String VERTEX_PERSON_0_NAME = "silencer"; + + public static final String VERTEX_PERSON_1_ID = "111111"; + public static final String VERTEX_PERSON_1_NAME = "templar-assassin"; + + public static final String VERTEX_PROJECT_ID = "666666"; + public static final String VERTEX_PROJECT_NAME = "spring-data-gremlin"; + public static final String VERTEX_PROJECT_URI = "https://github.com/Incarnation-p-lee/spring-data-gremlin.git"; + + public static final String VERTEX_PROJECT_0_ID = "222222"; + public static final String VERTEX_PROJECT_0_NAME = "spring-data-documentdb"; + public static final String VERTEX_PROJECT_0_URI = "https://github.com/Microsoft/spring-data-documentdb"; + + public static final String EDGE_RELATIONSHIP_ID = "999999"; + public static final String EDGE_RELATIONSHIP_NAME = "created"; + public static final String EDGE_RELATIONSHIP_LOCATION = "shanghai"; + + public static final String EDGE_RELATIONSHIP_0_ID = "333333"; + public static final String EDGE_RELATIONSHIP_0_NAME = "contributed"; + public static final String EDGE_RELATIONSHIP_0_LOCATION = "war3"; + + public static final String EDGE_RELATIONSHIP_1_ID = "444444"; + public static final String EDGE_RELATIONSHIP_1_NAME = "contributed"; + public static final String EDGE_RELATIONSHIP_1_LOCATION = "dota"; + + public static final String EDGE_RELATIONSHIP_2_ID = "555555"; + public static final String EDGE_RELATIONSHIP_2_NAME = "create"; + public static final String EDGE_RELATIONSHIP_2_LOCATION = "shanghai"; + + public static final String VERTEX_LABEL = "label-vertex"; +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestGremlinProperties.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestGremlinProperties.java new file mode 100644 index 000000000000..3ac5184feccd --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestGremlinProperties.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import org.apache.tinkerpop.gremlin.driver.ser.Serializers; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@ConfigurationProperties("gremlin") +public class TestGremlinProperties { + private String endpoint; + + private int port; + + private String username; + + private String password; + + private boolean sslEnabled = true; + + private boolean telemetryAllowed = true; + + private String serializer = Serializers.GRAPHSON.toString(); + + public TestGremlinProperties() { + } + + public TestGremlinProperties(String endpoint, int port, String username, String password, boolean sslEnabled, boolean telemetryAllowed, String serializer) { + this.endpoint = endpoint; + this.port = port; + this.username = username; + this.password = password; + this.sslEnabled = sslEnabled; + this.telemetryAllowed = telemetryAllowed; + this.serializer = serializer; + } + + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public boolean isSslEnabled() { + return sslEnabled; + } + + public void setSslEnabled(boolean sslEnabled) { + this.sslEnabled = sslEnabled; + } + + public boolean isTelemetryAllowed() { + return telemetryAllowed; + } + + public void setTelemetryAllowed(boolean telemetryAllowed) { + this.telemetryAllowed = telemetryAllowed; + } + + public String getSerializer() { + return serializer; + } + + public void setSerializer(String serializer) { + this.serializer = serializer; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestRepositoryConfiguration.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestRepositoryConfiguration.java new file mode 100644 index 000000000000..29011a6b5632 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestRepositoryConfiguration.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import com.microsoft.spring.data.gremlin.config.AbstractGremlinConfiguration; +import com.microsoft.spring.data.gremlin.repository.config.EnableGremlinRepositories; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.PropertySource; + +@EnableGremlinRepositories +@PropertySource(value = {"classpath:application.properties"}) +@EnableConfigurationProperties(TestGremlinProperties.class) +public class TestRepositoryConfiguration extends AbstractGremlinConfiguration { + + @Autowired + private TestGremlinProperties testProps; + + @Override + public GremlinConfig getGremlinConfig() { + return GremlinConfig.builder(testProps.getEndpoint(), testProps.getUsername(), testProps.getPassword()) + .port(testProps.getPort()) + .telemetryAllowed(testProps.isTelemetryAllowed()) + .sslEnabled(testProps.isSslEnabled()) + .serializer(testProps.getSerializer()) + .build(); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestUtils.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestUtils.java new file mode 100644 index 000000000000..653924a445b9 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/TestUtils.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common; + +import org.junit.Assert; + +import java.util.Comparator; +import java.util.List; + +public class TestUtils { + + public static void assertEntitiesEquals(List expect, List actual) { + Assert.assertEquals(actual.size(), expect.size()); + + actual.sort(Comparator.comparing(T::toString)); + expect.sort(Comparator.comparing(T::toString)); + + Assert.assertEquals(actual, expect); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/AdvancedUser.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/AdvancedUser.java new file mode 100644 index 000000000000..296307f85177 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/AdvancedUser.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; + +@Vertex +public class AdvancedUser extends User { + + private int level; + + public AdvancedUser(String id, String name, int level) { + super(id, name); + this.level = level; + } + + public int getLevel() { + return level; + } + +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Book.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Book.java new file mode 100644 index 000000000000..d7096edb4c60 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Book.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import org.springframework.data.annotation.Id; + +@Vertex +public class Book { + + @Id + private Integer serialNumber; + + private String name; + + private Double price; + + public Book() { + } + + public Book(Integer serialNumber, String name, Double price) { + this.serialNumber = serialNumber; + this.name = name; + this.price = price; + } + + public Integer getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(Integer serialNumber) { + this.serialNumber = serialNumber; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/BookReference.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/BookReference.java new file mode 100644 index 000000000000..a7408cf998f8 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/BookReference.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; + +@Edge +public class BookReference { + + private Integer id; + + @EdgeFrom + private Integer fromSerialNumber; + + @EdgeTo + private Integer toSerialNumber; + + public BookReference() { + } + + public BookReference(Integer id, Integer fromSerialNumber, Integer toSerialNumber) { + this.id = id; + this.fromSerialNumber = fromSerialNumber; + this.toSerialNumber = toSerialNumber; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getFromSerialNumber() { + return fromSerialNumber; + } + + public void setFromSerialNumber(Integer fromSerialNumber) { + this.fromSerialNumber = fromSerialNumber; + } + + public Integer getToSerialNumber() { + return toSerialNumber; + } + + public void setToSerialNumber(Integer toSerialNumber) { + this.toSerialNumber = toSerialNumber; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Dependency.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Dependency.java new file mode 100644 index 000000000000..bff73dabb3bc --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Dependency.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; + +@Edge +public class Dependency { + + private String id; + + private String type; + + @EdgeFrom + private Library source; + + @EdgeTo + private Library target; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Library getSource() { + return source; + } + + public void setSource(Library source) { + this.source = source; + } + + public Library getTarget() { + return target; + } + + public void setTarget(Library target) { + this.target = target; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Group.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Group.java new file mode 100644 index 000000000000..056a0f900f0b --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Group.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import com.microsoft.spring.data.gremlin.annotation.GeneratedValue; +import org.springframework.data.annotation.Id; + +@Edge +public class Group { + + @Id + @GeneratedValue + private Long id; + + @EdgeFrom + private Student student; + + @EdgeTo + private GroupOwner groupOwner; + + public Group(Student student, GroupOwner groupOwner) { + this.student = student; + this.groupOwner = groupOwner; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Student getStudent() { + return student; + } + + public void setStudent(Student student) { + this.student = student; + } + + public GroupOwner getGroupOwner() { + return groupOwner; + } + + public void setGroupOwner(GroupOwner groupOwner) { + this.groupOwner = groupOwner; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/GroupOwner.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/GroupOwner.java new file mode 100644 index 000000000000..24d938b2519c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/GroupOwner.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import org.springframework.data.annotation.Id; + +@Vertex +public class GroupOwner { + + @Id + private String name; + + private Integer expireDays; + + public GroupOwner() { + } + + public GroupOwner(String name, Integer expireDays) { + this.name = name; + this.expireDays = expireDays; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getExpireDays() { + return expireDays; + } + + public void setExpireDays(Integer expireDays) { + this.expireDays = expireDays; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/InvalidDependency.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/InvalidDependency.java new file mode 100644 index 000000000000..e821caf608d6 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/InvalidDependency.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; + +@Edge +public class InvalidDependency { + + private String id; + + @EdgeFrom + private String name; + + @EdgeFrom + private String fromId; + + @EdgeTo + private String toId; + + public InvalidDependency() { + } + + public InvalidDependency(String id, String name, String fromId, String toId) { + this.id = id; + this.name = name; + this.fromId = fromId; + this.toId = toId; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getFromId() { + return fromId; + } + + public void setFromId(String fromId) { + this.fromId = fromId; + } + + public String getToId() { + return toId; + } + + public void setToId(String toId) { + this.toId = toId; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Library.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Library.java new file mode 100644 index 000000000000..1170bbfb1eaf --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Library.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; + +@Vertex +public class Library { + + private String id; + + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Master.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Master.java new file mode 100644 index 000000000000..cf0ec179e044 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Master.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import com.microsoft.spring.data.gremlin.common.TestConstants; + +@Vertex(label = TestConstants.VERTEX_LABEL) +public class Master { + + private Long id; + + private String name; + + public Master() { + } + + public Master(Long id, String name) { + this.id = id; + this.name = name; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Neighbor.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Neighbor.java new file mode 100644 index 000000000000..06e0f7ae945c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Neighbor.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; + +@Edge +public class Neighbor { + + private Long id; + + private Long distance; + + @EdgeFrom + private Student studentFrom; + + @EdgeTo + private Student studentTo; + + public Neighbor() { + } + + public Neighbor(Long id, Long distance, Student studentFrom, Student studentTo) { + this.id = id; + this.distance = distance; + this.studentFrom = studentFrom; + this.studentTo = studentTo; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getDistance() { + return distance; + } + + public void setDistance(Long distance) { + this.distance = distance; + } + + public Student getStudentFrom() { + return studentFrom; + } + + public void setStudentFrom(Student studentFrom) { + this.studentFrom = studentFrom; + } + + public Student getStudentTo() { + return studentTo; + } + + public void setStudentTo(Student studentTo) { + this.studentTo = studentTo; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Network.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Network.java new file mode 100644 index 000000000000..c86089b7f467 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Network.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.EdgeSet; +import com.microsoft.spring.data.gremlin.annotation.Graph; +import com.microsoft.spring.data.gremlin.annotation.VertexSet; + +import java.util.ArrayList; +import java.util.List; + +@Graph +public class Network { + + private String id; + + @VertexSet + private List vertexList; + + @EdgeSet + private List edgeList; + + public Network() { + this.vertexList = new ArrayList<>(); + this.edgeList = new ArrayList<>(); + } + + public void vertexAdd(Object object) { + this.vertexList.add(object); + } + + public void edgeAdd(Object object) { + this.edgeList.add(object); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public List getVertexList() { + return vertexList; + } + + public List getEdgeList() { + return edgeList; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Orange.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Orange.java new file mode 100644 index 000000000000..568d0ddf740e --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Orange.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.GeneratedValue; +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import org.springframework.data.annotation.Id; + +@Vertex +public class Orange { + + @Id + @GeneratedValue + private String id; + + private String location; + + private Double price; + + public Orange(String location, Double price) { + this.location = location; + this.price = price; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Person.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Person.java new file mode 100644 index 000000000000..ef37f7134819 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Person.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import com.microsoft.spring.data.gremlin.common.TestConstants; + +@Vertex(label = TestConstants.VERTEX_PERSON_LABEL) +public class Person { + + private String id; + + private String name; + + public Person() { + } + + public Person(String id, String name) { + this.id = id; + this.name = name; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Project.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Project.java new file mode 100644 index 000000000000..d3aac78f38c5 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Project.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import com.microsoft.spring.data.gremlin.common.TestConstants; + +@Vertex(label = TestConstants.VERTEX_PROJECT_LABEL) +public class Project { + + private String id; + + private String name; + + private String uri; + + public Project() { + } + + public Project(String id, String name, String uri) { + this.id = id; + this.name = name; + this.uri = uri; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUri() { + return uri; + } + + public void setUri(String uri) { + this.uri = uri; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Relationship.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Relationship.java new file mode 100644 index 000000000000..6cfac92ea069 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Relationship.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import com.microsoft.spring.data.gremlin.common.TestConstants; + +@Edge(label = TestConstants.EDGE_RELATIONSHIP_LABEL) +public class Relationship { + + private String id; + + private String name; + + private String location; + + @EdgeFrom + private Person person; + + @EdgeTo + private Project project; + + public Relationship() { + } + + public Relationship(String id, String name, String location, Person person, Project project) { + this.id = id; + this.name = name; + this.location = location; + this.person = person; + this.project = project; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public Person getPerson() { + return person; + } + + public void setPerson(Person person) { + this.person = person; + } + + public Project getProject() { + return project; + } + + public void setProject(Project project) { + this.project = project; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Roadmap.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Roadmap.java new file mode 100644 index 000000000000..09a8fcaf8a42 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Roadmap.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.EdgeSet; +import com.microsoft.spring.data.gremlin.annotation.Graph; +import com.microsoft.spring.data.gremlin.annotation.VertexSet; +import com.microsoft.spring.data.gremlin.common.TestConstants; + +import java.util.ArrayList; +import java.util.List; + +@Graph(collection = TestConstants.GRAPH_ROADMAP_COLLECTION_NAME) +public class Roadmap { + + private String id; + + @VertexSet + private List vertexList; + + @EdgeSet + private List edgeList; + + public Roadmap() { + this.vertexList = new ArrayList<>(); + this.edgeList = new ArrayList<>(); + } + + public void vertexAdd(Object object) { + this.vertexList.add(object); + } + + public void edgeAdd(Object object) { + this.edgeList.add(object); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Service.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Service.java new file mode 100644 index 000000000000..4a6659c42c93 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Service.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import org.springframework.data.annotation.Id; + +import java.util.Date; +import java.util.Map; + +@Vertex +public class Service { + + @Id + private String id; + + private int instanceCount; + + private boolean active; + + private String name; + + private ServiceType type; + + private Date createAt; + + private Map properties; + + public Service() { + } + + public Service(String id, int instanceCount, boolean active, String name, ServiceType type, Date createAt, Map properties) { + this.id = id; + this.instanceCount = instanceCount; + this.active = active; + this.name = name; + this.type = type; + this.createAt = createAt; + this.properties = properties; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public int getInstanceCount() { + return instanceCount; + } + + public void setInstanceCount(int instanceCount) { + this.instanceCount = instanceCount; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ServiceType getType() { + return type; + } + + public void setType(ServiceType type) { + this.type = type; + } + + public Date getCreateAt() { + return createAt; + } + + public void setCreateAt(Date createAt) { + this.createAt = createAt; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/ServiceType.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/ServiceType.java new file mode 100644 index 000000000000..7389c9a30ea3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/ServiceType.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +public enum ServiceType { + FRONT_END, + BACK_END, + BOTH +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/SimpleDependency.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/SimpleDependency.java new file mode 100644 index 000000000000..6f553943a037 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/SimpleDependency.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; + +@Edge +public class SimpleDependency { + + private String id; + + private String name; + + @EdgeFrom + private String fromId; + + @EdgeTo + private String toId; + + public SimpleDependency() { + } + + public SimpleDependency(String id, String name, String fromId, String toId) { + this.id = id; + this.name = name; + this.fromId = fromId; + this.toId = toId; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getFromId() { + return fromId; + } + + public void setFromId(String fromId) { + this.fromId = fromId; + } + + public String getToId() { + return toId; + } + + public void setToId(String toId) { + this.toId = toId; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Student.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Student.java new file mode 100644 index 000000000000..7222ff5cc4ce --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/Student.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import com.microsoft.spring.data.gremlin.common.TestConstants; + +@Vertex(label = TestConstants.VERTEX_LABEL) +public class Student { + + private Long id; + + private String name; + + public Student() { + } + + public Student(Long id, String name) { + this.id = id; + this.name = name; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/User.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/User.java new file mode 100644 index 000000000000..cf98a966679c --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/User.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +public class User { + + private String id; + + private String name; + + public User(String id, String name) { + this.id = id; + this.name = name; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/UserDomain.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/UserDomain.java new file mode 100644 index 000000000000..840a60785af3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/domain/UserDomain.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.domain; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import org.springframework.data.annotation.Id; + +@Vertex +public class UserDomain { + + @Id + private String name; + + private int level; + + private boolean enabled; + + public UserDomain() { + } + + public UserDomain(String name, int level, boolean enabled) { + this.name = name; + this.level = level; + this.enabled = enabled; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } + + public boolean isEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/AdvancedUserRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/AdvancedUserRepository.java new file mode 100644 index 000000000000..fa965436586f --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/AdvancedUserRepository.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.AdvancedUser; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +public interface AdvancedUserRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/BookReferenceRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/BookReferenceRepository.java new file mode 100644 index 000000000000..3088d935d199 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/BookReferenceRepository.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.BookReference; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +public interface BookReferenceRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/BookRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/BookRepository.java new file mode 100644 index 000000000000..7e7b2f51282f --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/BookRepository.java @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Book; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +import java.util.List; + +public interface BookRepository extends GremlinRepository { + + List findByNameOrPrice(String name, Double price); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/GroupOwnerRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/GroupOwnerRepository.java new file mode 100644 index 000000000000..1fe308fca9fa --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/GroupOwnerRepository.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.GroupOwner; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +public interface GroupOwnerRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/GroupRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/GroupRepository.java new file mode 100644 index 000000000000..b89a17a5df67 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/GroupRepository.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Group; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +public interface GroupRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/MasterRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/MasterRepository.java new file mode 100644 index 000000000000..e63487c99398 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/MasterRepository.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Master; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +public interface MasterRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/NeighborRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/NeighborRepository.java new file mode 100644 index 000000000000..dcbb3f4dd891 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/NeighborRepository.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Neighbor; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +public interface NeighborRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/NetworkRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/NetworkRepository.java new file mode 100644 index 000000000000..046ecbc980fa --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/NetworkRepository.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Network; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface NetworkRepository extends GremlinRepository { + + List findByEdgeList(List edgeList); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/OrangeRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/OrangeRepository.java new file mode 100644 index 000000000000..6ac9a9f509f8 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/OrangeRepository.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Orange; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +public interface OrangeRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/PersonRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/PersonRepository.java new file mode 100644 index 000000000000..ccc0a56fc58e --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/PersonRepository.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface PersonRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/ProjectRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/ProjectRepository.java new file mode 100644 index 000000000000..b5c9420a0491 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/ProjectRepository.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ProjectRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/RelationshipRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/RelationshipRepository.java new file mode 100644 index 000000000000..152d05070c83 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/RelationshipRepository.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface RelationshipRepository extends GremlinRepository { + + List findByLocation(String location); + + List findByNameAndLocation(String name, String location); + + List findByNameOrId(String name, String id); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/ServiceRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/ServiceRepository.java new file mode 100644 index 000000000000..3a02e08d22dd --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/ServiceRepository.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Service; +import com.microsoft.spring.data.gremlin.common.domain.ServiceType; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.springframework.stereotype.Repository; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Repository +public interface ServiceRepository extends GremlinRepository { + + List findByName(String name); + + List findByInstanceCount(int instanceCount); + + List findByActive(boolean isActive); + + List findByCreateAt(Date createAt); + + List findByProperties(Map properties); + + List findByNameAndInstanceCount(String name, int instanceCount); + + List findByNameOrInstanceCount(String name, int instanceCount); + + List findByNameAndInstanceCountAndType(String name, int instanceCount, ServiceType type); + + List findByNameAndActiveOrProperties(String name, boolean isActive, Map properties); + + List findByNameOrInstanceCountAndType(String name, int instanceCount, ServiceType type); + + List findByNameAndInstanceCountOrType(String name, int instanceCount, ServiceType type); + + List findByActiveExists(); + + List findByCreateAtAfter(Date expiryDate); + + List findByNameOrTypeAndInstanceCountAndCreateAtAfter(String name, ServiceType type, int instanceCount, + Date expiryDate); + + List findByCreateAtBefore(Date expiryDate); + + List findByCreateAtAfterAndCreateAtBefore(Date startDate, Date endDate); + + List findByCreateAtBetween(Date start, Date end); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/SimpleDependencyRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/SimpleDependencyRepository.java new file mode 100644 index 000000000000..a671c7c4a7c0 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/SimpleDependencyRepository.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.SimpleDependency; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +public interface SimpleDependencyRepository extends GremlinRepository { +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/StudentRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/StudentRepository.java new file mode 100644 index 000000000000..7bf167b23300 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/StudentRepository.java @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.Student; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +import java.util.List; + +public interface StudentRepository extends GremlinRepository { + + List findByName(String name); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/UserDomainRepository.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/UserDomainRepository.java new file mode 100644 index 000000000000..25d9cd6defc2 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/common/repository/UserDomainRepository.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.common.repository; + +import com.microsoft.spring.data.gremlin.common.domain.UserDomain; +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; + +import java.util.List; + +public interface UserDomainRepository extends GremlinRepository { + + List findByName(String name); + + List findByEnabledExists(); + + List findByLevelBetween(int low, int high); +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/config/AbstractGremlinConfigurationIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/config/AbstractGremlinConfigurationIT.java new file mode 100644 index 000000000000..ec003dc839dc --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/config/AbstractGremlinConfigurationIT.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.config; + +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class AbstractGremlinConfigurationIT { + + @Autowired + private TestRepositoryConfiguration testConfig; + + @Test + public void testGremlinFactory() { + Assert.assertNotNull(this.testConfig.gremlinFactory()); + } + + @Test + public void testMappingGremlinConverter() throws ClassNotFoundException { + Assert.assertNotNull(this.testConfig.mappingGremlinConverter()); + } + + @Test + public void testGremlinTemplate() throws ClassNotFoundException { + Assert.assertNotNull(this.testConfig.gremlinTemplate(testConfig.gremlinFactory())); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/config/GremlinConfigurationSupportUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/config/GremlinConfigurationSupportUnitTest.java new file mode 100644 index 000000000000..f9c3b0b11249 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/config/GremlinConfigurationSupportUnitTest.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.config; + +import com.microsoft.spring.data.gremlin.common.domain.AdvancedUser; +import com.microsoft.spring.data.gremlin.common.domain.Book; +import com.microsoft.spring.data.gremlin.common.domain.BookReference; +import com.microsoft.spring.data.gremlin.common.domain.Dependency; +import com.microsoft.spring.data.gremlin.common.domain.Group; +import com.microsoft.spring.data.gremlin.common.domain.GroupOwner; +import com.microsoft.spring.data.gremlin.common.domain.InvalidDependency; +import com.microsoft.spring.data.gremlin.common.domain.Library; +import com.microsoft.spring.data.gremlin.common.domain.Master; +import com.microsoft.spring.data.gremlin.common.domain.Neighbor; +import com.microsoft.spring.data.gremlin.common.domain.Network; +import com.microsoft.spring.data.gremlin.common.domain.Orange; +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.common.domain.Roadmap; +import com.microsoft.spring.data.gremlin.common.domain.Service; +import com.microsoft.spring.data.gremlin.common.domain.SimpleDependency; +import com.microsoft.spring.data.gremlin.common.domain.Student; +import com.microsoft.spring.data.gremlin.common.domain.UserDomain; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +public class GremlinConfigurationSupportUnitTest { + + private static final String TEST_CONFIG_PACKAGE_NAME = "com.microsoft.spring.data.gremlin.config"; + private static final String TEST_DOMAIN_PACKAGE_NAME = "com.microsoft.spring.data.gremlin.common.domain"; + private TestConfig config; + + @Before + public void setup() { + this.config = new TestConfig(); + } + + @Test + public void testGetMappingBasePackages() { + final Collection basePackages = this.config.getMappingBasePackages(); + + Assert.assertNotNull(basePackages); + Assert.assertEquals(basePackages.size(), 1); + Assert.assertEquals(basePackages.toArray()[0], TEST_CONFIG_PACKAGE_NAME); + } + + @Test + public void testGremlinMappingContext() throws ClassNotFoundException { + Assert.assertNotNull(this.config.gremlinMappingContext()); + } + + @Test + public void testScanEntity() throws ClassNotFoundException { + final Set> entities = this.config.scanEntities(TEST_DOMAIN_PACKAGE_NAME); + final Set> references = new HashSet<>(Arrays.asList( + Dependency.class, Library.class, Network.class, Person.class, Project.class, + Relationship.class, Roadmap.class, Service.class, SimpleDependency.class, InvalidDependency.class, + UserDomain.class, AdvancedUser.class, Student.class, Book.class, BookReference.class, + Neighbor.class, Master.class, Group.class, GroupOwner.class, Orange.class) + ); + + Assert.assertNotNull(entities); + Assert.assertEquals(entities.size(), references.size()); + + references.forEach(entity -> Assert.assertTrue(entities.contains(entity))); + } + + @Test + public void testScanEntityEmpty() throws ClassNotFoundException { + final Set> entities = this.config.scanEntities(""); + + Assert.assertTrue(entities.isEmpty()); + } + + private class TestConfig extends GremlinConfigurationSupport { + + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/MappingGremlinConverterUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/MappingGremlinConverterUnitTest.java new file mode 100644 index 000000000000..d1313be4e3d4 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/MappingGremlinConverterUnitTest.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.mapping.GremlinMappingContext; +import com.microsoft.spring.data.gremlin.repository.support.GremlinEntityInformation; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.context.ApplicationContext; + +@RunWith(MockitoJUnitRunner.class) +public class MappingGremlinConverterUnitTest { + + private MappingGremlinConverter converter; + private GremlinMappingContext mappingContext; + + @Mock + private ApplicationContext applicationContext; + + @Before + public void setup() { + this.mappingContext = new GremlinMappingContext(); + + this.mappingContext.setApplicationContext(this.applicationContext); + this.mappingContext.afterPropertiesSet(); + this.mappingContext.getPersistentEntity(Person.class); + + this.converter = new MappingGremlinConverter(this.mappingContext); + } + + @Test + public void testMappingGremlinConverterGetter() { + Assert.assertEquals(this.converter.getMappingContext(), this.mappingContext); + Assert.assertNotNull(this.converter.getConversionService()); + + final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + FieldUtils.getAllFields(Person.class); + + Assert.assertNotNull(this.converter.getPropertyAccessor(person)); + Assert.assertEquals(converter.getIdFieldValue(person), TestConstants.VERTEX_PERSON_ID); + } + + @Test + public void testMappingGremlinConverterVertexRead() { + final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + final GremlinEntityInformation info = new GremlinEntityInformation<>(Person.class); + final GremlinSource source = info.createGremlinSource(); + + this.converter.write(person, source); + + Assert.assertTrue(source.getId().isPresent()); + Assert.assertEquals(source.getId().get(), person.getId()); + Assert.assertEquals(source.getProperties().get(TestConstants.PROPERTY_NAME), person.getName()); + } + + @Test + public void testMappingGremlinConverterEdgeRead() { + final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + final Project project = new Project(TestConstants.VERTEX_PROJECT_ID, TestConstants.VERTEX_PROJECT_NAME, + TestConstants.VERTEX_PROJECT_URI); + final Relationship relationship = new Relationship(TestConstants.EDGE_RELATIONSHIP_ID, + TestConstants.EDGE_RELATIONSHIP_NAME, TestConstants.EDGE_RELATIONSHIP_LOCATION, person, project); + final GremlinEntityInformation info = new GremlinEntityInformation<>(Relationship.class); + final GremlinSource source = info.createGremlinSource(); + + this.converter.write(relationship, source); + + Assert.assertTrue(source.getId().isPresent()); + Assert.assertEquals(source.getId().get(), relationship.getId()); + Assert.assertEquals(source.getProperties().get(TestConstants.PROPERTY_NAME), relationship.getName()); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultUnitTest.java new file mode 100644 index 000000000000..09857da0cd7f --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/result/GremlinResultUnitTest.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.result; + +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralEdge; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralGraph; +import com.microsoft.spring.data.gremlin.conversion.script.GremlinScriptLiteralVertex; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import org.junit.Test; + +public class GremlinResultUnitTest { + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testVertexInsertException() { + new GremlinScriptLiteralVertex().generateInsertScript(new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testVertexUpdateException() { + new GremlinScriptLiteralVertex().generateUpdateScript(new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testVertexFindByIdException() { + new GremlinScriptLiteralVertex().generateFindByIdScript(new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testEdgeInsertException() { + new GremlinScriptLiteralEdge().generateInsertScript(new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testEdgeUpdateException() { + new GremlinScriptLiteralEdge().generateUpdateScript(new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testEdgeFindByIdException() { + new GremlinScriptLiteralEdge().generateFindByIdScript(new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testGraphInsertException() { + new GremlinScriptLiteralGraph().generateInsertScript(new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testGraphUpdateException() { + new GremlinScriptLiteralGraph().generateUpdateScript(new GremlinSourceVertex<>()); + } + + @Test(expected = UnsupportedOperationException.class) + public void testGraphFindByIdException() { + new GremlinScriptLiteralGraph().generateFindByIdScript(new GremlinSourceVertex<>()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/AbstractGremlinScriptLiteralUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/AbstractGremlinScriptLiteralUnitTest.java new file mode 100644 index 000000000000..06fe7d184b1f --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/AbstractGremlinScriptLiteralUnitTest.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException; +import org.junit.Test; + +public class AbstractGremlinScriptLiteralUnitTest { + + @Test(expected = GremlinInvalidEntityIdFieldException.class) + public void testEntityInvalidIdType() { + final Double id = 12.342; + GremlinScriptLiteralHelper.generateEntityWithRequiredId(id, GremlinEntityType.EDGE); + } + + @Test(expected = GremlinInvalidEntityIdFieldException.class) + public void testPropertyInvalidIdType() { + final Double id = 12.342; + GremlinScriptLiteralHelper.generatePropertyWithRequiredId(id); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralEdgeUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralEdgeUnitTest.java new file mode 100644 index 000000000000..c882ce73fd89 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralEdgeUnitTest.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinMappingContext; +import com.microsoft.spring.data.gremlin.repository.support.GremlinEntityInformation; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.context.ApplicationContext; + +import java.util.List; + +import static org.junit.Assert.assertEquals; + +@RunWith(MockitoJUnitRunner.class) +public class GremlinScriptLiteralEdgeUnitTest { + + private MappingGremlinConverter converter; + private GremlinMappingContext mappingContext; + private GremlinSource gremlinSource; + + @Mock + private ApplicationContext applicationContext; + + @Before + public void setup() { + this.mappingContext = new GremlinMappingContext(); + this.mappingContext.setApplicationContext(this.applicationContext); + this.mappingContext.afterPropertiesSet(); + this.mappingContext.getPersistentEntity(Person.class); + this.converter = new MappingGremlinConverter(this.mappingContext); + + final Relationship relationship = new Relationship("456", "rel-name", "china", + new Person("123", "bill"), // from + new Project("321", "ms-project", "http") // to + ); + final GremlinEntityInformation info = new GremlinEntityInformation<>(Relationship.class); + this.gremlinSource = info.createGremlinSource(); + this.converter.write(relationship, gremlinSource); + } + + @Test + public void testGenerateCountScript() { + final List queryList = new GremlinScriptLiteralEdge().generateCountScript(gremlinSource); + assertEquals(queryList.get(0), "g.E()"); + } + + @Test + public void testGenerateFindByIdScript() { + final List queryList = new GremlinScriptLiteralEdge().generateFindByIdScript(gremlinSource); + assertEquals(queryList.get(0), "g.E().hasId('456')"); + } + + @Test + public void testGenerateFindAllScript() { + final List queryList = new GremlinScriptLiteralEdge().generateFindAllScript(gremlinSource); + assertEquals(queryList.get(0), "g.E().has(label, 'label-relationship')" + + ".has('_classname', 'com.microsoft.spring.data.gremlin.common.domain.Relationship')"); + } + + @Test + public void testGenerateInsertScript() { + final List queryList = new GremlinScriptLiteralEdge().generateInsertScript(gremlinSource); + assertEquals(queryList.get(0), "g.V('123').as('from').V('321').as('to')" + + ".addE('label-relationship').from('from').to('to')" + + ".property(id, '456')" + + ".property('person', '{\"id\":\"123\",\"name\":\"bill\"}')" + + ".property('name', 'rel-name')" + + ".property('project', '{\"id\":\"321\",\"name\":\"ms-project\",\"uri\":\"http\"}')" + + ".property('location', 'china')" + + ".property('_classname', 'com.microsoft.spring.data.gremlin.common.domain.Relationship')"); + } + + @Test + public void testGenerateUpdateScript() { + final List queryList = new GremlinScriptLiteralEdge().generateUpdateScript(gremlinSource); + assertEquals(queryList.get(0), "g.E('456')" + + ".property('person', '{\"id\":\"123\",\"name\":\"bill\"}')" + + ".property('name', 'rel-name')" + + ".property('project', '{\"id\":\"321\",\"name\":\"ms-project\",\"uri\":\"http\"}')" + + ".property('location', 'china')" + + ".property('_classname', 'com.microsoft.spring.data.gremlin.common.domain.Relationship')"); + } + + @Test + public void testGenerateDeleteByIdScript() { + final List queryList = new GremlinScriptLiteralEdge().generateDeleteByIdScript(gremlinSource); + assertEquals(queryList.get(0), "g.E().hasId('456').drop()"); + } + + @Test + public void testGenerateDeleteAllScript() { + final List queryList = new GremlinScriptLiteralEdge().generateDeleteAllScript(); + assertEquals(queryList.get(0), "g.E().drop()"); + } + + @Test + public void testGenerateDeleteAllByClassScript() { + final List queryList = new GremlinScriptLiteralEdge().generateDeleteAllByClassScript(gremlinSource); + assertEquals(queryList.get(0), "g.E().has(label, 'label-relationship').drop()"); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testInvalidDeleteAllByClassScript() { + new GremlinScriptLiteralEdge().generateDeleteAllByClassScript(new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testInvalidFindAllScript() { + new GremlinScriptLiteralEdge().generateFindAllScript(new GremlinSourceVertex<>()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralVertexUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralVertexUnitTest.java new file mode 100644 index 000000000000..106c79682138 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptLiteralVertexUnitTest.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinMappingContext; +import com.microsoft.spring.data.gremlin.repository.support.GremlinEntityInformation; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.context.ApplicationContext; + +import java.util.List; + +import static org.junit.Assert.assertEquals; + +@RunWith(MockitoJUnitRunner.class) +public class GremlinScriptLiteralVertexUnitTest { + + private MappingGremlinConverter converter; + private GremlinMappingContext mappingContext; + private GremlinSource gremlinSource; + private GremlinScriptLiteralVertex scriptLiteralVertex; + + @Mock + private ApplicationContext applicationContext; + + @Before + public void setup() { + this.mappingContext = new GremlinMappingContext(); + this.mappingContext.setApplicationContext(this.applicationContext); + this.mappingContext.afterPropertiesSet(); + this.mappingContext.getPersistentEntity(Person.class); + this.converter = new MappingGremlinConverter(this.mappingContext); + + final Person person = new Person("123", "bill"); + final GremlinEntityInformation info = new GremlinEntityInformation<>(Person.class); + this.gremlinSource = info.createGremlinSource(); + this.scriptLiteralVertex = new GremlinScriptLiteralVertex(); + this.converter.write(person, gremlinSource); + } + + @Test + public void testGenerateCountScript() { + final List queryList = scriptLiteralVertex.generateCountScript(gremlinSource); + assertEquals(queryList.get(0), "g.V()"); + } + + @Test + public void testGenerateFindByIdScript() { + final List queryList = scriptLiteralVertex.generateFindByIdScript(gremlinSource); + assertEquals(queryList.get(0), "g.V().hasId('123')"); + } + + @Test + public void testGenerateFindAllScript() { + final List queryList = scriptLiteralVertex.generateFindAllScript(gremlinSource); + assertEquals(queryList.get(0), "g.V().has(label, 'label-person')" + + ".has('_classname', 'com.microsoft.spring.data.gremlin.common.domain.Person')"); + } + + @Test + public void testGenerateInsertScript() { + final List queryList = scriptLiteralVertex.generateInsertScript(gremlinSource); + assertEquals(queryList.get(0), "g.addV('label-person').property(id, '123').property('name', 'bill')" + + ".property('_classname', 'com.microsoft.spring.data.gremlin.common.domain.Person')"); + } + + @Test + public void testGenerateUpdateScript() { + final List queryList = scriptLiteralVertex.generateUpdateScript(gremlinSource); + assertEquals(queryList.get(0), "g.V('123').property('name', 'bill')" + + ".property('_classname', 'com.microsoft.spring.data.gremlin.common.domain.Person')"); + } + + @Test + public void testGenerateDeleteByIdScript() { + final List queryList = scriptLiteralVertex.generateDeleteByIdScript(gremlinSource); + assertEquals(queryList.get(0), "g.V().hasId('123').drop()"); + } + + @Test + public void testGenerateDeleteAllScript() { + final List queryList = scriptLiteralVertex.generateDeleteAllScript(); + assertEquals(queryList.get(0), "g.V().drop()"); + } + + @Test + public void testGenerateDeleteAllByClassScript() { + final List queryList = new GremlinScriptLiteralVertex().generateDeleteAllByClassScript(gremlinSource); + assertEquals(queryList.get(0), "g.V().has(label, 'label-person').drop()"); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testInvalidDeleteAllByClassScript() { + new GremlinScriptLiteralVertex().generateDeleteAllByClassScript(new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testInvalidFindAllScript() { + new GremlinScriptLiteralVertex().generateFindAllScript(new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testInvalidDeleteById() { + new GremlinScriptLiteralVertex().generateDeleteByIdScript(new GremlinSourceEdge<>()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptUnitTest.java new file mode 100644 index 000000000000..38017e503fe2 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/script/GremlinScriptUnitTest.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.script; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.conversion.result.GremlinResultEdgeReader; +import com.microsoft.spring.data.gremlin.conversion.result.GremlinResultVertexReader; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import org.apache.tinkerpop.gremlin.driver.Result; +import org.junit.Assert; +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; + +import static java.util.Collections.singletonList; + +public class GremlinScriptUnitTest { + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testVertexWriteException() { + new GremlinResultVertexReader().read(singletonList(new Result(new Object())), new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testEdgeReadException() { + new GremlinResultEdgeReader().read(singletonList(new Result(new Object())), new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedEntityTypeException.class) + public void testGeneratePropertyException() { + final Map properties = new HashMap<>(); + final GremlinSource source = new GremlinSourceVertex<>(); + properties.put("person", source); + GremlinScriptLiteralHelper.generateProperties(properties); + } + + @Test(expected = GremlinUnexpectedEntityTypeException.class) + public void testGenerateHasException() { + final GremlinSource source = new GremlinSourceVertex<>(); + GremlinScriptLiteralHelper.generateHas("fake-name", source); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testEdgeDeleteByIdScriptException() { + new GremlinScriptLiteralEdge().generateDeleteByIdScript(new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testGraphDeleteByIdScriptException() { + new GremlinScriptLiteralGraph().generateDeleteByIdScript(new GremlinSourceVertex<>()); + } + + @Test(expected = UnsupportedOperationException.class) + public void testGraphFindAllScriptException() { + new GremlinScriptLiteralGraph().generateFindAllScript(new GremlinSourceVertex<>()); + } + + @Test(expected = UnsupportedOperationException.class) + public void testGraphCountException() { + new GremlinScriptLiteralGraph().generateCountScript(new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testEdgeCountScriptException() { + new GremlinScriptLiteralEdge().generateCountScript(new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testVertexDeleteByIdScriptException() { + new GremlinScriptLiteralGraph().generateDeleteByIdScript(new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testVertexCountScriptException() { + new GremlinScriptLiteralVertex().generateCountScript(new GremlinSourceEdge<>()); + } + + @Test + public void testVertexSourceSetProperty() { + final GremlinSource source = new GremlinSourceVertex<>(Person.class); + final Map properties = source.getProperties(); + final String fakeName = "fake-name"; + + properties.put(fakeName, "fake-value"); + properties.put("fake-name-0", "fake-value-0"); + properties.put("fake-name-1", "fake-value-1"); + + source.setProperty(fakeName, null); + + Assert.assertEquals(source.getProperties().size(), 3); // one predefined property _classname + Assert.assertNull(source.getProperties().get(fakeName)); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceUnitTest.java new file mode 100644 index 000000000000..14b4103d14ff --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceUnitTest.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.conversion.source; + +import com.microsoft.spring.data.gremlin.annotation.EdgeFrom; +import com.microsoft.spring.data.gremlin.annotation.EdgeTo; +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.exception.GremlinEntityInformationException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedSourceTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinMappingContext; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.context.ApplicationContext; +import org.springframework.data.annotation.Persistent; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +public class GremlinSourceUnitTest { + + private MappingGremlinConverter converter; + + @Autowired + private ApplicationContext context; + + @Before + public void setup() throws ClassNotFoundException { + final GremlinMappingContext mappingContext = new GremlinMappingContext(); + + mappingContext.setInitialEntitySet(new EntityScanner(this.context).scan(Persistent.class)); + + this.converter = new MappingGremlinConverter(mappingContext); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testVertexWriteException() { + new GremlinSourceVertexWriter<>().write(new Object(), this.converter, new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testVertexReadException() { + new GremlinSourceVertexReader<>().read(Object.class, this.converter, new GremlinSourceEdge<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testEdgeWriteException() { + new GremlinSourceEdgeWriter<>().write(new Object(), this.converter, new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testEdgeReadException() { + new GremlinSourceEdgeReader<>().read(Object.class, this.converter, new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testGraphWriteException() { + new GremlinSourceGraphWriter<>().write(new Object(), this.converter, new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testGraphReadException() { + new GremlinSourceEdgeReader<>().read(Object.class, this.converter, new GremlinSourceVertex<>()); + } + + @Test(expected = GremlinUnexpectedSourceTypeException.class) + public void testGraphAddSourceException() { + new GremlinSourceGraph<>().addGremlinSource(new GremlinSourceGraph<>()); + } + + @Test(expected = GremlinEntityInformationException.class) + public void testVertexWithPredefinedProperty() { + @SuppressWarnings("unchecked") final GremlinSource source = new GremlinSourceVertex<>(TestVertex.class); + + new GremlinSourceVertexWriter().write(new TestVertex("fake-id", "fake-name"), this.converter, + source); + } + + @Test(expected = GremlinEntityInformationException.class) + public void testEdgeWithPredefinedProperty() { + @SuppressWarnings("unchecked") final GremlinSource source = new GremlinSourceEdge<>(TestEdge.class); + + new GremlinSourceEdgeWriter().write(new TestEdge("fake-id", "fake-name", "1", "2"), this.converter, source); + } + + @Vertex + private static class TestVertex { + + private String id; + + private String classname; + + TestVertex(String id, String classname) { + this.id = id; + this.classname = classname; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getClassname() { + return classname; + } + + public void setClassname(String classname) { + this.classname = classname; + } + } + + @Vertex + private static class TestEdge { + + private String id; + + private String classname; + + @EdgeFrom + private String from; + + @EdgeTo + private String to; + + TestEdge(String id, String classname, String from, String to) { + this.id = id; + this.classname = classname; + this.from = from; + this.to = to; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getClassname() { + return classname; + } + + public void setClassname(String classname) { + this.classname = classname; + } + + public String getFrom() { + return from; + } + + public void setFrom(String from) { + this.from = from; + } + + public String getTo() { + return to; + } + + public void setTo(String to) { + this.to = to; + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentEntityUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentEntityUnitTest.java new file mode 100644 index 000000000000..8b1c847b9df5 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentEntityUnitTest.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.mapping; + +import com.microsoft.spring.data.gremlin.annotation.Edge; +import com.microsoft.spring.data.gremlin.common.domain.Network; +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.annotation.Graph; +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import org.junit.Assert; +import org.junit.Test; +import org.springframework.data.util.ClassTypeInformation; + +public class BasicGremlinPersistentEntityUnitTest { + + @Test + public void testVertexPersistentEntity() { + final BasicGremlinPersistentEntity entity = + new BasicGremlinPersistentEntity<>(ClassTypeInformation.from(Person.class)); + final Vertex annotation = entity.findAnnotation(Vertex.class); + + Assert.assertEquals(entity.getType(), Person.class); + Assert.assertEquals(annotation.annotationType(), Vertex.class); + Assert.assertEquals(annotation.label(), TestConstants.VERTEX_PERSON_LABEL); + } + + @Test + public void testEdgePersistentEntity() { + final BasicGremlinPersistentEntity entity = + new BasicGremlinPersistentEntity<>(ClassTypeInformation.from(Relationship.class)); + final Edge annotation = entity.findAnnotation(Edge.class); + + Assert.assertEquals(entity.getType(), Relationship.class); + Assert.assertEquals(annotation.annotationType(), Edge.class); + Assert.assertEquals(annotation.label(), TestConstants.EDGE_RELATIONSHIP_LABEL); + } + + @Test + public void testGraphPersistentEntity() { + final BasicGremlinPersistentEntity entity = + new BasicGremlinPersistentEntity<>(ClassTypeInformation.from(Network.class)); + final Graph annotation = entity.findAnnotation(Graph.class); + + Assert.assertEquals(entity.getType(), Network.class); + Assert.assertEquals(annotation.annotationType(), Graph.class); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentPropertyUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentPropertyUnitTest.java new file mode 100644 index 000000000000..e0390bf28802 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/BasicGremlinPersistentPropertyUnitTest.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.mapping; + +import com.microsoft.spring.data.gremlin.common.domain.Network; +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import org.junit.Assert; +import org.junit.Test; +import org.springframework.data.mapping.model.Property; +import org.springframework.data.mapping.model.SimpleTypeHolder; +import org.springframework.data.util.ClassTypeInformation; +import org.springframework.util.ReflectionUtils; + +import java.lang.reflect.Field; + +public class BasicGremlinPersistentPropertyUnitTest { + + private BasicGremlinPersistentProperty createBasicGremlinPersistentProperty( + BasicGremlinPersistentEntity entity, Field field) { + return new BasicGremlinPersistentProperty(Property.of(entity.getTypeInformation(), field), entity, + SimpleTypeHolder.DEFAULT); + } + + @Test + public void testVertexPersistentProperty() { + final BasicGremlinPersistentEntity entity = + new BasicGremlinPersistentEntity<>(ClassTypeInformation.from(Person.class)); + Field field = ReflectionUtils.findField(Person.class, TestConstants.PROPERTY_ID); + BasicGremlinPersistentProperty property = this.createBasicGremlinPersistentProperty(entity, field); + + Assert.assertEquals(property.getName(), TestConstants.PROPERTY_ID); + Assert.assertTrue(property.isIdProperty()); + Assert.assertNotNull(property.createAssociation()); + + field = ReflectionUtils.findField(Person.class, TestConstants.PROPERTY_NAME); + property = this.createBasicGremlinPersistentProperty(entity, field); + + Assert.assertEquals(property.getName(), TestConstants.PROPERTY_NAME); + Assert.assertFalse(property.isIdProperty()); + Assert.assertNotNull(property.createAssociation()); + } + + @Test + public void testEdgePersistentProperty() { + final BasicGremlinPersistentEntity entity = + new BasicGremlinPersistentEntity<>(ClassTypeInformation.from(Relationship.class)); + Field field = ReflectionUtils.findField(Relationship.class, TestConstants.PROPERTY_ID); + BasicGremlinPersistentProperty property = this.createBasicGremlinPersistentProperty(entity, field); + + Assert.assertEquals(property.getName(), TestConstants.PROPERTY_ID); + Assert.assertTrue(property.isIdProperty()); + Assert.assertNotNull(property.createAssociation()); + + field = ReflectionUtils.findField(Relationship.class, TestConstants.PROPERTY_LOCATION); + property = this.createBasicGremlinPersistentProperty(entity, field); + + Assert.assertEquals(property.getName(), TestConstants.PROPERTY_LOCATION); + Assert.assertFalse(property.isIdProperty()); + Assert.assertNotNull(property.createAssociation()); + } + + @Test + public void testGraphPersistentProperty() { + final BasicGremlinPersistentEntity entity = + new BasicGremlinPersistentEntity<>(ClassTypeInformation.from(Network.class)); + final Field field = ReflectionUtils.findField(Network.class, TestConstants.PROPERTY_ID); + final BasicGremlinPersistentProperty property = this.createBasicGremlinPersistentProperty(entity, field); + + Assert.assertEquals(property.getName(), TestConstants.PROPERTY_ID); + Assert.assertTrue(property.isIdProperty()); + Assert.assertNotNull(property.createAssociation()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/GremlinMappingContextUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/GremlinMappingContextUnitTest.java new file mode 100644 index 000000000000..e8d38998faee --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/mapping/GremlinMappingContextUnitTest.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.mapping; + +import com.microsoft.spring.data.gremlin.annotation.Vertex; +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import org.junit.Assert; +import org.junit.Test; +import org.springframework.data.util.ClassTypeInformation; + +public class GremlinMappingContextUnitTest { + + @Test + public void testCreatePersistentProperty() { + final GremlinMappingContext context = new GremlinMappingContext(); + final BasicGremlinPersistentEntity entity = context.createPersistentEntity( + ClassTypeInformation.from(Project.class)); + + Assert.assertNotNull(entity); + Assert.assertNotNull(entity.findAnnotation(Vertex.class)); + Assert.assertEquals(entity.findAnnotation(Vertex.class).label(), TestConstants.VERTEX_PROJECT_LABEL); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/GremlinTemplateIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/GremlinTemplateIT.java new file mode 100644 index 000000000000..11d507c4e546 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/GremlinTemplateIT.java @@ -0,0 +1,579 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.common.GremlinConfig; +import com.microsoft.spring.data.gremlin.common.GremlinFactory; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import com.microsoft.spring.data.gremlin.common.TestGremlinProperties; +import com.microsoft.spring.data.gremlin.common.domain.InvalidDependency; +import com.microsoft.spring.data.gremlin.common.domain.Network; +import com.microsoft.spring.data.gremlin.conversion.MappingGremlinConverter; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSource; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import com.microsoft.spring.data.gremlin.exception.GremlinQueryException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import com.microsoft.spring.data.gremlin.mapping.GremlinMappingContext; +import com.microsoft.spring.data.gremlin.repository.support.GremlinEntityInformation; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.data.annotation.Persistent; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.List; + +@RunWith(SpringJUnit4ClassRunner.class) +@PropertySource(value = {"classpath:application.properties"}) +@ContextConfiguration(classes = {GremlinTemplateIT.TestConfiguration.class}) +@EnableConfigurationProperties(TestGremlinProperties.class) +public class GremlinTemplateIT { + + private final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + private final Person person0 = new Person(TestConstants.VERTEX_PERSON_0_ID, TestConstants.VERTEX_PERSON_0_NAME); + private final Person person1 = new Person(TestConstants.VERTEX_PERSON_1_ID, TestConstants.VERTEX_PERSON_1_NAME); + + private final Project project = new Project(TestConstants.VERTEX_PROJECT_ID, TestConstants.VERTEX_PROJECT_NAME, + TestConstants.VERTEX_PROJECT_URI); + private final Project project0 = new Project(TestConstants.VERTEX_PROJECT_0_ID, TestConstants.VERTEX_PROJECT_0_NAME, + TestConstants.VERTEX_PROJECT_0_URI); + + private final Relationship relationship = new Relationship(TestConstants.EDGE_RELATIONSHIP_ID, + TestConstants.EDGE_RELATIONSHIP_NAME, TestConstants.EDGE_RELATIONSHIP_LOCATION, + this.person, this.project); + private final Relationship relationship0 = new Relationship(TestConstants.EDGE_RELATIONSHIP_0_ID, + TestConstants.EDGE_RELATIONSHIP_0_NAME, TestConstants.EDGE_RELATIONSHIP_0_LOCATION, + this.person0, this.project); + private final Relationship relationship1 = new Relationship(TestConstants.EDGE_RELATIONSHIP_1_ID, + TestConstants.EDGE_RELATIONSHIP_1_NAME, TestConstants.EDGE_RELATIONSHIP_1_LOCATION, + this.person1, this.project); + private final Relationship relationship2 = new Relationship(TestConstants.EDGE_RELATIONSHIP_2_ID, + TestConstants.EDGE_RELATIONSHIP_2_NAME, TestConstants.EDGE_RELATIONSHIP_2_LOCATION, + this.person, this.project0); + + private Network network; + + private final GremlinEntityInformation personInfo = new GremlinEntityInformation<>(Person.class); + private final GremlinEntityInformation projectInfo = new GremlinEntityInformation<>(Project.class); + private final GremlinEntityInformation relationshipInfo = + new GremlinEntityInformation<>(Relationship.class); + private final GremlinEntityInformation networkInfo = new GremlinEntityInformation<>(Network.class); + + private final GremlinSource personSource = personInfo.createGremlinSource(); + private final GremlinSource projectSource = projectInfo.createGremlinSource(); + private final GremlinSource relationshipSource = relationshipInfo.createGremlinSource(); + private final GremlinSource networkSource = networkInfo.createGremlinSource(); + + @Autowired + private ApplicationContext context; + + @Autowired + private GremlinFactory gremlinFactory; + + private GremlinTemplate template; + + @Before + public void setup() throws ClassNotFoundException { + final GremlinMappingContext mappingContext = new GremlinMappingContext(); + + mappingContext.setInitialEntitySet(new EntityScanner(this.context).scan(Persistent.class)); + + final MappingGremlinConverter converter = new MappingGremlinConverter(mappingContext); + + this.template = new GremlinTemplate(gremlinFactory, converter); + this.template.deleteAll(); + this.network = new Network(); + } + + private void buildTestGraph() { + this.network.vertexAdd(this.person); + this.network.vertexAdd(this.person0); + this.network.vertexAdd(this.person1); + this.network.vertexAdd(this.project); + this.network.vertexAdd(this.project0); + + this.network.edgeAdd(this.relationship); + this.network.edgeAdd(this.relationship0); + this.network.edgeAdd(this.relationship1); + this.network.edgeAdd(this.relationship2); + + this.template.insert(this.network, this.networkSource); + } + + @After + public void cleanup() { + this.template.deleteAll(); + } + + @Test + public void testVertexDeleteAll() { + this.buildTestGraph(); + + Person personVertex = this.template.findVertexById(this.person.getId(), this.personSource); + Project projectVertex = this.template.findVertexById(this.project.getId(), this.projectSource); + Relationship relationshipEdge = this.template.findEdgeById(this.relationship.getId(), this.relationshipSource); + + Assert.assertNotNull(personVertex); + Assert.assertNotNull(projectVertex); + Assert.assertNotNull(relationshipEdge); + + this.template.deleteAll(); + + personVertex = this.template.findVertexById(this.person.getId(), this.personSource); + projectVertex = this.template.findVertexById(this.project.getId(), this.projectSource); + relationshipEdge = this.template.findEdgeById(this.relationship.getId(), this.relationshipSource); + + Assert.assertNull(personVertex); + Assert.assertNull(projectVertex); + Assert.assertNull(relationshipEdge); + + Assert.assertTrue(this.template.findAll(this.personSource).isEmpty()); + Assert.assertTrue(this.template.findAll(this.projectSource).isEmpty()); + Assert.assertTrue(this.template.findAll(this.relationshipSource).isEmpty()); + } + + @Test + public void testVertexInsertNormal() { + this.template.insert(this.person0, this.personSource); + + final Person foundPerson = this.template.findVertexById(this.person0.getId(), this.personSource); + + Assert.assertNotNull(foundPerson); + Assert.assertEquals(foundPerson.getId(), this.person0.getId()); + Assert.assertEquals(foundPerson.getName(), this.person0.getName()); + } + + @Test(expected = GremlinQueryException.class) + public void testVertexInsertException() { + this.template.insert(this.person, this.personSource); + + final Person repeated = new Person(this.person.getId(), this.person.getName()); + + this.template.insert(repeated, this.personSource); + } + + @Test + public void testEdgeInsertNormal() { + this.template.insert(this.person, this.personSource); + this.template.insert(this.project, this.projectSource); + this.template.insert(this.relationship, this.relationshipSource); + + final Relationship foundRelationship = this.template.findById(this.relationship.getId(), relationshipSource); + + Assert.assertNotNull(foundRelationship); + Assert.assertEquals(foundRelationship.getId(), this.relationship.getId()); + Assert.assertEquals(foundRelationship.getName(), this.relationship.getName()); + Assert.assertEquals(foundRelationship.getLocation(), this.relationship.getLocation()); + } + + @Test(expected = GremlinQueryException.class) + public void testEdgeInsertException() { + this.template.insert(this.person, this.personSource); + this.template.insert(this.project, this.projectSource); + this.template.insert(this.relationship, this.relationshipSource); + + final Relationship repeated = new Relationship(this.relationship.getId(), this.relationship.getName(), + this.relationship.getLocation(), this.person, this.project); + + this.template.insert(repeated, this.relationshipSource); + } + + @Test + public void testFindVertexById() { + Person foundPerson = this.template.findVertexById(this.person1.getId(), this.personSource); + Assert.assertNull(foundPerson); + + this.template.insert(this.person1, this.personSource); + + foundPerson = this.template.findVertexById(this.person1.getId(), this.personSource); + + Assert.assertNotNull(foundPerson); + Assert.assertEquals(foundPerson.getId(), this.person1.getId()); + Assert.assertEquals(foundPerson.getName(), this.person1.getName()); + } + + @Test(expected = GremlinUnexpectedEntityTypeException.class) + public void testFindVertexByIdException() { + this.template.insert(this.person, this.personSource); + this.template.insert(this.project0, this.projectSource); + this.template.insert(this.relationship2, this.relationshipSource); + + this.template.findVertexById(this.project.getId(), this.relationshipSource); + } + + @Test + public void testFindEdgeById() { + Relationship foundRelationship = this.template.findEdgeById(this.relationship2.getId(), relationshipSource); + Assert.assertNull(foundRelationship); + + this.template.insert(this.person, this.personSource); + this.template.insert(this.project0, this.projectSource); + this.template.insert(this.relationship2, this.relationshipSource); + + foundRelationship = this.template.findEdgeById(this.relationship2.getId(), this.relationshipSource); + + Assert.assertNotNull(foundRelationship); + Assert.assertEquals(foundRelationship.getId(), this.relationship2.getId()); + Assert.assertEquals(foundRelationship.getName(), this.relationship2.getName()); + Assert.assertEquals(foundRelationship.getLocation(), this.relationship2.getLocation()); + } + + @Test(expected = GremlinUnexpectedEntityTypeException.class) + public void testFindEdgeByIdException() { + this.template.insert(this.person, this.personSource); + this.template.insert(this.project0, this.projectSource); + this.template.insert(this.relationship2, this.relationshipSource); + + this.template.findEdgeById(this.relationship2.getId(), this.projectSource); + } + + @Test + public void testFindById() { + this.buildTestGraph(); + final Person foundPerson = this.template.findById(this.person1.getId(), this.personSource); + + Assert.assertNotNull(foundPerson); + Assert.assertEquals(foundPerson.getId(), this.person1.getId()); + Assert.assertEquals(foundPerson.getName(), this.person1.getName()); + + final Relationship foundRelationship = this.template.findById(this.relationship.getId(), relationshipSource); + + Assert.assertNotNull(foundRelationship); + Assert.assertEquals(foundRelationship.getId(), this.relationship.getId()); + Assert.assertEquals(foundRelationship.getName(), this.relationship.getName()); + Assert.assertEquals(foundRelationship.getLocation(), this.relationship.getLocation()); + } + + @Test(expected = UnsupportedOperationException.class) + public void testFindByIdException() { + this.template.findById(this.network.getId(), this.networkSource); + } + + @Test(expected = GremlinQueryException.class) + public void testUpdateException() { + this.personSource.setId(this.person.getId()); + this.template.update(this.person, this.personSource); + } + + @Test + public void testUpdateVertex() { + this.template.insert(this.person, this.personSource); + + final String updatedName = "updated-person-name"; + final Person updatedPerson = new Person(this.person.getId(), updatedName); + + this.template.update(updatedPerson, this.personSource); + + final Person foundPerson = this.template.findById(updatedPerson.getId(), this.personSource); + + Assert.assertNotNull(foundPerson); + Assert.assertEquals(this.person.getId(), foundPerson.getId()); + Assert.assertEquals(updatedPerson.getId(), foundPerson.getId()); + Assert.assertEquals(updatedPerson.getName(), foundPerson.getName()); + } + + @Test + public void testUpdateEdge() { + this.template.insert(this.person, this.personSource); + this.template.insert(this.project0, this.projectSource); + this.template.insert(this.relationship2, this.relationshipSource); + + final String updatedName = "updated-relation-name"; + final String updatedLocation = "updated-location"; + final Relationship updatedRelationship = new Relationship(TestConstants.EDGE_RELATIONSHIP_2_ID, + updatedName, updatedLocation, this.person, this.project0); + + this.template.update(updatedRelationship, this.relationshipSource); + + final Relationship foundRelationship = this.template.findById(updatedRelationship.getId(), relationshipSource); + + Assert.assertNotNull(foundRelationship); + Assert.assertEquals(this.relationship2.getId(), foundRelationship.getId()); + Assert.assertEquals(updatedRelationship.getId(), foundRelationship.getId()); + Assert.assertEquals(updatedRelationship.getName(), foundRelationship.getName()); + Assert.assertEquals(updatedRelationship.getLocation(), foundRelationship.getLocation()); + } + + @Test + public void testUpdateGraph() { + this.buildTestGraph(); + + final String updatedName = "update-person-name"; + final String updatedLocation = "update-location"; + final String updatedUri = "http://localhost:2222"; + + final Person person = (Person) this.network.getVertexList().get(0); + final Project project = (Project) this.network.getVertexList().get(3); + final Relationship relationship = (Relationship) this.network.getEdgeList().get(0); + + person.setName(updatedName); + project.setUri(updatedUri); + relationship.setLocation(updatedLocation); + + this.template.update(network, this.networkInfo.createGremlinSource()); + + final Person foundPerson = this.template.findById(person.getId(), this.personSource); + final Project foundProject = this.template.findById(project.getId(), this.projectSource); + final Relationship foundRelationship = this.template.findById(relationship.getId(), this.relationshipSource); + + Assert.assertNotNull(foundPerson); + Assert.assertNotNull(foundProject); + Assert.assertNotNull(foundRelationship); + + Assert.assertEquals(foundPerson.getId(), person.getId()); + Assert.assertEquals(foundPerson.getName(), person.getName()); + + Assert.assertEquals(foundProject.getId(), project.getId()); + Assert.assertEquals(foundProject.getUri(), project.getUri()); + + Assert.assertEquals(foundRelationship.getId(), relationship.getId()); + Assert.assertEquals(foundRelationship.getLocation(), relationship.getLocation()); + } + + @Test + public void testSaveVertex() { + this.personSource.setId(this.person.getId()); + this.template.save(this.person, this.personSource); + + Person foundPerson = this.template.findById(this.person.getId(), this.personSource); + + Assert.assertNotNull(foundPerson); + Assert.assertEquals(foundPerson.getId(), this.person.getId()); + Assert.assertEquals(foundPerson.getName(), this.person.getName()); + + final String updatedName = "update-person-name"; + final Person updatedPerson = new Person(this.person.getId(), updatedName); + + this.personSource.setId(updatedPerson.getId()); + this.template.save(updatedPerson, this.personSource); + + foundPerson = this.template.findById(updatedPerson.getId(), this.personSource); + + Assert.assertNotNull(foundPerson); + Assert.assertEquals(foundPerson.getId(), updatedPerson.getId()); + Assert.assertEquals(foundPerson.getName(), updatedPerson.getName()); + } + + @Test + public void testSaveEdge() { + this.template.insert(this.person, this.personSource); + this.template.insert(this.project, this.projectSource); + this.relationshipSource.setId(this.relationship.getId()); + this.template.save(this.relationship, this.relationshipSource); + + Relationship foundRelationship = this.template.findById(this.relationship.getId(), this.relationshipSource); + + Assert.assertNotNull(foundRelationship); + Assert.assertEquals(foundRelationship.getId(), this.relationship.getId()); + Assert.assertEquals(foundRelationship.getName(), this.relationship.getName()); + Assert.assertEquals(foundRelationship.getLocation(), this.relationship.getLocation()); + + final String updatedName = "updated-relation-name"; + final String updatedLocation = "updated-location"; + final Relationship updatedRelationship = new Relationship(TestConstants.EDGE_RELATIONSHIP_2_ID, + updatedName, updatedLocation, this.person, this.project); + + this.relationshipSource.setId(updatedRelationship.getId()); + this.template.save(updatedRelationship, this.relationshipSource); + + foundRelationship = this.template.findById(updatedRelationship.getId(), this.relationshipSource); + + Assert.assertNotNull(foundRelationship); + Assert.assertEquals(this.relationship2.getId(), foundRelationship.getId()); + Assert.assertEquals(updatedRelationship.getId(), foundRelationship.getId()); + Assert.assertEquals(updatedRelationship.getName(), foundRelationship.getName()); + Assert.assertEquals(updatedRelationship.getLocation(), foundRelationship.getLocation()); + } + + @Test + public void testSaveGraph() { + this.network.vertexAdd(this.person); + this.network.vertexAdd(this.project); + this.network.edgeAdd(this.relationship); + + this.template.save(network, this.networkSource); + + final Person personFound = this.template.findById(this.person.getId(), this.personSource); + + Assert.assertNotNull(personFound); + Assert.assertEquals(personFound.getId(), this.person.getId()); + + Relationship relationshipFound = this.template.findById(this.relationship.getId(), this.relationshipSource); + + Assert.assertNotNull(relationshipFound); + Assert.assertEquals(relationshipFound.getId(), this.relationship.getId()); + + final String updatedName = "updated-name"; + this.relationship.setName(updatedName); + + this.template.save(network, this.networkInfo.createGremlinSource()); + + relationshipFound = this.template.findById(this.relationship.getId(), this.relationshipSource); + + Assert.assertNotNull(relationshipFound); + Assert.assertEquals(relationshipFound.getId(), this.relationship.getId()); + Assert.assertEquals(relationshipFound.getName(), updatedName); + } + + @Test + public void testFindAllVertex() { + List personList = this.template.findAll(this.personSource); + + Assert.assertTrue(personList.isEmpty()); + + final List personCollection = Arrays.asList(this.person, this.person0, this.person1); + personCollection.forEach(person -> this.template.insert(person, this.personSource)); + + personList = this.template.findAll(this.personSource); + + Assert.assertFalse(personList.isEmpty()); + Assert.assertEquals(personList.size(), personCollection.size()); + + personList.sort((a, b) -> (a.getId().compareTo(b.getId()))); + personCollection.sort((a, b) -> (a.getId().compareTo(b.getId()))); + + Assert.assertArrayEquals(personList.toArray(), personCollection.toArray()); + } + + @Test + public void testFindAllEdge() { + this.template.insert(this.person, this.personSource); + this.template.insert(this.person0, this.personSource); + this.template.insert(this.person1, this.personSource); + this.template.insert(this.project, this.projectSource); + this.template.insert(this.project0, this.projectSource); + + List relationshipList = this.template.findAll(this.relationshipSource); + + Assert.assertTrue(relationshipList.isEmpty()); + + final List relationshipCollection = Arrays.asList(this.relationship, this.relationship0, + this.relationship1, this.relationship2); + relationshipCollection.forEach(relationship -> this.template.insert(relationship, this.relationshipSource)); + + relationshipList = this.template.findAll(this.relationshipSource); + + Assert.assertFalse(relationshipList.isEmpty()); + Assert.assertEquals(relationshipList.size(), relationshipCollection.size()); + + relationshipList.sort((a, b) -> (a.getId().compareTo(b.getId()))); + relationshipCollection.sort((a, b) -> (a.getId().compareTo(b.getId()))); + + Assert.assertArrayEquals(relationshipList.toArray(), relationshipCollection.toArray()); + } + + @Test + public void testVertexDeleteById() { + this.template.deleteById(this.person.getId(), this.personSource); + this.template.insert(this.person, this.personSource); + this.template.deleteById(this.person0.getId(), this.personSource); + + Person foundPerson = this.template.findById(this.person.getId(), this.personSource); + Assert.assertNotNull(foundPerson); + + this.template.deleteById(this.person.getId(), this.personSource); + + foundPerson = this.template.findById(this.person.getId(), this.personSource); + Assert.assertNull(foundPerson); + } + + @Test + public void testEdgeDeleteById() { + this.template.deleteById(this.relationship.getId(), this.relationshipSource); + + this.template.insert(this.person, this.personSource); + this.template.insert(this.project, this.projectSource); + this.template.insert(this.relationship, this.relationshipSource); + + this.template.deleteById(this.relationship0.getId(), this.relationshipSource); + + Relationship foundRelationship = this.template.findById(this.relationship.getId(), this.relationshipSource); + Assert.assertNotNull(foundRelationship); + + this.template.deleteById(this.relationship.getId(), this.relationshipSource); + + foundRelationship = this.template.findById(this.relationship.getId(), this.relationshipSource); + Assert.assertNull(foundRelationship); + } + + @Test + public void testGraphDeleteById() { + this.network.setId("fake-id"); + this.template.deleteById(this.network.getId(), this.relationshipSource); + + final Relationship foundRelationship = this.template.findById(this.relationship.getId(), relationshipSource); + Assert.assertNull(foundRelationship); + + final Person foundPerson = this.template.findById(this.person.getId(), this.personSource); + Assert.assertNull(foundPerson); + } + + @Test + public void testIsEmptyGraph() { + Assert.assertTrue(this.template.isEmptyGraph(this.networkSource)); + + this.network.vertexAdd(this.person); + this.network.vertexAdd(this.project); + this.network.edgeAdd(this.relationship); + this.template.insert(this.network, this.networkSource); + + Assert.assertFalse(this.template.isEmptyGraph(this.networkSource)); + } + + @Test(expected = GremlinQueryException.class) + public void testIsEmptyGraphException() { + this.template.isEmptyGraph(this.relationshipSource); + } + + @Test(expected = UnsupportedOperationException.class) + public void testInvalidDependencySaveException() { + final InvalidDependency dependency = new InvalidDependency(this.relationship.getId(), + this.relationship.getName(), this.person.getId(), this.project.getId()); + final GremlinSource source = new GremlinSourceGraph<>(InvalidDependency.class); + + this.personSource.setId(this.person.getId()); + this.template.save(this.person, this.personSource); + this.projectSource.setId(this.project.getId()); + this.template.save(this.project, this.projectSource); + this.relationshipSource.setId(this.relationship.getId()); + this.template.save(this.relationship, this.relationshipSource); + + this.template.findById(dependency.getId(), source); + } + + @Configuration + static class TestConfiguration { + + @Autowired + private TestGremlinProperties properties; + + @Bean + public GremlinFactory getGremlinFactory() { + return new GremlinFactory(getGremlinConfig()); + } + + @Bean + public GremlinConfig getGremlinConfig() { + return GremlinConfig.builder(properties.getEndpoint(), properties.getUsername(), properties.getPassword()) + .sslEnabled(properties.isSslEnabled()) + .port(properties.getPort()) + .build(); + } + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/SimpleGremlinEntityMetadataUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/SimpleGremlinEntityMetadataUnitTest.java new file mode 100644 index 000000000000..d6a96722103a --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/SimpleGremlinEntityMetadataUnitTest.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import org.junit.Assert; +import org.junit.Test; + +public class SimpleGremlinEntityMetadataUnitTest { + + @Test + public void testSimpleGremlinEntityMetadata() { + final SimpleGremlinEntityMetadata metadata = new SimpleGremlinEntityMetadata<>(Person.class); + + Assert.assertNotNull(metadata); + Assert.assertEquals(metadata.getJavaType(), Person.class); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/criteria/CriteriaUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/criteria/CriteriaUnitTest.java new file mode 100644 index 000000000000..cdb4df9f82e0 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/criteria/CriteriaUnitTest.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.criteria; + +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +import static com.microsoft.spring.data.gremlin.query.criteria.CriteriaType.IS_EQUAL; +import static com.microsoft.spring.data.gremlin.query.criteria.CriteriaType.OR; + +public class CriteriaUnitTest { + + @Test(expected = IllegalArgumentException.class) + public void testGetUnaryInstanceException() { + final List values = new ArrayList<>(); + + Criteria.getUnaryInstance(OR, "fake-name", values); + } + + @Test(expected = IllegalArgumentException.class) + public void testGetBinaryInstanceException() { + final List values = new ArrayList<>(); + final Criteria left = Criteria.getUnaryInstance(IS_EQUAL, "fake-name", values); + final Criteria right = Criteria.getUnaryInstance(IS_EQUAL, "fake-name", values); + + Criteria.getBinaryInstance(IS_EQUAL, left, right); + } + + @Test(expected = UnsupportedOperationException.class) + public void testCriteriaTypeToGremlinException() { + CriteriaType.criteriaTypeToGremlin(IS_EQUAL); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/parameter/GremlinParameterUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/parameter/GremlinParameterUnitTest.java new file mode 100644 index 000000000000..a871132248f9 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/query/parameter/GremlinParameterUnitTest.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.query.parameter; + +import com.microsoft.spring.data.gremlin.query.paramerter.GremlinParameter; +import com.microsoft.spring.data.gremlin.query.paramerter.GremlinParameters; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.springframework.core.MethodParameter; +import org.springframework.lang.NonNull; + +import java.lang.reflect.Method; + +public class GremlinParameterUnitTest { + + private Method method; + private MethodParameter methodParameter; + + public String handle(@NonNull String name) { + return "handle: " + name; + } + + @Before + public void setup() throws NoSuchMethodException { + method = this.getClass().getMethod("handle", String.class); + methodParameter = new MethodParameter(this.getClass().getMethod("handle", String.class), 0); + } + + @Test + public void testGremlinParameter() { + final GremlinParameter parameter = new GremlinParameter(this.methodParameter); + + Assert.assertNotNull(parameter); + Assert.assertEquals(parameter.getType(), String.class); + Assert.assertEquals(parameter.getIndex(), 0); + } + + @Test + public void testGremlinParameters() { + final GremlinParameters gremlinParameters = new GremlinParameters(this.method); + + Assert.assertNotNull(gremlinParameters); + Assert.assertEquals(gremlinParameters.getNumberOfParameters(), 1); + Assert.assertNotNull(gremlinParameters.getParameter(0)); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/AdvancedUserRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/AdvancedUserRepositoryIT.java new file mode 100644 index 000000000000..b0ec0a3c9d6b --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/AdvancedUserRepositoryIT.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.AdvancedUser; +import com.microsoft.spring.data.gremlin.common.repository.AdvancedUserRepository; +import org.assertj.core.util.Lists; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class AdvancedUserRepositoryIT { + + private static final String ID_0 = "id-8000"; + private static final String ID_1 = "id-8001"; + + private static final String NAME_0 = "name-9000"; + private static final String NAME_1 = "name-9001"; + + private static final int LEVEL_0 = 4; + private static final int LEVEL_1 = 38; + + private static final AdvancedUser USER_0 = new AdvancedUser(ID_0, NAME_0, LEVEL_0); + private static final AdvancedUser USER_1 = new AdvancedUser(ID_1, NAME_1, LEVEL_1); + + @Autowired + private AdvancedUserRepository repository; + + @Before + public void setup() { + this.repository.deleteAll(); + } + + @Test + public void testCrudRepository() { + final List users = Arrays.asList(USER_0, USER_1); + this.repository.saveAll(users); + + final Optional optional = this.repository.findById(USER_0.getId()); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(USER_0.getId(), optional.get().getId()); + Assert.assertEquals(USER_0.getName(), optional.get().getName()); + Assert.assertEquals(USER_0.getLevel(), optional.get().getLevel()); + + final List foundUsers = Lists.newArrayList(this.repository.findAll(AdvancedUser.class)); + Assert.assertEquals(foundUsers.size(), users.size()); + + this.repository.deleteById(USER_0.getId()); + + Assert.assertFalse(this.repository.findById(USER_0.getId()).isPresent()); + Assert.assertTrue(this.repository.findById(USER_1.getId()).isPresent()); + + this.repository.deleteAll(); + + Assert.assertFalse(this.repository.findById(USER_1.getId()).isPresent()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/BookReferenceRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/BookReferenceRepositoryIT.java new file mode 100644 index 000000000000..842540906ed3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/BookReferenceRepositoryIT.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Book; +import com.microsoft.spring.data.gremlin.common.domain.BookReference; +import com.microsoft.spring.data.gremlin.common.repository.BookReferenceRepository; +import com.microsoft.spring.data.gremlin.common.repository.BookRepository; +import org.assertj.core.util.Lists; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.lang.NonNull; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class BookReferenceRepositoryIT { + + private static final Integer BOOK_ID_0 = 0; + private static final Integer BOOK_ID_1 = 1; + private static final Integer BOOK_ID_2 = 2; + private static final Integer BOOK_REFERENCE_ID_0 = 3; + private static final Integer BOOK_REFERENCE_ID_1 = 4; + private static final Integer NO_EXIST_ID = -1; + + private static final String NAME_0 = "name-0"; + private static final String NAME_1 = "name-1"; + private static final String NAME_2 = "name-2"; + + private static final Double PRINCE_0 = 3.4; + private static final Double PRINCE_1 = 72.0; + private static final Double PRINCE_2 = 102.82; + + private static final Book BOOK_0 = new Book(BOOK_ID_0, NAME_0, PRINCE_0); + private static final Book BOOK_1 = new Book(BOOK_ID_1, NAME_1, PRINCE_1); + private static final Book BOOK_2 = new Book(BOOK_ID_2, NAME_2, PRINCE_2); + + private static final BookReference BOOK_REFERENCE_0 = new BookReference(BOOK_REFERENCE_ID_0, BOOK_ID_0, BOOK_ID_2); + private static final BookReference BOOK_REFERENCE_1 = new BookReference(BOOK_REFERENCE_ID_1, BOOK_ID_1, BOOK_ID_2); + + private static final List BOOKS = Arrays.asList(BOOK_0, BOOK_1, BOOK_2); + private static final List BOOK_REFERENCES = Arrays.asList(BOOK_REFERENCE_0, BOOK_REFERENCE_1); + + @Autowired + private BookReferenceRepository referenceRepository; + + @Autowired + private BookRepository bookRepository; + + @Before + public void setup() { + this.referenceRepository.deleteAll(); + this.bookRepository.deleteAll(); + } + + private void assertDomainListEquals(@NonNull List found, @NonNull List expected) { + found.sort(Comparator.comparing(BookReference::getId)); + expected.sort(Comparator.comparing(BookReference::getId)); + + Assert.assertEquals(found.size(), expected.size()); + Assert.assertEquals(found, expected); + } + + @Test + public void testDeleteAll() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + Assert.assertTrue(referenceRepository.findAll().iterator().hasNext()); + + referenceRepository.deleteAll(); + + Assert.assertFalse(referenceRepository.findAll().iterator().hasNext()); + } + + @Test + public void testDeleteAllOnType() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + Assert.assertTrue(referenceRepository.findAll().iterator().hasNext()); + + referenceRepository.deleteAll(GremlinEntityType.EDGE); + + Assert.assertFalse(referenceRepository.findAll().iterator().hasNext()); + } + + @Test + public void testDeleteAllOnDomain() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + Assert.assertTrue(referenceRepository.findAll().iterator().hasNext()); + + referenceRepository.deleteAll(BookReference.class); + + Assert.assertFalse(referenceRepository.findAll().iterator().hasNext()); + } + + @Test + public void testSave() { + bookRepository.saveAll(BOOKS); + referenceRepository.save(BOOK_REFERENCE_0); + + Assert.assertTrue(referenceRepository.findById(BOOK_REFERENCE_0.getId()).isPresent()); + Assert.assertFalse(referenceRepository.findById(BOOK_REFERENCE_1.getId()).isPresent()); + } + + @Test + public void testSaveAll() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + final List found = Lists.newArrayList(referenceRepository.findAll()); + + assertDomainListEquals(found, BOOK_REFERENCES); + } + + @Test + public void testFindById() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + Optional optional = referenceRepository.findById(BOOK_REFERENCE_0.getId()); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(optional.get(), BOOK_REFERENCE_0); + + optional = referenceRepository.findById(NO_EXIST_ID); + + Assert.assertFalse(optional.isPresent()); + } + + @Test + public void testExistsById() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + Assert.assertTrue(referenceRepository.existsById(BOOK_REFERENCE_0.getId())); + Assert.assertFalse(referenceRepository.existsById(NO_EXIST_ID)); + } + + @Test + public void testFindAllById() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + final List ids = Arrays.asList(BOOK_REFERENCE_0.getId(), BOOK_REFERENCE_1.getId()); + final List found = Lists.newArrayList(referenceRepository.findAllById(ids)); + + assertDomainListEquals(found, BOOK_REFERENCES); + + Assert.assertFalse(referenceRepository.findAllById(Collections.singleton(NO_EXIST_ID)).iterator().hasNext()); + } + + @Test + public void testCount() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + Assert.assertEquals(referenceRepository.count(), BOOK_REFERENCES.size() + BOOKS.size()); + + referenceRepository.deleteAll(); + + Assert.assertEquals(referenceRepository.count(), 0); + } + + @Test + public void testDeleteById() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + Assert.assertTrue(referenceRepository.findById(BOOK_REFERENCE_0.getId()).isPresent()); + + referenceRepository.deleteById(BOOK_REFERENCE_0.getId()); + + Assert.assertFalse(referenceRepository.findById(BOOK_REFERENCE_0.getId()).isPresent()); + } + + @Test + public void testEdgeCount() { + bookRepository.saveAll(BOOKS); + referenceRepository.saveAll(BOOK_REFERENCES); + + Assert.assertEquals(referenceRepository.edgeCount(), BOOK_REFERENCES.size()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/BookRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/BookRepositoryIT.java new file mode 100644 index 000000000000..823d1041fd33 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/BookRepositoryIT.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Book; +import com.microsoft.spring.data.gremlin.common.repository.BookRepository; +import org.assertj.core.util.Lists; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.lang.NonNull; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class BookRepositoryIT { + + private static final Integer ID_0 = 0; + private static final Integer ID_1 = 1; + private static final Integer ID_2 = 2; + private static final Integer NO_EXIST_ID = -1; + + private static final String NAME_0 = "name-0"; + private static final String NAME_1 = "name-1"; + private static final String NAME_2 = "name-2"; + private static final String NO_EXIST_NAME = "no-exist-name"; + + private static final Double PRINCE_0 = 3.4; + private static final Double PRINCE_1 = 72.0; + private static final Double PRINCE_2 = 102.82; + private static final Double NO_EXIST_PRICE = -144.23; + + private static final Book BOOK_0 = new Book(ID_0, NAME_0, PRINCE_0); + private static final Book BOOK_1 = new Book(ID_1, NAME_1, PRINCE_1); + private static final Book BOOK_2 = new Book(ID_2, NAME_2, PRINCE_2); + + private static final List BOOKS = Arrays.asList(BOOK_0, BOOK_1, BOOK_2); + + @Autowired + private BookRepository repository; + + @Before + public void setup() { + this.repository.deleteAll(); + } + + private void assertDomainListEquals(@NonNull List found, @NonNull List expected) { + found.sort(Comparator.comparing(Book::getSerialNumber)); + expected.sort(Comparator.comparing(Book::getSerialNumber)); + + Assert.assertEquals(found.size(), expected.size()); + Assert.assertEquals(found, expected); + } + + @Test + public void testDeleteAll() { + repository.saveAll(BOOKS); + + Assert.assertTrue(repository.findAll().iterator().hasNext()); + + repository.deleteAll(); + + Assert.assertFalse(repository.findAll().iterator().hasNext()); + } + + @Test + public void testDeleteAllOnType() { + repository.saveAll(BOOKS); + + Assert.assertTrue(repository.findAll().iterator().hasNext()); + + repository.deleteAll(GremlinEntityType.VERTEX); + + Assert.assertFalse(repository.findAll().iterator().hasNext()); + } + + @Test + public void testDeleteAllOnDomain() { + repository.saveAll(BOOKS); + + Assert.assertTrue(repository.findAll().iterator().hasNext()); + + repository.deleteAll(Book.class); + + Assert.assertFalse(repository.findAll().iterator().hasNext()); + } + + @Test + public void testSave() { + repository.save(BOOK_0); + + Assert.assertTrue(repository.findById(BOOK_0.getSerialNumber()).isPresent()); + Assert.assertFalse(repository.findById(BOOK_1.getSerialNumber()).isPresent()); + } + + @Test + public void testSaveAll() { + repository.saveAll(BOOKS); + + final List found = Lists.newArrayList(repository.findAll()); + + assertDomainListEquals(found, BOOKS); + } + + @Test + public void testFindById() { + repository.saveAll(BOOKS); + + Optional optional = repository.findById(BOOK_0.getSerialNumber()); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(optional.get(), BOOK_0); + + optional = repository.findById(NO_EXIST_ID); + + Assert.assertFalse(optional.isPresent()); + } + + @Test + public void testExistsById() { + repository.saveAll(BOOKS); + + Assert.assertTrue(repository.existsById(BOOK_0.getSerialNumber())); + Assert.assertFalse(repository.existsById(NO_EXIST_ID)); + } + + @Test + public void testFindAllById() { + final List expected = Arrays.asList(BOOK_0, BOOK_1); + final List ids = Arrays.asList(BOOK_0.getSerialNumber(), BOOK_1.getSerialNumber(), NO_EXIST_ID); + + repository.saveAll(BOOKS); + + final List found = Lists.newArrayList(repository.findAllById(ids)); + + assertDomainListEquals(found, expected); + + Assert.assertFalse(repository.findAllById(Collections.singleton(NO_EXIST_ID)).iterator().hasNext()); + } + + @Test + public void testCount() { + repository.saveAll(BOOKS); + + Assert.assertEquals(repository.count(), BOOKS.size()); + + repository.deleteAll(); + + Assert.assertEquals(repository.count(), 0); + } + + @Test + public void testDeleteById() { + repository.saveAll(BOOKS); + + Assert.assertTrue(repository.findById(BOOK_0.getSerialNumber()).isPresent()); + + repository.deleteById(BOOK_0.getSerialNumber()); + + Assert.assertFalse(repository.findById(BOOK_0.getSerialNumber()).isPresent()); + } + + @Test + public void testVertexCount() { + repository.saveAll(BOOKS); + + Assert.assertEquals(repository.vertexCount(), BOOKS.size()); + } + + @Test + public void testEdgeCount() { + repository.saveAll(BOOKS); + + Assert.assertEquals(repository.edgeCount(), 0); + } + + @Test + public void testFindByNameOrPrince() { + repository.saveAll(BOOKS); + + List found = repository.findByNameOrPrice(BOOK_0.getName(), BOOK_1.getPrice()); + + assertDomainListEquals(found, Arrays.asList(BOOK_0, BOOK_1)); + + found = repository.findByNameOrPrice(NO_EXIST_NAME, NO_EXIST_PRICE); + + Assert.assertTrue(found.isEmpty()); + } + + @Test + public void testFindAllIncomplete() { + final Book book = new Book(ID_0, null, 2.34); + final Book bookNullName = new Book(ID_1, "null", 243.34); + + repository.save(book); + repository.save(bookNullName); + + final Optional optional = repository.findById(book.getSerialNumber()); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(optional.get(), book); + + final Optional optionalNullName = repository.findById(bookNullName.getSerialNumber()); + + Assert.assertTrue(optionalNullName.isPresent()); + Assert.assertEquals(optionalNullName.get(), bookNullName); + + final List books = Lists.newArrayList(repository.findAll()); + + assertDomainListEquals(books, Arrays.asList(book, bookNullName)); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/GroupRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/GroupRepositoryIT.java new file mode 100644 index 000000000000..a2df718d94e7 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/GroupRepositoryIT.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Group; +import com.microsoft.spring.data.gremlin.common.domain.GroupOwner; +import com.microsoft.spring.data.gremlin.common.domain.Student; +import com.microsoft.spring.data.gremlin.common.repository.GroupOwnerRepository; +import com.microsoft.spring.data.gremlin.common.repository.GroupRepository; +import com.microsoft.spring.data.gremlin.common.repository.StudentRepository; +import com.microsoft.spring.data.gremlin.common.TestUtils; +import org.assertj.core.util.Lists; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class GroupRepositoryIT { + + private static final Long STUDENT_ID_0 = 1111L; + private static final Long STUDENT_ID_1 = 1234L; + private static final Long STUDENT_ID_2 = 2345L; + private static final Long STUDENT_ID_3 = 4823L; + + private static final String STUDENT_NAME_0 = "student-0"; + private static final String STUDENT_NAME_1 = "student-1"; + private static final String STUDENT_NAME_2 = "student-2"; + private static final String STUDENT_NAME_3 = "student-3"; + + private static final String GROUP_OWNER_ID_0 = "owner-0"; + private static final String GROUP_OWNER_ID_1 = "owner-1"; + + private static final Integer GROUP_OWNER_EXPIRE_DAYS_0 = 90; + private static final Integer GROUP_OWNER_EXPIRE_DAYS_1 = 120; + + private static final Student STUDENT_0 = new Student(STUDENT_ID_0, STUDENT_NAME_0); + private static final Student STUDENT_1 = new Student(STUDENT_ID_1, STUDENT_NAME_1); + private static final Student STUDENT_2 = new Student(STUDENT_ID_2, STUDENT_NAME_2); + private static final Student STUDENT_3 = new Student(STUDENT_ID_3, STUDENT_NAME_3); + + private static final GroupOwner GROUP_OWNER_0 = new GroupOwner(GROUP_OWNER_ID_0, GROUP_OWNER_EXPIRE_DAYS_0); + private static final GroupOwner GROUP_OWNER_1 = new GroupOwner(GROUP_OWNER_ID_1, GROUP_OWNER_EXPIRE_DAYS_1); + + private static final Group GROUP_0 = new Group(STUDENT_0, GROUP_OWNER_0); + private static final Group GROUP_1 = new Group(STUDENT_1, GROUP_OWNER_0); + private static final Group GROUP_2 = new Group(STUDENT_2, GROUP_OWNER_0); + private static final Group GROUP_3 = new Group(STUDENT_3, GROUP_OWNER_0); + private static final Group GROUP_4 = new Group(STUDENT_0, GROUP_OWNER_1); + private static final Group GROUP_5 = new Group(STUDENT_1, GROUP_OWNER_1); + + private static final List STUDENTS = Arrays.asList(STUDENT_0, STUDENT_1, STUDENT_2, STUDENT_3); + private static final List GROUP_OWNERS = Arrays.asList(GROUP_OWNER_0, GROUP_OWNER_1); + private static final List GROUPS = Arrays.asList(GROUP_0, GROUP_1, GROUP_2, GROUP_3, GROUP_4, GROUP_5); + + @Autowired + private GroupRepository groupRepository; + + @Autowired + private GroupOwnerRepository groupOwnerRepository; + + @Autowired + private StudentRepository studentRepository; + + @Before + public void setup() { + this.groupOwnerRepository.deleteAll(); + this.studentRepository.deleteAll(); + this.groupRepository.deleteAll(); + + this.studentRepository.saveAll(STUDENTS); + this.groupOwnerRepository.saveAll(GROUP_OWNERS); + } + + @After + public void cleanup() { + this.groupOwnerRepository.deleteAll(); + this.studentRepository.deleteAll(); + this.groupRepository.deleteAll(); + } + + @Test + public void testGeneratedIdFindById() { + final Group expect = this.groupRepository.save(GROUP_0); + + Assert.assertNotNull(expect.getId()); + + final Optional optional = this.groupRepository.findById(expect.getId()); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(expect, optional.get()); + } + + @Test + public void testGeneratedIdFindAll() { + final List expect = Lists.newArrayList(this.groupRepository.saveAll(GROUPS)); + final List actual = Lists.newArrayList(this.groupRepository.findAll()); + + TestUtils.assertEntitiesEquals(expect, actual); + } + + @Test + public void testGeneratedIdDeleteById() { + final Group group = this.groupRepository.save(GROUP_0); + + this.groupRepository.deleteById(group.getId()); + + Assert.assertFalse(this.groupRepository.findById(group.getId()).isPresent()); + Assert.assertFalse(this.groupRepository.existsById(group.getId())); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/MasterRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/MasterRepositoryIT.java new file mode 100644 index 000000000000..270756cf165d --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/MasterRepositoryIT.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Master; +import com.microsoft.spring.data.gremlin.common.domain.Student; +import com.microsoft.spring.data.gremlin.common.repository.MasterRepository; +import com.microsoft.spring.data.gremlin.common.repository.StudentRepository; +import org.assertj.core.util.Lists; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.List; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class MasterRepositoryIT { + + private static final Long ID_STUDENT = 1L; + private static final Long ID_MASTER = 2L; + + private static final String NAME = "name"; + + private static final Student STUDENT = new Student(ID_STUDENT, NAME); + + private static final Master MASTER = new Master(ID_MASTER, NAME); + + @Autowired + private MasterRepository masterRepository; + + @Autowired + private StudentRepository studentRepository; + + @Before + public void setup() { + this.masterRepository.deleteAll(); + this.studentRepository.deleteAll(); + } + + @After + public void cleanup() { + this.masterRepository.deleteAll(); + this.studentRepository.deleteAll(); + } + + @Test + public void testDuplicatedLabelFindAll() { + this.studentRepository.save(STUDENT); + this.masterRepository.save(MASTER); + + final List masters = Lists.newArrayList(this.masterRepository.findAll(Master.class)); + + Assert.assertEquals(masters.size(), 1); + Assert.assertEquals(masters.get(0), MASTER); + + final List students = Lists.newArrayList(this.studentRepository.findAll(Student.class)); + + Assert.assertEquals(students.size(), 1); + Assert.assertEquals(students.get(0), STUDENT); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/NeighborRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/NeighborRepositoryIT.java new file mode 100644 index 000000000000..2ad6ba57ea13 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/NeighborRepositoryIT.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Neighbor; +import com.microsoft.spring.data.gremlin.common.domain.Student; +import com.microsoft.spring.data.gremlin.common.repository.NeighborRepository; +import com.microsoft.spring.data.gremlin.common.repository.StudentRepository; +import org.assertj.core.util.Lists; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.lang.NonNull; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class NeighborRepositoryIT { + + private static final Long STUDENT_ID_0 = 12349274637234L; + private static final Long STUDENT_ID_1 = 1L; + private static final Long STUDENT_ID_2 = 2L; + private static final Long DISTANCE_0 = 1234L; + private static final Long DISTANCE_1 = 3422L; + private static final Long NEIGHBOR_ID_0 = 3L; + private static final Long NEIGHBOR_ID_1 = 4L; + private static final Long NO_EXIST_ID = -1L; + + private static final String NAME_0 = "name-0"; + private static final String NAME_1 = "name-1"; + private static final String NAME_2 = "name-2"; + + private static final Student STUDENT_0 = new Student(STUDENT_ID_0, NAME_0); + private static final Student STUDENT_1 = new Student(STUDENT_ID_1, NAME_1); + private static final Student STUDENT_2 = new Student(STUDENT_ID_2, NAME_2); + + private static final Neighbor NEIGHBOR_0 = new Neighbor(NEIGHBOR_ID_0, DISTANCE_0, STUDENT_0, STUDENT_1); + private static final Neighbor NEIGHBOR_1 = new Neighbor(NEIGHBOR_ID_1, DISTANCE_1, STUDENT_2, STUDENT_1); + + private static final List STUDENTS = Arrays.asList(STUDENT_0, STUDENT_1, STUDENT_2); + private static final List NEIGHBORS = Arrays.asList(NEIGHBOR_0, NEIGHBOR_1); + + @Autowired + private StudentRepository studentRepository; + + @Autowired + private NeighborRepository neighborRepository; + + @Before + public void setup() { + this.studentRepository.deleteAll(); + this.neighborRepository.deleteAll(); + } + + private void assertDomainListEquals(@NonNull List found, @NonNull List expected) { + found.sort(Comparator.comparing(Neighbor::getId)); + expected.sort(Comparator.comparing(Neighbor::getId)); + + Assert.assertEquals(found.size(), expected.size()); + Assert.assertEquals(found, expected); + } + + @Test + public void testDeleteAll() { + neighborRepository.deleteAll(); + + Assert.assertFalse(neighborRepository.findAll().iterator().hasNext()); + + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + Assert.assertTrue(neighborRepository.findAll().iterator().hasNext()); + } + + @Test + public void testDeleteAllOnType() { + neighborRepository.deleteAll(GremlinEntityType.EDGE); + + Assert.assertFalse(neighborRepository.findAll().iterator().hasNext()); + + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + Assert.assertTrue(neighborRepository.findAll().iterator().hasNext()); + } + + @Test + public void testDeleteAllOnDomain() { + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + Assert.assertTrue(neighborRepository.findAll().iterator().hasNext()); + + neighborRepository.deleteAll(Neighbor.class); + + Assert.assertFalse(neighborRepository.findAll().iterator().hasNext()); + } + + @Test + public void testSave() { + studentRepository.saveAll(STUDENTS); + neighborRepository.save(NEIGHBOR_0); + + Assert.assertTrue(neighborRepository.findById(NEIGHBOR_0.getId()).isPresent()); + Assert.assertFalse(neighborRepository.findById(NEIGHBOR_1.getId()).isPresent()); + } + + @Test + public void testSaveAll() { + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + final List found = Lists.newArrayList(neighborRepository.findAll()); + + assertDomainListEquals(found, NEIGHBORS); + } + + @Test + public void testFindById() { + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + Optional optional = neighborRepository.findById(NEIGHBOR_0.getId()); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(optional.get(), NEIGHBOR_0); + + optional = neighborRepository.findById(NO_EXIST_ID); + + Assert.assertFalse(optional.isPresent()); + } + + @Test + public void testExistsById() { + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + Assert.assertTrue(neighborRepository.existsById(NEIGHBOR_0.getId())); + Assert.assertFalse(neighborRepository.existsById(NO_EXIST_ID)); + } + + @Test + public void testFindAllById() { + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + final List ids = Arrays.asList(NEIGHBOR_0.getId(), NEIGHBOR_1.getId()); + final List found = Lists.newArrayList(neighborRepository.findAllById(ids)); + + assertDomainListEquals(found, NEIGHBORS); + + Assert.assertFalse(neighborRepository.findAllById(Collections.singleton(NO_EXIST_ID)).iterator().hasNext()); + } + + @Test + public void testCount() { + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + Assert.assertEquals(neighborRepository.count(), STUDENTS.size() + NEIGHBORS.size()); + + neighborRepository.deleteAll(); + + Assert.assertEquals(neighborRepository.count(), 0); + } + + @Test + public void testDeleteById() { + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + Assert.assertTrue(neighborRepository.findById(NEIGHBOR_0.getId()).isPresent()); + + neighborRepository.deleteById(NEIGHBOR_0.getId()); + + Assert.assertFalse(neighborRepository.findById(NEIGHBOR_0.getId()).isPresent()); + } + + @Test + public void testEdgeCount() { + studentRepository.saveAll(STUDENTS); + neighborRepository.saveAll(NEIGHBORS); + + Assert.assertEquals(neighborRepository.edgeCount(), NEIGHBORS.size()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/NetworkRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/NetworkRepositoryIT.java new file mode 100644 index 000000000000..a21da92c0669 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/NetworkRepositoryIT.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Network; +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.common.repository.NetworkRepository; +import com.microsoft.spring.data.gremlin.common.repository.PersonRepository; +import com.microsoft.spring.data.gremlin.common.repository.ProjectRepository; +import com.microsoft.spring.data.gremlin.common.repository.RelationshipRepository; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Collections; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class NetworkRepositoryIT { + + private final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + private final Project project = new Project(TestConstants.VERTEX_PROJECT_ID, TestConstants.VERTEX_PROJECT_NAME, + TestConstants.VERTEX_PROJECT_URI); + private final Relationship relationship = new Relationship(TestConstants.EDGE_RELATIONSHIP_ID, + TestConstants.EDGE_RELATIONSHIP_NAME, TestConstants.EDGE_RELATIONSHIP_LOCATION, + this.person, this.project); + + @Autowired + private NetworkRepository networkRepository; + + @Autowired + private PersonRepository personRepository; + + @Autowired + private ProjectRepository projectRepository; + + @Autowired + private RelationshipRepository relationshipRepository; + + @Before + public void setup() { + this.networkRepository.deleteAll(); + } + + @After + public void cleanup() { + this.networkRepository.deleteAll(); + } + + @Test + public void testDeleteById() { + final Network network = new Network(); + + network.setId("fake-id"); + network.vertexAdd(this.person); + network.vertexAdd(this.project); + network.edgeAdd(this.relationship); + + this.networkRepository.save(network); + + Assert.assertTrue(personRepository.findById(this.person.getId()).isPresent()); + Assert.assertTrue(projectRepository.findById(this.project.getId()).isPresent()); + Assert.assertTrue(relationshipRepository.findById(this.relationship.getId()).isPresent()); + + this.networkRepository.deleteById(network.getId()); + + Assert.assertFalse(personRepository.findById(this.person.getId()).isPresent()); + Assert.assertFalse(projectRepository.findById(this.project.getId()).isPresent()); + Assert.assertFalse(relationshipRepository.findById(this.relationship.getId()).isPresent()); + } + + @Test(expected = UnsupportedOperationException.class) + public void testFindAllException() { + final Network network = new Network(); + + network.setId("fake-id"); + network.vertexAdd(this.person); + network.vertexAdd(this.project); + network.edgeAdd(this.relationship); + + this.networkRepository.save(network); + this.networkRepository.findAll(Network.class); + } + + @Test(expected = UnsupportedOperationException.class) + public void testFindScriptGeneratorException() { + final Network network = new Network(); + + network.setId("fake-id"); + network.vertexAdd(this.person); + network.vertexAdd(this.project); + network.edgeAdd(this.relationship); + + this.networkRepository.save(network); + this.networkRepository.findByEdgeList(Collections.singletonList(this.relationship)); + } + + @Test + public void testDeleteAllByType() { + final Network network = new Network(); + + network.setId("fake-id"); + network.vertexAdd(this.person); + network.vertexAdd(this.project); + network.edgeAdd(this.relationship); + + this.networkRepository.save(network); + this.networkRepository.deleteAll(GremlinEntityType.GRAPH); + + Assert.assertFalse(this.personRepository.findById(this.person.getId()).isPresent()); + Assert.assertFalse(this.projectRepository.findById(this.project.getId()).isPresent()); + Assert.assertFalse(this.relationshipRepository.findById(this.relationship.getId()).isPresent()); + } + + @Test + public void testDeleteAllByClass() { + final Network network = new Network(); + + network.setId("fake-id"); + network.vertexAdd(this.person); + network.vertexAdd(this.project); + network.edgeAdd(this.relationship); + + this.networkRepository.save(network); + this.networkRepository.deleteAll(Network.class); + + Assert.assertFalse(this.relationshipRepository.findById(this.relationship.getId()).isPresent()); + Assert.assertFalse(this.personRepository.findById(this.person.getId()).isPresent()); + Assert.assertFalse(this.projectRepository.findById(this.project.getId()).isPresent()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/OrangeRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/OrangeRepositoryIT.java new file mode 100644 index 000000000000..19ebf3e46caa --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/OrangeRepositoryIT.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Orange; +import com.microsoft.spring.data.gremlin.common.repository.OrangeRepository; +import com.microsoft.spring.data.gremlin.common.TestUtils; +import org.assertj.core.util.Lists; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class OrangeRepositoryIT { + + private static final String LOCATION_0 = "location-0"; + private static final String LOCATION_1 = "location-1"; + private static final String LOCATION_2 = "location-2"; + private static final String LOCATION_3 = "location-3"; + + private static final Double PRINCE_0 = 1.79; + private static final Double PRINCE_1 = 2.09; + private static final Double PRINCE_2 = 3.29; + private static final Double PRINCE_3 = 3.99; + + private static final Orange ORANGE_0 = new Orange(LOCATION_0, PRINCE_0); + private static final Orange ORANGE_1 = new Orange(LOCATION_1, PRINCE_1); + private static final Orange ORANGE_2 = new Orange(LOCATION_2, PRINCE_2); + private static final Orange ORANGE_3 = new Orange(LOCATION_3, PRINCE_3); + + private static final List ORANGES = Arrays.asList(ORANGE_0, ORANGE_1, ORANGE_2, ORANGE_3); + + @Autowired + private OrangeRepository repository; + + @Before + public void setup() { + this.repository.deleteAll(); + } + + @After + public void cleanup() { + this.repository.deleteAll(); + } + + @Test + public void testGeneratedIdFindById() { + final Orange orange = this.repository.save(ORANGE_0); + + Assert.assertNotNull(orange.getId()); + + final Optional optional = this.repository.findById(orange.getId()); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(optional.get(), orange); + } + + @Test + public void testGeneratedIdFindAll() { + final List expect = Lists.newArrayList(this.repository.saveAll(ORANGES)); + final List actual = Lists.newArrayList(this.repository.findAll()); + + TestUtils.assertEntitiesEquals(expect, actual); + } + + @Test + public void testGeneratedIdDeleteById() { + final Orange orange = this.repository.save(ORANGE_0); + + this.repository.deleteById(orange.getId()); + + Assert.assertFalse(this.repository.findById(orange.getId()).isPresent()); + Assert.assertFalse(this.repository.existsById(orange.getId())); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/PersonRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/PersonRepositoryIT.java new file mode 100644 index 000000000000..f732aa58c5dc --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/PersonRepositoryIT.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.common.repository.PersonRepository; +import com.microsoft.spring.data.gremlin.common.repository.ProjectRepository; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import org.assertj.core.util.Lists; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class PersonRepositoryIT { + + private final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + private final Person person0 = new Person(TestConstants.VERTEX_PERSON_0_ID, TestConstants.VERTEX_PERSON_0_NAME); + private final Project project = new Project(TestConstants.VERTEX_PROJECT_ID, TestConstants.VERTEX_PROJECT_NAME, + TestConstants.VERTEX_PROJECT_URI); + + @Autowired + private PersonRepository repository; + + @Autowired + private ProjectRepository projectRepository; + + @Before + public void setup() { + this.repository.deleteAll(); + } + + @After + public void cleanup() { + this.repository.deleteAll(); + } + + @Test + public void testDeleteAll() { + this.repository.save(this.person); + + Assert.assertTrue(this.repository.existsById(this.person.getId())); + + this.repository.deleteAll(); + + Assert.assertFalse(this.repository.existsById(this.person.getId())); + } + + @Test + public void testDeleteById() { + this.repository.save(this.person); + this.repository.save(this.person0); + + Assert.assertTrue(this.repository.existsById(this.person.getId())); + Assert.assertTrue(this.repository.existsById(this.person0.getId())); + + this.repository.deleteById(this.person.getId()); + + Assert.assertFalse(this.repository.existsById(this.person.getId())); + Assert.assertTrue(this.repository.existsById(this.person0.getId())); + } + + @Test + public void testDelete() { + this.repository.save(this.person); + this.repository.save(this.person0); + + Assert.assertTrue(this.repository.existsById(this.person.getId())); + Assert.assertTrue(this.repository.existsById(this.person0.getId())); + + this.repository.delete(this.person); + + Assert.assertFalse(this.repository.existsById(this.person.getId())); + Assert.assertTrue(this.repository.existsById(this.person0.getId())); + } + + @Test + public void testDeleteAllIds() { + final List domains = Arrays.asList(this.person, this.person0); + + this.repository.save(this.person); + this.repository.save(this.person0); + + this.repository.deleteAll(domains); + + Assert.assertFalse(this.repository.existsById(this.person.getId())); + Assert.assertFalse(this.repository.existsById(this.person0.getId())); + } + + @Test + public void testSave() { + this.repository.save(this.person); + this.repository.save(this.person0); + + Assert.assertTrue(this.repository.existsById(this.person.getId())); + Assert.assertTrue(this.repository.existsById(this.person0.getId())); + } + + @Test + public void testSaveAll() { + final List domains = Arrays.asList(this.person, this.person0); + + this.repository.saveAll(domains); + + Assert.assertTrue(this.repository.existsById(this.person.getId())); + Assert.assertTrue(this.repository.existsById(this.person0.getId())); + } + + @Test + public void testFindById() { + this.repository.save(this.person); + + final Person foundPerson = this.repository.findById(this.person.getId()).get(); + + Assert.assertNotNull(foundPerson); + Assert.assertEquals(foundPerson.getId(), this.person.getId()); + Assert.assertEquals(foundPerson.getName(), this.person.getName()); + + Assert.assertFalse(this.repository.findById(this.person0.getId()).isPresent()); + } + + @Test + public void testExistById() { + Assert.assertFalse(this.repository.existsById(this.person.getId())); + + this.repository.save(this.person); + + Assert.assertTrue(this.repository.existsById(this.person.getId())); + } + + @Test + public void testFindAllById() { + final List domains = Arrays.asList(this.person, this.person0); + final List ids = Arrays.asList(this.person.getId(), this.person0.getId()); + + this.repository.saveAll(domains); + + final List foundDomains = (List) this.repository.findAllById(ids); + + domains.sort((a, b) -> (a.getId().compareTo(b.getId()))); + foundDomains.sort((a, b) -> (a.getId().compareTo(b.getId()))); + + Assert.assertArrayEquals(domains.toArray(), foundDomains.toArray()); + } + + @Test + public void testDomainClassFindAll() { + final List domains = Arrays.asList(this.person, this.person0); + List foundDomains = (List) this.repository.findAll(Person.class); + + Assert.assertTrue(foundDomains.isEmpty()); + + this.repository.saveAll(domains); + + foundDomains = (List) this.repository.findAll(Person.class); + + Assert.assertEquals(domains.size(), foundDomains.size()); + + domains.sort((a, b) -> (a.getId().compareTo(b.getId()))); + foundDomains.sort((a, b) -> (a.getId().compareTo(b.getId()))); + + Assert.assertArrayEquals(domains.toArray(), foundDomains.toArray()); + } + + @Test + public void testVertexCount() { + Assert.assertEquals(this.repository.count(), 0); + Assert.assertEquals(this.repository.edgeCount(), 0); + Assert.assertEquals(this.repository.vertexCount(), 0); + + this.repository.save(this.person); + this.repository.save(this.person0); + + Assert.assertEquals(this.repository.count(), 2); + Assert.assertEquals(this.repository.edgeCount(), 0); + Assert.assertEquals(this.repository.vertexCount(), this.repository.count()); + } + + @Test + public void testDeleteAllByType() { + this.repository.save(this.person); + this.repository.save(this.person0); + + this.repository.deleteAll(GremlinEntityType.VERTEX); + + Assert.assertFalse(this.repository.findById(this.person.getId()).isPresent()); + Assert.assertFalse(this.repository.findById(this.person0.getId()).isPresent()); + } + + @Test + public void testDeleteAllByClass() { + this.repository.save(this.person); + this.repository.save(this.person0); + this.projectRepository.save(this.project); + + this.repository.deleteAll(Person.class); + + Assert.assertFalse(this.repository.findById(this.person.getId()).isPresent()); + Assert.assertFalse(this.repository.findById(this.person0.getId()).isPresent()); + Assert.assertTrue(this.projectRepository.findById(this.project.getId()).isPresent()); + } + + @Test + public void testFindAll() { + final List persons = Arrays.asList(this.person, this.person0); + this.repository.saveAll(persons); + + final List foundPersons = Lists.newArrayList(this.repository.findAll()); + + foundPersons.sort(Comparator.comparing(Person::getId)); + persons.sort(Comparator.comparing(Person::getId)); + + Assert.assertEquals(persons, foundPersons); + + this.repository.deleteAll(); + Assert.assertFalse(this.repository.findAll().iterator().hasNext()); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/RelationshipRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/RelationshipRepositoryIT.java new file mode 100644 index 000000000000..fbbae2e68d9a --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/RelationshipRepositoryIT.java @@ -0,0 +1,304 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Project; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.common.repository.PersonRepository; +import com.microsoft.spring.data.gremlin.common.repository.ProjectRepository; +import com.microsoft.spring.data.gremlin.common.repository.RelationshipRepository; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import org.assertj.core.util.Lists; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class RelationshipRepositoryIT { + + private final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + private final Person person0 = new Person(TestConstants.VERTEX_PERSON_0_ID, TestConstants.VERTEX_PERSON_0_NAME); + private final Project project = new Project(TestConstants.VERTEX_PROJECT_ID, TestConstants.VERTEX_PROJECT_NAME, + TestConstants.VERTEX_PROJECT_URI); + private final Relationship relationship = new Relationship(TestConstants.EDGE_RELATIONSHIP_ID, + TestConstants.EDGE_RELATIONSHIP_NAME, TestConstants.EDGE_RELATIONSHIP_LOCATION, + this.person, this.project); + private final Relationship relationship0 = new Relationship(TestConstants.EDGE_RELATIONSHIP_0_ID, + TestConstants.EDGE_RELATIONSHIP_0_NAME, TestConstants.EDGE_RELATIONSHIP_0_LOCATION, + this.person0, this.project); + + @Autowired + private RelationshipRepository relationshipRepo; + + @Autowired + private PersonRepository personRepo; + + @Autowired + private ProjectRepository projectRepo; + + @Before + public void setup() { + this.relationshipRepo.deleteAll(); + } + + @After + public void cleanup() { + this.relationshipRepo.deleteAll(); + } + + @Test + public void testDeleteAll() { + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + Assert.assertTrue(this.relationshipRepo.existsById(this.relationship.getId())); + + this.relationshipRepo.deleteAll(); + + Assert.assertFalse(this.relationshipRepo.existsById(this.person.getId())); + } + + @Test + public void testDeleteById() { + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + Assert.assertTrue(this.relationshipRepo.existsById(this.relationship.getId())); + + this.relationshipRepo.deleteById(this.relationship.getId()); + + Assert.assertFalse(this.relationshipRepo.existsById(this.relationship.getId())); + } + + @Test + public void testDelete() { + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + Assert.assertTrue(this.relationshipRepo.existsById(this.relationship.getId())); + + this.relationshipRepo.delete(this.relationship); + + Assert.assertFalse(this.relationshipRepo.existsById(this.relationship.getId())); + } + + @Test + public void testDeleteAllIds() { + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + final List domains = Arrays.asList(this.relationship); + + this.relationshipRepo.deleteAll(domains); + + Assert.assertFalse(this.relationshipRepo.existsById(this.relationship.getId())); + } + + @Test + public void testSave() { + Assert.assertFalse(this.relationshipRepo.existsById(this.relationship.getId())); + + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + Assert.assertTrue(this.relationshipRepo.existsById(this.relationship.getId())); + } + + @Test + public void testSaveAll() { + Assert.assertFalse(this.relationshipRepo.existsById(this.relationship.getId())); + + final List domains = Arrays.asList(this.relationship); + + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.saveAll(domains); + + Assert.assertTrue(this.relationshipRepo.existsById(this.relationship.getId())); + } + + @Test + public void testFindById() { + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + final Relationship foundRelationship = this.relationshipRepo.findById(this.relationship.getId()).get(); + + Assert.assertNotNull(foundRelationship); + Assert.assertEquals(foundRelationship.getId(), this.relationship.getId()); + Assert.assertEquals(foundRelationship.getName(), this.relationship.getName()); + + Assert.assertFalse(this.relationshipRepo.findById(this.person.getId()).isPresent()); + } + + @Test + public void testExistById() { + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + Assert.assertFalse(this.relationshipRepo.existsById(this.person.getId())); + Assert.assertTrue(this.relationshipRepo.existsById(this.relationship.getId())); + } + + + @Test + public void testFindAllById() { + final List domains = Arrays.asList(this.relationship); + final List ids = Arrays.asList(this.relationship.getId()); + + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.saveAll(domains); + + final List foundDomains = (List) this.relationshipRepo.findAllById(ids); + + domains.sort((a, b) -> (a.getId().compareTo(b.getId()))); + foundDomains.sort((a, b) -> (a.getId().compareTo(b.getId()))); + + Assert.assertArrayEquals(domains.toArray(), foundDomains.toArray()); + } + + @Test + public void testVertexCount() { + Assert.assertEquals(this.personRepo.count(), 0); + Assert.assertEquals(this.projectRepo.edgeCount(), 0); + Assert.assertEquals(this.relationshipRepo.vertexCount(), 0); + + this.personRepo.save(this.person0); + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + Assert.assertEquals(this.personRepo.vertexCount(), 3); + Assert.assertEquals(this.projectRepo.vertexCount(), 3); + Assert.assertEquals(this.relationshipRepo.edgeCount(), 1); + Assert.assertEquals(this.relationshipRepo.count(), 4); + } + + @Test + public void testRelationshipFindByName() { + this.personRepo.save(this.person0); + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + final List relationships = this.relationshipRepo.findByLocation(this.relationship.getLocation()); + + Assert.assertEquals(relationships.size(), 1); + Assert.assertEquals(relationships.get(0), this.relationship); + + this.relationshipRepo.deleteAll(); + + Assert.assertTrue(this.relationshipRepo.findByLocation(this.relationship.getLocation()).isEmpty()); + } + + @Test + public void testDeleteAllByType() { + this.personRepo.save(this.person0); + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + this.relationshipRepo.deleteAll(GremlinEntityType.EDGE); + + Assert.assertFalse(this.relationshipRepo.findById(this.relationship.getId()).isPresent()); + Assert.assertTrue(this.personRepo.existsById(this.person.getId())); + Assert.assertTrue(this.personRepo.existsById(this.person0.getId())); + Assert.assertTrue(this.projectRepo.existsById(this.project.getId())); + } + + @Test + public void testDeleteAllByClass() { + this.personRepo.save(this.person0); + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.deleteAll(Relationship.class); + + Assert.assertFalse(this.relationshipRepo.findById(this.relationship.getId()).isPresent()); + Assert.assertTrue(this.personRepo.findById(this.person0.getId()).isPresent()); + Assert.assertTrue(this.projectRepo.findById(this.project.getId()).isPresent()); + } + + @Test + public void testFindByNameAndLocation() { + this.personRepo.save(this.person0); + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + + final List domains = this.relationshipRepo.findByNameAndLocation(relationship.getName(), + relationship.getLocation()); + + Assert.assertEquals(domains.size(), 1); + Assert.assertEquals(domains.get(0), this.relationship); + Assert.assertTrue(relationshipRepo.findByNameAndLocation(relationship.getName(), "faker").isEmpty()); + } + + @Test + public void testByNameOrId() { + this.personRepo.save(this.person0); + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + this.relationshipRepo.save(this.relationship); + this.relationshipRepo.save(this.relationship0); + + final List domains = Arrays.asList(this.relationship, this.relationship0); + List foundDomains = relationshipRepo.findByNameOrId(relationship.getName(), + relationship0.getId()); + + domains.sort(Comparator.comparing(Relationship::getId)); + foundDomains.sort(Comparator.comparing(Relationship::getId)); + + Assert.assertEquals(foundDomains.size(), 2); + Assert.assertEquals(foundDomains, domains); + + foundDomains = this.relationshipRepo.findByNameOrId("fake-name", relationship0.getId()); + + Assert.assertEquals(foundDomains.size(), 1); + Assert.assertEquals(foundDomains.get(0), this.relationship0); + } + + @Test + public void testFindAll() { + this.personRepo.save(this.person0); + this.personRepo.save(this.person); + this.projectRepo.save(this.project); + + final List relationships = Arrays.asList(this.relationship, this.relationship0); + + this.relationshipRepo.saveAll(relationships); + + final List foundRelationships = Lists.newArrayList(this.relationshipRepo.findAll()); + + foundRelationships.sort(Comparator.comparing(Relationship::getId)); + relationships.sort(Comparator.comparing(Relationship::getId)); + + Assert.assertEquals(foundRelationships, relationships); + + this.relationshipRepo.deleteAll(); + + Assert.assertFalse(this.relationshipRepo.findAll().iterator().hasNext()); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/ServiceRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/ServiceRepositoryIT.java new file mode 100644 index 000000000000..61cd2bad0e92 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/ServiceRepositoryIT.java @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Service; +import com.microsoft.spring.data.gremlin.common.domain.ServiceType; +import com.microsoft.spring.data.gremlin.common.domain.SimpleDependency; +import com.microsoft.spring.data.gremlin.common.repository.ServiceRepository; +import com.microsoft.spring.data.gremlin.common.repository.SimpleDependencyRepository; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class ServiceRepositoryIT { + + private static Service serviceA; + private static Service serviceB; + private static Service serviceC; + + private static Date createDateA; + private static Date createDateB; + private static Date createDateC; + + private static final Map PROPERTIES_A = new HashMap<>(); + private static final Map PROPERTIES_B = new HashMap<>(); + private static final Map PROPERTIES_C = new HashMap<>(); + + private static final String ID_A = "1234"; + private static final String ID_B = "8731"; + private static final String ID_C = "5781"; + + private static final int COUNT_A = 2; + private static final int COUNT_B = 8; + private static final int COUNT_C = 2; + + private static final String NAME_A = "name-A"; + private static final String NAME_B = "name-B"; + private static final String NAME_C = "name-A"; + + @Autowired + private ServiceRepository repository; + + @Autowired + private SimpleDependencyRepository dependencyRepo; + + @BeforeClass + public static void initialize() throws ParseException { + PROPERTIES_B.put("serviceB-port", 8761); + PROPERTIES_B.put("priority", "high"); + PROPERTIES_B.put("enabled-hystrix", false); + + PROPERTIES_A.put("serviceA-port", 8888); + PROPERTIES_A.put("serviceB-port", 8761); + PROPERTIES_A.put("priority", "highest"); + + PROPERTIES_C.put("serviceC-port", 8090); + PROPERTIES_C.put("serviceB-port", 8761); + PROPERTIES_C.put("priority", "medium"); + + createDateA = new SimpleDateFormat("yyyyMMdd").parse("20180601"); + createDateB = new SimpleDateFormat("yyyyMMdd").parse("20180603"); + createDateC = new SimpleDateFormat("yyyyMMdd").parse("20180503"); + + serviceA = new Service(ID_A, COUNT_A, true, NAME_A, ServiceType.FRONT_END, createDateA, PROPERTIES_A); + serviceB = new Service(ID_B, COUNT_B, false, NAME_B, ServiceType.BACK_END, createDateB, PROPERTIES_B); + serviceC = new Service(ID_C, COUNT_C, false, NAME_C, ServiceType.BACK_END, createDateC, PROPERTIES_C); + } + + @Before + public void setup() { + this.repository.deleteAll(); + } + + @After + public void cleanup() { + this.repository.deleteAll(); + } + + @Test + public void testQueries() { + Assert.assertFalse(this.repository.findById(serviceA.getId()).isPresent()); + Assert.assertFalse(this.repository.findById(serviceB.getId()).isPresent()); + + this.repository.save(serviceA); + this.repository.save(serviceB); + + Optional foundOptional = this.repository.findById(serviceA.getId()); + Assert.assertTrue(foundOptional.isPresent()); + Assert.assertEquals(foundOptional.get(), serviceA); + + foundOptional = this.repository.findById(serviceB.getId()); + Assert.assertTrue(foundOptional.isPresent()); + Assert.assertEquals(foundOptional.get(), serviceB); + + this.repository.deleteById(serviceA.getId()); + this.repository.deleteById(serviceB.getId()); + + Assert.assertFalse(this.repository.findById(serviceA.getId()).isPresent()); + Assert.assertFalse(this.repository.findById(serviceB.getId()).isPresent()); + } + + @Test + public void testEdgeFromToStringId() { + final SimpleDependency depend = new SimpleDependency("fakeId", "faked", serviceA.getId(), serviceB.getId()); + + this.repository.save(serviceA); + this.repository.save(serviceB); + this.dependencyRepo.save(depend); + + final Optional foundOptional = this.dependencyRepo.findById(depend.getId()); + Assert.assertTrue(foundOptional.isPresent()); + Assert.assertEquals(foundOptional.get(), depend); + + this.dependencyRepo.delete(foundOptional.get()); + + Assert.assertTrue(this.repository.findById(serviceA.getId()).isPresent()); + Assert.assertTrue(this.repository.findById(serviceB.getId()).isPresent()); + } + + @Test + public void testFindByName() { + this.repository.save(serviceA); + this.repository.save(serviceB); + + final List services = this.repository.findByName(serviceA.getName()); + + Assert.assertEquals(services.size(), 1); + Assert.assertEquals(services.get(0), serviceA); + + this.repository.deleteAll(); + + Assert.assertTrue(this.repository.findByName(serviceA.getName()).isEmpty()); + } + + @Test + public void testFindByInstanceCount() { + this.repository.save(serviceA); + this.repository.save(serviceB); + + final List services = this.repository.findByInstanceCount(serviceB.getInstanceCount()); + + Assert.assertEquals(services.size(), 1); + Assert.assertEquals(services.get(0), serviceB); + + this.repository.deleteAll(); + + Assert.assertTrue(this.repository.findByInstanceCount(serviceB.getInstanceCount()).isEmpty()); + } + + @Test + public void testFindByIsActive() { + this.repository.save(serviceA); + this.repository.save(serviceB); + + final List services = this.repository.findByActive(serviceB.isActive()); + + Assert.assertEquals(services.size(), 1); + Assert.assertEquals(services.get(0), serviceB); + + this.repository.deleteAll(); + + Assert.assertTrue(this.repository.findByActive(serviceB.isActive()).isEmpty()); + } + + @Test + public void testFindByCreateAt() { + this.repository.save(serviceA); + this.repository.save(serviceB); + + final List services = this.repository.findByCreateAt(serviceA.getCreateAt()); + + Assert.assertEquals(services.size(), 1); + Assert.assertEquals(services.get(0), serviceA); + + this.repository.deleteAll(); + + Assert.assertTrue(this.repository.findByCreateAt(serviceB.getCreateAt()).isEmpty()); + } + + @Test + public void testFindByProperties() { + this.repository.save(serviceA); + this.repository.save(serviceB); + + final List services = this.repository.findByProperties(serviceB.getProperties()); + + Assert.assertEquals(services.size(), 1); + Assert.assertEquals(services.get(0), serviceB); + + this.repository.deleteAll(); + + Assert.assertTrue(this.repository.findByProperties(serviceB.getProperties()).isEmpty()); + } + + @Test + public void testFindById() { + this.repository.save(serviceA); + this.repository.save(serviceB); + + final Optional foundConfig = this.repository.findById(serviceA.getId()); + final Optional foundEureka = this.repository.findById(serviceB.getId()); + + Assert.assertTrue(foundConfig.isPresent()); + Assert.assertTrue(foundEureka.isPresent()); + + Assert.assertEquals(foundConfig.get(), serviceA); + Assert.assertEquals(foundEureka.get(), serviceB); + } + + @Test + public void testFindByNameAndInstanceCount() { + this.repository.save(serviceA); + this.repository.save(serviceB); + + final List services = repository.findByNameAndInstanceCount(NAME_B, COUNT_B); + + Assert.assertEquals(services.size(), 1); + Assert.assertEquals(services.get(0), serviceB); + Assert.assertTrue(repository.findByNameAndInstanceCount(NAME_B, COUNT_A).isEmpty()); + } + + @Test + public void testFindByNameAndInstanceCountAndType() { + this.repository.save(serviceA); + this.repository.save(serviceB); + + final List services = repository.findByNameAndInstanceCountAndType(NAME_B, COUNT_B, ServiceType.BACK_END); + + Assert.assertEquals(services.size(), 1); + Assert.assertEquals(services.get(0), serviceB); + Assert.assertTrue(repository.findByNameAndInstanceCountAndType(NAME_B, COUNT_A, ServiceType.BOTH).isEmpty()); + } + + @Test + public void testFindByNameOrInstanceCount() { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + List foundServices = repository.findByNameOrInstanceCount(NAME_A, COUNT_B); + + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + foundServices = repository.findByNameOrInstanceCount("fake-name", COUNT_A); + + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceA); + } + + @Test + public void testFindByNameAndIsActiveOrProperties() { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + List foundServices = repository.findByNameAndActiveOrProperties(NAME_A, true, PROPERTIES_B); + + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + foundServices = repository.findByNameAndActiveOrProperties(NAME_B, false, new HashMap<>()); + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceB); + } + + @Test + public void testFindByNameOrInstanceCountAndType() { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + List foundServices = repository.findByNameOrInstanceCountAndType(NAME_A, COUNT_B, ServiceType.BACK_END); + + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + foundServices = repository.findByNameOrInstanceCountAndType(NAME_B, COUNT_A, ServiceType.BACK_END); + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceB); + } + + @Test + public void testFindByNameAndInstanceCountOrType() { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + List foundServices = repository.findByNameAndInstanceCountOrType(NAME_A, COUNT_A, ServiceType.BACK_END); + + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + foundServices = repository.findByNameAndInstanceCountOrType(NAME_A, COUNT_B, ServiceType.BACK_END); + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceB); + } + + @Test + public void testExistsByName() { + final List services = Arrays.asList(serviceA, serviceB, serviceC); + this.repository.saveAll(services); + + final List foundServices = repository.findByActiveExists(); + + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceA); + + this.repository.deleteAll(); + + Assert.assertTrue(repository.findByActiveExists().isEmpty()); + } + + @Test + public void testFindByCreateAtAfter() throws ParseException { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + Date testDate = new SimpleDateFormat("yyyyMMdd").parse("20180602"); + List foundServices = repository.findByCreateAtAfter(testDate); + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceB); + + testDate = new SimpleDateFormat("yyyyMMdd").parse("20180502"); + foundServices = repository.findByCreateAtAfter(testDate); + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + testDate = new SimpleDateFormat("yyyyMMdd").parse("20180606"); + foundServices = repository.findByCreateAtAfter(testDate); + Assert.assertTrue(foundServices.isEmpty()); + } + + @Test + public void testFindByNameOrTypeAndInstanceCountAndCreateAtAfter() throws ParseException { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + Date testDate = new SimpleDateFormat("yyyyMMdd").parse("20180601"); + List foundServices = repository.findByNameOrTypeAndInstanceCountAndCreateAtAfter(NAME_A, + serviceB.getType(), COUNT_B, testDate); + + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + testDate = new SimpleDateFormat("yyyyMMdd").parse("20180607"); + foundServices = repository.findByNameOrTypeAndInstanceCountAndCreateAtAfter(NAME_A, serviceB.getType(), COUNT_B, + testDate); + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceA); + Assert.assertTrue(repository.findByNameOrTypeAndInstanceCountAndCreateAtAfter("fake-name", serviceB.getType(), + COUNT_B, testDate).isEmpty()); + } + + @Test + public void testFindByCreateAtBefore() throws ParseException { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + Date testDate = new SimpleDateFormat("yyyyMMdd").parse("20180602"); + List foundServices = repository.findByCreateAtBefore(testDate); + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceA); + + testDate = new SimpleDateFormat("yyyyMMdd").parse("20180606"); + foundServices = repository.findByCreateAtBefore(testDate); + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + testDate = new SimpleDateFormat("yyyyMMdd").parse("20180506"); + foundServices = repository.findByCreateAtBefore(testDate); + Assert.assertTrue(foundServices.isEmpty()); + } + + @Test + public void testFindByCreateAtBeforeAndCreateAtAfter() throws ParseException { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + Date startDate = new SimpleDateFormat("yyyyMMdd").parse("20180602"); + Date endDate = new SimpleDateFormat("yyyyMMdd").parse("20180606"); + List foundServices = repository.findByCreateAtAfterAndCreateAtBefore(startDate, endDate); + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceB); + + startDate = new SimpleDateFormat("yyyyMMdd").parse("20180506"); + endDate = new SimpleDateFormat("yyyyMMdd").parse("20180606"); + foundServices = repository.findByCreateAtAfterAndCreateAtBefore(startDate, endDate); + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + startDate = new SimpleDateFormat("yyyyMMdd").parse("20180606"); + endDate = new SimpleDateFormat("yyyyMMdd").parse("20180607"); + foundServices = repository.findByCreateAtAfterAndCreateAtBefore(startDate, endDate); + Assert.assertTrue(foundServices.isEmpty()); + } + + @Test + public void testFindByCreateAtBetween() throws ParseException { + final List services = Arrays.asList(serviceA, serviceB); + this.repository.saveAll(services); + + Date startDate = new SimpleDateFormat("yyyyMMdd").parse("20180602"); + Date endDate = new SimpleDateFormat("yyyyMMdd").parse("20180606"); + List foundServices = repository.findByCreateAtBetween(startDate, endDate); + Assert.assertEquals(foundServices.size(), 1); + Assert.assertEquals(foundServices.get(0), serviceB); + + startDate = new SimpleDateFormat("yyyyMMdd").parse("20180601"); + endDate = new SimpleDateFormat("yyyyMMdd").parse("20180604"); + foundServices = repository.findByCreateAtBetween(startDate, endDate); + services.sort(Comparator.comparing(Service::getId)); + foundServices.sort(Comparator.comparing(Service::getId)); + Assert.assertEquals(foundServices.size(), 2); + Assert.assertEquals(foundServices, services); + + startDate = new SimpleDateFormat("yyyyMMdd").parse("20180606"); + endDate = new SimpleDateFormat("yyyyMMdd").parse("20180607"); + foundServices = repository.findByCreateAtBetween(startDate, endDate); + Assert.assertTrue(foundServices.isEmpty()); + } +} + diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/StudentRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/StudentRepositoryIT.java new file mode 100644 index 000000000000..d2dd85a82e45 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/StudentRepositoryIT.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.GremlinEntityType; +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.Student; +import com.microsoft.spring.data.gremlin.common.repository.StudentRepository; +import org.assertj.core.util.Lists; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.lang.NonNull; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class StudentRepositoryIT { + + private static final Long ID_0 = 12349274637234L; + private static final Long ID_1 = 1L; + private static final Long ID_2 = 2L; + private static final Long NO_EXIST_ID = -1L; + + private static final String NAME_0 = "name-0"; + private static final String NAME_1 = "name-1"; + private static final String NAME_2 = "name-2"; + private static final String NO_EXIST_NAME = "no-exist-name"; + + private static final Student STUDENT_0 = new Student(ID_0, NAME_0); + private static final Student STUDENT_1 = new Student(ID_1, NAME_1); + private static final Student STUDENT_2 = new Student(ID_2, NAME_2); + + private static final List STUDENTS = Arrays.asList(STUDENT_0, STUDENT_1, STUDENT_2); + + @Autowired + private StudentRepository repository; + + @Before + public void setup() { + this.repository.deleteAll(); + } + + private void assertDomainListEquals(@NonNull List found, @NonNull List expected) { + found.sort(Comparator.comparing(Student::getId)); + expected.sort(Comparator.comparing(Student::getId)); + + Assert.assertEquals(found.size(), expected.size()); + Assert.assertEquals(found, expected); + } + + @Test + public void testDeleteAll() { + repository.saveAll(STUDENTS); + + Assert.assertTrue(repository.findAll().iterator().hasNext()); + + repository.deleteAll(); + + Assert.assertFalse(repository.findAll().iterator().hasNext()); + } + + @Test + public void testDeleteAllOnType() { + repository.saveAll(STUDENTS); + + Assert.assertTrue(repository.findAll().iterator().hasNext()); + + repository.deleteAll(GremlinEntityType.EDGE); + + Assert.assertTrue(repository.findAll().iterator().hasNext()); + + repository.deleteAll(GremlinEntityType.VERTEX); + + Assert.assertFalse(repository.findAll().iterator().hasNext()); + } + + @Test + public void testDeleteAllOnDomain() { + repository.saveAll(STUDENTS); + + Assert.assertTrue(repository.findAll().iterator().hasNext()); + + repository.deleteAll(Student.class); + + Assert.assertFalse(repository.findAll().iterator().hasNext()); + } + + @Test + public void testSave() { + repository.save(STUDENT_0); + + Assert.assertTrue(repository.findById(STUDENT_0.getId()).isPresent()); + Assert.assertFalse(repository.findById(STUDENT_1.getId()).isPresent()); + } + + @Test + public void testSaveAll() { + repository.saveAll(STUDENTS); + + final List found = Lists.newArrayList(repository.findAll()); + + assertDomainListEquals(found, STUDENTS); + } + + @Test + public void testFindById() { + repository.saveAll(STUDENTS); + + Optional optional = repository.findById(STUDENT_0.getId()); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(optional.get(), STUDENT_0); + + optional = repository.findById(NO_EXIST_ID); + + Assert.assertFalse(optional.isPresent()); + } + + @Test + public void testExistsById() { + repository.saveAll(STUDENTS); + + Assert.assertTrue(repository.existsById(STUDENT_0.getId())); + Assert.assertFalse(repository.existsById(NO_EXIST_ID)); + } + + @Test + public void testFindAllById() { + final List expected = Arrays.asList(STUDENT_0, STUDENT_1); + final List ids = Arrays.asList(STUDENT_0.getId(), STUDENT_1.getId(), NO_EXIST_ID); + + repository.saveAll(STUDENTS); + + final List found = Lists.newArrayList(repository.findAllById(ids)); + + assertDomainListEquals(found, expected); + + Assert.assertFalse(repository.findAllById(Collections.singleton(NO_EXIST_ID)).iterator().hasNext()); + } + + @Test + public void testCount() { + repository.saveAll(STUDENTS); + + Assert.assertEquals(repository.count(), STUDENTS.size()); + + repository.deleteAll(); + + Assert.assertEquals(repository.count(), 0); + } + + @Test + public void testDeleteById() { + repository.saveAll(STUDENTS); + + Assert.assertTrue(repository.findById(STUDENT_0.getId()).isPresent()); + + repository.deleteById(STUDENT_0.getId()); + + Assert.assertFalse(repository.findById(STUDENT_0.getId()).isPresent()); + } + + @Test + public void testVertexCount() { + repository.saveAll(STUDENTS); + + Assert.assertEquals(repository.vertexCount(), STUDENTS.size()); + } + + @Test + public void testEdgeCount() { + repository.saveAll(STUDENTS); + + Assert.assertEquals(repository.edgeCount(), 0); + } + + @Test + public void testFindByName() { + repository.saveAll(STUDENTS); + + Assert.assertTrue(repository.findByName(NO_EXIST_NAME).isEmpty()); + Assert.assertEquals(repository.findByName(STUDENT_0.getName()).size(), 1); + Assert.assertEquals(repository.findByName(STUDENT_0.getName()).get(0), STUDENT_0); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/UserDomainRepositoryIT.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/UserDomainRepositoryIT.java new file mode 100644 index 000000000000..4204edaed5b0 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/UserDomainRepositoryIT.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository; + +import com.microsoft.spring.data.gremlin.common.TestRepositoryConfiguration; +import com.microsoft.spring.data.gremlin.common.domain.UserDomain; +import com.microsoft.spring.data.gremlin.common.repository.UserDomainRepository; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = TestRepositoryConfiguration.class) +public class UserDomainRepositoryIT { + + private static final String NAME_0 = "incarnation"; + private static final String NAME_1 = "absolute"; + private static final String NAME_2 = "test_name"; + private static final int LEVEL_0 = 4; + private static final int LEVEL_1 = 7; + private static final int LEVEL_2 = 7; + private static final UserDomain DOMAIN_0 = new UserDomain(NAME_0, LEVEL_0, true); + private static final UserDomain DOMAIN_1 = new UserDomain(NAME_1, LEVEL_1, true); + private static final UserDomain DOMAIN_2 = new UserDomain(NAME_2, LEVEL_2, false); + + @Autowired + private UserDomainRepository repository; + + @Before + public void setup() { + this.repository.deleteAll(); + } + + @Test + public void testWithNoIdName() { + Assert.assertEquals(0, this.repository.vertexCount()); + Assert.assertFalse(this.repository.findById(NAME_0).isPresent()); + + this.repository.save(DOMAIN_0); + final Optional optional = this.repository.findById(NAME_0); + + Assert.assertTrue(optional.isPresent()); + Assert.assertEquals(DOMAIN_0.getName(), optional.get().getName()); + Assert.assertEquals(DOMAIN_0.getLevel(), optional.get().getLevel()); + + this.repository.deleteById(NAME_0); + Assert.assertFalse(this.repository.findById(NAME_0).isPresent()); + } + + @Test + public void testFindByName() { + this.repository.save(DOMAIN_0); + + final List domains = this.repository.findByName(DOMAIN_0.getName()); + + Assert.assertEquals(domains.size(), 1); + Assert.assertEquals(domains.get(0), DOMAIN_0); + + this.repository.deleteAll(); + + Assert.assertTrue(this.repository.findByName(DOMAIN_0.getName()).isEmpty()); + } + + @Test + public void testFindByEnabledExists() { + final List domains = Arrays.asList(DOMAIN_0, DOMAIN_1); + + this.repository.saveAll(domains); + this.repository.save(DOMAIN_2); + + final List foundDomains = this.repository.findByEnabledExists(); + + domains.sort(Comparator.comparing(UserDomain::getName)); + foundDomains.sort(Comparator.comparing(UserDomain::getName)); + + Assert.assertEquals(foundDomains.size(), domains.size()); + Assert.assertEquals(foundDomains, domains); + + this.repository.deleteAll(domains); + + Assert.assertTrue(this.repository.findByEnabledExists().isEmpty()); + } + + @Test + public void testFindByLevelBetween() { + final List domains = Arrays.asList(DOMAIN_0, DOMAIN_1); + + this.repository.saveAll(domains); + + List foundDomains = this.repository.findByLevelBetween(8, 9); + Assert.assertTrue(foundDomains.isEmpty()); + + foundDomains = this.repository.findByLevelBetween(7, 8); + Assert.assertEquals(foundDomains.size(), 1); + Assert.assertEquals(foundDomains.get(0), DOMAIN_1); + + foundDomains = this.repository.findByLevelBetween(0, 8); + domains.sort(Comparator.comparing(UserDomain::getName)); + foundDomains.sort(Comparator.comparing(UserDomain::getName)); + + Assert.assertEquals(foundDomains.size(), domains.size()); + Assert.assertEquals(foundDomains, domains); + + this.repository.deleteAll(domains); + + Assert.assertTrue(this.repository.findByLevelBetween(0, 8).isEmpty()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryConfigurationExtensionUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryConfigurationExtensionUnitTest.java new file mode 100644 index 000000000000..736b7f636593 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryConfigurationExtensionUnitTest.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.config; + +import com.microsoft.spring.data.gremlin.repository.GremlinRepository; +import org.apache.commons.lang3.NotImplementedException; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.core.env.Environment; +import org.springframework.core.env.StandardEnvironment; +import org.springframework.core.io.ResourceLoader; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +import org.springframework.core.type.StandardAnnotationMetadata; +import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; +import org.springframework.data.repository.config.RepositoryConfigurationSource; + +public class GremlinRepositoryConfigurationExtensionUnitTest { + + private static final String GREMLIN_MODULE_NAME = "Gremlin"; + private static final String GREMLIN_MODULE_PREFIX = "gremlin"; + private static final String GREMLIN_MAPPING_CONTEXT = "gremlinMappingContext"; + + private GremlinRepositoryConfigurationExtension extension; + + @Before + public void setup() { + this.extension = new GremlinRepositoryConfigurationExtension(); + } + + @Test + public void testGremlinRepositoryConfigurationExtensionGetters() { + Assert.assertEquals(this.extension.getModuleName(), GREMLIN_MODULE_NAME); + Assert.assertEquals(this.extension.getModulePrefix(), GREMLIN_MODULE_PREFIX); + Assert.assertEquals(this.extension.getIdentifyingTypes().size(), 1); + + Assert.assertSame(this.extension.getIdentifyingTypes().toArray()[0], GremlinRepository.class); + Assert.assertTrue(this.extension.getIdentifyingAnnotations().isEmpty()); + } + + @Test + public void testGremlinRepositoryConfigurationExtensionRegisterBeansForRoot() { + final ResourceLoader loader = new PathMatchingResourcePatternResolver(); + final Environment environment = new StandardEnvironment(); + final BeanDefinitionRegistry registry = new DefaultListableBeanFactory(); + final StandardAnnotationMetadata metadata = new StandardAnnotationMetadata(GremlinConfig.class, true); + final RepositoryConfigurationSource config = new AnnotationRepositoryConfigurationSource(metadata, + EnableGremlinRepositories.class, loader, environment, registry); + + Assert.assertFalse(registry.containsBeanDefinition(GREMLIN_MAPPING_CONTEXT)); + + this.extension.registerBeansForRoot(registry, config); + + Assert.assertTrue(registry.containsBeanDefinition(GREMLIN_MAPPING_CONTEXT)); + } + + @Test(expected = NotImplementedException.class) + public void testGetRepositoryFactoryBeanClassNameException() { + this.extension.getRepositoryFactoryBeanClassName(); + } + + @EnableGremlinRepositories + private static class GremlinConfig { + + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryRegistrarUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryRegistrarUnitTest.java new file mode 100644 index 000000000000..8c9fffc15deb --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/config/GremlinRepositoryRegistrarUnitTest.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.config; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class GremlinRepositoryRegistrarUnitTest { + + private GremlinRepositoryRegistrar registrar; + + @Before + public void setup() { + this.registrar = new GremlinRepositoryRegistrar(); + } + + @Test + public void testGremlinRepositoryRegistrarGetters() { + Assert.assertSame(this.registrar.getAnnotation(), EnableGremlinRepositories.class); + Assert.assertTrue(this.registrar.getExtension() instanceof GremlinRepositoryConfigurationExtension); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinEntityInformationUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinEntityInformationUnitTest.java new file mode 100644 index 000000000000..f6a2405b1c48 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinEntityInformationUnitTest.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.support; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.domain.Relationship; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import com.microsoft.spring.data.gremlin.common.domain.Network; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceEdge; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceGraph; +import com.microsoft.spring.data.gremlin.conversion.source.GremlinSourceVertex; +import com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException; +import com.microsoft.spring.data.gremlin.exception.GremlinUnexpectedEntityTypeException; +import org.junit.Assert; +import org.junit.Test; +import org.springframework.data.annotation.Id; + +import java.util.Date; + +public class GremlinEntityInformationUnitTest { + + @Test + public void testVertexEntityInformation() { + final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + final GremlinEntityInformation personInfo = new GremlinEntityInformation<>(Person.class); + + Assert.assertNotNull(personInfo.getIdField()); + Assert.assertEquals(personInfo.getId(person), TestConstants.VERTEX_PERSON_ID); + Assert.assertEquals(personInfo.getIdType(), String.class); + Assert.assertTrue(personInfo.createGremlinSource() instanceof GremlinSourceVertex); + } + + @Test + public void testEdgeEntityInformation() { + final GremlinEntityInformation relationshipInfo = + new GremlinEntityInformation<>(Relationship.class); + + Assert.assertNotNull(relationshipInfo.getIdField()); + Assert.assertTrue(relationshipInfo.createGremlinSource() instanceof GremlinSourceEdge); + } + + @Test + public void testGraphEntityInformation() { + final GremlinEntityInformation networkInfo = new GremlinEntityInformation<>(Network.class); + + Assert.assertNotNull(networkInfo.getIdField()); + Assert.assertTrue(networkInfo.createGremlinSource() instanceof GremlinSourceGraph); + } + + @Test(expected = GremlinUnexpectedEntityTypeException.class) + public void testEntityInformationException() { + new GremlinEntityInformation(TestDomain.class).createGremlinSource(); + } + + @Test(expected = GremlinInvalidEntityIdFieldException.class) + public void testEntityInformationNoIdException() { + new GremlinEntityInformation(TestNoIdDomain.class); + } + + @Test(expected = GremlinInvalidEntityIdFieldException.class) + public void testEntityInformationMultipleIdException() { + new GremlinEntityInformation(TestMultipleIdDomain.class); + } + + @Test(expected = GremlinInvalidEntityIdFieldException.class) + public void testEntityInformationNoStringIdException() { + new GremlinEntityInformation(TestNoStringIdDomain.class); + } + + @Test(expected = GremlinInvalidEntityIdFieldException.class) + public void testEntityInformationIdFieldAndIdAnnotation() { + new GremlinEntityInformation(TestIdFieldAndIdAnnotation.class); + } + + private class TestDomain { + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + } + + private class TestNoIdDomain { + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + + private class TestMultipleIdDomain { + @Id + private String name; + + @Id + private String location; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + } + + private class TestIdFieldAndIdAnnotation { + @Id + private String name; + + @Id + private String where; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getWhere() { + return where; + } + + public void setWhere(String where) { + this.where = where; + } + } + + private class TestNoStringIdDomain { + @Id + private Date date; + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryBeanUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryBeanUnitTest.java new file mode 100644 index 000000000000..54437f1ba6f0 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryBeanUnitTest.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.support; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.common.TestConstants; +import com.microsoft.spring.data.gremlin.common.repository.PersonRepository; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.data.repository.core.support.RepositoryFactorySupport; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +public class GremlinRepositoryFactoryBeanUnitTest { + + @Autowired + private ApplicationContext context; + + private GremlinRepositoryFactoryBean factoryBean; + + @Before + public void setup() { + this.factoryBean = new GremlinRepositoryFactoryBean<>(PersonRepository.class); + } + + @Test + public void testGetFactoryInstance() { + final Person person = new Person(TestConstants.VERTEX_PERSON_ID, TestConstants.VERTEX_PERSON_NAME); + final RepositoryFactorySupport factorySupport = this.factoryBean.getFactoryInstance(this.context); + + Assert.assertNotNull(factorySupport); + Assert.assertEquals(factorySupport.getEntityInformation(Person.class).getIdType(), String.class); + Assert.assertEquals(factorySupport.getEntityInformation(Person.class).getId(person), person.getId()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryUnitTest.java b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryUnitTest.java new file mode 100644 index 000000000000..fd61433f2a31 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/java/com/microsoft/spring/data/gremlin/repository/support/GremlinRepositoryFactoryUnitTest.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.spring.data.gremlin.repository.support; + +import com.microsoft.spring.data.gremlin.common.domain.Person; +import com.microsoft.spring.data.gremlin.query.GremlinOperations; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.data.repository.core.EntityInformation; +import org.springframework.data.repository.query.QueryLookupStrategy; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.util.Optional; + +@RunWith(SpringJUnit4ClassRunner.class) +public class GremlinRepositoryFactoryUnitTest { + + @Mock + private GremlinOperations operations; + + @Autowired + private ApplicationContext context; + + private GremlinRepositoryFactory factory; + + @Before + public void setup() { + this.factory = new GremlinRepositoryFactory(this.operations, this.context); + } + + @Test + public void testGetRepositoryBaseClass() { + Assert.assertEquals(SimpleGremlinRepository.class, this.factory.getRepositoryBaseClass(null)); + } + + @Test + public void testGetEntityInformation() { + final EntityInformation information = this.factory.getEntityInformation(Person.class); + + Assert.assertNotNull(information); + Assert.assertEquals(information.getIdType(), String.class); + } + + @Test + public void testGetQueryLookupStrategy() { + final Optional strategyOptional = this.factory. + getQueryLookupStrategy(QueryLookupStrategy.Key.CREATE, null); + + Assert.assertTrue(strategyOptional.isPresent()); + } +} diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/resources/application.properties b/sdk/spring/azure-spring-data-gremlin/src/test/resources/application.properties new file mode 100644 index 000000000000..57bb8d4fdfb3 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/resources/application.properties @@ -0,0 +1,8 @@ +gremlin.endpoint=localhost +gremlin.port=8889 +gremlin.username=${your-username} +gremlin.password=${your-password} +gremlin.sslEnabled=false + +## Valid serializer(case sensitive): GRAPHSON(default), GRAPHSON_V1D0, GRAPHSON_V2D0, GRYO_V1D0, GRYO_LITE_V1D0 +# gremlin.serializer=GRAPHSON diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/resources/application.yml b/sdk/spring/azure-spring-data-gremlin/src/test/resources/application.yml new file mode 100644 index 000000000000..8fbe6f976e00 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/resources/application.yml @@ -0,0 +1,6 @@ +gremlin: + endpoint: endpoint.gremlin.cosmosdb.azure.com + port: 443 + username: /dbs/database/colls/collection + password: password + telemetryAllowed: true diff --git a/sdk/spring/azure-spring-data-gremlin/src/test/resources/telemetry.config b/sdk/spring/azure-spring-data-gremlin/src/test/resources/telemetry.config new file mode 100644 index 000000000000..61b615fa0ef1 --- /dev/null +++ b/sdk/spring/azure-spring-data-gremlin/src/test/resources/telemetry.config @@ -0,0 +1 @@ +telemetry.instrumentationKey=@telemetry.instrumentationKey@ \ No newline at end of file diff --git a/sdk/spring/ci.yml b/sdk/spring/ci.yml index a2cfbd7ba4e1..3781f9ed85e4 100644 --- a/sdk/spring/ci.yml +++ b/sdk/spring/ci.yml @@ -28,6 +28,9 @@ extends: parameters: ServiceDirectory: spring Artifacts: + - name: azure-spring-data-gremlin + groupId: com.azure + safeName: azurespringdatagremlin - name: azure-spring-boot groupId: com.microsoft.azure safeName: azurespringboot @@ -82,3 +85,7 @@ extends: groupId: com.azure - name: azure-spring-boot-sample-storage-blob groupId: com.azure + - name: azure-spring-data-sample-gremlin + groupId: com.azure + - name: azure-spring-data-sample-gremlin-web-service + groupId: com.azure diff --git a/sdk/spring/pom.xml b/sdk/spring/pom.xml index 3ff7a064ef50..58bb41d3344f 100644 --- a/sdk/spring/pom.xml +++ b/sdk/spring/pom.xml @@ -36,7 +36,10 @@ azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-queue azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-topic azure-spring-boot-samples/azure-spring-boot-sample-storage-blob + azure-spring-boot-samples/azure-spring-data-sample-gremlin + azure-spring-boot-samples/azure-spring-data-sample-gremlin-web-service azure-spring-boot-samples/azure-cloud-foundry-service-sample + azure-spring-data-gremlin diff --git a/sdk/sql/mgmt/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java b/sdk/sql/mgmt/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java index 7521f452ee0d..3d0cf17b71e9 100644 --- a/sdk/sql/mgmt/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java +++ b/sdk/sql/mgmt/src/main/java/com/azure/resourcemanager/sql/SqlServerManager.java @@ -36,7 +36,7 @@ protected SqlServerManager(HttpPipeline httpPipeline, AzureProfile profile, SdkC this.tenantId = profile.tenantId(); } - /** @return the storage manager in sql manager*/ + /** @return the storage manager in sql manager */ public StorageManager storageManager() { return storageManager; } diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml index b62b04cb7438..cef3afc969d1 100644 --- a/sdk/storage/azure-storage-blob-batch/pom.xml +++ b/sdk/storage/azure-storage-blob-batch/pom.xml @@ -87,7 +87,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/storage/azure-storage-blob-changefeed/pom.xml b/sdk/storage/azure-storage-blob-changefeed/pom.xml index 3b2662df2594..d30dd5761605 100644 --- a/sdk/storage/azure-storage-blob-changefeed/pom.xml +++ b/sdk/storage/azure-storage-blob-changefeed/pom.xml @@ -87,7 +87,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml index 5dd10eeea4b7..8a24aa250d5d 100644 --- a/sdk/storage/azure-storage-blob-cryptography/pom.xml +++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml @@ -95,7 +95,13 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 + test + + + com.azure + azure-security-keyvault-keys + 4.2.0-beta.6 test diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java index f611c6c64caf..e19ac54fc828 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobAsyncClient.java @@ -252,7 +252,7 @@ public Mono> uploadWithResponse(Flux data, AccessTier tier, BlobRequestConditions requestConditions) { return this.uploadWithResponse(new BlobParallelUploadOptions(data) .setParallelTransferOptions(parallelTransferOptions).setHeaders(headers).setMetadata(metadata) - .setTier(AccessTier.HOT).setRequestConditions(requestConditions)); + .setTier(tier).setRequestConditions(requestConditions)); } /** @@ -443,24 +443,24 @@ Mono encryptBlob(Flux plainTextFlux) throws InvalidKe keyWrappingMetadata.put(CryptographyConstants.AGENT_METADATA_KEY, CryptographyConstants.AGENT_METADATA_VALUE); - return this.keyWrapper.wrapKey(keyWrapAlgorithm, aesKey.getEncoded()) - .map(encryptedKey -> { - WrappedKey wrappedKey = new WrappedKey( - this.keyWrapper.getKeyId().block(), encryptedKey, keyWrapAlgorithm); - - // Build EncryptionData - EncryptionData encryptionData = new EncryptionData() - .setEncryptionMode(CryptographyConstants.ENCRYPTION_MODE) - .setEncryptionAgent( - new EncryptionAgent(CryptographyConstants.ENCRYPTION_PROTOCOL_V1, - EncryptionAlgorithm.AES_CBC_256)) - .setKeyWrappingMetadata(keyWrappingMetadata) - .setContentEncryptionIV(cipher.getIV()) - .setWrappedContentKey(wrappedKey); - - // Encrypt plain text with content encryption key - Flux encryptedTextFlux = plainTextFlux.map(plainTextBuffer -> { - int outputSize = cipher.getOutputSize(plainTextBuffer.remaining()); + return this.keyWrapper.getKeyId().flatMap(keyId -> + this.keyWrapper.wrapKey(keyWrapAlgorithm, aesKey.getEncoded()) + .map(encryptedKey -> { + WrappedKey wrappedKey = new WrappedKey(keyId, encryptedKey, keyWrapAlgorithm); + + // Build EncryptionData + EncryptionData encryptionData = new EncryptionData() + .setEncryptionMode(CryptographyConstants.ENCRYPTION_MODE) + .setEncryptionAgent( + new EncryptionAgent(CryptographyConstants.ENCRYPTION_PROTOCOL_V1, + EncryptionAlgorithm.AES_CBC_256)) + .setKeyWrappingMetadata(keyWrappingMetadata) + .setContentEncryptionIV(cipher.getIV()) + .setWrappedContentKey(wrappedKey); + + // Encrypt plain text with content encryption key + Flux encryptedTextFlux = plainTextFlux.map(plainTextBuffer -> { + int outputSize = cipher.getOutputSize(plainTextBuffer.remaining()); /* This should be the only place we allocate memory in encryptBlob(). Although there is an @@ -468,33 +468,33 @@ This should be the only place we allocate memory in encryptBlob(). Although ther customer's memory, so we must allocate our own memory. If memory usage becomes unreasonable, we should implement pooling. */ - ByteBuffer encryptedTextBuffer = ByteBuffer.allocate(outputSize); - - int encryptedBytes; - try { - encryptedBytes = cipher.update(plainTextBuffer, encryptedTextBuffer); - } catch (ShortBufferException e) { - throw logger.logExceptionAsError(Exceptions.propagate(e)); - } - encryptedTextBuffer.position(0); - encryptedTextBuffer.limit(encryptedBytes); - return encryptedTextBuffer; - }); + ByteBuffer encryptedTextBuffer = ByteBuffer.allocate(outputSize); + + int encryptedBytes; + try { + encryptedBytes = cipher.update(plainTextBuffer, encryptedTextBuffer); + } catch (ShortBufferException e) { + throw logger.logExceptionAsError(Exceptions.propagate(e)); + } + encryptedTextBuffer.position(0); + encryptedTextBuffer.limit(encryptedBytes); + return encryptedTextBuffer; + }); /* Defer() ensures the contained code is not executed until the Flux is subscribed to, in other words, cipher.doFinal() will not be called until the plainTextFlux has completed and therefore all other data has been encrypted. */ - encryptedTextFlux = Flux.concat(encryptedTextFlux, Flux.defer(() -> { - try { - return Flux.just(ByteBuffer.wrap(cipher.doFinal())); - } catch (GeneralSecurityException e) { - throw logger.logExceptionAsError(Exceptions.propagate(e)); - } + encryptedTextFlux = Flux.concat(encryptedTextFlux, Flux.defer(() -> { + try { + return Flux.just(ByteBuffer.wrap(cipher.doFinal())); + } catch (GeneralSecurityException e) { + throw logger.logExceptionAsError(Exceptions.propagate(e)); + } + })); + return new EncryptedBlob(encryptionData, encryptedTextFlux); })); - return new EncryptedBlob(encryptionData, encryptedTextFlux); - }); } catch (NoSuchAlgorithmException | NoSuchPaddingException e) { // These are hardcoded and guaranteed to work. There is no reason to propogate a checked exception. throw logger.logExceptionAsError(new RuntimeException(e)); diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy index de3aeaa59052..02055a459996 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy @@ -19,6 +19,7 @@ import com.azure.core.test.utils.TestResourceNamer import com.azure.core.util.Configuration import com.azure.core.util.FluxUtil import com.azure.core.util.logging.ClientLogger +import com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm import com.azure.storage.blob.BlobAsyncClient import com.azure.storage.blob.BlobClient import com.azure.storage.blob.BlobServiceClientBuilder @@ -88,7 +89,7 @@ class APISpec extends Specification { static def PREMIUM_STORAGE = "PREMIUM_STORAGE_" TestResourceNamer resourceNamer - private InterceptorManager interceptorManager + def InterceptorManager interceptorManager protected String testName // Fields used for conveniently creating blobs with data. @@ -229,8 +230,10 @@ class APISpec extends Specification { AsyncKeyEncryptionKeyResolver keyResolver, StorageSharedKeyCredential credential, String endpoint, HttpPipelinePolicy... policies) { + + KeyWrapAlgorithm algorithm = key != null && key.getKeyId().block() == "local" ? KeyWrapAlgorithm.A256KW : KeyWrapAlgorithm.RSA_OAEP_256 EncryptedBlobClientBuilder builder = new EncryptedBlobClientBuilder() - .key(key, "keyWrapAlgorithm") + .key(key, algorithm.toString()) .keyResolver(keyResolver) .endpoint(endpoint) .httpClient(getHttpClient()) @@ -277,7 +280,7 @@ class APISpec extends Specification { generateResourceName(containerPrefix, entityNo++) } - private String generateResourceName(String prefix, int entityNo) { + def String generateResourceName(String prefix, int entityNo) { return resourceNamer.randomName(prefix + testName + entityNo, 63) } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy index fbf00e854406..27505b53e4de 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncyptedBlockBlobAPITest.groovy @@ -1201,10 +1201,8 @@ class EncyptedBlockBlobAPITest extends APISpec { Files.deleteIfExists(file.toPath()) expect: - def bac = new EncryptedBlobClientBuilder() - .key(fakeKey, "keyWrapAlgorithm") - .pipeline(ebc.getHttpPipeline()) - .endpoint(ebc.getBlobUrl()) + def bac = getEncryptedClientBuilder(fakeKey, null, primaryCredential, + ebc.getBlobUrl().toString()) .buildEncryptedBlobAsyncClient() /* diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/KeyvaultKeyTest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/KeyvaultKeyTest.groovy new file mode 100644 index 000000000000..76ed12e999dc --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/KeyvaultKeyTest.groovy @@ -0,0 +1,144 @@ +package com.azure.storage.blob.specialized.cryptography + + +import com.azure.core.credential.TokenCredential +import com.azure.core.cryptography.AsyncKeyEncryptionKey +import com.azure.core.http.HttpClient +import com.azure.core.http.HttpPipeline +import com.azure.core.http.HttpPipelineBuilder +import com.azure.core.http.policy.* +import com.azure.core.test.TestMode +import com.azure.core.util.Configuration +import com.azure.identity.ClientSecretCredentialBuilder +import com.azure.security.keyvault.keys.KeyClient +import com.azure.security.keyvault.keys.KeyClientBuilder +import com.azure.security.keyvault.keys.KeyServiceVersion +import com.azure.security.keyvault.keys.cryptography.KeyEncryptionKeyClientBuilder +import com.azure.security.keyvault.keys.models.CreateRsaKeyOptions +import com.azure.security.keyvault.keys.models.KeyVaultKey +import com.azure.storage.blob.BlobContainerClient +import com.azure.storage.common.implementation.Constants + +import java.time.Duration +import java.time.OffsetDateTime + +class KeyvaultKeyTest extends APISpec { + + BlobContainerClient cc + EncryptedBlobClient bec // encrypted client for download + KeyClient keyClient + String keyId + + def setup() { + def keyVaultUrl = "https://azstoragesdkvault.vault.azure.net/" + if (testMode != TestMode.PLAYBACK) { + keyVaultUrl = Configuration.getGlobalConfiguration().get("KEYVAULT_URL") + } + + keyClient = new KeyClientBuilder() + .pipeline(getHttpPipeline(getHttpClient(), KeyServiceVersion.V7_0)) + .httpClient(getHttpClient()) + .vaultUrl(keyVaultUrl) + .buildClient() + + keyId = generateResourceName("keyId", entityNo++) + + KeyVaultKey keyVaultKey = keyClient.createRsaKey(new CreateRsaKeyOptions(keyId) + .setExpiresOn(OffsetDateTime.now().plusYears(1)) + .setKeySize(2048)) + + AsyncKeyEncryptionKey akek = new KeyEncryptionKeyClientBuilder() + .pipeline(getHttpPipeline(getHttpClient(), KeyServiceVersion.V7_0)) + .httpClient(getHttpClient()) + .buildAsyncKeyEncryptionKey(keyVaultKey.getId()) + .block() + + cc = getServiceClientBuilder(primaryCredential, + String.format(defaultEndpointTemplate, primaryCredential.getAccountName())) + .buildClient() + .getBlobContainerClient(generateContainerName()) + cc.create() + + bec = getEncryptedClientBuilder(akek, null, primaryCredential, + cc.getBlobContainerUrl().toString()) + .blobName(generateBlobName()) + .buildEncryptedBlobClient() + } + + def cleanup() { + keyClient.beginDeleteKey(keyId) + } + + def "upload download"() { + setup: + def inputArray = getRandomByteArray(Constants.KB) + InputStream stream = new ByteArrayInputStream(inputArray) + def os = new ByteArrayOutputStream() + + when: + bec.upload(stream, Constants.KB) + bec.download(os) + + then: + inputArray == os.toByteArray() + } + + + def "encryption not a noop"() { + setup: + def inputArray = getRandomByteArray(Constants.KB) + InputStream stream = new ByteArrayInputStream(inputArray) + def os = new ByteArrayOutputStream() + + when: + bec.upload(stream, Constants.KB) + cc.getBlobClient(bec.getBlobName()).download(os) + + then: + inputArray != os.toByteArray() + } + + HttpPipeline getHttpPipeline(HttpClient httpClient, KeyServiceVersion serviceVersion) { + TokenCredential credential = null; + + if (!interceptorManager.isPlaybackMode()) { + String clientId = System.getenv("AZURE_CLIENT_ID"); + String clientKey = System.getenv("AZURE_CLIENT_SECRET"); + String tenantId = System.getenv("AZURE_TENANT_ID"); + Objects.requireNonNull(clientId, "The client id cannot be null"); + Objects.requireNonNull(clientKey, "The client key cannot be null"); + Objects.requireNonNull(tenantId, "The tenant id cannot be null"); + credential = new ClientSecretCredentialBuilder() + .clientSecret(clientKey) + .clientId(clientId) + .tenantId(tenantId) + .build(); + } + + // Closest to API goes first, closest to wire goes last. + final List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy("client_name", "client_version", Configuration.getGlobalConfiguration().clone(), serviceVersion)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + RetryStrategy strategy = new ExponentialBackoff(5, Duration.ofSeconds(2), Duration.ofSeconds(16)); + policies.add(new RetryPolicy(strategy)); + if (credential != null) { + policies.add(new BearerTokenAuthenticationPolicy(credential, "https://vault.azure.net/.default")); + } + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))); + + if (!interceptorManager.isPlaybackMode()) { + if (testMode == TestMode.RECORD) { + policies.add(interceptorManager.getRecordPolicy()); + } + } + + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient) + .build() + + return pipeline; + } + +} diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/LocalKeyTest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/LocalKeyTest.groovy new file mode 100644 index 000000000000..51ceff2b7732 --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/LocalKeyTest.groovy @@ -0,0 +1,70 @@ +package com.azure.storage.blob.specialized.cryptography + +import com.azure.core.cryptography.AsyncKeyEncryptionKey +import com.azure.security.keyvault.keys.cryptography.LocalKeyEncryptionKeyClientBuilder +import com.azure.security.keyvault.keys.models.JsonWebKey +import com.azure.security.keyvault.keys.models.KeyOperation +import com.azure.storage.blob.BlobContainerClient +import com.azure.storage.common.implementation.Constants + +import javax.crypto.spec.SecretKeySpec + +class LocalKeyTest extends APISpec { + + BlobContainerClient cc + EncryptedBlobClient bec // encrypted client for download + + def setup() { + + /* Insecurely generate a local key*/ + def byteKey = getRandomByteArray(256) + + JsonWebKey localKey = JsonWebKey.fromAes(new SecretKeySpec(byteKey, "AES"), + Arrays.asList(KeyOperation.WRAP_KEY, KeyOperation.UNWRAP_KEY)) + .setId("local") + AsyncKeyEncryptionKey akek = new LocalKeyEncryptionKeyClientBuilder() + .buildAsyncKeyEncryptionKey(localKey) + .block(); + + cc = getServiceClientBuilder(primaryCredential, + String.format(defaultEndpointTemplate, primaryCredential.getAccountName())) + .buildClient() + .getBlobContainerClient(generateContainerName()) + cc.create() + + bec = getEncryptedClientBuilder(akek, null, primaryCredential, + cc.getBlobContainerUrl().toString()) + .blobName(generateBlobName()) + .buildEncryptedBlobClient() + } + + def "upload download"() { + setup: + def inputArray = getRandomByteArray(Constants.KB) + InputStream stream = new ByteArrayInputStream(inputArray) + def os = new ByteArrayOutputStream() + + when: + bec.upload(stream, Constants.KB) + bec.download(os) + + then: + inputArray == os.toByteArray() + } + + + def "encryption not a noop"() { + setup: + def inputArray = getRandomByteArray(Constants.KB) + InputStream stream = new ByteArrayInputStream(inputArray) + def os = new ByteArrayOutputStream() + + when: + bec.upload(stream, Constants.KB) + cc.getBlobClient(bec.getBlobName()).download(os) + + then: + inputArray != os.toByteArray() + } + +} diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/KeyvaultKeyTestencryptionnotanoop.json b/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/KeyvaultKeyTestencryptionnotanoop.json new file mode 100644 index 000000000000..04c35a9bcbda --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/KeyvaultKeyTestencryptionnotanoop.json @@ -0,0 +1,192 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b/create?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:18 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "720", + "x-ms-request-id" : "7d6548b5-0e3a-4c13-80e0-352c9cbf2a0b", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"key\":{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b/e0a5c2e4308f484cbe46e7ec8bbf2f52\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"uBnP5BN7G2udE55UQBHutohk7mT_ew5uvvN7tmpyrJzPulJp4zyF6ir9VRekLLPGIIslU_t85CQ4Ci3M_ED001yW7F_VMIOf9y3S6GmRwFZdq7mEN1LemQGcnIfRCt2_WwbyEYkBGbWCJ-jHYka3e-Vi_eDh6o8Df0PgS_xpMBq-0XHwJkH6mqNQ33fq1qL25WkU8SrXLMI43v4brvi-hIjkc2WbQ-_6NKvo2QCahz334Z0g2us2RYuU7X5hya17_z352qAc2yhFE5dM3h5-oDFo6nrzA0kmeI7IZDl2Lhsxfn-XMSr9Yj_tLoinEYNmcOD94RUq7Z9tvsjdemkTAQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":1626199217,\"created\":1594663219,\"updated\":1594663219,\"recoveryLevel\":\"Recoverable\",\"recoverableDays\":90}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcencryptionnotanoop171244ed5268a26698440d99?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "653dc3b9-d785-4b51-bb69-252618de76b3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D827569B29F86C", + "Last-Modified" : "Mon, 13 Jul 2020 18:00:19 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "27296606-e01e-0036-023f-591cf2000000", + "Date" : "Mon, 13 Jul 2020 18:00:19 GMT", + "x-ms-client-request-id" : "653dc3b9-d785-4b51-bb69-252618de76b3" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b/e0a5c2e4308f484cbe46e7ec8bbf2f52?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "720", + "x-ms-request-id" : "67c51823-d43d-461e-93f6-e4501887dceb", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"key\":{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b/e0a5c2e4308f484cbe46e7ec8bbf2f52\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"uBnP5BN7G2udE55UQBHutohk7mT_ew5uvvN7tmpyrJzPulJp4zyF6ir9VRekLLPGIIslU_t85CQ4Ci3M_ED001yW7F_VMIOf9y3S6GmRwFZdq7mEN1LemQGcnIfRCt2_WwbyEYkBGbWCJ-jHYka3e-Vi_eDh6o8Df0PgS_xpMBq-0XHwJkH6mqNQ33fq1qL25WkU8SrXLMI43v4brvi-hIjkc2WbQ-_6NKvo2QCahz334Z0g2us2RYuU7X5hya17_z352qAc2yhFE5dM3h5-oDFo6nrzA0kmeI7IZDl2Lhsxfn-XMSr9Yj_tLoinEYNmcOD94RUq7Z9tvsjdemkTAQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":1626199217,\"created\":1594663219,\"updated\":1594663219,\"recoveryLevel\":\"Recoverable\",\"recoverableDays\":90}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b/e0a5c2e4308f484cbe46e7ec8bbf2f52/wrapkey?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:20 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "483", + "x-ms-request-id" : "1b5f886f-761b-47ef-b1e0-0ad07f40147c", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b/e0a5c2e4308f484cbe46e7ec8bbf2f52\",\"value\":\"TnHszga0jtMgVrILwAfD7RHkCSVob7dBbjzbIYBzBZENjRZpK8pg6RdTMOQjjGjeJ7vQa4a6sMzi6QZAXEqCaZBxAmCI9Gki9kzyhDB7iQsezgxVXFXwgbP5l0losyloC-LZ8oj2R4q3_piwn2TzOp5_aSFZEXJg2RKk1uChTs5Z1wJKzvFzU9kFm6TamkZV8nugUdXyKCWnEdr9SC-8K4Enzd12-x-y6dDhvIAfBtxMhHogRzjs_nFkVOH-51d0XoWOzT5RECuAC31qM2_r7jO3fEc5nkuj2d1CccLidRw_t9xE8C_Q3hH4A3Dr9Jgj_ssm-F6-OL6z_H2aP3DeMQ\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcencryptionnotanoop171244ed5268a26698440d99/javablobencryptionnotanoop27156640b9d246514c436", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "62c86199-fe16-4e78-bbca-9393439c2424", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "3Ov9JQRxFMU=", + "x-ms-version-id" : "2020-07-13T18:00:21.3119819Z", + "Last-Modified" : "Mon, 13 Jul 2020 18:00:21 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 18:00:21 GMT", + "Content-MD5" : "Vd6Vxx1qJiYdOrMi/Gd+Yw==", + "ETag" : "0x8D827569C22C34B", + "Content-Length" : "0", + "x-ms-request-id" : "47f93a42-601e-0017-403f-593889000000", + "x-ms-client-request-id" : "62c86199-fe16-4e78-bbca-9393439c2424" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcencryptionnotanoop171244ed5268a26698440d99/javablobencryptionnotanoop27156640b9d246514c436", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a74bd53c-9dc2-4a62-85fc-c645266cd672" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-13T18:00:21.3119819Z", + "Last-Modified" : "Mon, 13 Jul 2020 18:00:21 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:21 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "Vd6Vxx1qJiYdOrMi/Gd+Yw==", + "Accept-Ranges" : "bytes", + "x-ms-meta-encryptiondata" : "{\"EncryptionMode\":\"FullBlob\",\"WrappedContentKey\":{\"KeyId\":\"https://ceciliakeys.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b/e0a5c2e4308f484cbe46e7ec8bbf2f52\",\"EncryptedKey\":\"TnHszga0jtMgVrILwAfD7RHkCSVob7dBbjzbIYBzBZENjRZpK8pg6RdTMOQjjGjeJ7vQa4a6sMzi6QZAXEqCaZBxAmCI9Gki9kzyhDB7iQsezgxVXFXwgbP5l0losyloC+LZ8oj2R4q3/piwn2TzOp5/aSFZEXJg2RKk1uChTs5Z1wJKzvFzU9kFm6TamkZV8nugUdXyKCWnEdr9SC+8K4Enzd12+x+y6dDhvIAfBtxMhHogRzjs/nFkVOH+51d0XoWOzT5RECuAC31qM2/r7jO3fEc5nkuj2d1CccLidRw/t9xE8C/Q3hH4A3Dr9Jgj/ssm+F6+OL6z/H2aP3DeMQ==\",\"Algorithm\":\"RSA-OAEP-256\"},\"EncryptionAgent\":{\"Protocol\":\"1.0\",\"EncryptionAlgorithm\":\"AES_CBC_256\"},\"ContentEncryptionIV\":\"8/VZpyje4/1Dk3wyopvv/w==\",\"KeyWrappingMetadata\":{\"EncryptionLibrary\":\"JavaTrack212.8.0-beta.2\"}}", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D827569C22C34B", + "x-ms-creation-time" : "Mon, 13 Jul 2020 18:00:21 GMT", + "Content-Length" : "1040", + "x-ms-request-id" : "fb82267b-501e-001c-403f-59c3e2000000", + "Body" : "[-65, 116, 7, -122, -101, -92, -29, 17, 86, 26, 118, -91, 108, 57, -6, 77, 93, -70, -17, 1, -75, -103, -123, -105, 51, 59, 44, 51, 43, 10, -3, 52, 124, 63, -26, -3, 35, -54, 127, 33, -115, 94, -101, -92, 10, -113, -38, -121, -117, -6, -67, 69, -41, 19, 28, 92, -14, -125, 114, 13, -73, -106, -121, 110, 118, 32, -61, -65, -89, 18, -98, 102, -128, -41, -34, 127, -16, -14, -97, 75, -79, 18, -1, 119, 3, 124, 29, -10, -36, 36, 97, -61, -106, -54, 39, -123, -127, -56, 30, 61, 88, 108, -36, 57, -14, 76, 110, 99, -14, -18, 109, -76, -28, -42, -18, -54, -94, 29, 28, 93, 6, 46, -86, -76, 104, -58, -12, 63, -121, -26, -2, -82, -68, 117, 125, 126, 87, -26, -70, 83, -116, -105, -32, 39, -52, -50, 29, 44, 41, 68, -107, 105, 36, 98, -115, -46, 13, 19, -60, 104, 108, 57, 120, -117, -38, 54, 24, 120, -52, -7, 23, 78, -1, 126, 122, -32, -90, 23, -67, -17, 124, -64, 35, 122, 105, 102, -47, -127, 79, -54, 103, 109, 45, -21, 124, 73, -1, 53, 94, -71, -31, 58, -13, 110, 91, 53, 112, -112, 89, -65, -63, -95, -13, -35, -114, -52, -27, -87, 56, -3, -76, 104, -81, -74, 35, -19, 6, 108, 107, -83, -28, 76, -79, 32, 57, 12, 37, -25, -64, -122, -96, 60, -4, 0, -65, -117, 114, -106, 91, 57, 37, 73, -14, -37, 55, -43, 87, 103, -59, -126, -26, -17, 107, 102, 96, -94, -60, -124, -103, -96, 91, -104, 74, 10, 43, 92, -107, -113, -57, 41, 120, -28, 118, 9, 123, -3, 44, 26, -65, -40, -114, 81, -98, -89, -117, 102, -104, -31, 51, 13, -13, -35, 48, -88, -37, -122, -63, 47, 102, 118, -79, 103, 127, 42, 117, 125, -91, -32, 33, -96, -5, 57, -103, -4, -87, -51, 115, -75, -114, 60, -116, -21, -116, -62, -98, 127, 115, 10, -40, -119, 20, -47, -35, 44, -63, 4, 15, 83, -78, 56, -76, -8, 2, -92, -77, -56, 117, 46, -29, -103, 19, -122, 123, 105, 104, 107, -95, -61, 100, 29, -75, 125, 36, -103, -14, -36, 34, 113, -9, -76, -14, -41, -52, 126, 99, 74, -31, 7, 100, -63, 35, -57, -59, -121, -70, -72, -97, -61, 58, 99, 44, 58, 24, 42, -47, -58, 56, 88, 94, 58, 34, -26, -32, -20, -43, -13, -76, 26, 79, -106, -1, 72, 42, 55, 97, -104, 112, -113, 70, -112, 90, -53, 57, -111, -120, -117, -103, 13, 49, 63, -116, -80, -61, -82, 124, 103, -16, 104, -68, 45, -50, -75, 16, 113, 10, 80, 79, -44, -40, -92, 28, 5, 53, -128, 114, -69, 7, 15, -6, 111, 5, 62, 123, 52, 124, 68, -54, 65, 76, 13, -76, -21, -96, 68, 73, -14, -107, 79, -3, 112, 67, -63, -27, 74, 49, -107, -63, -18, 81, 30, 109, -70, -125, 26, 107, -117, -46, 57, -44, -52, 123, -34, 121, 34, -117, -61, -8, -69, 26, -112, -14, -107, -37, -108, -16, -118, 17, -109, -78, -123, -63, -58, 31, 22, 12, 103, 105, 114, -30, 34, -100, -110, -49, -69, -57, -120, -63, -119, 117, -45, -88, 122, 3, -6, 66, 1, -110, -99, 115, 87, 58, -47, -19, 39, -119, -32, -38, 36, 64, 41, -87, 59, -62, 37, -93, 125, -19, 89, -66, -37, -70, -21, -18, -4, 79, -56, 21, 63, 124, 24, 71, -68, 98, 2, -41, -3, 30, 109, 64, 83, -4, 51, -2, 16, 30, -1, -57, -107, 21, 30, 12, -10, 60, 76, -69, 116, -82, -46, 2, 115, 69, -10, 110, 104, 9, 57, -75, -78, 114, 93, 4, 104, -4, 109, -104, -126, -123, 124, 67, 97, -28, -61, 39, -117, -18, 26, 112, -6, -74, -86, -18, -94, 57, 105, 56, -68, -118, -110, 123, -72, -23, -27, -63, 112, -46, -23, 124, 2, 62, 79, -50, -79, -26, 116, -111, 94, 98, 69, -88, 78, 87, 104, -24, -76, -109, -101, -116, -128, 75, -25, -115, 2, -45, 100, 48, -118, 113, 6, 3, -52, 124, 68, -26, 96, 13, 29, -48, 59, 7, -37, -51, 90, -66, 3, -117, -2, 126, -50, -83, -58, 1, 122, 40, -79, 16, 1, -42, -8, -29, 51, -37, 89, -92, 24, 91, 91, 76, -10, 10, -81, -63, -122, 124, -104, 76, -128, 19, -68, 124, -113, -83, -100, 98, 123, -14, 120, 10, -95, -2, 86, 36, 33, -124, -39, 26, -19, 123, -65, -46, -101, -27, -113, -42, -46, 73, 34, -28, 4, 23, -12, -49, 110, 103, 77, 6, 19, -11, -26, 94, 93, 101, 109, 66, -6, 93, 23, 6, -50, 24, -69, 38, 79, -78, -47, 68, 64, -117, -107, -23, -33, -52, 100, -104, -55, -45, -93, -87, 2, -103, -12, 49, -77, 69, 29, -18, 89, -100, 62, -92, -44, -113, 53, -91, -108, 68, -109, -34, -64, 102, 125, -4, -11, 6, -126, 42, -82, 31, 77, -69, 10, -72, 117, 53, 3, -54, -4, -9, 41, 48, -23, -19, -14, -32, 8, 92, -120, -81, -88, 79, 47, 5, 110, -48, 109, 84, -51, -11, 102, 15, 76, 38, 121, 31, 45, -118, -38, 58, -99, 123, -69, 56, -116, 4, 126, -67, 8, 120, -124, 68, 8, -120, -18, 92, 124, 44, 15, 73, -87, -76, -72, 17, 29, 104, 87, 38, -26, -71, 94, -88, -68, 20, -127, 26, 64, -51, 98, 97, 37, 121, 83, -36, -107, 122, -106, -15, 35, -88, 107, -93, -3, -100, -43, -83, -20, -63, 121, 24, -75, 58, -12, 91, 91, -120, -116, 19, -107, -41, -71, 75, -18, -28, -110, -80, -95, -32, 122, 127, -83, 43, 5, 115, 104, 101, 45, -99, 7, -63, 85, -124, -99, 45, -124, -90, 97, 120, 11, 12, 92, -6, 75, 125, -33, 119, 100, -96, 112, -103, -29, -51, 78, -40, 58, -3, 104, 10, -38, 1, 120, 46, 48, -28, 77, -117, 90, -29, 81, -58, -28, -38, -18, -26, -3, -48, -55, -105, 37, -105, -80, 94, 51, 75, -85, 79, -82, -101, 52, -63, -18, 13, -99]", + "x-ms-client-request-id" : "a74bd53c-9dc2-4a62-85fc-c645266cd672", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:21 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "887", + "x-ms-request-id" : "ee80c090-3316-4f40-ab28-8cc687adcdcf", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"recoveryId\":\"https://ceciliakeys.vault.azure.net/deletedkeys/keyidencryptionnotanoop047803044603746e214892b\",\"deletedDate\":1594663222,\"scheduledPurgeDate\":1602439222,\"key\":{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyidencryptionnotanoop047803044603746e214892b/e0a5c2e4308f484cbe46e7ec8bbf2f52\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"uBnP5BN7G2udE55UQBHutohk7mT_ew5uvvN7tmpyrJzPulJp4zyF6ir9VRekLLPGIIslU_t85CQ4Ci3M_ED001yW7F_VMIOf9y3S6GmRwFZdq7mEN1LemQGcnIfRCt2_WwbyEYkBGbWCJ-jHYka3e-Vi_eDh6o8Df0PgS_xpMBq-0XHwJkH6mqNQ33fq1qL25WkU8SrXLMI43v4brvi-hIjkc2WbQ-_6NKvo2QCahz334Z0g2us2RYuU7X5hya17_z352qAc2yhFE5dM3h5-oDFo6nrzA0kmeI7IZDl2Lhsxfn-XMSr9Yj_tLoinEYNmcOD94RUq7Z9tvsjdemkTAQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":1626199217,\"created\":1594663219,\"updated\":1594663219,\"recoveryLevel\":\"Recoverable\",\"recoverableDays\":90}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "keyidencryptionnotanoop047803044603746e214892b", "jtcencryptionnotanoop171244ed5268a26698440d99", "javablobencryptionnotanoop27156640b9d246514c436", "a656206c-3f99-48c1-a2b5-b6e3f25e8d8a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/KeyvaultKeyTestuploaddownload.json b/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/KeyvaultKeyTestuploaddownload.json new file mode 100644 index 000000000000..9714d7e10d45 --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/KeyvaultKeyTestuploaddownload.json @@ -0,0 +1,219 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/create?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:13 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "734", + "x-ms-request-id" : "9d8404d7-bd9e-47e6-bd01-d198122d503d", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"key\":{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tyu4Kv7CHRuYk_6IaEj-q-8wI4ck3b57WnvJlYYSiPoTUPFkW4Z7hdKNocG0qCN5s9_ULpcx6biyc25hIR5tq1fBhJdSptGZ1xqiBBxvleXg4F4a4pm56FP5XqJThfJtdHbyf7nkDDUat65xouV6BQrWSFWg53wBh1hWemUXzBvMEdAcV-Py0aqp_SrQTf1ie6cAV_0w27uU5Mmryq6aluvOSaDY9WBdwVFDlihugkGODNm7Kcfhb88LWVptvFduQvHYxnzOryGQ99ek63Uy1h3Bikaa40vO2xsRb8NcowLW8X8am38h_0pfhubcvldl00ueBmjvGJ_Rac7_nfNalw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":1626199210,\"created\":1594663214,\"updated\":1594663214,\"recoveryLevel\":\"Recoverable\",\"recoverableDays\":90}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploaddownload1keyvaultkeytestuploaddownload459787768474?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "93f048e3-2827-4399-a1c5-55be8fd8cc1b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82756986EBB46", + "Last-Modified" : "Mon, 13 Jul 2020 18:00:15 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "40f612d2-e01e-0026-6f3f-59d99a000000", + "Date" : "Mon, 13 Jul 2020 18:00:14 GMT", + "x-ms-client-request-id" : "93f048e3-2827-4399-a1c5-55be8fd8cc1b" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:15 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "734", + "x-ms-request-id" : "4fb6e3b4-28c1-4563-9a07-ebafbe1372d9", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"key\":{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tyu4Kv7CHRuYk_6IaEj-q-8wI4ck3b57WnvJlYYSiPoTUPFkW4Z7hdKNocG0qCN5s9_ULpcx6biyc25hIR5tq1fBhJdSptGZ1xqiBBxvleXg4F4a4pm56FP5XqJThfJtdHbyf7nkDDUat65xouV6BQrWSFWg53wBh1hWemUXzBvMEdAcV-Py0aqp_SrQTf1ie6cAV_0w27uU5Mmryq6aluvOSaDY9WBdwVFDlihugkGODNm7Kcfhb88LWVptvFduQvHYxnzOryGQ99ek63Uy1h3Bikaa40vO2xsRb8NcowLW8X8am38h_0pfhubcvldl00ueBmjvGJ_Rac7_nfNalw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":1626199210,\"created\":1594663214,\"updated\":1594663214,\"recoveryLevel\":\"Recoverable\",\"recoverableDays\":90}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06/wrapkey?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:16 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "497", + "x-ms-request-id" : "478204ba-9d5a-4485-8b6c-e25cb068c72c", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06\",\"value\":\"M8kBNLKvlbvPVWFw0T7kktnOmpLFUUWsHRi9TpfZpSfWj9-ZR2-rCF68nXTjuFOC_CuaCdvpD-3TlG6Ho5-fePtXVOx2DF764uCGNwbmBgVSpalVeLDmetKiaYv2KsFksoUNjaHzuEM4xIzQ0DOFUe6NlZOj-8mKOLRTWofsQoQ1GZB-sz7Gs7Ha8YaSZSOXX-hMVklNo9uIausCMhvvmXcaC4vKon3OaGYGXNuo1qayO9a9dfpTFe4GficRw_73YsPTqU-7q1mN_tG1aNTOnoYkw8OErx395_hPNc-3g49xumJFjp2m2i8UTbkuYb5a9BHIRkB9IaTB3ByHnjG3Fw\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploaddownload1keyvaultkeytestuploaddownload459787768474/javablobuploaddownload2keyvaultkeytestuploaddownload459877433", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0dd75f7-c1ed-44f5-9491-b995a61ac34c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "wHFJUjOnMMI=", + "x-ms-version-id" : "2020-07-13T18:00:16.7847574Z", + "Last-Modified" : "Mon, 13 Jul 2020 18:00:16 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 18:00:15 GMT", + "Content-MD5" : "VbM8HcNSn56AgffJ1qC07w==", + "ETag" : "0x8D82756996FF696", + "Content-Length" : "0", + "x-ms-request-id" : "ebe90ccc-f01e-0048-3f3f-598cb5000000", + "x-ms-client-request-id" : "e0dd75f7-c1ed-44f5-9491-b995a61ac34c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploaddownload1keyvaultkeytestuploaddownload459787768474/javablobuploaddownload2keyvaultkeytestuploaddownload459877433", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c129d65-939f-452d-8829-e5a49395d536" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-13T18:00:16.7847574Z", + "Last-Modified" : "Mon, 13 Jul 2020 18:00:16 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:16 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "VbM8HcNSn56AgffJ1qC07w==", + "Accept-Ranges" : "bytes", + "x-ms-meta-encryptiondata" : "{\"EncryptionMode\":\"FullBlob\",\"WrappedContentKey\":{\"KeyId\":\"https://ceciliakeys.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06\",\"EncryptedKey\":\"M8kBNLKvlbvPVWFw0T7kktnOmpLFUUWsHRi9TpfZpSfWj9+ZR2+rCF68nXTjuFOC/CuaCdvpD+3TlG6Ho5+fePtXVOx2DF764uCGNwbmBgVSpalVeLDmetKiaYv2KsFksoUNjaHzuEM4xIzQ0DOFUe6NlZOj+8mKOLRTWofsQoQ1GZB+sz7Gs7Ha8YaSZSOXX+hMVklNo9uIausCMhvvmXcaC4vKon3OaGYGXNuo1qayO9a9dfpTFe4GficRw/73YsPTqU+7q1mN/tG1aNTOnoYkw8OErx395/hPNc+3g49xumJFjp2m2i8UTbkuYb5a9BHIRkB9IaTB3ByHnjG3Fw==\",\"Algorithm\":\"RSA-OAEP-256\"},\"EncryptionAgent\":{\"Protocol\":\"1.0\",\"EncryptionAlgorithm\":\"AES_CBC_256\"},\"ContentEncryptionIV\":\"DINtkrRXlqGDXfjaOYhgnw==\",\"KeyWrappingMetadata\":{\"EncryptionLibrary\":\"JavaTrack212.8.0-beta.2\"}}", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82756996FF696", + "x-ms-creation-time" : "Mon, 13 Jul 2020 18:00:16 GMT", + "Content-Length" : "1040", + "x-ms-request-id" : "5e0c33a7-501e-00a5-403f-59c7f8000000", + "Body" : "[-50, 33, -103, 106, -116, 67, 43, -23, 10, 97, 111, 20, 37, -67, 109, 99, -38, 92, -45, 48, 21, -118, 118, -81, -118, 36, -82, -101, 97, 69, -38, -110, 110, -123, 51, -24, 104, -46, -121, -110, 58, 105, 26, -78, -17, -95, -39, 18, 90, -32, -80, -20, -60, -7, -47, -65, 93, 18, 60, 19, 44, -62, 16, -33, 97, -48, -100, 47, -81, 86, 92, 101, -124, -34, 20, -86, -109, 45, -57, -126, -46, -126, -64, 46, -37, 73, -83, 71, -116, -125, 13, 12, 54, -87, -33, -86, 9, -47, -55, -87, -61, -5, -9, -34, -119, -67, -54, 56, 2, 82, 108, -110, -126, -18, -58, -37, -76, -81, 66, 93, -51, -28, -71, 81, -68, -108, -28, 117, -120, 92, -100, 105, 1, 21, 5, -70, -117, -15, 111, 56, 10, 46, -97, -108, -65, 11, 58, -69, 25, -86, 2, 69, 49, -102, 117, -56, -57, -12, -96, -83, -55, -28, 43, -124, 3, 92, -22, -71, -76, -107, 66, 27, -47, -7, -60, 87, 52, -53, -70, -126, -47, -9, -87, -113, 109, -81, 51, -8, -23, -100, -43, 103, -89, 77, 13, 109, 48, 119, 27, -112, -32, 45, -108, 23, -38, 118, -42, 14, -4, -28, 103, -22, 96, -25, 127, 38, -89, -111, -3, -120, 94, -3, 46, -113, -39, 77, -63, 25, -82, -46, -35, -64, -125, 121, 52, -51, -19, 97, 83, -56, -95, -44, -101, -53, -115, 29, -41, -118, -6, 37, 52, 10, -32, -99, 112, -38, -53, -85, -33, -51, 57, -73, -119, -93, -18, -99, 118, 114, -97, 114, -85, -126, 119, -63, -2, 19, 11, -75, -28, 85, -26, 73, -79, 37, -127, 40, 23, -23, -114, -111, 64, -109, -124, -71, -62, -44, 109, -71, 46, 83, -101, -106, 54, -9, -78, -91, 96, -46, 125, -51, 69, 29, -79, -37, 29, 98, 75, 44, -113, -120, 40, -37, -97, 105, 120, 7, -29, -55, 112, -49, 48, -103, -70, -92, 3, 85, -43, -44, -119, -77, -24, 57, 5, 75, 126, 7, -47, 101, 67, -48, -120, 1, 5, -60, -14, -71, 113, 82, -69, -79, 42, -101, 76, -111, -104, 88, -123, -66, 119, -32, 57, -14, 102, 2, -69, 122, 126, 27, 42, 106, -4, -89, 69, 68, 110, -27, -43, -102, 37, 105, -46, -101, 38, 70, -103, -3, 68, -66, -23, 48, 98, -24, -26, 118, 82, -110, 36, -7, -34, 1, -55, 60, 116, -39, 34, 111, -121, -23, 18, -87, -123, -33, -26, -10, -1, 31, -122, 60, 118, 127, -124, -20, 41, 66, -74, -91, -27, 44, 47, 7, 45, -25, -55, -11, 33, 62, 106, -15, -10, 43, -51, 111, -76, -46, -72, -53, 13, 100, 35, 42, 120, -22, -100, 123, -32, 31, 27, -56, -91, -6, -128, 29, -59, -127, -86, -126, 32, -37, -97, 127, 34, -117, 47, 15, -128, 8, -24, -64, 114, -109, 49, 23, 41, -11, -76, 84, 32, -43, 45, 111, -58, -75, 118, -41, 5, 61, -53, -46, -60, -120, 107, -122, 55, 126, 94, 95, -110, -101, -67, 100, -20, 93, 87, 125, -88, -127, 31, -83, 84, -121, -85, 6, 7, -11, 13, -117, -8, 91, 100, 91, 105, 102, 52, 6, -115, -24, -31, -3, -57, -28, 40, -87, -40, 102, 96, 55, 57, -61, 71, 73, 67, -55, 18, -49, 59, -112, 2, 7, -124, -126, -43, -108, -28, 74, -6, -125, 21, 1, -23, -44, -54, -89, 90, 30, 114, 126, -102, -101, -38, 54, -61, 0, -109, 100, 101, -53, -13, -24, -20, 3, 48, 26, 43, -51, -29, -71, -2, 52, -121, -6, -99, 125, -84, 56, -117, -5, -47, 125, -101, -115, 15, -66, -34, 48, 113, 16, -94, -49, -60, 29, 64, 92, -89, -111, 58, -30, -78, 58, 79, -69, 6, -128, -59, -127, -38, 11, -10, 0, 80, 67, -85, 86, 105, 5, -4, 25, -7, -11, 113, -22, 123, 95, 113, -71, 54, -3, -62, -119, 14, 6, 122, -35, 98, 42, 93, 80, -5, 98, 119, 9, 125, -80, -13, -25, 89, -61, -65, -79, -119, -78, -31, -13, 84, -56, 24, 42, -119, -41, 75, -94, -69, 47, 23, 5, 25, -60, -70, -44, 26, -54, -87, 11, 40, -114, 100, -55, -128, 47, -10, -75, 24, -22, 86, 6, 29, 118, 79, -67, 10, 9, -128, -54, -77, -69, -126, -5, 23, -40, -1, 100, 43, 74, -74, -77, 89, -71, -75, -75, -94, 109, -72, -61, -90, 83, -96, 97, -68, 17, 20, 44, 9, 74, -120, -2, 125, -29, 77, -96, 45, 18, 80, 85, 2, -65, -81, -28, -4, -105, -103, 39, -4, 109, 43, -64, 89, 55, -13, -45, -64, 127, 49, -15, -93, -45, -21, -66, 125, -112, 76, 1, 105, -69, -112, 11, 75, -122, 57, -54, -30, -41, -62, -99, 58, -36, 43, -56, 43, -68, 27, 54, -121, -106, 88, -93, 63, 100, -62, 20, -4, -23, 69, -97, 40, 40, -124, 97, -71, 42, -96, -97, 30, 53, 48, -73, 60, -94, 75, -91, 53, -110, 81, -81, -42, -45, 49, 122, 14, 87, -23, -7, -38, -92, 8, 126, 115, 101, -85, -27, 14, -7, 107, -23, -99, 6, 35, -21, -46, 17, -121, 105, -15, 69, 89, -93, 49, -117, 67, 74, -68, 57, -91, -107, -9, 0, -68, -79, 59, -39, -46, 90, -45, -87, 55, 25, -61, -17, 103, 31, -109, 79, -29, 72, -107, -59, 87, 97, -77, 83, 111, -78, -56, -5, -25, -19, -72, 59, 11, -31, 121, 88, 75, 88, 53, 93, 97, 75, -4, 82, -102, -23, -54, -13, -120, 113, -25, 98, -4, -120, 6, -105, -21, 15, 12, -52, -17, 54, 108, -103, 122, -37, 69, -48, -29, 102, 3, 99, -106, -29, -57, -32, -47, 127, -73, 70, -49, -43, 107, -24, -5, -111, -84, -18, 56, 121, -45, 38, -34, 104, -77, -55, -71, 115, -20, 19, 75, -113, 73, -55, -9, -110, 77, -97, 34, -3, 12, 68, -100, 97, 82, 65, 53, -107, -99, -127, -39, 33, -107, -74, -24, -89, 91, 102, -115, 114, 41, -117, -36, -83, -28, -117, -81, -23, -67, -73, 81, -119, -108, 24, 91, 99]", + "x-ms-client-request-id" : "7c129d65-939f-452d-8829-e5a49395d536", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06/unwrapkey?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:17 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "198", + "x-ms-request-id" : "bf6b6756-5d81-474d-a109-6426224a60e4", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06\",\"value\":\"T6mK_G9zSuAGykH-usvr3X5ZdNnEriBiT0VLZkEV_xs\"}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192?api-version=7.1-preview", + "Headers" : { + "User-Agent" : "azsdk-java-client_name/client_version (11.0.7; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 18:00:18 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "eastus", + "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.246.93;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "915", + "x-ms-request-id" : "b7761dd4-f5ee-4297-97a7-cd6e4df47fd3", + "x-ms-keyvault-service-version" : "1.1.8.0", + "Body" : "{\"recoveryId\":\"https://ceciliakeys.vault.azure.net/deletedkeys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192\",\"deletedDate\":1594663218,\"scheduledPurgeDate\":1602439218,\"key\":{\"kid\":\"https://ceciliakeys.vault.azure.net/keys/keyiduploaddownload0keyvaultkeytestuploaddownload45979073192/67ed197f3f394b86a0c679ff27a1df06\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tyu4Kv7CHRuYk_6IaEj-q-8wI4ck3b57WnvJlYYSiPoTUPFkW4Z7hdKNocG0qCN5s9_ULpcx6biyc25hIR5tq1fBhJdSptGZ1xqiBBxvleXg4F4a4pm56FP5XqJThfJtdHbyf7nkDDUat65xouV6BQrWSFWg53wBh1hWemUXzBvMEdAcV-Py0aqp_SrQTf1ie6cAV_0w27uU5Mmryq6aluvOSaDY9WBdwVFDlihugkGODNm7Kcfhb88LWVptvFduQvHYxnzOryGQ99ek63Uy1h3Bikaa40vO2xsRb8NcowLW8X8am38h_0pfhubcvldl00ueBmjvGJ_Rac7_nfNalw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":1626199210,\"created\":1594663214,\"updated\":1594663214,\"recoveryLevel\":\"Recoverable\",\"recoverableDays\":90}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ "keyiduploaddownload0keyvaultkeytestuploaddownload45979073192", "jtcuploaddownload1keyvaultkeytestuploaddownload459787768474", "javablobuploaddownload2keyvaultkeytestuploaddownload459877433", "24fe4abf-51c0-4a60-8c5c-a517487e0cac" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/LocalKeyTestencryptionnotanoop.json b/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/LocalKeyTestencryptionnotanoop.json new file mode 100644 index 000000000000..592c97926f96 --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/LocalKeyTestencryptionnotanoop.json @@ -0,0 +1,84 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcencryptionnotanoop0localkeytestencryptionnotanoopae411638f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f8796a7-952e-476e-9cb9-9fe2819f5660" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8244D522D523D", + "Last-Modified" : "Thu, 09 Jul 2020 21:16:18 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "614d3769-a01e-009e-7836-56825c000000", + "Date" : "Thu, 09 Jul 2020 21:16:17 GMT", + "x-ms-client-request-id" : "0f8796a7-952e-476e-9cb9-9fe2819f5660" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcencryptionnotanoop0localkeytestencryptionnotanoopae411638f/javablobencryptionnotanoop10042171a4ef7978584e0", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d1665da-30dd-4205-94cb-db14143c845f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "cTNLCcS4yTQ=", + "x-ms-version-id" : "2020-07-09T21:16:18.7228980Z", + "Last-Modified" : "Thu, 09 Jul 2020 21:16:18 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 09 Jul 2020 21:16:18 GMT", + "Content-MD5" : "9Dw+NKoPq8zZu90oy6UXbg==", + "ETag" : "0x8D8244D5272241F", + "Content-Length" : "0", + "x-ms-request-id" : "7e2af355-201e-0074-6f36-56a572000000", + "x-ms-client-request-id" : "2d1665da-30dd-4205-94cb-db14143c845f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcencryptionnotanoop0localkeytestencryptionnotanoopae411638f/javablobencryptionnotanoop10042171a4ef7978584e0", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7927604-38e6-40ca-b3b2-87cd85f5c021" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-09T21:16:18.7228980Z", + "Last-Modified" : "Thu, 09 Jul 2020 21:16:18 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 09 Jul 2020 21:16:19 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "9Dw+NKoPq8zZu90oy6UXbg==", + "Accept-Ranges" : "bytes", + "x-ms-meta-encryptiondata" : "{\"EncryptionMode\":\"FullBlob\",\"WrappedContentKey\":{\"KeyId\":\"local\",\"EncryptedKey\":\"z4Aw5jYIa7HF5P3Cunl7FCT+DltAzIKR93Ss6PxbBYps/KKNYuvdNQ==\",\"Algorithm\":\"A256KW\"},\"EncryptionAgent\":{\"Protocol\":\"1.0\",\"EncryptionAlgorithm\":\"AES_CBC_256\"},\"ContentEncryptionIV\":\"f9e2HPtNEE5V9Uno5oGLVw==\",\"KeyWrappingMetadata\":{\"EncryptionLibrary\":\"JavaTrack212.8.0-beta.2\"}}", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D8244D5272241F", + "x-ms-creation-time" : "Thu, 09 Jul 2020 21:16:18 GMT", + "Content-Length" : "1040", + "x-ms-request-id" : "c68e75e4-101e-009b-1836-565087000000", + "Body" : "[101, 113, -9, -114, -103, -101, -51, 94, -25, 65, -39, -1, -20, -29, 41, 46, 35, 9, 91, -71, -96, 36, 91, 78, -69, -93, -13, 126, 89, -14, -63, -27, -67, -22, 102, 125, 35, -16, 27, 34, -26, -81, 95, 91, -40, -100, 84, -83, -55, 84, 36, 49, -128, 61, 47, -113, -67, -47, 0, 68, 0, 79, -49, -36, -10, -107, 1, -80, -65, -95, -4, -91, 74, 90, 5, 98, 21, 7, 31, -41, -53, 112, -62, 62, -58, 114, 117, 44, -103, -38, -118, 39, -97, -58, 80, 115, -80, 84, 109, 105, -41, 37, 10, 33, 107, -73, 110, -14, -26, -50, -4, -79, 65, -24, -61, 59, -73, -90, -100, -42, 127, 75, 87, 106, -106, 73, -94, -85, 68, 0, -14, 27, -73, 123, 42, 81, 63, 25, -124, 100, 121, -8, 29, -16, 77, 29, -59, -52, -47, -104, -48, 121, -81, 70, 14, -103, 32, 91, 15, -60, 110, -52, 125, -12, 76, -10, -88, 69, -88, 60, 103, 65, 15, -51, -17, 11, -87, 63, 12, 121, -9, -65, -72, -110, 17, 36, -36, -17, 122, 75, 8, -91, 29, -121, -38, 7, 51, -79, -107, -61, -110, 49, -114, 88, 126, 29, -36, 70, 64, -121, -90, -48, -106, -125, 40, -108, 122, -84, 7, -31, -46, 85, -61, 1, 76, 90, 106, -21, 65, -128, 9, -13, 6, -43, -49, 4, -79, 104, 75, -9, 33, 5, 13, 109, 124, 76, 63, 104, -31, 54, 90, 46, -18, 1, 38, 81, -3, -111, -3, -30, 2, 8, 53, -83, -33, -14, -53, -78, -111, -69, -31, -53, -18, -25, -99, 88, -45, 32, -42, -118, 43, -66, 111, 126, 89, 107, -83, 66, 36, -50, 36, 113, -76, -14, -119, 81, -26, -67, 88, -7, -44, 37, -88, 66, 59, -118, -92, 63, -98, -81, 95, -55, -51, -33, -64, -3, -6, 117, 109, -120, 62, -86, 9, 30, -26, -31, 11, -46, 66, -86, -15, -116, -74, -107, 120, -20, -80, -93, 83, -59, -126, 92, -128, -101, -68, 124, -60, -118, -112, -120, -15, 92, -4, -72, -86, -37, -110, -108, -14, -76, -30, -12, -95, 53, 119, 39, 7, -24, 25, -22, 101, 88, -50, -95, 19, 91, -4, 95, 61, 98, -41, 123, 49, -39, 120, 112, -51, 39, 123, -61, 7, -103, 118, 85, -73, -102, 84, -75, 16, -25, 32, 3, -119, -19, 0, 114, -31, -6, -104, 39, 33, -83, 106, 97, -70, -124, -73, -88, 35, 98, 51, 35, -120, 120, 123, -84, -128, -31, -12, -107, 66, 52, -70, -17, 11, -94, 6, 26, 94, -1, 48, -44, -64, -51, -91, -104, -58, -9, -92, -31, -83, -1, 4, 101, -77, -90, 52, -85, -59, 78, -77, 53, -63, -26, -36, 55, 30, -4, 124, 127, -25, -98, 17, 58, 56, 58, -23, 38, -112, 109, 113, 81, 85, -31, 31, 33, 100, 5, 80, 49, 18, -116, 60, 54, 79, 121, -125, 35, 116, 113, 68, -62, -1, 14, -27, 51, -79, 89, -8, 3, 1, -69, -47, -87, 64, 114, -63, -120, -34, -116, 109, 38, 108, 5, 119, 28, -1, -106, 91, 85, 18, -120, -102, -20, -91, 36, 126, 38, 26, -128, 116, 108, 72, -87, -127, -96, -72, -63, 20, 18, 45, -54, 10, 122, -65, -15, 75, 103, 46, -55, 102, -42, 4, -48, 55, -94, -34, 43, -7, 91, 30, -26, 76, -5, -127, -60, -8, 88, 4, -110, -67, -56, -63, 126, -98, -88, 114, 112, 22, 92, -95, 112, -32, -98, 66, -98, 19, -69, -82, 108, -62, 46, -59, 108, 121, 110, -21, -42, -31, 48, -118, -51, -60, -18, -101, -53, -81, -81, -111, -120, -109, -115, -113, -81, 127, 34, -6, -30, 42, -45, -17, -121, -67, 118, 31, -91, 39, -7, -55, 111, 58, 90, 23, -71, 116, -95, -28, 100, -36, 30, 56, 77, -71, -35, -91, 76, -58, 59, -35, 46, -106, 57, 112, 19, 77, -33, 116, 90, 102, -94, 96, -16, -53, -110, 105, -122, 42, 37, 21, -5, 62, 91, 79, -22, 24, -117, 66, 55, 53, -49, -114, 86, -16, 52, -103, 104, 101, -7, 17, 3, 32, 95, 79, -44, 79, -17, 65, -46, -108, 3, 48, -16, 64, -10, -85, -101, -45, 75, -15, 97, 116, -96, -18, -94, 96, -97, 104, -21, -97, -53, 78, -73, 55, 105, -75, -87, -72, 51, 57, 109, 123, -19, 122, -87, 11, -100, 69, 19, 122, 31, 24, -40, 83, -21, 71, -89, 108, 103, 88, -56, -75, 125, -70, 93, -16, -45, 26, -96, 24, -10, -119, 107, -72, 114, 77, -53, 56, -115, -57, -64, 27, 4, 86, 126, -98, 1, -47, 108, -116, 66, -11, 10, 54, -35, -23, 126, 36, -53, 60, -41, -76, 28, -91, -62, -102, -67, -11, -120, -119, 111, -93, -42, 90, 116, -23, -69, 54, 91, 86, 63, -40, 73, 125, -40, 58, 62, 109, 86, -2, -5, -67, -2, 36, -74, 69, 106, 53, -12, -17, 96, 31, -72, -67, -7, 112, -122, -4, -43, 51, 9, 55, 112, 28, -94, 64, -72, 69, 12, 48, -31, -10, 122, -73, 31, -13, 4, -44, 30, 67, -85, -84, 126, 45, 3, -14, 101, 63, 63, -14, 69, 49, -103, -57, -101, -31, 28, 40, -18, -89, -94, -29, 71, 77, 22, -46, -127, 67, 26, -13, -46, 88, -54, -82, 32, 115, 54, -50, 104, -86, -8, -50, 91, 58, -32, -103, -98, -17, 95, -69, 112, 114, 84, -16, -103, 64, -45, -106, 120, -29, -11, 43, -94, -127, 57, 56, -17, -121, 22, -77, 61, 8, -83, -51, -5, 102, 71, 101, -108, -116, -97, 121, -119, 6, -74, -47, 109, 4, 22, 28, -3, 38, 29, -60, -37, -27, 66, 85, -125, 12, -84, -83, -63, 53, -128, 27, -32, 53, 52, -102, 91, -26, 37, -60, 79, 124, 23, -128, -106, -8, -92, -114, 123, -30, 119, -86, -94, -29, -57, 63, -107, 45, -78, -38, -31, -116, -109, -112, 36, 85, 87, -93, 67, 17, 74, 76, 89, -43, -82, 54, 90, 119, -103, 51, 73, -80, -87, 59, 55, 53, 20, 78, 3, -28, -110, -99, 58, -118, 85, -105, 7]", + "x-ms-client-request-id" : "c7927604-38e6-40ca-b3b2-87cd85f5c021", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + } ], + "variables" : [ "81bc8ced-c924-47ab-80ca-89f64da1cd82", "jtcencryptionnotanoop0localkeytestencryptionnotanoopae411638f", "javablobencryptionnotanoop10042171a4ef7978584e0", "a6d7f882-6d70-498f-a8ae-725082f6d033" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/LocalKeyTestuploaddownload.json b/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/LocalKeyTestuploaddownload.json new file mode 100644 index 000000000000..8e9f98127547 --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/resources/session-records/LocalKeyTestuploaddownload.json @@ -0,0 +1,84 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploaddownload0localkeytestuploaddownloada06506847931b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f204b9a-1a10-42ce-a3ec-da9c6a99d7d0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8244D5111E535", + "Last-Modified" : "Thu, 09 Jul 2020 21:16:16 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f350c15b-201e-0039-3536-566a9e000000", + "Date" : "Thu, 09 Jul 2020 21:16:16 GMT", + "x-ms-client-request-id" : "0f204b9a-1a10-42ce-a3ec-da9c6a99d7d0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploaddownload0localkeytestuploaddownloada06506847931b/javablobuploaddownload1localkeytestuploaddownloada0619788733", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d152e5fd-97f3-4d2f-abed-d530922aa965", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "vyhIPpTd9Cg=", + "x-ms-version-id" : "2020-07-09T21:16:17.2828707Z", + "Last-Modified" : "Thu, 09 Jul 2020 21:16:17 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 09 Jul 2020 21:16:16 GMT", + "Content-MD5" : "u7nVX1ppqTXUHg5LT0EjQg==", + "ETag" : "0x8D8244D51969023", + "Content-Length" : "0", + "x-ms-request-id" : "30425ed1-f01e-002a-1736-564e92000000", + "x-ms-client-request-id" : "d152e5fd-97f3-4d2f-abed-d530922aa965" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploaddownload0localkeytestuploaddownloada06506847931b/javablobuploaddownload1localkeytestuploaddownloada0619788733", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3852821-f908-4508-9104-66993c5dced3" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-09T21:16:17.2828707Z", + "Last-Modified" : "Thu, 09 Jul 2020 21:16:17 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 09 Jul 2020 21:16:16 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "u7nVX1ppqTXUHg5LT0EjQg==", + "Accept-Ranges" : "bytes", + "x-ms-meta-encryptiondata" : "{\"EncryptionMode\":\"FullBlob\",\"WrappedContentKey\":{\"KeyId\":\"local\",\"EncryptedKey\":\"NpbUzDfNi9AYnWd/pgNTtGCBV6lovvJAleXpd/pc0wBer7RtGQeNRA==\",\"Algorithm\":\"A256KW\"},\"EncryptionAgent\":{\"Protocol\":\"1.0\",\"EncryptionAlgorithm\":\"AES_CBC_256\"},\"ContentEncryptionIV\":\"UzOe1NjUynTxeHzIYgxG5w==\",\"KeyWrappingMetadata\":{\"EncryptionLibrary\":\"JavaTrack212.8.0-beta.2\"}}", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D8244D51969023", + "x-ms-creation-time" : "Thu, 09 Jul 2020 21:16:17 GMT", + "Content-Length" : "1040", + "x-ms-request-id" : "b68f125b-b01e-0014-3a36-56d9ed000000", + "Body" : "[98, 41, 27, 84, -33, 22, 8, -100, -106, -119, -52, 110, 4, 29, 27, 15, 65, -28, -65, -112, -111, -46, -22, 105, -73, -6, 15, -52, -49, 121, -23, -43, -36, -94, -65, -1, -101, 83, 37, -109, 50, 119, -28, 84, -64, -30, 122, 9, -30, -8, 22, -30, 125, 0, 113, 73, -107, 77, -117, 77, -124, -67, -41, 71, 68, 74, 23, 49, -73, -57, -71, -118, -21, -60, -37, -95, 74, -14, 84, 24, 21, 24, -74, 1, -113, -22, 73, 8, 107, 92, 125, 15, -1, -47, -75, 36, -18, 94, 95, -19, -47, -2, 42, -32, -52, 108, 52, -68, 48, -25, 17, -71, -35, 7, 91, -32, 45, 73, 20, -71, -52, -24, -77, 47, -110, 54, 21, -22, 30, -11, -48, -65, -37, -58, 18, -103, -65, 95, 37, -85, 86, -117, -33, 109, -28, -6, 111, -65, -31, -107, -64, 85, -27, 36, -109, -20, -60, 39, 124, 49, 83, 84, 60, 114, 33, -64, -83, 126, 26, -75, -76, -82, 97, -15, 97, -32, -73, -2, -26, -83, -90, 79, -38, 62, 7, 70, -80, -63, 10, -52, 13, 63, 44, -76, 27, 12, 69, 96, -40, -57, 94, -87, -107, 125, -23, -73, -109, 102, -58, -17, -110, -12, 34, 43, -12, -76, -70, 30, -1, -107, 39, -106, -81, -31, 9, 12, -9, -87, -111, -103, 120, 61, -70, 54, -91, -7, 81, -101, -114, 42, -117, 110, -44, 27, -44, -89, 21, -49, -35, 10, 55, 28, -39, 83, 29, -15, 63, 51, 10, -84, 55, 24, 104, -41, -36, 46, -13, -83, -38, 35, -60, -81, 51, -8, -20, 48, -108, 45, -9, -4, -110, -1, 16, 11, -34, -89, -115, 68, -109, -23, 69, 94, 104, 8, 95, -23, -66, 123, 115, 47, 86, -26, 80, -3, 119, -63, -94, 115, -25, 26, 23, 98, 125, -14, -110, -4, -100, 69, 111, 8, -59, -8, -114, -128, 79, -65, -35, -7, 115, -81, -3, -55, 81, 108, -64, -107, -107, 122, -110, -112, -48, 75, 39, 11, 124, 29, -15, 85, 76, -82, -115, -66, -71, -51, 35, 58, 13, 72, 90, -70, -4, 53, 15, -43, 66, -30, -16, 61, -23, 74, -21, -102, 95, -76, 123, 98, 56, -7, 89, -30, -14, -4, -114, -120, -128, 74, 108, 3, 35, -7, -56, 82, -122, -93, 22, 23, -43, -122, -84, 8, -44, 122, 15, 39, -70, 14, -42, 102, 100, 127, 122, -13, -97, -18, 125, 28, 74, -54, 30, 40, -21, -38, 108, 26, -110, -120, -32, -94, 23, 5, -76, 122, 38, -123, -25, -63, 117, 63, -73, -120, -84, 89, -88, -7, -69, -16, -43, -40, -19, -28, 51, 101, 122, -40, -7, 64, 47, 98, -77, -87, 123, 103, 78, 105, -14, -96, -46, -68, -9, -41, -30, 100, 64, 10, 44, -50, -114, 107, -57, 94, 24, 117, -4, 65, 122, 74, -34, -87, -19, 65, -55, 68, -89, 111, -107, -83, -41, 75, 103, 38, 14, 89, 89, 69, -46, -95, 81, -128, 72, 82, 30, -110, -125, -36, 80, 21, 70, 38, 60, 46, 88, -40, 9, -9, 9, -94, 42, 14, 95, 90, -126, -68, -82, -122, -98, 83, 37, -16, -36, -128, -40, -113, 87, -94, -12, 58, 44, -29, 4, -80, -30, 109, -73, 126, 3, -43, -41, -20, 19, -52, -5, -123, 94, -90, -1, 24, -117, 40, 42, -101, -107, 35, 5, -27, -84, 29, -124, -9, 45, -14, -100, -66, -23, -93, -108, 41, 30, 44, 112, 115, -54, -117, -121, 18, -51, -121, -70, -57, 67, 52, 43, -121, -115, 12, -35, 10, -15, 69, 70, 37, -39, -36, 73, 61, -5, 61, 92, -84, -96, 19, 21, 28, 93, 35, -71, -27, 27, -84, 124, -121, 86, -100, 45, -58, -111, -18, -1, -70, -125, -112, -53, 30, 91, -109, 64, 69, -26, 41, -30, 66, -72, -43, 99, 69, -103, 49, -27, 107, 37, -17, 98, -75, 8, -73, 127, 55, -1, -115, 71, -89, 66, 90, 112, 22, 74, 63, -107, 65, 87, -10, 58, -82, -86, 124, 0, -48, 4, 3, -113, 7, -26, 49, 32, -112, 122, -92, -78, -29, -94, -123, 1, 85, 54, 29, -119, -34, 53, 79, -93, -107, -121, -123, 72, 72, -61, -92, -95, 100, 113, -27, -90, 35, 14, 16, -9, -111, -44, -112, -12, -97, -15, -64, 58, 80, -109, 27, -128, -24, -22, 28, -20, 7, -70, 3, 30, -77, -61, 67, -126, -71, -61, 9, 115, -31, 11, 4, -14, -120, -112, 87, -13, -85, -52, 33, -75, 91, -75, 64, -71, 57, 61, -53, 88, 87, -35, -22, -117, -71, -9, 66, 64, 102, 68, -26, 51, -120, 104, 94, 106, 29, 127, -37, 25, 14, -64, -99, 26, -118, 6, -56, -79, -16, 98, -93, -106, 93, -39, 26, 29, -80, 67, -60, 76, 41, -63, 69, -2, 125, 117, 35, -106, 84, 39, -55, 108, 103, -38, 66, -121, -18, 58, 106, 42, -23, -12, 37, -68, 8, 20, 100, -113, 21, 12, 35, -41, -80, 8, 67, -101, -31, 125, -125, -17, 122, -6, 57, -68, 40, 13, 88, 47, -82, -44, -119, -98, 20, 17, 15, -82, 60, 32, 40, -91, -75, -50, -35, -35, -127, -74, 119, -36, 59, 62, 62, -42, 22, -14, -7, 8, 106, -15, 42, 118, 116, 125, 109, -58, 99, 96, 111, -94, -99, 0, -58, 13, 114, -7, 49, -126, 93, -108, 116, 30, -42, 37, 78, 126, 98, 120, -28, -53, 73, -21, -29, -97, 62, 39, 62, -57, 43, -71, 28, 27, 99, 10, 64, 121, 122, -9, 3, 119, 97, -75, 2, 126, -24, -62, 90, 68, 89, 77, -37, 47, 31, 80, 36, -126, 5, -64, -10, -9, -5, 6, -120, -18, -72, 119, -114, -13, 57, 82, 103, 29, -43, -25, -41, 110, -48, -83, -15, -32, 18, -8, 7, 37, 16, -74, 75, -120, -119, 28, -53, -72, -8, -118, -98, 112, 5, 117, -6, -88, -28, -117, 41, 123, -15, -21, 71, -71, -40, -11, 86, -30, 41, -38, 13, -6, -59, 63, -24, -80, -38, -128, -38, 58, 103, 102, -106, -107, 73, -83, -127, 40, -43, 36, -32, 23, -22, -65, -32]", + "x-ms-client-request-id" : "e3852821-f908-4508-9104-66993c5dced3", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + } ], + "variables" : [ "70e98d95-cf02-4a49-b2c2-5fbeaa4d5a8d", "jtcuploaddownload0localkeytestuploaddownloada06506847931b", "javablobuploaddownload1localkeytestuploaddownloada0619788733", "8531ac28-5e2a-4896-8eeb-906b2fae24bb" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-nio/CHANGELOG.md b/sdk/storage/azure-storage-blob-nio/CHANGELOG.md index 972764e38a67..2ab07cc7e39d 100644 --- a/sdk/storage/azure-storage-blob-nio/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-nio/CHANGELOG.md @@ -1,10 +1,7 @@ # Release History -This package's -[documentation](LINK) -and -[samples](LINK) -demonstrate the new API. +## 12.0.0-beta.2 (Unreleased) -## 12.0.0-beta.1 (Unreleased) -- Initial Release. Please see the README and wiki for information on the new design. + +## 12.0.0-beta.1 (2020-07-17) +- Initial Release. Please see the README for more information. diff --git a/sdk/storage/azure-storage-blob-nio/README.md b/sdk/storage/azure-storage-blob-nio/README.md index 2396ef3a19f5..e8f77faadb0a 100644 --- a/sdk/storage/azure-storage-blob-nio/README.md +++ b/sdk/storage/azure-storage-blob-nio/README.md @@ -1,5 +1,6 @@ -# Azure Storage Java NIO Blob plugin library for Java -## This README is not yet updated for this project and is a skeleton copied from blobs +# Azure Storage Blob NIO FileSystemProvider + +This package allows you to interact with Azure Blob Storage through the standard Java NIO Filesystem APIs. [Source code][source] | [API reference documentation][docs] | [REST API documentation][rest_docs] | [Product documentation][product_docs] | [Samples][samples] @@ -35,8 +36,8 @@ az storage account create \ ### Authenticate the client -In order to interact with the Storage Service (Blob, Queue, Message, MessageId, File) you'll need to create an instance of the Service Client class. -To make this possible you'll need the Account SAS (shared access signature) string of the Storage Account. Learn more at [SAS Token][sas_token] +The simplest way to interact with the Storage Service is to create an instance of the [FileSystem][file_system] class using the [FileSystems][file_systems] API. +To make this possible you'll need the Account SAS (shared access signature) string of the Storage Account or a Shared Key. Learn more at [SAS Token][sas_token] and [Shared Key][shared_key] #### Get credentials @@ -76,55 +77,186 @@ b. Alternatively, get the Account SAS Token from the Azure Portal. ##### **Shared Key Credential** -a. Use Account name and Account key. Account name is your Storage Account name. +Use Account name and Account key. Account name is your Storage Account name. 1. Go to your Storage Account 2. Select `Access keys` from the menu on the left 3. Under `key1`/`key2` copy the contents of the `Key` field -or +## Key concepts -b. Use the connection string. +NIO on top of Blob Storage is designed for: + +- Working with Blob Storage as though it were a local file system +- Random access reads on large blobs without downloading the entire blob +- Uploading full files as blobs +- Creating and navigating a directory structure within an account +- Reading and setting attributes on blobs + +## Design Notes +It is important to recognize that Azure Blob Storage is not a true FileSystem, nor is it the goal of this project to +force Azure Blob Storage to act like a full-fledged FileSystem. While providing FileSystem APIs on top of Azure Blob +Storage can offer convenience and ease of access in certain cases, trying to force the Storage service to work in +scenarios it is not designed for is bound to introduce performance and stability problems. + +To that end, this project will only offer APIs that can be sensibly and cleanly built on top of Azure Blob Storage APIs. +We recognize that this will leave some scenarios unsupported indefinitely, but we would rather offer a product that +works predictably and reliably in its well defined scenarios than eagerly support all possible scenarios at the expense +of quality. Even still, supporting some fundamentally required use cases, such as directories, can result in unexpected +behavior due to the difference between blob storage and a file system. The javadocs on each type and method should +therefore be read and understood for ways in which they may diverge from the standard specified by the JDK. + +Moreover, even from within a given application, it should be remembered that using a remote FileSystem introduces higher +latency. Because of this, particular care must be taken when managing concurrency. Race conditions are more likely to +manifest, network failures occur more frequently than disk failures, and other such distributed application scenarios +must be considered when working with this FileSystem. While the AzureFileSystem will ensure it takes appropriate steps +towards robustness and reliability, the application developer must also design around these failure scenarios and have +fallback and retry options available. + +The view of the FileSystem from within an instance of the JVM will be consistent, but the AzureFileSystem makes no +guarantees on behavior or state should other processes operate on the same data. The AzureFileSystem will assume that it +has exclusive access to the resources stored in Azure Blob Storage and will behave without regard for potential +interfering applications. + +Finally, this implementation has currently chosen to always read/write directly to/from Azure Storage without a local +cache. Our team has determined that with the tradeoffs of complexity, correctness, safety, performance, debuggability, +etc. one option is not inherently better than the other and that this choice most directly addresses the current known +use cases for this project. While this has consequences for every API, of particular note is the limitations on writing +data. Data may only be written as an entire file (i.e. random IO or appends are not supported), and data is not +committed or available to be read until the write stream is closed. -1. Go to your Storage Account -2. Select `Access keys` from the menu on the left -3. Under `key1`/`key2` copy the contents of the `Connection string` field +## Examples -## Key concepts +The following sections provide several code snippets covering some of the most common Azure Storage Blob NIO tasks, including: -Blob Storage is designed for: +- [Create a `FileSystem`](#create-a-filesystem) +- [Create a directory](#create-a-directory) +- [Iterate over directory contents](#iterate-over-directory-contents) +- [Read a file](#read-a-file) +- [Write to a file](#write-to-a-file) +- [Copy a file](#copy-a-file) +- [Delete a file](#delete-a-file) +- [Read attributes on a file](#read-attributes-on-a-file) +- [Write attributes to a file](#write-attributes-to-a-file) -- Serving images or documents directly to a browser -- Storing files for distributed access -- Streaming video and audio -- Writing to log files -- Storing data for backup and restore, disaster recovery, and archiving -- Storing data for analysis by an on-premises or Azure-hosted service +### Create a `FileSystem` -## Examples +Create a `FileSystem` using the [`shared key`](#get-credentials) retrieved above. -The following sections provide several code snippets covering some of the most common Azure Storage Blob tasks, including: +Note that you can further configure the file system using constants available in `AzureFileSystem`. +Please see the docs for `AzureFileSystemProvider` for a full explanation of initializing and configuring a filesystem -- [Create a `BlobServiceClient`](#create-a-blobserviceclient) + +```java +Map config = new HashMap<>(); +String[] stores = {""); +config.put(AzureFileSystem.AZURE_STORAGE_FILE_STORES, stores); +FileSystem myFs = FileSystems.newFileSystem(new URI("azb://?account= +```java +Path dirPath = myFs.getPath("dir"); +Files.createDirectory(dirPath); +``` -### Create a `BlobServiceClient` +### Iterate over directory contents -Create a `BlobServiceClient` using the [`sasToken`](#get-credentials) generated above. +Iterate over a directory using a `DirectoryStream` + ```java -BlobServiceClient blobServiceClient = new BlobServiceClientBuilder() - .endpoint("") - .sasToken("") - .buildClient(); +for (Path p : Files.newDirectoryStream(dirPath)) { + System.out.println(p.toString()); +} ``` +### Read a file + +Read the contents of a file using an `InputStream`. Skipping, marking, and resetting are all supported. + + +```java +Path filePath = myFs.getPath("file"); +InputStream is = Files.newInputStream(filePath); +is.read(); +is.close(); +``` + +### Write to a file + +Write to a file. Only writing whole files is supported. Random IO is not supported. The stream must be closed in order +to guarantee that the data is available to be read. + + +```java +OutputStream os = Files.newOutputStream(filePath); +os.write(0); +os.close(); +``` + +### Copy a file + + +```java +Path destinationPath = myFs.getPath("destinationFile"); +Files.copy(filePath, destinationPath, StandardCopyOption.COPY_ATTRIBUTES); +``` + +### Delete a file + + +```java +Files.delete(filePath); +``` + +### Read attributes on a file + +Read attributes of a file through the `AzureBlobFileAttributes`. + + +```java +AzureBlobFileAttributes attr = Files.readAttributes(filePath, AzureBlobFileAttributes.class); +BlobHttpHeaders headers = attr.blobHttpHeaders(); +``` + +Or read attributes dynamically by specifying a string of desired attributes. This will not improve performance as a call +to retrieve any attribute will always retrieve all of them as an atomic bulk operation. You may specify "*" instead of a +list of specific attributes to have all attributes returned in the map. + + +```java +Map attributes = Files.readAttributes(filePath, "azureBlob:metadata,headers"); +``` + +### Write attributes to a file + +Set attributes of a file through the `AzureBlobFileAttributeView`. + + +```java +AzureBlobFileAttributeView view = Files.getFileAttributeView(filePath, AzureBlobFileAttributeView.class); +view.setMetadata(Collections.EMPTY_MAP); +``` + +Or set an attribute dynamically by specifying the attribute as a string. + + +```java +Files.setAttribute(filePath, "azureBlob:blobHttpHeaders", new BlobHttpHeaders()); +``` ## Troubleshooting -When interacting with blobs using this Java client library, errors returned by the service correspond to the same HTTP -status codes returned for [REST API][error_codes] requests. For example, if you try to retrieve a container or blob that -doesn't exist in your Storage Account, a `404` error is returned, indicating `Not Found`. +When using the NIO implementation for Azure Blob Storage, errors returned by the service are manifested as an +`IOException` which wraps a `BlobStorageException` having the same HTTP status codes returned for +[REST API][error_codes] requests. For example, if you try to read a file that doesn't exist in your Storage Account, a +`404` error is returned, indicating `Not Found`. ### Default HTTP Client All client libraries by default use the Netty HTTP client. Adding the above dependency will automatically configure @@ -137,12 +269,30 @@ operations. The Boring SSL library is an uber jar containing native libraries fo better performance compared to the default SSL implementation within the JDK. For more information, including how to reduce the dependency size, refer to the [performance tuning][performance_tuning] section of the wiki. -## Next steps - -Several Storage blob Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Key Vault: - -## Next steps Samples -Samples are explained in detail [here][samples_readme]. +## Continued development + +This project is still actively being developed in an effort to move from preview to GA. Below is a list of features that +are not currently supported but are under consideration and may be added before GA. We welcome feedback and input on +which of these may be most useful and are open to suggestions for items not included in this list. While all of these +items are being considered, they have not been investigated and designed and therefore we cannot confirm their +feasibility within Azure Blob Storage. Therefore, it may be the case that further investigation reveals a feature may +not be possible or otherwise may conflict with established design goals and therefor will not ultimately be supported. + +- Symbolic links +- Hard links +- Hidden files +- Random writes +- File locks +- Read only files or file stores +- Watches on directory events +- Support for other Azure Storage services such as ADLS Gen 2 (Datalake) and Azure Files (shares) +- Token authentication +- Multi-account filesystems +- Delegating access to single files +- Normalizing directory structure of data upon loading a FileSystem +- Local caching +- Other `OpenOptions` such as append or dsync +- Flags to toggle certain behaviors such as FileStore (container) creation, etc. ## Contributing @@ -159,6 +309,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [rest_docs]: https://docs.microsoft.com/rest/api/storageservices/blob-service-rest-api [product_docs]: https://docs.microsoft.com/azure/storage/blobs/storage-blobs-overview [sas_token]: https://docs.microsoft.com/azure/storage/common/storage-dotnet-shared-access-signature-part-1 +[shared_key]: https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key [jdk]: https://docs.microsoft.com/java/azure/jdk/ [azure_subscription]: https://azure.microsoft.com/free/ [storage_account]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal @@ -166,11 +317,13 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [storage_account_create_portal]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal [identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity/README.md [error_codes]: https://docs.microsoft.com/rest/api/storageservices/blob-service-error-codes -[samples]: src/samples +[samples]: https://docs.oracle.com/javase/tutorial/essential/io/fileio.html [cla]: https://cla.microsoft.com [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ [coc_contact]: mailto:opencode@microsoft.com [performance_tuning]: https://github.com/Azure/azure-sdk-for-java/wiki/Performance-Tuning +[file_system]: https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html +[file_systems]: https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystems.html ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstorage%2Fazure-storage-blob%2FREADME.png) diff --git a/sdk/storage/azure-storage-blob-nio/pom.xml b/sdk/storage/azure-storage-blob-nio/pom.xml index 9b04ff9c4c40..26f7fe0ec94f 100644 --- a/sdk/storage/azure-storage-blob-nio/pom.xml +++ b/sdk/storage/azure-storage-blob-nio/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-blob-nio - 12.0.0-beta.1 + 12.0.0-beta.2 Microsoft Azure implementation of NIO on top of Azure Blob Storage This module contains an implementation of Java's NIO interface on top of Azure Blob Storage. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBasicFileAttributeView.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBasicFileAttributeView.java index 4a0766ac4284..338c95b1b641 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBasicFileAttributeView.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBasicFileAttributeView.java @@ -10,17 +10,17 @@ /** * Provides support for basic file attributes. - * + *

    * The operations supported by this view and the attributes it reads are a strict subset of * {@link AzureBlobFileAttributeView} and has the same network behavior. Therefore, while this type is offered for * compliance with the NIO spec, {@link AzureBlobFileAttributeView} is generally preferred. - * + *

    * {@link #setTimes(FileTime, FileTime, FileTime)} is not supported. - * - * {@inheritDoc} */ public final class AzureBasicFileAttributeView implements BasicFileAttributeView { + static final String NAME = "azureBasic"; + private final Path path; AzureBasicFileAttributeView(Path path) { @@ -28,16 +28,21 @@ public final class AzureBasicFileAttributeView implements BasicFileAttributeView } /** - * Returns {@code "azureBasic"} - * {@inheritDoc} + * Returns the name of the attribute view: {@code "azureBasic"} + * + * @return the name of the attribute view: {@code "azureBasic"} */ @Override public String name() { - return "azureBasic"; + return NAME; } /** - * {@inheritDoc} + * Reads the basic file attributes as a bulk operation. + *

    + * All file attributes are read as an atomic operation with respect to other file system operations. + * + * @return {@link AzureBasicFileAttributes} */ @Override public AzureBasicFileAttributes readAttributes() throws IOException { @@ -47,8 +52,11 @@ public AzureBasicFileAttributes readAttributes() throws IOException { /** * Unsupported. * + * @param lastModifiedTime the new last modified time, or null to not change the value + * @param lastAccessTime the last access time, or null to not change the value + * @param createTime the file's create time, or null to not change the value * @throws UnsupportedOperationException Operation not supported. - * {@inheritDoc} + * @throws IOException never */ @Override public void setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime) throws IOException { diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBasicFileAttributes.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBasicFileAttributes.java index b6c2d555a090..c41e28471285 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBasicFileAttributes.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBasicFileAttributes.java @@ -24,9 +24,8 @@ * {@link AzureBlobFileAttributes} is generally preferred. *

    * Some attributes are not supported. Refer to the javadocs on each method for more information. - * {@inheritDoc} */ -public class AzureBasicFileAttributes implements BasicFileAttributes { +public final class AzureBasicFileAttributes implements BasicFileAttributes { private final ClientLogger logger = new ClientLogger(AzureBasicFileAttributes.class); // For verifying parameters on FileSystemProvider.readAttributes @@ -62,7 +61,9 @@ public class AzureBasicFileAttributes implements BasicFileAttributes { } /** - * {@inheritDoc} + * Returns the time of last modification. + * + * @return the time of last modification. */ @Override public FileTime lastModifiedTime() { @@ -70,17 +71,22 @@ public FileTime lastModifiedTime() { } /** - * Unsupported. - * @throws UnsupportedOperationException Operation not supported. - * {@inheritDoc} + * Returns the time of last modification. + *

    + * Last access time is not supported by the blob service. In this case, it is typical for implementations to return + * the {@link #lastModifiedTime()}. + * + * @return the time of last modification. */ @Override public FileTime lastAccessTime() { - throw new UnsupportedOperationException(); + return this.lastModifiedTime(); } /** - * {@inheritDoc} + * Returns the creation time. The creation time is the time that the file was created. + * + * @return The creation time. */ @Override public FileTime creationTime() { @@ -88,7 +94,9 @@ public FileTime creationTime() { } /** - * {@inheritDoc} + * Tells whether the file is a regular file with opaque content. + * + * @return whether the file is a regular file. */ @Override public boolean isRegularFile() { @@ -96,11 +104,13 @@ public boolean isRegularFile() { } /** - * {@inheritDoc} + * Tells whether the file is a directory. *

    * Will only return true if the directory is a concrete directory. See * {@link AzureFileSystemProvider#createDirectory(Path, FileAttribute[])} for more information on virtual and * concrete directories. + * + * @return whether the file is a directory */ @Override public boolean isDirectory() { @@ -108,6 +118,8 @@ public boolean isDirectory() { } /** + * Tells whether the file is a symbolic link. + * * @return false. Symbolic links are not supported. */ @Override @@ -116,7 +128,9 @@ public boolean isSymbolicLink() { } /** - * @return false + * Tells whether the file is something other than a regular file, directory, or symbolic link. + * + * @return false. No other object types are supported. */ @Override public boolean isOther() { @@ -124,7 +138,9 @@ public boolean isOther() { } /** - * {@inheritDoc} + * Returns the size of the file (in bytes). + * + * @return the size of the file */ @Override public long size() { @@ -133,8 +149,8 @@ public long size() { /** * Unsupported. + * * @throws UnsupportedOperationException Operation not supported. - * {@inheritDoc} */ @Override public Object fileKey() { diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBlobFileAttributeView.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBlobFileAttributeView.java index 2761c54830b6..3162309752a0 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBlobFileAttributeView.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBlobFileAttributeView.java @@ -29,6 +29,7 @@ public final class AzureBlobFileAttributeView implements BasicFileAttributeView private final ClientLogger logger = new ClientLogger(AzureBlobFileAttributeView.class); static final String ATTR_CONSUMER_ERROR = "Exception thrown by attribute consumer"; + static final String NAME = "azureBlob"; private final Path path; @@ -69,18 +70,20 @@ static Map> setAttributeConsumers(AzureBlobFileAttribut } /** - * Returns "azureBlob". - * {@inheritDoc} + * Returns the name of the attribute view: {@code "azureBlob"} + * + * @return the name of the attribute view: {@code "azureBlob"} */ @Override public String name() { - return "azureBlob"; + return NAME; } /** * Reads the file attributes as a bulk operation. - * - * Gets a fresh copy every time it is called. + *

    + * All file attributes are read as an atomic operation with respect to other file system operations. A fresh copy is + * retrieved every time this method is called. * @return {@link AzureBlobFileAttributes} * @throws IOException if an IOException occurs. */ @@ -121,7 +124,7 @@ public void setMetadata(Map metadata) throws IOException { /** * Sets the {@link AccessTier} on the file. - * + *

    * See {@link BlobClientBase#setAccessTier(AccessTier)} for more information. * @param tier {@link AccessTier} * @throws IOException if an IOException occurs. @@ -137,11 +140,14 @@ public void setTier(AccessTier tier) throws IOException { /** * Unsupported. * + * @param lastModifiedTime the new last modified time, or null to not change the value + * @param lastAccessTime the last access time, or null to not change the value + * @param createTime the file's create time, or null to not change the value * @throws UnsupportedOperationException Operation not supported. - * {@inheritDoc} + * @throws IOException never */ @Override - public void setTimes(FileTime fileTime, FileTime fileTime1, FileTime fileTime2) throws IOException { + public void setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime) throws IOException { throw new UnsupportedOperationException(); } } diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBlobFileAttributes.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBlobFileAttributes.java index 7c8c25b7fe53..ab224ca8ee1b 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBlobFileAttributes.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureBlobFileAttributes.java @@ -24,7 +24,7 @@ import java.util.function.Supplier; /** - * File attributes associated with a file stored as a blob in Azure Storage. + * Provides support for attributes associated with a file stored as a blob in Azure Storage. *

    * Some of the attributes inherited from {@link BasicFileAttributes} are not supported. See the docs on each method for * more information. @@ -32,10 +32,11 @@ public final class AzureBlobFileAttributes implements BasicFileAttributes { /* Some blob properties do not have getters as they do not make sense in the context of nio. These properties are: - - incremental snapshot related properties - - lease related properties - - sequence number - - encryption key sha256 + - incremental snapshot related properties (only for page blobs) + - lease related properties (leases not currently supported) + - sequence number (only for page blobs) + - encryption key sha256 (cpk not supported) + - committed block count (only for append blobs) */ private final ClientLogger logger = new ClientLogger(AzureBlobFileAttributes.class); @@ -69,7 +70,6 @@ static Map> getAttributeSuppliers(AzureBlobFileAttribut map.put("archiveStatus", attributes::archiveStatus); map.put("accessTierChangeTime", attributes::accessTierChangeTime); map.put("metadata", attributes::metadata); - map.put("committedBlockCount", attributes::committedBlockCount); map.put("isRegularFile", attributes::isRegularFile); map.put("isDirectory", attributes::isDirectory); map.put("isSymbolicLink", attributes::isSymbolicLink); @@ -79,7 +79,9 @@ static Map> getAttributeSuppliers(AzureBlobFileAttribut } /** - * {@inheritDoc} + * Returns the creation time. The creation time is the time that the file was created. + * + * @return The creation time. */ @Override public FileTime creationTime() { @@ -87,7 +89,9 @@ public FileTime creationTime() { } /** - * {@inheritDoc} + * Returns the time of last modification. + * + * @return the time of last modification. */ @Override public FileTime lastModifiedTime() { @@ -95,6 +99,8 @@ public FileTime lastModifiedTime() { } /** + * Returns the eTag of the blob. + * * @return the eTag of the blob */ public String eTag() { @@ -102,6 +108,8 @@ public String eTag() { } /** + * Returns the {@link BlobHttpHeaders} of the blob. + * * @return {@link BlobHttpHeaders} */ public BlobHttpHeaders blobHttpHeaders() { @@ -120,6 +128,8 @@ public BlobHttpHeaders blobHttpHeaders() { } /** + * Returns the type of the blob. + * * @return the type of the blob */ public BlobType blobType() { @@ -127,92 +137,116 @@ public BlobType blobType() { } /** - * @return the identifier of the last copy operation. If this blob hasn't been the target of a copy operation or has + * Returns the identifier of the last copy operation. If this blob hasn't been the target of a copy operation or has * been modified since this won't be set. + * + * @return the identifier of the last copy operation. */ public String copyId() { return this.properties.getCopyId(); } /** - * @return the status of the last copy operation. If this blob hasn't been the target of a copy operation or has + * Returns the status of the last copy operation. If this blob hasn't been the target of a copy operation or has * been modified since this won't be set. + * + * @return the status of the last copy operation. */ public CopyStatusType copyStatus() { return this.properties.getCopyStatus(); } /** - * @return the source blob URL from the last copy operation. If this blob hasn't been the target of a copy operation + * Returns the source blob URL from the last copy operation. If this blob hasn't been the target of a copy operation * or has been modified since this won't be set. + * + * @return the source blob URL from the last copy operation. */ public String copySource() { return this.properties.getCopySource(); } /** - * @return the number of bytes copied and total bytes in the source from the last copy operation (bytes copied/total + * Returns the number of bytes copied and total bytes in the source from the last copy operation (bytes copied/total * bytes). If this blob hasn't been the target of a copy operation or has been modified since this won't be set. + * + * @return the number of bytes copied and total bytes in the source from the last copy operation */ public String copyProgress() { return this.properties.getCopyProgress(); } /** - * @return the completion time of the last copy operation. If this blob hasn't been the target of a copy operation + * Returns the completion time of the last copy operation. If this blob hasn't been the target of a copy operation * or has been modified since this won't be set. + * + * @return the completion time of the last copy operation. */ public OffsetDateTime copyCompletionTime() { return this.properties.getCopyCompletionTime(); } /** - * @return the description of the last copy failure, this is set when the {@link #copyStatus() getCopyStatus} is + * Returns the description of the last copy failure, this is set when the {@link #copyStatus() getCopyStatus} is * {@link CopyStatusType#FAILED failed} or {@link CopyStatusType#ABORTED aborted}. If this blob hasn't been the * target of a copy operation or has been modified since this won't be set. + * + * @return the description of the last copy failure. */ public String copyStatusDescription() { return this.properties.getCopyStatusDescription(); } /** - * @return the status of the blob being encrypted on the server + * Returns the status of the blob being encrypted on the server. + * + * @return the status of the blob being encrypted on the server. */ public Boolean isServerEncrypted() { return this.properties.isServerEncrypted(); } /** - * @return the tier of the blob. This is only set for Page blobs on a premium storage account or for Block blobs on + * Returns the tier of the blob. This is only set for Page blobs on a premium storage account or for Block blobs on * blob storage or general purpose V2 account. + * + * @return the tier of the blob. */ public AccessTier accessTier() { return this.properties.getAccessTier(); } /** - * @return the status of the tier being inferred for the blob. This is only set for Page blobs on a premium storage + * Returns the status of the tier being inferred for the blob. This is only set for Page blobs on a premium storage * account or for Block blobs on blob storage or general purpose V2 account. + * + * @return the status of the tier being inferred for the blob. */ public Boolean isAccessTierInferred() { return this.properties.isAccessTierInferred(); } /** - * @return the archive status of the blob. This is only for blobs on a blob storage and general purpose v2 account. + * Returns the archive status of the blob. This is only for blobs on a blob storage and general purpose v2 account. + * + * @return the archive status of the blob. */ public ArchiveStatus archiveStatus() { return this.properties.getArchiveStatus(); } /** - * @return the time when the access tier for the blob was last changed + * Returns the time when the access tier for the blob was last changed. + * + * @return the time when the access tier for the blob was last changed. */ public OffsetDateTime accessTierChangeTime() { return this.properties.getAccessTierChangeTime(); } /** + * Returns the metadata associated with this blob. + * * @return the metadata associated with this blob */ public Map metadata() { @@ -220,24 +254,22 @@ public Map metadata() { } /** - * @return the number of committed blocks in the blob. This is only returned for Append blobs. - */ - public Integer committedBlockCount() { - return this.properties.getCommittedBlockCount(); - } - - /** - * Unsupported. - * @throws UnsupportedOperationException Operation not supported. - * {@inheritDoc} + * Returns the time of last modification. + *

    + * Last access time is not supported by the blob service. In this case, it is typical for implementations to return + * the {@link #lastModifiedTime()}. + * + * @return the time of last modification. */ @Override public FileTime lastAccessTime() { - throw new UnsupportedOperationException(); + return this.lastModifiedTime(); } /** - * {@inheritDoc} + * Tells whether the file is a regular file with opaque content. + * + * @return whether the file is a regular file. */ @Override public boolean isRegularFile() { @@ -245,11 +277,13 @@ public boolean isRegularFile() { } /** - * {@inheritDoc} + * Tells whether the file is a directory. *

    * Will only return true if the directory is a concrete directory. See * {@link AzureFileSystemProvider#createDirectory(Path, FileAttribute[])} for more information on virtual and * concrete directories. + * + * @return whether the file is a directory */ @Override public boolean isDirectory() { @@ -257,6 +291,8 @@ public boolean isDirectory() { } /** + * Tells whether the file is a symbolic link. + * * @return false. Symbolic links are not supported. */ @Override @@ -265,7 +301,9 @@ public boolean isSymbolicLink() { } /** - * @return false + * Tells whether the file is something other than a regular file, directory, or symbolic link. + * + * @return false. No other object types are supported. */ @Override public boolean isOther() { @@ -273,7 +311,9 @@ public boolean isOther() { } /** - * {@inheritDoc} + * Returns the size of the file (in bytes). + * + * @return the size of the file */ @Override public long size() { @@ -283,7 +323,6 @@ public long size() { /** * Unsupported. * @throws UnsupportedOperationException Operation not supported. - * {@inheritDoc} */ @Override public Object fileKey() { diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureDirectoryStream.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureDirectoryStream.java index b8b92e0c39ef..2ae98a2bd094 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureDirectoryStream.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureDirectoryStream.java @@ -26,7 +26,7 @@ * * {@inheritDoc} */ -public class AzureDirectoryStream implements DirectoryStream { +public final class AzureDirectoryStream implements DirectoryStream { private final ClientLogger logger = new ClientLogger(AzureDirectoryStream.class); private final AzurePath path; diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileStore.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileStore.java index bf5507446bef..8495b7d334d1 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileStore.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileStore.java @@ -13,14 +13,13 @@ import java.util.Objects; /** - * An {@code AzureFileStore} is backed by an Azure Blob Storage container. - * - * {@inheritDoc} + * An {@code AzureFileStore} is a {@link FileStore} backed by an Azure Blob Storage container. */ public final class AzureFileStore extends FileStore { + private final ClientLogger logger = new ClientLogger(AzureFileStore.class); + private static final String AZURE_FILE_STORE_TYPE = "AzureBlobContainer"; - private final ClientLogger logger = new ClientLogger(AzureFileStore.class); private final AzureFileSystem parentFileSystem; private final BlobContainerClient containerClient; @@ -48,7 +47,7 @@ public final class AzureFileStore extends FileStore { /** * Returns the name of the container that underlies this file store. * - * {@inheritDoc} + * @return the name of the container that underlies this file store. */ @Override public String name() { @@ -59,7 +58,7 @@ public String name() { * Returns the {@code String "AzureBlobContainer"} to indicate that the file store is backed by a remote blob * container in Azure Storage. * - * {@inheritDoc} + * @return {@code "AzureBlobContainer"} */ @Override public String type() { @@ -67,12 +66,14 @@ public String type() { } /** - * Always returns false. It may be the case that the authentication method provided to this file system only + * Always returns false. + *

    + * It may be the case that the authentication method provided to this file system only * supports read operations and hence the file store is implicitly read only in this view, but that does not * imply the underlying container/file store is inherently read only. Creating/specifying read only file stores * is not currently supported. * - * {@inheritDoc} + * @return false. */ @Override public boolean isReadOnly() { @@ -80,9 +81,12 @@ public boolean isReadOnly() { } /** + * Returns the size, in bytes, of the file store. + *

    * Containers do not limit the amount of data stored. This method will always return max long. * - * {@inheritDoc} + * @return the size of the file store. + * @throws IOException If an I/O error occurs. */ @Override public long getTotalSpace() throws IOException { @@ -90,9 +94,12 @@ public long getTotalSpace() throws IOException { } /** + * Returns the number of bytes available to this Java virtual machine on the file store. + *

    * Containers do not limit the amount of data stored. This method will always return max long. * - * {@inheritDoc} + * @return the number of bytes available on the file store. + * @throws IOException If an I/O error occurs. */ @Override public long getUsableSpace() throws IOException { @@ -100,9 +107,12 @@ public long getUsableSpace() throws IOException { } /** + * Returns the number of unallocated bytes in the file store. + *

    * Containers do not limit the amount of data stored. This method will always return max long. * - * {@inheritDoc} + * @return the number of unallocated bytes in the file store. + * @throws IOException If an I/O error occurs. */ @Override public long getUnallocatedSpace() throws IOException { @@ -110,39 +120,48 @@ public long getUnallocatedSpace() throws IOException { } /** + * Tells whether or not this file store supports the file attributes identified by the given file attribute view. + *

    * All file stores in this file system support the following views: *

      *
    • {@link java.nio.file.attribute.BasicFileAttributeView}
    • - *
    • {@link java.nio.file.attribute.UserDefinedFileAttributeView}
    • *
    • {@link AzureBasicFileAttributeView}
    • + *
    • {@link AzureBlobFileAttributeView}
    • *
    * - * {@inheritDoc} + * @param type the file attribute view type + * @return Whether the file attribute view is supported. */ @Override - public boolean supportsFileAttributeView(Class aClass) { - return AzureFileSystem.SUPPORTED_ATTRIBUTE_VIEWS.containsKey(aClass); + public boolean supportsFileAttributeView(Class type) { + return AzureFileSystem.SUPPORTED_ATTRIBUTE_VIEWS.containsKey(type); } /** + * Tells whether or not this file store supports the file attributes identified by the given file attribute view. + *

    * All file stores in this file system support the following views: *

      *
    • {@link java.nio.file.attribute.BasicFileAttributeView}
    • - *
    • {@link java.nio.file.attribute.UserDefinedFileAttributeView}
    • *
    • {@link AzureBasicFileAttributeView}
    • + *
    • {@link AzureBlobFileAttributeView}
    • *
    * - * {@inheritDoc} + * @param name the name of the file attribute view + * @return whether the file attribute view is supported. */ @Override - public boolean supportsFileAttributeView(String s) { - return AzureFileSystem.SUPPORTED_ATTRIBUTE_VIEWS.containsValue(s); + public boolean supportsFileAttributeView(String name) { + return AzureFileSystem.SUPPORTED_ATTRIBUTE_VIEWS.containsValue(name); } /** + * Returns a FileStoreAttributeView of the given type. + *

    * This method always returns null as no {@link FileStoreAttributeView} is currently supported. * - * {@inheritDoc} + * @param aClass a class + * @return null */ @Override public V getFileStoreAttributeView(Class aClass) { @@ -150,10 +169,15 @@ public V getFileStoreAttributeView(Class a } /** + * Unsupported. + *

    * This method always throws an {@code UnsupportedOperationException} as no {@link FileStoreAttributeView} is * currently supported. * - * {@inheritDoc} + * @param s a string + * @return The attribute value. + * @throws UnsupportedOperationException unsupported + * @throws IOException never */ @Override public Object getAttribute(String s) throws IOException { diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileSystem.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileSystem.java index 423264e135b5..6e661d75ec75 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileSystem.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileSystem.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.nio.file.FileStore; import java.nio.file.FileSystem; +import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.PathMatcher; import java.nio.file.WatchService; @@ -31,16 +32,25 @@ import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.regex.PatternSyntaxException; import java.util.stream.Collectors; /** + * Implement's Java's {@link FileSystem} interface for Azure Blob Storage. + *

    + * The following behavior is specific to this FileSystem: + *

    * In the hierarchy of this file system, an {@code AzureFileSystem} corresponds to an Azure Blob Storage account. A * file store is represented by a container in the storage account. Each container has one root directory. - * + *

    * Closing the file system will not block on outstanding operations. Any operations in progress will be allowed to * terminate naturally after the file system is closed, though no further operations may be started after the parent * file system is closed. - * {@inheritDoc} + *

    + * All instance of {@code AzureFileSystem} are opened for read-write access. + *

    + * For a more complete description of the uses for the constants described here, please see the instructions for opening + * and configuring a FileSystem in the docs of {@link FileSystemProvider}. */ public final class AzureFileSystem extends FileSystem { private final ClientLogger logger = new ClientLogger(AzureFileSystem.class); @@ -115,9 +125,13 @@ public final class AzureFileSystem extends FileSystem { * Expected type: Boolean */ public static final String AZURE_STORAGE_USE_HTTPS = "AzureStorageUseHttps"; + static final String AZURE_STORAGE_HTTP_CLIENT = "AzureStorageHttpClient"; // undocumented; for test. static final String AZURE_STORAGE_HTTP_POLICIES = "AzureStorageHttpPolicies"; // undocumented; for test. + /** + * Expected type: String + */ public static final String AZURE_STORAGE_FILE_STORES = "AzureStorageFileStores"; static final String PATH_SEPARATOR = "/"; @@ -174,7 +188,9 @@ public final class AzureFileSystem extends FileSystem { } /** - * {@inheritDoc} + * Returns the provider that created this file system. + * + * @return the provider that created this file system. */ @Override public FileSystemProvider provider() { @@ -182,12 +198,19 @@ public FileSystemProvider provider() { } /** + * Closes this file system. + *

    + * After a file system is closed then all subsequent access to the file system, either by methods defined by this + * class or on objects associated with this file system, throw ClosedFileSystemException. If the file system is + * already closed then invoking this method has no effect. + *

    * Closing the file system will not block on outstanding operations. Any operations in progress will be allowed to * terminate naturally after the file system is closed, though no further operations may be started after the * parent file system is closed. - * + *

    * Once closed, a file system with the same identifier as the one closed may be re-opened. - * {@inheritDoc} + * + * @throws IOException If an I/O error occurs. */ @Override public void close() throws IOException { @@ -196,7 +219,9 @@ public void close() throws IOException { } /** - * {@inheritDoc} + * Tells whether or not this file system is open. + * + * @return whether or not this file system is open. */ @Override public boolean isOpen() { @@ -204,12 +229,14 @@ public boolean isOpen() { } /** + * Tells whether or not this file system allows only read-only access to its file stores. + *

    * Always returns false. It may be the case that the authentication method provided to this file system only * supports read operations and hence the file system is implicitly read only in this view, but that does not * imply the underlying account/file system is inherently read only. Creating/specifying read only file * systems is not supported. * - * {@inheritDoc} + * @return false */ @Override public boolean isReadOnly() { @@ -217,9 +244,11 @@ public boolean isReadOnly() { } /** + * Returns the name separator, represented as a string. + *

    * The separator used in this file system is {@code "/"}. * - * {@inheritDoc} + * @return "/" */ @Override public String getSeparator() { @@ -227,50 +256,60 @@ public String getSeparator() { } /** + * Returns an object to iterate over the paths of the root directories. + *

    * The list of root directories corresponds to the list of available file stores and therefore containers specified - * upon initialization. A root directory always takes the form {@code "<file-store-name>:"}. This list will + * upon initialization. A root directory always takes the form {@code ":"}. This list will * respect the parameters provided during initialization. *

    * If a finite list of containers was provided on start up, this list will not change during the lifetime of this * object. If containers are added to the account after initialization, they will be ignored. If a container is * deleted or otherwise becomes unavailable, its root directory will still be returned but operations to it will - * fail. If the file system was set to use all containers in the account, the account will be re-queried and the - * list may grow or shrink if containers were added or deleted. + * fail. * - * {@inheritDoc} + * @return an object to iterate over the paths of the root directories */ @Override public Iterable getRootDirectories() { + /* + Should we add different initialization options later: + If the file system was set to use all containers in the account, the account will be re-queried and the + list may grow or shrink if containers were added or deleted. + */ return fileStores.keySet().stream() .map(name -> this.getPath(name + AzurePath.ROOT_DIR_SUFFIX)) .collect(Collectors.toList()); } /** + * Returns an object to iterate over the underlying file stores + *

    * This list will respect the parameters provided during initialization. *

    * If a finite list of containers was provided on start up, this list will not change during the lifetime of this * object. If containers are added to the account after initialization, they will be ignored. If a container is * deleted or otherwise becomes unavailable, its root directory will still be returned but operations to it will - * fail. If the file system was set to use all containers in the account, the account will be re-queried and the - * list may grow or shrink if containers were added or deleted. - * - * {@inheritDoc} + * fail. */ @Override public Iterable getFileStores() { + /* + Should we add different intialization options later: + If the file system was set to use all containers in the account, the account will be re-queried and the + list may grow or shrink if containers were added or deleted. + */ return this.fileStores.values(); } /** + * Returns the set of the names of the file attribute views supported by this FileSystem. + *

    * This file system supports the following views: *

      *
    • {@link java.nio.file.attribute.BasicFileAttributeView}
    • - *
    • {@link java.nio.file.attribute.UserDefinedFileAttributeView}
    • *
    • {@link AzureBasicFileAttributeView}
    • + *
    • {@link AzureBlobFileAttributeView}
    • *
    - * - * {@inheritDoc} */ @Override public Set supportedFileAttributeViews() { @@ -278,33 +317,46 @@ public Set supportedFileAttributeViews() { } /** - * Each name element will be {@code String}-joined to the other elements by this file system's path separator. + * Converts a path string, or a sequence of more that when joined form a path string, to a Path. + *

    + * If more does not specify any elements then the value of the first parameter is the path string to convert. If + * more specifies one or more elements then each non-empty string, including first, is considered to be a sequence + * of name elements (see Path) and is joined to form a path string. The more will be joined using the name + * separator. + *

    + * Each name element will be {@code String}-joined to the other elements by this file system'first path separator. * Naming conventions and allowed characters are as * defined * by the Azure Blob Storage service. The root component is interpreted as the container name and all name elements * are interpreted as a part of the blob name. The character {@code ':'} is only allowed in the root component and * must be the last character of the root component. * - * {@inheritDoc} + * @param first the path string or initial part of the path string + * @param more additional strings to be joined to form the path string + * @throws InvalidPathException if the path string cannot be converted. */ @Override - public Path getPath(String s, String... strings) { - return new AzurePath(this, s, strings); + public Path getPath(String first, String... more) { + return new AzurePath(this, first, more); } /** * Unsupported. * - * {@inheritDoc} + * @param s the matcher + * @throws UnsupportedOperationException unsupported. + * @throws IllegalArgumentException never + * @throws PatternSyntaxException never */ @Override - public PathMatcher getPathMatcher(String s) { + public PathMatcher getPathMatcher(String s) throws IllegalArgumentException, PatternSyntaxException { throw LoggingUtility.logError(logger, new UnsupportedOperationException()); } /** * Unsupported. - * {@inheritDoc} + * + * @throws UnsupportedOperationException unsupported. */ @Override public UserPrincipalLookupService getUserPrincipalLookupService() { @@ -314,7 +366,8 @@ public UserPrincipalLookupService getUserPrincipalLookupService() { /** * Unsupported. * - * {@inheritDoc} + * @throws UnsupportedOperationException unsupported. + * @throws IOException never. */ @Override public WatchService newWatchService() throws IOException { diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileSystemProvider.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileSystemProvider.java index c212b1b35c35..1cee2ebd2c90 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileSystemProvider.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzureFileSystemProvider.java @@ -76,7 +76,7 @@ * {@link FileSystemProvider}. *

    * The scheme for this provider is {@code "azb"}, and the format of the URI to identify an {@code AzureFileSystem} is - * {@code "azb://?account=<accountName>"}. The name of the Storage account is used to uniquely identify the file + * {@code "azb://?account="}. The name of the Storage account is used to uniquely identify the file * system. *

    * An {@link AzureFileSystem} is backed by an account. An {@link AzureFileStore} is backed by a container. Any number of @@ -125,11 +125,34 @@ public final class AzureFileSystemProvider extends FileSystemProvider { private final ClientLogger logger = new ClientLogger(AzureFileSystemProvider.class); + /** + * A helper for setting the HTTP properties when creating a directory. + */ public static final String CONTENT_TYPE = "Content-Type"; + + /** + * A helper for setting the HTTP properties when creating a directory. + */ public static final String CONTENT_DISPOSITION = "Content-Disposition"; + + /** + * A helper for setting the HTTP properties when creating a directory. + */ public static final String CONTENT_LANGUAGE = "Content-Language"; + + /** + * A helper for setting the HTTP properties when creating a directory. + */ public static final String CONTENT_ENCODING = "Content-Encoding"; + + /** + * A helper for setting the HTTP properties when creating a directory. + */ public static final String CONTENT_MD5 = "Content-MD5"; + + /** + * A helper for setting the HTTP properties when creating a directory. + */ public static final String CACHE_CONTROL = "Cache-Control"; private static final String ACCOUNT_QUERY_KEY = "account"; @@ -147,7 +170,9 @@ public AzureFileSystemProvider() { } /** - * Returns {@code "azb".} + * Returns the URI scheme that identifies this provider: {@code "azb".} + * + * @return {@code "azb"} */ @Override public String getScheme() { @@ -155,10 +180,20 @@ public String getScheme() { } /** - * The format of a {@code URI} identifying a file system is {@code "azb://?account=<accountName>"}. + * Constructs a new FileSystem object identified by a URI. + *

    + * The format of a {@code URI} identifying a file system is {@code "azb://?account="}. *

    * Once closed, a file system with the same identifier may be reopened. - * {@inheritDoc} + * + * @param uri URI reference + * @param config A map of provider specific properties to configure the file system + * @return a new file system. + * @throws IllegalArgumentException If the pre-conditions for the uri parameter aren't met, or the env parameter + * does not contain properties required by the provider, or a property value is invalid. + * @throws IOException If an I/O error occurs. + * @throws SecurityException never + * @throws FileSystemAlreadyExistsException If the file system has already been created. */ @Override public FileSystem newFileSystem(URI uri, Map config) throws IOException { @@ -175,11 +210,18 @@ public FileSystem newFileSystem(URI uri, Map config) throws IOExcepti } /** + * Returns an existing FileSystem created by this provider. + *

    * The format of a {@code URI} identifying an file system is {@code "azb://?account=<accountName>"}. *

    * Trying to retrieve a closed file system will throw a {@link FileSystemNotFoundException}. Once closed, a * file system with the same identifier may be reopened. - * {@inheritDoc} + * + * @param uri URI reference + * @return the file system + * @throws IllegalArgumentException If the pre-conditions for the uri parameter aren't met + * @throws FileSystemNotFoundException If the file system already exists + * @throws SecurityException never */ @Override public FileSystem getFileSystem(URI uri) { @@ -191,7 +233,17 @@ public FileSystem getFileSystem(URI uri) { } /** - * {@inheritDoc} + * Return a Path object by converting the given URI. The resulting Path is associated with a FileSystem that already + * exists. + * + * @param uri The URI to convert + * @return The path identified by the URI. + * @throws IllegalArgumentException If the URI scheme does not identify this provider or other preconditions on the + * uri parameter do not hold + * @throws FileSystemNotFoundException if the file system identified by the query does not exist + * @throws SecurityException never + * + * @see #getFileSystem(URI) for information on the URI format */ @Override public Path getPath(URI uri) { @@ -199,8 +251,19 @@ public Path getPath(URI uri) { } /** + * Unsupported. Use {@link #newInputStream(Path, OpenOption...)} or {@link #newOutputStream(Path, OpenOption...)} + * instead. + * + * @param path the Path + * @param set open options + * @param fileAttributes attributes + * @return a new seekable byte channel * @throws UnsupportedOperationException Operation is not supported. - * {@inheritDoc} + * @throws IllegalArgumentException if the set contains an invalid combination of options + * @throws FileAlreadyExistsException if a file of that name already exists and the CREATE_NEW option is specified + * (optional specific exception) + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public SeekableByteChannel newByteChannel(Path path, Set set, @@ -217,7 +280,13 @@ public SeekableByteChannel newByteChannel(Path path, Set s *

    * Only {@link StandardOpenOption#READ} is supported. Any other option will throw. * - * {@inheritDoc} + * @param path the path to the file to open + * @param options options specifying how the file is opened + * @return a new input stream + * @throws IllegalArgumentException if an invalid combination of options is specified + * @throws UnsupportedOperationException if an unsupported option is specified + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public InputStream newInputStream(Path path, OpenOption... options) throws IOException { @@ -267,7 +336,13 @@ public InputStream newInputStream(Path path, OpenOption... options) throws IOExc * This can be a useful tool because writing happens asynchronously, and therefore an error from a previous write * may not otherwise be thrown unless the stream is flushed, closed, or written to again. * - * {@inheritDoc} + * @param path the path to the file to open or create + * @param options options specifying how the file is opened + * @return a new output stream + * @throws IllegalArgumentException if an invalid combination of options is specified + * @throws UnsupportedOperationException if an unsupported option is specified + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public OutputStream newOutputStream(Path path, OpenOption... options) throws IOException { @@ -340,10 +415,25 @@ public OutputStream newOutputStream(Path path, OpenOption... options) throws IOE } /** - * Returns an {@link AzureDirectoryStream} for iterating over the contents of a directory. + * Returns an {@link AzureDirectoryStream} for iterating over the contents of a directory. The elements returned by + * the directory stream's iterator are of type Path, each one representing an entry in the directory. The Path + * objects are obtained as if by resolving the name of the directory entry against dir. The entries returned by the + * iterator are filtered by the given filter. + *

    + * When not using the try-with-resources construct, then directory stream's close method should be invoked after + * iteration is completed so as to free any resources held for the open directory. + *

    + * Where the filter terminates due to an uncaught error or runtime exception then it is propagated to the hasNext or + * next method. Where an IOException is thrown, it results in the hasNext or next method throwing a + * DirectoryIteratorException with the IOException as the cause. * - * {@inheritDoc} + * @param path the path to the directory + * @param filter the directory stream filter + * @return a new and open {@code DirectoryStream} object * @throws IllegalArgumentException If the path type is not an instance of {@link AzurePath}. + * @throws NotDirectoryException if the file could not otherwise be opened because it is not a directory + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public DirectoryStream newDirectoryStream(Path path, DirectoryStream.Filter filter) @@ -399,7 +489,8 @@ public DirectoryStream newDirectoryStream(Path path, DirectoryStream.Filte * location. In other words, it is possible to "double create" a directory if it first weakly exists and then is * strongly created. This is both because it is impossible to atomically check if a virtual directory exists while * creating a concrete directory and because such behavior will have minimal side effects--no files will be - * overwritten and the directory will still be available for writing as intended, though it may not be empty. + * overwritten and the directory will still be available for writing as intended, though it may not be empty. This + * is not a complete list of such unintuitive behavior. *

    * This method will attempt to extract standard HTTP content headers from the list of file attributes to set them * as blob headers. All other attributes will be set as blob metadata. The value of every attribute will be @@ -419,8 +510,15 @@ public DirectoryStream newDirectoryStream(Path path, DirectoryStream.Filte * Azure Docs for more * information. * - * {@inheritDoc} + * @param path the directory to create + * @param fileAttributes an optional list of file attributes to set atomically when creating the directory * @throws IllegalArgumentException If the path type is not an instance of {@link AzurePath}. + * @throws UnsupportedOperationException if the array contains an attribute that cannot be set atomically when + * creating the directory + * @throws FileAlreadyExistsException if a directory could not otherwise be created because a file of that name + * already exists + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public void createDirectory(Path path, FileAttribute... fileAttributes) throws IOException { @@ -453,12 +551,17 @@ public void createDirectory(Path path, FileAttribute... fileAttributes) throw /** * Deletes the specified resource. *

    - * This method is not atomic. It is possible to delete a file in use by another process, and doing so will not - * immediately invalidate any channels open to that file--they will simply start to fail. Root directories cannot be - * deleted even when empty. - * {@inheritDoc} + * This method is not atomic with respect to other file system operations. It is possible to delete a file in use by + * another process, and doing so will not immediately invalidate any channels open to that file--they will simply + * start to fail. Root directories cannot be deleted even when empty. * + * @param path the path to the file to delete * @throws IllegalArgumentException If the path type is not an instance of {@link AzurePath}. + * @throws NoSuchFileException if the file does not exist + * @throws DirectoryNotEmptyException if the file is a directory and could not otherwise be deleted because the + * directory is not empty + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public void delete(Path path) throws IOException { @@ -488,26 +591,36 @@ public void delete(Path path) throws IOException { /** * Copies the resource at the source location to the destination. *

    - * This method is not atomic. More specifically, the checks necessary to validate the - * inputs and state of the file system are not atomic with the actual copying of data. If the copy is triggered, - * the copy itself is atomic and only a complete copy will ever be left at the destination. + * This method is not atomic with respect to other file system operations. More specifically, the checks necessary + * to validate the inputs and state of the file system are not atomic with the actual copying of data. If the copy + * is triggered, the copy itself is atomic and only a complete copy will ever be left at the destination. + *

    + * In addition to those in the docs for {@link FileSystemProvider#copy(Path, Path, CopyOption...)}, this method has + * the following requirements for successful completion. {@link StandardCopyOption#COPY_ATTRIBUTES} must be passed + * as it is impossible not to copy blob properties; if this option is not passed, an + * {@link UnsupportedOperationException} will be thrown. Neither the source nor the destination can be a root + * directory; if either is a root directory, an {@link IllegalArgumentException} will be thrown. The parent + * directory of the destination must at least weakly exist; if it does not, an {@link IOException} will be thrown. + * The only supported option other than {@link StandardCopyOption#COPY_ATTRIBUTES} is + * {@link StandardCopyOption#REPLACE_EXISTING}; the presence of any other option will result in an + * {@link UnsupportedOperationException}. *

    - * In addition to those in the nio javadocs, this method has the following requirements for successful completion. - * {@link StandardCopyOption#COPY_ATTRIBUTES} must be passed as it is impossible not to copy blob properties; - * if this option is not passed, an {@link UnsupportedOperationException} will be thrown. Neither the source nor the - * destination can be a root directory; if either is a root directory, an {@link IllegalArgumentException} will be - * thrown. The parent directory of the destination must at least weakly exist; if it does not, an - * {@link IOException} will be thrown. The only supported option other than - * {@link StandardCopyOption#COPY_ATTRIBUTES} is {@link StandardCopyOption#REPLACE_EXISTING}; the presence of any - * other option will result in an {@link UnsupportedOperationException}. - * * This method supports both virtual and concrete directories as both the source and destination. Unlike when * creating a directory, the existence of a virtual directory at the destination will cause this operation to fail. * This is in order to prevent the possibility of overwriting a non-empty virtual directory with a file. Still, as * mentioned above, this check is not atomic with the creation of the resultant directory. * - * {@inheritDoc} + * @param source the path to the file to copy + * @param destination the path to the target file + * @param copyOptions specifying how the copy should be done + * @throws UnsupportedOperationException if the array contains a copy option that is not supported + * @throws FileAlreadyExistsException if the target file exists but cannot be replaced because the REPLACE_EXISTING + * option is not specified + * @throws DirectoryNotEmptyException the REPLACE_EXISTING option is specified but the file cannot be replaced + * because it is a non-empty directory + * @throws IOException If an I/O error occurs. * @throws IllegalArgumentException If the path type is not an instance of {@link AzurePath}. + * @throws SecurityException never * @see #createDirectory(Path, FileAttribute[]) for more information about directory existence. */ @Override @@ -612,8 +725,12 @@ public void copy(Path source, Path destination, CopyOption... copyOptions) throw }*/ /** + * Unsupported. + * + * @param path path + * @param path1 path + * @param copyOptions options * @throws UnsupportedOperationException Operation is not supported. - * {@inheritDoc} */ @Override public void move(Path path, Path path1, CopyOption... copyOptions) throws IOException { @@ -621,8 +738,11 @@ public void move(Path path, Path path1, CopyOption... copyOptions) throws IOExce } /** + * Unsupported. + * + * @param path path + * @param path1 path * @throws UnsupportedOperationException Operation is not supported. - * {@inheritDoc} */ @Override public boolean isSameFile(Path path, Path path1) throws IOException { @@ -630,7 +750,12 @@ public boolean isSameFile(Path path, Path path1) throws IOException { } /** - * {@inheritDoc} + * Always returns false as hidden files are not supported. + * + * @param path the path + * @return false + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public boolean isHidden(Path path) throws IOException { @@ -638,8 +763,13 @@ public boolean isHidden(Path path) throws IOException { } /** + * Unsupported. + * + * @param path path + * @return the file store where the file is stored. * @throws UnsupportedOperationException Operation is not supported. - * {@inheritDoc} + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public FileStore getFileStore(Path path) throws IOException { @@ -647,8 +777,16 @@ public FileStore getFileStore(Path path) throws IOException { } /** + * Unsupported. + * + * @param path path + * @param accessModes accessMode * @throws UnsupportedOperationException Operation is not supported. - * {@inheritDoc} + * @throws NoSuchFileException if a file does not exist + * @throws java.nio.file.AccessDeniedException the requested access would be denied or the access cannot be + * determined because the Java virtual machine has insufficient privileges or other reasons + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override public void checkAccess(Path path, AccessMode... accessModes) throws IOException { @@ -657,23 +795,27 @@ public void checkAccess(Path path, AccessMode... accessModes) throws IOException /** * Returns a file attribute view of a given type. - * + *

    * See {@link AzureBasicFileAttributeView} and {@link AzureBlobFileAttributeView} for more information. - * + *

    * Reading or setting attributes on a virtual directory is not supported and will throw an {@link IOException}. See * {@link #createDirectory(Path, FileAttribute[])} for more information on virtual directories. - * {@inheritDoc} + * + * @param path the path to the file + * @param type the Class object corresponding to the file attribute view + * @param linkOptions ignored + * @return a file attribute view of the specified type, or null if the attribute view type is not available */ @Override @SuppressWarnings("unchecked") - public V getFileAttributeView(Path path, Class aClass, LinkOption... linkOptions) { + public V getFileAttributeView(Path path, Class type, LinkOption... linkOptions) { /* No resource validation is necessary here. That can happen at the time of making a network requests internal to the view object. */ - if (aClass == BasicFileAttributeView.class || aClass == AzureBasicFileAttributeView.class) { + if (type == BasicFileAttributeView.class || type == AzureBasicFileAttributeView.class) { return (V) new AzureBasicFileAttributeView(path); - } else if (aClass == AzureBlobFileAttributeView.class) { + } else if (type == AzureBlobFileAttributeView.class) { return (V) new AzureBlobFileAttributeView(path); } else { return null; @@ -682,21 +824,28 @@ public V getFileAttributeView(Path path, Class /** * Reads a file's attributes as a bulk operation. - * + *

    * See {@link AzureBasicFileAttributes} and {@link AzureBlobFileAttributes} for more information. - * + *

    * Reading attributes on a virtual directory is not supported and will throw an {@link IOException}. See * {@link #createDirectory(Path, FileAttribute[])} for more information on virtual directories. - * {@inheritDoc} + * + * @param path the path to the file + * @param type the Class of the file attributes required to read + * @param linkOptions ignored + * @return the file attributes + * @throws UnsupportedOperationException if an attributes of the given type are not supported + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override @SuppressWarnings("unchecked") - public A readAttributes(Path path, Class aClass, LinkOption... linkOptions) + public A readAttributes(Path path, Class type, LinkOption... linkOptions) throws IOException { Class view; - if (aClass == BasicFileAttributes.class || aClass == AzureBasicFileAttributes.class) { + if (type == BasicFileAttributes.class || type == AzureBasicFileAttributes.class) { view = AzureBasicFileAttributeView.class; - } else if (aClass == AzureBlobFileAttributes.class) { + } else if (type == AzureBlobFileAttributes.class) { view = AzureBlobFileAttributeView.class; } else { throw new UnsupportedOperationException(); @@ -711,16 +860,26 @@ public A readAttributes(Path path, Class aCla /** * Reads a set of file attributes as a bulk operation. - * + *

    * See {@link AzureBasicFileAttributes} and {@link AzureBlobFileAttributes} for more information. - * + *

    * Reading attributes on a virtual directory is not supported and will throw an {@link IOException}. See * {@link #createDirectory(Path, FileAttribute[])} for more information on virtual directories. - * {@inheritDoc} + * + * @param path the path to the file + * @param attributes the attributes to read + * @param linkOptions ignored + * @return a map of the attributes returned; may be empty. The map's keys are the attribute names, its values are + * the attribute values + * @throws UnsupportedOperationException if an attributes of the given type are not supported + * @throws IllegalArgumentException if no attributes are specified or an unrecognized attributes is specified + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override - public Map readAttributes(Path path, String s, LinkOption... linkOptions) throws IOException { - if (s == null) { + public Map readAttributes(Path path, String attributes, LinkOption... linkOptions) + throws IOException { + if (attributes == null) { throw LoggingUtility.logError(logger, new IllegalArgumentException("Attribute string cannot be null.")); } @@ -735,16 +894,16 @@ public Map readAttributes(Path path, String s, LinkOption... lin Map> attributeSuppliers = null; // Initialized later as needed. String viewType; String attributeList; - String[] parts = s.split(":"); + String[] parts = attributes.split(":"); if (parts.length > 2) { throw LoggingUtility.logError(logger, - new IllegalArgumentException("Invalid format for attribute string: " + s)); + new IllegalArgumentException("Invalid format for attribute string: " + attributes)); } if (parts.length == 1) { viewType = "basic"; // Per jdk docs. - attributeList = s; + attributeList = attributes; } else { viewType = parts[0]; attributeList = parts[1]; @@ -755,9 +914,9 @@ public Map readAttributes(Path path, String s, LinkOption... lin state that "basic" must be supported, so we funnel to azureBasic. */ if (viewType.equals("basic")) { - viewType = "azureBasic"; + viewType = AzureBasicFileAttributeView.NAME; } - if (!viewType.equals("azureBasic") && !viewType.equals("azureBlob")) { + if (!viewType.equals(AzureBasicFileAttributeView.NAME) && !viewType.equals(AzureBlobFileAttributeView.NAME)) { throw LoggingUtility.logError(logger, new UnsupportedOperationException("Invalid attribute view: " + viewType)); } @@ -768,7 +927,7 @@ public Map readAttributes(Path path, String s, LinkOption... lin should at least validate that the attribute is available on a basic view. */ // TODO: Put these strings in constants - if (viewType.equals("azureBasic")) { + if (viewType.equals(AzureBasicFileAttributeView.NAME)) { if (!AzureBasicFileAttributes.ATTRIBUTE_STRINGS.contains(attributeName) && !attributeName.equals("*")) { throw LoggingUtility.logError(logger, new IllegalArgumentException("Invalid attribute. View: " + viewType @@ -786,7 +945,7 @@ public Map readAttributes(Path path, String s, LinkOption... lin // If "*" is specified, add all of the attributes from the specified set. if (attributeName.equals("*")) { Set attributesToAdd; - if (viewType.equals("azureBasic")) { + if (viewType.equals(AzureBasicFileAttributeView.NAME)) { for (String attr : AzureBasicFileAttributes.ATTRIBUTE_STRINGS) { results.put(attr, attributeSuppliers.get(attr).get()); } @@ -811,7 +970,7 @@ public Map readAttributes(Path path, String s, LinkOption... lin // Throw if nothing specified per jdk docs. if (results.isEmpty()) { throw LoggingUtility.logError(logger, - new IllegalArgumentException("No attributes were specified. Attributes: " + s)); + new IllegalArgumentException("No attributes were specified. Attributes: " + attributes)); } return results; @@ -819,25 +978,36 @@ public Map readAttributes(Path path, String s, LinkOption... lin /** * Sets the value of a file attribute. - * + *

    * See {@link AzureBlobFileAttributeView} for more information. - * + *

    * Setting attributes on a virtual directory is not supported and will throw an {@link IOException}. See * {@link #createDirectory(Path, FileAttribute[])} for more information on virtual directories. - * {@inheritDoc} + * + * @param path the path to the file + * @param attributes the attribute to set + * @param value the attribute value + * @param linkOptions ignored + * @throws UnsupportedOperationException if an attribute view is not available + * @throws IllegalArgumentException if the attribute name is not specified, or is not recognized, or the attribute + * value is of the correct type but has an inappropriate value + * @throws ClassCastException If the attribute value is not of the expected type or is a collection containing + * elements that are not of the expected type + * @throws IOException If an I/O error occurs. + * @throws SecurityException never */ @Override - public void setAttribute(Path path, String s, Object o, LinkOption... linkOptions) throws IOException { + public void setAttribute(Path path, String attributes, Object value, LinkOption... linkOptions) throws IOException { String viewType; String attributeName; - String[] parts = s.split(":"); + String[] parts = attributes.split(":"); if (parts.length > 2) { throw LoggingUtility.logError(logger, - new IllegalArgumentException("Invalid format for attribute string: " + s)); + new IllegalArgumentException("Invalid format for attribute string: " + attributes)); } if (parts.length == 1) { viewType = "basic"; // Per jdk docs. - attributeName = s; + attributeName = attributes; } else { viewType = parts[0]; attributeName = parts[1]; @@ -848,15 +1018,15 @@ public void setAttribute(Path path, String s, Object o, LinkOption... linkOption state that "basic" must be supported, so we funnel to azureBasic. */ if (viewType.equals("basic")) { - viewType = "azureBasic"; + viewType = AzureBasicFileAttributeView.NAME; } // We don't actually support any setters on the basic view. - if (viewType.equals("azureBasic")) { + if (viewType.equals(AzureBasicFileAttributeView.NAME)) { throw LoggingUtility.logError(logger, new IllegalArgumentException("Invalid attribute. View: " + viewType + ". Attribute: " + attributeName)); - } else if (viewType.equals("azureBlob")) { + } else if (viewType.equals(AzureBlobFileAttributeView.NAME)) { Map> attributeConsumers = AzureBlobFileAttributeView.setAttributeConsumers( this.getFileAttributeView(path, AzureBlobFileAttributeView.class, linkOptions)); if (!attributeConsumers.containsKey(attributeName)) { @@ -866,7 +1036,7 @@ public void setAttribute(Path path, String s, Object o, LinkOption... linkOption + ". Attribute: " + attributeName)); } try { - attributeConsumers.get(attributeName).accept(o); + attributeConsumers.get(attributeName).accept(value); } catch (UncheckedIOException e) { if (e.getMessage().equals(AzureBlobFileAttributeView.ATTR_CONSUMER_ERROR)) { throw LoggingUtility.logError(logger, e.getCause()); diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzurePath.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzurePath.java index 9f2fb2449a3f..21b60b484ef5 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzurePath.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/AzurePath.java @@ -29,6 +29,8 @@ import java.util.stream.Stream; /** + * An object that may be used to locate a file in a file system. + *

    * The root component, if it is present, is the first element of the path and is denoted by a {@code ':'} as the last * character. Hence, only one instance of {@code ':'} may appear in a path string and it may only be the last character * of the first element in the path. The root component is used to identify which container a path belongs to. @@ -41,9 +43,9 @@ * If a resource is accessed via a relative path, it will be resolved against the default directory of the file system. * The default directory is as defined in the {@link AzureFileSystem} docs. *

    - * Leading and trailing separators will be stripped. This has the effect of making "foo/" and "foo" equivalent paths. - * - * {@inheritDoc} + * Leading and trailing separators will be stripped from each component passed to + * {@link AzureFileSystem#getPath(String, String...)}. This has the effect of treating "foo/" as though it were simply + * "foo". */ public final class AzurePath implements Path { private final ClientLogger logger = new ClientLogger(AzurePath.class); @@ -91,7 +93,9 @@ public final class AzurePath implements Path { } /** - * {@inheritDoc} + * Returns the file system that created this object. + * + * @return the file system that created this object */ @Override public FileSystem getFileSystem() { @@ -99,9 +103,12 @@ public FileSystem getFileSystem() { } /** - * A path is considered absolute in this file system if it contains a root component. + * Tells whether or not this path is absolute. + *

    + * An absolute path is complete in that it doesn't need to be combined with other path information in order to + * locate a file. A path is considered absolute in this file system if it contains a root component. * - * {@inheritDoc} + * @return whether the path is absolute */ @Override public boolean isAbsolute() { @@ -109,11 +116,13 @@ public boolean isAbsolute() { } /** + * Returns the root component of this path as a Path object, or null if this path does not have a root component. + *

    * The root component of this path also identifies the Azure Storage Container in which the file is stored. This * method will not validate that the root component corresponds to an actual file store/container in this * file system. It will simply return the root component of the path if one is present and syntactically valid. * - * {@inheritDoc} + * @return a path representing the root component of this path, or null */ @Override public Path getRoot() { @@ -126,7 +135,10 @@ public Path getRoot() { } /** - * {@inheritDoc} + * Returns the name of the file or directory denoted by this path as a Path object. The file name is the farthest + * element from the root in the directory hierarchy. + * + * @return a path representing the name of the file or directory, or null if this path has zero elements */ @Override public Path getFileName() { @@ -141,7 +153,21 @@ public Path getFileName() { } /** - * {@inheritDoc} + * Returns the parent path, or null if this path does not have a parent. + *

    + * The parent of this path object consists of this path's root component, if any, and each element in the path + * except for the farthest from the root in the directory hierarchy. This method does not access the file system; + * the path or its parent may not exist. Furthermore, this method does not eliminate special names such as "." and + * ".." that may be used in some implementations. On UNIX for example, the parent of "/a/b/c" is "/a/b", and the + * parent of "x/y/." is "x/y". This method may be used with the normalize method, to eliminate redundant names, for + * cases where shell-like navigation is required. + *

    + * If this path has one or more elements, and no root component, then this method is equivalent to evaluating the + * expression: + * + * {@code subpath(0, getNameCount()-1);} + * + * @return a path representing the path's parent */ @Override public Path getParent() { @@ -159,7 +185,9 @@ public Path getParent() { } /** - * {@inheritDoc} + * Returns the number of name elements in the path. + * + * @return the number of elements in the path, or 0 if this path only represents a root component */ @Override public int getNameCount() { @@ -170,27 +198,41 @@ public int getNameCount() { } /** - * {@inheritDoc} + * Returns a name element of this path as a Path object. + *

    + * The index parameter is the index of the name element to return. The element that is closest to the root in the + * directory hierarchy has index 0. The element that is farthest from the root has index {@code count-1}. + * + * @param index the index of the element + * @return the name element + * @throws IllegalArgumentException if index is negative, index is greater than or equal to the number of elements, + * or this path has zero name elements */ @Override - public Path getName(int i) { - if (i < 0 || i >= this.getNameCount()) { + public Path getName(int index) { + if (index < 0 || index >= this.getNameCount()) { throw LoggingUtility.logError(logger, new IllegalArgumentException(String.format("Index %d is out of " - + "bounds", i))); - } - // If the path is empty, the only valid option is also an empty path. - if (this.pathString.isEmpty()) { - return this; + + "bounds", index))); } // If the path is empty, the only valid option is also an empty path. if (this.pathString.isEmpty()) { return this; } - return this.parentFileSystem.getPath(this.splitToElements(this.withoutRoot())[i]); + + return this.parentFileSystem.getPath(this.splitToElements(this.withoutRoot())[index]); } /** - * {@inheritDoc} + * Returns a relative Path that is a subsequence of the name elements of this path. + *

    + * The beginIndex and endIndex parameters specify the subsequence of name elements. The name that is closest to the + * root in the directory hierarchy has index 0. The name that is farthest from the root has index {@code count-1}. + * The returned Path object has the name elements that begin at beginIndex and extend to the element at index + * {@code endIndex-1}. + * + * @param begin the index of the first element, inclusive + * @param end the index of the last element, exclusive + * @return a new Path object that is a subsequence of the name elements in this Path */ @Override public Path subpath(int begin, int end) { @@ -209,10 +251,22 @@ public Path subpath(int begin, int end) { } /** + * Tests if this path starts with the given path. + *

    + * This path starts with the given path if this path's root component starts with the root component of the given + * path, and this path starts with the same name elements as the given path. If the given path has more name + * elements than this path then false is returned. + *

    + * If this path does not have a root component and the given path has a root component then this path does not start + * with the given path. + *

    + * If the given path is associated with a different FileSystem to this path then false is returned. + *

    * In this implementation, a root component starts with another root component if the two root components are * equivalent strings. In other words, if the files are stored in the same container. * - * {@inheritDoc} + * @param path the given path + * @return true if this path starts with the given path; otherwise false */ @Override public boolean startsWith(Path path) { @@ -240,18 +294,37 @@ public boolean startsWith(Path path) { } /** - * {@inheritDoc} + * Tests if this path starts with a Path, constructed by converting the given path string, in exactly the manner + * specified by the startsWith(Path) method. + * + * @param path the given path string + * @return true if this path starts with the given path; otherwise false + * @throws InvalidPathException If the path string cannot be converted to a Path. */ @Override - public boolean startsWith(String s) { - return this.startsWith(this.parentFileSystem.getPath(s)); + public boolean startsWith(String path) { + return this.startsWith(this.parentFileSystem.getPath(path)); } /** + * Tests if this path ends with the given path. + *

    + * If the given path has N elements, and no root component, and this path has N or more elements, then this path + * ends with the given path if the last N elements of each path, starting at the element farthest from the root, + * are equal. + *

    + * If the given path has a root component then this path ends with the given path if the root component of this path + * ends with the root component of the given path, and the corresponding elements of both paths are equal. If this + * path does not have a root component and the given path has a root component then this path does not end with the + * given path. + *

    + * If the given path is associated with a different FileSystem to this path then false is returned. + *

    * In this implementation, a root component ends with another root component if the two root components are * equivalent strings. In other words, if the files are stored in the same container. * - * {@inheritDoc} + * @param path the given path + * @return true if this path ends with the given path; otherwise false */ @Override public boolean endsWith(Path path) { @@ -287,17 +360,32 @@ public boolean endsWith(Path path) { } /** - * {@inheritDoc} + * Tests if this path ends with a Path, constructed by converting the given path string, in exactly the manner + * specified by the endsWith(Path) method. + * + * @param path the given path string + * @return true if this path starts with the given path; otherwise false + * @throws InvalidPathException If the path string cannot be converted to a Path. */ @Override - public boolean endsWith(String s) { - return this.endsWith(this.parentFileSystem.getPath(s)); + public boolean endsWith(String path) { + return this.endsWith(this.parentFileSystem.getPath(path)); } /** - * This file system follows the standard practice mentioned in the original docs. + * Returns a path that is this path with redundant name elements eliminated. + *

    + * It derives from this path, a path that does not contain redundant name elements. The "." and ".." are special + * names used to indicate the current directory and parent directory. All occurrences of "." are considered + * redundant. If a ".." is preceded by a non-".." name then both names are considered redundant (the process to + * identify such names is repeated until is it no longer applicable). + *

    + * This method does not access the file system; the path may not locate a file that exists. Eliminating ".." and a + * preceding name from a path may result in the path that locates a different file than the original path + * + * @return the resulting path or this path if it does not contain redundant name elements; an empty path is returned + * if this path does have a root component and all name elements are redundant * - * {@inheritDoc} */ @Override public Path normalize() { @@ -336,9 +424,17 @@ public Path normalize() { } /** - * If the other path has a root component, it is considered absolute, and it is returned. + * Resolve the given path against this path. + *

    + * If the other parameter is an absolute path then this method trivially returns other. If other is an empty path + * then this method trivially returns this path. Otherwise this method considers this path to be a directory and + * resolves the given path against this path. In the simplest case, the given path does not have a root component, + * in which case this method joins the given path to this path and returns a resulting path that ends with the given + * path. Where the given path has a root component then resolution is highly implementation dependent and therefore + * unspecified. * - * {@inheritDoc} + * @param path the path to resolve against this path + * @return the resulting path */ @Override public Path resolve(Path path) { @@ -352,15 +448,27 @@ public Path resolve(Path path) { } /** - * {@inheritDoc} + * Converts a given path string to a Path and resolves it against this Path in exactly the manner specified by the + * {@link #resolve(Path) resolve} method. + * + * @param path the path string to resolve against this path + * @return the resulting path + * @throws InvalidPathException if the path string cannot be converted to a Path. */ @Override - public Path resolve(String s) { - return this.resolve(this.parentFileSystem.getPath(s)); + public Path resolve(String path) { + return this.resolve(this.parentFileSystem.getPath(path)); } /** - * {@inheritDoc} + * Resolves the given path against this path's parent path. This is useful where a file name needs to be replaced + * with another file name. For example, suppose that the name separator is "/" and a path represents + * "dir1/dir2/foo", then invoking this method with the Path "bar" will result in the Path "dir1/dir2/bar". If this + * path does not have a parent path, or other is absolute, then this method returns other. If other is an empty path + * then this method returns this path's parent, or where this path doesn't have a parent, the empty path. + * + * @param path the path to resolve against this path's parent + * @return the resulting path */ @Override public Path resolveSibling(Path path) { @@ -373,17 +481,34 @@ public Path resolveSibling(Path path) { } /** - * {@inheritDoc} + * Converts a given path string to a Path and resolves it against this path's parent path in exactly the manner + * specified by the resolveSibling method. + * + * @param path the path string to resolve against this path's parent + * @return the resulting path + * @throws InvalidPathException if the path string cannot be converted to a Path. */ @Override - public Path resolveSibling(String s) { - return this.resolveSibling(this.parentFileSystem.getPath(s)); + public Path resolveSibling(String path) { + return this.resolveSibling(this.parentFileSystem.getPath(path)); } /** - * If both paths have a root component, it is still to relativize one against the other. + * Constructs a relative path between this path and a given path. + *

    + * Relativization is the inverse of resolution. This method attempts to construct a relative path that when resolved + * against this path, yields a path that locates the same file as the given path. + *

    + * A relative path cannot be constructed if only one of the paths have a root component. If both paths have a root + * component, it is still possible to relativize one against the other. If this path and the given path are equal + * then an empty path is returned. + *

    + * For any two normalized paths p and q, where q does not have a root component, + * {@code p.relativize(p.resolve(q)).equals(q)} * - * {@inheritDoc} + * @param path the path to relativize against this path + * @return the resulting relative path, or an empty path if both paths are equal + * @throws IllegalArgumentException if other is not a Path that can be relativized against this path */ @Override public Path relativize(Path path) { @@ -413,10 +538,15 @@ public Path relativize(Path path) { } /** + * Returns a URI to represent this path. + *

    + * This method constructs an absolute URI with a scheme equal to the URI scheme that identifies the provider. + *

    * No authority component is defined for the {@code URI} returned by this method. This implementation offers the * same equivalence guarantee as the default provider. * - * {@inheritDoc} + * @return the URI representing this path + * @throws SecurityException never */ @Override public URI toUri() { @@ -429,7 +559,13 @@ public URI toUri() { } /** - * {@inheritDoc} + * Returns a Path object representing the absolute path of this path. + *

    + * If this path is already absolute then this method simply returns this path. Otherwise, this method resolves the + * path against the default directory. + * + * @return a Path object representing the absolute path + * @throws SecurityException never */ @Override public Path toAbsolutePath() { @@ -442,7 +578,9 @@ public Path toAbsolutePath() { /** * Unsupported. *

    - * {@inheritDoc} + * @param linkOptions options + * @return the real path + * @throws UnsupportedOperationException operation not suported. */ @Override public Path toRealPath(LinkOption... linkOptions) throws IOException { @@ -450,7 +588,10 @@ public Path toRealPath(LinkOption... linkOptions) throws IOException { } /** - * {@inheritDoc} + * Unsupported. + *

    + * @return the file + * @throws UnsupportedOperationException operation not suported. */ @Override public File toFile() { @@ -460,7 +601,11 @@ public File toFile() { /** * Unsupported. *

    - * {@inheritDoc} + * @param watchService watchService + * @param kinds kinds + * @param modifiers modifiers + * @return the watch key + * @throws UnsupportedOperationException operation not suported. */ @Override public WatchKey register(WatchService watchService, WatchEvent.Kind[] kinds, WatchEvent.Modifier... modifiers) @@ -471,7 +616,10 @@ public WatchKey register(WatchService watchService, WatchEvent.Kind[] kinds, /** * Unsupported. *

    - * {@inheritDoc} + * @param watchService watchService + * @param kinds kinds + * @return the watch key + * @throws UnsupportedOperationException operation not suported. */ @Override public WatchKey register(WatchService watchService, WatchEvent.Kind... kinds) throws IOException { @@ -479,9 +627,13 @@ public WatchKey register(WatchService watchService, WatchEvent.Kind... kinds) } /** - * Unsupported + * Returns an iterator over the name elements of this path. *

    - * {@inheritDoc} + * The first element returned by the iterator represents the name element that is closest to the root in the + * directory hierarchy, the second element is the next closest, and so on. The last element returned is the name of + * the file or directory denoted by this path. The root component, if present, is not returned by the iterator. + * + * @return an iterator over the name elements of this path. */ @Override public Iterator iterator() { @@ -495,9 +647,16 @@ public Iterator iterator() { } /** + * Compares two abstract paths lexicographically. This method does not access the file system and neither file is + * required to exist. + *

    + * This method may not be used to compare paths that are associated with different file system providers. + *

    * This result of this method is identical to a string comparison on the underlying path strings. * - * {@inheritDoc} + * @return zero if the argument is equal to this path, a value less than zero if this path is lexicographically less + * than the argument, or a value greater than zero if this path is lexicographically greater than the argument + * @throws ClassCastException if the paths are associated with different providers */ @Override public int compareTo(Path path) { @@ -510,7 +669,14 @@ public int compareTo(Path path) { } /** - * {@inheritDoc} + * Returns the string representation of this path. + *

    + * If this path was created by converting a path string using the getPath method then the path string returned by + * this method may differ from the original String used to create the path. + *

    + * The returned path string uses the default name separator to separate names in the path. + * + * @return the string representation of this path */ @Override public String toString() { @@ -521,7 +687,7 @@ public String toString() { * A path is considered equal to another path if it is associated with the same file system instance and if the * path strings are equivalent. * - * {@inheritDoc} + * @return true if, and only if, the given object is a Path that is identical to this Path */ @Override public boolean equals(Object o) { diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/LoggingUtility.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/LoggingUtility.java index b2a98e32b2a3..3cd503f98c21 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/LoggingUtility.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/LoggingUtility.java @@ -8,7 +8,7 @@ /** * Only a minimal Utility class to get around a shortcoming in Core's logging. */ -class LoggingUtility { +final class LoggingUtility { public static T logError(ClientLogger logger, T e) { logger.error(e.getMessage()); return e; diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/NioBlobInputStream.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/NioBlobInputStream.java index ed350cb00f0b..b765ab73e737 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/NioBlobInputStream.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/NioBlobInputStream.java @@ -12,7 +12,7 @@ /** * Provides an InputStream to read a file stored as an Azure Blob. */ -public class NioBlobInputStream extends InputStream { +public final class NioBlobInputStream extends InputStream { private final ClientLogger logger = new ClientLogger(NioBlobInputStream.class); private final BlobInputStream blobInputStream; diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/NioBlobOutputStream.java b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/NioBlobOutputStream.java index 6ec976616ebb..b048128d6445 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/NioBlobOutputStream.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/com/azure/storage/blob/nio/NioBlobOutputStream.java @@ -12,7 +12,7 @@ /** * Provides an OutputStream to write to a file stored as an Azure Blob. */ -public class NioBlobOutputStream extends OutputStream { +public final class NioBlobOutputStream extends OutputStream { private final ClientLogger logger = new ClientLogger(NioBlobOutputStream.class); private final BlobOutputStream blobOutputStream; diff --git a/sdk/storage/azure-storage-blob-nio/src/main/java/module-info.java b/sdk/storage/azure-storage-blob-nio/src/main/java/module-info.java index 2ca08baed8a2..58cc95b4a082 100644 --- a/sdk/storage/azure-storage-blob-nio/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-blob-nio/src/main/java/module-info.java @@ -11,4 +11,6 @@ opens com.azure.storage.blob.nio to com.fasterxml.jackson.databind, com.azure.core; + + provides java.nio.file.spi.FileSystemProvider with com.azure.storage.blob.nio.AzureFileSystemProvider; } diff --git a/sdk/storage/azure-storage-blob-nio/src/samples/java/com/azure/storage/blob/nio/ReadmeSamples.java b/sdk/storage/azure-storage-blob-nio/src/samples/java/com/azure/storage/blob/nio/ReadmeSamples.java new file mode 100644 index 000000000000..88c9ded9f25a --- /dev/null +++ b/sdk/storage/azure-storage-blob-nio/src/samples/java/com/azure/storage/blob/nio/ReadmeSamples.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.storage.blob.nio; + +import com.azure.storage.blob.models.BlobHttpHeaders; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * WARNING: MODIFYING THIS FILE WILL REQUIRE CORRESPONDING UPDATES TO README.md FILE. LINE NUMBERS + * ARE USED TO EXTRACT APPROPRIATE CODE SEGMENTS FROM THIS FILE. ADD NEW CODE AT THE BOTTOM TO AVOID CHANGING + * LINE NUMBERS OF EXISTING CODE SAMPLES. + * + * Code samples for the README.md + */ +public class ReadmeSamples { + + private FileSystem myFs = FileSystems.newFileSystem(new URI("azb://?account= config = new HashMap<>(); + String[] stores = {""); + config.put(AzureFileSystem.AZURE_STORAGE_FILE_STORES, stores); + FileSystem myFs = FileSystems.newFileSystem(new URI("azb://?account= attributes = Files.readAttributes(filePath, "azureBlob:metadata,headers"); + } + + public void writeAttributesToAFile() throws IOException { + AzureBlobFileAttributeView view = Files.getFileAttributeView(filePath, AzureBlobFileAttributeView.class); + view.setMetadata(Collections.EMPTY_MAP); + } + + public void writeAttributesToAFileString() throws IOException { + Files.setAttribute(filePath, "azureBlob:blobHttpHeaders", new BlobHttpHeaders()); + } +} diff --git a/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/AttributeViewTest.groovy b/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/AttributeViewTest.groovy index 1a9585a9378e..b573094d8f4f 100644 --- a/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/AttributeViewTest.groovy +++ b/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/AttributeViewTest.groovy @@ -97,7 +97,6 @@ class AttributeViewTest extends APISpec { props.getArchiveStatus() == attr.archiveStatus() props.getAccessTierChangeTime() == attr.accessTierChangeTime() props.getMetadata() == attr.metadata() - props.getCommittedBlockCount() == attr.committedBlockCount() /* suppliers. Used in FileSystemProvider.readAttributes(String) @@ -133,7 +132,6 @@ class AttributeViewTest extends APISpec { props.getArchiveStatus() == suppliers.get("archiveStatus").get() props.getAccessTierChangeTime() == suppliers.get("accessTierChangeTime").get() props.getMetadata() == suppliers.get("metadata").get() - props.getCommittedBlockCount() == suppliers.get("committedBlockCount").get() } @Unroll diff --git a/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/AzureFileSystemProviderTest.groovy b/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/AzureFileSystemProviderTest.groovy index 59b5c9737b86..6a1849737905 100644 --- a/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/AzureFileSystemProviderTest.groovy +++ b/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/AzureFileSystemProviderTest.groovy @@ -1064,7 +1064,7 @@ class AzureFileSystemProviderTest extends APISpec { "*" || ["lastModifiedTime", "creationTime", "isRegularFile", "isDirectory", "isSymbolicLink", "isOther", "size"] "basic:*" || ["lastModifiedTime", "creationTime", "isRegularFile", "isDirectory", "isSymbolicLink", "isOther", "size"] "azureBasic:*" || ["lastModifiedTime", "creationTime", "isRegularFile", "isDirectory", "isSymbolicLink", "isOther", "size"] - "azureBlob:*" || ["lastModifiedTime", "creationTime", "eTag", "blobHttpHeaders", "blobType", "copyId", "copyStatus", "copySource", "copyProgress", "copyCompletionTime", "copyStatusDescription", "isServerEncrypted", "accessTier", "isAccessTierInferred", "archiveStatus", "accessTierChangeTime", "metadata", "committedBlockCount", "isRegularFile", "isDirectory", "isSymbolicLink", "isOther", "size"] + "azureBlob:*" || ["lastModifiedTime", "creationTime", "eTag", "blobHttpHeaders", "blobType", "copyId", "copyStatus", "copySource", "copyProgress", "copyCompletionTime", "copyStatusDescription", "isServerEncrypted", "accessTier", "isAccessTierInferred", "archiveStatus", "accessTierChangeTime", "metadata", "isRegularFile", "isDirectory", "isSymbolicLink", "isOther", "size"] "lastModifiedTime,creationTime" || ["lastModifiedTime", "creationTime"] "basic:isRegularFile,isDirectory" || ["isRegularFile", "isDirectory"] "azureBasic:size" || ["size"] diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 3b4cc6ce59c2..0c1458eb77da 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -1,7 +1,15 @@ # Release History ## 12.8.0-beta.2 (Unreleased) - +- Fixed a bug that, when the data length parameter did not match the actual length of the data in BlobClient.upload, caused a zero length blob to be uploaded rather than throwing an exception. +- Fixed a bug that ignored the customer's specified block size when determining buffer sizes in BlobClient.upload +- Added support for Object Replication Service on listBlobs and getProperties. +- Added support for blob tags. Added tagsConditions to BlobRequestConditions that allow a user to specify a SQL statement for the blob's tags to satisfy. +- Added support for setting tags and filterTags operations on SAS by adding to AccountSASPermissions, BlobSASPermissions, and BlobContainerSASPermissions. +- Added support for setting and getting the StaticWebsite.DefaultIndexDocumentPath property on the service client. +- Added RehydratePriority to BlobProperties and BlobItemProperties. +- Fixed bug where Query Input Stream would throw when a ByteBuffer of length 0 was encountered. +- Added support to seal an append blob. Added AppendBlob.seal. Added ability to specify destinationSealed on BlobClient.beginCopy. isSealed property returned on getProperties/getBlob/listBlob. ## 12.8.0-beta.1 (2020-07-07) - Added support for the 2019-12-12 service version. diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 885b3aed4c84..1fd6491025f4 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -80,7 +80,7 @@ com.azure azure-core-test - 1.3.1 + 1.4.0-beta.1 test @@ -92,7 +92,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index 6548b3a8824d..7410eac63e0a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -439,7 +439,9 @@ public Mono> uploadWithResponse(BlobParallelUploadOption .setTier(options.getTier()).setRequestConditions(options.getRequestConditions())); Flux data = options.getDataFlux() == null ? Utility.convertStreamToByteBuffer( - options.getDataStream(), options.getLength(), BLOB_DEFAULT_UPLOAD_BLOCK_SIZE) + options.getDataStream(), options.getLength(), + // We can only buffer up to max int due to restrictions in ByteBuffer. + (int) Math.min(Integer.MAX_VALUE, validatedParallelTransferOptions.getBlockSizeLong())) : options.getDataFlux(); return UploadUtils.uploadFullOrChunked(data, ModelHelper.wrapBlobOptions(validatedParallelTransferOptions), uploadInChunksFunction, uploadFullBlobMethod); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index 3166b686d903..6674f2b9874b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -25,7 +25,6 @@ import com.azure.storage.blob.implementation.models.AppendBlobsCreateResponse; import com.azure.storage.blob.implementation.models.AppendBlobsSealResponse; import com.azure.storage.blob.implementation.models.EncryptionScope; -import com.azure.storage.blob.implementation.models.ModifiedAccessConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.CpkInfo; @@ -72,22 +71,22 @@ private interface AppendBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono appendBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono appendBlock(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono appendBlockFromUrl(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono appendBlockFromUrl(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono seal(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @QueryParam("comp") String comp, Context context); + Mono seal(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @QueryParam("comp") String comp, Context context); } /** @@ -107,6 +106,7 @@ public Mono createWithRestResponseAsync(String contai final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String blobTagsString = null; final String blobType = "AppendBlob"; @@ -119,11 +119,10 @@ public Mono createWithRestResponseAsync(String contai final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; String contentMd5Converted = null; - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -139,18 +138,18 @@ public Mono createWithRestResponseAsync(String contai * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param blobHttpHeaders Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, String blobTagsString, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String blobType = "AppendBlob"; String contentType = null; if (blobHttpHeaders != null) { @@ -192,14 +191,10 @@ public Mono createWithRestResponseAsync(String contai if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -221,18 +216,18 @@ public Mono appendBlockWithRestResponseAsync(Str final Long appendPosition = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "appendblock"; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; String transactionalContentMD5Converted = null; String transactionalContentCrc64Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -252,16 +247,16 @@ public Mono appendBlockWithRestResponseAsync(Str * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono appendBlockWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String comp = "appendblock"; String encryptionKey = null; if (cpkInfo != null) { @@ -279,15 +274,11 @@ public Mono appendBlockWithRestResponseAsync(Str if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.appendBlock(containerName, blob, this.client.getUrl(), body, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -310,6 +301,7 @@ public Mono appendBlockFromUrlWithRestRes final Long appendPosition = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String sourceIfMatch = null; final String sourceIfNoneMatch = null; final String requestId = null; @@ -318,7 +310,6 @@ public Mono appendBlockFromUrlWithRestRes final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; String sourceContentMD5Converted = null; String sourceContentcrc64Converted = null; String transactionalContentMD5Converted = null; @@ -326,7 +317,7 @@ public Mono appendBlockFromUrlWithRestRes DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -348,6 +339,7 @@ public Mono appendBlockFromUrlWithRestRes * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. @@ -355,13 +347,12 @@ public Mono appendBlockFromUrlWithRestRes * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono appendBlockFromUrlWithRestResponseAsync(String containerName, String blob, URL sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String comp = "appendblock"; String encryptionKey = null; if (cpkInfo != null) { @@ -379,10 +370,6 @@ public Mono appendBlockFromUrlWithRestRes if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); @@ -390,18 +377,20 @@ public Mono appendBlockFromUrlWithRestRes DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.appendBlockFromUrl(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 version or later. * + * @param containerName The container name. + * @param blob The blob name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono sealWithRestResponseAsync(Context context) { + public Mono sealWithRestResponseAsync(String containerName, String blob, Context context) { final Integer timeout = null; final String requestId = null; final String leaseId = null; @@ -411,12 +400,14 @@ public Mono sealWithRestResponseAsync(Context context) final String comp = "seal"; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.seal(this.client.getUrl(), timeout, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, appendPosition, comp, context); + return service.seal(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, appendPosition, comp, context); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 version or later. * + * @param containerName The container name. + * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -430,10 +421,10 @@ public Mono sealWithRestResponseAsync(Context context) * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono sealWithRestResponseAsync(Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { + public Mono sealWithRestResponseAsync(String containerName, String blob, Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { final String comp = "seal"; DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.seal(this.client.getUrl(), timeout, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, appendPosition, comp, context); + return service.seal(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, appendPosition, comp, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index 7a92b0a8e092..c76f888dce3b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -54,9 +54,7 @@ import com.azure.storage.blob.implementation.models.DataLakeStorageErrorException; import com.azure.storage.blob.implementation.models.DirectoryHttpHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; -import com.azure.storage.blob.implementation.models.ModifiedAccessConditions; import com.azure.storage.blob.implementation.models.QueryRequest; -import com.azure.storage.blob.implementation.models.SourceModifiedAccessConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -105,17 +103,17 @@ private interface BlobsService { @Get("{containerName}/{blob}") @ExpectedResponses({200, 206}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono download(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono download(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Head("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getProperties(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono getProperties(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, Context context); @Delete("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono delete(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono delete(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); @Patch("{filesystem}/{path}") @ExpectedResponses({200}) @@ -145,52 +143,52 @@ private interface BlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setHTTPHeaders(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono setHTTPHeaders(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setMetadata(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono setMetadata(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono acquireLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono acquireLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono releaseLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono releaseLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono renewLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono renewLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono changeLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono changeLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono breakLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono breakLease(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono createSnapshot(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono createSnapshot(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono startCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-seal-blob") Boolean sealBlob, @HeaderParam("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono startCopyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-seal-blob") Boolean sealBlob, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono copyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-seal-blob") Boolean sealBlob, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono copyFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({204}) @@ -200,7 +198,7 @@ private interface BlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setTier(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @QueryParam("comp") String comp, Context context); + Mono setTier(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, @QueryParam("comp") String comp, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @@ -215,12 +213,12 @@ private interface BlobsService { @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getTags(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @QueryParam("comp") String comp, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono getTags(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @HeaderParam("x-ms-if-tags") String ifTags, @QueryParam("comp") String comp, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono setTags(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml; charset=utf-8") BlobTags tags, @QueryParam("comp") String comp, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono setTags(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, @BodyParam("application/xml; charset=utf-8") BlobTags tags, @QueryParam("comp") String comp, Context context); } /** @@ -243,14 +241,14 @@ public Mono downloadWithRestResponseAsync(String containe final Boolean rangeGetContentCRC64 = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.download(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifTags, context); + return service.download(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -269,15 +267,15 @@ public Mono downloadWithRestResponseAsync(String containe * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono downloadWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono downloadWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, Context context) { String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -290,13 +288,9 @@ public Mono downloadWithRestResponseAsync(String containe if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.download(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifTags, context); + return service.download(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -316,14 +310,14 @@ public Mono getPropertiesWithRestResponseAsync(Strin final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifTags, context); + return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -339,15 +333,15 @@ public Mono getPropertiesWithRestResponseAsync(Strin * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getPropertiesWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, Context context) { String encryptionKey = null; if (cpkInfo != null) { encryptionKey = cpkInfo.getEncryptionKey(); @@ -360,13 +354,9 @@ public Mono getPropertiesWithRestResponseAsync(Strin if (cpkInfo != null) { encryptionAlgorithm = cpkInfo.getEncryptionAlgorithm(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifTags, context); + return service.getProperties(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, context); } /** @@ -387,11 +377,11 @@ public Mono deleteWithRestResponseAsync(String containerNam final DeleteSnapshotsOptionType deleteSnapshots = null; final String ifMatch = null; final String ifNoneMatch = null; - final String requestId = null; final String ifTags = null; + final String requestId = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.delete(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, ifTags, context); + return service.delete(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, context); } /** @@ -408,21 +398,17 @@ public Mono deleteWithRestResponseAsync(String containerNam * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } + public Mono deleteWithRestResponseAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, ifTags, context); + return service.delete(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, context); } /** @@ -692,6 +678,7 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "properties"; final String cacheControl = null; @@ -699,11 +686,10 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str final String contentEncoding = null; final String contentLanguage = null; final String contentDisposition = null; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; String contentMd5Converted = null; - return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, contentDisposition, ifTags, context); + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -717,15 +703,15 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, BlobHttpHeaders blobHttpHeaders, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setHTTPHeadersWithRestResponseAsync(String containerName, String blob, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, Context context) { final String comp = "properties"; String cacheControl = null; if (blobHttpHeaders != null) { @@ -751,14 +737,10 @@ public Mono setHTTPHeadersWithRestResponseAsync(Str if (blobHttpHeaders != null) { contentDisposition = blobHttpHeaders.getContentDisposition(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, contentDisposition, ifTags, context); + return service.setHTTPHeaders(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, contentDisposition, context); } /** @@ -777,16 +759,16 @@ public Mono setMetadataWithRestResponseAsync(String co final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "metadata"; final String encryptionKey = null; final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -801,16 +783,16 @@ public Mono setMetadataWithRestResponseAsync(String co * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setMetadataWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String comp = "metadata"; String encryptionKey = null; if (cpkInfo != null) { @@ -828,13 +810,9 @@ public Mono setMetadataWithRestResponseAsync(String co if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.setMetadata(containerName, blob, this.client.getUrl(), timeout, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -853,13 +831,13 @@ public Mono acquireLeaseWithRestResponseAsync(String final String proposedLeaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "lease"; final String action = "acquire"; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -874,23 +852,19 @@ public Mono acquireLeaseWithRestResponseAsync(String * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono acquireLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "lease"; final String action = "acquire"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.acquireLease(containerName, blob, this.client.getUrl(), timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -908,13 +882,13 @@ public Mono releaseLeaseWithRestResponseAsync(String final Integer timeout = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "lease"; final String action = "release"; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -928,23 +902,19 @@ public Mono releaseLeaseWithRestResponseAsync(String * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono releaseLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "lease"; final String action = "release"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.releaseLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -962,13 +932,13 @@ public Mono renewLeaseWithRestResponseAsync(String cont final Integer timeout = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "lease"; final String action = "renew"; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -982,23 +952,19 @@ public Mono renewLeaseWithRestResponseAsync(String cont * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono renewLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "lease"; final String action = "renew"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.renewLease(containerName, blob, this.client.getUrl(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1017,13 +983,13 @@ public Mono changeLeaseWithRestResponseAsync(String co final Integer timeout = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "lease"; final String action = "change"; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1038,23 +1004,19 @@ public Mono changeLeaseWithRestResponseAsync(String co * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono changeLeaseWithRestResponseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "lease"; final String action = "change"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.changeLease(containerName, blob, this.client.getUrl(), timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1072,13 +1034,13 @@ public Mono breakLeaseWithRestResponseAsync(String cont final Integer breakPeriod = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "lease"; final String action = "break"; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1092,23 +1054,19 @@ public Mono breakLeaseWithRestResponseAsync(String cont * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono breakLeaseWithRestResponseAsync(String containerName, String blob, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "lease"; final String action = "break"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, action, ifTags, context); + return service.breakLease(containerName, blob, this.client.getUrl(), timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, action, context); } /** @@ -1126,6 +1084,7 @@ public Mono createSnapshotWithRestResponseAsync(Str final Map metadata = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String leaseId = null; final String requestId = null; final String comp = "snapshot"; @@ -1133,10 +1092,9 @@ public Mono createSnapshotWithRestResponseAsync(Str final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -1150,17 +1108,17 @@ public Mono createSnapshotWithRestResponseAsync(Str * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono createSnapshotWithRestResponseAsync(String containerName, String blob, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String comp = "snapshot"; String encryptionKey = null; if (cpkInfo != null) { @@ -1178,13 +1136,9 @@ public Mono createSnapshotWithRestResponseAsync(Str if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, leaseId, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.createSnapshot(containerName, blob, this.client.getUrl(), timeout, metadata, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId, comp, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -1207,17 +1161,16 @@ public Mono startCopyFromURLWithRestResponseAsync final String sourceIfNoneMatch = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String leaseId = null; final String requestId = null; final String blobTagsString = null; final Boolean sealBlob = null; - final String sourceIfTags = null; - final String ifTags = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, sourceIfTags, ifTags, context); + return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, context); } /** @@ -1238,31 +1191,22 @@ public Mono startCopyFromURLWithRestResponseAsync * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. - * @param sourceModifiedAccessConditions Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startCopyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, AccessTier tier, RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, SourceModifiedAccessConditions sourceModifiedAccessConditions, ModifiedAccessConditions modifiedAccessConditions, Context context) { - String sourceIfTags = null; - if (sourceModifiedAccessConditions != null) { - sourceIfTags = sourceModifiedAccessConditions.getSourceIfTags(); - } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } + public Mono startCopyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, AccessTier tier, RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, Context context) { DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, sourceIfTags, ifTags, context); + return service.startCopyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, context); } /** @@ -1284,18 +1228,17 @@ public Mono copyFromURLWithRestResponseAsync(String co final String sourceIfNoneMatch = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String leaseId = null; final String requestId = null; final String blobTagsString = null; - final Boolean sealBlob = null; final String xMsRequiresSync = "true"; - final String ifTags = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; String sourceContentMD5Converted = null; - return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, sealBlob, xMsRequiresSync, ifTags, context); + return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, xMsRequiresSync, context); } /** @@ -1315,29 +1258,24 @@ public Mono copyFromURLWithRestResponseAsync(String co * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, Boolean sealBlob, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono copyFromURLWithRestResponseAsync(String containerName, String blob, URL copySource, Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, Context context) { final String xMsRequiresSync = "true"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, sealBlob, xMsRequiresSync, ifTags, context); + return service.copyFromURL(containerName, blob, this.client.getUrl(), timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, xMsRequiresSync, context); } /** @@ -1398,8 +1336,9 @@ public Mono setTierWithRestResponseAsync(String containerN final RehydratePriority rehydratePriority = null; final String requestId = null; final String leaseId = null; + final String ifTags = null; final String comp = "tier"; - return service.setTier(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, comp, context); + return service.setTier(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, comp, context); } /** @@ -1414,14 +1353,15 @@ public Mono setTierWithRestResponseAsync(String containerN * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. Possible values include: 'High', 'Standard'. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, Context context) { + public Mono setTierWithRestResponseAsync(String containerName, String blob, AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, String ifTags, Context context) { final String comp = "tier"; - return service.setTier(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, comp, context); + return service.setTier(containerName, blob, this.client.getUrl(), snapshot, versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, comp, context); } /** @@ -1521,9 +1461,9 @@ public Mono getTagsWithRestResponseAsync(String containerN final String requestId = null; final String snapshot = null; final String versionId = null; - final String comp = "tags"; final String ifTags = null; - return service.getTags(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, snapshot, versionId, comp, ifTags, context); + final String comp = "tags"; + return service.getTags(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, snapshot, versionId, ifTags, comp, context); } /** @@ -1535,19 +1475,15 @@ public Mono getTagsWithRestResponseAsync(String containerN * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param modifiedAccessConditions Additional parameters for the operation. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTagsWithRestResponseAsync(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getTagsWithRestResponseAsync(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, String ifTags, Context context) { final String comp = "tags"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } - return service.getTags(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, snapshot, versionId, comp, ifTags, context); + return service.getTags(containerName, blob, this.client.getUrl(), timeout, this.client.getVersion(), requestId, snapshot, versionId, ifTags, comp, context); } /** @@ -1564,12 +1500,12 @@ public Mono setTagsWithRestResponseAsync(String containerN final Integer timeout = null; final String versionId = null; final String requestId = null; + final String ifTags = null; final BlobTags tags = null; final String comp = "tags"; - final String ifTags = null; String transactionalContentMD5Converted = null; String transactionalContentCrc64Converted = null; - return service.setTags(containerName, blob, this.client.getUrl(), this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, tags, comp, ifTags, context); + return service.setTags(containerName, blob, this.client.getUrl(), this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, tags, comp, context); } /** @@ -1582,21 +1518,17 @@ public Mono setTagsWithRestResponseAsync(String containerN * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param tags Blob tags. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setTagsWithRestResponseAsync(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, BlobTags tags, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono setTagsWithRestResponseAsync(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, BlobTags tags, Context context) { final String comp = "tags"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.setTags(containerName, blob, this.client.getUrl(), this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, tags, comp, ifTags, context); + return service.setTags(containerName, blob, this.client.getUrl(), this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, tags, comp, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index e3a038b8e077..2e578b346657 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -27,7 +27,6 @@ import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockResponse; import com.azure.storage.blob.implementation.models.BlockBlobsUploadResponse; import com.azure.storage.blob.implementation.models.EncryptionScope; -import com.azure.storage.blob.implementation.models.ModifiedAccessConditions; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -77,7 +76,7 @@ private interface BlockBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono upload(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono upload(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @@ -92,12 +91,12 @@ private interface BlockBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono commitBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @BodyParam("application/xml; charset=utf-8") BlockLookupList blocks, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono commitBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @BodyParam("application/xml; charset=utf-8") BlockLookupList blocks, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @QueryParam("comp") String comp, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono getBlockList(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); } /** @@ -119,6 +118,7 @@ public Mono uploadWithRestResponseAsync(String contain final AccessTier tier = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String blobTagsString = null; final String blobType = "BlockBlob"; @@ -131,12 +131,11 @@ public Mono uploadWithRestResponseAsync(String contain final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; String transactionalContentMD5Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; String contentMd5Converted = null; - return service.upload(containerName, blob, this.client.getUrl(), body, timeout, transactionalContentMD5Converted, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, transactionalContentMD5Converted, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -155,18 +154,18 @@ public Mono uploadWithRestResponseAsync(String contain * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param blobHttpHeaders Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, String blobTagsString, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono uploadWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String blobType = "BlockBlob"; String contentType = null; if (blobHttpHeaders != null) { @@ -208,15 +207,11 @@ public Mono uploadWithRestResponseAsync(String contain if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - return service.upload(containerName, blob, this.client.getUrl(), body, timeout, transactionalContentMD5Converted, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.upload(containerName, blob, this.client.getUrl(), body, timeout, transactionalContentMD5Converted, contentLength, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -389,6 +384,7 @@ public Mono commitBlockListWithRestResponseAs final AccessTier tier = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String blobTagsString = null; final String comp = "blocklist"; @@ -401,13 +397,12 @@ public Mono commitBlockListWithRestResponseAs final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; String transactionalContentMD5Converted = null; String transactionalContentCrc64Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; String contentMd5Converted = null; - return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blocks, this.client.getVersion(), requestId, blobTagsString, comp, cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blocks, this.client.getVersion(), requestId, blobTagsString, comp, cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -426,18 +421,18 @@ public Mono commitBlockListWithRestResponseAs * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param blobHttpHeaders Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, String blobTagsString, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono commitBlockListWithRestResponseAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String comp = "blocklist"; String cacheControl = null; if (blobHttpHeaders != null) { @@ -479,16 +474,12 @@ public Mono commitBlockListWithRestResponseAs if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blocks, this.client.getVersion(), requestId, blobTagsString, comp, cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.commitBlockList(containerName, blob, this.client.getUrl(), timeout, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blocks, this.client.getVersion(), requestId, blobTagsString, comp, cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -506,10 +497,10 @@ public Mono getBlockListWithRestResponseAsync(St final String snapshot = null; final Integer timeout = null; final String leaseId = null; + final String ifTags = null; final String requestId = null; final String comp = "blocklist"; - final String ifTags = null; - return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, listType, timeout, leaseId, this.client.getVersion(), requestId, comp, ifTags, context); + return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, comp, context); } /** @@ -521,19 +512,15 @@ public Mono getBlockListWithRestResponseAsync(St * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getBlockListWithRestResponseAsync(String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, Context context) { final String comp = "blocklist"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } - return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, listType, timeout, leaseId, this.client.getVersion(), requestId, comp, ifTags, context); + return service.getBlockList(containerName, blob, this.client.getUrl(), snapshot, listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, comp, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index 84daf0bad5f2..c2c0ad2337de 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -22,7 +22,6 @@ import com.azure.core.util.Context; import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.implementation.models.EncryptionScope; -import com.azure.storage.blob.implementation.models.ModifiedAccessConditions; import com.azure.storage.blob.implementation.models.PageBlobsClearPagesResponse; import com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalResponse; import com.azure.storage.blob.implementation.models.PageBlobsCreateResponse; @@ -80,12 +79,12 @@ private interface PageBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono create(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-blob-type") String blobType, @HeaderParam("x-ms-blob-content-type") String contentType, @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, @HeaderParam("x-ms-blob-content-language") String contentLanguage, @HeaderParam("x-ms-blob-content-md5") String contentMd5, @HeaderParam("x-ms-blob-cache-control") String cacheControl, @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono uploadPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono uploadPages(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @BodyParam("application/octet-stream") Flux body, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({201}) @@ -95,17 +94,17 @@ private interface PageBlobsService { @Put("{containerName}/{blob}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono uploadPagesFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono uploadPagesFromURL(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, @HeaderParam("x-ms-source-if-match") String sourceIfMatch, @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("x-ms-encryption-key") String encryptionKey, @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, @HeaderParam("x-ms-encryption-scope") String encryptionScope, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getPageRanges(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono getPageRanges(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); @Get("{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono getPageRangesDiff(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, @HeaderParam("x-ms-previous-snapshot-url") URL prevSnapshotUrl, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-if-tags") String ifTags, Context context); + Mono getPageRangesDiff(@PathParam("containerName") String containerName, @PathParam("blob") String blob, @HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, @HeaderParam("x-ms-previous-snapshot-url") URL prevSnapshotUrl, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); @Put("{containerName}/{blob}") @ExpectedResponses({200}) @@ -142,6 +141,7 @@ public Mono createWithRestResponseAsync(String containe final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final Long blobSequenceNumber = 0L; final String requestId = null; final String blobTagsString = null; @@ -155,11 +155,10 @@ public Mono createWithRestResponseAsync(String containe final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; String contentMd5Converted = null; - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -177,19 +176,19 @@ public Mono createWithRestResponseAsync(String containe * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param blobHttpHeaders Additional parameters for the operation. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long blobSequenceNumber, String requestId, String blobTagsString, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono createWithRestResponseAsync(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, String blobTagsString, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String blobType = "PageBlob"; String contentType = null; if (blobHttpHeaders != null) { @@ -231,14 +230,10 @@ public Mono createWithRestResponseAsync(String containe if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.create(containerName, blob, this.client.getUrl(), timeout, contentLength, tier, metadata, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, blobType, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -262,6 +257,7 @@ public Mono uploadPagesWithRestResponseAsync(Strin final Long ifSequenceNumberEqualTo = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "page"; final String pageWrite = "update"; @@ -269,12 +265,11 @@ public Mono uploadPagesWithRestResponseAsync(Strin final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; String transactionalContentMD5Converted = null; String transactionalContentCrc64Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -296,16 +291,16 @@ public Mono uploadPagesWithRestResponseAsync(Strin * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono uploadPagesWithRestResponseAsync(String containerName, String blob, Flux body, long contentLength, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String comp = "page"; final String pageWrite = "update"; String encryptionKey = null; @@ -324,15 +319,11 @@ public Mono uploadPagesWithRestResponseAsync(Strin if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.uploadPages(containerName, blob, this.client.getUrl(), body, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -437,6 +428,7 @@ public Mono uploadPagesFromURLWithRestRespo final Long ifSequenceNumberEqualTo = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String sourceIfMatch = null; final String sourceIfNoneMatch = null; final String requestId = null; @@ -446,14 +438,13 @@ public Mono uploadPagesFromURLWithRestRespo final String encryptionKeySha256 = null; final EncryptionAlgorithmType encryptionAlgorithm = null; final String encryptionScope = null; - final String ifTags = null; String sourceContentMD5Converted = null; String sourceContentcrc64Converted = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; DateTimeRfc1123 sourceIfModifiedSinceConverted = null; DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = null; - return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifTags, context); + return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, context); } /** @@ -476,6 +467,7 @@ public Mono uploadPagesFromURLWithRestRespo * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. @@ -483,13 +475,12 @@ public Mono uploadPagesFromURLWithRestRespo * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param cpkInfo Additional parameters for the operation. * @param encryptionScope Additional parameters for the operation. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono uploadPagesFromURLWithRestResponseAsync(String containerName, String blob, URL sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScope, Context context) { final String comp = "page"; final String pageWrite = "update"; String encryptionKey = null; @@ -508,17 +499,13 @@ public Mono uploadPagesFromURLWithRestRespo if (encryptionScope != null) { encryptionScope1 = encryptionScope.getEncryptionScope(); } - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, ifTags, context); + return service.uploadPagesFromURL(containerName, blob, this.client.getUrl(), sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, comp, pageWrite, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope1, context); } /** @@ -538,12 +525,12 @@ public Mono getPageRangesWithRestResponseAsync(S final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "pagelist"; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, ifTags, context); + return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, context); } /** @@ -559,22 +546,18 @@ public Mono getPageRangesWithRestResponseAsync(S * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPageRangesWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getPageRangesWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "pagelist"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, ifTags, context); + return service.getPageRanges(containerName, blob, this.client.getUrl(), snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, context); } /** @@ -596,12 +579,12 @@ public Mono getPageRangesDiffWithRestRespons final String leaseId = null; final String ifMatch = null; final String ifNoneMatch = null; + final String ifTags = null; final String requestId = null; final String comp = "pagelist"; - final String ifTags = null; DateTimeRfc1123 ifModifiedSinceConverted = null; DateTimeRfc1123 ifUnmodifiedSinceConverted = null; - return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, ifTags, context); + return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, context); } /** @@ -619,22 +602,18 @@ public Mono getPageRangesDiffWithRestRespons * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param modifiedAccessConditions Additional parameters for the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Mono which performs the network request upon subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPageRangesDiffWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String prevsnapshot, URL prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, ModifiedAccessConditions modifiedAccessConditions, Context context) { + public Mono getPageRangesDiffWithRestResponseAsync(String containerName, String blob, String snapshot, Integer timeout, String prevsnapshot, URL prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "pagelist"; - String ifTags = null; - if (modifiedAccessConditions != null) { - ifTags = modifiedAccessConditions.getIfTags(); - } DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, this.client.getVersion(), requestId, comp, ifTags, context); + return service.getPageRangesDiff(containerName, blob, this.client.getUrl(), snapshot, timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, comp, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccountInfoHeaders.java index 72c31631b14c..fe7bfe297fed 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetAccountInfoHeaders.java @@ -57,7 +57,7 @@ public final class BlobGetAccountInfoHeaders { /* * Identifies the account kind. Possible values include: 'Storage', - * 'BlobStorage', 'StorageV2' + * 'BlobStorage', 'StorageV2', 'FileStorage', 'BlockBlobStorage' */ @JsonProperty(value = "x-ms-account-kind") private AccountKind accountKind; @@ -193,7 +193,8 @@ public BlobGetAccountInfoHeaders setSkuName(SkuName skuName) { /** * Get the accountKind property: Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2'. + * values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage', + * 'BlockBlobStorage'. * * @return the accountKind value. */ @@ -203,7 +204,8 @@ public AccountKind getAccountKind() { /** * Set the accountKind property: Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2'. + * values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage', + * 'BlockBlobStorage'. * * @param accountKind the accountKind value to set. * @return the BlobGetAccountInfoHeaders object itself. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetPropertiesHeaders.java index e1be5ac1d632..8c6d9bd1aedf 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobGetPropertiesHeaders.java @@ -361,6 +361,13 @@ public final class BlobGetPropertiesHeaders { @JsonProperty(value = "x-ms-blob-sealed") private Boolean isSealed; + /* + * If an object is in rehydrate pending state then this header is returned + * with priority of rehydrate. Valid values are High and Standard. + */ + @JsonProperty(value = "x-ms-rehydrate-priority") + private String rehydratePriority; + /* * The errorCode property. */ @@ -1478,6 +1485,30 @@ public BlobGetPropertiesHeaders setIsSealed(Boolean isSealed) { return this; } + /** + * Get the rehydratePriority property: If an object is in rehydrate pending + * state then this header is returned with priority of rehydrate. Valid + * values are High and Standard. + * + * @return the rehydratePriority value. + */ + public String getRehydratePriority() { + return this.rehydratePriority; + } + + /** + * Set the rehydratePriority property: If an object is in rehydrate pending + * state then this header is returned with priority of rehydrate. Valid + * values are High and Standard. + * + * @param rehydratePriority the rehydratePriority value to set. + * @return the BlobGetPropertiesHeaders object itself. + */ + public BlobGetPropertiesHeaders setRehydratePriority(String rehydratePriority) { + this.rehydratePriority = rehydratePriority; + return this; + } + /** * Get the errorCode property: The errorCode property. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java index 8ffb055d6a6c..c27cb28ac40f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java @@ -14,6 +14,7 @@ import com.azure.storage.blob.models.LeaseDurationType; import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; +import com.azure.storage.blob.models.RehydratePriority; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -234,9 +235,15 @@ public final class BlobItemPropertiesInternal { /* * The isSealed property. */ - @JsonProperty(value = "IsSealed") + @JsonProperty(value = "Sealed") private Boolean isSealed; + /* + * Possible values include: 'High', 'Standard' + */ + @JsonProperty(value = "RehydratePriority") + private RehydratePriority rehydratePriority; + /** * Get the creationTime property: The creationTime property. * @@ -1005,4 +1012,26 @@ public BlobItemPropertiesInternal setIsSealed(Boolean isSealed) { this.isSealed = isSealed; return this; } + + /** + * Get the rehydratePriority property: Possible values include: 'High', + * 'Standard'. + * + * @return the rehydratePriority value. + */ + public RehydratePriority getRehydratePriority() { + return this.rehydratePriority; + } + + /** + * Set the rehydratePriority property: Possible values include: 'High', + * 'Standard'. + * + * @param rehydratePriority the rehydratePriority value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setRehydratePriority(RehydratePriority rehydratePriority) { + this.rehydratePriority = rehydratePriority; + return this; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccountInfoHeaders.java index 33d6b7a386a7..dce1d6ad4f11 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainerGetAccountInfoHeaders.java @@ -57,7 +57,7 @@ public final class ContainerGetAccountInfoHeaders { /* * Identifies the account kind. Possible values include: 'Storage', - * 'BlobStorage', 'StorageV2' + * 'BlobStorage', 'StorageV2', 'FileStorage', 'BlockBlobStorage' */ @JsonProperty(value = "x-ms-account-kind") private AccountKind accountKind; @@ -193,7 +193,8 @@ public ContainerGetAccountInfoHeaders setSkuName(SkuName skuName) { /** * Get the accountKind property: Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2'. + * values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage', + * 'BlockBlobStorage'. * * @return the accountKind value. */ @@ -203,7 +204,8 @@ public AccountKind getAccountKind() { /** * Set the accountKind property: Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2'. + * values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage', + * 'BlockBlobStorage'. * * @param accountKind the accountKind value to set. * @return the ContainerGetAccountInfoHeaders object itself. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetAccountInfoHeaders.java index c341c43dd7df..09a95efd701c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServiceGetAccountInfoHeaders.java @@ -57,7 +57,7 @@ public final class ServiceGetAccountInfoHeaders { /* * Identifies the account kind. Possible values include: 'Storage', - * 'BlobStorage', 'StorageV2' + * 'BlobStorage', 'StorageV2', 'FileStorage', 'BlockBlobStorage' */ @JsonProperty(value = "x-ms-account-kind") private AccountKind accountKind; @@ -193,7 +193,8 @@ public ServiceGetAccountInfoHeaders setSkuName(SkuName skuName) { /** * Get the accountKind property: Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2'. + * values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage', + * 'BlockBlobStorage'. * * @return the accountKind value. */ @@ -203,7 +204,8 @@ public AccountKind getAccountKind() { /** * Set the accountKind property: Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2'. + * values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage', + * 'BlockBlobStorage'. * * @param accountKind the accountKind value to set. * @return the ServiceGetAccountInfoHeaders object itself. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index 5de41dd10a21..d91f1abd1625 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.implementation.util; +import com.azure.core.http.RequestConditions; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.implementation.models.BlobDownloadHeaders; import com.azure.storage.blob.implementation.models.BlobItemInternal; @@ -10,6 +11,7 @@ import com.azure.storage.blob.implementation.models.BlobTag; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobItemProperties; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; import com.azure.storage.blob.models.ObjectReplicationPolicy; import com.azure.storage.blob.models.ObjectReplicationRule; import com.azure.storage.blob.models.ObjectReplicationStatus; @@ -173,6 +175,7 @@ public static com.azure.storage.blob.models.BlobDownloadHeaders populateBlobDown objectReplicationSourcePolicies.add(new ObjectReplicationPolicy(entry.getKey(), entry.getValue())); } headers.setObjectReplicationSourcePolicies(objectReplicationSourcePolicies); + headers.setSealed(internalHeaders.isSealed()); return headers; } @@ -202,6 +205,9 @@ public static BlobItem populateBlobItem(BlobItemInternal blobItemInternal) { } blobItem.setTags(tags); + blobItem.setObjectReplicationSourcePolicies( + transformObjectReplicationMetadata(blobItemInternal.getObjectReplicationMetadata())); + return blobItem; } @@ -246,26 +252,57 @@ public static BlobItemProperties populateBlobItemProperties(BlobItemPropertiesIn blobItemProperties.setEncryptionScope(blobItemPropertiesInternal.getEncryptionScope()); blobItemProperties.setAccessTierChangeTime(blobItemPropertiesInternal.getAccessTierChangeTime()); blobItemProperties.setTagCount(blobItemPropertiesInternal.getTagCount()); + blobItemProperties.setRehydratePriority(blobItemPropertiesInternal.getRehydratePriority()); + blobItemProperties.setSealed(blobItemPropertiesInternal.isSealed()); - // TODO: (rickle-msft) Uncomment when these properties are returned on lists. - /*this.objectReplicationSourcePolicies = new HashMap<>(); - this.objectReplicationDestinationPolicyId = objectReplicationStatus.getOrDefault("policy-id", null); - if (objectReplicationDestinationPolicyId == null) { - for (String str : objectReplicationStatus.keySet()) { - String[] split = str.split("_"); - String policyId = split[0]; - String ruleId = split[1]; - if (objectReplicationSourcePolicies.containsKey(policyId)) { - objectReplicationSourcePolicies.get(policyId) - .putRuleAndStatus(ruleId, objectReplicationStatus.get(str)); - } else { - ObjectReplicationPolicy policy = new ObjectReplicationPolicy(policyId); - policy.putRuleAndStatus(ruleId, objectReplicationStatus.get(str)); - objectReplicationSourcePolicies.put(policyId, policy); - } + return blobItemProperties; + } + + private static List transformObjectReplicationMetadata( + Map objectReplicationMetadata) { + + Map> internalSourcePolicies = new HashMap<>(); + objectReplicationMetadata = objectReplicationMetadata == null ? new HashMap<>() : objectReplicationMetadata; + for (Map.Entry entry : objectReplicationMetadata.entrySet()) { + String orString = entry.getKey(); + String str = orString.startsWith("or-") ? orString.substring(3) : orString; + String[] split = str.split("_"); + String policyId = split[0]; + String ruleId = split[1]; + ObjectReplicationRule rule = new ObjectReplicationRule(ruleId, + ObjectReplicationStatus.fromString(entry.getValue())); + if (!internalSourcePolicies.containsKey(policyId)) { + internalSourcePolicies.put(policyId, new ArrayList<>()); } - }*/ + internalSourcePolicies.get(policyId).add(rule); + } - return blobItemProperties; + if (internalSourcePolicies.isEmpty()) { + return null; + } + List objectReplicationSourcePolicies = new ArrayList<>(); + for (Map.Entry> entry : internalSourcePolicies.entrySet()) { + objectReplicationSourcePolicies.add(new ObjectReplicationPolicy(entry.getKey(), entry.getValue())); + } + return objectReplicationSourcePolicies; + } + + /** + * Transforms {@link RequestConditions} into a public {@link BlobLeaseRequestConditions}. + * + * @param requestConditions {@link RequestConditions} + * @return {@link BlobLeaseRequestConditions} + */ + public static BlobLeaseRequestConditions populateBlobLeaseRequestConditions(RequestConditions requestConditions) { + if (requestConditions == null) { + return null; + } + + return new BlobLeaseRequestConditions() + .setIfMatch(requestConditions.getIfMatch()) + .setIfNoneMatch(requestConditions.getIfNoneMatch()) + .setIfModifiedSince(requestConditions.getIfModifiedSince()) + .setIfUnmodifiedSince(requestConditions.getIfUnmodifiedSince()) + .setTagsConditions(null); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java index 72ce1183886e..8abc6830f748 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java @@ -24,7 +24,17 @@ public enum AccountKind { /** * Enum value StorageV2. */ - STORAGE_V2("StorageV2"); + STORAGE_V2("StorageV2"), + + /** + * Enum value FileStorage. + */ + FILE_STORAGE("FileStorage"), + + /** + * Enum value BlockBlobStorage. + */ + BLOCK_BLOB_STORAGE("BlockBlobStorage"); /** * The actual serialized value for a AccountKind instance. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java index 948bb597d231..ec7e7be02055 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AppendBlobRequestConditions.java @@ -82,6 +82,18 @@ public AppendBlobRequestConditions setLeaseId(String leaseId) { return this; } + /** + * Optionally applies the SQL statement to the tags of the blob. + * + * @param tagsConditions The SQL statement that apply to the tags of the blob. + * @return The updated BlobRequestConditions object. + */ + @Override + public AppendBlobRequestConditions setTagsConditions(String tagsConditions) { + super.setTagsConditions(tagsConditions); + return this; + } + /** * Gets the max length in bytes allowed for the append blob. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java index e2980cabcdbb..4ea562095911 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java @@ -319,6 +319,12 @@ public final class BlobDownloadHeaders { @JsonProperty(value = "x-ms-error-code") private String errorCode; + /* + * The isSealed property. + */ + @JsonProperty(value = "IsSealed") + private Boolean sealed; + /** * Get the lastModified property: Returns the date and time the container * was last modified. Any operation that modifies the blob, including an @@ -1251,4 +1257,24 @@ public BlobDownloadHeaders setErrorCode(String errorCode) { this.errorCode = errorCode; return this; } + + /** + * Get the sealed property: The sealed property. + * + * @return the isSealed value. + */ + public Boolean isSealed() { + return this.sealed; + } + + /** + * Set the sealed property: The sealed property. + * + * @param sealed the sealed value to set. + * @return the BlobDownloadHeaders object itself. + */ + public BlobDownloadHeaders setSealed(Boolean sealed) { + this.sealed = sealed; + return this; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java index 24c0072d6782..8d7f452f3738 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.List; import java.util.Map; /** @@ -57,17 +58,11 @@ public final class BlobItem { private Boolean isCurrentVersion; - /* - * The objectReplicationPolicyId property. - */ - @JsonProperty(value = "ObjectReplicationPolicyId") - private String objectReplicationPolicyId; - /* * The objectReplicationRuleStatus property. */ @JsonProperty(value = "BlobObjectReplicationRuleStatus") - private Map objectReplicationRuleStatus; + private List objectReplicationSourcePolicies; /* * The isPrefix property. @@ -236,48 +231,25 @@ public BlobItem setCurrentVersion(Boolean isCurrentVersion) { } /** - * Get the objectReplicationPolicyId property: The - * objectReplicationPolicyId property. - * - * @return the objectReplicationPolicyId value. - */ - public String getObjectReplicationPolicyId() { - return this.objectReplicationPolicyId; - } - - /** - * Set the objectReplicationPolicyId property: The - * objectReplicationPolicyId property. - * - * @param objectReplicationPolicyId the objectReplicationPolicyId value to - * set. - * @return the BlobItem object itself. - */ - public BlobItem setObjectReplicationPolicyId(String objectReplicationPolicyId) { - this.objectReplicationPolicyId = objectReplicationPolicyId; - return this; - } - - /** - * Get the objectReplicationRuleStatus property: The - * objectReplicationRuleStatus property. + * Get the objectReplicationSourcePolicies property: The + * objectReplicationSourcePolicies property. * - * @return the objectReplicationRuleStatus value. + * @return the objectReplicationSourcePolicies value. */ - public Map getObjectReplicationRuleStatus() { - return this.objectReplicationRuleStatus; + public List getObjectReplicationSourcePolicies() { + return this.objectReplicationSourcePolicies; } /** - * Set the objectReplicationRuleStatus property: The - * objectReplicationRuleStatus property. + * Set the objectReplicationSourcePolicies property: The + * objectReplicationSourcePolicies property. * - * @param objectReplicationRuleStatus the objectReplicationRuleStatus value + * @param objectReplicationSourcePolicies the objectReplicationSourcePolicies value * to set. * @return the BlobItem object itself. */ - public BlobItem setObjectReplicationRuleStatus(Map objectReplicationRuleStatus) { - this.objectReplicationRuleStatus = objectReplicationRuleStatus; + public BlobItem setObjectReplicationSourcePolicies(List objectReplicationSourcePolicies) { + this.objectReplicationSourcePolicies = objectReplicationSourcePolicies; return this; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java index fedca0cb3a09..51c0f5b6145c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java @@ -212,19 +212,24 @@ public final class BlobItemProperties { @JsonProperty(value = "AccessTierChangeTime") private OffsetDateTime accessTierChangeTime; - // TODO: (rickle-msft) uncomment when these are returned on lists. - /* - private Map objectReplicationSourcePolicies; - - private String objectReplicationDestinationPolicyId; - */ - /* * The tagCount property. */ @JsonProperty(value = "TagCount") private Integer tagCount; + /* + * Possible values include: 'High', 'Standard' + */ + @JsonProperty(value = "RehydratePriority") + private RehydratePriority rehydratePriority; + + /* + * The sealed property. + */ + @JsonProperty(value = "Sealed") + private Boolean sealed; + /** * Get the creationTime property: The creationTime property. * @@ -911,4 +916,46 @@ public BlobItemProperties setTagCount(Integer tagCount) { this.tagCount = tagCount; return this; } + + /** + * Get the rehydratePriority property: Possible values include: 'High', + * 'Standard'. + * + * @return the rehydratePriority value. + */ + public RehydratePriority getRehydratePriority() { + return this.rehydratePriority; + } + + /** + * Set the rehydratePriority property: Possible values include: 'High', + * 'Standard'. + * + * @param rehydratePriority the rehydratePriority value to set. + * @return the BlobItemProperties object itself. + */ + public BlobItemProperties setRehydratePriority(RehydratePriority rehydratePriority) { + this.rehydratePriority = rehydratePriority; + return this; + } + + /** + * Get the sealed property: The sealed property. + * + * @return the isSealed value. + */ + public Boolean isSealed() { + return this.sealed; + } + + /** + * Set the sealed property: The sealed property. + * + * @param sealed the sealed value to set. + * @return the BlobItemProperties object itself. + */ + public BlobItemProperties setSealed(Boolean sealed) { + this.sealed = sealed; + return this; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLeaseRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLeaseRequestConditions.java new file mode 100644 index 000000000000..1186142eb757 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLeaseRequestConditions.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import com.azure.core.http.RequestConditions; + +import java.time.OffsetDateTime; + +/** + * This class contains values which will restrict the successful operation of a variety of lease requests to the + * conditions present. These conditions are entirely optional. The entire object or any of its properties may be set to + * null when passed to a method to indicate that those conditions are not desired. Please refer to the type of each + * field for more information on those particular access conditions. + */ +public class BlobLeaseRequestConditions extends RequestConditions { + private String tagsConditions; + + /** + * Optionally limit requests to resources that match the passed ETag. + * + * @param ifMatch ETag that resources must match. + * @return The updated BlobLeaseRequestConditions object. + */ + @Override + public BlobLeaseRequestConditions setIfMatch(String ifMatch) { + super.setIfMatch(ifMatch); + return this; + } + + /** + * Optionally limit requests to resources that do not match the passed ETag. + * + * @param ifNoneMatch ETag that resources must not match. + * @return The updated BlobLeaseRequestConditions object. + */ + @Override + public BlobLeaseRequestConditions setIfNoneMatch(String ifNoneMatch) { + super.setIfNoneMatch(ifNoneMatch); + return this; + } + + /** + * Optionally limit requests to resources that have only been modified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifModifiedSince The datetime that resources must have been modified since. + * @return The updated BlobLeaseRequestConditions object. + */ + @Override + public BlobLeaseRequestConditions setIfModifiedSince(OffsetDateTime ifModifiedSince) { + super.setIfModifiedSince(ifModifiedSince); + return this; + } + + /** + * Optionally limit requests to resources that have remained unmodified since the passed + * {@link OffsetDateTime datetime}. + * + * @param ifUnmodifiedSince The datetime that resources must have remained unmodified since. + * @return The updated BlobLeaseRequestConditions object. + */ + @Override + public BlobLeaseRequestConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) { + super.setIfUnmodifiedSince(ifUnmodifiedSince); + return this; + } + + /** + * Gets the SQL statement that apply to the tags of the blob. + * + * @return The SQL statement that apply to the tags of the blob. + */ + public String getTagsConditions() { + return tagsConditions; + } + + /** + * Optionally applies the SQL statement to the tags of the blob. + * + * @param tagsConditions The SQL statement that apply to the tags of the blob. + * @return The updated BlobLeaseRequestConditions object. + */ + public BlobLeaseRequestConditions setTagsConditions(String tagsConditions) { + this.tagsConditions = tagsConditions; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java index 817275a032e6..96e449985e91 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java @@ -55,6 +55,8 @@ public final class BlobProperties { private final Boolean isCurrentVersion; private final List objectReplicationSourcePolicies; private final String objectReplicationDestinationPolicyId; + private final RehydratePriority rehydratePriority; + private final Boolean isSealed; /** * Constructs a {@link BlobProperties}. @@ -109,8 +111,8 @@ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime la contentLanguage, cacheControl, blobSequenceNumber, blobType, leaseStatus, leaseState, leaseDuration, copyId, copyStatus, copySource, copyProgress, copyCompletionTime, copyStatusDescription, isServerEncrypted, isIncrementalCopy, copyDestinationSnapshot, accessTier, isAccessTierInferred, archiveStatus, - encryptionKeySha256, null, accessTierChangeTime, metadata, committedBlockCount, null, null, - null, null, null); + encryptionKeySha256, null, accessTierChangeTime, metadata, committedBlockCount, (Long) null, + null, null, null, null); } /** @@ -155,6 +157,8 @@ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime la * @param isCurrentVersion Flag indicating if version identifier points to current version of the blob. * @param tagCount Number of tags associated with the blob. * @param objectReplicationStatus The object replication status map to parse. + * @param rehydratePriority The rehydrate priority + * @param isSealed Whether or not the blob is sealed. */ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime lastModified, final String eTag, final long blobSize, final String contentType, final byte[] contentMd5, final String contentEncoding, @@ -167,7 +171,8 @@ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime la final Boolean isAccessTierInferred, final ArchiveStatus archiveStatus, final String encryptionKeySha256, final String encryptionScope, final OffsetDateTime accessTierChangeTime, final Map metadata, final Integer committedBlockCount, final String versionId, final Boolean isCurrentVersion, - final Long tagCount, Map objectReplicationStatus) { + final Long tagCount, Map objectReplicationStatus, final String rehydratePriority, + final Boolean isSealed) { this.creationTime = creationTime; this.lastModified = lastModified; this.eTag = eTag; @@ -224,6 +229,8 @@ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime la for (Map.Entry> entry : internalSourcePolicies.entrySet()) { this.objectReplicationSourcePolicies.add(new ObjectReplicationPolicy(entry.getKey(), entry.getValue())); } + this.rehydratePriority = RehydratePriority.fromString(rehydratePriority); + this.isSealed = isSealed; } @@ -322,6 +329,8 @@ public BlobProperties(final OffsetDateTime creationTime, final OffsetDateTime la this.isCurrentVersion = isCurrentVersion; this.objectReplicationSourcePolicies = objectReplicationSourcePolicies; this.objectReplicationDestinationPolicyId = objectReplicationDestinationPolicyId; + this.rehydratePriority = null; + this.isSealed = null; } /** @@ -596,4 +605,18 @@ public List getObjectReplicationSourcePolicies() { public String getObjectReplicationDestinationPolicyId() { return this.objectReplicationDestinationPolicyId; } + + /** + * @return The {@link RehydratePriority} of the blob if it is in RehydratePending state. + */ + public RehydratePriority getRehydratePriority() { + return this.rehydratePriority; + } + + /** + * @return the flag indicating whether or not this blob has been sealed. + */ + public Boolean isSealed() { + return isSealed; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java index 0508e81d5919..fa62aec7b3d6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java @@ -4,7 +4,6 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.azure.core.http.RequestConditions; import java.time.OffsetDateTime; @@ -15,7 +14,7 @@ * information on those particular access conditions. */ @Fluent -public class BlobRequestConditions extends RequestConditions { +public class BlobRequestConditions extends BlobLeaseRequestConditions { private String leaseId; /** @@ -68,6 +67,18 @@ public BlobRequestConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSin return this; } + /** + * Optionally applies the SQL statement to the tags of the blob. + * + * @param tagsConditions The SQL statement that apply to the tags of the blob. + * @return The updated BlobRequestConditions object. + */ + @Override + public BlobRequestConditions setTagsConditions(String tagsConditions) { + super.setTagsConditions(tagsConditions); + return this; + } + /** * Gets the lease ID that blobs and containers must match. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java index 7e82132da9c7..ca2ff473d5f9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageBlobRequestConditions.java @@ -82,6 +82,18 @@ public PageBlobRequestConditions setLeaseId(String leaseId) { return this; } + /** + * Optionally applies the SQL statement to the tags of the blob. + * + * @param tagsConditions The SQL statement that apply to the tags of the blob. + * @return The updated BlobRequestConditions object. + */ + @Override + public PageBlobRequestConditions setTagsConditions(String tagsConditions) { + super.setTagsConditions(tagsConditions); + return this; + } + /** * Gets the value that the page blob's sequence number must be less than or equal to. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java index 9890ca9a1d31..9a3df4f3e997 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java @@ -32,6 +32,12 @@ public final class StaticWebsite { @JsonProperty(value = "ErrorDocument404Path") private String errorDocument404Path; + /* + * Absolute path of the default index page + */ + @JsonProperty(value = "DefaultIndexDocumentPath") + private String defaultIndexDocumentPath; + /** * Get the enabled property: Indicates whether this account is hosting a * static website. @@ -97,4 +103,27 @@ public StaticWebsite setErrorDocument404Path(String errorDocument404Path) { this.errorDocument404Path = errorDocument404Path; return this; } + + /** + * Get the defaultIndexDocumentPath property: Absolute path of the default + * index page. + * + * @return the defaultIndexDocumentPath value. + */ + public String getDefaultIndexDocumentPath() { + return this.defaultIndexDocumentPath; + } + + /** + * Set the defaultIndexDocumentPath property: Absolute path of the default + * index page. + * + * @param defaultIndexDocumentPath the defaultIndexDocumentPath value to + * set. + * @return the StaticWebsite object itself. + */ + public StaticWebsite setDefaultIndexDocumentPath(String defaultIndexDocumentPath) { + this.defaultIndexDocumentPath = defaultIndexDocumentPath; + return this; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/AppendBlobSealOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/AppendBlobSealOptions.java new file mode 100644 index 000000000000..a63e0722152e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/AppendBlobSealOptions.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.AppendBlobRequestConditions; +import com.azure.storage.blob.models.BlobRequestConditions; + +/** + * Extended options that may be passed when sealing an Append Blob. + */ +@Fluent +public class AppendBlobSealOptions { + + private AppendBlobRequestConditions requestConditions; + + /** + * @return {@link AppendBlobRequestConditions} + */ + public AppendBlobRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * @param requestConditions {@link BlobRequestConditions} + * @return The updated options. + */ + public AppendBlobSealOptions setRequestConditions(AppendBlobRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobAcquireLeaseOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobAcquireLeaseOptions.java new file mode 100644 index 000000000000..3d414da0dcc3 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobAcquireLeaseOptions.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; + +/** + * Extended options that may be passed when acquiring a lease to a blob or container. + */ +@Fluent +public class BlobAcquireLeaseOptions { + + private final int duration; + private BlobLeaseRequestConditions requestConditions; + + /** + * @param duration The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. + */ + public BlobAcquireLeaseOptions(int duration) { + this.duration = duration; + } + + /** + * @return The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. + */ + public int getDuration() { + return this.duration; + } + + /** + * @return {@link BlobLeaseRequestConditions} + */ + public BlobLeaseRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * @param requestConditions {@link BlobLeaseRequestConditions} + * @return The updated options. + */ + public BlobAcquireLeaseOptions setRequestConditions(BlobLeaseRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } + +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBeginCopyOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBeginCopyOptions.java index a0f0135abdde..de42e1a1f165 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBeginCopyOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBeginCopyOptions.java @@ -26,6 +26,7 @@ public class BlobBeginCopyOptions { private RequestConditions sourceRequestConditions; private BlobRequestConditions destinationRequestConditions; private Duration pollInterval; + private Boolean sealDestination; /** * @param sourceUrl The source URL to copy from. URLs outside of Azure may only be copied to block blobs. @@ -155,4 +156,23 @@ public BlobBeginCopyOptions setPollInterval(Duration pollInterval) { this.pollInterval = pollInterval; return this; } + + /** + * Only applicable for Append Blobs. + * @return Whether or not the destination blob should be sealed. + */ + public Boolean isSealingDestination() { + return sealDestination; + } + + /** + * Only applicable for Append Blobs. + * + * @param sealDestination Whether or not the destination blob should be sealed. + * @return The updated options. + */ + public BlobBeginCopyOptions sealDestination(Boolean sealDestination) { + this.sealDestination = sealDestination; + return this; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBreakLeaseOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBreakLeaseOptions.java new file mode 100644 index 000000000000..832ce2c3b212 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobBreakLeaseOptions.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; + +/** + * Extended options that may be passed when breaking a lease to a blob or container. + */ +@Fluent +public class BlobBreakLeaseOptions { + + private Integer breakPeriodInSeconds; + private BlobLeaseRequestConditions requestConditions; + + /** + * @return An optional duration, between 0 and 60 seconds, that the lease should continue before + * it is broken. If the break period is longer than the time remaining on the lease the remaining time on the lease + * is used. A new lease will not be available before the break period has expired, but the lease may be held for + * longer than the break period. + */ + public Integer getBreakPeriodInSeconds() { + return this.breakPeriodInSeconds; + } + + /** + * @param breakPeriodInSeconds An optional duration, between 0 and 60 seconds, that the lease should continue before + * it is broken. If the break period is longer than the time remaining on the lease the remaining time on the lease + * is used. A new lease will not be available before the break period has expired, but the lease may be held for + * longer than the break period. + * @return The updated options. + */ + public BlobBreakLeaseOptions setBreakPeriodInSeconds(Integer breakPeriodInSeconds) { + this.breakPeriodInSeconds = breakPeriodInSeconds; + return this; + } + + /** + * @return {@link BlobLeaseRequestConditions} + */ + public BlobLeaseRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * @param requestConditions {@link BlobLeaseRequestConditions} + * @return The updated options. + */ + public BlobBreakLeaseOptions setRequestConditions(BlobLeaseRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } + +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobChangeLeaseOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobChangeLeaseOptions.java new file mode 100644 index 000000000000..22ea53155656 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobChangeLeaseOptions.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; +import com.azure.storage.common.implementation.StorageImplUtils; + +/** + * Extended options that may be passed when changing a lease to a blob or container. + */ +@Fluent +public class BlobChangeLeaseOptions { + + private final String proposedId; + private BlobLeaseRequestConditions requestConditions; + + /** + * @param proposedId A new lease ID in a valid GUID format. + */ + public BlobChangeLeaseOptions(String proposedId) { + StorageImplUtils.assertNotNull("proposedId", proposedId); + this.proposedId = proposedId; + } + + /** + * @return A new lease ID in a valid GUID format. + */ + public String getProposedId() { + return this.proposedId; + } + + /** + * @return {@link BlobLeaseRequestConditions} + */ + public BlobLeaseRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * @param requestConditions {@link BlobLeaseRequestConditions} + * @return The updated options. + */ + public BlobChangeLeaseOptions setRequestConditions(BlobLeaseRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobGetTagsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobGetTagsOptions.java new file mode 100644 index 000000000000..331242d86ff1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobGetTagsOptions.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobRequestConditions; + +/** + * Extended options that may be passed when getting tags for a blob. + */ +@Fluent +public class BlobGetTagsOptions { + + private BlobRequestConditions requestConditions; + + /** + * @return {@link BlobRequestConditions} + */ + public BlobRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * @param requestConditions {@link BlobRequestConditions} + * @return The updated options. + */ + public BlobGetTagsOptions setRequestConditions(BlobRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } + +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobReleaseLeaseOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobReleaseLeaseOptions.java new file mode 100644 index 000000000000..6ce493c6dd94 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobReleaseLeaseOptions.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; + +/** + * Extended options that may be passed when releasing a lease to a blob or container. + */ +@Fluent +public class BlobReleaseLeaseOptions { + + private BlobLeaseRequestConditions requestConditions; + + /** + * @return {@link BlobLeaseRequestConditions} + */ + public BlobLeaseRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * @param requestConditions {@link BlobLeaseRequestConditions} + * @return The updated options. + */ + public BlobReleaseLeaseOptions setRequestConditions(BlobLeaseRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobRenewLeaseOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobRenewLeaseOptions.java new file mode 100644 index 000000000000..954fb6b0ebf2 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobRenewLeaseOptions.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; + +/** + * Extended options that may be passed when renewing a lease to a blob or container. + */ +@Fluent +public class BlobRenewLeaseOptions { + + private BlobLeaseRequestConditions requestConditions; + + /** + * @return {@link BlobLeaseRequestConditions} + */ + public BlobLeaseRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * @param requestConditions {@link BlobLeaseRequestConditions} + * @return The updated options. + */ + public BlobRenewLeaseOptions setRequestConditions(BlobLeaseRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobSetAccessTierOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobSetAccessTierOptions.java new file mode 100644 index 000000000000..4407e4150ec1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobSetAccessTierOptions.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.common.implementation.StorageImplUtils; + +/** + * Extended options that may be passed when setting tier for a blob. + */ +@Fluent +public class BlobSetAccessTierOptions { + + private final AccessTier tier; + private RehydratePriority priority; + private String leaseId; + private String ifTagsMatch; + + /** + * @param tier The new tier for the blob. + */ + public BlobSetAccessTierOptions(AccessTier tier) { + StorageImplUtils.assertNotNull("tier", tier); + this.tier = tier; + } + + /** + * @return The new tier for the blob. + */ + public AccessTier getTier() { + return tier; + } + + /** + * @return Priority to set for re-hydrating blobs. + */ + public RehydratePriority getPriority() { + return priority; + } + + /** + * @param priority Priority to set for re-hydrating blobs. + * @return The updated BlobSetAccessTierOptions. + */ + public BlobSetAccessTierOptions setPriority(RehydratePriority priority) { + this.priority = priority; + return this; + } + + /** + * @return The lease ID the active lease on the blob must match. + */ + public String getLeaseId() { + return leaseId; + } + + /** + * @param leaseId The lease ID the active lease on the blob must match. + * @return The updated BlobSetAccessTierOptions. + */ + public BlobSetAccessTierOptions setLeaseId(String leaseId) { + this.leaseId = leaseId; + return this; + } + + /** + * @return The SQL statement that apply to the tags of the blob. + */ + public String getIfTagsMatch() { + return ifTagsMatch; + } + + /** + * @param ifTagsMatch The SQL statement that apply to the tags of the blob. + * @return The updated BlobSetAccessTierOptions. + */ + public BlobSetAccessTierOptions setIfTagsMatch(String ifTagsMatch) { + this.ifTagsMatch = ifTagsMatch; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobSetTagsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobSetTagsOptions.java new file mode 100644 index 000000000000..b49b5d105bdd --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlobSetTagsOptions.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlobRequestConditions; +import com.azure.storage.common.implementation.StorageImplUtils; + +import java.util.Collections; +import java.util.Map; + +/** + * Extended options that may be passed when setting tags for a blob. + */ +@Fluent +public class BlobSetTagsOptions { + + private final Map tags; + private BlobRequestConditions requestConditions; + + /** + * @param tags Tags to associate with the blob. + */ + public BlobSetTagsOptions(Map tags) { + StorageImplUtils.assertNotNull("tags", tags); + this.tags = Collections.unmodifiableMap(tags); + } + + /** + * @return The tags to associate with the blob. + */ + public Map getTags() { + return tags; + } + + /** + * @return {@link BlobRequestConditions} + */ + public BlobRequestConditions getRequestConditions() { + return requestConditions; + } + + /** + * @param requestConditions {@link BlobRequestConditions} + * @return The updated options. + */ + public BlobSetTagsOptions setRequestConditions(BlobRequestConditions requestConditions) { + this.requestConditions = requestConditions; + return this; + } + +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobListBlocksOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobListBlocksOptions.java new file mode 100644 index 000000000000..fadc41b926a9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/options/BlockBlobListBlocksOptions.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.options; + +import com.azure.core.annotation.Fluent; +import com.azure.storage.blob.models.BlockListType; + +/** + * Extended options that may be passed when listing blocks for a block blob. + */ +@Fluent +public class BlockBlobListBlocksOptions { + + private final BlockListType type; + private String leaseId; + private String ifTagsMatch; + + /** + * @param type Specifies which type of blocks to return. + */ + public BlockBlobListBlocksOptions(BlockListType type) { + this.type = type; + } + + /** + * Gets the type of blocks to list. + * + * @return The type of blocks to return. + */ + public BlockListType getType() { + return type; + } + + /** + * Gets the lease ID that blobs and containers must match. + * + * @return The lease ID that blobs and containers must match. + */ + public String getLeaseId() { + return leaseId; + } + + /** + * Optionally limits requests to blobs and containers that match the lease ID. + * + * @param leaseId Lease ID that blobs and containers must match. + * @return The updated BlockBlobListBlocksOptions object. + */ + public BlockBlobListBlocksOptions setLeaseId(String leaseId) { + this.leaseId = leaseId; + return this; + } + + /** + * Gets the SQL statement that apply to the tags of the blob. + * + * @return The SQL statement that apply to the tags of the blob. + */ + public String getIfTagsMatch() { + return ifTagsMatch; + } + + /** + * Optionally applies the SQL statement to the tags of the blob. + * + * @param ifTagsMatch The SQL statement that apply to the tags of the blob. + * @return The updated BlockBlobListBlocksOptions object. + */ + public BlockBlobListBlocksOptions setIfTagsMatch(String ifTagsMatch) { + this.ifTagsMatch = ifTagsMatch; + return this; + } + +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobContainerSasPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobContainerSasPermission.java index 74cd1a3eb645..029f6a71c6f9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobContainerSasPermission.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobContainerSasPermission.java @@ -29,6 +29,8 @@ public final class BlobContainerSasPermission { private boolean listPermission; + private boolean tagsPermission; + /** * Initializes an {@code BlobContainerSasPermission} object with all fields set to false. */ @@ -41,7 +43,7 @@ public BlobContainerSasPermission() { * * @param permString A {@code String} which represents the {@code BlobContainerSasPermission}. * @return A {@code BlobContainerSasPermission} generated from the given {@code String}. - * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, d, x or l. + * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, d, x, l or t. */ public static BlobContainerSasPermission parse(String permString) { BlobContainerSasPermission permissions = new BlobContainerSasPermission(); @@ -70,6 +72,9 @@ public static BlobContainerSasPermission parse(String permString) { case 'l': permissions.listPermission = true; break; + case 't': + permissions.tagsPermission = true; + break; default: throw new IllegalArgumentException( String.format(Locale.ROOT, Constants.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE, @@ -205,6 +210,24 @@ public BlobContainerSasPermission setListPermission(boolean hasListPermission) { return this; } + /** + * @return the tags permission status. + */ + public boolean hasTagsPermission() { + return tagsPermission; + } + + /** + * Sets the tags permission status. + * + * @param tagsPermission Permission status to set + * @return the updated BlobContainerSasPermission object. + */ + public BlobContainerSasPermission setTagsPermission(boolean tagsPermission) { + this.tagsPermission = tagsPermission; + return this; + } + /** * Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -245,6 +268,10 @@ public String toString() { builder.append('l'); } + if (this.tagsPermission) { + builder.append('t'); + } + return builder.toString(); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobSasPermission.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobSasPermission.java index e1dab904197d..f3925cd81ebc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobSasPermission.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobSasPermission.java @@ -27,6 +27,8 @@ public final class BlobSasPermission { private boolean deleteVersionPermission; + private boolean tagsPermission; + /** * Initializes a {@code BlobSasPermission} object with all fields set to false. */ @@ -39,7 +41,7 @@ public BlobSasPermission() { * * @param permString A {@code String} which represents the {@code BlobSasPermission}. * @return A {@code BlobSasPermission} generated from the given {@code String}. - * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, d or x. + * @throws IllegalArgumentException If {@code permString} contains a character other than r, a, c, w, d, x or t. */ public static BlobSasPermission parse(String permString) { BlobSasPermission permissions = new BlobSasPermission(); @@ -65,6 +67,9 @@ public static BlobSasPermission parse(String permString) { case 'x': permissions.deleteVersionPermission = true; break; + case 't': + permissions.tagsPermission = true; + break; default: throw new IllegalArgumentException( String.format(Locale.ROOT, Constants.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE, @@ -182,6 +187,24 @@ public BlobSasPermission setDeleteVersionPermission(boolean hasDeleteVersionPerm return this; } + /** + * @return the tags permission status. + */ + public boolean hasTagsPermission() { + return tagsPermission; + } + + /** + * Sets the tags permission status. + * + * @param tagsPermission Permission status to set + * @return the updated BlobSasPermission object. + */ + public BlobSasPermission setTagsPermission(boolean tagsPermission) { + this.tagsPermission = tagsPermission; + return this; + } + /** * Converts the given permissions to a {@code String}. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -219,6 +242,10 @@ public String toString() { builder.append('x'); } + if (this.tagsPermission) { + builder.append('t'); + } + return builder.toString(); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java index 3aabd75a570b..93c862ce30da 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java @@ -26,6 +26,7 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.CpkInfo; +import com.azure.storage.blob.options.AppendBlobSealOptions; import com.azure.storage.common.implementation.Constants; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -190,8 +191,8 @@ Mono> createWithResponse(AppendBlobCreateOptions option return this.azureBlobStorage.appendBlobs().createWithRestResponseAsync(null, null, 0, null, options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, tagsToString(options.getTags()), options.getHeaders(), - getCustomerProvidedKey(), encryptionScope, null, + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, + tagsToString(options.getTags()), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { AppendBlobCreateHeaders hd = rb.getDeserializedHeaders(); @@ -268,8 +269,8 @@ Mono> appendBlockWithResponse(Flux data, lo null, null, data, length, null, contentMd5, null, appendBlobRequestConditions.getLeaseId(), appendBlobRequestConditions.getMaxSize(), appendBlobRequestConditions.getAppendPosition(), appendBlobRequestConditions.getIfModifiedSince(), appendBlobRequestConditions.getIfUnmodifiedSince(), - appendBlobRequestConditions.getIfMatch(), appendBlobRequestConditions.getIfNoneMatch(), null, - getCustomerProvidedKey(), encryptionScope, null, + appendBlobRequestConditions.getIfMatch(), appendBlobRequestConditions.getIfNoneMatch(), + appendBlobRequestConditions.getTagsConditions(), null, getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { AppendBlobAppendBlockHeaders hd = rb.getDeserializedHeaders(); @@ -355,9 +356,9 @@ Mono> appendBlockFromUrlWithResponse(String sourceUrl, destRequestConditions.getMaxSize(), destRequestConditions.getAppendPosition(), destRequestConditions.getIfModifiedSince(), destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), destRequestConditions.getIfNoneMatch(), - sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), - sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), null, - getCustomerProvidedKey(), encryptionScope, null, + destRequestConditions.getTagsConditions(), sourceRequestConditions.getIfModifiedSince(), + sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(), + sourceRequestConditions.getIfNoneMatch(), null, getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { AppendBlobAppendBlockFromUrlHeaders hd = rb.getDeserializedHeaders(); @@ -367,4 +368,55 @@ Mono> appendBlockFromUrlWithResponse(String sourceUrl, return new SimpleResponse<>(rb, item); }); } + + /** + * Seals an append blob, making it read only. Any subsequent appends will fail. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.seal} + * + * @return A reactive response signalling completion. + */ + public Mono seal() { + try { + return sealWithResponse(new AppendBlobSealOptions()) + .flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Seals an append blob, making it read only. Any subsequent appends will fail. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobAsyncClient.sealWithResponse#AppendBlobSealOptions} + * + * @param options {@link AppendBlobSealOptions} + * @return A reactive response signalling completion. + */ + public Mono> sealWithResponse(AppendBlobSealOptions options) { + try { + return withContext(context -> sealWithResponse(options, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> sealWithResponse(AppendBlobSealOptions options, Context context) { + options = (options == null) ? new AppendBlobSealOptions() : options; + + AppendBlobRequestConditions requestConditions = options.getRequestConditions(); + requestConditions = (requestConditions == null) ? new AppendBlobRequestConditions() : requestConditions; + context = context == null ? Context.NONE : context; + + return this.azureBlobStorage.appendBlobs().sealWithRestResponseAsync(null, null, null, null, + requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getAppendPosition(), + context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) + .map(response -> new SimpleResponse<>(response, null)); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 135ccbc3110d..b5852e8edeab 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -18,6 +18,7 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.options.AppendBlobSealOptions; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; @@ -31,6 +32,8 @@ import java.util.Map; import java.util.Objects; +import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; + /** * Client to an append blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the * method {@link BlobClient#getAppendBlobClient()}. This class does not hold any state about a particular blob, but is @@ -268,4 +271,33 @@ public Response appendBlockFromUrlWithResponse(String sourceUrl, sourceRange, sourceContentMd5, destRequestConditions, sourceRequestConditions, context); return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } + + /** + * Seals an append blob, making it read only. Any subsequent appends will fail. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.seal} + */ + public void seal() { + sealWithResponse(new AppendBlobSealOptions(), null, Context.NONE); + } + + /** + * Seals an append blob, making it read only. Any subsequent appends will fail. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.AppendBlobClient.sealWithResponse#AppendBlobSealOptions-Duration-Context} + * + * @param options {@link AppendBlobSealOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A reactive response signalling completion. + */ + public Response sealWithResponse(AppendBlobSealOptions options, Duration timeout, Context context) { + Mono> response = appendBlobAsyncClient.sealWithResponse(options, context); + + return blockWithOptionalTimeout(response, timeout); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 031786dc772e..8e98cd628491 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -43,6 +43,7 @@ import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.BlobQueryAsyncResponse; +import com.azure.storage.blob.options.BlobGetTagsOptions; import com.azure.storage.blob.options.BlobQueryOptions; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; @@ -55,6 +56,8 @@ import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.options.BlobSetAccessTierOptions; +import com.azure.storage.blob.options.BlobSetTagsOptions; import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; @@ -483,19 +486,12 @@ public PollerFlux beginCopy(BlobBeginCopyOptions options) { ? new BlobRequestConditions() : options.getDestinationRequestConditions(); - // We want to hide the SourceAccessConditions type from the user for consistency's sake, so we convert here. - final RequestConditions sourceConditions = new RequestConditions() - .setIfModifiedSince(sourceModifiedCondition.getIfModifiedSince()) - .setIfUnmodifiedSince(sourceModifiedCondition.getIfUnmodifiedSince()) - .setIfMatch(sourceModifiedCondition.getIfMatch()) - .setIfNoneMatch(sourceModifiedCondition.getIfNoneMatch()); - return new PollerFlux<>(interval, (pollingContext) -> { try { return onStart(options.getSourceUrl(), options.getMetadata(), options.getTags(), - options.getTier(), options.getRehydratePriority(), sourceConditions, - destinationRequestConditions); + options.getTier(), options.getRehydratePriority(), options.isSealingDestination(), + sourceModifiedCondition, destinationRequestConditions); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -526,8 +522,8 @@ public PollerFlux beginCopy(BlobBeginCopyOptions options) { } private Mono onStart(String sourceUrl, Map metadata, Map tags, - AccessTier tier, RehydratePriority priority, RequestConditions sourceModifiedRequestConditions, - BlobRequestConditions destinationRequestConditions) { + AccessTier tier, RehydratePriority priority, Boolean sealBlob, + RequestConditions sourceModifiedRequestConditions, BlobRequestConditions destinationRequestConditions) { URL url; try { url = new URL(sourceUrl); @@ -541,8 +537,8 @@ private Mono onStart(String sourceUrl, Map metadat sourceModifiedRequestConditions.getIfUnmodifiedSince(), sourceModifiedRequestConditions.getIfMatch(), sourceModifiedRequestConditions.getIfNoneMatch(), destinationRequestConditions.getIfModifiedSince(), destinationRequestConditions.getIfUnmodifiedSince(), destinationRequestConditions.getIfMatch(), - destinationRequestConditions.getIfNoneMatch(), destinationRequestConditions.getLeaseId(), null, - tagsToString(tags), null, null, null, context)) + destinationRequestConditions.getIfNoneMatch(), destinationRequestConditions.getTagsConditions(), + destinationRequestConditions.getLeaseId(), null, tagsToString(tags), sealBlob, context)) .map(response -> { final BlobStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); @@ -759,8 +755,9 @@ Mono> copyFromUrlWithResponse(BlobCopyFromUrlOptions options, C sourceModifiedRequestConditions.getIfUnmodifiedSince(), sourceModifiedRequestConditions.getIfMatch(), sourceModifiedRequestConditions.getIfNoneMatch(), destRequestConditions.getIfModifiedSince(), destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), - destRequestConditions.getIfNoneMatch(), destRequestConditions.getLeaseId(), null, null, - tagsToString(options.getTags()), null, null, context) + destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), + destRequestConditions.getLeaseId(), null, null, + tagsToString(options.getTags()), context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); } @@ -834,7 +831,8 @@ private Mono downloadHelper(BlobRange range, DownloadRetryOpti return azureBlobStorage.blobs().downloadWithRestResponseAsync(null, null, snapshot, versionId, null, range.toHeaderValue(), requestConditions.getLeaseId(), getMD5, null, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, customerProvidedKey, null, context) + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, + customerProvidedKey, context) .map(response -> { info.setETag(response.getDeserializedHeaders().getETag()); return new ReliableDownload(response, options, info, updatedInfo -> @@ -1150,7 +1148,7 @@ Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnap return this.azureBlobStorage.blobs().deleteWithRestResponseAsync(null, null, snapshot, versionId, null, requestConditions.getLeaseId(), deleteBlobSnapshotOptions, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, null, context) + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -1203,7 +1201,7 @@ Mono> getPropertiesWithResponse(BlobRequestConditions r null, null, snapshot, versionId, null, requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, customerProvidedKey, null, + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, customerProvidedKey, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { BlobGetPropertiesHeaders hd = rb.getDeserializedHeaders(); @@ -1217,7 +1215,7 @@ Mono> getPropertiesWithResponse(BlobRequestConditions r hd.isAccessTierInferred(), ArchiveStatus.fromString(hd.getArchiveStatus()), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), hd.getAccessTierChangeTime(), hd.getMetadata(), hd.getBlobCommittedBlockCount(), hd.getVersionId(), hd.isCurrentVersion(), - hd.getTagCount(), hd.getObjectReplicationRules()); + hd.getTagCount(), hd.getObjectReplicationRules(), hd.getRehydratePriority(), hd.isSealed()); return new SimpleResponse<>(rb, properties); }); } @@ -1275,7 +1273,7 @@ Mono> setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobReq return this.azureBlobStorage.blobs().setHTTPHeadersWithRestResponseAsync( null, null, null, requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, headers, null, context) + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, headers, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -1333,8 +1331,8 @@ Mono> setMetadataWithResponse(Map metadata, BlobR return this.azureBlobStorage.blobs().setMetadataWithRestResponseAsync( null, null, null, metadata, requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, customerProvidedKey, encryptionScope, null, - context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, customerProvidedKey, + encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -1351,7 +1349,7 @@ Mono> setMetadataWithResponse(Map metadata, BlobR * @return A reactive response containing the blob's tags. */ public Mono> getTags() { - return this.getTagsWithResponse().map(Response::getValue); + return this.getTagsWithResponse(new BlobGetTagsOptions()).map(Response::getValue); } /** @@ -1359,24 +1357,28 @@ public Mono> getTags() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getTagsWithResponse} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.getTagsWithResponse#BlobGetTagsOptions} * *

    For more information, see the * Azure Docs

    * + * @param options {@link BlobGetTagsOptions} * @return A reactive response containing the blob's tags. */ - public Mono>> getTagsWithResponse() { + public Mono>> getTagsWithResponse(BlobGetTagsOptions options) { try { - return withContext(this::getTagsWithResponse); + return withContext(context -> getTagsWithResponse(options, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono>> getTagsWithResponse(Context context) { + Mono>> getTagsWithResponse(BlobGetTagsOptions options, Context context) { + options = (options == null) ? new BlobGetTagsOptions() : options; + BlobRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobRequestConditions() : options.getRequestConditions(); return this.azureBlobStorage.blobs().getTagsWithRestResponseAsync(null, null, null, null, snapshot, - versionId, null, context) + versionId, requestConditions.getTagsConditions(), context) .map(response -> { Map tags = new HashMap<>(); for (BlobTag tag : response.getValue().getBlobTagSet()) { @@ -1401,7 +1403,7 @@ Mono>> getTagsWithResponse(Context context) { * @return A reactive response signaling completion. */ public Mono setTags(Map tags) { - return this.setTagsWithResponse(tags).flatMap(FluxUtil::toMono); + return this.setTagsWithResponse(new BlobSetTagsOptions(tags)).flatMap(FluxUtil::toMono); } /** @@ -1410,33 +1412,36 @@ public Mono setTags(Map tags) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setTagsWithResponse#Map} + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setTagsWithResponse#BlobSetTagsOptions} * *

    For more information, see the * Azure Docs

    * - * @param tags Tags to associate with the blob. + * @param options {@link BlobSetTagsOptions} * @return A reactive response signaling completion. */ - public Mono> setTagsWithResponse(Map tags) { + public Mono> setTagsWithResponse(BlobSetTagsOptions options) { try { - return withContext(context -> setTagsWithResponse(tags, context)); + return withContext(context -> setTagsWithResponse(options, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> setTagsWithResponse(Map tags, Context context) { + Mono> setTagsWithResponse(BlobSetTagsOptions options, Context context) { + StorageImplUtils.assertNotNull("options", options); + BlobRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobRequestConditions() : options.getRequestConditions(); List tagList = null; - if (tags != null) { + if (options.getTags() != null) { tagList = new ArrayList<>(); - for (Map.Entry entry : tags.entrySet()) { + for (Map.Entry entry : options.getTags().entrySet()) { tagList.add(new BlobTag().setKey(entry.getKey()).setValue(entry.getValue())); } } BlobTags t = new BlobTags().setBlobTagSet(tagList); return this.azureBlobStorage.blobs().setTagsWithRestResponseAsync(null, null, null, versionId, null, null, null, - t, null, context) + requestConditions.getTagsConditions(), t, context) .map(response -> new SimpleResponse<>(response, null)); } @@ -1492,8 +1497,8 @@ Mono> createSnapshotWithResponse(Map new SimpleResponse<>(rb, this.getSnapshotClient(rb.getDeserializedHeaders().getSnapshot()))); } @@ -1543,19 +1548,44 @@ public Mono setAccessTier(AccessTier tier) { */ public Mono> setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, String leaseId) { try { - return withContext(context -> setTierWithResponse(tier, priority, leaseId, context)); + return withContext(context -> setTierWithResponse(new BlobSetAccessTierOptions(tier).setPriority(priority) + .setLeaseId(leaseId), context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> setTierWithResponse(AccessTier tier, RehydratePriority priority, String leaseId, - Context context) { - StorageImplUtils.assertNotNull("tier", tier); + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in + * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of + * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's + * etag. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#BlobSetAccessTierOptions} + * + *

    For more information, see the + * Azure Docs

    + * + * @param options {@link BlobSetAccessTierOptions} + * @return A reactive response signalling completion. + * @throws NullPointerException if {@code tier} is null. + */ + public Mono> setAccessTierWithResponse(BlobSetAccessTierOptions options) { + try { + return withContext(context -> setTierWithResponse(options, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> setTierWithResponse(BlobSetAccessTierOptions options, Context context) { + StorageImplUtils.assertNotNull("options", options); return this.azureBlobStorage.blobs().setTierWithRestResponseAsync( - null, null, tier, null, null, null, - priority, null, leaseId, context) + null, null, options.getTier(), null, null, null, + options.getPriority(), null, options.getLeaseId(), options.getIfTagsMatch(), context) .map(response -> new SimpleResponse<>(response, null)); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 093220f8b91c..9809cb95d673 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -21,6 +21,7 @@ import com.azure.storage.blob.models.BlobDownloadResponse; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobQueryAsyncResponse; +import com.azure.storage.blob.options.BlobGetTagsOptions; import com.azure.storage.blob.options.BlobQueryOptions; import com.azure.storage.blob.models.BlobQueryResponse; import com.azure.storage.blob.models.BlobRange; @@ -33,6 +34,8 @@ import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.options.BlobSetAccessTierOptions; +import com.azure.storage.blob.options.BlobSetTagsOptions; import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.FluxInputStream; @@ -798,7 +801,7 @@ public Response setMetadataWithResponse(Map metadata, Blob * @return The blob's tags. */ public Map getTags() { - return this.getTagsWithResponse(null, Context.NONE).getValue(); + return this.getTagsWithResponse(new BlobGetTagsOptions(), null, Context.NONE).getValue(); } /** @@ -806,17 +809,19 @@ public Map getTags() { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getTagsWithResponse#Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.getTagsWithResponse#BlobGetTagsOptions-Duration-Context} * *

    For more information, see the * Azure Docs

    * + * @param options {@link BlobGetTagsOptions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return The blob's tags. */ - public Response> getTagsWithResponse(Duration timeout, Context context) { - Mono>> response = client.getTagsWithResponse(context); + public Response> getTagsWithResponse(BlobGetTagsOptions options, Duration timeout, + Context context) { + Mono>> response = client.getTagsWithResponse(options, context); return blockWithOptionalTimeout(response, timeout); } @@ -835,7 +840,7 @@ public Response> getTagsWithResponse(Duration timeout, Conte * @param tags Tags to associate with the blob. */ public void setTags(Map tags) { - this.setTagsWithResponse(tags, null, Context.NONE); + this.setTagsWithResponse(new BlobSetTagsOptions(tags), null, Context.NONE); } /** @@ -844,18 +849,18 @@ public void setTags(Map tags) { * *

    Code Samples

    * - * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setTagsWithResponse#Map-Duration-Context} + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setTagsWithResponse#BlobSetTagsOptions-Duration-Context} * *

    For more information, see the * Azure Docs

    * - * @param tags Tags to associate with the blob. + * @param options {@link BlobSetTagsOptions} * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing status code and HTTP headers. */ - public Response setTagsWithResponse(Map tags, Duration timeout, Context context) { - Mono> response = client.setTagsWithResponse(tags, context); + public Response setTagsWithResponse(BlobSetTagsOptions options, Duration timeout, Context context) { + Mono> response = client.setTagsWithResponse(options, context); return blockWithOptionalTimeout(response, timeout); } @@ -945,7 +950,31 @@ public void setAccessTier(AccessTier tier) { */ public Response setAccessTierWithResponse(AccessTier tier, RehydratePriority priority, String leaseId, Duration timeout, Context context) { - return blockWithOptionalTimeout(client.setTierWithResponse(tier, priority, leaseId, context), timeout); + return setAccessTierWithResponse(new BlobSetAccessTierOptions(tier).setPriority(priority).setLeaseId(leaseId), + timeout, context); + } + + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in + * a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of + * the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's + * etag. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#BlobSetAccessTierOptions-Duration-Context} + * + *

    For more information, see the + * Azure Docs

    + * + * @param options {@link BlobSetAccessTierOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + */ + public Response setAccessTierWithResponse(BlobSetAccessTierOptions options, + Duration timeout, Context context) { + return blockWithOptionalTimeout(client.setTierWithResponse(options, context), timeout); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java index b48b2faeeba5..5c82b413fcd2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java @@ -17,6 +17,14 @@ import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; +import com.azure.storage.blob.options.BlobAcquireLeaseOptions; +import com.azure.storage.blob.options.BlobBreakLeaseOptions; +import com.azure.storage.blob.options.BlobChangeLeaseOptions; +import com.azure.storage.blob.options.BlobReleaseLeaseOptions; +import com.azure.storage.blob.options.BlobRenewLeaseOptions; +import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.net.URL; @@ -123,27 +131,51 @@ public Mono acquireLease(int duration) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> acquireLeaseWithResponse(int duration, RequestConditions modifiedRequestConditions) { try { - return withContext(context -> acquireLeaseWithResponse(duration, modifiedRequestConditions, context)); + return withContext(context -> acquireLeaseWithResponse(new BlobAcquireLeaseOptions(duration) + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), + context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> acquireLeaseWithResponse(int duration, RequestConditions modifiedRequestConditions, + /** + * Acquires a lease for write and delete operations. The lease duration must be between 15 to 60 seconds, or -1 for + * an infinite duration. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLeaseWithResponse#BlobAcquireLeaseOptions} + * + * @param options {@link BlobAcquireLeaseOptions} + * @return A reactive response containing the lease ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> acquireLeaseWithResponse(BlobAcquireLeaseOptions options) { + try { + return withContext(context -> acquireLeaseWithResponse(options, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> acquireLeaseWithResponse(BlobAcquireLeaseOptions options, Context context) { - modifiedRequestConditions = (modifiedRequestConditions == null) - ? new RequestConditions() : modifiedRequestConditions; + StorageImplUtils.assertNotNull("options", options); + BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; if (this.isBlob) { - return this.client.blobs().acquireLeaseWithRestResponseAsync(null, null, null, duration, this.leaseId, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - modifiedRequestConditions.getIfMatch(), modifiedRequestConditions.getIfNoneMatch(), null, null, + return this.client.blobs().acquireLeaseWithRestResponseAsync(null, null, null, + options.getDuration(), this.leaseId, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { - return this.client.containers().acquireLeaseWithRestResponseAsync(null, null, duration, this.leaseId, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - null, context) + return this.client.containers().acquireLeaseWithRestResponseAsync(null, null, + options.getDuration(), this.leaseId, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } } @@ -160,7 +192,7 @@ Mono> acquireLeaseWithResponse(int duration, RequestConditions @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLease() { try { - return renewLeaseWithResponse(null).flatMap(FluxUtil::toMono); + return renewLeaseWithResponse((RequestConditions) null).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -181,26 +213,48 @@ public Mono renewLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> renewLeaseWithResponse(RequestConditions modifiedRequestConditions) { try { - return withContext(context -> renewLeaseWithResponse(modifiedRequestConditions, + return withContext(context -> renewLeaseWithResponse(new BlobRenewLeaseOptions() + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> renewLeaseWithResponse(RequestConditions modifiedRequestConditions, Context context) { - modifiedRequestConditions = (modifiedRequestConditions == null) - ? new RequestConditions() : modifiedRequestConditions; + /** + * Renews the previously acquired lease. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLeaseWithResponse#BlobRenewLeaseOptions} + * + * @param options {@link BlobRenewLeaseOptions} + * @return A reactive response containing the renewed lease ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> renewLeaseWithResponse(BlobRenewLeaseOptions options) { + try { + return withContext(context -> renewLeaseWithResponse(options, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> renewLeaseWithResponse(BlobRenewLeaseOptions options, Context context) { + options = (options == null) ? new BlobRenewLeaseOptions() : options; + BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; if (this.isBlob) { return this.client.blobs().renewLeaseWithRestResponseAsync(null, null, this.leaseId, null, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - modifiedRequestConditions.getIfMatch(), modifiedRequestConditions.getIfNoneMatch(), null, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { return this.client.containers().renewLeaseWithRestResponseAsync(null, this.leaseId, null, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } @@ -218,7 +272,7 @@ Mono> renewLeaseWithResponse(RequestConditions modifiedRequestC @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLease() { try { - return releaseLeaseWithResponse(null).flatMap(FluxUtil::toMono); + return releaseLeaseWithResponse((RequestConditions) null).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -239,27 +293,49 @@ public Mono releaseLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> releaseLeaseWithResponse(RequestConditions modifiedRequestConditions) { try { - return withContext(context -> releaseLeaseWithResponse(modifiedRequestConditions, + return withContext(context -> releaseLeaseWithResponse(new BlobReleaseLeaseOptions() + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> releaseLeaseWithResponse(RequestConditions modifiedRequestConditions, Context context) { - modifiedRequestConditions = (modifiedRequestConditions == null) - ? new RequestConditions() : modifiedRequestConditions; + /** + * Releases the previously acquired lease. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLeaseWithResponse#BlobReleaseLeaseOptions} + * + * @param options {@link BlobReleaseLeaseOptions} + * @return A reactive response signalling completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> releaseLeaseWithResponse(BlobReleaseLeaseOptions options) { + try { + return withContext(context -> releaseLeaseWithResponse(options, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> releaseLeaseWithResponse(BlobReleaseLeaseOptions options, Context context) { + options = (options == null) ? new BlobReleaseLeaseOptions() : options; + BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; if (this.isBlob) { return this.client.blobs().releaseLeaseWithRestResponseAsync(null, null, this.leaseId, null, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - modifiedRequestConditions.getIfMatch(), modifiedRequestConditions.getIfNoneMatch(), null, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } else { return this.client.containers().releaseLeaseWithRestResponseAsync(null, this.leaseId, null, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -277,7 +353,7 @@ Mono> releaseLeaseWithResponse(RequestConditions modifiedRequestC @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLease() { try { - return breakLeaseWithResponse(null, null).flatMap(FluxUtil::toMono); + return breakLeaseWithResponse((Integer) null, null).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -306,29 +382,54 @@ public Mono breakLease() { public Mono> breakLeaseWithResponse(Integer breakPeriodInSeconds, RequestConditions modifiedRequestConditions) { try { - return withContext(context -> breakLeaseWithResponse(breakPeriodInSeconds, modifiedRequestConditions, + return withContext(context -> breakLeaseWithResponse(new BlobBreakLeaseOptions() + .setBreakPeriodInSeconds(breakPeriodInSeconds) + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> breakLeaseWithResponse(Integer breakPeriodInSeconds, - RequestConditions modifiedRequestConditions, Context context) { - modifiedRequestConditions = (modifiedRequestConditions == null) - ? new RequestConditions() : modifiedRequestConditions; + /** + * Breaks the previously acquired lease, if it exists. + * + *

    If {@code null} is passed for {@code breakPeriodInSeconds} a fixed duration lease will break after the + * remaining lease period elapses and an infinite lease will break immediately.

    + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLeaseWithResponse#BlobBreakLeaseOptions} + * + * @param options {@link BlobBreakLeaseOptions} + * @return A reactive response containing the remaining time in the broken lease in seconds. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> breakLeaseWithResponse(BlobBreakLeaseOptions options) { + try { + return withContext(context -> breakLeaseWithResponse(options, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> breakLeaseWithResponse(BlobBreakLeaseOptions options, Context context) { + options = (options == null) ? new BlobBreakLeaseOptions() : options; + BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; if (this.isBlob) { - return this.client.blobs().breakLeaseWithRestResponseAsync(null, null, null, breakPeriodInSeconds, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - modifiedRequestConditions.getIfMatch(), modifiedRequestConditions.getIfNoneMatch(), null, null, + return this.client.blobs().breakLeaseWithRestResponseAsync(null, null, null, + options.getBreakPeriodInSeconds(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseTime())); } else { - return this.client.containers().breakLeaseWithRestResponseAsync(null, null, breakPeriodInSeconds, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - null, context) + return this.client.containers().breakLeaseWithRestResponseAsync(null, null, + options.getBreakPeriodInSeconds(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseTime())); } } @@ -369,27 +470,50 @@ public Mono changeLease(String proposedId) { public Mono> changeLeaseWithResponse(String proposedId, RequestConditions modifiedRequestConditions) { try { - return withContext(context -> changeLeaseWithResponse(proposedId, modifiedRequestConditions, context)); + return withContext(context -> changeLeaseWithResponse(new BlobChangeLeaseOptions(proposedId) + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), + context)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> changeLeaseWithResponse(String proposedId, RequestConditions modifiedRequestConditions, - Context context) { - modifiedRequestConditions = (modifiedRequestConditions == null) - ? new RequestConditions() : modifiedRequestConditions; + /** + * Changes the lease ID. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLeaseWithResponse#BlobChangeLeaseOptions} + * + * @param options {@link BlobChangeLeaseOptions} + * @return A reactive response containing the new lease ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> changeLeaseWithResponse(BlobChangeLeaseOptions options) { + try { + return withContext(context -> changeLeaseWithResponse(options, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> changeLeaseWithResponse(BlobChangeLeaseOptions options, Context context) { + StorageImplUtils.assertNotNull("options", options); + BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; if (this.isBlob) { - return this.client.blobs().changeLeaseWithRestResponseAsync(null, null, this.leaseId, proposedId, null, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - modifiedRequestConditions.getIfMatch(), modifiedRequestConditions.getIfNoneMatch(), null, null, + return this.client.blobs().changeLeaseWithRestResponseAsync(null, null, this.leaseId, + options.getProposedId(), null, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { - return this.client.containers().changeLeaseWithRestResponseAsync(null, this.leaseId, proposedId, null, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) + return this.client.containers().changeLeaseWithRestResponseAsync(null, this.leaseId, + options.getProposedId(), null, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), null, + context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java index d7e84db73b2b..d01098325463 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java @@ -11,6 +11,12 @@ import com.azure.core.util.Context; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.options.BlobAcquireLeaseOptions; +import com.azure.storage.blob.options.BlobBreakLeaseOptions; +import com.azure.storage.blob.options.BlobChangeLeaseOptions; +import com.azure.storage.blob.options.BlobReleaseLeaseOptions; +import com.azure.storage.blob.options.BlobRenewLeaseOptions; import com.azure.storage.common.implementation.StorageImplUtils; import java.net.URL; @@ -97,8 +103,29 @@ public String acquireLease(int duration) { @ServiceMethod(returns = ReturnType.SINGLE) public Response acquireLeaseWithResponse(int duration, RequestConditions modifiedRequestConditions, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client - .acquireLeaseWithResponse(duration, modifiedRequestConditions, context), timeout); + return acquireLeaseWithResponse(new BlobAcquireLeaseOptions(duration) + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), timeout, + context); + } + + /** + * Acquires a lease for write and delete operations. The lease duration must be between 15 to 60 seconds or + * -1 for an infinite duration. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.acquireLeaseWithResponse#BlobAcquireLeaseOptions-Duration-Context} + * + * @param options {@link BlobAcquireLeaseOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The lease ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response acquireLeaseWithResponse(BlobAcquireLeaseOptions options, Duration timeout, + Context context) { + return StorageImplUtils.blockWithOptionalTimeout(this.client.acquireLeaseWithResponse(options, context), + timeout); } /** @@ -112,7 +139,7 @@ public Response acquireLeaseWithResponse(int duration, RequestConditions */ @ServiceMethod(returns = ReturnType.SINGLE) public String renewLease() { - return renewLeaseWithResponse(null, null, Context.NONE).getValue(); + return renewLeaseWithResponse((RequestConditions) null, null, Context.NONE).getValue(); } /** @@ -132,8 +159,27 @@ public String renewLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Response renewLeaseWithResponse(RequestConditions modifiedRequestConditions, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client - .renewLeaseWithResponse(modifiedRequestConditions, context), timeout); + return renewLeaseWithResponse(new BlobRenewLeaseOptions() + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), + timeout, context); + } + + /** + * Renews the previously-acquired lease. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse#BlobRenewLeaseOptions-Duration-Context} + * + * @param options {@link BlobRenewLeaseOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The renewed lease ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response renewLeaseWithResponse(BlobRenewLeaseOptions options, Duration timeout, + Context context) { + return StorageImplUtils.blockWithOptionalTimeout(this.client.renewLeaseWithResponse(options, context), timeout); } /** @@ -145,7 +191,7 @@ public Response renewLeaseWithResponse(RequestConditions modifiedRequest */ @ServiceMethod(returns = ReturnType.SINGLE) public void releaseLease() { - releaseLeaseWithResponse(null, null, Context.NONE); + releaseLeaseWithResponse((RequestConditions) null, null, Context.NONE); } /** @@ -165,8 +211,28 @@ public void releaseLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Response releaseLeaseWithResponse(RequestConditions modifiedRequestConditions, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client - .releaseLeaseWithResponse(modifiedRequestConditions, context), timeout); + return releaseLeaseWithResponse(new BlobReleaseLeaseOptions() + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), + timeout, context); + } + + /** + * Releases the previously acquired lease. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.releaseLeaseWithResponse#BlobReleaseLeaseOptions-Duration-Context} + * + * @param options {@link BlobReleaseLeaseOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A response containing status code and HTTP headers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response releaseLeaseWithResponse(BlobReleaseLeaseOptions options, Duration timeout, + Context context) { + return StorageImplUtils.blockWithOptionalTimeout(this.client.releaseLeaseWithResponse(options, context), + timeout); } /** @@ -207,8 +273,29 @@ public Integer breakLease() { @ServiceMethod(returns = ReturnType.SINGLE) public Response breakLeaseWithResponse(Integer breakPeriodInSeconds, RequestConditions modifiedRequestConditions, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client - .breakLeaseWithResponse(breakPeriodInSeconds, modifiedRequestConditions, context), timeout); + return breakLeaseWithResponse(new BlobBreakLeaseOptions().setBreakPeriodInSeconds(breakPeriodInSeconds) + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), + timeout, context); + } + + /** + * Breaks the previously acquired lease, if it exists. + * + *

    If {@code null} is passed for {@code breakPeriodInSeconds} a fixed duration lease will break after the + * remaining lease period elapses and an infinite lease will break immediately.

    + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.breakLeaseWithResponse#BlobBreakLeaseOptions-Duration-Context} + * + * @param options {@link BlobBreakLeaseOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The remaining time in the broken lease in seconds. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response breakLeaseWithResponse(BlobBreakLeaseOptions options, Duration timeout, Context context) { + return StorageImplUtils.blockWithOptionalTimeout(this.client.breakLeaseWithResponse(options, context), timeout); } /** @@ -244,8 +331,27 @@ public String changeLease(String proposedId) { @ServiceMethod(returns = ReturnType.SINGLE) public Response changeLeaseWithResponse(String proposedId, RequestConditions modifiedRequestConditions, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client - .changeLeaseWithResponse(proposedId, modifiedRequestConditions, context), timeout); + return changeLeaseWithResponse(new BlobChangeLeaseOptions(proposedId) + .setRequestConditions(ModelHelper.populateBlobLeaseRequestConditions(modifiedRequestConditions)), timeout, + context); + } + + /** + * Changes the lease ID. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlobLeaseClient.changeLeaseWithResponse#BlobChangeLeaseOptions-Duration-Context} + * + * @param options {@link BlobChangeLeaseOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return The new lease ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response changeLeaseWithResponse(BlobChangeLeaseOptions options, Duration timeout, Context context) { + return StorageImplUtils.blockWithOptionalTimeout(this.client.changeLeaseWithResponse(options, context), + timeout); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index 5b37fb7fd1a2..c1c0c17540ef 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -21,6 +21,7 @@ import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.options.BlockBlobCommitBlockListOptions; import com.azure.storage.blob.models.BlockBlobItem; +import com.azure.storage.blob.options.BlockBlobListBlocksOptions; import com.azure.storage.blob.options.BlockBlobSimpleUploadOptions; import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; @@ -257,8 +258,8 @@ Mono> uploadWithResponse(BlockBlobSimpleUploadOptions op null, data, options.getLength(), null, options.getContentMd5(), options.getMetadata(), requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, tagsToString(options.getTags()), - options.getHeaders(), getCustomerProvidedKey(), encryptionScope, null, + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, + tagsToString(options.getTags()), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { BlockBlobUploadHeaders hd = rb.getDeserializedHeaders(); @@ -464,16 +465,39 @@ public Mono listBlocks(BlockListType listType) { */ public Mono> listBlocksWithResponse(BlockListType listType, String leaseId) { try { - return withContext(context -> listBlocksWithResponse(listType, leaseId, context)); + return this.listBlocksWithResponse(new BlockBlobListBlocksOptions(listType).setLeaseId(leaseId)); } catch (RuntimeException ex) { return monoError(logger, ex); } } - Mono> listBlocksWithResponse(BlockListType listType, String leaseId, Context context) { + /** + * Returns the list of blocks that have been uploaded as part of a block blob using the specified block list + * filter. + * For more information, see the + * Azure Docs. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockBlobListBlocksOptions} + * + * @param options {@link BlockBlobListBlocksOptions} + * @return A reactive response containing the list of blocks. + */ + public Mono> listBlocksWithResponse(BlockBlobListBlocksOptions options) { + try { + return withContext(context -> listBlocksWithResponse(options, context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> listBlocksWithResponse(BlockBlobListBlocksOptions options, Context context) { + StorageImplUtils.assertNotNull("options", options); return this.azureBlobStorage.blockBlobs().getBlockListWithRestResponseAsync( - null, null, listType, getSnapshotId(), null, leaseId, null, null, context) + null, null, options.getType(), getSnapshotId(), null, options.getLeaseId(), + options.getIfTagsMatch(), null, context) .map(response -> new SimpleResponse<>(response, response.getValue())); } @@ -593,8 +617,8 @@ Mono> commitBlockListWithResponse(BlockBlobCommitBlockLi new BlockLookupList().setLatest(options.getBase64BlockIds()), null, null, null, options.getMetadata(), requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, tagsToString(options.getTags()), options.getHeaders(), - getCustomerProvidedKey(), encryptionScope, null, + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, + tagsToString(options.getTags()), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { BlockBlobCommitBlockListHeaders hd = rb.getDeserializedHeaders(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java index 8fc23edff254..44e4c8059e70 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java @@ -18,6 +18,7 @@ import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.options.BlockBlobCommitBlockListOptions; import com.azure.storage.blob.models.BlockBlobItem; +import com.azure.storage.blob.options.BlockBlobListBlocksOptions; import com.azure.storage.blob.options.BlockBlobOutputStreamOptions; import com.azure.storage.blob.options.BlockBlobSimpleUploadOptions; import com.azure.storage.blob.models.BlockList; @@ -471,7 +472,26 @@ public BlockList listBlocks(BlockListType listType) { */ public Response listBlocksWithResponse(BlockListType listType, String leaseId, Duration timeout, Context context) { - return blockWithOptionalTimeout(client.listBlocksWithResponse(listType, leaseId, context), timeout); + return listBlocksWithResponse(new BlockBlobListBlocksOptions(listType).setLeaseId(leaseId), timeout, context); + } + + /** + * Returns the list of blocks that have been uploaded as part of a block blob using the specified block list + * filter. For more information, see the Azure Docs. + * + *

    Code Samples

    + * + * {@codesnippet com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockBlobListBlocksOptions-Duration-Context} + * + * @param options {@link BlockBlobListBlocksOptions} + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * + * @return The list of blocks. + */ + public Response listBlocksWithResponse(BlockBlobListBlocksOptions options, Duration timeout, + Context context) { + return blockWithOptionalTimeout(client.listBlocksWithResponse(options, context), timeout); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index 774c74b6292c..c1a84a70ea72 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -240,8 +240,8 @@ Mono> createWithResponse(PageBlobCreateOptions options, C return this.azureBlobStorage.pageBlobs().createWithRestResponseAsync(null, null, 0, options.getSize(), null, null, options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), options.getSequenceNumber(), null, tagsToString(options.getTags()), - options.getHeaders(), getCustomerProvidedKey(), encryptionScope, null, + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), options.getSequenceNumber(), + null, tagsToString(options.getTags()), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { PageBlobCreateHeaders hd = rb.getDeserializedHeaders(); @@ -335,7 +335,8 @@ Mono> uploadPagesWithResponse(PageRange pageRange, Flux { PageBlobUploadPagesHeaders hd = rb.getDeserializedHeaders(); @@ -452,9 +453,9 @@ Mono> uploadPagesFromUrlWithResponse(PageRange range, Str destRequestConditions.getIfSequenceNumberLessThan(), destRequestConditions.getIfSequenceNumberEqualTo(), destRequestConditions.getIfModifiedSince(), destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), destRequestConditions.getIfNoneMatch(), - sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), - sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), null, - getCustomerProvidedKey(), encryptionScope, null, + destRequestConditions.getTagsConditions(), sourceRequestConditions.getIfModifiedSince(), + sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(), + sourceRequestConditions.getIfNoneMatch(), null, getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { PageBlobUploadPagesFromURLHeaders hd = rb.getDeserializedHeaders(); @@ -591,7 +592,7 @@ Mono> getPageRangesWithResponse(BlobRange blobRange, BlobRequ return this.azureBlobStorage.pageBlobs().getPageRangesWithRestResponseAsync(null, null, getSnapshotId(), null, blobRange.toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), null, null, + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, response.getValue())); } @@ -726,8 +727,8 @@ Mono> getPageRangesDiffWithResponse(BlobRange blobRange, Stri return this.azureBlobStorage.pageBlobs().getPageRangesDiffWithRestResponseAsync(null, null, getSnapshotId(), null, prevSnapshot, url, blobRange.toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), null, null, - context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), + null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, response.getValue())); } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java index 3ca43461ba8c..d31c5ba5c7a6 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobAsyncClientJavaDocCodeSnippets.java @@ -8,6 +8,7 @@ import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; +import com.azure.storage.blob.options.AppendBlobSealOptions; import reactor.core.publisher.Flux; import java.nio.ByteBuffer; @@ -143,4 +144,26 @@ public void appendBlockFromUrl2() { System.out.printf("AppendBlob has %d committed blocks%n", response.getValue().getBlobCommittedBlockCount())); // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobRequestConditions-BlobRequestConditions } + + /** + * Code snippet for {@link AppendBlobAsyncClient#seal()} + */ + public void seal() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.seal + client.seal().subscribe(response -> System.out.println("Sealed AppendBlob")); + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.seal + } + + /** + * Code snippet for {@link AppendBlobAsyncClient#sealWithResponse(AppendBlobSealOptions)} + */ + public void seal2() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobAsyncClient.sealWithResponse#AppendBlobSealOptions + AppendBlobRequestConditions requestConditions = new AppendBlobRequestConditions().setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + client.sealWithResponse(new AppendBlobSealOptions().setRequestConditions(requestConditions)) + .subscribe(response -> System.out.println("Sealed AppendBlob")); + // END: com.azure.storage.blob.specialized.AppendBlobAsyncClient.sealWithResponse#AppendBlobSealOptions + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java index dcca62a57212..eda2437a2617 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/AppendBlobClientJavaDocCodeSnippets.java @@ -9,6 +9,7 @@ import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; +import com.azure.storage.blob.options.AppendBlobSealOptions; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -159,4 +160,28 @@ public void appendBlockFromUrlWithResponse() { context).getValue().getBlobCommittedBlockCount()); // END: com.azure.storage.blob.specialized.AppendBlobClient.appendBlockFromUrlWithResponse#String-BlobRange-byte-AppendBlobRequestConditions-BlobRequestConditions-Duration-Context } + + /** + * Code snippet for {@link AppendBlobClient#seal()} + */ + public void seal() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.seal + client.seal(); + System.out.println("Sealed AppendBlob"); + // END: com.azure.storage.blob.specialized.AppendBlobClient.seal + } + + /** + * Code snippet for {@link AppendBlobClient#sealWithResponse(AppendBlobSealOptions, Duration, Context)} + */ + public void seal2() { + // BEGIN: com.azure.storage.blob.specialized.AppendBlobClient.sealWithResponse#AppendBlobSealOptions-Duration-Context + AppendBlobRequestConditions requestConditions = new AppendBlobRequestConditions().setLeaseId(leaseId) + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + Context context = new Context("key", "value"); + + client.sealWithResponse(new AppendBlobSealOptions().setRequestConditions(requestConditions), timeout, context); + System.out.println("Sealed AppendBlob"); + // END: com.azure.storage.blob.specialized.AppendBlobClient.sealWithResponse#AppendBlobSealOptions-Duration-Context + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index e15876f4a24b..a49e82857731 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -15,6 +15,7 @@ import com.azure.storage.blob.models.BlobQueryDelimitedSerialization; import com.azure.storage.blob.models.BlobQueryError; import com.azure.storage.blob.models.BlobQueryJsonSerialization; +import com.azure.storage.blob.options.BlobGetTagsOptions; import com.azure.storage.blob.options.BlobQueryOptions; import com.azure.storage.blob.models.BlobQueryProgress; import com.azure.storage.blob.models.BlobRange; @@ -24,6 +25,8 @@ import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.options.BlobSetAccessTierOptions; +import com.azure.storage.blob.options.BlobSetTagsOptions; import com.azure.storage.blob.sas.BlobSasPermission; import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import reactor.core.publisher.Mono; @@ -50,6 +53,7 @@ public class BlobAsyncClientBaseJavaDocCodeSnippets { private BlobAsyncClientBase client = new BlobAsyncClientBase(null, null, BlobServiceVersion.getLatest(), null, null, null, null, null, null, null); private String leaseId = "leaseId"; + private String tags = "tags"; private String copyId = "copyId"; private String url = "https://sample.com"; private String file = "file"; @@ -470,23 +474,23 @@ public void setMetadataWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobAsyncClientBase#getTagsWithResponse()} + * Code snippets for {@link BlobAsyncClientBase#getTagsWithResponse(BlobGetTagsOptions)} */ public void getTagsWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getTagsWithResponse - client.getTagsWithResponse().subscribe(response -> + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.getTagsWithResponse#BlobGetTagsOptions + client.getTagsWithResponse(new BlobGetTagsOptions()).subscribe(response -> System.out.printf("Status code: %d. Num tags: %d%n", response.getStatusCode(), response.getValue().size())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getTagsWithResponse + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getTagsWithResponse#BlobGetTagsOptions } /** - * Code snippets for {@link BlobAsyncClientBase#setTagsWithResponse(Map)} + * Code snippets for {@link BlobAsyncClientBase#setTagsWithResponse(BlobSetTagsOptions)} */ public void setTagsWithResponseCodeSnippet() { - // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setTagsWithResponse#Map - client.setTagsWithResponse(Collections.singletonMap("tag", "value")) + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setTagsWithResponse#BlobSetTagsOptions + client.setTagsWithResponse(new BlobSetTagsOptions(Collections.singletonMap("tag", "value"))) .subscribe(response -> System.out.printf("Set tags completed with stats %d%n", response.getStatusCode())); - // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setTagsWithResponse#Map + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setTagsWithResponse#BlobSetTagsOptions } /** @@ -514,6 +518,20 @@ public void setTierWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-String } + /** + * Code snippets for {@link BlobAsyncClientBase#setAccessTierWithResponse(BlobSetAccessTierOptions)} + */ + public void setTierWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#BlobSetAccessTierOptions + client.setAccessTierWithResponse(new BlobSetAccessTierOptions(AccessTier.HOT) + .setPriority(RehydratePriority.STANDARD) + .setLeaseId(leaseId) + .setIfTagsMatch(tags)) + .subscribe(response -> System.out.printf("Set tier completed with status code %d%n", + response.getStatusCode())); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.setAccessTierWithResponse#BlobSetAccessTierOptions + } + /** * Code snippet for {@link BlobAsyncClientBase#undeleteWithResponse()} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java index ffaee636204c..e7011ad6626f 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -18,6 +18,7 @@ import com.azure.storage.blob.models.BlobQueryDelimitedSerialization; import com.azure.storage.blob.models.BlobQueryError; import com.azure.storage.blob.models.BlobQueryJsonSerialization; +import com.azure.storage.blob.options.BlobGetTagsOptions; import com.azure.storage.blob.options.BlobQueryOptions; import com.azure.storage.blob.models.BlobQueryProgress; import com.azure.storage.blob.models.BlobQuerySerialization; @@ -29,6 +30,8 @@ import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.options.BlobSetAccessTierOptions; +import com.azure.storage.blob.options.BlobSetTagsOptions; import com.azure.storage.blob.sas.BlobSasPermission; import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.implementation.Constants; @@ -55,6 +58,7 @@ public class BlobClientBaseJavaDocCodeSnippets { private BlobClientBase client = new BlobClientBase(null); private String leaseId = "leaseId"; + private String tags = "tags"; private String copyId = "copyId"; private String url = "https://sample.com"; private String file = "file"; @@ -427,24 +431,26 @@ public void setMetadataWithResponseCodeSnippets() { } /** - * Code snippets for {@link BlobClientBase#getTagsWithResponse(Duration, Context)} + * Code snippets for {@link BlobClientBase#getTagsWithResponse(BlobGetTagsOptions, Duration, Context)} */ public void getTagsWithResponse() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getTagsWithResponse#Duration-Context - Map tags = client.getTagsWithResponse(timeout, new Context(key1, value1)).getValue(); + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.getTagsWithResponse#BlobGetTagsOptions-Duration-Context + Map tags = client.getTagsWithResponse(new BlobGetTagsOptions(), timeout, + new Context(key1, value1)).getValue(); System.out.printf("Number of tags: %d%n", tags.size()); - // END: com.azure.storage.blob.specialized.BlobClientBase.getTagsWithResponse#Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.getTagsWithResponse#BlobGetTagsOptions-Duration-Context } /** - * Code snippets for {@link BlobClientBase#setTagsWithResponse(Map, Duration, Context)} + * Code snippets for {@link BlobClientBase#setTagsWithResponse(BlobSetTagsOptions, Duration, Context)} */ public void setTagsWithResponse() { - // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setTagsWithResponse#Map-Duration-Context + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setTagsWithResponse#BlobSetTagsOptions-Duration-Context System.out.printf("Set metadata completed with status %d%n", - client.setTagsWithResponse(Collections.singletonMap("tag", "value"), timeout, new Context(key1, value1)) + client.setTagsWithResponse(new BlobSetTagsOptions(Collections.singletonMap("tag", "value")), timeout, + new Context(key1, value1)) .getStatusCode()); - // END: com.azure.storage.blob.specialized.BlobClientBase.setTagsWithResponse#Map-Duration-Context + // END: com.azure.storage.blob.specialized.BlobClientBase.setTagsWithResponse#BlobSetTagsOptions-Duration-Context } /** @@ -474,6 +480,20 @@ public void setTierWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#AccessTier-RehydratePriority-String-Duration-Context } + /** + * Code snippets for {@link BlobClientBase#setAccessTierWithResponse(BlobSetAccessTierOptions, Duration, Context)} + */ + public void setTierWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#BlobSetAccessTierOptions-Duration-Context + System.out.printf("Set tier completed with status code %d%n", + client.setAccessTierWithResponse(new BlobSetAccessTierOptions(AccessTier.HOT) + .setPriority(RehydratePriority.STANDARD) + .setLeaseId(leaseId) + .setIfTagsMatch(tags), + timeout, new Context(key2, value2)).getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobClientBase.setAccessTierWithResponse#BlobSetAccessTierOptions-Duration-Context + } + /** * Code snippet for {@link BlobClientBase#undeleteWithResponse(Duration, Context)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java index 1306880e956b..7070992d79ae 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobAsyncClientJavaDocCodeSnippets.java @@ -8,6 +8,7 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.options.BlockBlobCommitBlockListOptions; +import com.azure.storage.blob.options.BlockBlobListBlocksOptions; import com.azure.storage.blob.options.BlockBlobSimpleUploadOptions; import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; @@ -31,6 +32,7 @@ public class BlockBlobAsyncClientJavaDocCodeSnippets { private BlockBlobAsyncClient client = new SpecializedBlobClientBuilder().buildBlockBlobAsyncClient(); private Flux data = Flux.just(ByteBuffer.wrap("data".getBytes(StandardCharsets.UTF_8))); private long length = 4L; + private String tags = "tags"; private String leaseId = "leaseId"; private String base64BlockID = "base64BlockID"; private String sourceUrl = "https://example.com"; @@ -201,6 +203,26 @@ public void listBlocks2() { // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockListType-String } + /** + * Code snippet for {@link BlockBlobAsyncClient#listBlocksWithResponse(BlockBlobListBlocksOptions)} + */ + public void listBlocks3() { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockBlobListBlocksOptions + client.listBlocksWithResponse(new BlockBlobListBlocksOptions(BlockListType.ALL) + .setLeaseId(leaseId) + .setIfTagsMatch(tags)).subscribe(response -> { + BlockList block = response.getValue(); + System.out.println("Committed Blocks:"); + block.getCommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), + b.getSizeLong())); + + System.out.println("Uncommitted Blocks:"); + block.getUncommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), + b.getSizeLong())); + }); + // END: com.azure.storage.blob.specialized.BlockBlobAsyncClient.listBlocksWithResponse#BlockBlobListBlocksOptions + } + /** * Code snippet for {@link BlockBlobAsyncClient#commitBlockList(List)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java index e81b2cd0193d..4c906df88472 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlockBlobClientJavaDocCodeSnippets.java @@ -9,6 +9,7 @@ import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.options.BlockBlobCommitBlockListOptions; +import com.azure.storage.blob.options.BlockBlobListBlocksOptions; import com.azure.storage.blob.options.BlockBlobSimpleUploadOptions; import com.azure.storage.blob.models.BlockList; import com.azure.storage.blob.models.BlockListType; @@ -36,6 +37,7 @@ public class BlockBlobClientJavaDocCodeSnippets { private long length = 4L; private Duration timeout = Duration.ofSeconds(30); private String leaseId = "leaseId"; + private String tags = "tags"; private String base64BlockId = "base64BlockID"; private String sourceUrl = "https://example.com"; private long offset = 1024L; @@ -212,6 +214,24 @@ public void listBlocks2() { // END: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockListType-String-Duration-Context } + /** + * Code snippet for {@link BlockBlobClient#listBlocksWithResponse(BlockBlobListBlocksOptions, Duration, Context)} + */ + public void listBlocks3() { + // BEGIN: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockBlobListBlocksOptions-Duration-Context + Context context = new Context("key", "value"); + BlockList block = client.listBlocksWithResponse(new BlockBlobListBlocksOptions(BlockListType.ALL) + .setLeaseId(leaseId) + .setIfTagsMatch(tags), timeout, context).getValue(); + + System.out.println("Committed Blocks:"); + block.getCommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSizeLong())); + + System.out.println("Uncommitted Blocks:"); + block.getUncommittedBlocks().forEach(b -> System.out.printf("Name: %s, Size: %d", b.getName(), b.getSizeLong())); + // END: com.azure.storage.blob.specialized.BlockBlobClient.listBlocksWithResponse#BlockBlobListBlocksOptions-Duration-Context + } + /** * Code snippet for {@link BlockBlobClient#commitBlockList(List)} */ diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java index 24716fb15f99..4660a603934c 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseAsyncClientJavaDocCodeSnippets.java @@ -5,6 +5,12 @@ import com.azure.core.http.RequestConditions; import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; +import com.azure.storage.blob.options.BlobAcquireLeaseOptions; +import com.azure.storage.blob.options.BlobBreakLeaseOptions; +import com.azure.storage.blob.options.BlobChangeLeaseOptions; +import com.azure.storage.blob.options.BlobReleaseLeaseOptions; +import com.azure.storage.blob.options.BlobRenewLeaseOptions; import java.time.OffsetDateTime; @@ -73,6 +79,22 @@ public void acquireLeaseWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLeaseWithResponse#int-RequestConditions } + /** + * Code snippets for {@link BlobLeaseAsyncClient#acquireLeaseWithResponse(BlobAcquireLeaseOptions)} + */ + public void acquireLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLeaseWithResponse#BlobAcquireLeaseOptions + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobAcquireLeaseOptions options = new BlobAcquireLeaseOptions(60) + .setRequestConditions(requestConditions); + + client.acquireLeaseWithResponse(options).subscribe(response -> + System.out.printf("Lease ID is %s%n", response.getValue())); + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.acquireLeaseWithResponse#BlobAcquireLeaseOptions + } + /** * Code snippets for {@link BlobLeaseAsyncClient#renewLeaseWithResponse(RequestConditions)} */ @@ -86,6 +108,22 @@ public void renewLeaseWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLeaseWithResponse#RequestConditions } + /** + * Code snippets for {@link BlobLeaseAsyncClient#renewLeaseWithResponse(BlobRenewLeaseOptions)} + */ + public void renewLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLeaseWithResponse#BlobRenewLeaseOptions + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobRenewLeaseOptions options = new BlobRenewLeaseOptions() + .setRequestConditions(requestConditions); + + client.renewLeaseWithResponse(options).subscribe(response -> + System.out.printf("Lease ID is %s%n", response.getValue())); + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.renewLeaseWithResponse#BlobRenewLeaseOptions + } + /** * Code snippets for {@link BlobLeaseAsyncClient#releaseLeaseWithResponse(RequestConditions)} */ @@ -99,6 +137,22 @@ public void releaseLeaseWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLeaseWithResponse#RequestConditions } + /** + * Code snippets for {@link BlobLeaseAsyncClient#releaseLeaseWithResponse(RequestConditions)} + */ + public void releaseLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLeaseWithResponse#BlobReleaseLeaseOptions + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobReleaseLeaseOptions options = new BlobReleaseLeaseOptions() + .setRequestConditions(requestConditions); + + client.releaseLeaseWithResponse(options).subscribe(response -> + System.out.printf("Release lease completed with status %d%n", response.getStatusCode())); + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.releaseLeaseWithResponse#BlobReleaseLeaseOptions + } + /** * Code snippets for {@link BlobLeaseAsyncClient#breakLeaseWithResponse(Integer, RequestConditions)} */ @@ -113,6 +167,25 @@ public void breakLeaseWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLeaseWithResponse#Integer-RequestConditions } + + /** + * Code snippets for {@link BlobLeaseAsyncClient#breakLeaseWithResponse(BlobBreakLeaseOptions)} + */ + public void breakLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLeaseWithResponse#BlobBreakLeaseOptions + Integer retainLeaseInSeconds = 5; + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobBreakLeaseOptions options = new BlobBreakLeaseOptions() + .setBreakPeriodInSeconds(retainLeaseInSeconds) + .setRequestConditions(requestConditions); + + client.breakLeaseWithResponse(options).subscribe(response -> + System.out.printf("The broken lease has %d seconds remaining on the lease", response.getValue())); + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.breakLeaseWithResponse#BlobBreakLeaseOptions + } + /** * Code snippets for {@link BlobLeaseAsyncClient#changeLeaseWithResponse(String, RequestConditions)} */ @@ -125,4 +198,20 @@ public void changeLeaseWithResponseCodeSnippets() { System.out.printf("Changed lease ID is %s%n", response.getValue())); // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLeaseWithResponse#String-RequestConditions } + + /** + * Code snippets for {@link BlobLeaseAsyncClient#changeLeaseWithResponse(BlobChangeLeaseOptions)} + */ + public void changeLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLeaseWithResponse#BlobChangeLeaseOptions + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobChangeLeaseOptions options = new BlobChangeLeaseOptions("proposedId") + .setRequestConditions(requestConditions); + + client.changeLeaseWithResponse(options).subscribe(response -> + System.out.printf("Changed lease ID is %s%n", response.getValue())); + // END: com.azure.storage.blob.specialized.BlobLeaseAsyncClient.changeLeaseWithResponse#BlobChangeLeaseOptions + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java index 6b5a2c4c7706..96a1c79d1eeb 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/LeaseClientJavaDocCodeSnippets.java @@ -6,6 +6,12 @@ import com.azure.core.http.RequestConditions; import com.azure.core.util.Context; import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; +import com.azure.storage.blob.options.BlobAcquireLeaseOptions; +import com.azure.storage.blob.options.BlobBreakLeaseOptions; +import com.azure.storage.blob.options.BlobChangeLeaseOptions; +import com.azure.storage.blob.options.BlobReleaseLeaseOptions; +import com.azure.storage.blob.options.BlobRenewLeaseOptions; import java.time.Duration; import java.time.OffsetDateTime; @@ -78,6 +84,23 @@ public void acquireLeaseWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobLeaseClient.acquireLeaseWithResponse#int-RequestConditions-Duration-Context } + /** + * Code snippets for {@link BlobLeaseClient#acquireLeaseWithResponse(BlobAcquireLeaseOptions, Duration, Context)} + */ + public void acquireLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.acquireLeaseWithResponse#BlobAcquireLeaseOptions-Duration-Context + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobAcquireLeaseOptions options = new BlobAcquireLeaseOptions(60) + .setRequestConditions(requestConditions); + + System.out.printf("Lease ID is %s%n", client + .acquireLeaseWithResponse(options, timeout, new Context(key, value)) + .getValue()); + // END: com.azure.storage.blob.specialized.BlobLeaseClient.acquireLeaseWithResponse#BlobAcquireLeaseOptions-Duration-Context + } + /** * Code snippets for {@link BlobLeaseClient#renewLeaseWithResponse(RequestConditions, Duration, Context)} */ @@ -92,6 +115,23 @@ public void renewLeaseWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse#RequestConditions-Duration-Context } + /** + * Code snippets for {@link BlobLeaseClient#renewLeaseWithResponse(BlobRenewLeaseOptions, Duration, Context)} + */ + public void renewLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse#BlobRenewLeaseOptions-Duration-Context + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobRenewLeaseOptions options = new BlobRenewLeaseOptions() + .setRequestConditions(requestConditions); + + System.out.printf("Renewed lease ID is %s%n", + client.renewLeaseWithResponse(options, timeout, new Context(key, value)) + .getValue()); + // END: com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse#BlobRenewLeaseOptions-Duration-Context + } + /** * Code snippets for {@link BlobLeaseClient#releaseLeaseWithResponse(RequestConditions, Duration, Context)} */ @@ -106,6 +146,23 @@ public void releaseLeaseWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobLeaseClient.releaseLeaseWithResponse#RequestConditions-Duration-Context } + /** + * Code snippets for {@link BlobLeaseClient#releaseLeaseWithResponse(BlobReleaseLeaseOptions, Duration, Context)} + */ + public void releaseLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.releaseLeaseWithResponse#BlobReleaseLeaseOptions-Duration-Context + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfModifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobReleaseLeaseOptions options = new BlobReleaseLeaseOptions() + .setRequestConditions(requestConditions); + + System.out.printf("Release lease completed with status %d%n", + client.releaseLeaseWithResponse(options, timeout, new Context(key, value)) + .getStatusCode()); + // END: com.azure.storage.blob.specialized.BlobLeaseClient.releaseLeaseWithResponse#BlobReleaseLeaseOptions-Duration-Context + } + /** * Code snippets for {@link BlobLeaseClient#breakLeaseWithResponse(Integer, RequestConditions, Duration, Context)} */ @@ -121,6 +178,25 @@ public void breakLeaseWithResponseCodeSnippets() { // END: com.azure.storage.blob.specialized.BlobLeaseClient.breakLeaseWithResponse#Integer-RequestConditions-Duration-Context } + /** + * Code snippets for {@link BlobLeaseClient#breakLeaseWithResponse(BlobBreakLeaseOptions, Duration, Context)} + */ + public void breakLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.breakLeaseWithResponse#BlobBreakLeaseOptions-Duration-Context + Integer retainLeaseInSeconds = 5; + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobBreakLeaseOptions options = new BlobBreakLeaseOptions() + .setBreakPeriodInSeconds(retainLeaseInSeconds) + .setRequestConditions(requestConditions); + + System.out.printf("The broken lease has %d seconds remaining on the lease", client + .breakLeaseWithResponse(options, timeout, new Context(key, value)) + .getValue()); + // END: com.azure.storage.blob.specialized.BlobLeaseClient.breakLeaseWithResponse#BlobBreakLeaseOptions-Duration-Context + } + /** * Code snippets for {@link BlobLeaseClient#changeLeaseWithResponse(String, RequestConditions, Duration, Context)} */ @@ -134,4 +210,21 @@ public void changeLeaseWithResponseCodeSnippets() { .getValue()); // END: com.azure.storage.blob.specialized.BlobLeaseClient.changeLeaseWithResponse#String-RequestConditions-Duration-Context } + + /** + * Code snippets for {@link BlobLeaseClient#changeLeaseWithResponse(BlobChangeLeaseOptions, Duration, Context)} + */ + public void changeLeaseWithResponseCodeSnippets2() { + // BEGIN: com.azure.storage.blob.specialized.BlobLeaseClient.changeLeaseWithResponse#BlobChangeLeaseOptions-Duration-Context + BlobLeaseRequestConditions requestConditions = new BlobLeaseRequestConditions() + .setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3)); + + BlobChangeLeaseOptions options = new BlobChangeLeaseOptions("proposedId") + .setRequestConditions(requestConditions); + + System.out.printf("Changed lease ID is %s%n", + client.changeLeaseWithResponse(options, timeout, new Context(key, value)) + .getValue()); + // END: com.azure.storage.blob.specialized.BlobLeaseClient.changeLeaseWithResponse#BlobChangeLeaseOptions-Duration-Context + } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index d025245f2911..02d72ab50af0 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -28,6 +28,7 @@ import com.azure.storage.blob.models.BlobServiceProperties import com.azure.storage.blob.models.CopyStatusType import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.ListBlobContainersOptions +import com.azure.storage.blob.options.BlobBreakLeaseOptions import com.azure.storage.blob.specialized.BlobAsyncClientBase import com.azure.storage.blob.specialized.BlobClientBase import com.azure.storage.blob.specialized.BlobLeaseClient @@ -203,7 +204,7 @@ class APISpec extends Specification { def containerClient = primaryBlobServiceClient.getBlobContainerClient(container.getName()) if (container.getProperties().getLeaseState() == LeaseStateType.LEASED) { - createLeaseClient(containerClient).breakLeaseWithResponse(0, null, null, null) + createLeaseClient(containerClient).breakLeaseWithResponse(new BlobBreakLeaseOptions().setBreakPeriodInSeconds(0), null, null) } containerClient.delete() diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy index e0443ee9fb69..cd659b6ba550 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAPITest.groovy @@ -30,7 +30,10 @@ import com.azure.storage.blob.models.ParallelTransferOptions import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.models.RehydratePriority import com.azure.storage.blob.models.SyncCopyStatusType +import com.azure.storage.blob.options.BlobGetTagsOptions import com.azure.storage.blob.options.BlobParallelUploadOptions +import com.azure.storage.blob.options.BlobSetAccessTierOptions +import com.azure.storage.blob.options.BlobSetTagsOptions import com.azure.storage.blob.sas.BlobSasPermission import com.azure.storage.blob.sas.BlobServiceSasSignatureValues import com.azure.storage.blob.specialized.BlobClientBase @@ -85,8 +88,9 @@ class BlobAPITest extends APISpec { } /* Tests an issue found where buffered upload would not deep copy buffers while determining what upload path to take. */ + @Unroll - def "Upload input stream single upload" () { + def "Upload input stream single upload"() { setup: def randomData = getRandomByteArray(20 * Constants.KB) def input = new ByteArrayInputStream(randomData) @@ -100,15 +104,15 @@ class BlobAPITest extends APISpec { stream.toByteArray() == randomData where: - size || _ - 1 * Constants.KB || _ /* Less than copyToOutputStream buffer size, Less than maxSingleUploadSize */ - 8 * Constants.KB || _ /* Equal to copyToOutputStream buffer size, Less than maxSingleUploadSize */ - 20 * Constants.KB || _ /* Greater than copyToOutputStream buffer size, Less than maxSingleUploadSize */ + size || _ + 1 * Constants.KB || _ /* Less than copyToOutputStream buffer size, Less than maxSingleUploadSize */ + 8 * Constants.KB || _ /* Equal to copyToOutputStream buffer size, Less than maxSingleUploadSize */ + 20 * Constants.KB || _ /* Greater than copyToOutputStream buffer size, Less than maxSingleUploadSize */ } /* TODO (gapra): Add more tests to test large data sizes. */ - @Requires( { liveMode() } ) + @Requires({ liveMode() }) def "Upload input stream large data"() { setup: def randomData = getRandomByteArray(20 * Constants.MB) @@ -124,6 +128,22 @@ class BlobAPITest extends APISpec { notThrown(BlobStorageException) } + @Unroll + def "Upload incorrect size"() { + when: + bc.upload(defaultInputStream.get(), dataSize, true) + + then: + thrown(IllegalStateException) + + where: + dataSize | threshold + defaultDataSize + 1 | null + defaultDataSize - 1 | null + defaultDataSize + 1 | 1 // Test the chunked case as well + defaultDataSize - 1 | 1 + } + @Unroll def "Upload numBlocks"() { setup: @@ -156,7 +176,8 @@ class BlobAPITest extends APISpec { .getValue().getETag() != null } - @Requires({ liveMode() }) // Reading from recordings will not allow for the timing of the test to work correctly. + @Requires({ liveMode() }) + // Reading from recordings will not allow for the timing of the test to work correctly. def "Upload timeout"() { setup: def size = 1024 @@ -286,6 +307,9 @@ class BlobAPITest extends APISpec { @Unroll def "Download AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) def bac = new BlobRequestConditions() @@ -294,6 +318,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: def response = bc.downloadWithResponse(new ByteArrayOutputStream(), null, null, bac, false, null, null) @@ -302,13 +327,14 @@ class BlobAPITest extends APISpec { response.getStatusCode() == 200 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -321,6 +347,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.downloadWithResponse(new ByteArrayOutputStream(), null, null, bac, false, null, null).getStatusCode() @@ -329,12 +356,13 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Download md5"() { @@ -914,6 +942,8 @@ class BlobAPITest extends APISpec { properties.getArchiveStatus() == null properties.getCreationTime() != null properties.getTagCount() == 1 + properties.getRehydratePriority() == null // tested in setTier rehydrate priority + !properties.isSealed() // tested in AppendBlob. "seal blob" } def "Get properties min"() { @@ -924,24 +954,29 @@ class BlobAPITest extends APISpec { @Unroll def "Get properties AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) def bac = new BlobRequestConditions() .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) .setIfMatch(setupBlobMatchCondition(bc, match)) .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) expect: bc.getPropertiesWithResponse(bac, null, null).getStatusCode() == 200 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -953,6 +988,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.getPropertiesWithResponse(bac, null, null) @@ -961,19 +997,21 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } /* This test requires two accounts that are configured in a very specific way. It is not feasible to setup that relationship programmatically, so we have recorded a successful interaction and only test recordings. */ - @Requires( {playbackMode()}) + + @Requires({ playbackMode() }) def "Get properties ORS"() { setup: def sourceBlob = primaryBlobServiceClient.getBlobContainerClient("test1") @@ -1079,6 +1117,9 @@ class BlobAPITest extends APISpec { @Unroll def "Set HTTP headers AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) def bac = new BlobRequestConditions() @@ -1087,18 +1128,20 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) expect: bc.setHttpHeadersWithResponse(null, bac, null, null).getStatusCode() == 200 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -1112,6 +1155,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.setHttpHeadersWithResponse(null, bac, null, null) @@ -1120,12 +1164,13 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Set HTTP headers error"() { @@ -1187,6 +1232,9 @@ class BlobAPITest extends APISpec { @Unroll def "Set metadata AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) def bac = new BlobRequestConditions() @@ -1200,13 +1248,14 @@ class BlobAPITest extends APISpec { bc.setMetadataWithResponse(null, bac, null, null).getStatusCode() == 200 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -1221,6 +1270,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.setMetadataWithResponse(null, bac, null, null) @@ -1229,12 +1279,13 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Set metadata error"() { @@ -1250,7 +1301,7 @@ class BlobAPITest extends APISpec { def "Set tags all null"() { when: - def response = bc.setTagsWithResponse(null, null, null) + def response = bc.setTagsWithResponse(new BlobSetTagsOptions(new HashMap()), null, null) then: bc.getTags().size() == 0 @@ -1281,7 +1332,7 @@ class BlobAPITest extends APISpec { } expect: - bc.setTagsWithResponse(tags, null, null).getStatusCode() == statusCode + bc.setTagsWithResponse(new BlobSetTagsOptions(tags), null, null).getStatusCode() == statusCode bc.getTags() == tags where: @@ -1291,12 +1342,80 @@ class BlobAPITest extends APISpec { " +-./:=_ +-./:=_" | " +-./:=_" | null | null || 204 } + @Unroll + def "Set tags AC"() { + setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) + t = new HashMap() + t.put("fizz", "buzz") + + expect: + bc.setTagsWithResponse(new BlobSetTagsOptions(t).setRequestConditions(new BlobRequestConditions().setTagsConditions(tags)), null, null).getStatusCode() == 204 + + where: + tags || _ + null || _ + "\"foo\" = 'bar'" || _ + } + + @Unroll + def "Set tags AC fail"() { + setup: + def t = new HashMap() + t.put("fizz", "buzz") + + when: + bc.setTagsWithResponse(new BlobSetTagsOptions(t).setRequestConditions(new BlobRequestConditions().setTagsConditions(tags)), null, null) + + then: + thrown(BlobStorageException) + + where: + tags || _ + "\"foo\" = 'bar'" || _ + } + + @Unroll + def "Get tags AC"() { + setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) + + expect: + bc.getTagsWithResponse(new BlobGetTagsOptions().setRequestConditions(new BlobRequestConditions().setTagsConditions(tags)), null, null).getStatusCode() == 200 + + where: + tags || _ + null || _ + "\"foo\" = 'bar'" || _ + } + + @Unroll + def "Get tags AC fail"() { + setup: + def t = new HashMap() + t.put("fizz", "buzz") + + when: + bc.getTagsWithResponse(new BlobGetTagsOptions().setRequestConditions(new BlobRequestConditions().setTagsConditions(tags)), null, null) + + then: + thrown(BlobStorageException) + + where: + tags || _ + "\"foo\" = 'bar'" || _ + } + def "Set tags error"() { setup: bc = cc.getBlobClient(generateBlobName()) when: - bc.setTags(null) + bc.setTags(new HashMap()) then: thrown(BlobStorageException) @@ -1315,6 +1434,38 @@ class BlobAPITest extends APISpec { bc.createSnapshotWithResponse(null, null, null, null).getStatusCode() == 201 } + def "getSnapshot"() { + setup: + def data = "test".getBytes() + def blobName = generateBlobName() + def bu = cc.getBlobClient(blobName).getBlockBlobClient() + bu.upload(new ByteArrayInputStream(data), data.length) + def snapshotId = bu.createSnapshot().getSnapshotId() + + when: + def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() + + then: + snapshotBlob.getSnapshotId() == snapshotId + bu.getSnapshotId() == null + } + + def "isSnapshot"() { + setup: + def data = "test".getBytes() + def blobName = generateBlobName() + def bu = cc.getBlobClient(blobName).getBlockBlobClient() + bu.upload(new ByteArrayInputStream(data), data.length) + def snapshotId = bu.createSnapshot().getSnapshotId() + + when: + def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() + + then: + snapshotBlob.isSnapshot() + !bu.isSnapshot() + } + @Unroll def "Snapshot metadata"() { setup: @@ -1342,6 +1493,9 @@ class BlobAPITest extends APISpec { @Unroll def "Snapshot AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) def bac = new BlobRequestConditions() @@ -1350,18 +1504,20 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) expect: bc.createSnapshotWithResponse(null, bac, null, null).getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -1375,7 +1531,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) - + .setTagsConditions(tags) when: bc.createSnapshotWithResponse(null, bac, null, null) @@ -1384,12 +1540,13 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Snapshot error"() { @@ -1529,6 +1686,35 @@ class BlobAPITest extends APISpec { " +-./:=_ +-./:=_" | " +-./:=_" | null | null } + @Unroll + def "Copy seal"() { + setup: + def appendBlobClient = cc.getBlobClient(generateBlobName()).getAppendBlobClient() + appendBlobClient.create() + if (source) { + appendBlobClient.seal() + } + + def bu2 = ccAsync.getBlobAsyncClient(generateBlobName()).getAppendBlobAsyncClient() + + when: + def poller = bu2.beginCopy(new BlobBeginCopyOptions(appendBlobClient.getBlobUrl()).sealDestination(destination) + .setPollInterval(Duration.ofSeconds(1))) + poller.blockLast() + + then: + StepVerifier.create(bu2.getProperties()) + .assertNext({ assert Boolean.TRUE.equals(it.isSealed()) == destination }) + .verifyComplete() + + where: + source | destination + true | true + true | false + false | true + false | false + } + @Unroll def "Copy source AC"() { setup: @@ -1586,6 +1772,9 @@ class BlobAPITest extends APISpec { setup: def bu2 = ccAsync.getBlobAsyncClient(generateBlobName()).getBlockBlobAsyncClient() bu2.upload(defaultFlux, defaultDataSize).block() + def t = new HashMap() + t.put("foo", "bar") + bu2.setTags(t).block() match = setupBlobMatchCondition(bu2, match) leaseID = setupBlobLeaseCondition(bu2, leaseID) def bac = new BlobRequestConditions() @@ -1594,6 +1783,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: def poller = bu2.beginCopy(bc.getBlobUrl(), null, null, null, null, bac, Duration.ofSeconds(1)) @@ -1603,13 +1793,14 @@ class BlobAPITest extends APISpec { response.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -1625,6 +1816,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) @@ -1633,12 +1825,13 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Abort copy lease fail"() { @@ -1896,6 +2089,9 @@ class BlobAPITest extends APISpec { cc.setAccessPolicy(PublicAccessType.CONTAINER, null) def bu2 = cc.getBlobClient(generateBlobName()).getBlockBlobClient() bu2.upload(defaultInputStream.get(), defaultDataSize) + def t = new HashMap() + t.put("foo", "bar") + bu2.setTags(t) match = setupBlobMatchCondition(bu2, match) leaseID = setupBlobLeaseCondition(bu2, leaseID) def bac = new BlobRequestConditions() @@ -1904,18 +2100,20 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) expect: bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null).getStatusCode() == 202 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -1932,6 +2130,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bu2.copyFromUrlWithResponse(bc.getBlobUrl(), null, null, null, bac, null, null) @@ -1940,12 +2139,13 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Sync copy error"() { @@ -1999,6 +2199,9 @@ class BlobAPITest extends APISpec { @Unroll def "Delete AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) def bac = new BlobRequestConditions() @@ -2007,18 +2210,20 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) expect: bc.deleteWithResponse(DeleteSnapshotsOptionType.INCLUDE, bac, null, null).getStatusCode() == 202 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -2032,6 +2237,7 @@ class BlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.deleteWithResponse(DeleteSnapshotsOptionType.INCLUDE, bac, null, null) @@ -2040,12 +2246,13 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Blob delete error"() { @@ -2170,10 +2377,33 @@ class BlobAPITest extends APISpec { cc.listBlobs().iterator().next().getProperties().getArchiveStatus() == status where: - sourceTier | destTier | priority | status - AccessTier.ARCHIVE | AccessTier.COOL | RehydratePriority.STANDARD | ArchiveStatus.REHYDRATE_PENDING_TO_COOL - AccessTier.ARCHIVE | AccessTier.HOT | RehydratePriority.STANDARD | ArchiveStatus.REHYDRATE_PENDING_TO_HOT - AccessTier.ARCHIVE | AccessTier.HOT | RehydratePriority.HIGH | ArchiveStatus.REHYDRATE_PENDING_TO_HOT + sourceTier | destTier || status + AccessTier.ARCHIVE | AccessTier.COOL || ArchiveStatus.REHYDRATE_PENDING_TO_COOL + AccessTier.ARCHIVE | AccessTier.HOT || ArchiveStatus.REHYDRATE_PENDING_TO_HOT + AccessTier.ARCHIVE | AccessTier.HOT || ArchiveStatus.REHYDRATE_PENDING_TO_HOT + } + + @Unroll + def "Set tier rehydrate priority"() { + setup: + if (rehydratePriority != null) { + bc.setAccessTier(AccessTier.ARCHIVE) + + bc.setAccessTierWithResponse(new BlobSetAccessTierOptions(AccessTier.HOT).setPriority(rehydratePriority), null, null) + } + + when: + def resp = bc.getPropertiesWithResponse(null, null, null) + + then: + resp.getStatusCode() == 200 + resp.getValue().getRehydratePriority() == rehydratePriority + + where: + rehydratePriority || _ + null || _ + RehydratePriority.STANDARD || _ + RehydratePriority.HIGH || _ } def "Set tier error"() { @@ -2232,6 +2462,38 @@ class BlobAPITest extends APISpec { thrown(BlobStorageException) } + def "Set tier tags"() { + setup: + def cc = blobServiceClient.createBlobContainer(generateContainerName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + bc.upload(defaultInputStream.get(), defaultDataSize) + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) + + when: + bc.setAccessTierWithResponse(new BlobSetAccessTierOptions(AccessTier.HOT).setIfTagsMatch("\"foo\" = 'bar'"), null, null) + + then: + notThrown(BlobStorageException) + + cleanup: + cc.delete() + } + + def "Set tier tags fail"() { + setup: + def cc = blobServiceClient.createBlobContainer(generateContainerName()) + def bc = cc.getBlobClient(generateBlobName()).getBlockBlobClient() + bc.upload(defaultInputStream.get(), defaultDataSize) + + when: + bc.setAccessTierWithResponse(new BlobSetAccessTierOptions(AccessTier.HOT).setIfTagsMatch("\"foo\" = 'bar'"), null, null) + + then: + thrown(BlobStorageException) + } + @Unroll def "Copy with tier"() { setup: @@ -2266,7 +2528,6 @@ class BlobAPITest extends APISpec { when: def undeleteHeaders = bc.undeleteWithResponse(null, null).getHeaders() - bc.getProperties() then: diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobServiceSasModelsTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobServiceSasModelsTest.groovy new file mode 100644 index 000000000000..a8d48329b1d5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobServiceSasModelsTest.groovy @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob + +import com.azure.storage.blob.implementation.util.BlobSasImplUtil +import com.azure.storage.blob.models.UserDelegationKey +import com.azure.storage.blob.sas.BlobContainerSasPermission +import com.azure.storage.blob.sas.BlobSasPermission +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues +import spock.lang.Specification +import spock.lang.Unroll + +import java.time.OffsetDateTime +import java.time.ZoneOffset + +class BlobServiceSasModelsTest extends Specification { + + def setup() { + String fullTestName = specificationContext.getCurrentIteration().getName().replace(' ', '').toLowerCase() + String className = specificationContext.getCurrentSpec().getName() + // Print out the test name to create breadcrumbs in our test logging in case anything hangs. + System.out.printf("========================= %s.%s =========================%n", className, fullTestName) + } + + @Unroll + def "BlobSASPermissions toString"() { + setup: + def perms = new BlobSasPermission() + .setReadPermission(read) + .setWritePermission(write) + .setDeletePermission(delete) + .setCreatePermission(create) + .setAddPermission(add) + .setDeleteVersionPermission(deleteVersion) + .setTagsPermission(tags) + + expect: + perms.toString() == expectedString + + where: + read | write | delete | create | add | deleteVersion | tags || expectedString + true | false | false | false | false | false | false || "r" + false | true | false | false | false | false | false || "w" + false | false | true | false | false | false | false || "d" + false | false | false | true | false | false | false || "c" + false | false | false | false | true | false | false || "a" + false | false | false | false | false | true | false || "x" + false | false | false | false | false | false | true || "t" + true | true | true | true | true | true | true || "racwdxt" + } + + @Unroll + def "BlobSASPermissions parse"() { + when: + def perms = BlobSasPermission.parse(permString) + + then: + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasCreatePermission() == create + perms.hasAddPermission() == add + perms.hasDeleteVersionPermission() == deleteVersion + perms.hasTagsPermission() == tags + + where: + permString || read | write | delete | create | add | deleteVersion | tags + "r" || true | false | false | false | false | false | false + "w" || false | true | false | false | false | false | false + "d" || false | false | true | false | false | false | false + "c" || false | false | false | true | false | false | false + "a" || false | false | false | false | true | false | false + "x" || false | false | false | false | false | true | false + "t" || false | false | false | false | false | false | true + "racwdxt" || true | true | true | true | true | true | true + "dtcxwra" || true | true | true | true | true | true | true + } + + def "BlobSASPermissions parse IA"() { + when: + BlobSasPermission.parse("rwaq") + + then: + thrown(IllegalArgumentException) + } + + def "BlobSasPermission null"() { + when: + BlobSasPermission.parse(null) + + then: + thrown(NullPointerException) + } + + @Unroll + def "ContainerSASPermissions toString"() { + setup: + def perms = new BlobContainerSasPermission() + .setReadPermission(read) + .setWritePermission(write) + .setDeletePermission(delete) + .setCreatePermission(create) + .setAddPermission(add) + .setListPermission(list) + .setDeleteVersionPermission(deleteVersion) + .setTagsPermission(tags) + + expect: + perms.toString() == expectedString + + where: + read | write | delete | create | add | list | deleteVersion | tags || expectedString + true | false | false | false | false | false | false | false || "r" + false | true | false | false | false | false | false | false || "w" + false | false | true | false | false | false | false | false || "d" + false | false | false | true | false | false | false | false || "c" + false | false | false | false | true | false | false | false || "a" + false | false | false | false | false | true | false | false || "l" + false | false | false | false | false | false | true | false || "x" + false | false | false | false | false | false | false | true || "t" + true | true | true | true | true | true | true | true || "racwdxlt" + } + + @Unroll + def "ContainerSASPermissions parse"() { + when: + def perms = BlobContainerSasPermission.parse(permString) + + then: + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasCreatePermission() == create + perms.hasAddPermission() == add + perms.hasListPermission() == list + perms.hasDeleteVersionPermission() == deleteVersion + perms.hasTagsPermission() == tags + + where: + permString || read | write | delete | create | add | list | deleteVersion | tags + "r" || true | false | false | false | false | false | false | false + "w" || false | true | false | false | false | false | false | false + "d" || false | false | true | false | false | false | false | false + "c" || false | false | false | true | false | false | false | false + "a" || false | false | false | false | true | false | false | false + "l" || false | false | false | false | false | true | false | false + "x" || false | false | false | false | false | false | true | false + "t" || false | false | false | false | false | false | false | true + "racwdxlt" || true | true | true | true | true | true | true | true + "dctwxrla" || true | true | true | true | true | true | true | true + } + + def "ContainerSASPermissions parse IA"() { + when: + BlobContainerSasPermission.parse("rwaq") + + then: + thrown(IllegalArgumentException) + } + + def "ContainerSASPermissions null"() { + when: + BlobContainerSasPermission.parse(null) + + then: + thrown(NullPointerException) + } + + def "blob sas impl util null"() { + setup: + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = new BlobSasPermission().setReadPermission(true) + def v = new BlobServiceSasSignatureValues(e, p) + def implUtil = new BlobSasImplUtil(v, "containerName", "blobName", null, null) + + when: + implUtil.generateSas(null) + + then: + def ex = thrown(NullPointerException) + ex.getMessage().contains("storageSharedKeyCredential") + + when: + implUtil.generateUserDelegationSas(null, "accountName") + + then: + ex = thrown(NullPointerException) + ex.getMessage().contains("delegationKey") + + when: + implUtil.generateUserDelegationSas(new UserDelegationKey(), null) + + then: + ex = thrown(NullPointerException) + ex.getMessage().contains("accountName") + } + + def "ensure state version"() { + when: + BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues("id"), "container") + implUtil.version = null + implUtil.ensureState() + + then: + implUtil.version // Version is set + implUtil.resource == "c" // Default resource is container + !implUtil.permissions // Identifier was used so permissions is null + } + + def "ensure state illegal argument"() { + when: + BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues(), null) + + implUtil.ensureState() + + then: + thrown(IllegalStateException) + } + + @Unroll + def "ensure state resource and permission"() { + setup: + def expiryTime = OffsetDateTime.now().plusDays(1) + + expect: + BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues(expiryTime, permission), container, blob, snapshot, versionId) + implUtil.ensureState() + implUtil.resource == resource + implUtil.permissions == permissionString + + where: + container | blob | snapshot | versionId | permission || resource | permissionString + "container" | null | null | null | new BlobContainerSasPermission().setReadPermission(true).setListPermission(true) || "c" | "rl" + "container" | "blob" | null | null | new BlobSasPermission().setReadPermission(true) || "b" | "r" + "container" | "blob" | "snapshot" | null | new BlobSasPermission().setReadPermission(true) || "bs" | "r" + "container" | "blob" | null | "version" | new BlobSasPermission().setReadPermission(true) || "bv" | "r" + } + + @Unroll + def "ensure state permission illegal argument"() { + setup: + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = new BlobContainerSasPermission().setReadPermission(true).setListPermission(true) + + when: + def v = new BlobServiceSasSignatureValues(e, p) + BlobSasImplUtil implUtil = new BlobSasImplUtil(v, "containerName", "blobName", snapId, null) + + implUtil.ensureState() + + then: + thrown(IllegalArgumentException) + + where: + snapId || _ + null || _ + "id" || _ + } +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy index 3bd7fd98bb06..b62b9d393f73 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAPITest.groovy @@ -20,12 +20,17 @@ import com.azure.storage.blob.models.CustomerProvidedKey import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.LeaseStatusType import com.azure.storage.blob.models.ListBlobsOptions +import com.azure.storage.blob.models.ObjectReplicationPolicy +import com.azure.storage.blob.models.ObjectReplicationStatus +import com.azure.storage.blob.models.RehydratePriority +import com.azure.storage.blob.options.BlobSetAccessTierOptions import com.azure.storage.blob.options.PageBlobCreateOptions import com.azure.storage.blob.models.PublicAccessType import com.azure.storage.blob.specialized.AppendBlobClient import com.azure.storage.blob.specialized.BlobClientBase import com.azure.storage.common.Utility import reactor.test.StepVerifier +import spock.lang.Requires import spock.lang.Unroll import java.time.Duration @@ -569,15 +574,7 @@ class ContainerAPITest extends APISpec { when: def blobs = cc.listBlobs(new ListBlobsOptions().setPrefix(blobPrefix), null).iterator() - //ContainerListBlobFlatSegmentHeaders headers = response.headers() - //List blobs = responseiterator()() - then: -// response.getStatusCode() == 200 -// headers.contentType() != null -// headers.requestId() != null -// headers.getVersion() != null -// headers.date() != null def blob = blobs.next() !blobs.hasNext() blob.getName() == name @@ -608,6 +605,48 @@ class ContainerAPITest extends APISpec { blob.getProperties().getCreationTime() != null } + def "List append blobs flat"() { + setup: + def name = generateBlobName() + def bu = cc.getBlobClient(name).getAppendBlobClient() + bu.create() + bu.seal() + + when: + def blobs = cc.listBlobs(new ListBlobsOptions().setPrefix(blobPrefix), null).iterator() + + then: + def blob = blobs.next() + !blobs.hasNext() + blob.getName() == name + blob.getProperties().getBlobType() == BlobType.APPEND_BLOB + blob.getProperties().getCopyCompletionTime() == null + blob.getProperties().getCopyStatusDescription() == null + blob.getProperties().getCopyId() == null + blob.getProperties().getCopyProgress() == null + blob.getProperties().getCopySource() == null + blob.getProperties().getCopyStatus() == null + blob.getProperties().isIncrementalCopy() == null + blob.getProperties().getDestinationSnapshot() == null + blob.getProperties().getLeaseDuration() == null + blob.getProperties().getLeaseState() == LeaseStateType.AVAILABLE + blob.getProperties().getLeaseStatus() == LeaseStatusType.UNLOCKED + blob.getProperties().getContentLength() != null + blob.getProperties().getContentType() != null + blob.getProperties().getContentMd5() == null + blob.getProperties().getContentEncoding() == null + blob.getProperties().getContentDisposition() == null + blob.getProperties().getContentLanguage() == null + blob.getProperties().getCacheControl() == null + blob.getProperties().getBlobSequenceNumber() == null + blob.getProperties().isServerEncrypted() + blob.getProperties().isAccessTierInferred() == null + blob.getProperties().getAccessTier() == null + blob.getProperties().getArchiveStatus() == null + blob.getProperties().getCreationTime() != null + blob.getProperties().isSealed() + } + def "List page blobs flat"() { setup: ccPremium = premiumBlobServiceClient.getBlobContainerClient(containerName) @@ -934,6 +973,32 @@ class ContainerAPITest extends APISpec { pagedResponse2.getContinuationToken() == null } + @Unroll + def "List blobs flat rehydrate priority"() { + setup: + def name = generateBlobName() + def bc = cc.getBlobClient(name).getBlockBlobClient() + bc.upload(defaultInputStream.get(), 7) + + if (rehydratePriority != null) { + bc.setAccessTier(AccessTier.ARCHIVE) + + bc.setAccessTierWithResponse(new BlobSetAccessTierOptions(AccessTier.HOT).setPriority(rehydratePriority), null, null) + } + + when: + def item = cc.listBlobs().iterator().next() + + then: + item.getProperties().getRehydratePriority() == rehydratePriority + + where: + rehydratePriority || _ + null || _ + RehydratePriority.STANDARD || _ + RehydratePriority.HIGH || _ + } + def "List blobs flat error"() { setup: cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) @@ -983,6 +1048,50 @@ class ContainerAPITest extends APISpec { notThrown(Exception) } + /* + This test requires two accounts that are configured in a very specific way. It is not feasible to setup that + relationship programmatically, so we have recorded a successful interaction and only test recordings. + */ + @Requires( {playbackMode()}) + def "List blobs flat ORS"() { + setup: + def sourceContainer = primaryBlobServiceClient.getBlobContainerClient("test1") + def destContainer = alternateBlobServiceClient.getBlobContainerClient("test2") + + when: + def sourceBlobs = sourceContainer.listBlobs().stream().collect(Collectors.toList()) + def destBlobs = destContainer.listBlobs().stream().collect(Collectors.toList()) + + then: + int i = 0 + for (def blob : sourceBlobs) { + if (i == 1) { + assert blob.getObjectReplicationSourcePolicies() == null + } else { + assert validateOR(blob.getObjectReplicationSourcePolicies(), "fd2da1b9-56f5-45ff-9eb6-310e6dfc2c80", "105f9aad-f39b-4064-8e47-ccd7937295ca") + } + i++ + } + + /* Service specifies no ors metadata on the dest blobs. */ + for (def blob : destBlobs) { + assert blob.getObjectReplicationSourcePolicies() == null + } + } + + def validateOR(List policies, String policyId, String ruleId) { + return policies.stream() + .filter({ policy -> policyId.equals(policy.getPolicyId()) }) + .findFirst() + .get() + .getRules() + .stream() + .filter({ rule -> ruleId.equals(rule.getRuleId()) }) + .findFirst() + .get() + .getStatus() == ObjectReplicationStatus.COMPLETE + } + def "List blobs hierarchy"() { setup: def name = generateBlobName() @@ -1226,6 +1335,37 @@ class ContainerAPITest extends APISpec { secondPage.getContinuationToken() == null } + /* + This test requires two accounts that are configured in a very specific way. It is not feasible to setup that + relationship programmatically, so we have recorded a successful interaction and only test recordings. + */ + @Requires( {playbackMode()}) + def "List blobs hier ORS"() { + setup: + def sourceContainer = primaryBlobServiceClient.getBlobContainerClient("test1") + def destContainer = alternateBlobServiceClient.getBlobContainerClient("test2") + + when: + def sourceBlobs = sourceContainer.listBlobsByHierarchy("/").stream().collect(Collectors.toList()) + def destBlobs = destContainer.listBlobsByHierarchy("/").stream().collect(Collectors.toList()) + + then: + int i = 0 + for (def blob : sourceBlobs) { + if (i == 1) { + assert blob.getObjectReplicationSourcePolicies() == null + } else { + assert validateOR(blob.getObjectReplicationSourcePolicies(), "fd2da1b9-56f5-45ff-9eb6-310e6dfc2c80", "105f9aad-f39b-4064-8e47-ccd7937295ca") + } + i++ + } + + /* Service specifies no ors metadata on the dest blobs. */ + for (def blob : destBlobs) { + assert blob.getObjectReplicationSourcePolicies() == null + } + } + def "List blobs flat simple"() { setup: "Create 10 page blobs in the container" def NUM_BLOBS = 10 @@ -1239,6 +1379,74 @@ class ContainerAPITest extends APISpec { cc.listBlobs(new ListBlobsOptions().setMaxResultsPerPage(PAGE_SIZE), null).stream().count() == NUM_BLOBS } + @Unroll + def "List blobs hier rehydrate priority"() { + setup: + def name = generateBlobName() + def bc = cc.getBlobClient(name).getBlockBlobClient() + bc.upload(defaultInputStream.get(), 7) + + if (rehydratePriority != null) { + bc.setAccessTier(AccessTier.ARCHIVE) + + bc.setAccessTierWithResponse(new BlobSetAccessTierOptions(AccessTier.HOT).setPriority(rehydratePriority), null, null) + } + + when: + def item = cc.listBlobsByHierarchy(null).iterator().next() + + then: + item.getProperties().getRehydratePriority() == rehydratePriority + + where: + rehydratePriority || _ + null || _ + RehydratePriority.STANDARD || _ + RehydratePriority.HIGH || _ + } + + def "List append blobs hier"() { + setup: + def name = generateBlobName() + def bu = cc.getBlobClient(name).getAppendBlobClient() + bu.create() + bu.seal() + + when: + def blobs = cc.listBlobsByHierarchy(null, new ListBlobsOptions().setPrefix(blobPrefix), null).iterator() + + then: + def blob = blobs.next() + !blobs.hasNext() + blob.getName() == name + blob.getProperties().getBlobType() == BlobType.APPEND_BLOB + blob.getProperties().getCopyCompletionTime() == null + blob.getProperties().getCopyStatusDescription() == null + blob.getProperties().getCopyId() == null + blob.getProperties().getCopyProgress() == null + blob.getProperties().getCopySource() == null + blob.getProperties().getCopyStatus() == null + blob.getProperties().isIncrementalCopy() == null + blob.getProperties().getDestinationSnapshot() == null + blob.getProperties().getLeaseDuration() == null + blob.getProperties().getLeaseState() == LeaseStateType.AVAILABLE + blob.getProperties().getLeaseStatus() == LeaseStatusType.UNLOCKED + blob.getProperties().getContentLength() != null + blob.getProperties().getContentType() != null + blob.getProperties().getContentMd5() == null + blob.getProperties().getContentEncoding() == null + blob.getProperties().getContentDisposition() == null + blob.getProperties().getContentLanguage() == null + blob.getProperties().getCacheControl() == null + blob.getProperties().getBlobSequenceNumber() == null + blob.getProperties().isServerEncrypted() + blob.getProperties().isAccessTierInferred() == null + blob.getProperties().getAccessTier() == null + blob.getProperties().getArchiveStatus() == null + blob.getProperties().getCreationTime() != null + blob.getProperties().isSealed() + } + def "List blobs hier error"() { setup: cc = primaryBlobServiceClient.getBlobContainerClient(generateContainerName()) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy deleted file mode 100644 index c31b07e12770..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ /dev/null @@ -1,1263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob - -import com.azure.storage.blob.models.BlobAccessPolicy -import com.azure.storage.blob.models.BlobRange -import com.azure.storage.blob.models.BlobSignedIdentifier -import com.azure.storage.blob.models.BlobStorageException -import com.azure.storage.blob.models.UserDelegationKey -import com.azure.storage.blob.sas.BlobContainerSasPermission -import com.azure.storage.blob.sas.BlobSasPermission -import com.azure.storage.blob.sas.BlobServiceSasSignatureValues -import com.azure.storage.blob.sas.BlobSasServiceVersion -import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder -import com.azure.storage.common.Utility -import com.azure.storage.common.implementation.StorageImplUtils -import com.azure.storage.common.sas.AccountSasPermission -import com.azure.storage.common.sas.AccountSasResourceType -import com.azure.storage.common.sas.AccountSasService -import com.azure.storage.common.sas.AccountSasSignatureValues -import com.azure.storage.common.sas.SasProtocol -import com.azure.storage.common.StorageSharedKeyCredential - -import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.sas.SasIpRange -import spock.lang.Ignore -import spock.lang.Unroll - -import java.time.LocalDateTime -import java.time.OffsetDateTime -import java.time.ZoneOffset - -class SASTest extends APISpec { - - // TODO (gapra) : Cleanup SAS Tests - - @Unroll - def "Blob range"() { - expect: - if (count == null) { - assert new BlobRange(offset).toHeaderValue() == result - } else { - assert new BlobRange(offset, count).toHeaderValue() == result - } - - - where: - offset | count || result - 0 | null || null - 0 | 5 || "bytes=0-4" - 5 | 10 || "bytes=5-14" - } - - @Unroll - def "Blob range IA"() { - when: - new BlobRange(offset, count) - - then: - thrown(IllegalArgumentException) - - where: - offset | count - -1 | 5 - 0 | -1 - } - - def "BlobClient getSnapshot"() { - setup: - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = cc.getBlobClient(blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - def snapshotId = bu.createSnapshot().getSnapshotId() - - when: - def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() - - then: - snapshotBlob.getSnapshotId() == snapshotId - bu.getSnapshotId() == null - } - - def "BlobClient isSnapshot"() { - setup: - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = cc.getBlobClient(blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - def snapshotId = bu.createSnapshot().getSnapshotId() - - when: - def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() - - then: - snapshotBlob.isSnapshot() - !bu.isSnapshot() - - } - - def "serviceSASSignatureValues network test blob"() { - setup: - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = getBlobClient(primaryCredential, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - - def permissions = new BlobSasPermission() - .setReadPermission(true) - .setWritePermission(true) - .setCreatePermission(true) - .setDeletePermission(true) - .setAddPermission(true) - def startTime = getUTCNow().minusDays(1) - def expiryTime = getUTCNow().plusDays(1) - def ipRange = new SasIpRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255") - def sasProtocol = SasProtocol.HTTPS_HTTP - def cacheControl = "cache" - def contentDisposition = "disposition" - def contentEncoding = "encoding" - def contentLanguage = "language" - def contentType = "type" - - when: - def sas = new BlobServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setStartTime(startTime) - .setProtocol(sasProtocol) - .setSasIpRange(ipRange) - .setCacheControl(cacheControl) - .setContentDisposition(contentDisposition) - .setContentEncoding(contentEncoding) - .setContentLanguage(contentLanguage) - .setContentType(contentType) - .setBlobName(bu.getBlobName()) - .setContainerName(bu.getContainerName()) - .setSnapshotId(bu.getSnapshotId()) - .generateSasQueryParameters(primaryCredential) - .encode() - - def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - - def os = new ByteArrayOutputStream() - client.download(os) - def properties = client.getProperties() - - then: - os.toString() == new String(data) - properties.getCacheControl() == "cache" - properties.getContentDisposition() == "disposition" - properties.getContentEncoding() == "encoding" - properties.getContentLanguage() == "language" - notThrown(BlobStorageException) - } - - def "serviceSASSignatureValues network test blob snapshot"() { - setup: - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = getBlobClient(primaryCredential, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - def snapshotId = bu.createSnapshot().getSnapshotId() - - def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() - - def permissions = new BlobSasPermission() - .setReadPermission(true) - .setWritePermission(true) - .setCreatePermission(true) - .setDeletePermission(true) - .setAddPermission(true) - def startTime = getUTCNow().minusDays(1) - def expiryTime = getUTCNow().plusDays(1) - def ipRange = new SasIpRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255") - def sasProtocol = SasProtocol.HTTPS_HTTP - def cacheControl = "cache" - def contentDisposition = "disposition" - def contentEncoding = "encoding" - def contentLanguage = "language" - def contentType = "type" - - when: - def sas = new BlobServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setStartTime(startTime) - .setProtocol(sasProtocol) - .setSasIpRange(ipRange) - .setCacheControl(cacheControl) - .setContentDisposition(contentDisposition) - .setContentEncoding(contentEncoding) - .setContentLanguage(contentLanguage) - .setContentType(contentType) - .setBlobName(snapshotBlob.getBlobName()) - .setContainerName(snapshotBlob.getContainerName()) - .setSnapshotId(snapshotBlob.getSnapshotId()) - .generateSasQueryParameters(primaryCredential) - .encode() - - def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName, snapshotId).getBlockBlobClient() - - def os = new ByteArrayOutputStream() - client.download(os) - def properties = client.getProperties() - - then: - os.toString() == new String(data) - properties.getCacheControl() == "cache" - properties.getContentDisposition() == "disposition" - properties.getContentEncoding() == "encoding" - properties.getContentLanguage() == "language" - } - - def "serviceSASSignatureValues network test container"() { - setup: - def identifier = new BlobSignedIdentifier() - .setId("0000") - .setAccessPolicy(new BlobAccessPolicy().setPermissions("racwdl") - .setExpiresOn(getUTCNow().plusDays(1))) - cc.setAccessPolicy(null, Arrays.asList(identifier)) - - // Check containerSASPermissions - def permissions = new BlobContainerSasPermission() - .setReadPermission(true) - .setWritePermission(true) - .setListPermission(true) - .setCreatePermission(true) - .setDeletePermission(true) - .setAddPermission(true) - .setListPermission(true) - - def expiryTime = getUTCNow().plusDays(1) - - when: - def sasWithId = new BlobServiceSasSignatureValues() - .setIdentifier(identifier.getId()) - .setContainerName(cc.getBlobContainerName()) - .generateSasQueryParameters(primaryCredential) - .encode() - - def client1 = getContainerClient(sasWithId, cc.getBlobContainerUrl()) - - client1.listBlobs().iterator().hasNext() - - def sasWithPermissions = new BlobServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setContainerName(cc.getBlobContainerName()) - .generateSasQueryParameters(primaryCredential) - .encode() - def client2 = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl()) - - client2.listBlobs().iterator().hasNext() - - then: - notThrown(BlobStorageException) - } - - def "serviceSASSignatureValues network test blob user delegation"() { - setup: - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = cc.getBlobClient(blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - - def permissions = new BlobSasPermission() - .setReadPermission(true) - .setWritePermission(true) - .setCreatePermission(true) - .setDeletePermission(true) - .setAddPermission(true) - - def startTime = getUTCNow().minusDays(1) - def expiryTime = getUTCNow().plusDays(1) - - def ipRange = new SasIpRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255") - - def sasProtocol = SasProtocol.HTTPS_HTTP - def cacheControl = "cache" - def contentDisposition = "disposition" - def contentEncoding = "encoding" - def contentLanguage = "language" - def contentType = "type" - - def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) - - def keyOid = getConfigValue(key.getSignedObjectId()) - key.setSignedObjectId(keyOid) - - def keyTid = getConfigValue(key.getSignedTenantId()) - key.setSignedTenantId(keyTid) - when: - def sas = new BlobServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setStartTime(startTime) - .setProtocol(sasProtocol) - .setSasIpRange(ipRange) - .setCacheControl(cacheControl) - .setContentDisposition(contentDisposition) - .setContentEncoding(contentEncoding) - .setContentLanguage(contentLanguage) - .setContentType(contentType) - .setContainerName(bu.getContainerName()) - .setBlobName(bu.getBlobName()) - .setSnapshotId(bu.getSnapshotId()) - .setVersion(BlobSasServiceVersion.getLatest().getVersion()) - .generateSasQueryParameters(key, primaryCredential.getAccountName()) - .encode() - - then: - sas != null - def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - - def os = new ByteArrayOutputStream() - client.download(os) - def properties = client.getProperties() - - then: - os.toString() == new String(data) - properties.getCacheControl() == "cache" - properties.getContentDisposition() == "disposition" - properties.getContentEncoding() == "encoding" - properties.getContentLanguage() == "language" - notThrown(BlobStorageException) - } - - def "BlobServiceSAS network test blob snapshot"() { - setup: - def containerName = generateContainerName() - def blobName = generateBlobName() - def containerClient = primaryBlobServiceClient.createBlobContainer(containerName) - def blobClient = containerClient.getBlobClient(blobName).getBlockBlobClient() - blobClient.upload(defaultInputStream.get(), defaultDataSize) // need something to snapshot - def snapshotBlob = new SpecializedBlobClientBuilder().blobClient(blobClient.createSnapshot()).buildBlockBlobClient() - def snapshotId = snapshotBlob.getSnapshotId() - - def permissions = new BlobSasPermission() - .setReadPermission(true) - .setWritePermission(true) - .setCreatePermission(true) - .setDeletePermission(true) - .setAddPermission(true) - def startTime = getUTCNow().minusDays(1) - def expiryTime = getUTCNow().plusDays(1) - def ipRange = new SasIpRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255") - def sasProtocol = SasProtocol.HTTPS_HTTP - def cacheControl = "cache" - def contentDisposition = "disposition" - def contentEncoding = "encoding" - def contentLanguage = "language" - def contentType = "type" - - when: - def sas = new BlobServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setStartTime(startTime) - .setProtocol(sasProtocol) - .setSasIpRange(ipRange) - .setCacheControl(cacheControl) - .setContentDisposition(contentDisposition) - .setContentEncoding(contentEncoding) - .setContentLanguage(contentLanguage) - .setContentType(contentType) - .setContainerName(snapshotBlob.getContainerName()) - .setBlobName(snapshotBlob.getBlobName()) - .setSnapshotId(snapshotBlob.getSnapshotId()) - .generateSasQueryParameters(primaryCredential) - .encode() - - and: - def client = getBlobClient(sas, containerClient.getBlobContainerUrl(), blobName).getAppendBlobClient() - - client.download(new ByteArrayOutputStream()) - - then: - thrown(BlobStorageException) - - when: - def snapClient = getBlobClient(sas, containerClient.getBlobContainerUrl(), blobName, snapshotId).getAppendBlobClient() - - def data = new ByteArrayOutputStream() - snapClient.download(data) - - then: - notThrown(BlobStorageException) - data.toByteArray() == defaultData.array() - - and: - def properties = snapClient.getProperties() - - then: - properties.getCacheControl() == "cache" - properties.getContentDisposition() == "disposition" - properties.getContentEncoding() == "encoding" - properties.getContentLanguage() == "language" - - } - - def "serviceSASSignatureValues network test blob snapshot user delegation"() { - setup: - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = cc.getBlobClient(blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - def snapshotBlob = new SpecializedBlobClientBuilder().blobClient(bu.createSnapshot()).buildBlockBlobClient() - def snapshotId = snapshotBlob.getSnapshotId() - - def permissions = new BlobSasPermission() - .setReadPermission(true) - .setWritePermission(true) - .setCreatePermission(true) - .setDeletePermission(true) - .setAddPermission(true) - - def startTime = getUTCNow().minusDays(1) - def expiryTime = getUTCNow().plusDays(1) - - def ipRange = new SasIpRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255") - - def sasProtocol = SasProtocol.HTTPS_HTTP - def cacheControl = "cache" - def contentDisposition = "disposition" - def contentEncoding = "encoding" - def contentLanguage = "language" - def contentType = "type" - - def key = getOAuthServiceClient().getUserDelegationKey(startTime, expiryTime) - - def keyOid = getConfigValue(key.getSignedObjectId()) - key.setSignedObjectId(keyOid) - - def keyTid = getConfigValue(key.getSignedTenantId()) - key.setSignedTenantId(keyTid) - when: - def sas = new BlobServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setStartTime(startTime) - .setProtocol(sasProtocol) - .setSasIpRange(ipRange) - .setCacheControl(cacheControl) - .setContentDisposition(contentDisposition) - .setContentEncoding(contentEncoding) - .setContentLanguage(contentLanguage) - .setContentType(contentType) - .setContainerName(snapshotBlob.getContainerName()) - .setBlobName(snapshotBlob.getBlobName()) - .setSnapshotId(snapshotBlob.getSnapshotId()) - .setVersion(BlobSasServiceVersion.getLatest().getVersion()) - .generateSasQueryParameters(key, primaryCredential.getAccountName()) - .encode() - - // base blob with snapshot SAS - def client1 = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - client1.download(new ByteArrayOutputStream()) - - then: - // snapshot-level SAS shouldn't be able to access base blob - thrown(BlobStorageException) - - when: - // blob snapshot with snapshot SAS - def client2 = getBlobClient(sas, cc.getBlobContainerUrl(), blobName, snapshotId).getBlockBlobClient() - def os = new ByteArrayOutputStream() - client2.download(os) - - then: - notThrown(BlobStorageException) - os.toString() == new String(data) - - and: - def properties = client2.getProperties() - - then: - properties.getCacheControl() == "cache" - properties.getContentDisposition() == "disposition" - properties.getContentEncoding() == "encoding" - properties.getContentLanguage() == "language" - } - - def "serviceSASSignatureValues network test container user delegation"() { - setup: - def permissions = new BlobContainerSasPermission() - .setReadPermission(true) - .setWritePermission(true) - .setCreatePermission(true) - .setDeletePermission(true) - .setAddPermission(true) - .setListPermission(true) - - def expiryTime = getUTCNow().plusDays(1) - - def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) - - def keyOid = getConfigValue(key.getSignedObjectId()) - key.setSignedObjectId(keyOid) - - def keyTid = getConfigValue(key.getSignedTenantId()) - key.setSignedTenantId(keyTid) - when: - def sasWithPermissions = new BlobServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setVersion(BlobServiceVersion.V2019_02_02.getVersion()) - .setContainerName(cc.getBlobContainerName()) - .generateSasQueryParameters(key, primaryCredential.getAccountName()) - .encode() - - def client = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl()) - client.listBlobs().iterator().hasNext() - - then: - notThrown(BlobStorageException) - } - - def "accountSAS network test blob read"() { - setup: - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = cc.getBlobClient(blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - - def service = new AccountSasService() - .setBlobAccess(true) - def resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true) - def permissions = new AccountSasPermission() - .setReadPermission(true) - def expiryTime = getUTCNow().plusDays(1) - - when: - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() - def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - def os = new ByteArrayOutputStream() - client.download(os) - - then: - os.toString() == new String(data) - } - - def "accountSAS network test blob delete fails"() { - setup: - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = cc.getBlobClient(blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - - def service = new AccountSasService() - .setBlobAccess(true) - def resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true) - def permissions = new AccountSasPermission() - .setReadPermission(true) - def expiryTime = getUTCNow().plusDays(1) - - when: - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() - def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - client.delete() - - then: - thrown(BlobStorageException) - } - - def "accountSAS network create container fails"() { - setup: - def service = new AccountSasService() - .setBlobAccess(true) - def resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true) - def permissions = new AccountSasPermission() - .setReadPermission(true) - .setCreatePermission(false) - def expiryTime = getUTCNow().plusDays(1) - - when: - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() - def sc = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl()) - sc.createBlobContainer(generateContainerName()) - - then: - thrown(BlobStorageException) - } - - def "accountSAS network create container succeeds"() { - setup: - def service = new AccountSasService() - .setBlobAccess(true) - def resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true) - def permissions = new AccountSasPermission() - .setReadPermission(true) - .setCreatePermission(true) - def expiryTime = getUTCNow().plusDays(1) - - when: - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() - def sc = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl()) - sc.createBlobContainer(generateContainerName()) - - then: - notThrown(BlobStorageException) - } - - def "accountSAS network account sas token on endpoint"() { - setup: - def service = new AccountSasService() - .setBlobAccess(true) - def resourceType = new AccountSasResourceType() - .setContainer(true) - .setService(true) - .setObject(true) - def permissions = new AccountSasPermission() - .setReadPermission(true) - .setCreatePermission(true) - def expiryTime = getUTCNow().plusDays(1) - - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() - def containerName = generateContainerName() - def blobName = generateBlobName() - - when: - def sc = getServiceClientBuilder(null, primaryBlobServiceClient.getAccountUrl() + "?" + sas, null).buildClient() - sc.createBlobContainer(containerName) - - def cc = getContainerClientBuilder(primaryBlobServiceClient.getAccountUrl() + "/" + containerName + "?" + sas).buildClient() - cc.getProperties() - - def bc = getBlobClient(primaryCredential, primaryBlobServiceClient.getAccountUrl() + "/" + containerName + "/" + blobName + "?" + sas) - - def file = getRandomFile(256) - bc.uploadFromFile(file.toPath().toString()) - - then: - notThrown(BlobStorageException) - } - - /* - This test will ensure that each field gets placed into the proper location within the string to sign and that null - values are handled correctly. We will validate the whole SAS with service calls as well as correct serialization of - individual parts later. - */ - - @Unroll - def "serviceSasSignatures string to sign"() { - when: - def v = new BlobServiceSasSignatureValues() - def p = new BlobSasPermission() - def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) - - p.setReadPermission(true) - v.setPermissions(p) - - v.setStartTime(startTime) - def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) - v.setExpiryTime(e) - - v.setContainerName("containerName") - .setBlobName("blobName") - .setSnapshotId(snapId) - if (ipRange != null) { - def ipR = new SasIpRange() - ipR.setIpMin("ip") - v.setSasIpRange(ipR) - } - v.setIdentifier(identifier) - .setProtocol(protocol) - .setCacheControl(cacheControl) - .setContentDisposition(disposition) - .setContentEncoding(encoding) - .setContentLanguage(language) - .setContentType(type) - - def token = v.generateSasQueryParameters(primaryCredential) - then: - token.getSignature() == primaryCredential.computeHmac256(expected) - - /* - We don't test the blob or containerName properties because canonicalized resource is always added as at least - /blob/accountName. We test canonicalization of resources later. Again, this is not to test a fully functional - sas but the construction of the string to sign. - Signed resource is tested elsewhere, as we work some minor magic in choosing which value to use. - */ - where: - startTime | identifier | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | null | null || "r\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | "id" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\nid\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\nip\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nbs\nsnapId\n\n\n\n\n" - null | null | null | null | null | "control" | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\ncontrol\n\n\n\n" - null | null | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\ndisposition\n\n\n" - null | null | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\nencoding\n\n" - null | null | null | null | null | null | null | null | "language" | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\nlanguage\n" - null | null | null | null | null | null | null | null | null | "type" || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\ntype" - } - - @Unroll - def "serviceSasSignatures string to sign user delegation key"() { - when: - def v = new BlobServiceSasSignatureValues() - def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) - - def p = new BlobSasPermission() - p.setReadPermission(true) - v.setPermissions(p) - - v.setStartTime(startTime) - def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) - v.setExpiryTime(e) - - v.setContainerName("containerName") - .setBlobName("blobName") - .setSnapshotId(snapId) - if (ipRange != null) { - def ipR = new SasIpRange() - ipR.setIpMin("ip") - v.setSasIpRange(ipR) - } - v.setProtocol(protocol) - .setCacheControl(cacheControl) - .setContentDisposition(disposition) - .setContentEncoding(encoding) - .setContentLanguage(language) - .setContentType(type) - def key = new UserDelegationKey() - .setSignedObjectId(keyOid) - .setSignedTenantId(keyTid) - .setSignedStart(keyStart) - .setSignedExpiry(keyExpiry) - .setSignedService(keyService) - .setSignedVersion(keyVersion) - .setValue(keyValue) - def token = v.generateSasQueryParameters(key, primaryCredential.getAccountName()) - - then: - token.getSignature() == StorageImplUtils.computeHMac256(key.getValue(), expected) - - /* - We test string to sign functionality directly related to user delegation sas specific parameters - */ - where: - startTime | keyOid | keyTid | keyStart | keyExpiry | keyService | keyVersion | keyValue | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | "22222222-2222-2222-2222-222222222222" | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n22222222-2222-2222-2222-222222222222\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\nb\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nip\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nbs\nsnapId\n\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\ncontrol\n\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\ndisposition\n\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\nencoding\n\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | "language" | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\nlanguage\n" - null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\ntype" - } - - def "serviceSasSignatureValues IA"() { - setup: - def v = new BlobServiceSasSignatureValues() - .setSnapshotId("2018-01-01T00:00:00.0000000Z") - - when: - v.generateSasQueryParameters(null) - - then: - def e = thrown(NullPointerException) - e.getMessage().contains("storageSharedKeyCredential") - } - - @Unroll - def "BlobSASPermissions toString"() { - setup: - def perms = new BlobSasPermission() - .setReadPermission(read) - .setWritePermission(write) - .setDeletePermission(delete) - .setCreatePermission(create) - .setAddPermission(add) - .setDeleteVersionPermission(deleteVersion) - - expect: - perms.toString() == expectedString - - where: - read | write | delete | create | add | deleteVersion || expectedString - true | false | false | false | false | false || "r" - false | true | false | false | false | false || "w" - false | false | true | false | false | false || "d" - false | false | false | true | false | false || "c" - false | false | false | false | true | false || "a" - false | false | false | false | false | true || "x" - true | true | true | true | true | true || "racwdx" - } - - @Unroll - def "BlobSASPermissions parse"() { - when: - def perms = BlobSasPermission.parse(permString) - - then: - perms.hasReadPermission() == read - perms.hasWritePermission() == write - perms.hasDeletePermission() == delete - perms.hasCreatePermission() == create - perms.hasAddPermission() == add - perms.hasDeleteVersionPermission() == deleteVersion - - where: - permString || read | write | delete | create | add | deleteVersion - "r" || true | false | false | false | false | false - "w" || false | true | false | false | false | false - "d" || false | false | true | false | false | false - "c" || false | false | false | true | false | false - "a" || false | false | false | false | true | false - "x" || false | false | false | false | false | true - "racwdx" || true | true | true | true | true | true - "dcxwra" || true | true | true | true | true | true - } - - def "BlobSASPermissions parse IA"() { - when: - BlobSasPermission.parse("rwaq") - - then: - thrown(IllegalArgumentException) - } - - @Unroll - def "ContainerSASPermissions toString"() { - setup: - def perms = new BlobContainerSasPermission() - .setReadPermission(read) - .setWritePermission(write) - .setDeletePermission(delete) - .setCreatePermission(create) - .setAddPermission(add) - .setListPermission(list) - .setDeleteVersionPermission(deleteVersion) - - expect: - perms.toString() == expectedString - - where: - read | write | delete | create | add | list | deleteVersion || expectedString - true | false | false | false | false | false | false || "r" - false | true | false | false | false | false | false || "w" - false | false | true | false | false | false | false || "d" - false | false | false | true | false | false | false || "c" - false | false | false | false | true | false | false || "a" - false | false | false | false | false | true | false || "l" - false | false | false | false | false | false | true || "x" - true | true | true | true | true | true | true || "racwdxl" - } - - @Unroll - def "ContainerSASPermissions parse"() { - when: - def perms = BlobContainerSasPermission.parse(permString) - - then: - perms.hasReadPermission() == read - perms.hasWritePermission() == write - perms.hasDeletePermission() == delete - perms.hasCreatePermission() == create - perms.hasAddPermission() == add - perms.hasListPermission() == list - perms.hasDeleteVersionPermission() == deleteVersion - - where: - permString || read | write | delete | create | add | list | deleteVersion - "r" || true | false | false | false | false | false | false - "w" || false | true | false | false | false | false | false - "d" || false | false | true | false | false | false | false - "c" || false | false | false | true | false | false | false - "a" || false | false | false | false | true | false | false - "l" || false | false | false | false | false | true | false - "x" || false | false | false | false | false | false | true - "racwdxl" || true | true | true | true | true | true | true - "dcwxrla" || true | true | true | true | true | true | true - } - - def "ContainerSASPermissions parse IA"() { - when: - BlobContainerSasPermission.parse("rwaq") - - then: - thrown(IllegalArgumentException) - } - - @Unroll - def "IPRange toString"() { - setup: - def ip = new SasIpRange() - .setIpMin(min) - .setIpMax(max) - - expect: - ip.toString() == expectedString - - where: - min | max || expectedString - "a" | "b" || "a-b" - "a" | null || "a" - null | "b" || "" - } - - @Unroll - def "IPRange parse"() { - when: - def ip = SasIpRange.parse(rangeStr) - - then: - ip.getIpMin() == min - ip.getIpMax() == max - - where: - rangeStr || min | max - "a-b" || "a" | "b" - "a" || "a" | null - "" || "" | null - } - - @Unroll - def "SASProtocol parse"() { - expect: - SasProtocol.parse(protocolStr) == protocol - - where: - protocolStr || protocol - "https" || SasProtocol.HTTPS_ONLY - "https,http" || SasProtocol.HTTPS_HTTP - } - - @Unroll - def "ServiceSASSignatureValues assertGenerateOk"() { - when: - def serviceSASSignatureValues = new BlobServiceSasSignatureValues() - .setVersion(BlobSasServiceVersion.getLatest().getVersion()) - .setContainerName("containerName") - .setBlobName("blobName") - .setSnapshotId(snapshotId) - .setPermissions(BlobContainerSasPermission.parse("rl")) - - serviceSASSignatureValues.generateSasQueryParameters(new StorageSharedKeyCredential("n", "key")) - - then: - - thrown(IllegalArgumentException) - - where: - snapshotId | _ - null | _ - "id" | _ - } - - /* - This test will ensure that each field gets placed into the proper location within the string to sign and that null - values are handled correctly. We will validate the whole SAS with service calls as well as correct serialization of - individual parts later. - */ - - @Unroll - def "accountSasSignatures string to sign"() { - when: - def v = new AccountSasSignatureValues() - def p = new AccountSasPermission() - .setReadPermission(true) - v.setPermissions(p) - .setServices("b") - .setResourceTypes("o") - .setStartTime(startTime) - .setExpiryTime(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) - if (ipRange != null) { - def ipR = new SasIpRange() - ipR.setIpMin("ip") - v.setSasIpRange(ipR) - } - v.setProtocol(protocol) - - def token = v.generateSasQueryParameters(primaryCredential) - - then: - token.getSignature() == primaryCredential.computeHmac256(String.format(expectedStringToSign, primaryCredential.getAccountName())) - - where: - startTime | ipRange | protocol || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s" + "\nr\nb\no\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\n" - null | new SasIpRange() | null || "%s" + "\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\n" - null | null | SasProtocol.HTTPS_ONLY || "%s" + "\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SasProtocol.HTTPS_ONLY + "\n" + BlobSasServiceVersion.getLatest().getVersion() + "\n" - } - - @Unroll - def "accountSasSignatureValues IA"() { - setup: - def v = new AccountSasSignatureValues() - .setPermissions(AccountSasPermission.parse(permissions)) - .setServices(service) - .setResourceTypes(resourceType) - .setExpiryTime(expiryTime) - .setVersion(version) - - when: - v.generateSasQueryParameters(creds) - - then: - def e = thrown(NullPointerException) - e.getMessage().contains(parameter) - - where: - permissions | service | resourceType | expiryTime | version | creds || parameter - "c" | null | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | primaryCredential || "services" - "c" | "b" | null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | primaryCredential || "resourceTypes" - "c" | "b" | "c" | null | "v" | primaryCredential || "expiryTime" - "c" | "b" | "c" | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | "v" | null || "storageSharedKeyCredentials" - } - - def "accountSasSignatureValues null"() { - when: - setup: - def v = new AccountSasSignatureValues() - - when: - v.setPermissions(null) - - - then: - def e = thrown(NullPointerException) - e.getMessage().contains("permissions") - } - - def "accountSasSignatureValues null permission"() { - when: - AccountSasPermission.parse(null) - - then: - thrown(NullPointerException) - } - - @Unroll - def "AccountSASPermissions toString"() { - setup: - def perms = new AccountSasPermission() - perms.setReadPermission(read) - .setWritePermission(write) - .setDeletePermission(delete) - .setListPermission(list) - .setAddPermission(add) - .setCreatePermission(create) - .setUpdatePermission(update) - .setProcessMessages(process) - .setDeleteVersionPermission(deleteVersion) - - expect: - perms.toString() == expectedString - - where: - read | write | delete | list | add | create | update | process | deleteVersion || expectedString - true | false | false | false | false | false | false | false | false || "r" - false | true | false | false | false | false | false | false | false || "w" - false | false | true | false | false | false | false | false | false || "d" - false | false | false | true | false | false | false | false | false || "l" - false | false | false | false | true | false | false | false | false || "a" - false | false | false | false | false | true | false | false | false || "c" - false | false | false | false | false | false | true | false | false || "u" - false | false | false | false | false | false | false | true | false || "p" - false | false | false | false | false | false | false | false | true || "x" - true | true | true | true | true | true | true | true | true || "rwdxlacup" - } - - @Unroll - def "AccountSASPermissions parse"() { - when: - def perms = AccountSasPermission.parse(permString) - - then: - perms.hasReadPermission() == read - perms.hasWritePermission() == write - perms.hasDeletePermission() == delete - perms.hasListPermission() == list - perms.hasAddPermission() == add - perms.hasCreatePermission() == create - perms.hasUpdatePermission() == update - perms.hasProcessMessages() == process - perms.hasDeleteVersionPermission() == deleteVersion - - where: - permString || read | write | delete | list | add | create | update | process | deleteVersion - "r" || true | false | false | false | false | false | false | false | false - "w" || false | true | false | false | false | false | false | false | false - "d" || false | false | true | false | false | false | false | false | false - "l" || false | false | false | true | false | false | false | false | false - "a" || false | false | false | false | true | false | false | false | false - "c" || false | false | false | false | false | true | false | false | false - "u" || false | false | false | false | false | false | true | false | false - "p" || false | false | false | false | false | false | false | true | false - "x" || false | false | false | false | false | false | false | false | true - "rwdxlacup" || true | true | true | true | true | true | true | true | true - "lwrupcaxd" || true | true | true | true | true | true | true | true | true - } - - def "AccountSASPermissions parse IA"() { - when: - AccountSasPermission.parse("rwaq") - - then: - thrown(IllegalArgumentException) - } - - @Unroll - def "AccountSASResourceType toString"() { - setup: - def resourceTypes = new AccountSasResourceType() - .setService(service) - .setContainer(container) - .setObject(object) - - expect: - resourceTypes.toString() == expectedString - - where: - service | container | object || expectedString - true | false | false || "s" - false | true | false || "c" - false | false | true || "o" - true | true | true || "sco" - } - - @Unroll - def "AccountSASResourceType parse"() { - when: - def resourceTypes = AccountSasResourceType.parse(resourceTypeString) - - then: - resourceTypes.isService() == service - resourceTypes.isContainer() == container - resourceTypes.isObject() == object - - where: - resourceTypeString || service | container | object - "s" || true | false | false - "c" || false | true | false - "o" || false | false | true - "sco" || true | true | true - } - - @Unroll - def "AccountSASResourceType IA"() { - when: - AccountSasResourceType.parse("scq") - - then: - thrown(IllegalArgumentException) - } - - // TODO : Figure out how to properly port this test over since I changed it to a common sas params - @Ignore - def "BlobURLParts"() { - setup: - def parts = new BlobUrlParts() - parts.setScheme("http") - .setHost("host") - .setContainerName("container") - .setBlobName("blob") - .setSnapshot("snapshot") - def sasValues = new BlobServiceSasSignatureValues() - .setPermissions(new BlobSasPermission().setReadPermission(true)) - .setContainerName("containerName") - .setBlobName("blobName") - .setExpiryTime(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) - parts.setSasQueryParameters(sasValues.generateSasQueryParameters(primaryCredential)) - - when: - def splitParts = parts.toUrl().toString().split("\\?") - - then: - splitParts.size() == 2 // Ensure that there is only one question mark even when sas and snapshot are present - splitParts[0] == "http://host/container/blob" - splitParts[1].contains("snapshot=snapshot") - splitParts[1].contains("sp=r") - splitParts[1].contains("sig=") - splitParts[1].split("&").size() == 6 // snapshot & sv & sr & sp & sig - } - - def "URLParser"() { - when: - def parts = BlobUrlParts.parse(new URL("http://host/container/" + originalBlobName + "?snapshot=snapshot&sv=" + BlobSasServiceVersion.getLatest().getVersion() + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) - - then: - parts.getScheme() == "http" - parts.getHost() == "host" - parts.getBlobContainerName() == "container" - parts.getBlobName() == finalBlobName - parts.getSnapshot() == "snapshot" - parts.getSasQueryParameters().getPermissions() == "r" - parts.getSasQueryParameters().getVersion() == BlobSasServiceVersion.getLatest().getVersion() - parts.getSasQueryParameters().getResource() == "c" - parts.getSasQueryParameters().getSignature() == Utility.urlDecode("Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D") - - where: - originalBlobName | finalBlobName - "blob" | "blob" - "path/to]a blob" | "path/to]a blob" - "path%2Fto%5Da%20blob" | "path/to]a blob" - "斑點" | "斑點" - "%E6%96%91%E9%BB%9E" | "斑點" - } -} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.groovy index 43461616521f..47b97f7bf79c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.groovy @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + package com.azure.storage.blob import com.azure.storage.blob.implementation.util.BlobSasImplUtil @@ -8,15 +11,18 @@ import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.UserDelegationKey import com.azure.storage.blob.sas.BlobContainerSasPermission import com.azure.storage.blob.sas.BlobSasPermission +import com.azure.storage.blob.sas.BlobSasServiceVersion import com.azure.storage.blob.sas.BlobServiceSasSignatureValues import com.azure.storage.blob.specialized.BlockBlobClient import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder +import com.azure.storage.common.implementation.AccountSasImplUtil import com.azure.storage.common.implementation.Constants import com.azure.storage.common.implementation.StorageImplUtils import com.azure.storage.common.sas.AccountSasPermission import com.azure.storage.common.sas.AccountSasResourceType import com.azure.storage.common.sas.AccountSasService import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.CommonSasQueryParameters import com.azure.storage.common.sas.SasIpRange import com.azure.storage.common.sas.SasProtocol import spock.lang.Unroll @@ -36,7 +42,7 @@ class SasClientTests extends APISpec { sasClient.upload(new ByteArrayInputStream(defaultData.array()), defaultDataSize) } - def "network test blob sas"() { + def "blob sas read permissions"() { setup: def permissions = new BlobSasPermission() .setReadPermission(true) @@ -62,40 +68,7 @@ class SasClientTests extends APISpec { notThrown(BlobStorageException) } - def "network test blob snapshot"() { - setup: - - def data = "test".getBytes() - def blobName = generateBlobName() - def bu = getBlobClient(primaryCredential, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() - bu.upload(new ByteArrayInputStream(data), data.length) - def snapshotId = bu.createSnapshot().getSnapshotId() - def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() - - def permissions = new BlobSasPermission() - .setReadPermission(true) - .setWritePermission(true) - .setCreatePermission(true) - .setDeletePermission(true) - .setAddPermission(true) - - def sasValues = generateValues(permissions) - - when: - def sas = snapshotBlob.generateSas(sasValues) - - def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName, snapshotId).getBlockBlobClient() - - def os = new ByteArrayOutputStream() - client.download(os) - def properties = client.getProperties() - - then: - os.toString() == new String(data) - validateSasProperties(properties) - } - - def "serviceSASSignatureValues network test container"() { + def "container sas identifier and permissions"() { setup: def identifier = new BlobSignedIdentifier() .setId("0000") @@ -130,7 +103,7 @@ class SasClientTests extends APISpec { notThrown(BlobStorageException) } - def "network test blob user delegation"() { + def "blob sas user delegation"() { setup: def permissions = new BlobSasPermission() .setReadPermission(true) @@ -156,7 +129,7 @@ class SasClientTests extends APISpec { notThrown(BlobStorageException) } - def "BlobServiceSAS network test blob snapshot"() { + def "blob sas snapshot"() { setup: def snapshotBlob = new SpecializedBlobClientBuilder().blobClient(sasClient.createSnapshot()).buildBlockBlobClient() def snapshotId = snapshotBlob.getSnapshotId() @@ -195,7 +168,7 @@ class SasClientTests extends APISpec { validateSasProperties(properties) } - def "network test blob snapshot user delegation"() { + def "blob sas snapshot user delegation"() { setup: def snapshotBlob = new SpecializedBlobClientBuilder().blobClient(sasClient.createSnapshot()).buildBlockBlobClient() def snapshotId = snapshotBlob.getSnapshotId() @@ -232,7 +205,7 @@ class SasClientTests extends APISpec { validateSasProperties(properties) } - def "network test container user delegation"() { + def "container sas user delegation"() { setup: def permissions = new BlobContainerSasPermission() .setReadPermission(true) @@ -254,7 +227,215 @@ class SasClientTests extends APISpec { notThrown(BlobStorageException) } - def "accountSAS network test blob read"() { + def "blob sas tags"() { + setup: + def permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setTagsPermission(true) + + def sasValues = generateValues(permissions) + def sas = sasClient.generateSas(sasValues) + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName) + + when: + def tags = new HashMap() + tags.put("foo", "bar") + client.setTags(tags) + def t = client.getTags() + + then: + tags == t + notThrown(BlobStorageException) + } + + def "blob sas tags fail"() { + setup: + def permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + /* No tags permission */ + + def sasValues = generateValues(permissions) + def sas = sasClient.generateSas(sasValues) + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName) + + when: + def tags = new HashMap() + tags.put("foo", "bar") + client.setTags(tags) + + then: + thrown(BlobStorageException) + } + + def "container sas tags"() { + setup: + def permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true) + .setDeleteVersionPermission(true) + .setTagsPermission(true) + + def expiryTime = getUTCNow().plusDays(1) + def sasValues = new BlobServiceSasSignatureValues(expiryTime, permissions) + def sas = cc.generateSas(sasValues) + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName) + + when: + def tags = new HashMap() + tags.put("foo", "bar") + client.setTags(tags) + def t = client.getTags() + + then: + tags == t + notThrown(BlobStorageException) + } + + def "container sas tags fail"() { + setup: + def permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + /* No tags permission. */ + + def expiryTime = getUTCNow().plusDays(1) + def sasValues = new BlobServiceSasSignatureValues(expiryTime, permissions) + def sas = sasClient.generateSas(sasValues) + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName) + + when: + def tags = new HashMap() + tags.put("foo", "bar") + client.setTags(tags) + + then: + thrown(BlobStorageException) + } + + def "account sas tags and filter tags"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setDeleteVersionPermission(true) + .setListPermission(true) + .setUpdatePermission(true) + .setProcessMessages(true) + .setFilterTagsPermission(true) + .setAddPermission(true) + .setTagsPermission(true) + def expiryTime = getUTCNow().plusDays(1) + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryBlobServiceClient.generateAccountSas(sasValues) + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + def tags = new HashMap() + tags.put("foo", "bar") + + when: + client.setTags(tags) + + and: + def t = client.getTags() + + then: + tags == t + notThrown(BlobStorageException) + + when: + client = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl()) + client.findBlobsByTags("\"foo\"='bar'").iterator().hasNext() + + then: + notThrown(BlobStorageException) + } + + def "account sas tags fail"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setDeleteVersionPermission(true) + .setListPermission(true) + .setUpdatePermission(true) + .setProcessMessages(true) + .setFilterTagsPermission(true) + .setAddPermission(true) + def expiryTime = getUTCNow().plusDays(1) + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryBlobServiceClient.generateAccountSas(sasValues) + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + def tags = new HashMap() + tags.put("foo", "bar") + + when: + client.setTags(tags) + + then: + thrown(BlobStorageException) + } + + def "account sas filter tags fail"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setDeleteVersionPermission(true) + .setListPermission(true) + .setUpdatePermission(true) + .setProcessMessages(true) + .setAddPermission(true) + def expiryTime = getUTCNow().plusDays(1) + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryBlobServiceClient.generateAccountSas(sasValues) + def client = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl()) + + when: + client.findBlobsByTags("\"foo\"='bar'").iterator().hasNext() + + then: + thrown(BlobStorageException) + } + + def "account sas blob read"() { setup: def service = new AccountSasService() .setBlobAccess(true) @@ -277,7 +458,7 @@ class SasClientTests extends APISpec { os.toString() == new String(defaultData.array()) } - def "accountSAS network test blob delete fails new API"() { + def "account sas blob delete fails"() { setup: def service = new AccountSasService() .setBlobAccess(true) @@ -299,7 +480,7 @@ class SasClientTests extends APISpec { thrown(BlobStorageException) } - def "accountSAS network create container fails"() { + def "account sas create container fails"() { setup: def service = new AccountSasService() .setBlobAccess(true) @@ -322,7 +503,7 @@ class SasClientTests extends APISpec { thrown(BlobStorageException) } - def "accountSAS network create container succeeds"() { + def "account sas create container succeeds"() { setup: def service = new AccountSasService() .setBlobAccess(true) @@ -345,6 +526,45 @@ class SasClientTests extends APISpec { notThrown(BlobStorageException) } + def "account sas on endpoint"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + def expiryTime = getUTCNow().plusDays(1) + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryBlobServiceClient.generateAccountSas(sasValues) + + when: + + def sc = getServiceClient(primaryBlobServiceClient.getAccountUrl() + "?" + sas) + sc.createBlobContainer(generateContainerName()) + + then: + notThrown(BlobStorageException) + + when: + def cc = getContainerClientBuilder(primaryBlobServiceClient.getAccountUrl() + "/" + containerName + "?" + sas).buildClient() + cc.getProperties() + + then: + notThrown(BlobStorageException) + + when: + def bc = getBlobClient(primaryCredential, primaryBlobServiceClient.getAccountUrl() + "/" + containerName + "/" + blobName + "?" + sas) + def file = getRandomFile(256) + bc.uploadFromFile(file.toPath().toString(), true) + + then: + notThrown(BlobStorageException) + } + BlobServiceSasSignatureValues generateValues(BlobSasPermission permission) { return new BlobServiceSasSignatureValues(getUTCNow().plusDays(1), permission) .setStartTime(getUTCNow().minusDays(1)) @@ -377,48 +597,6 @@ class SasClientTests extends APISpec { return key } - /* Blob SAS Impl Util Tests */ - def "ensure state version"() { - when: - BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues("id"), "container") - implUtil.version = null - implUtil.ensureState() - - then: - implUtil.version // Version is set - implUtil.resource == "c" // Default resource is container - !implUtil.permissions // Identifier was used so permissions is null - } - - def "ensure state illegal argument"() { - when: - BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues(), null) - - implUtil.ensureState() - - then: - thrown(IllegalStateException) - } - - @Unroll - def "ensure state resource and permission"() { - setup: - def expiryTime = OffsetDateTime.now().plusDays(1) - - expect: - BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues(expiryTime, permission), container, blob, snapshot, versionId) - implUtil.ensureState() - implUtil.resource == resource - implUtil.permissions == permissionString - - where: - container | blob | snapshot | versionId | permission || resource | permissionString - "container" | null | null | null | new BlobContainerSasPermission().setReadPermission(true).setListPermission(true) || "c" | "rl" - "container" | "blob" | null | null | new BlobSasPermission().setReadPermission(true) || "b" | "r" - "container" | "blob" | "snapshot" | null | new BlobSasPermission().setReadPermission(true) || "bs" | "r" - "container" | "blob" | null | "version" | new BlobSasPermission().setReadPermission(true) || "bv" | "r" - } - /* This test will ensure that each field gets placed into the proper location within the string to sign and that null values are handled correctly. We will validate the whole SAS with service calls as well as correct serialization of @@ -454,7 +632,7 @@ class SasClientTests extends APISpec { def sasToken = implUtil.generateSas(primaryCredential) - def token = BlobUrlParts.parse(cc.getBlobContainerUrl() + "?" + sasToken).getSasQueryParameters() + def token = BlobUrlParts.parse(cc.getBlobContainerUrl() + "?" + sasToken).getCommonSasQueryParameters() then: token.getSignature() == primaryCredential.computeHmac256(expected) @@ -484,8 +662,7 @@ class SasClientTests extends APISpec { def "blob sas impl util string to sign user delegation key"() { when: def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) - def p = new BlobSasPermission() - p.setReadPermission(true) + def p = new BlobSasPermission().setReadPermission(true) def v = new BlobServiceSasSignatureValues(e, p) def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) @@ -516,7 +693,7 @@ class SasClientTests extends APISpec { def sasToken = implUtil.generateUserDelegationSas(key, primaryCredential.getAccountName()) - def token = BlobUrlParts.parse(cc.getBlobContainerUrl() + "?" + sasToken).getSasQueryParameters() + def token = BlobUrlParts.parse(cc.getBlobContainerUrl() + "?" + sasToken).getCommonSasQueryParameters() then: token.getSignature() == StorageImplUtils.computeHMac256(key.getValue(), expected) @@ -544,4 +721,65 @@ class SasClientTests extends APISpec { null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null | "versionId" || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbv\nversionId\n\n\n\n\n" } + @Unroll + def "blob sas impl util canonicalized resource"() { + setup: + BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues(expiryTime, new BlobSasPermission()) + + BlobSasImplUtil implUtil = new BlobSasImplUtil(v, containerName, blobName, snapId, null) + + expectedStringToSign = String.format(expectedStringToSign, + Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), + primaryCredential.getAccountName()) + + when: + String token = implUtil.generateSas(primaryCredential) + + def queryParams = new CommonSasQueryParameters(BlobUrlParts.parseQueryString(token), true) + + then: + queryParams.getSignature() == primaryCredential.computeHmac256(expectedStringToSign) + queryParams.getResource() == expectedResource + + where: + containerName | blobName | snapId | expiryTime || expectedResource | expectedStringToSign + "c" | "b" | "id" | OffsetDateTime.now() || "bs" | "\n\n%s\n" + "/blob/%s/c/b\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nbs\nid\n\n\n\n\n" + "c" | "b" | null | OffsetDateTime.now() || "b" | "\n\n%s\n" + "/blob/%s/c/b\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" + "c" | null | null | OffsetDateTime.now() || "c" | "\n\n%s\n" + "/blob/%s/c\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nc\n\n\n\n\n\n" + + } + + @Unroll + def "account sas impl util string to sign"() { + when: + def p = new AccountSasPermission() + .setReadPermission(true) + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def s = new AccountSasService().setBlobAccess(true) + def rt = new AccountSasResourceType().setObject(true) + def v = new AccountSasSignatureValues(e, p, s, rt) + .setStartTime(startTime) + if (ipRange != null) { + def ipR = new SasIpRange() + ipR.setIpMin("ip") + v.setSasIpRange(ipR) + } + v.setProtocol(protocol) + + def implUtil = new AccountSasImplUtil(v) + + def sasToken = implUtil.generateSas(primaryCredential) + + def token = BlobUrlParts.parse(cc.getBlobContainerUrl() + "?" + sasToken).getCommonSasQueryParameters() + + then: + token.getSignature() == primaryCredential.computeHmac256(String.format(expectedStringToSign, primaryCredential.getAccountName())) + + where: + startTime | ipRange | protocol || expectedStringToSign + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s" + "\nr\nb\no\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\n" + null | new SasIpRange() | null || "%s" + "\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\n" + null | null | SasProtocol.HTTPS_ONLY || "%s" + "\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SasProtocol.HTTPS_ONLY + "\n" + BlobSasServiceVersion.getLatest().getVersion() + "\n" + } + } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy index a75fc3124aae..e1e745ab98e6 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAPITest.groovy @@ -3,6 +3,7 @@ package com.azure.storage.blob +import com.azure.core.http.rest.Response import com.azure.core.util.paging.ContinuablePage import com.azure.core.util.Context import com.azure.identity.DefaultAzureCredentialBuilder @@ -273,8 +274,11 @@ class ServiceAPITest extends APISpec { blobClient = containerClient.getBlobClient(generateBlobName()) blobClient.upload(defaultInputStream.get(), defaultDataSize) + sleepIfRecord(10 * 1000) // To allow tags to index + when: - def results = primaryBlobServiceClient.findBlobsByTags("\"bar\"='foo'") + def results = primaryBlobServiceClient.findBlobsByTags(String.format("@container='%s' AND \"bar\"='foo'", + containerClient.getBlobContainerName())) then: results.size() == 1 @@ -292,6 +296,8 @@ class ServiceAPITest extends APISpec { new BlobParallelUploadOptions(defaultInputStream.get(), defaultDataSize).setTags(tags), null, null) } + sleepIfRecord(10 * 1000) // To allow tags to index + def firstPage = primaryBlobServiceClient.findBlobsByTags(new FindBlobsOptions("\"tag\"='value'") .setMaxResultsPerPage(5), null, Context.NONE) .iterableByPage().iterator().next() @@ -500,6 +506,29 @@ class ServiceAPITest extends APISpec { primaryBlobServiceClient.setPropertiesWithResponse(serviceProperties, null, null).getStatusCode() == 202 } + def "Set props static website"() { + setup: + def serviceProperties = primaryBlobServiceClient.getProperties() + def errorDocument404Path = "error/404.html" + def defaultIndexDocumentPath = "index.html" + + serviceProperties.setStaticWebsite(new StaticWebsite() + .setEnabled(true) + .setErrorDocument404Path(errorDocument404Path) + .setDefaultIndexDocumentPath(defaultIndexDocumentPath) + ) + + when: + Response resp = primaryBlobServiceClient.setPropertiesWithResponse(serviceProperties, null, null) + + then: + resp.getStatusCode() == 202 + def staticWebsite = primaryBlobServiceClient.getProperties().getStaticWebsite() + staticWebsite.isEnabled() + staticWebsite.getErrorDocument404Path() == errorDocument404Path + staticWebsite.getDefaultIndexDocumentPath() == defaultIndexDocumentPath + } + def "Set props error"() { when: getServiceClient(primaryCredential, "https://error.blob.core.windows.net") diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/VersioningTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/VersioningTest.groovy index 54b31b8a57a3..4c377dbc5d8a 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/VersioningTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/VersioningTest.groovy @@ -30,7 +30,7 @@ class VersioningTest extends APISpec { def setup() { blobName = generateBlobName() containerName = generateContainerName() - blobContainerClient = primaryBlobServiceClient.createBlobContainer(containerName) + blobContainerClient = versionedBlobServiceClient.createBlobContainer(containerName) blobClient = blobContainerClient.getBlobClient(blobName) } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy index f7f92480e98b..e509aafa9c83 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/AppendBlobAPITest.groovy @@ -6,6 +6,7 @@ package com.azure.storage.blob.specialized import com.azure.core.exception.UnexpectedLengthException import com.azure.core.util.Context import com.azure.storage.blob.APISpec + import com.azure.storage.blob.options.AppendBlobCreateOptions import com.azure.storage.blob.models.AppendBlobRequestConditions import com.azure.storage.blob.models.BlobErrorCode @@ -14,6 +15,8 @@ import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.BlobRequestConditions import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.PublicAccessType +import com.azure.storage.blob.options.AppendBlobSealOptions +import com.azure.storage.blob.options.BlobGetTagsOptions import spock.lang.Unroll import java.security.MessageDigest @@ -115,7 +118,7 @@ class AppendBlobAPITest extends APISpec { when: bc.createWithResponse(new AppendBlobCreateOptions().setTags(tags), null, Context.NONE) - def response = bc.getTagsWithResponse(null, null) + def response = bc.getTagsWithResponse(new BlobGetTagsOptions(), null, null) then: response.getValue() == tags @@ -130,6 +133,9 @@ class AppendBlobAPITest extends APISpec { @Unroll def "Create AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) def bac = new BlobRequestConditions() @@ -138,18 +144,20 @@ class AppendBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) expect: bc.createWithResponse(null, null, bac, null, null).getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -163,6 +171,7 @@ class AppendBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.createWithResponse(null, null, bac, null, Context.NONE) @@ -171,12 +180,13 @@ class AppendBlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Append block defaults"() { @@ -256,6 +266,9 @@ class AppendBlobAPITest extends APISpec { @Unroll def "Append block AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) def bac = new AppendBlobRequestConditions() @@ -266,22 +279,23 @@ class AppendBlobAPITest extends APISpec { .setIfUnmodifiedSince(unmodified) .setAppendPosition(appendPosE) .setMaxSize(maxSizeLTE) - + .setTagsConditions(tags) expect: bc.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, bac, null, null) .getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE - null | null | null | null | null | null | null - oldDate | null | null | null | null | null | null - null | newDate | null | null | null | null | null - null | null | receivedEtag | null | null | null | null - null | null | null | garbageEtag | null | null | null - null | null | null | null | receivedLeaseID | null | null - null | null | null | null | null | 0 | null - null | null | null | null | null | null | 100 + modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE | tags + null | null | null | null | null | null | null | null + oldDate | null | null | null | null | null | null | null + null | newDate | null | null | null | null | null | null + null | null | receivedEtag | null | null | null | null | null + null | null | null | garbageEtag | null | null | null | null + null | null | null | null | receivedLeaseID | null | null | null + null | null | null | null | null | 0 | null | null + null | null | null | null | null | null | 100 | null + null | null | null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -298,6 +312,7 @@ class AppendBlobAPITest extends APISpec { .setIfUnmodifiedSince(unmodified) .setAppendPosition(appendPosE) .setMaxSize(maxSizeLTE) + .setTagsConditions(tags) when: bc.appendBlockWithResponse(defaultInputStream.get(), defaultDataSize, null, bac, null, null) @@ -309,15 +324,15 @@ class AppendBlobAPITest extends APISpec { defaultInputStream.get().reset() where: - modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE - newDate | null | null | null | null | null | null - null | oldDate | null | null | null | null | null - null | null | garbageEtag | null | null | null | null - null | null | null | receivedEtag | null | null | null - null | null | null | null | garbageLeaseID | null | null - null | null | null | null | null | 1 | null - null | null | null | null | null | null | 1 - + modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE | tags + newDate | null | null | null | null | null | null | null + null | oldDate | null | null | null | null | null | null + null | null | garbageEtag | null | null | null | null | null + null | null | null | receivedEtag | null | null | null | null + null | null | null | null | garbageLeaseID | null | null | null + null | null | null | null | null | 1 | null | null + null | null | null | null | null | null | 1 | null + null | null | null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Append block error"() { @@ -405,6 +420,9 @@ class AppendBlobAPITest extends APISpec { @Unroll def "Append block from URL destination AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) cc.setAccessPolicy(PublicAccessType.CONTAINER, null) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) @@ -416,6 +434,7 @@ class AppendBlobAPITest extends APISpec { .setIfUnmodifiedSince(unmodified) .setAppendPosition(appendPosE) .setMaxSize(maxSizeLTE) + .setTagsConditions(tags) def sourceURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() sourceURL.create() @@ -426,15 +445,16 @@ class AppendBlobAPITest extends APISpec { bc.appendBlockFromUrlWithResponse(sourceURL.getBlobUrl(), null, null, bac, null, null, null).getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE - null | null | null | null | null | null | null - oldDate | null | null | null | null | null | null - null | newDate | null | null | null | null | null - null | null | receivedEtag | null | null | null | null - null | null | null | garbageEtag | null | null | null - null | null | null | null | receivedLeaseID | null | null - null | null | null | null | null | 0 | null - null | null | null | null | null | null | 100 + modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE | tags + null | null | null | null | null | null | null | null + oldDate | null | null | null | null | null | null | null + null | newDate | null | null | null | null | null | null + null | null | receivedEtag | null | null | null | null | null + null | null | null | garbageEtag | null | null | null | null + null | null | null | null | receivedLeaseID | null | null | null + null | null | null | null | null | 0 | null | null + null | null | null | null | null | null | 100 | null + null | null | null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -452,6 +472,7 @@ class AppendBlobAPITest extends APISpec { .setIfUnmodifiedSince(unmodified) .setAppendPosition(appendPosE) .setMaxSize(maxSizeLTE) + .setTagsConditions(tags) def sourceURL = cc.getBlobClient(generateBlobName()).getAppendBlobClient() sourceURL.create() @@ -465,14 +486,15 @@ class AppendBlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE - newDate | null | null | null | null | null | null - null | oldDate | null | null | null | null | null - null | null | garbageEtag | null | null | null | null - null | null | null | receivedEtag | null | null | null - null | null | null | null | garbageLeaseID | null | null - null | null | null | null | null | 1 | null - null | null | null | null | null | null | 1 + modified | unmodified | match | noneMatch | leaseID | appendPosE | maxSizeLTE | tags + newDate | null | null | null | null | null | null | null + null | oldDate | null | null | null | null | null | null + null | null | garbageEtag | null | null | null | null | null + null | null | null | receivedEtag | null | null | null | null + null | null | null | null | garbageLeaseID | null | null | null + null | null | null | null | null | 1 | null | null + null | null | null | null | null | null | 1 | null + null | null | null | null | null | null | null | "\"notfoo\" = 'notbar'" } @Unroll @@ -558,4 +580,92 @@ class AppendBlobAPITest extends APISpec { then: notThrown(Throwable) } + + def "Seal defaults"() { + when: + def sealResponse = bc.sealWithResponse(null, null, null) + + then: + sealResponse.getStatusCode() == 200 + sealResponse.getHeaders().getValue("x-ms-blob-sealed") + } + + def "Seal min"() { + when: + bc.seal() + + then: + bc.getProperties().isSealed() + bc.downloadWithResponse(new ByteArrayOutputStream(), null, null, null, false, null, null).getDeserializedHeaders().isSealed() + } + + def "Seal error"() { + setup: + bc = cc.getBlobClient(generateBlobName()).getAppendBlobClient() + + when: + bc.seal() + + then: + thrown(BlobStorageException) + } + + @Unroll + def "Seal AC"() { + setup: + match = setupBlobMatchCondition(bc, match) + leaseID = setupBlobLeaseCondition(bc, leaseID) + def bac = new AppendBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setAppendPosition(appendPosE) + + expect: + bc.sealWithResponse(new AppendBlobSealOptions().setRequestConditions(bac), null, null) + .getStatusCode() == 200 + + where: + modified | unmodified | match | noneMatch | leaseID | appendPosE + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | 0 + } + + @Unroll + def "Seal AC fail"() { + setup: + noneMatch = setupBlobMatchCondition(bc, noneMatch) + setupBlobLeaseCondition(bc, leaseID) + + def bac = new AppendBlobRequestConditions() + .setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setAppendPosition(appendPosE) + + when: + bc.sealWithResponse(new AppendBlobSealOptions().setRequestConditions(bac), null, null) + + then: + thrown(BlobStorageException) + + where: + modified | unmodified | match | noneMatch | leaseID | appendPosE + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | 1 + } + } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy index 190085094dbb..0ac7d8cdbfc2 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobAPITest.groovy @@ -20,11 +20,13 @@ import com.azure.storage.blob.ProgressReceiver import com.azure.storage.blob.models.AccessTier import com.azure.storage.blob.models.BlobErrorCode import com.azure.storage.blob.models.BlobHttpHeaders +import com.azure.storage.blob.options.BlobGetTagsOptions import com.azure.storage.blob.options.BlobParallelUploadOptions import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.BlobRequestConditions import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.options.BlockBlobCommitBlockListOptions +import com.azure.storage.blob.options.BlockBlobListBlocksOptions import com.azure.storage.blob.options.BlockBlobSimpleUploadOptions import com.azure.storage.blob.models.BlockListType import com.azure.storage.blob.models.CustomerProvidedKey @@ -474,7 +476,7 @@ class BlockBlobAPITest extends APISpec { when: blockBlobClient.commitBlockListWithResponse(new BlockBlobCommitBlockListOptions(null).setTags(tags), null, null) - def response = blockBlobClient.getTagsWithResponse(null, null) + def response = blockBlobClient.getTagsWithResponse(new BlobGetTagsOptions(), null, null) then: response.getStatusCode() == 200 @@ -490,6 +492,9 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Commit block list AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + blockBlobClient.setTags(t) match = setupBlobMatchCondition(blockBlobClient, match) leaseID = setupBlobLeaseCondition(blockBlobClient, leaseID) def bac = new BlobRequestConditions() @@ -498,19 +503,20 @@ class BlockBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) - + .setTagsConditions(tags) expect: blockBlobClient.commitBlockListWithResponse(null, null, null, null, bac, null, null).getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -524,6 +530,7 @@ class BlockBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: blockBlobClient.commitBlockListWithResponse(null, null, null, null, bac, null, null) @@ -533,12 +540,13 @@ class BlockBlobAPITest extends APISpec { e.getErrorCode() == BlobErrorCode.LEASE_ID_MISMATCH_WITH_BLOB_OPERATION where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Commit block list error"() { @@ -636,6 +644,28 @@ class BlockBlobAPITest extends APISpec { e.getErrorCode() == BlobErrorCode.LEASE_ID_MISMATCH_WITH_BLOB_OPERATION } + def "Get block list tags"() { + setup: + def t = new HashMap() + t.put("foo", "bar") + blockBlobClient.setTags(t) + + when: + blockBlobClient.listBlocksWithResponse(new BlockBlobListBlocksOptions(BlockListType.ALL).setIfTagsMatch("\"foo\" = 'bar'"), null, Context.NONE) + + then: + notThrown(BlobStorageException) + } + + def "Get block list tags fail"() { + when: + blockBlobClient.listBlocksWithResponse(new BlockBlobListBlocksOptions(BlockListType.ALL).setIfTagsMatch("\"notfoo\" = 'notbar'"), null, Context.NONE) + + then: + def e = thrown(BlobStorageException) + e.getErrorCode() == BlobErrorCode.CONDITION_NOT_MET + } + def "Get block list error"() { setup: blockBlobClient = cc.getBlobClient(generateBlobName()).getBlockBlobClient() @@ -1008,7 +1038,7 @@ class BlockBlobAPITest extends APISpec { when: blockBlobClient.uploadWithResponse(new BlockBlobSimpleUploadOptions(defaultInputStream.get(), defaultDataSize) .setTags(tags), null, null) - def response = blockBlobClient.getTagsWithResponse(null, null) + def response = blockBlobClient.getTagsWithResponse(new BlobGetTagsOptions(), null, null) then: response.getStatusCode() == 200 @@ -1024,6 +1054,9 @@ class BlockBlobAPITest extends APISpec { @Unroll def "Upload AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + blockBlobClient.setTags(t) match = setupBlobMatchCondition(blockBlobClient, match) leaseID = setupBlobLeaseCondition(blockBlobClient, leaseID) def bac = new BlobRequestConditions() @@ -1032,18 +1065,20 @@ class BlockBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) expect: blockBlobClient.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, null, bac, null, null).getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -1057,6 +1092,7 @@ class BlockBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: blockBlobClient.uploadWithResponse(defaultInputStream.get(), defaultDataSize, null, null, null, null, bac, null, null) @@ -1067,12 +1103,13 @@ class BlockBlobAPITest extends APISpec { e.getErrorCode() == BlobErrorCode.LEASE_ID_MISMATCH_WITH_BLOB_OPERATION where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Upload error"() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index ef24df0610ca..f387d8ed828b 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -6,26 +6,17 @@ package com.azure.storage.blob.specialized import com.azure.storage.blob.APISpec import com.azure.storage.blob.BlobContainerAsyncClient import com.azure.storage.blob.BlobUrlParts +import com.azure.storage.blob.implementation.util.BlobSasImplUtil import com.azure.storage.blob.models.BlobRange -import com.azure.storage.blob.models.UserDelegationKey -import com.azure.storage.blob.sas.BlobContainerSasPermission import com.azure.storage.blob.sas.BlobSasPermission -import com.azure.storage.blob.sas.BlobServiceSasQueryParameters -import com.azure.storage.blob.sas.BlobServiceSasSignatureValues import com.azure.storage.blob.sas.BlobSasServiceVersion +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues import com.azure.storage.common.Utility -import com.azure.storage.common.implementation.Constants -import com.azure.storage.common.implementation.StorageImplUtils -import com.azure.storage.common.sas.AccountSasPermission -import com.azure.storage.common.sas.AccountSasResourceType -import com.azure.storage.common.sas.AccountSasSignatureValues -import com.azure.storage.common.sas.SasIpRange -import com.azure.storage.common.sas.SasProtocol +import com.azure.storage.common.sas.CommonSasQueryParameters import reactor.test.StepVerifier import spock.lang.Unroll import java.nio.ByteBuffer -import java.time.LocalDateTime import java.time.OffsetDateTime import java.time.ZoneOffset @@ -70,549 +61,57 @@ class HelperTest extends APISpec { 0 | -1 } - /* - This test will ensure that each field gets placed into the proper location within the string to sign and that null - values are handled correctly. We will validate the whole SAS with service calls as well as correct serialization of - individual parts later. - */ - - @Unroll - def "serviceSasSignatures string to sign"() { - when: - BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues() - if (permissions != null) { - v.setPermissions(new BlobSasPermission().setReadPermission(true)) - } else { - v.setPermissions(new BlobSasPermission()) - } - - v.setStartTime(startTime) - .setContainerName("containerName") - .setBlobName("blobName") - .setSnapshotId(snapId) - - if (expiryTime == null) { - v.setExpiryTime(OffsetDateTime.now()) - } else { - v.setExpiryTime(expiryTime) - } - - if (ipRange != null) { - v.setSasIpRange(new SasIpRange().setIpMin("ip")) - } - - v.setIdentifier(identifier) - .setProtocol(protocol) - .setCacheControl(cacheControl) - .setContentDisposition(disposition) - .setContentEncoding(encoding) - .setContentLanguage(language) - .setContentType(type) - - BlobServiceSasQueryParameters token = v.generateSasQueryParameters(primaryCredential) - - if (startTime != null) { - expectedStringToSign = String.format(expectedStringToSign, - Constants.ISO_8601_UTC_DATE_FORMATTER.format(startTime), - Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), - primaryCredential.getAccountName()) - } else { - expectedStringToSign = String.format(expectedStringToSign, - Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), - primaryCredential.getAccountName()) - } - - then: - token.getSignature() == primaryCredential.computeHmac256(expectedStringToSign) - - /* - We don't test the blob or containerName properties because canonicalized resource is always added as at least - /blob/accountName. We test canonicalization of resources later. Again, this is not to test a fully functional - sas but the construction of the string to sign. - Signed resource is tested elsewhere, as we work some minor magic in choosing which value to use. - */ - where: - permissions | startTime | expiryTime | identifier | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - new BlobSasPermission() | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | null || "r\n\n%s\n" + "/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | OffsetDateTime.now(ZoneOffset.UTC).minusDays(1) | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | null || "\n%s\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | "id" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\nid\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | new SasIpRange() | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\nip\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | "snapId" | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nbs\nsnapId\n\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | "control" | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\ncontrol\n\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | "disposition" | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\ndisposition\n\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | "encoding" | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\nencoding\n\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | "language" | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\nlanguage\n" - null | null | OffsetDateTime.now(ZoneOffset.UTC).plusDays(1) | null | null | null | null | null | null | null | null | "type" || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\ntype" - } - - @Unroll - def "serviceSasSignatures string to sign user delegation key"() { - when: - BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues() - if (permissions != null) { - v.setPermissions(new BlobSasPermission().setReadPermission(true)) - } else { - v.setPermissions(new BlobSasPermission()) - } - - v.setStartTime(startTime) - .setContainerName("containerName") - .setBlobName("blobName") - .setSnapshotId(snapId) - - if (expiryTime == null) { - v.setExpiryTime(OffsetDateTime.now()) - } else { - v.setExpiryTime(expiryTime) - } - - if (ipRange != null) { - v.setSasIpRange(new SasIpRange().setIpMin("ip")) - } - - v.setProtocol(protocol) - .setCacheControl(cacheControl) - .setContentDisposition(disposition) - .setContentEncoding(encoding) - .setContentLanguage(language) - .setContentType(type) - - UserDelegationKey key = new UserDelegationKey() - .setSignedObjectId(keyOid) - .setSignedTenantId(keyTid) - .setSignedStart(keyStart) - .setSignedExpiry(keyExpiry) - .setSignedService(keyService) - .setSignedVersion(keyVersion) - .setValue(keyValue) - - BlobServiceSasQueryParameters token = v.generateSasQueryParameters(key, primaryCredential.getAccountName()) - - expectedStringToSign = String.format(expectedStringToSign, Constants.ISO_8601_UTC_DATE_FORMATTER.format(v.getExpiryTime()), primaryCredential.getAccountName()) - - then: - token.getSignature() == StorageImplUtils.computeHMac256(key.getValue(), expectedStringToSign) - - /* - We test string to sign functionality directly related to user delegation sas specific parameters - */ - where: - permissions | startTime | expiryTime | keyOid | keyTid | keyStart | keyExpiry | keyService | keyVersion | keyValue | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign - new BlobSasPermission() | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n%s\n" + "/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | "22222222-2222-2222-2222-222222222222" | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n22222222-2222-2222-2222-222222222222\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\nb\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new SasIpRange() | null | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nip\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nbs\nsnapId\n\n\n\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\ncontrol\n\n\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\ndisposition\n\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | null | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\nencoding\n\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | "language" | null || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\nlanguage\n" - null | null | null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "\n\n%s\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\ntype" - } - - @Unroll - def "serviceSASSignatureValues canonicalizedResource"() { - setup: - BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues() - .setExpiryTime(expiryTime) - .setPermissions(new BlobSasPermission()) - .setContainerName(containerName) - .setSnapshotId(snapId) - - if (blobName != null) { - v.setBlobName(blobName) - } - - expectedStringToSign = String.format(expectedStringToSign, - Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiryTime), - primaryCredential.getAccountName()) - - when: - BlobServiceSasQueryParameters token = v.generateSasQueryParameters(primaryCredential) - - then: - token.getSignature() == primaryCredential.computeHmac256(expectedStringToSign) - token.getResource() == expectedResource - - where: - containerName | blobName | snapId | expiryTime || expectedResource | expectedStringToSign - "c" | "b" | "id" | OffsetDateTime.now() || "bs" | "\n\n%s\n" + "/blob/%s/c/b\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nbs\nid\n\n\n\n\n" - "c" | "b" | null | OffsetDateTime.now() || "b" | "\n\n%s\n" + "/blob/%s/c/b\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nb\n\n\n\n\n\n" - "c" | null | null | OffsetDateTime.now() || "c" | "\n\n%s\n" + "/blob/%s/c\n\n\n\n" + BlobSasServiceVersion.getLatest().getVersion() + "\nc\n\n\n\n\n\n" - } - - def "serviceSasSignatureValues IA"() { - setup: - def v = new BlobServiceSasSignatureValues() - .setPermissions(new BlobSasPermission()) - .setExpiryTime(OffsetDateTime.now()) - .setBlobName("b") - .setSnapshotId("2018-01-01T00:00:00.0000000Z") - - when: - v.generateSasQueryParameters(null) - - then: - def e = thrown(NullPointerException) - e.getMessage().contains("storageSharedKeyCredentials") - } - - @Unroll - def "BlobSASPermissions toString"() { - setup: - BlobSasPermission perms = new BlobSasPermission() - .setReadPermission(read) - .setWritePermission(write) - .setDeletePermission(delete) - .setCreatePermission(create) - .setAddPermission(add) - .setDeleteVersionPermission(deleteVersion) - - expect: - perms.toString() == expectedString - - where: - read | write | delete | create | add | deleteVersion || expectedString - true | false | false | false | false | false | "r" - false | true | false | false | false | false | "w" - false | false | true | false | false | false | "d" - false | false | false | true | false | false | "c" - false | false | false | false | true | false | "a" - false | false | false | false | false | true | "x" - true | true | true | true | true | true | "racwdx" - } - - @Unroll - def "BlobSASPermissions parse"() { - when: - BlobSasPermission perms = BlobSasPermission.parse(permString) - - then: - perms.hasReadPermission() == read - perms.hasWritePermission() == write - perms.hasDeletePermission() == delete - perms.hasCreatePermission() == create - perms.hasAddPermission() == add - perms.hasDeleteVersionPermission() == deleteVersion - - where: - permString || read | write | delete | create | add | deleteVersion - "r" || true | false | false | false | false | false - "w" || false | true | false | false | false | false - "d" || false | false | true | false | false | false - "c" || false | false | false | true | false | false - "a" || false | false | false | false | true | false - "x" || false | false | false | false | false | true - "racwdx" || true | true | true | true | true | true - "dcwxra" || true | true | true | true | true | true - } - - def "BlobSASPermissions parse IA"() { - when: - BlobSasPermission.parse("rwaq") - - then: - thrown(IllegalArgumentException) - } - - @Unroll - def "ContainerSASPermissions toString"() { - setup: - BlobContainerSasPermission perms = new BlobContainerSasPermission() - .setReadPermission(read) - .setWritePermission(write) - .setDeletePermission(delete) - .setCreatePermission(create) - .setAddPermission(add) - .setListPermission(list) - .setDeleteVersionPermission(deleteVersion) - - expect: - perms.toString() == expectedString - - where: - read | write | delete | create | add | list | deleteVersion || expectedString - true | false | false | false | false | false | false || "r" - false | true | false | false | false | false | false || "w" - false | false | true | false | false | false | false || "d" - false | false | false | true | false | false | false || "c" - false | false | false | false | true | false | false || "a" - false | false | false | false | false | true | false || "l" - false | false | false | false | false | false | true || "x" - true | true | true | true | true | true | true || "racwdxl" - } - - @Unroll - def "ContainerSASPermissions parse"() { - when: - BlobContainerSasPermission perms = BlobContainerSasPermission.parse(permString) - - then: - perms.hasReadPermission() == read - perms.hasWritePermission() == write - perms.hasDeletePermission() == delete - perms.hasCreatePermission() == create - perms.hasAddPermission() == add - perms.hasListPermission() == list - perms.hasDeleteVersionPermission() == deleteVersion - - where: - permString || read | write | delete | create | add | list | deleteVersion - "r" || true | false | false | false | false | false | false - "w" || false | true | false | false | false | false | false - "d" || false | false | true | false | false | false | false - "c" || false | false | false | true | false | false | false - "a" || false | false | false | false | true | false | false - "l" || false | false | false | false | false | true | false - "x" || false | false | false | false | false | false | true - "racwdxl" || true | true | true | true | true | true | true - "dcwxrla" || true | true | true | true | true | true | true - } - - def "ContainerSASPermissions parse IA"() { - when: - BlobContainerSasPermission.parse("rwaq") - - then: - thrown(IllegalArgumentException) - } - - @Unroll - def "IPRange toString"() { - setup: - def ip = new SasIpRange() - .setIpMin(min) - .setIpMax(max) - - expect: - ip.toString() == expectedString - - where: - min | max || expectedString - "a" | "b" || "a-b" - "a" | null || "a" - null | "b" || "" - } - - @Unroll - def "IPRange parse"() { - when: - SasIpRange ip = SasIpRange.parse(rangeStr) - - then: - ip.getIpMin() == min - ip.getIpMax() == max - - where: - rangeStr || min | max - "a-b" || "a" | "b" - "a" || "a" | null - "" || "" | null - } - - @Unroll - def "SASProtocol parse"() { - expect: - SasProtocol.parse(protocolStr) == protocol - - where: - protocolStr || protocol - "https" || SasProtocol.HTTPS_ONLY - "https,http" || SasProtocol.HTTPS_HTTP - } - - /* - This test will ensure that each field gets placed into the proper location within the string to sign and that null - values are handled correctly. We will validate the whole SAS with service calls as well as correct serialization of - individual parts later. - */ - - @Unroll - def "accountSasSignatures string to sign"() { - when: - AccountSasSignatureValues v = new AccountSasSignatureValues() - .setPermissions(new AccountSasPermission().setReadPermission(true)) - .setServices("b") - .setResourceTypes("o") - .setStartTime(startTime) - .setExpiryTime(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) - .setProtocol(protocol) - - if (ipRange != null) { - v.setSasIpRange(new SasIpRange().setIpMin("ip")) - } - - def token = v.generateSasQueryParameters(primaryCredential) - - expectedStringToSign = String.format(expectedStringToSign, primaryCredential.getAccountName()) - - then: - token.getSignature() == primaryCredential.computeHmac256(expectedStringToSign) - - where: - startTime | ipRange | protocol || expectedStringToSign - OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null || "%s\nr\nb\no\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - null | new SasIpRange() | null || "%s\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - null | null | SasProtocol.HTTPS_ONLY || "%s\nr\nb\no\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\n" - } - - @Unroll - def "accountSasSignatureValues IA"() { - setup: - AccountSasPermission sasPermission = null - if (permissions != null) { - sasPermission = AccountSasPermission.parse(permissions) - } - - AccountSasSignatureValues v = new AccountSasSignatureValues() - .setServices(service) - .setResourceTypes(resourceType) - .setExpiryTime(expiryTime) - .setVersion(version) - - if (sasPermission != null) { - v.setPermissions(sasPermission) - } - - when: - v.generateSasQueryParameters(creds) - - then: - def e = thrown(NullPointerException) - e.getMessage().contains(parameter) - - where: - permissions | service | resourceType | expiryTime | version | creds || parameter - null | "b" | "c" | OffsetDateTime.now() | "v" | primaryCredential || "permissions" - "c" | null | "c" | OffsetDateTime.now() | "v" | primaryCredential || "services" - "c" | "b" | null | OffsetDateTime.now() | "v" | primaryCredential || "resourceTypes" - "c" | "b" | "c" | null | "v" | primaryCredential || "expiryTime" - "c" | "b" | "c" | OffsetDateTime.now() | "v" | null || "storageSharedKeyCredentials" - } - - @Unroll - def "AccountSASPermissions toString"() { - setup: - AccountSasPermission perms = new AccountSasPermission() - .setReadPermission(read) - .setWritePermission(write) - .setDeletePermission(delete) - .setListPermission(list) - .setAddPermission(add) - .setCreatePermission(create) - .setUpdatePermission(update) - .setProcessMessages(process) - .setDeleteVersionPermission(deleteVersion) - - expect: - perms.toString() == expectedString - - where: - read | write | delete | list | add | create | update | process | deleteVersion || expectedString - true | false | false | false | false | false | false | false | false || "r" - false | true | false | false | false | false | false | false | false || "w" - false | false | true | false | false | false | false | false | false || "d" - false | false | false | true | false | false | false | false | false || "l" - false | false | false | false | true | false | false | false | false || "a" - false | false | false | false | false | true | false | false | false || "c" - false | false | false | false | false | false | true | false | false || "u" - false | false | false | false | false | false | false | true | false || "p" - false | false | false | false | false | false | false | false | true || "x" - true | true | true | true | true | true | true | true | true || "rwdxlacup" - } - - @Unroll - def "AccountSASPermissions parse"() { + def "URLParser"() { when: - AccountSasPermission perms = AccountSasPermission.parse(permString) + def parts = BlobUrlParts.parse(new URL("http://host/container/" + originalBlobName + "?snapshot=snapshot&sv=" + BlobSasServiceVersion.getLatest().getVersion() + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) then: - perms.hasReadPermission() == read - perms.hasWritePermission() == write - perms.hasDeletePermission() == delete - perms.hasListPermission() == list - perms.hasAddPermission() == add - perms.hasCreatePermission() == create - perms.hasUpdatePermission() == update - perms.hasProcessMessages() == process - perms.hasDeleteVersionPermission() == deleteVersion + parts.getScheme() == "http" + parts.getHost() == "host" + parts.getBlobContainerName() == "container" + parts.getBlobName() == finalBlobName + parts.getSnapshot() == "snapshot" + parts.getCommonSasQueryParameters().getPermissions() == "r" + parts.getCommonSasQueryParameters().getVersion() == BlobSasServiceVersion.getLatest().getVersion() + parts.getCommonSasQueryParameters().getResource() == "c" + parts.getCommonSasQueryParameters().getSignature() == Utility.urlDecode("Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D") where: - permString || read | write | delete | list | add | create | update | process | deleteVersion - "r" || true | false | false | false | false | false | false | false | false - "w" || false | true | false | false | false | false | false | false | false - "d" || false | false | true | false | false | false | false | false | false - "l" || false | false | false | true | false | false | false | false | false - "a" || false | false | false | false | true | false | false | false | false - "c" || false | false | false | false | false | true | false | false | false - "u" || false | false | false | false | false | false | true | false | false - "p" || false | false | false | false | false | false | false | true | false - "x" || false | false | false | false | false | false | false | false | true - "rwdxlacup" || true | true | true | true | true | true | true | true | true - "lwrupcxad" || true | true | true | true | true | true | true | true | true + originalBlobName | finalBlobName + "blob" | "blob" + "path/to]a blob" | "path/to]a blob" + "path%2Fto%5Da%20blob" | "path/to]a blob" + "斑點" | "斑點" + "%E6%96%91%E9%BB%9E" | "斑點" } - def "AccountSASPermissions parse IA"() { - when: - AccountSasPermission.parse("rwaq") - - then: - thrown(IllegalArgumentException) - } - - @Unroll - def "AccountSASResourceType toString"() { + def "BlobURLParts"() { setup: - AccountSasResourceType resourceTypes = new AccountSasResourceType() - .setService(service) - .setContainer(container) - .setObject(object) - - expect: - resourceTypes.toString() == expectedString - - where: - service | container | object || expectedString - true | false | false || "s" - false | true | false || "c" - false | false | true || "o" - true | true | true || "sco" - } + def parts = new BlobUrlParts() + parts.setScheme("http") + .setHost("host") + .setContainerName("container") + .setBlobName("blob") + .setSnapshot("snapshot") + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = new BlobSasPermission().setReadPermission(true) + def sasValues = new BlobServiceSasSignatureValues(e, p) - @Unroll - def "AccountSASResourceType parse"() { - when: - AccountSasResourceType resourceTypes = AccountSasResourceType.parse(resourceTypeString) + def implUtil = new BlobSasImplUtil(sasValues, "containerName", "blobName", "snapshot", null) + def sas = implUtil.generateSas(primaryCredential) - then: - resourceTypes.isService() == service - resourceTypes.isContainer() == container - resourceTypes.isObject() == object + parts.setCommonSasQueryParameters(new CommonSasQueryParameters(BlobUrlParts.parseQueryString(sas), true)) - where: - resourceTypeString || service | container | object - "s" || true | false | false - "c" || false | true | false - "o" || false | false | true - "sco" || true | true | true - } - - @Unroll - def "AccountSASResourceType IA"() { when: - AccountSasResourceType.parse("scq") + def splitParts = parts.toUrl().toString().split("\\?") then: - thrown(IllegalArgumentException) + splitParts.size() == 2 // Ensure that there is only one question mark even when sas and snapshot are present + splitParts[0] == "http://host/container/blob" + splitParts[1].contains("snapshot=snapshot") + splitParts[1].contains("sp=r") + splitParts[1].contains("sig=") + splitParts[1].split("&").size() == 6 // snapshot & sv & sr & sp & sig } def "BlobURLParts implicit root"() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy index db3e92326af0..4e24be5e39e9 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/LeaseAPITest.groovy @@ -3,12 +3,17 @@ package com.azure.storage.blob.specialized -import com.azure.core.http.RequestConditions import com.azure.storage.blob.APISpec +import com.azure.storage.blob.models.BlobLeaseRequestConditions import com.azure.storage.blob.models.LeaseDurationType import com.azure.storage.blob.models.LeaseStateType import com.azure.storage.blob.models.BlobStorageException +import com.azure.storage.blob.options.BlobAcquireLeaseOptions +import com.azure.storage.blob.options.BlobBreakLeaseOptions +import com.azure.storage.blob.options.BlobChangeLeaseOptions +import com.azure.storage.blob.options.BlobReleaseLeaseOptions +import com.azure.storage.blob.options.BlobRenewLeaseOptions import spock.lang.Unroll class LeaseAPITest extends APISpec { @@ -51,7 +56,7 @@ class LeaseAPITest extends APISpec { def "Acquire blob lease min"() { expect: createLeaseClient(createBlobClient()) - .acquireLeaseWithResponse(-1, null, null, null) + .acquireLeaseWithResponse(new BlobAcquireLeaseOptions(-1), null, null) .getStatusCode() == 201 } @@ -77,25 +82,30 @@ class LeaseAPITest extends APISpec { def "Acquire blob lease AC"() { setup: def bc = createBlobClient() + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) expect: createLeaseClient(bc) - .acquireLeaseWithResponse(-1, mac, null, null) + .acquireLeaseWithResponse(new BlobAcquireLeaseOptions(-1).setRequestConditions(mac), null, null) .getStatusCode() == 201 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch | tags + null | null | null | null | null + oldDate | null | null | null | null + null | newDate | null | null | null + null | null | receivedEtag | null | null + null | null | null | garbageEtag | null + null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -103,24 +113,26 @@ class LeaseAPITest extends APISpec { setup: def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) when: - createLeaseClient(bc).acquireLeaseWithResponse(-1, mac, null, null) + createLeaseClient(bc).acquireLeaseWithResponse(new BlobAcquireLeaseOptions(-1).setRequestConditions(mac), null, null) then: thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch | tags + newDate | null | null | null | null + null | oldDate | null | null | null + null | null | garbageEtag | null | null + null | null | null | receivedEtag | null + null | null | null | null | "\"notfoo\" = 'notbar'" } def "Acquire blob lease error"() { @@ -141,7 +153,7 @@ class LeaseAPITest extends APISpec { // If running in live mode wait for the lease to expire to ensure we are actually renewing it sleepIfRecord(16000) - def renewLeaseResponse = createLeaseClient(bc, leaseID).renewLeaseWithResponse(null, null, null) + def renewLeaseResponse = createLeaseClient(bc, leaseID).renewLeaseWithResponse(new BlobRenewLeaseOptions(), null, null) expect: bc.getProperties().getLeaseState() == LeaseStateType.LEASED @@ -156,7 +168,7 @@ class LeaseAPITest extends APISpec { expect: createLeaseClient(bc, leaseID) - .renewLeaseWithResponse(null, null, null) + .renewLeaseWithResponse(new BlobRenewLeaseOptions(), null, null) .getStatusCode() == 200 } @@ -164,26 +176,31 @@ class LeaseAPITest extends APISpec { def "Renew blob lease AC"() { setup: def bc = createBlobClient() + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) expect: createLeaseClient(bc, leaseID) - .renewLeaseWithResponse(mac, null, null) + .renewLeaseWithResponse(new BlobRenewLeaseOptions().setRequestConditions(mac), null, null) .getStatusCode() == 200 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch | tags + null | null | null | null | null + oldDate | null | null | null | null + null | newDate | null | null | null + null | null | receivedEtag | null | null + null | null | null | garbageEtag | null + null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -192,24 +209,26 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) when: - createLeaseClient(bc, leaseID).renewLeaseWithResponse(mac, null, null) + createLeaseClient(bc, leaseID).renewLeaseWithResponse(new BlobRenewLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch | tags + newDate | null | null | null | null + null | oldDate | null | null | null + null | null | garbageEtag | null | null + null | null | null | receivedEtag | null + null | null | null | null | "\"notfoo\" = 'notbar'" } def "Renew blob lease error"() { @@ -227,7 +246,7 @@ class LeaseAPITest extends APISpec { setup: def bc = createBlobClient() def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def headers = createLeaseClient(bc, leaseID).releaseLeaseWithResponse(null, null, null).getHeaders() + def headers = createLeaseClient(bc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions(), null, null).getHeaders() expect: bc.getProperties().getLeaseState() == LeaseStateType.AVAILABLE @@ -240,31 +259,36 @@ class LeaseAPITest extends APISpec { def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) expect: - createLeaseClient(bc, leaseID).releaseLeaseWithResponse(null, null, null).getStatusCode() == 200 + createLeaseClient(bc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions(), null, null).getStatusCode() == 200 } @Unroll def "Release blob lease AC"() { setup: def bc = createBlobClient() + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) expect: - createLeaseClient(bc, leaseID).releaseLeaseWithResponse(mac, null, null).getStatusCode() == 200 + createLeaseClient(bc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions().setRequestConditions(mac), null, null).getStatusCode() == 200 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch | tags + null | null | null | null | null + oldDate | null | null | null | null + null | newDate | null | null | null + null | null | receivedEtag | null | null + null | null | null | garbageEtag | null + null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -273,24 +297,26 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) when: - createLeaseClient(bc, leaseID).releaseLeaseWithResponse(mac, null, null) + createLeaseClient(bc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch | tags + newDate | null | null | null | null + null | oldDate | null | null | null + null | null | garbageEtag | null | null + null | null | null | receivedEtag | null + null | null | null | null | "\"notfoo\" = 'notbar'" } def "Release blob lease error"() { @@ -312,7 +338,7 @@ class LeaseAPITest extends APISpec { when: leaseClient.acquireLease(leaseTime) - def breakLeaseResponse = leaseClient.breakLeaseWithResponse(breakPeriod, null, null, null) + def breakLeaseResponse = leaseClient.breakLeaseWithResponse(new BlobBreakLeaseOptions().setBreakPeriodInSeconds(breakPeriod), null, null) def leaseState = bc.getProperties().getLeaseState() then: @@ -333,31 +359,36 @@ class LeaseAPITest extends APISpec { setupBlobLeaseCondition(bc, receivedLeaseID) expect: - createLeaseClient(bc).breakLeaseWithResponse(null, null, null, null).getStatusCode() == 202 + createLeaseClient(bc).breakLeaseWithResponse(new BlobBreakLeaseOptions(), null, null).getStatusCode() == 202 } @Unroll def "Break blob lease AC"() { setup: def bc = createBlobClient() + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) expect: - createLeaseClient(bc).breakLeaseWithResponse(null, mac, null, null).getStatusCode() == 202 + createLeaseClient(bc).breakLeaseWithResponse(new BlobBreakLeaseOptions().setRequestConditions(mac), null, null).getStatusCode() == 202 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch | tags + null | null | null | null | null + oldDate | null | null | null | null + null | newDate | null | null | null + null | null | receivedEtag | null | null + null | null | null | garbageEtag | null + null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -366,24 +397,26 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) when: - createLeaseClient(bc).breakLeaseWithResponse(null, mac, null, null) + createLeaseClient(bc).breakLeaseWithResponse(new BlobBreakLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch | tags + newDate | null | null | null | null + null | oldDate | null | null | null + null | null | garbageEtag | null | null + null | null | null | receivedEtag | null + null | null | null | null | "\"notfoo\" = 'notbar'" } def "Break blob lease error"() { @@ -402,11 +435,11 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() def leaseClient = createLeaseClient(bc, getRandomUUID()) leaseClient.acquireLease(15) - def changeLeaseResponse = leaseClient.changeLeaseWithResponse(getRandomUUID(), null, null, null) + def changeLeaseResponse = leaseClient.changeLeaseWithResponse(new BlobChangeLeaseOptions(getRandomUUID()), null, null) def leaseClient2 = createLeaseClient(bc, changeLeaseResponse.getValue()) expect: - leaseClient2.releaseLeaseWithResponse(null, null, null).getStatusCode() == 200 + leaseClient2.releaseLeaseWithResponse(new BlobReleaseLeaseOptions(), null, null).getStatusCode() == 200 validateBasicHeaders(changeLeaseResponse.getHeaders()) } @@ -416,31 +449,36 @@ class LeaseAPITest extends APISpec { def leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) expect: - createLeaseClient(bc, leaseID).changeLeaseWithResponse(getRandomUUID(), null, null, null).getStatusCode() == 200 + createLeaseClient(bc, leaseID).changeLeaseWithResponse(new BlobChangeLeaseOptions(getRandomUUID()), null, null).getStatusCode() == 200 } @Unroll def "Change blob lease AC"() { setup: def bc = createBlobClient() + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) String leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) expect: - createLeaseClient(bc, leaseID).changeLeaseWithResponse(getRandomUUID(), mac, null, null).getStatusCode() == 200 + createLeaseClient(bc, leaseID).changeLeaseWithResponse(new BlobChangeLeaseOptions(getRandomUUID()).setRequestConditions(mac), null, null).getStatusCode() == 200 where: - modified | unmodified | match | noneMatch - null | null | null | null - oldDate | null | null | null - null | newDate | null | null - null | null | receivedEtag | null - null | null | null | garbageEtag + modified | unmodified | match | noneMatch | tags + null | null | null | null | null + oldDate | null | null | null | null + null | newDate | null | null | null + null | null | receivedEtag | null | null + null | null | null | garbageEtag | null + null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -449,24 +487,26 @@ class LeaseAPITest extends APISpec { def bc = createBlobClient() noneMatch = setupBlobMatchCondition(bc, noneMatch) String leaseID = setupBlobLeaseCondition(bc, receivedLeaseID) - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) + .setTagsConditions(tags) when: - createLeaseClient(bc, leaseID).changeLeaseWithResponse(getRandomUUID(), mac, null, null) + createLeaseClient(bc, leaseID).changeLeaseWithResponse(new BlobChangeLeaseOptions(getRandomUUID()).setRequestConditions(mac), null, null) then: thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch - newDate | null | null | null - null | oldDate | null | null - null | null | garbageEtag | null - null | null | null | receivedEtag + modified | unmodified | match | noneMatch | tags + newDate | null | null | null | null + null | oldDate | null | null | null + null | null | garbageEtag | null | null + null | null | null | receivedEtag | null + null | null | null | null | "\"notfoo\" = 'notbar'" } def "Change blob lease error"() { @@ -484,7 +524,7 @@ class LeaseAPITest extends APISpec { @Unroll def "Acquire container lease"() { setup: - def leaseResponse = createLeaseClient(cc, proposedID).acquireLeaseWithResponse(leaseTime, null, null, null) + def leaseResponse = createLeaseClient(cc, proposedID).acquireLeaseWithResponse(new BlobAcquireLeaseOptions(leaseTime), null, null) when: def properties = cc.getProperties() @@ -504,7 +544,7 @@ class LeaseAPITest extends APISpec { def "Acquire container lease min"() { expect: - createLeaseClient(cc).acquireLeaseWithResponse(-1, null, null, null).getStatusCode() == 201 + createLeaseClient(cc).acquireLeaseWithResponse(new BlobAcquireLeaseOptions(-1), null, null).getStatusCode() == 201 } @Unroll @@ -528,14 +568,14 @@ class LeaseAPITest extends APISpec { @Unroll def "Acquire container lease AC"() { setup: - def mac = new RequestConditions() + def mac = new BlobLeaseRequestConditions() .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) .setIfMatch(match) .setIfNoneMatch(noneMatch) expect: - createLeaseClient(cc).acquireLeaseWithResponse(-1, mac, null, null).getStatusCode() == 201 + createLeaseClient(cc).acquireLeaseWithResponse(new BlobAcquireLeaseOptions(-1).setRequestConditions(mac), null, null).getStatusCode() == 201 where: modified | unmodified | match | noneMatch @@ -549,10 +589,10 @@ class LeaseAPITest extends APISpec { @Unroll def "Acquire container lease AC fail"() { setup: - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: - createLeaseClient(cc).acquireLeaseWithResponse(-1, mac, null, null) + createLeaseClient(cc).acquireLeaseWithResponse(new BlobAcquireLeaseOptions(-1).setRequestConditions(mac), null, null) then: thrown(BlobStorageException) @@ -580,7 +620,7 @@ class LeaseAPITest extends APISpec { // If running in live mode wait for the lease to expire to ensure we are actually renewing it sleepIfRecord(16000) - def renewLeaseResponse = createLeaseClient(cc, leaseID).renewLeaseWithResponse(null, null, null) + def renewLeaseResponse = createLeaseClient(cc, leaseID).renewLeaseWithResponse(new BlobRenewLeaseOptions(), null, null) expect: cc.getProperties().getLeaseState() == LeaseStateType.LEASED @@ -592,17 +632,17 @@ class LeaseAPITest extends APISpec { def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) expect: - createLeaseClient(cc, leaseID).renewLeaseWithResponse(null, null, null).getStatusCode() == 200 + createLeaseClient(cc, leaseID).renewLeaseWithResponse(new BlobRenewLeaseOptions(), null, null).getStatusCode() == 200 } @Unroll def "Renew container lease AC"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) expect: - createLeaseClient(cc, leaseID).renewLeaseWithResponse(mac, null, null).getStatusCode() == 200 + createLeaseClient(cc, leaseID).renewLeaseWithResponse(new BlobRenewLeaseOptions().setRequestConditions(mac), null, null).getStatusCode() == 200 where: modified | unmodified @@ -615,10 +655,10 @@ class LeaseAPITest extends APISpec { def "Renew container lease AC fail"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: - createLeaseClient(cc, leaseID).renewLeaseWithResponse(mac, null, null) + createLeaseClient(cc, leaseID).renewLeaseWithResponse(new BlobRenewLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) @@ -632,10 +672,10 @@ class LeaseAPITest extends APISpec { @Unroll def "Renew container lease AC illegal"() { setup: - def mac = new RequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new BlobLeaseRequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: - createLeaseClient(cc, receivedEtag).renewLeaseWithResponse(mac, null, null) + createLeaseClient(cc, receivedEtag).renewLeaseWithResponse(new BlobRenewLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) @@ -661,7 +701,7 @@ class LeaseAPITest extends APISpec { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def releaseLeaseResponse = createLeaseClient(cc, leaseID).releaseLeaseWithResponse(null, null, null) + def releaseLeaseResponse = createLeaseClient(cc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions(), null, null) expect: cc.getProperties().getLeaseState() == LeaseStateType.AVAILABLE @@ -673,17 +713,17 @@ class LeaseAPITest extends APISpec { def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) expect: - createLeaseClient(cc, leaseID).releaseLeaseWithResponse(null, null, null).getStatusCode() == 200 + createLeaseClient(cc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions(), null, null).getStatusCode() == 200 } @Unroll def "Release container lease AC"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) expect: - createLeaseClient(cc, leaseID).releaseLeaseWithResponse(mac, null, null).getStatusCode() == 200 + createLeaseClient(cc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions().setRequestConditions(mac), null, null).getStatusCode() == 200 where: modified | unmodified @@ -696,10 +736,10 @@ class LeaseAPITest extends APISpec { def "Release container lease AC fail"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: - createLeaseClient(cc, leaseID).releaseLeaseWithResponse(mac, null, null) + createLeaseClient(cc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) @@ -713,10 +753,10 @@ class LeaseAPITest extends APISpec { @Unroll def "Release container lease AC illegal"() { setup: - def mac = new RequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new BlobLeaseRequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: - createLeaseClient(cc, receivedLeaseID).releaseLeaseWithResponse(mac, null, null) + createLeaseClient(cc, receivedLeaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) @@ -744,7 +784,7 @@ class LeaseAPITest extends APISpec { def leaseClient = createLeaseClient(cc, getRandomUUID()) leaseClient.acquireLease(leaseTime) - def breakLeaseResponse = leaseClient.breakLeaseWithResponse(breakPeriod, null, null, null) + def breakLeaseResponse = leaseClient.breakLeaseWithResponse(new BlobBreakLeaseOptions().setBreakPeriodInSeconds(breakPeriod), null, null) def state = cc.getProperties().getLeaseState() expect: @@ -769,17 +809,17 @@ class LeaseAPITest extends APISpec { setupContainerLeaseCondition(cc, receivedLeaseID) expect: - createLeaseClient(cc).breakLeaseWithResponse(null, null, null, null).getStatusCode() == 202 + createLeaseClient(cc).breakLeaseWithResponse(new BlobBreakLeaseOptions(), null, null).getStatusCode() == 202 } @Unroll def "Break container lease AC"() { setup: setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) expect: - createLeaseClient(cc).breakLeaseWithResponse(null, mac, null, null).getStatusCode() == 202 + createLeaseClient(cc).breakLeaseWithResponse(new BlobBreakLeaseOptions().setRequestConditions(mac), null, null).getStatusCode() == 202 where: modified | unmodified @@ -792,10 +832,10 @@ class LeaseAPITest extends APISpec { def "Break container lease AC fail"() { setup: setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: - createLeaseClient(cc).breakLeaseWithResponse(null, mac, null, null) + createLeaseClient(cc).breakLeaseWithResponse(new BlobBreakLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) @@ -809,10 +849,10 @@ class LeaseAPITest extends APISpec { @Unroll def "Break container lease AC illegal"() { setup: - def mac = new RequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new BlobLeaseRequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: - createLeaseClient(cc).breakLeaseWithResponse(null, mac, null, null) + createLeaseClient(cc).breakLeaseWithResponse(new BlobBreakLeaseOptions().setRequestConditions(mac), null, null) then: thrown(BlobStorageException) @@ -838,11 +878,11 @@ class LeaseAPITest extends APISpec { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) def leaseClient = createLeaseClient(cc, leaseID) - def changeLeaseResponse = leaseClient.changeLeaseWithResponse(getRandomUUID(), null, null, null) + def changeLeaseResponse = leaseClient.changeLeaseWithResponse(new BlobChangeLeaseOptions(getRandomUUID()), null, null) leaseID = changeLeaseResponse.getValue() expect: - createLeaseClient(cc, leaseID).releaseLeaseWithResponse(null, null, null).getStatusCode() == 200 + createLeaseClient(cc, leaseID).releaseLeaseWithResponse(new BlobReleaseLeaseOptions(), null, null).getStatusCode() == 200 validateBasicHeaders(changeLeaseResponse.getHeaders()) } @@ -851,17 +891,17 @@ class LeaseAPITest extends APISpec { def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) expect: - createLeaseClient(cc, leaseID).changeLeaseWithResponse(getRandomUUID(), null, null, null).getStatusCode() == 200 + createLeaseClient(cc, leaseID).changeLeaseWithResponse(new BlobChangeLeaseOptions(getRandomUUID()), null, null).getStatusCode() == 200 } @Unroll def "Change container lease AC"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) expect: - createLeaseClient(cc, leaseID).changeLeaseWithResponse(getRandomUUID(), mac, null, null).getStatusCode() == 200 + createLeaseClient(cc, leaseID).changeLeaseWithResponse(new BlobChangeLeaseOptions(getRandomUUID()).setRequestConditions(mac), null, null).getStatusCode() == 200 where: modified | unmodified @@ -874,10 +914,10 @@ class LeaseAPITest extends APISpec { def "Change container lease AC fail"() { setup: def leaseID = setupContainerLeaseCondition(cc, receivedLeaseID) - def mac = new RequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) + def mac = new BlobLeaseRequestConditions().setIfModifiedSince(modified).setIfUnmodifiedSince(unmodified) when: - createLeaseClient(cc, leaseID).changeLeaseWithResponse(getRandomUUID(), mac, null, null) + createLeaseClient(cc, leaseID).changeLeaseWithResponse(new BlobChangeLeaseOptions(getRandomUUID()).setRequestConditions(mac), null, null) then: thrown(BlobStorageException) @@ -891,10 +931,10 @@ class LeaseAPITest extends APISpec { @Unroll def "Change container lease AC illegal"() { setup: - def mac = new RequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) + def mac = new BlobLeaseRequestConditions().setIfMatch(match).setIfNoneMatch(noneMatch) when: - createLeaseClient(cc, receivedLeaseID).changeLeaseWithResponse(garbageLeaseID, mac, null, null) + createLeaseClient(cc, receivedLeaseID).changeLeaseWithResponse(new BlobChangeLeaseOptions(garbageLeaseID).setRequestConditions(mac), null, null) then: thrown(BlobStorageException) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy index b986cb86c59e..67f79dfa7709 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/PageBlobAPITest.groovy @@ -13,6 +13,7 @@ import com.azure.storage.blob.models.BlobRange import com.azure.storage.blob.models.BlobRequestConditions import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.CopyStatusType +import com.azure.storage.blob.options.BlobGetTagsOptions import com.azure.storage.blob.options.PageBlobCreateOptions import com.azure.storage.blob.models.PageBlobRequestConditions import com.azure.storage.blob.models.PageRange @@ -128,7 +129,7 @@ class PageBlobAPITest extends APISpec { when: bc.createWithResponse(new PageBlobCreateOptions(PageBlobClient.PAGE_BYTES).setTags(tags), null, null) - def response = bc.getTagsWithResponse(null, null) + def response = bc.getTagsWithResponse(new BlobGetTagsOptions(), null, null) then: response.getStatusCode() == 200 @@ -144,25 +145,30 @@ class PageBlobAPITest extends APISpec { @Unroll def "Create AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) def bac = new BlobRequestConditions() .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) .setIfMatch(setupBlobMatchCondition(bc, match)) .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) expect: bc.createWithResponse(PageBlobClient.PAGE_BYTES, null, null, null, bac, null, null).getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -174,6 +180,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.createWithResponse(PageBlobClient.PAGE_BYTES, null, null, null, bac, null, null) @@ -182,12 +189,13 @@ class PageBlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Create error"() { @@ -258,6 +266,9 @@ class PageBlobAPITest extends APISpec { @Unroll def "Upload page AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) def pac = new PageBlobRequestConditions() .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) .setIfMatch(setupBlobMatchCondition(bc, match)) @@ -267,6 +278,7 @@ class PageBlobAPITest extends APISpec { .setIfSequenceNumberLessThan(sequenceNumberLT) .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) .setIfSequenceNumberEqualTo(sequenceNumberEqual) + .setTagsConditions(tags) expect: bc.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), @@ -274,16 +286,17 @@ class PageBlobAPITest extends APISpec { .getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual - null | null | null | null | null | null | null | null - oldDate | null | null | null | null | null | null | null - null | newDate | null | null | null | null | null | null - null | null | receivedEtag | null | null | null | null | null - null | null | null | garbageEtag | null | null | null | null - null | null | null | null | receivedLeaseID | null | null | null - null | null | null | null | null | 5 | null | null - null | null | null | null | null | null | 3 | null - null | null | null | null | null | null | null | 0 + modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual | tags + null | null | null | null | null | null | null | null | null + oldDate | null | null | null | null | null | null | null | null + null | newDate | null | null | null | null | null | null | null + null | null | receivedEtag | null | null | null | null | null | null + null | null | null | garbageEtag | null | null | null | null | null + null | null | null | null | receivedLeaseID | null | null | null | null + null | null | null | null | null | 5 | null | null | null + null | null | null | null | null | null | 3 | null | null + null | null | null | null | null | null | null | 0 | null + null | null | null | null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -300,6 +313,7 @@ class PageBlobAPITest extends APISpec { .setIfSequenceNumberLessThan(sequenceNumberLT) .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) .setIfSequenceNumberEqualTo(sequenceNumberEqual) + .setTagsConditions(tags) when: bc.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(PageBlobClient.PAGE_BYTES - 1), @@ -309,15 +323,16 @@ class PageBlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual - newDate | null | null | null | null | null | null | null - null | oldDate | null | null | null | null | null | null - null | null | garbageEtag | null | null | null | null | null - null | null | null | receivedEtag | null | null | null | null - null | null | null | null | garbageLeaseID | null | null | null - null | null | null | null | null | -1 | null | null - null | null | null | null | null | null | -1 | null - null | null | null | null | null | null | null | 100 + modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual | tags + newDate | null | null | null | null | null | null | null | null + null | oldDate | null | null | null | null | null | null | null + null | null | garbageEtag | null | null | null | null | null | null + null | null | null | receivedEtag | null | null | null | null | null + null | null | null | null | garbageLeaseID | null | null | null | null + null | null | null | null | null | -1 | null | null | null + null | null | null | null | null | null | -1 | null | null + null | null | null | null | null | null | null | 100 | null + null | null | null | null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Upload page error"() { @@ -418,6 +433,9 @@ class PageBlobAPITest extends APISpec { @Unroll def "Upload page from URL destination AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) cc.setAccessPolicy(PublicAccessType.CONTAINER, null) def sourceURL = cc.getBlobClient(generateBlobName()).getPageBlobClient() sourceURL.create(PageBlobClient.PAGE_BYTES) @@ -433,21 +451,23 @@ class PageBlobAPITest extends APISpec { .setIfSequenceNumberLessThan(sequenceNumberLT) .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) .setIfSequenceNumberEqualTo(sequenceNumberEqual) + .setTagsConditions(tags) expect: bc.uploadPagesFromUrlWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null).getStatusCode() == 201 where: - modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual - null | null | null | null | null | null | null | null - oldDate | null | null | null | null | null | null | null - null | newDate | null | null | null | null | null | null - null | null | receivedEtag | null | null | null | null | null - null | null | null | garbageEtag | null | null | null | null - null | null | null | null | receivedLeaseID | null | null | null - null | null | null | null | null | 5 | null | null - null | null | null | null | null | null | 3 | null - null | null | null | null | null | null | null | 0 + modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual | tags + null | null | null | null | null | null | null | null | null + oldDate | null | null | null | null | null | null | null | null + null | newDate | null | null | null | null | null | null | null + null | null | receivedEtag | null | null | null | null | null | null + null | null | null | garbageEtag | null | null | null | null | null + null | null | null | null | receivedLeaseID | null | null | null | null + null | null | null | null | null | 5 | null | null | null + null | null | null | null | null | null | 3 | null | null + null | null | null | null | null | null | null | 0 | null + null | null | null | null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -470,6 +490,7 @@ class PageBlobAPITest extends APISpec { .setIfSequenceNumberLessThan(sequenceNumberLT) .setIfSequenceNumberLessThanOrEqualTo(sequenceNumberLTE) .setIfSequenceNumberEqualTo(sequenceNumberEqual) + .setTagsConditions(tags) when: bc.uploadPagesFromUrlWithResponse(pageRange, sourceURL.getBlobUrl(), null, null, pac, null, null, null) @@ -478,15 +499,16 @@ class PageBlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual - newDate | null | null | null | null | null | null | null - null | oldDate | null | null | null | null | null | null - null | null | garbageEtag | null | null | null | null | null - null | null | null | receivedEtag | null | null | null | null - null | null | null | null | garbageLeaseID | null | null | null - null | null | null | null | null | -1 | null | null - null | null | null | null | null | null | -1 | null - null | null | null | null | null | null | null | 100 + modified | unmodified | match | noneMatch | leaseID | sequenceNumberLT | sequenceNumberLTE | sequenceNumberEqual | tags + newDate | null | null | null | null | null | null | null | null + null | oldDate | null | null | null | null | null | null | null + null | null | garbageEtag | null | null | null | null | null | null + null | null | null | receivedEtag | null | null | null | null | null + null | null | null | null | garbageLeaseID | null | null | null | null + null | null | null | null | null | -1 | null | null | null + null | null | null | null | null | null | -1 | null | null + null | null | null | null | null | null | null | 100 | null + null | null | null | null | null | null | null | null | "\"notfoo\" = 'notbar'" } @Unroll @@ -673,6 +695,9 @@ class PageBlobAPITest extends APISpec { @Unroll def "Get page ranges AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) match = setupBlobMatchCondition(bc, match) leaseID = setupBlobLeaseCondition(bc, leaseID) def bac = new BlobRequestConditions() @@ -681,7 +706,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) - + .setTagsConditions(tags) when: bc.getPageRangesWithResponse(new BlobRange(0, PageBlobClient.PAGE_BYTES), bac, null, null) @@ -690,13 +715,14 @@ class PageBlobAPITest extends APISpec { notThrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -708,6 +734,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.getPageRangesWithResponse(new BlobRange(0, PageBlobClient.PAGE_BYTES), bac, null, null) @@ -716,12 +743,13 @@ class PageBlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Get page ranges error"() { @@ -777,6 +805,9 @@ class PageBlobAPITest extends APISpec { @Unroll def "Get page ranges diff AC"() { setup: + def t = new HashMap() + t.put("foo", "bar") + bc.setTags(t) def snapId = bc.createSnapshot().getSnapshotId() def bac = new BlobRequestConditions() .setLeaseId(setupBlobLeaseCondition(bc, leaseID)) @@ -784,6 +815,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(noneMatch) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.getPageRangesDiffWithResponse(new BlobRange(0, PageBlobClient.PAGE_BYTES), snapId, bac, null, null) @@ -792,13 +824,14 @@ class PageBlobAPITest extends APISpec { notThrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - null | null | null | null | null - oldDate | null | null | null | null - null | newDate | null | null | null - null | null | receivedEtag | null | null - null | null | null | garbageEtag | null - null | null | null | null | receivedLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + null | null | null | null | null | null + oldDate | null | null | null | null | null + null | newDate | null | null | null | null + null | null | receivedEtag | null | null | null + null | null | null | garbageEtag | null | null + null | null | null | null | receivedLeaseID | null + null | null | null | null | null | "\"foo\" = 'bar'" } @Unroll @@ -812,6 +845,7 @@ class PageBlobAPITest extends APISpec { .setIfNoneMatch(setupBlobMatchCondition(bc, noneMatch)) .setIfModifiedSince(modified) .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags) when: bc.getPageRangesDiffWithResponse(new BlobRange(0, PageBlobClient.PAGE_BYTES), snapId, bac, null, null) @@ -820,12 +854,13 @@ class PageBlobAPITest extends APISpec { thrown(BlobStorageException) where: - modified | unmodified | match | noneMatch | leaseID - newDate | null | null | null | null - null | oldDate | null | null | null - null | null | garbageEtag | null | null - null | null | null | receivedEtag | null - null | null | null | null | garbageLeaseID + modified | unmodified | match | noneMatch | leaseID | tags + newDate | null | null | null | null | null + null | oldDate | null | null | null | null + null | null | garbageEtag | null | null | null + null | null | null | receivedEtag | null | null + null | null | null | null | garbageLeaseID | null + null | null | null | null | null | "\"notfoo\" = 'notbar'" } def "Get page ranges diff error"() { diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[0].json index a5442947050c..8bcdcc4fc8f6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[0].json @@ -1,70 +1,90 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac6509711850c3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac43f940720ecd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1b9c46e0-212d-401b-aaae-6afa6237ac15" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3041a7d2-462f-4071-9a65-903f1aa7f1b2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE1928A6D", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:54 GMT", + "ETag" : "0x8D8274E8811F3F5", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf559b6-601e-0040-10f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "1b9c46e0-212d-401b-aaae-6afa6237ac15" + "x-ms-request-id" : "1cd3ce88-601e-005a-0937-59f765000000", + "Date" : "Mon, 13 Jul 2020 17:02:31 GMT", + "x-ms-client-request-id" : "3041a7d2-462f-4071-9a65-903f1aa7f1b2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac6509711850c3/javablobappendblockac1appendblobapitestappendblockac650855561", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac43f940720ecd/javablobappendblockac1appendblobapitestappendblockac43f899342", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2f08b8ca-43ec-45ba-bfe4-6993c1c11ac4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f9f16d7-3673-4080-bdbd-3fa4c026f28d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE19C9000", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:54 GMT", + "ETag" : "0x8D8274E886C5D8D", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:32 GMT", + "x-ms-version-id" : "2020-07-13T17:02:32.2660749Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf559e3-601e-0040-37f3-121998000000", + "x-ms-request-id" : "2fbf8525-c01e-0098-1a37-59b1e3000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "2f08b8ca-43ec-45ba-bfe4-6993c1c11ac4" + "Date" : "Mon, 13 Jul 2020 17:02:31 GMT", + "x-ms-client-request-id" : "4f9f16d7-3673-4080-bdbd-3fa4c026f28d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac6509711850c3/javablobappendblockac1appendblobapitestappendblockac650855561?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac43f940720ecd/javablobappendblockac1appendblobapitestappendblockac43f899342?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1222fab5-06ef-40d9-9738-d1546c810375", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9dd5569-6dd0-4c13-a19b-cfc29c60fee3", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1054816d-201e-004b-6337-596dd1000000", + "Date" : "Mon, 13 Jul 2020 17:02:32 GMT", + "x-ms-client-request-id" : "c9dd5569-6dd0-4c13-a19b-cfc29c60fee3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac43f940720ecd/javablobappendblockac1appendblobapitestappendblockac43f899342?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "805f470f-b19b-4075-b3e3-af6e82b0a137", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:54 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:33 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "ETag" : "0x8D7E10AE1A82B7E", + "Date" : "Mon, 13 Jul 2020 17:02:32 GMT", + "ETag" : "0x8D8274E88FB7132", "Content-Length" : "0", - "x-ms-request-id" : "caf55a0d-601e-0040-59f3-121998000000", - "x-ms-client-request-id" : "1222fab5-06ef-40d9-9738-d1546c810375", + "x-ms-request-id" : "324571ff-401e-0010-7e37-5954ea000000", + "x-ms-client-request-id" : "805f470f-b19b-4075-b3e3-af6e82b0a137", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -72,43 +92,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "48bdf300-4737-4985-8d45-6f87ff8aae18" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66f6ea26-e0df-4fd4-a568-d821fb3130a8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf55a2a-601e-0040-73f3-121998000000", - "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac6509711850c3Wed, 15 Apr 2020 07:01:54 GMT\"0x8D7E10AE1928A6D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "48bdf300-4737-4985-8d45-6f87ff8aae18", + "x-ms-request-id" : "a78eaa1b-501e-008a-0737-59ca33000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac43f940720ecdMon, 13 Jul 2020 17:02:31 GMT\"0x8D8274E8811F3F5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:33 GMT", + "x-ms-client-request-id" : "66f6ea26-e0df-4fd4-a568-d821fb3130a8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac6509711850c3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac43f940720ecd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2571ffa0-8b6a-40b9-a89e-84d847af49f4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65ab6828-7a40-458a-a3dc-9481d929e4fa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf55a3d-601e-0040-05f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "2571ffa0-8b6a-40b9-a89e-84d847af49f4" + "x-ms-request-id" : "2a0fd398-701e-0079-7237-596da6000000", + "Date" : "Mon, 13 Jul 2020 17:02:33 GMT", + "x-ms-client-request-id" : "65ab6828-7a40-458a-a3dc-9481d929e4fa" }, "Exception" : null } ], - "variables" : [ "jtcappendblockac0appendblobapitestappendblockac6509711850c3", "javablobappendblockac1appendblobapitestappendblockac650855561" ] + "variables" : [ "jtcappendblockac0appendblobapitestappendblockac43f940720ecd", "javablobappendblockac1appendblobapitestappendblockac43f899342" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[1].json index c8bd1a08c3a3..6fbfbcd1deab 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[1].json @@ -1,70 +1,90 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockace8178917edb1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55f87471b990?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "15075a31-927e-4e73-bfcb-98897e5d254f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c2d64061-665f-4fe7-ba5f-f30fdb8d619d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE1BE38CA", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:54 GMT", + "ETag" : "0x8D8274E89DE0D12", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55a59-601e-0040-1ff3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "15075a31-927e-4e73-bfcb-98897e5d254f" + "x-ms-request-id" : "1aba37ea-401e-003f-0f37-595921000000", + "Date" : "Mon, 13 Jul 2020 17:02:34 GMT", + "x-ms-client-request-id" : "c2d64061-665f-4fe7-ba5f-f30fdb8d619d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockace8178917edb1/javablobappendblockac1appendblobapitestappendblockace8104752e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55f87471b990/javablobappendblockac1appendblobapitestappendblockac55f09382c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "73577d0c-c754-4806-bc1d-d38598d2116d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29c7a97f-41ec-4822-b743-c1180975322d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE1C5A5A0", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:54 GMT", + "ETag" : "0x8D8274E8A16639D", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:35 GMT", + "x-ms-version-id" : "2020-07-13T17:02:35.0590642Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55a74-601e-0040-35f3-121998000000", + "x-ms-request-id" : "2eaf37cc-e01e-0019-2d37-591139000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "73577d0c-c754-4806-bc1d-d38598d2116d" + "Date" : "Mon, 13 Jul 2020 17:02:34 GMT", + "x-ms-client-request-id" : "29c7a97f-41ec-4822-b743-c1180975322d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockace8178917edb1/javablobappendblockac1appendblobapitestappendblockace8104752e?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55f87471b990/javablobappendblockac1appendblobapitestappendblockac55f09382c?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "984d18a6-afca-4d87-8ba0-effcd973c118", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "79a5ff74-3ee1-43b2-8d59-a7a063d42c93", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7a4a59c0-a01e-0008-2637-598b8d000000", + "Date" : "Mon, 13 Jul 2020 17:02:35 GMT", + "x-ms-client-request-id" : "79a5ff74-3ee1-43b2-8d59-a7a063d42c93" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55f87471b990/javablobappendblockac1appendblobapitestappendblockac55f09382c?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9487ce18-294e-4275-ad0c-b8fac2944531", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:35 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "ETag" : "0x8D7E10AE1CD217D", + "Date" : "Mon, 13 Jul 2020 17:02:35 GMT", + "ETag" : "0x8D8274E8A83DF3D", "Content-Length" : "0", - "x-ms-request-id" : "caf55a86-601e-0040-46f3-121998000000", - "x-ms-client-request-id" : "984d18a6-afca-4d87-8ba0-effcd973c118", + "x-ms-request-id" : "564c02e2-501e-006e-1637-59c4ad000000", + "x-ms-client-request-id" : "9487ce18-294e-4275-ad0c-b8fac2944531", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -72,43 +92,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5e29f54a-5a2a-42d4-bce6-73f1150a16b6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dcdb44bd-9eaf-49ca-a040-6b4f160f8429" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf55ac8-601e-0040-80f3-121998000000", - "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockace8178917edb1Wed, 15 Apr 2020 07:01:54 GMT\"0x8D7E10AE1BE38CA\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "5e29f54a-5a2a-42d4-bce6-73f1150a16b6", + "x-ms-request-id" : "ab39d99a-301e-0035-4737-59fd96000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac55f87471b990Mon, 13 Jul 2020 17:02:34 GMT\"0x8D8274E89DE0D12\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:35 GMT", + "x-ms-client-request-id" : "dcdb44bd-9eaf-49ca-a040-6b4f160f8429", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockace8178917edb1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55f87471b990?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "95c3705f-0d5d-49e7-96a6-5823f5e9b564" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d22528ad-4ed6-426e-ae68-0ae2d48f3aaa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf55afa-601e-0040-2df3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "95c3705f-0d5d-49e7-96a6-5823f5e9b564" + "x-ms-request-id" : "88266393-d01e-005f-2e37-5925be000000", + "Date" : "Mon, 13 Jul 2020 17:02:35 GMT", + "x-ms-client-request-id" : "d22528ad-4ed6-426e-ae68-0ae2d48f3aaa" }, "Exception" : null } ], - "variables" : [ "jtcappendblockac0appendblobapitestappendblockace8178917edb1", "javablobappendblockac1appendblobapitestappendblockace8104752e" ] + "variables" : [ "jtcappendblockac0appendblobapitestappendblockac55f87471b990", "javablobappendblockac1appendblobapitestappendblockac55f09382c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[2].json index b68c3fd6b101..cb6b1a910803 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[2].json @@ -1,70 +1,90 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac6e20826055d7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac9a180626f59e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8d421128-abc7-466f-b1f4-b0d708ebb433" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd0afbb0-efae-424e-ab47-5006afe60a4d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE1E615AF", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "ETag" : "0x8D8274E8B2312A8", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55b33-601e-0040-60f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "8d421128-abc7-466f-b1f4-b0d708ebb433" + "x-ms-request-id" : "76e51d05-701e-0024-4a37-596722000000", + "Date" : "Mon, 13 Jul 2020 17:02:36 GMT", + "x-ms-client-request-id" : "dd0afbb0-efae-424e-ab47-5006afe60a4d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac6e20826055d7/javablobappendblockac1appendblobapitestappendblockac6e292430f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac9a180626f59e/javablobappendblockac1appendblobapitestappendblockac9a1655169", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6f02f438-a208-47c1-868d-5ee8505320f3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "14589462-37ff-4fd4-ac90-8054d1cee7f8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE1ED8279", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "ETag" : "0x8D8274E8B57F7A3", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:37 GMT", + "x-ms-version-id" : "2020-07-13T17:02:37.1655587Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55b79-601e-0040-1bf3-121998000000", + "x-ms-request-id" : "225ee564-b01e-003b-7a37-59d426000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "6f02f438-a208-47c1-868d-5ee8505320f3" + "Date" : "Mon, 13 Jul 2020 17:02:37 GMT", + "x-ms-client-request-id" : "14589462-37ff-4fd4-ac90-8054d1cee7f8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac6e20826055d7/javablobappendblockac1appendblobapitestappendblockac6e292430f?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac9a180626f59e/javablobappendblockac1appendblobapitestappendblockac9a1655169?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e979e31f-74f9-4130-8c2f-c48b9936d994", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "629adcb0-80e7-4881-9e06-29d0c7286254", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2656989b-701e-008d-1d37-59a650000000", + "Date" : "Mon, 13 Jul 2020 17:02:36 GMT", + "x-ms-client-request-id" : "629adcb0-80e7-4881-9e06-29d0c7286254" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac9a180626f59e/javablobappendblockac1appendblobapitestappendblockac9a1655169?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ed219ee-4386-46b7-991f-b26f0a53cf5b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "ETag" : "0x8D7E10AE1F4FE57", + "Date" : "Mon, 13 Jul 2020 17:02:37 GMT", + "ETag" : "0x8D8274E8BC39E4A", "Content-Length" : "0", - "x-ms-request-id" : "caf55ba2-601e-0040-42f3-121998000000", - "x-ms-client-request-id" : "e979e31f-74f9-4130-8c2f-c48b9936d994", + "x-ms-request-id" : "47e1e894-601e-0017-3437-593889000000", + "x-ms-client-request-id" : "1ed219ee-4386-46b7-991f-b26f0a53cf5b", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -72,43 +92,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c6919ca4-1106-496a-a57d-65f7d14aa99f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f905a9b-b6cf-4cd3-9675-098a8a8547ce" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf55bcb-601e-0040-65f3-121998000000", - "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac6e20826055d7Wed, 15 Apr 2020 07:01:55 GMT\"0x8D7E10AE1E615AF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "c6919ca4-1106-496a-a57d-65f7d14aa99f", + "x-ms-request-id" : "732dddf5-801e-0042-5637-592802000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac9a180626f59eMon, 13 Jul 2020 17:02:36 GMT\"0x8D8274E8B2312A8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:37 GMT", + "x-ms-client-request-id" : "7f905a9b-b6cf-4cd3-9675-098a8a8547ce", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac6e20826055d7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac9a180626f59e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ba35591e-71b0-4be3-8b63-5503607e8262" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3adb9186-313e-4872-9565-06c0fe44a5d2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf55bf9-601e-0040-11f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "ba35591e-71b0-4be3-8b63-5503607e8262" + "x-ms-request-id" : "901e1b79-d01e-0094-1a37-5926eb000000", + "Date" : "Mon, 13 Jul 2020 17:02:37 GMT", + "x-ms-client-request-id" : "3adb9186-313e-4872-9565-06c0fe44a5d2" }, "Exception" : null } ], - "variables" : [ "jtcappendblockac0appendblobapitestappendblockac6e20826055d7", "javablobappendblockac1appendblobapitestappendblockac6e292430f" ] + "variables" : [ "jtcappendblockac0appendblobapitestappendblockac9a180626f59e", "javablobappendblockac1appendblobapitestappendblockac9a1655169" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[3].json index 71cafbad326b..8e22aa60806a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[3].json @@ -1,100 +1,122 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac5006728877f3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac98971884f26f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e21ed60d-4ba2-4533-91d8-54c150958e4d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1cfd090b-a973-4268-808b-c47158ce9338" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE20F0448", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "ETag" : "0x8D8274E8C6B6D9C", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55c24-601e-0040-39f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:54 GMT", - "x-ms-client-request-id" : "e21ed60d-4ba2-4533-91d8-54c150958e4d" + "x-ms-request-id" : "42caa62f-c01e-001e-6737-597d5a000000", + "Date" : "Mon, 13 Jul 2020 17:02:38 GMT", + "x-ms-client-request-id" : "1cfd090b-a973-4268-808b-c47158ce9338" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac5006728877f3/javablobappendblockac1appendblobapitestappendblockac50078660d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac98971884f26f/javablobappendblockac1appendblobapitestappendblockac989093668", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9bbe70ad-f2f3-4e50-a136-8d71911c2d7e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65ffc978-6dce-4b22-8787-c48dc3390351" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE21622CB", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "ETag" : "0x8D8274E8CA722E3", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:39 GMT", + "x-ms-version-id" : "2020-07-13T17:02:39.3621219Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55c3d-601e-0040-4ef3-121998000000", + "x-ms-request-id" : "5f6133a3-c01e-0021-6137-59b5f9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "9bbe70ad-f2f3-4e50-a136-8d71911c2d7e" + "Date" : "Mon, 13 Jul 2020 17:02:38 GMT", + "x-ms-client-request-id" : "65ffc978-6dce-4b22-8787-c48dc3390351" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac98971884f26f/javablobappendblockac1appendblobapitestappendblockac989093668?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "72d68d2a-f461-406c-ac26-fdcb93832b9d", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2231b648-101e-009b-1137-595087000000", + "Date" : "Mon, 13 Jul 2020 17:02:39 GMT", + "x-ms-client-request-id" : "72d68d2a-f461-406c-ac26-fdcb93832b9d" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac5006728877f3/javablobappendblockac1appendblobapitestappendblockac50078660d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac98971884f26f/javablobappendblockac1appendblobapitestappendblockac989093668", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "966254a7-72c2-4ebc-b3b7-b8478fa1ceed" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d845a1d7-1231-4719-b9a9-0215d5848a7e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "x-ms-version-id" : "2020-07-13T17:02:39.3621219Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", + "Date" : "Mon, 13 Jul 2020 17:02:39 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10AE21622CB", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:01:55 GMT", + "ETag" : "0x8D8274E8CA722E3", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:02:39 GMT", "Content-Length" : "0", - "x-ms-request-id" : "caf55c59-601e-0040-67f3-121998000000", - "x-ms-client-request-id" : "966254a7-72c2-4ebc-b3b7-b8478fa1ceed", + "x-ms-request-id" : "c20807df-c01e-006c-4637-597a15000000", + "x-ms-client-request-id" : "d845a1d7-1231-4719-b9a9-0215d5848a7e", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac5006728877f3/javablobappendblockac1appendblobapitestappendblockac50078660d?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac98971884f26f/javablobappendblockac1appendblobapitestappendblockac989093668?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d193f1e5-7c51-4f20-87e4-98b7def8dc5a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b69562bd-24df-40ef-876b-c39b60053023", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:40 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "ETag" : "0x8D7E10AE224CC4D", + "Date" : "Mon, 13 Jul 2020 17:02:39 GMT", + "ETag" : "0x8D8274E8D45064D", "Content-Length" : "0", - "x-ms-request-id" : "caf55c80-601e-0040-08f3-121998000000", - "x-ms-client-request-id" : "d193f1e5-7c51-4f20-87e4-98b7def8dc5a", + "x-ms-request-id" : "762c81b2-001e-0097-4137-59c78f000000", + "x-ms-client-request-id" : "b69562bd-24df-40ef-876b-c39b60053023", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -102,43 +124,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "39a62033-30d8-4b6d-a05c-5b62436d4405" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fda767e-0a10-4b77-9fcb-0cc9d81af53f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf55c9e-601e-0040-24f3-121998000000", - "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac5006728877f3Wed, 15 Apr 2020 07:01:55 GMT\"0x8D7E10AE20F0448\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "39a62033-30d8-4b6d-a05c-5b62436d4405", + "x-ms-request-id" : "4a869af8-801e-0099-7137-59ee3f000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac98971884f26fMon, 13 Jul 2020 17:02:38 GMT\"0x8D8274E8C6B6D9C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:39 GMT", + "x-ms-client-request-id" : "7fda767e-0a10-4b77-9fcb-0cc9d81af53f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac5006728877f3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac98971884f26f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f783a181-02a4-43b6-aa38-21969aee92af" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "966b49be-edb1-49db-b7e5-7d253c7ed279" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf55cca-601e-0040-4bf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "f783a181-02a4-43b6-aa38-21969aee92af" + "x-ms-request-id" : "f40c1fcb-001e-0073-5537-59c911000000", + "Date" : "Mon, 13 Jul 2020 17:02:40 GMT", + "x-ms-client-request-id" : "966b49be-edb1-49db-b7e5-7d253c7ed279" }, "Exception" : null } ], - "variables" : [ "jtcappendblockac0appendblobapitestappendblockac5006728877f3", "javablobappendblockac1appendblobapitestappendblockac50078660d" ] + "variables" : [ "jtcappendblockac0appendblobapitestappendblockac98971884f26f", "javablobappendblockac1appendblobapitestappendblockac989093668" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[4].json index 1aff1d69ea15..971c133e6e37 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[4].json @@ -1,70 +1,90 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacccf60419e75b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockaca4b73100d7d5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e19c4373-3758-4e88-a71d-88be356c213a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e169383-62d5-437c-b5a5-83b010c3c603" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE23D4B52", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "ETag" : "0x8D8274E8DE56BB3", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55cec-601e-0040-68f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "e19c4373-3758-4e88-a71d-88be356c213a" + "x-ms-request-id" : "0250ea7c-901e-0061-1637-59b2c1000000", + "Date" : "Mon, 13 Jul 2020 17:02:40 GMT", + "x-ms-client-request-id" : "2e169383-62d5-437c-b5a5-83b010c3c603" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacccf60419e75b/javablobappendblockac1appendblobapitestappendblockacccf077934", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockaca4b73100d7d5/javablobappendblockac1appendblobapitestappendblockaca4b805955", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c4ba4b9c-c2b3-4b76-8013-26cc6b39215f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "de0c176c-d612-4c41-84cc-af4b09b5235e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE2470279", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "ETag" : "0x8D8274E8E1A5782", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:41 GMT", + "x-ms-version-id" : "2020-07-13T17:02:41.7948546Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55d2e-601e-0040-24f3-121998000000", + "x-ms-request-id" : "7250e9c2-e01e-009f-5737-59dd80000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "c4ba4b9c-c2b3-4b76-8013-26cc6b39215f" + "Date" : "Mon, 13 Jul 2020 17:02:41 GMT", + "x-ms-client-request-id" : "de0c176c-d612-4c41-84cc-af4b09b5235e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacccf60419e75b/javablobappendblockac1appendblobapitestappendblockacccf077934?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockaca4b73100d7d5/javablobappendblockac1appendblobapitestappendblockaca4b805955?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "da0c0421-143f-48e9-802e-8c39d9d50b5a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1051c65-a15d-4209-8985-38df27d85d5d", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "da5424c8-201e-0029-5f37-59aff6000000", + "Date" : "Mon, 13 Jul 2020 17:02:41 GMT", + "x-ms-client-request-id" : "b1051c65-a15d-4209-8985-38df27d85d5d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockaca4b73100d7d5/javablobappendblockac1appendblobapitestappendblockaca4b805955?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "649dd86b-f724-4b29-af2f-0856c121f253", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:55 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:42 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "ETag" : "0x8D7E10AE24F1ABC", + "Date" : "Mon, 13 Jul 2020 17:02:42 GMT", + "ETag" : "0x8D8274E8E811B52", "Content-Length" : "0", - "x-ms-request-id" : "caf55d5a-601e-0040-50f3-121998000000", - "x-ms-client-request-id" : "da0c0421-143f-48e9-802e-8c39d9d50b5a", + "x-ms-request-id" : "89183861-a01e-0018-5237-594ee5000000", + "x-ms-client-request-id" : "649dd86b-f724-4b29-af2f-0856c121f253", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -72,43 +92,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b64024a5-5efa-4f63-a965-54095849f54e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "550680da-36ae-40ce-a5c3-5b56782beb39" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf55d9a-601e-0040-0cf3-121998000000", - "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockacccf60419e75bWed, 15 Apr 2020 07:01:55 GMT\"0x8D7E10AE23D4B52\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "b64024a5-5efa-4f63-a965-54095849f54e", + "x-ms-request-id" : "f59403ac-301e-001a-4a37-59f05d000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockaca4b73100d7d5Mon, 13 Jul 2020 17:02:41 GMT\"0x8D8274E8DE56BB3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:42 GMT", + "x-ms-client-request-id" : "550680da-36ae-40ce-a5c3-5b56782beb39", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacccf60419e75b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockaca4b73100d7d5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f4c34782-b1e0-4650-a2d1-da31ffdfc29e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1089b74-b5df-425d-889d-7fb5a9d20d03" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf55de4-601e-0040-4ef3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "f4c34782-b1e0-4650-a2d1-da31ffdfc29e" + "x-ms-request-id" : "36bb7394-101e-001d-7b37-599c3e000000", + "Date" : "Mon, 13 Jul 2020 17:02:42 GMT", + "x-ms-client-request-id" : "f1089b74-b5df-425d-889d-7fb5a9d20d03" }, "Exception" : null } ], - "variables" : [ "jtcappendblockac0appendblobapitestappendblockacccf60419e75b", "javablobappendblockac1appendblobapitestappendblockacccf077934" ] + "variables" : [ "jtcappendblockac0appendblobapitestappendblockaca4b73100d7d5", "javablobappendblockac1appendblobapitestappendblockaca4b805955" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[5].json index 6ad35e0021fc..ad8439aa36a7 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[5].json @@ -1,92 +1,112 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac96758420e145?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacca010571733c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e2abb917-b1c7-4e45-acdc-76a6a063457e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b47f5ce4-687c-40b1-b41a-3a075d12d991" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE271FC82", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "ETag" : "0x8D8274E8F2AE320", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55e61-601e-0040-3ef3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "e2abb917-b1c7-4e45-acdc-76a6a063457e" + "x-ms-request-id" : "1966b4a3-201e-005b-1b37-59a8b9000000", + "Date" : "Mon, 13 Jul 2020 17:02:43 GMT", + "x-ms-client-request-id" : "b47f5ce4-687c-40b1-b41a-3a075d12d991" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac96758420e145/javablobappendblockac1appendblobapitestappendblockac96752249f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacca010571733c/javablobappendblockac1appendblobapitestappendblockacca005254b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "978bfcde-758d-42c6-9663-a16da87cba72" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "88bac33a-2c42-49d4-9e5a-26e26d9d2792" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE27BDAC0", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "ETag" : "0x8D8274E8F600B35", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:43 GMT", + "x-ms-version-id" : "2020-07-13T17:02:43.9293749Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55e9c-601e-0040-73f3-121998000000", + "x-ms-request-id" : "2e34c5be-101e-000d-5e37-595956000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "978bfcde-758d-42c6-9663-a16da87cba72" + "Date" : "Mon, 13 Jul 2020 17:02:43 GMT", + "x-ms-client-request-id" : "88bac33a-2c42-49d4-9e5a-26e26d9d2792" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac96758420e145/javablobappendblockac1appendblobapitestappendblockac96752249f?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacca010571733c/javablobappendblockac1appendblobapitestappendblockacca005254b?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4e9c8c09-91c2-48ff-ac57-e8763b98c47d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3dd8c0e-3134-42fe-a9f0-666eae148cf6", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE27BDAC0", - "x-ms-lease-id" : "ef28489d-b79f-4e03-8737-97ec77012d3d", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a1ada132-801e-000f-4937-59e7ee000000", + "Date" : "Mon, 13 Jul 2020 17:02:43 GMT", + "x-ms-client-request-id" : "b3dd8c0e-3134-42fe-a9f0-666eae148cf6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacca010571733c/javablobappendblockac1appendblobapitestappendblockacca005254b?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2383d727-9987-4c09-a079-7e950c5ed7e6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E8F600B35", + "x-ms-lease-id" : "9db654b3-5ab5-4a8c-95e0-10f418cf1107", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55ec7-601e-0040-19f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "4e9c8c09-91c2-48ff-ac57-e8763b98c47d" + "x-ms-request-id" : "059284da-201e-0039-0537-596a9e000000", + "Date" : "Mon, 13 Jul 2020 17:02:44 GMT", + "x-ms-client-request-id" : "2383d727-9987-4c09-a079-7e950c5ed7e6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac96758420e145/javablobappendblockac1appendblobapitestappendblockac96752249f?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacca010571733c/javablobappendblockac1appendblobapitestappendblockacca005254b?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "72108d89-5b86-4303-ac52-876efd1232ca", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "043beb15-78b9-4aeb-8257-1ff1115cd737", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "ETag" : "0x8D7E10AE28B6ED5", + "Date" : "Mon, 13 Jul 2020 17:02:44 GMT", + "ETag" : "0x8D8274E900346C2", "Content-Length" : "0", - "x-ms-request-id" : "caf55ef1-601e-0040-3ef3-121998000000", - "x-ms-client-request-id" : "72108d89-5b86-4303-ac52-876efd1232ca", + "x-ms-request-id" : "9604e8b1-901e-0013-3b37-59b58e000000", + "x-ms-client-request-id" : "043beb15-78b9-4aeb-8257-1ff1115cd737", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -94,43 +114,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e92705e2-f3ec-4c6b-b878-edc255036497" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b2e3dbe-aec2-4bb1-ac53-950cb57975ac" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf55f17-601e-0040-62f3-121998000000", - "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac96758420e145Wed, 15 Apr 2020 07:01:56 GMT\"0x8D7E10AE271FC82\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "e92705e2-f3ec-4c6b-b878-edc255036497", + "x-ms-request-id" : "824f1c69-001e-003e-7237-5906fd000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockacca010571733cMon, 13 Jul 2020 17:02:43 GMT\"0x8D8274E8F2AE320\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:45 GMT", + "x-ms-client-request-id" : "4b2e3dbe-aec2-4bb1-ac53-950cb57975ac", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac96758420e145?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacca010571733c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "181624f2-dff3-4111-95ba-a6b90d0c4bef" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c15fb08-77a4-4b1c-b703-4f649f3d2d91" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf55f37-601e-0040-79f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "181624f2-dff3-4111-95ba-a6b90d0c4bef" + "x-ms-request-id" : "f7f89994-301e-0068-7d37-59f712000000", + "Date" : "Mon, 13 Jul 2020 17:02:45 GMT", + "x-ms-client-request-id" : "9c15fb08-77a4-4b1c-b703-4f649f3d2d91" }, "Exception" : null } ], - "variables" : [ "jtcappendblockac0appendblobapitestappendblockac96758420e145", "javablobappendblockac1appendblobapitestappendblockac96752249f" ] + "variables" : [ "jtcappendblockac0appendblobapitestappendblockacca010571733c", "javablobappendblockac1appendblobapitestappendblockacca005254b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[6].json index 0f5cb0f083d7..4c94c66c2820 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[6].json @@ -1,70 +1,90 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacad52661599a5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55082398cabd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "21c25b7a-5d76-4826-8d6c-a9b8e52e43d3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3743cfa1-d9a2-471a-9d51-ea0d575bb8d6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE2A218BD", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "ETag" : "0x8D8274E90A43B0C", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55f52-601e-0040-12f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "21c25b7a-5d76-4826-8d6c-a9b8e52e43d3" + "x-ms-request-id" : "eb2d5a85-b01e-0092-1337-591554000000", + "Date" : "Mon, 13 Jul 2020 17:02:45 GMT", + "x-ms-client-request-id" : "3743cfa1-d9a2-471a-9d51-ea0d575bb8d6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacad52661599a5/javablobappendblockac1appendblobapitestappendblockacad5884718", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55082398cabd/javablobappendblockac1appendblobapitestappendblockac55009296e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "732453f1-774b-4e10-b3b5-9b1e22d095bf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eff86efa-6ec6-47d9-886e-9783dad0951f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE2AABE27", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "ETag" : "0x8D8274E90E67D2D", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:46 GMT", + "x-ms-version-id" : "2020-07-13T17:02:46.4881965Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf55f7e-601e-0040-39f3-121998000000", + "x-ms-request-id" : "f88fc791-e01e-0009-1137-59d451000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:55 GMT", - "x-ms-client-request-id" : "732453f1-774b-4e10-b3b5-9b1e22d095bf" + "Date" : "Mon, 13 Jul 2020 17:02:46 GMT", + "x-ms-client-request-id" : "eff86efa-6ec6-47d9-886e-9783dad0951f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacad52661599a5/javablobappendblockac1appendblobapitestappendblockacad5884718?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55082398cabd/javablobappendblockac1appendblobapitestappendblockac55009296e?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7238f7b3-e5e4-4568-8e23-78dfa3539ba6", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d3d004a-ac44-4e58-9bc8-be5feed095bb", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "640d60c7-301e-0047-0e37-59fad9000000", + "Date" : "Mon, 13 Jul 2020 17:02:46 GMT", + "x-ms-client-request-id" : "5d3d004a-ac44-4e58-9bc8-be5feed095bb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55082398cabd/javablobappendblockac1appendblobapitestappendblockac55009296e?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15ce42cd-8154-47a5-8798-fd66d0dff0a7", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:47 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "ETag" : "0x8D7E10AE2B372C6", + "Date" : "Mon, 13 Jul 2020 17:02:47 GMT", + "ETag" : "0x8D8274E916FEA81", "Content-Length" : "0", - "x-ms-request-id" : "caf55fad-601e-0040-66f3-121998000000", - "x-ms-client-request-id" : "7238f7b3-e5e4-4568-8e23-78dfa3539ba6", + "x-ms-request-id" : "2b5adfc5-401e-005d-7e37-599b06000000", + "x-ms-client-request-id" : "15ce42cd-8154-47a5-8798-fd66d0dff0a7", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -72,43 +92,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c586fd8a-a43e-408e-ac9d-085710f332df" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fefa4c71-6d4e-47e6-8dae-be1af5b6c638" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf55fd0-601e-0040-07f3-121998000000", - "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockacad52661599a5Wed, 15 Apr 2020 07:01:56 GMT\"0x8D7E10AE2A218BD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "c586fd8a-a43e-408e-ac9d-085710f332df", + "x-ms-request-id" : "8dd6da47-e01e-00a0-5c37-591523000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac55082398cabdMon, 13 Jul 2020 17:02:46 GMT\"0x8D8274E90A43B0C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:46 GMT", + "x-ms-client-request-id" : "fefa4c71-6d4e-47e6-8dae-be1af5b6c638", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacad52661599a5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac55082398cabd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "35bf36e5-1b01-495e-a2fa-2bd90e9c9b65" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9d83ca59-7629-4634-a5a1-ad5f9f3fef09" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf55ff8-601e-0040-2af3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "35bf36e5-1b01-495e-a2fa-2bd90e9c9b65" + "x-ms-request-id" : "9aba0ea9-801e-0089-3c37-592b57000000", + "Date" : "Mon, 13 Jul 2020 17:02:47 GMT", + "x-ms-client-request-id" : "9d83ca59-7629-4634-a5a1-ad5f9f3fef09" }, "Exception" : null } ], - "variables" : [ "jtcappendblockac0appendblobapitestappendblockacad52661599a5", "javablobappendblockac1appendblobapitestappendblockacad5884718" ] + "variables" : [ "jtcappendblockac0appendblobapitestappendblockac55082398cabd", "javablobappendblockac1appendblobapitestappendblockac55009296e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[7].json index debb502dc66b..230b421ed4ff 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[7].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[7].json @@ -1,70 +1,90 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacb40030555bf9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac22c116323837?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8f35d8f3-8e14-4c5e-b743-5c4dee46d680" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9045f75a-0a25-4560-ba85-6683561a4ff6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE2D0ADFA", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "ETag" : "0x8D8274E9218D540", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56018-601e-0040-47f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "8f35d8f3-8e14-4c5e-b743-5c4dee46d680" + "x-ms-request-id" : "aa710edb-301e-0078-4b37-59327a000000", + "Date" : "Mon, 13 Jul 2020 17:02:47 GMT", + "x-ms-client-request-id" : "9045f75a-0a25-4560-ba85-6683561a4ff6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacb40030555bf9/javablobappendblockac1appendblobapitestappendblockacb40222897", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac22c116323837/javablobappendblockac1appendblobapitestappendblockac22c68535a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6da13cf3-60f8-4f2d-94f6-b5a4e5b55c8f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad0bc99d-1633-435b-81b8-c38be209c562" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE2D8B6F2", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "ETag" : "0x8D8274E924B303A", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:48 GMT", + "x-ms-version-id" : "2020-07-13T17:02:48.8258618Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5603b-601e-0040-64f3-121998000000", + "x-ms-request-id" : "156ae313-b01e-0066-7037-59dea2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "6da13cf3-60f8-4f2d-94f6-b5a4e5b55c8f" + "Date" : "Mon, 13 Jul 2020 17:02:48 GMT", + "x-ms-client-request-id" : "ad0bc99d-1633-435b-81b8-c38be209c562" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacb40030555bf9/javablobappendblockac1appendblobapitestappendblockacb40222897?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac22c116323837/javablobappendblockac1appendblobapitestappendblockac22c68535a?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4f809716-f0ab-4ee7-b2c0-3737412505d5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "baeeb564-53b8-4854-9104-3bc6b889e698", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6057b9e6-b01e-0004-4337-591c85000000", + "Date" : "Mon, 13 Jul 2020 17:02:48 GMT", + "x-ms-client-request-id" : "baeeb564-53b8-4854-9104-3bc6b889e698" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac22c116323837/javablobappendblockac1appendblobapitestappendblockac22c68535a?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff40947c-9486-4968-8633-e82120c3ee49", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:56 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:49 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "ETag" : "0x8D7E10AE2DFE498", + "Date" : "Mon, 13 Jul 2020 17:02:48 GMT", + "ETag" : "0x8D8274E92B501D3", "Content-Length" : "0", - "x-ms-request-id" : "caf56058-601e-0040-80f3-121998000000", - "x-ms-client-request-id" : "4f809716-f0ab-4ee7-b2c0-3737412505d5", + "x-ms-request-id" : "94ceb67a-a01e-006a-0c37-5949aa000000", + "x-ms-client-request-id" : "ff40947c-9486-4968-8633-e82120c3ee49", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -72,43 +92,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "356cbcd7-ae4d-4ece-ba26-58c4ad6c9b83" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d1a0c707-b8a5-4328-b3c4-79dabbd8a132" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf56084-601e-0040-24f3-121998000000", - "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockacb40030555bf9Wed, 15 Apr 2020 07:01:56 GMT\"0x8D7E10AE2D0ADFA\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "356cbcd7-ae4d-4ece-ba26-58c4ad6c9b83", + "x-ms-request-id" : "db6762c5-801e-006d-3837-5925c9000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac22c116323837Mon, 13 Jul 2020 17:02:48 GMT\"0x8D8274E9218D540\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:48 GMT", + "x-ms-client-request-id" : "d1a0c707-b8a5-4328-b3c4-79dabbd8a132", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockacb40030555bf9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac22c116323837?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3338bd5f-3837-4303-b404-b49ecaba92d0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "56c7f4fe-3559-4aa8-b478-2046b56ef2e6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf5609d-601e-0040-39f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "3338bd5f-3837-4303-b404-b49ecaba92d0" + "x-ms-request-id" : "35b488ce-f01e-0083-7337-598fe0000000", + "Date" : "Mon, 13 Jul 2020 17:02:50 GMT", + "x-ms-client-request-id" : "56c7f4fe-3559-4aa8-b478-2046b56ef2e6" }, "Exception" : null } ], - "variables" : [ "jtcappendblockac0appendblobapitestappendblockacb40030555bf9", "javablobappendblockac1appendblobapitestappendblockacb40222897" ] + "variables" : [ "jtcappendblockac0appendblobapitestappendblockac22c116323837", "javablobappendblockac1appendblobapitestappendblockac22c68535a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[8].json new file mode 100644 index 000000000000..0ecb237afbf7 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockac[8].json @@ -0,0 +1,133 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac8b785828988c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8de4388-779d-4954-9fd2-c79672bdf070" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E9353451A", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b0451a44-501e-009a-7137-590f5b000000", + "Date" : "Mon, 13 Jul 2020 17:02:49 GMT", + "x-ms-client-request-id" : "f8de4388-779d-4954-9fd2-c79672bdf070" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac8b785828988c/javablobappendblockac1appendblobapitestappendblockac8b7122163", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4690554-7b79-423f-814a-e0bf270adaca" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E93859742", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:50 GMT", + "x-ms-version-id" : "2020-07-13T17:02:50.8863298Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b370386a-701e-00a2-2637-59ab9b000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:02:50 GMT", + "x-ms-client-request-id" : "a4690554-7b79-423f-814a-e0bf270adaca" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac8b785828988c/javablobappendblockac1appendblobapitestappendblockac8b7122163?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "892f4511-ce0a-419d-9399-efaf268f9b22", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5d8743ef-701e-009d-2437-596338000000", + "Date" : "Mon, 13 Jul 2020 17:02:50 GMT", + "x-ms-client-request-id" : "892f4511-ce0a-419d-9399-efaf268f9b22" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac8b785828988c/javablobappendblockac1appendblobapitestappendblockac8b7122163?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1cf86dcc-64dc-4b37-8b2e-d761af39d006", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-blob-committed-block-count" : "1", + "Last-Modified" : "Mon, 13 Jul 2020 17:02:51 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:02:51 GMT", + "ETag" : "0x8D8274E93EBBEB0", + "Content-Length" : "0", + "x-ms-request-id" : "e4df38e3-101e-0050-3f37-5953d2000000", + "x-ms-client-request-id" : "1cf86dcc-64dc-4b37-8b2e-d761af39d006", + "x-ms-blob-append-offset" : "0" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7362c35-5f45-4c83-a17f-5ec2797ab59b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "55b4db75-d01e-0002-7437-592f3a000000", + "Body" : "jtcappendblockacjtcappendblockac0appendblobapitestappendblockac8b785828988cMon, 13 Jul 2020 17:02:50 GMT\"0x8D8274E9353451A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:02:51 GMT", + "x-ms-client-request-id" : "b7362c35-5f45-4c83-a17f-5ec2797ab59b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockac0appendblobapitestappendblockac8b785828988c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "138337bb-a552-406d-94c2-99e570606fc6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2926f0ea-c01e-007c-1837-59bf7d000000", + "Date" : "Mon, 13 Jul 2020 17:02:51 GMT", + "x-ms-client-request-id" : "138337bb-a552-406d-94c2-99e570606fc6" + }, + "Exception" : null + } ], + "variables" : [ "jtcappendblockac0appendblobapitestappendblockac8b785828988c", "javablobappendblockac1appendblobapitestappendblockac8b7122163" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[0].json index f3eaf30c0b6a..45b59dd75ffd 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[0].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail062683e335499ebb9542d6bc?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0189792fa9acb1dd09410a9c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "395c61f5-ce7d-4f2a-bad4-65cf4d393930" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d5468c3-1bd5-4b10-95ad-7189fd556638" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE2F97577", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E60AE47EF", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf560c0-601e-0040-57f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "395c61f5-ce7d-4f2a-bad4-65cf4d393930" + "x-ms-request-id" : "221d8bb9-a01e-00a1-1537-594aff000000", + "Date" : "Mon, 13 Jul 2020 17:01:25 GMT", + "x-ms-client-request-id" : "8d5468c3-1bd5-4b10-95ad-7189fd556638" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail062683e335499ebb9542d6bc/javablobappendblockacfail1388193ac3476f6e014b39", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0189792fa9acb1dd09410a9c/javablobappendblockacfail1840778f56b003f90b482a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "99e7e40e-1c31-453f-8755-8abc5e880a9b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8fb521d5-5f9d-463a-a907-4844ca965180" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE3006CAC", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E6118C5DC", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:26 GMT", + "x-ms-version-id" : "2020-07-13T17:01:26.2871004Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf560de-601e-0040-71f3-121998000000", + "x-ms-request-id" : "7bcdf6c0-601e-0075-1c37-59faae000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "99e7e40e-1c31-453f-8755-8abc5e880a9b" + "Date" : "Mon, 13 Jul 2020 17:01:26 GMT", + "x-ms-client-request-id" : "8fb521d5-5f9d-463a-a907-4844ca965180" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail062683e335499ebb9542d6bc/javablobappendblockacfail1388193ac3476f6e014b39?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0189792fa9acb1dd09410a9c/javablobappendblockacfail1840778f56b003f90b482a?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "74ceccd8-d587-4338-b5a3-03412d4caa4f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a12e17f-b547-46ad-ab18-bea0268ab2f6", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "caf5610e-601e-0040-1bf3-121998000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:caf5610e-601e-0040-1bf3-121998000000\nTime:2020-04-15T07:01:57.1087333Z", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "74ceccd8-d587-4338-b5a3-03412d4caa4f", + "x-ms-request-id" : "f232557d-301e-008c-0737-59f98c000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:f232557d-301e-008c-0737-59f98c000000\nTime:2020-07-13T17:01:26.8689483Z", + "Date" : "Mon, 13 Jul 2020 17:01:26 GMT", + "x-ms-client-request-id" : "0a12e17f-b547-46ad-ab18-bea0268ab2f6", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a80dcd1e-54ac-4310-b8ad-b3fec24af550" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d830d568-e4f3-4fce-a2c7-8558bbfdb6e4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf5613c-601e-0040-48f3-121998000000", - "Body" : "jtcappendblockacfailjtcappendblockacfail062683e335499ebb9542d6bcWed, 15 Apr 2020 07:01:57 GMT\"0x8D7E10AE2F97577\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "a80dcd1e-54ac-4310-b8ad-b3fec24af550", + "x-ms-request-id" : "c2d06774-a01e-007a-5437-598cc2000000", + "Body" : "jtcappendblockacfailjtcappendblockacfail0189792fa9acb1dd09410a9cMon, 13 Jul 2020 17:01:25 GMT\"0x8D8274E60AE47EF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:01:26 GMT", + "x-ms-client-request-id" : "d830d568-e4f3-4fce-a2c7-8558bbfdb6e4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail062683e335499ebb9542d6bc?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0189792fa9acb1dd09410a9c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7050a4e3-936f-4c94-8bda-782205b62e53" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0d7f8ad-b81d-4179-b75c-4215e709482e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf56155-601e-0040-5ef3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "7050a4e3-936f-4c94-8bda-782205b62e53" + "x-ms-request-id" : "f830def7-101e-0040-1737-5996ba000000", + "Date" : "Mon, 13 Jul 2020 17:01:27 GMT", + "x-ms-client-request-id" : "c0d7f8ad-b81d-4179-b75c-4215e709482e" }, "Exception" : null } ], - "variables" : [ "jtcappendblockacfail062683e335499ebb9542d6bc", "javablobappendblockacfail1388193ac3476f6e014b39" ] + "variables" : [ "jtcappendblockacfail0189792fa9acb1dd09410a9c", "javablobappendblockacfail1840778f56b003f90b482a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[1].json index a2c03c156d31..41f689bc33f8 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[1].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0522477811760e5ed7491ab9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0486073e7e453fb07b483e8b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "26f1c805-f2c9-4a41-8fda-29c3b5980483" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "812c6ce4-92c1-47df-8448-377257d90249" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE322B23D", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E624EF468", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56182-601e-0040-06f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "26f1c805-f2c9-4a41-8fda-29c3b5980483" + "x-ms-request-id" : "06c6c89f-101e-007f-2337-595e19000000", + "Date" : "Mon, 13 Jul 2020 17:01:28 GMT", + "x-ms-client-request-id" : "812c6ce4-92c1-47df-8448-377257d90249" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0522477811760e5ed7491ab9/javablobappendblockacfail1714501b537d4489f041c7", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0486073e7e453fb07b483e8b/javablobappendblockacfail16677226e92e6c73094968", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "be1498b9-0d65-4eff-88b5-100097a10ca4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7a4b55d-c25a-4435-9827-5a71e335b76c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE32C421E", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E628E9302", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:28 GMT", + "x-ms-version-id" : "2020-07-13T17:01:28.7368450Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf561a3-601e-0040-25f3-121998000000", + "x-ms-request-id" : "89c9cfdd-b01e-0059-3f37-591601000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "be1498b9-0d65-4eff-88b5-100097a10ca4" + "Date" : "Mon, 13 Jul 2020 17:01:28 GMT", + "x-ms-client-request-id" : "d7a4b55d-c25a-4435-9827-5a71e335b76c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0522477811760e5ed7491ab9/javablobappendblockacfail1714501b537d4489f041c7?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0486073e7e453fb07b483e8b/javablobappendblockacfail16677226e92e6c73094968?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "58b7ea34-9e12-45d5-8941-c2cab9c0c86d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1e54e2d1-df7d-46ff-8742-0bf064de4ddb", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "caf561b2-601e-0040-33f3-121998000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:caf561b2-601e-0040-33f3-121998000000\nTime:2020-04-15T07:01:57.3950018Z", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "58b7ea34-9e12-45d5-8941-c2cab9c0c86d", + "x-ms-request-id" : "a686bb96-701e-000b-4b37-596ae9000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:a686bb96-701e-000b-4b37-596ae9000000\nTime:2020-07-13T17:01:29.1377876Z", + "Date" : "Mon, 13 Jul 2020 17:01:28 GMT", + "x-ms-client-request-id" : "1e54e2d1-df7d-46ff-8742-0bf064de4ddb", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d9a6685a-ccdf-49b3-94ff-1635de6f57a9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00cb4c94-4d9e-410f-afa0-9e65fe105ce3" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf561cb-601e-0040-4bf3-121998000000", - "Body" : "jtcappendblockacfailjtcappendblockacfail0522477811760e5ed7491ab9Wed, 15 Apr 2020 07:01:57 GMT\"0x8D7E10AE322B23D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "d9a6685a-ccdf-49b3-94ff-1635de6f57a9", + "x-ms-request-id" : "be63a596-c01e-000e-6f37-59b832000000", + "Body" : "jtcappendblockacfailjtcappendblockacfail0486073e7e453fb07b483e8bMon, 13 Jul 2020 17:01:28 GMT\"0x8D8274E624EF468\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:01:29 GMT", + "x-ms-client-request-id" : "00cb4c94-4d9e-410f-afa0-9e65fe105ce3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0522477811760e5ed7491ab9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0486073e7e453fb07b483e8b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "10086271-0d5e-4072-98e1-1d7e2eaf2b46" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cebe68a4-772a-478c-a314-0fac0324bd56" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf561e7-601e-0040-63f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:56 GMT", - "x-ms-client-request-id" : "10086271-0d5e-4072-98e1-1d7e2eaf2b46" + "x-ms-request-id" : "8edda894-301e-00a3-2737-59f447000000", + "Date" : "Mon, 13 Jul 2020 17:01:29 GMT", + "x-ms-client-request-id" : "cebe68a4-772a-478c-a314-0fac0324bd56" }, "Exception" : null } ], - "variables" : [ "jtcappendblockacfail0522477811760e5ed7491ab9", "javablobappendblockacfail1714501b537d4489f041c7" ] + "variables" : [ "jtcappendblockacfail0486073e7e453fb07b483e8b", "javablobappendblockacfail16677226e92e6c73094968" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[2].json index 3524c9b57ed8..698aca8b0834 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[2].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail072166cb2263607eca421993?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail053374a1cbc7fd5d9441e9ad?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "768cdfe1-ca83-41d9-87f4-b295144b307d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87290644-2485-40fa-a864-1696ac0c076a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE35083FE", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E637C34EB", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:30 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56215-601e-0040-0af3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "768cdfe1-ca83-41d9-87f4-b295144b307d" + "x-ms-request-id" : "f11ea473-f01e-003a-7f37-598bfa000000", + "Date" : "Mon, 13 Jul 2020 17:01:29 GMT", + "x-ms-client-request-id" : "87290644-2485-40fa-a864-1696ac0c076a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail072166cb2263607eca421993/javablobappendblockacfail190318bb25be4f7f014507", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail053374a1cbc7fd5d9441e9ad/javablobappendblockacfail15688947ac54cf14cc41f2", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2d6cac76-0c95-452a-af5a-769e2b73b464" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b0c657c-3ad5-4bed-960c-0b59b3ec2471" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE35865C7", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E63B82E1F", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:30 GMT", + "x-ms-version-id" : "2020-07-13T17:01:30.6872351Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56240-601e-0040-2af3-121998000000", + "x-ms-request-id" : "77e0af76-201e-0064-3137-59601a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "2d6cac76-0c95-452a-af5a-769e2b73b464" + "Date" : "Mon, 13 Jul 2020 17:01:30 GMT", + "x-ms-client-request-id" : "8b0c657c-3ad5-4bed-960c-0b59b3ec2471" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail072166cb2263607eca421993/javablobappendblockacfail190318bb25be4f7f014507?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail053374a1cbc7fd5d9441e9ad/javablobappendblockacfail15688947ac54cf14cc41f2?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b557744f-785b-4ddb-99c2-5a3cd5733617", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9b1a0b1-876c-42c3-b7a3-5099b0080660", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "caf5626a-601e-0040-4ef3-121998000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:caf5626a-601e-0040-4ef3-121998000000\nTime:2020-04-15T07:01:57.6902785Z", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "b557744f-785b-4ddb-99c2-5a3cd5733617", + "x-ms-request-id" : "56affbc7-f01e-002a-5437-594e92000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:56affbc7-f01e-002a-5437-594e92000000\nTime:2020-07-13T17:01:31.0385988Z", + "Date" : "Mon, 13 Jul 2020 17:01:30 GMT", + "x-ms-client-request-id" : "c9b1a0b1-876c-42c3-b7a3-5099b0080660", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0039962d-c733-4ef0-9c72-c0c77dba642f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "04ad03a2-9d7f-4c98-a68e-1f51eaaeb82b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf5627c-601e-0040-5df3-121998000000", - "Body" : "jtcappendblockacfailjtcappendblockacfail072166cb2263607eca421993Wed, 15 Apr 2020 07:01:57 GMT\"0x8D7E10AE35083FE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "0039962d-c733-4ef0-9c72-c0c77dba642f", + "x-ms-request-id" : "a070ca2f-501e-0041-2037-59c966000000", + "Body" : "jtcappendblockacfailjtcappendblockacfail053374a1cbc7fd5d9441e9adMon, 13 Jul 2020 17:01:30 GMT\"0x8D8274E637C34EB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:01:30 GMT", + "x-ms-client-request-id" : "04ad03a2-9d7f-4c98-a68e-1f51eaaeb82b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail072166cb2263607eca421993?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail053374a1cbc7fd5d9441e9ad?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2746dd82-c3a5-428d-b2b5-0f57bbda2857" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "962e9639-945f-446c-8324-155c03f86e9a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf5628f-601e-0040-6ef3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "2746dd82-c3a5-428d-b2b5-0f57bbda2857" + "x-ms-request-id" : "301fb0e1-301e-0057-0237-593fb1000000", + "Date" : "Mon, 13 Jul 2020 17:01:30 GMT", + "x-ms-client-request-id" : "962e9639-945f-446c-8324-155c03f86e9a" }, "Exception" : null } ], - "variables" : [ "jtcappendblockacfail072166cb2263607eca421993", "javablobappendblockacfail190318bb25be4f7f014507" ] + "variables" : [ "jtcappendblockacfail053374a1cbc7fd5d9441e9ad", "javablobappendblockacfail15688947ac54cf14cc41f2" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[3].json index d6c98d1898b3..904cdf76dc76 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[3].json @@ -1,97 +1,99 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0096503d95c3729b4448aaae?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0515646e678fe9dfa24db1a6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f19a65f8-9f68-404e-94fd-a21e2b8d8d91" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "883f1046-cc14-4ad3-85bf-a4c027b2cc05" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE376165F", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E6487F4B2", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf562b0-601e-0040-0bf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "f19a65f8-9f68-404e-94fd-a21e2b8d8d91" + "x-ms-request-id" : "7df33e28-a01e-0045-5837-594461000000", + "Date" : "Mon, 13 Jul 2020 17:01:32 GMT", + "x-ms-client-request-id" : "883f1046-cc14-4ad3-85bf-a4c027b2cc05" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0096503d95c3729b4448aaae/javablobappendblockacfail169256a194333080a54d27", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0515646e678fe9dfa24db1a6/javablobappendblockacfail158159522f871f51204117", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d73257dd-2b6e-4e2b-927e-da5bddc46951" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "97b08bf2-1c1c-426c-aa33-049c27d1c3cb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE37DAA00", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E64BB9C94", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:32 GMT", + "x-ms-version-id" : "2020-07-13T17:01:32.3874452Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf562cf-601e-0040-24f3-121998000000", + "x-ms-request-id" : "ebd54b3e-f01e-0048-4137-598cb5000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "d73257dd-2b6e-4e2b-927e-da5bddc46951" + "Date" : "Mon, 13 Jul 2020 17:01:31 GMT", + "x-ms-client-request-id" : "97b08bf2-1c1c-426c-aa33-049c27d1c3cb" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0096503d95c3729b4448aaae/javablobappendblockacfail169256a194333080a54d27", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0515646e678fe9dfa24db1a6/javablobappendblockacfail158159522f871f51204117", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7ea25da5-8602-48a8-99c8-78eca3ca1d43" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f0c2b5d5-0242-4aa4-bc72-1f433b035ca3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:57 GMT", + "x-ms-version-id" : "2020-07-13T17:01:32.3874452Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", + "Date" : "Mon, 13 Jul 2020 17:01:32 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10AE37DAA00", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:01:57 GMT", + "ETag" : "0x8D8274E64BB9C94", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:01:32 GMT", "Content-Length" : "0", - "x-ms-request-id" : "caf562ef-601e-0040-42f3-121998000000", - "x-ms-client-request-id" : "7ea25da5-8602-48a8-99c8-78eca3ca1d43", + "x-ms-request-id" : "d0afd73d-101e-0022-7837-59549d000000", + "x-ms-client-request-id" : "f0c2b5d5-0242-4aa4-bc72-1f433b035ca3", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0096503d95c3729b4448aaae/javablobappendblockacfail169256a194333080a54d27?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0515646e678fe9dfa24db1a6/javablobappendblockacfail158159522f871f51204117?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "180e229a-5b95-40de-9c22-ebe644adafe5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f24828d-1e37-4d1a-93e2-075e451d7086", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "caf56305-601e-0040-57f3-121998000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:caf56305-601e-0040-57f3-121998000000\nTime:2020-04-15T07:01:57.9755463Z", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "180e229a-5b95-40de-9c22-ebe644adafe5", + "x-ms-request-id" : "5dec85fe-501e-00a5-2237-59c7f8000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5dec85fe-501e-00a5-2237-59c7f8000000\nTime:2020-07-13T17:01:33.0924895Z", + "Date" : "Mon, 13 Jul 2020 17:01:32 GMT", + "x-ms-client-request-id" : "7f24828d-1e37-4d1a-93e2-075e451d7086", "Content-Type" : "application/xml" }, "Exception" : null @@ -99,43 +101,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4827f908-eb6f-483b-9604-52f95a58161d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c8f753f-83c2-499e-afb7-8c3de5f826c1" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf5631e-601e-0040-6ff3-121998000000", - "Body" : "jtcappendblockacfailjtcappendblockacfail0096503d95c3729b4448aaaeWed, 15 Apr 2020 07:01:57 GMT\"0x8D7E10AE376165F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "4827f908-eb6f-483b-9604-52f95a58161d", + "x-ms-request-id" : "ab3a478a-b01e-0014-0537-59d9ed000000", + "Body" : "jtcappendblockacfailjtcappendblockacfail0515646e678fe9dfa24db1a6Mon, 13 Jul 2020 17:01:32 GMT\"0x8D8274E6487F4B2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:01:32 GMT", + "x-ms-client-request-id" : "8c8f753f-83c2-499e-afb7-8c3de5f826c1", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0096503d95c3729b4448aaae?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0515646e678fe9dfa24db1a6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "178db127-9ef4-4975-b27f-713975f20db0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9097cd68-33ff-48ca-9ee4-6486ad8a5ade" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf5633e-601e-0040-0cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "178db127-9ef4-4975-b27f-713975f20db0" + "x-ms-request-id" : "30e10add-201e-0016-1b37-596755000000", + "Date" : "Mon, 13 Jul 2020 17:01:33 GMT", + "x-ms-client-request-id" : "9097cd68-33ff-48ca-9ee4-6486ad8a5ade" }, "Exception" : null } ], - "variables" : [ "jtcappendblockacfail0096503d95c3729b4448aaae", "javablobappendblockacfail169256a194333080a54d27" ] + "variables" : [ "jtcappendblockacfail0515646e678fe9dfa24db1a6", "javablobappendblockacfail158159522f871f51204117" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[4].json index 1d88ef998f6c..b4ef182d00c9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[4].json @@ -1,89 +1,90 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0335984aaedb399032470595?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail091131ec35b86744fa4d41bb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "07281d6d-c12e-4f88-9649-9e332dda897f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "91aeec69-b6e0-4c06-9643-0150e4bac289" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE3A9DD04", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:58 GMT", + "ETag" : "0x8D8274E65DB663E", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5639b-601e-0040-61f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "07281d6d-c12e-4f88-9649-9e332dda897f" + "x-ms-request-id" : "f8b684ae-c01e-00a7-1237-597940000000", + "Date" : "Mon, 13 Jul 2020 17:01:33 GMT", + "x-ms-client-request-id" : "91aeec69-b6e0-4c06-9643-0150e4bac289" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0335984aaedb399032470595/javablobappendblockacfail143849039ca7b9bc5b41bf", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail091131ec35b86744fa4d41bb/javablobappendblockacfail103973b4e591a2a5cc43ba", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9c9322af-f78a-4a27-bd12-446d8d025086" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4040bf15-908a-4d92-96e1-72c22b8a430d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE3B20D0E", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:58 GMT", + "ETag" : "0x8D8274E6616FF12", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:34 GMT", + "x-ms-version-id" : "2020-07-13T17:01:34.6640658Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf563d5-601e-0040-16f3-121998000000", + "x-ms-request-id" : "40ded4c1-e01e-0026-7b37-59d99a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "9c9322af-f78a-4a27-bd12-446d8d025086" + "Date" : "Mon, 13 Jul 2020 17:01:34 GMT", + "x-ms-client-request-id" : "4040bf15-908a-4d92-96e1-72c22b8a430d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0335984aaedb399032470595/javablobappendblockacfail143849039ca7b9bc5b41bf?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail091131ec35b86744fa4d41bb/javablobappendblockacfail103973b4e591a2a5cc43ba?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "326e1d13-b377-43bb-a267-f28932671a4b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b0e748b-5c59-4ff2-9fb1-aaf87acba96c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE3B20D0E", - "x-ms-lease-id" : "c1a1b225-43e1-4981-97fe-63fe3f7f11a4", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:58 GMT", + "ETag" : "0x8D8274E6616FF12", + "x-ms-lease-id" : "0a930fa4-fe72-4945-aa2a-3664f02b9126", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5640a-601e-0040-47f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "326e1d13-b377-43bb-a267-f28932671a4b" + "x-ms-request-id" : "fe990c95-601e-0028-7337-59f02a000000", + "Date" : "Mon, 13 Jul 2020 17:01:34 GMT", + "x-ms-client-request-id" : "5b0e748b-5c59-4ff2-9fb1-aaf87acba96c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0335984aaedb399032470595/javablobappendblockacfail143849039ca7b9bc5b41bf?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail091131ec35b86744fa4d41bb/javablobappendblockacfail103973b4e591a2a5cc43ba?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e29c2760-a95e-4bf4-912c-ccda5ccd6e96", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "000bab3d-00b4-474b-be86-e9aa09dc14cb", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "caf5643e-601e-0040-77f3-121998000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:caf5643e-601e-0040-77f3-121998000000\nTime:2020-04-15T07:01:58.3238735Z", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "e29c2760-a95e-4bf4-912c-ccda5ccd6e96", + "x-ms-request-id" : "9cb3ad4f-901e-0003-5237-5970e6000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:9cb3ad4f-901e-0003-5237-5970e6000000\nTime:2020-07-13T17:01:35.4456380Z", + "Date" : "Mon, 13 Jul 2020 17:01:35 GMT", + "x-ms-client-request-id" : "000bab3d-00b4-474b-be86-e9aa09dc14cb", "Content-Type" : "application/xml" }, "Exception" : null @@ -91,43 +92,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bdae0c54-90e3-444e-838d-898864eff2ed" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b8cc0a4-e5e6-446e-a93c-f9e937b21c33" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf56471-601e-0040-29f3-121998000000", - "Body" : "jtcappendblockacfailjtcappendblockacfail0335984aaedb399032470595Wed, 15 Apr 2020 07:01:58 GMT\"0x8D7E10AE3A9DD04\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "bdae0c54-90e3-444e-838d-898864eff2ed", + "x-ms-request-id" : "d3932b58-a01e-0055-7437-598109000000", + "Body" : "jtcappendblockacfailjtcappendblockacfail091131ec35b86744fa4d41bbMon, 13 Jul 2020 17:01:34 GMT\"0x8D8274E65DB663E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:01:35 GMT", + "x-ms-client-request-id" : "4b8cc0a4-e5e6-446e-a93c-f9e937b21c33", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0335984aaedb399032470595?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail091131ec35b86744fa4d41bb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "35eec698-70a4-45e0-a99d-07c3f05e0557" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "25db4dfc-6244-49d5-ab68-2b90437e6b6b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf56494-601e-0040-49f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "35eec698-70a4-45e0-a99d-07c3f05e0557" + "x-ms-request-id" : "f83f0616-601e-0007-1037-59fde1000000", + "Date" : "Mon, 13 Jul 2020 17:01:35 GMT", + "x-ms-client-request-id" : "25db4dfc-6244-49d5-ab68-2b90437e6b6b" }, "Exception" : null } ], - "variables" : [ "jtcappendblockacfail0335984aaedb399032470595", "javablobappendblockacfail143849039ca7b9bc5b41bf" ] + "variables" : [ "jtcappendblockacfail091131ec35b86744fa4d41bb", "javablobappendblockacfail103973b4e591a2a5cc43ba" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[5].json index ac7e33c6cb5d..ea7011dae09c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[5].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0575034b0343f874684245a0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail02871913e03fcb01e24e37a5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "836eea8e-af9a-4a3a-a151-d1c271a26bd6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3562b5ef-e48e-4d0b-8e78-13a8b3ea1754" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE3DB803D", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:58 GMT", + "ETag" : "0x8D8274E67292D2C", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf564d4-601e-0040-06f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:57 GMT", - "x-ms-client-request-id" : "836eea8e-af9a-4a3a-a151-d1c271a26bd6" + "x-ms-request-id" : "34ef7a62-401e-0096-7737-599853000000", + "Date" : "Mon, 13 Jul 2020 17:01:35 GMT", + "x-ms-client-request-id" : "3562b5ef-e48e-4d0b-8e78-13a8b3ea1754" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0575034b0343f874684245a0/javablobappendblockacfail14567792c0f81f28e841d5", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail02871913e03fcb01e24e37a5/javablobappendblockacfail151804716f9fc6eb5b44d8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "653e182a-ba33-4ef9-8d0c-f5f55025aec4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "17376672-8e21-4ac1-b03c-5f3addc25b2d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE3E621DF", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:58 GMT", + "ETag" : "0x8D8274E675AB697", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:36 GMT", + "x-ms-version-id" : "2020-07-13T17:01:36.7855767Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56505-601e-0040-33f3-121998000000", + "x-ms-request-id" : "7bce1430-601e-0075-7937-59faae000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:58 GMT", - "x-ms-client-request-id" : "653e182a-ba33-4ef9-8d0c-f5f55025aec4" + "Date" : "Mon, 13 Jul 2020 17:01:36 GMT", + "x-ms-client-request-id" : "17376672-8e21-4ac1-b03c-5f3addc25b2d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0575034b0343f874684245a0/javablobappendblockacfail14567792c0f81f28e841d5?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail02871913e03fcb01e24e37a5/javablobappendblockacfail151804716f9fc6eb5b44d8?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "527e834b-2517-4005-9387-16414b73f4e4", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c032106-478a-4758-85a3-15c237bcc4b7", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "AppendPositionConditionNotMet", "retry-after" : "0", "Content-Length" : "250", "StatusCode" : "412", - "x-ms-request-id" : "caf5651b-601e-0040-47f3-121998000000", - "Body" : "AppendPositionConditionNotMetThe append position condition specified was not met.\nRequestId:caf5651b-601e-0040-47f3-121998000000\nTime:2020-04-15T07:01:58.6141448Z", - "Date" : "Wed, 15 Apr 2020 07:01:58 GMT", - "x-ms-client-request-id" : "527e834b-2517-4005-9387-16414b73f4e4", + "x-ms-request-id" : "f2326680-301e-008c-6737-59f98c000000", + "Body" : "AppendPositionConditionNotMetThe append position condition specified was not met.\nRequestId:f2326680-301e-008c-6737-59f98c000000\nTime:2020-07-13T17:01:37.1171728Z", + "Date" : "Mon, 13 Jul 2020 17:01:36 GMT", + "x-ms-client-request-id" : "2c032106-478a-4758-85a3-15c237bcc4b7", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9d13413b-76d7-4fb0-863e-6bcd1c2b3df9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15d6ba90-d8ac-4434-a4fa-072626556aed" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf5653d-601e-0040-64f3-121998000000", - "Body" : "jtcappendblockacfailjtcappendblockacfail0575034b0343f874684245a0Wed, 15 Apr 2020 07:01:58 GMT\"0x8D7E10AE3DB803D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:58 GMT", - "x-ms-client-request-id" : "9d13413b-76d7-4fb0-863e-6bcd1c2b3df9", + "x-ms-request-id" : "c2d0736c-a01e-007a-3337-598cc2000000", + "Body" : "jtcappendblockacfailjtcappendblockacfail02871913e03fcb01e24e37a5Mon, 13 Jul 2020 17:01:36 GMT\"0x8D8274E67292D2C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:01:36 GMT", + "x-ms-client-request-id" : "15d6ba90-d8ac-4434-a4fa-072626556aed", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail0575034b0343f874684245a0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail02871913e03fcb01e24e37a5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cf02239f-de92-4825-bfd9-fcaaef1446cc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f47f9bb-ded2-400b-8440-ac76a1e0f2fa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf5655a-601e-0040-7ef3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:58 GMT", - "x-ms-client-request-id" : "cf02239f-de92-4825-bfd9-fcaaef1446cc" + "x-ms-request-id" : "f830eaa2-101e-0040-4b37-5996ba000000", + "Date" : "Mon, 13 Jul 2020 17:01:37 GMT", + "x-ms-client-request-id" : "3f47f9bb-ded2-400b-8440-ac76a1e0f2fa" }, "Exception" : null } ], - "variables" : [ "jtcappendblockacfail0575034b0343f874684245a0", "javablobappendblockacfail14567792c0f81f28e841d5" ] + "variables" : [ "jtcappendblockacfail02871913e03fcb01e24e37a5", "javablobappendblockacfail151804716f9fc6eb5b44d8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[6].json index 63b96514082d..37574b68315d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[6].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail026370dfed7aa50ebb44ee96?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail022502c6278006ec0c462f96?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9a23a440-752b-4545-a122-4c91e2490d7e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65a29cc1-4b16-492b-bcfd-6429ae187615" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE42A9D9C", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:59 GMT", + "ETag" : "0x8D8274E683592B7", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5660c-601e-0040-20f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:58 GMT", - "x-ms-client-request-id" : "9a23a440-752b-4545-a122-4c91e2490d7e" + "x-ms-request-id" : "06c6e2fa-101e-007f-2d37-595e19000000", + "Date" : "Mon, 13 Jul 2020 17:01:37 GMT", + "x-ms-client-request-id" : "65a29cc1-4b16-492b-bcfd-6429ae187615" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail026370dfed7aa50ebb44ee96/javablobappendblockacfail139170cdc25d69ce374d45", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail022502c6278006ec0c462f96/javablobappendblockacfail100440052a82ce04114c9d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "68e92963-844d-462a-a75e-4ac4c0c8deaf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f33c821b-74dd-481c-b059-c0dfa0ac7417" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE4342D6B", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:59 GMT", + "ETag" : "0x8D8274E686CA6B1", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:38 GMT", + "x-ms-version-id" : "2020-07-13T17:01:38.5808561Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56636-601e-0040-46f3-121998000000", + "x-ms-request-id" : "89c9e05f-b01e-0059-4f37-591601000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:58 GMT", - "x-ms-client-request-id" : "68e92963-844d-462a-a75e-4ac4c0c8deaf" + "Date" : "Mon, 13 Jul 2020 17:01:37 GMT", + "x-ms-client-request-id" : "f33c821b-74dd-481c-b059-c0dfa0ac7417" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail026370dfed7aa50ebb44ee96/javablobappendblockacfail139170cdc25d69ce374d45?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail022502c6278006ec0c462f96/javablobappendblockacfail100440052a82ce04114c9d?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fe216847-518b-4744-88c3-ab23367daef5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0118da8c-ca87-482f-84d4-331a4b276cde", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "MaxBlobSizeConditionNotMet", "retry-after" : "0", "Content-Length" : "245", "StatusCode" : "412", - "x-ms-request-id" : "caf566ea-601e-0040-63f3-121998000000", - "Body" : "MaxBlobSizeConditionNotMetThe max blob size condition specified was not met.\nRequestId:caf566ea-601e-0040-63f3-121998000000\nTime:2020-04-15T07:01:59.3588437Z", - "Date" : "Wed, 15 Apr 2020 07:01:58 GMT", - "x-ms-client-request-id" : "fe216847-518b-4744-88c3-ab23367daef5", + "x-ms-request-id" : "a686cca9-701e-000b-7037-596ae9000000", + "Body" : "MaxBlobSizeConditionNotMetThe max blob size condition specified was not met.\nRequestId:a686cca9-701e-000b-7037-596ae9000000\nTime:2020-07-13T17:01:38.9078106Z", + "Date" : "Mon, 13 Jul 2020 17:01:38 GMT", + "x-ms-client-request-id" : "0118da8c-ca87-482f-84d4-331a4b276cde", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ca779360-c9b6-4c40-a40b-c685a1853784" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b54c1f5e-7b45-4463-a2da-bfe54d00b2c0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf566fa-601e-0040-73f3-121998000000", - "Body" : "jtcappendblockacfailjtcappendblockacfail026370dfed7aa50ebb44ee96Wed, 15 Apr 2020 07:01:59 GMT\"0x8D7E10AE42A9D9C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:58 GMT", - "x-ms-client-request-id" : "ca779360-c9b6-4c40-a40b-c685a1853784", + "x-ms-request-id" : "be63ab3f-c01e-000e-0337-59b832000000", + "Body" : "jtcappendblockacfailjtcappendblockacfail022502c6278006ec0c462f96Mon, 13 Jul 2020 17:01:38 GMT\"0x8D8274E683592B7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:01:38 GMT", + "x-ms-client-request-id" : "b54c1f5e-7b45-4463-a2da-bfe54d00b2c0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail026370dfed7aa50ebb44ee96?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail022502c6278006ec0c462f96?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f40c33fb-dc5d-45fb-8a2e-35210b37729e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "64af0cc7-a823-4159-9094-04e1a0cef4fc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf5675c-601e-0040-4df3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:01:59 GMT", - "x-ms-client-request-id" : "f40c33fb-dc5d-45fb-8a2e-35210b37729e" + "x-ms-request-id" : "8eddb6c3-301e-00a3-6c37-59f447000000", + "Date" : "Mon, 13 Jul 2020 17:01:39 GMT", + "x-ms-client-request-id" : "64af0cc7-a823-4159-9094-04e1a0cef4fc" }, "Exception" : null } ], - "variables" : [ "jtcappendblockacfail026370dfed7aa50ebb44ee96", "javablobappendblockacfail139170cdc25d69ce374d45" ] + "variables" : [ "jtcappendblockacfail022502c6278006ec0c462f96", "javablobappendblockacfail100440052a82ce04114c9d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[7].json new file mode 100644 index 000000000000..2a072c4ce823 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockacfail[7].json @@ -0,0 +1,111 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail099208ffc22f797e85435084?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29f9a13c-f797-47ea-a743-43546013dc6e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E693FDD29", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f11eb4c1-f01e-003a-0837-598bfa000000", + "Date" : "Mon, 13 Jul 2020 17:01:39 GMT", + "x-ms-client-request-id" : "29f9a13c-f797-47ea-a743-43546013dc6e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail099208ffc22f797e85435084/javablobappendblockacfail17946082fbcea6cf944c46", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4d24cf6-a3ea-44b4-a3e8-00ff8b9d66e8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E697126CA", + "Last-Modified" : "Mon, 13 Jul 2020 17:01:40 GMT", + "x-ms-version-id" : "2020-07-13T17:01:40.2880714Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "77e0b64d-201e-0064-1937-59601a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:01:39 GMT", + "x-ms-client-request-id" : "b4d24cf6-a3ea-44b4-a3e8-00ff8b9d66e8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail099208ffc22f797e85435084/javablobappendblockacfail17946082fbcea6cf944c46?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "517965da-95e8-42a0-9c58-4845a0523d9c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "56b01041-f01e-002a-6b37-594e92000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:56b01041-f01e-002a-6b37-594e92000000\nTime:2020-07-13T17:01:40.6743842Z", + "Date" : "Mon, 13 Jul 2020 17:01:40 GMT", + "x-ms-client-request-id" : "517965da-95e8-42a0-9c58-4845a0523d9c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a8a658d-a209-415f-a817-30e8d180c4d8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a070e19b-501e-0041-0737-59c966000000", + "Body" : "jtcappendblockacfailjtcappendblockacfail099208ffc22f797e85435084Mon, 13 Jul 2020 17:01:39 GMT\"0x8D8274E693FDD29\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:01:40 GMT", + "x-ms-client-request-id" : "8a8a658d-a209-415f-a817-30e8d180c4d8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockacfail099208ffc22f797e85435084?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c22aa8b4-5a60-4bb6-a5fe-b2872e55be75" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "301fc418-301e-0057-6137-593fb1000000", + "Date" : "Mon, 13 Jul 2020 17:01:40 GMT", + "x-ms-client-request-id" : "c22aa8b4-5a60-4bb6-a5fe-b2872e55be75" + }, + "Exception" : null + } ], + "variables" : [ "jtcappendblockacfail099208ffc22f797e85435084", "javablobappendblockacfail17946082fbcea6cf944c46" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[0].json index 0d15cf43177d..f3ef7851da52 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[0].json @@ -1,136 +1,138 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail085987a36f9ba3d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099904cabc1ffef?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0f7d95c4-eaa5-41ee-a3f0-2a2e9bfb3114" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5b62160-8972-440d-b7aa-18b9893946db" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8ECA54C", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "ETag" : "0x8D8274EB0DEAEEB", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57c2b-601e-0040-3df3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "0f7d95c4-eaa5-41ee-a3f0-2a2e9bfb3114" + "x-ms-request-id" : "2fbfde67-c01e-0098-6e37-59b1e3000000", + "Date" : "Mon, 13 Jul 2020 17:03:40 GMT", + "x-ms-client-request-id" : "b5b62160-8972-440d-b7aa-18b9893946db" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail085987a36f9ba3d/javablobappendblockfromurlacdestinationfail102360d69996b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099904cabc1ffef/javablobappendblockfromurlacdestinationfail128684fd25ca9", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8dafe193-2434-4135-a982-02e00991a7b8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "769e47f9-285f-4069-8377-80c58bb95d5c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8F3C278", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "ETag" : "0x8D8274EB14BE646", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:40 GMT", + "x-ms-version-id" : "2020-07-13T17:03:40.8398918Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57c46-601e-0040-54f3-121998000000", + "x-ms-request-id" : "105523b7-201e-004b-2937-596dd1000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "8dafe193-2434-4135-a982-02e00991a7b8" + "Date" : "Mon, 13 Jul 2020 17:03:40 GMT", + "x-ms-client-request-id" : "769e47f9-285f-4069-8377-80c58bb95d5c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail085987a36f9ba3d?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099904cabc1ffef?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d2a9fb89-8a0e-493c-8564-aeb283af96dc", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a840ca9d-86dd-4128-a23f-45e2448680c5", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8FB6EAB", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "ETag" : "0x8D8274EB1A68798", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57c79-601e-0040-7cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "d2a9fb89-8a0e-493c-8564-aeb283af96dc" + "x-ms-request-id" : "3245e72d-401e-0010-4037-5954ea000000", + "Date" : "Mon, 13 Jul 2020 17:03:40 GMT", + "x-ms-client-request-id" : "a840ca9d-86dd-4128-a23f-45e2448680c5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail085987a36f9ba3d/javablobappendblockfromurlacdestinationfail2487563da5047", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099904cabc1ffef/javablobappendblockfromurlacdestinationfail237330d36381f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "76d8aad4-1680-4b71-8d14-11c3f9f0189f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "928ba0b6-0bb8-48e0-8716-aa8a3591dbfe" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE902BA2C", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "ETag" : "0x8D8274EB1E338CA", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:41 GMT", + "x-ms-version-id" : "2020-07-13T17:03:41.8325974Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57caa-601e-0040-26f3-121998000000", + "x-ms-request-id" : "a78ef12c-501e-008a-3437-59ca33000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "76d8aad4-1680-4b71-8d14-11c3f9f0189f" + "Date" : "Mon, 13 Jul 2020 17:03:41 GMT", + "x-ms-client-request-id" : "928ba0b6-0bb8-48e0-8716-aa8a3591dbfe" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail085987a36f9ba3d/javablobappendblockfromurlacdestinationfail2487563da5047?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099904cabc1ffef/javablobappendblockfromurlacdestinationfail237330d36381f?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "49b4ef5f-21dd-4806-9ded-4c8a3a9f91bf", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "25f901bb-43d3-4575-82cf-3e026291375f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:42 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "ETag" : "0x8D7E10AE90BE414", + "Date" : "Mon, 13 Jul 2020 17:03:41 GMT", + "ETag" : "0x8D8274EB2209B13", "Content-Length" : "0", - "x-ms-request-id" : "caf57ce2-601e-0040-57f3-121998000000", - "x-ms-client-request-id" : "49b4ef5f-21dd-4806-9ded-4c8a3a9f91bf", + "x-ms-request-id" : "1aba707f-401e-003f-6237-595921000000", + "x-ms-client-request-id" : "25f901bb-43d3-4575-82cf-3e026291375f", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail085987a36f9ba3d/javablobappendblockfromurlacdestinationfail102360d69996b?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099904cabc1ffef/javablobappendblockfromurlacdestinationfail128684fd25ca9?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e6f75d6b-d32b-4ada-bbc5-752224431187" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a99379b-797e-4acc-b51a-6926616e7cf3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "253", "StatusCode" : "412", - "x-ms-request-id" : "caf57d06-601e-0040-77f3-121998000000", - "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:caf57d06-601e-0040-77f3-121998000000\nTime:2020-04-15T07:02:07.2582458Z", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "e6f75d6b-d32b-4ada-bbc5-752224431187", + "x-ms-request-id" : "2eafde79-e01e-0019-0837-591139000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:2eafde79-e01e-0019-0837-591139000000\nTime:2020-07-13T17:03:42.6873667Z", + "Date" : "Mon, 13 Jul 2020 17:03:42 GMT", + "x-ms-client-request-id" : "1a99379b-797e-4acc-b51a-6926616e7cf3", "Content-Type" : "application/xml" }, "Exception" : null @@ -138,43 +140,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurlacdestinationfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e4db5e1a-77a9-47e4-9d30-49072ca186b4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fda6d35-4da5-4465-b28c-115af0810ef0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57e03-601e-0040-4df3-121998000000", - "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail085987a36f9ba3dWed, 15 Apr 2020 07:02:07 GMT\"0x8D7E10AE8FB6EAB\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "e4db5e1a-77a9-47e4-9d30-49072ca186b4", + "x-ms-request-id" : "7a4b1212-a01e-0008-0237-598b8d000000", + "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail099904cabc1ffefMon, 13 Jul 2020 17:03:41 GMT\"0x8D8274EB1A68798\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:03:43 GMT", + "x-ms-client-request-id" : "0fda6d35-4da5-4465-b28c-115af0810ef0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail085987a36f9ba3d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099904cabc1ffef?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "96cc6b3c-70e3-48cd-bd56-d566b0150d3a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ecac13ad-342a-497c-8017-b8f5cb15d7d2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf57e1b-601e-0040-61f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "96cc6b3c-70e3-48cd-bd56-d566b0150d3a" + "x-ms-request-id" : "564c636e-501e-006e-5937-59c4ad000000", + "Date" : "Mon, 13 Jul 2020 17:03:43 GMT", + "x-ms-client-request-id" : "ecac13ad-342a-497c-8017-b8f5cb15d7d2" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurlacdestinationfail085987a36f9ba3d", "javablobappendblockfromurlacdestinationfail102360d69996b", "javablobappendblockfromurlacdestinationfail2487563da5047" ] + "variables" : [ "jtcappendblockfromurlacdestinationfail099904cabc1ffef", "javablobappendblockfromurlacdestinationfail128684fd25ca9", "javablobappendblockfromurlacdestinationfail237330d36381f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[1].json index e4a72d505cee..1626ccfa59bf 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[1].json @@ -1,136 +1,138 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail08800699b2cab30?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail033504a5e3d5381?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c95e5cd2-0652-4522-a7c4-798665309205" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7dc386d7-eb74-4d82-82af-05c1424aa86f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE9506103", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "ETag" : "0x8D8274EB34892E7", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57e44-601e-0040-02f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "c95e5cd2-0652-4522-a7c4-798665309205" + "x-ms-request-id" : "ab3a619c-301e-0035-0a37-59fd96000000", + "Date" : "Mon, 13 Jul 2020 17:03:43 GMT", + "x-ms-client-request-id" : "7dc386d7-eb74-4d82-82af-05c1424aa86f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail08800699b2cab30/javablobappendblockfromurlacdestinationfail1856530aa2c5c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail033504a5e3d5381/javablobappendblockfromurlacdestinationfail118522ec785da", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5afe3437-717d-4817-9b9f-60d94dce246b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e320a62-b9a7-45f3-b7b8-de23bb69dc93" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE95868B0", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "ETag" : "0x8D8274EB37F599B", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:44 GMT", + "x-ms-version-id" : "2020-07-13T17:03:44.5325211Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57e65-601e-0040-1ef3-121998000000", + "x-ms-request-id" : "8826f10f-d01e-005f-0537-5925be000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "5afe3437-717d-4817-9b9f-60d94dce246b" + "Date" : "Mon, 13 Jul 2020 17:03:43 GMT", + "x-ms-client-request-id" : "2e320a62-b9a7-45f3-b7b8-de23bb69dc93" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail08800699b2cab30?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail033504a5e3d5381?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e867a18e-804a-40aa-b445-ae790e7c35f8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f14b168-1d2a-48f5-97e4-9c481891748a", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE95F03DA", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "ETag" : "0x8D8274EB3B57CAA", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57e89-601e-0040-3cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "e867a18e-804a-40aa-b445-ae790e7c35f8" + "x-ms-request-id" : "76e5a317-701e-0024-6537-596722000000", + "Date" : "Mon, 13 Jul 2020 17:03:44 GMT", + "x-ms-client-request-id" : "6f14b168-1d2a-48f5-97e4-9c481891748a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail08800699b2cab30/javablobappendblockfromurlacdestinationfail2910880703010", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail033504a5e3d5381/javablobappendblockfromurlacdestinationfail2026775e164c2", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bc59ae90-ca19-49d3-9bab-a2fa1c6ac396" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe1f442f-a51a-41e8-a3f8-eda35db1ed4e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE965D967", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "ETag" : "0x8D8274EB3E7A44C", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:45 GMT", + "x-ms-version-id" : "2020-07-13T17:03:45.2160076Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57ead-601e-0040-59f3-121998000000", + "x-ms-request-id" : "225f53bd-b01e-003b-4a37-59d426000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "bc59ae90-ca19-49d3-9bab-a2fa1c6ac396" + "Date" : "Mon, 13 Jul 2020 17:03:45 GMT", + "x-ms-client-request-id" : "fe1f442f-a51a-41e8-a3f8-eda35db1ed4e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail08800699b2cab30/javablobappendblockfromurlacdestinationfail2910880703010?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail033504a5e3d5381/javablobappendblockfromurlacdestinationfail2026775e164c2?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8eec939b-d013-4a8b-8c82-e1abf7a23969", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5be34a9c-8405-4d82-9f2e-46c638e26c2b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:07 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:45 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "ETag" : "0x8D7E10AE96C91BE", + "Date" : "Mon, 13 Jul 2020 17:03:44 GMT", + "ETag" : "0x8D8274EB41EEAEC", "Content-Length" : "0", - "x-ms-request-id" : "caf57ecc-601e-0040-74f3-121998000000", - "x-ms-client-request-id" : "8eec939b-d013-4a8b-8c82-e1abf7a23969", + "x-ms-request-id" : "2656ea11-701e-008d-2c37-59a650000000", + "x-ms-client-request-id" : "5be34a9c-8405-4d82-9f2e-46c638e26c2b", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail08800699b2cab30/javablobappendblockfromurlacdestinationfail1856530aa2c5c?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail033504a5e3d5381/javablobappendblockfromurlacdestinationfail118522ec785da?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6a5372a3-6a85-4164-9231-d86ec5f913b3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46a05385-af0f-44c9-999d-ae90da2db14d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "253", "StatusCode" : "412", - "x-ms-request-id" : "caf57eea-601e-0040-10f3-121998000000", - "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:caf57eea-601e-0040-10f3-121998000000\nTime:2020-04-15T07:02:07.8848339Z", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "6a5372a3-6a85-4164-9231-d86ec5f913b3", + "x-ms-request-id" : "840cb178-c01e-0043-5b37-5977de000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:840cb178-c01e-0043-5b37-5977de000000\nTime:2020-07-13T17:03:45.9641803Z", + "Date" : "Mon, 13 Jul 2020 17:03:45 GMT", + "x-ms-client-request-id" : "46a05385-af0f-44c9-999d-ae90da2db14d", "Content-Type" : "application/xml" }, "Exception" : null @@ -138,43 +140,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurlacdestinationfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "23c69a54-cbfc-4786-b54c-979d60f3cd22" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac535ec5-5e3e-4fd8-989a-60f143b8209c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57f0b-601e-0040-2ff3-121998000000", - "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail08800699b2cab30Wed, 15 Apr 2020 07:02:07 GMT\"0x8D7E10AE95F03DA\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "23c69a54-cbfc-4786-b54c-979d60f3cd22", + "x-ms-request-id" : "88c34235-101e-0032-3a37-5991f5000000", + "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail033504a5e3d5381Mon, 13 Jul 2020 17:03:44 GMT\"0x8D8274EB3B57CAA\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:03:45 GMT", + "x-ms-client-request-id" : "ac535ec5-5e3e-4fd8-989a-60f143b8209c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail08800699b2cab30?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail033504a5e3d5381?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f44c9a19-d0aa-4831-85fb-f11c5be4729b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "456ee1d8-538e-4b39-84d2-7da8dff63cc8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf57f20-601e-0040-43f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "f44c9a19-d0aa-4831-85fb-f11c5be4729b" + "x-ms-request-id" : "b02ac07a-d01e-0070-5937-592875000000", + "Date" : "Mon, 13 Jul 2020 17:03:46 GMT", + "x-ms-client-request-id" : "456ee1d8-538e-4b39-84d2-7da8dff63cc8" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurlacdestinationfail08800699b2cab30", "javablobappendblockfromurlacdestinationfail1856530aa2c5c", "javablobappendblockfromurlacdestinationfail2910880703010" ] + "variables" : [ "jtcappendblockfromurlacdestinationfail033504a5e3d5381", "javablobappendblockfromurlacdestinationfail118522ec785da", "javablobappendblockfromurlacdestinationfail2026775e164c2" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[2].json index 330db2077587..b686b729f750 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[2].json @@ -1,136 +1,138 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099739dde06e786?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail046659f24ed7ad4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3ba666c7-ed1d-4cc1-b1ef-9df4f200cf37" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47ee5760-2996-4aad-8850-81fd09b3eb03" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE9890ACB", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB4F749F1", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57f38-601e-0040-57f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "3ba666c7-ed1d-4cc1-b1ef-9df4f200cf37" + "x-ms-request-id" : "0b7d44d9-401e-0086-0137-595d3b000000", + "Date" : "Mon, 13 Jul 2020 17:03:46 GMT", + "x-ms-client-request-id" : "47ee5760-2996-4aad-8850-81fd09b3eb03" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099739dde06e786/javablobappendblockfromurlacdestinationfail1443672724208", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail046659f24ed7ad4/javablobappendblockfromurlacdestinationfail17078055980c4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "26044a02-4d0d-4ae3-b29a-65ff05a5bdb3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7143557-1fa2-41cc-8a38-70ab1efac625" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE9913980", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB52AE64F", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:47 GMT", + "x-ms-version-id" : "2020-07-13T17:03:47.3345103Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57f5e-601e-0040-78f3-121998000000", + "x-ms-request-id" : "f8b7a44f-c01e-00a7-2037-597940000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "26044a02-4d0d-4ae3-b29a-65ff05a5bdb3" + "Date" : "Mon, 13 Jul 2020 17:03:46 GMT", + "x-ms-client-request-id" : "f7143557-1fa2-41cc-8a38-70ab1efac625" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099739dde06e786?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail046659f24ed7ad4?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8a541827-2e62-4f9b-b641-b2430aed4a3c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "45d46d48-5696-4c0b-9588-ccfa11f48863", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE997FC26", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB563C956", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57f82-601e-0040-14f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "8a541827-2e62-4f9b-b641-b2430aed4a3c" + "x-ms-request-id" : "40dfbd04-e01e-0026-1937-59d99a000000", + "Date" : "Mon, 13 Jul 2020 17:03:47 GMT", + "x-ms-client-request-id" : "45d46d48-5696-4c0b-9588-ccfa11f48863" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099739dde06e786/javablobappendblockfromurlacdestinationfail26308743c54ea", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail046659f24ed7ad4/javablobappendblockfromurlacdestinationfail2741904e1d2c4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "acc82a44-70d2-445b-b1b9-a800e4095ba4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15567da2-d03b-4c39-ac84-d2fff672a8db" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE99ED152", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB59F1A0C", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:48 GMT", + "x-ms-version-id" : "2020-07-13T17:03:48.0960524Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57f9a-601e-0040-2af3-121998000000", + "x-ms-request-id" : "fe9a4673-601e-0028-1037-59f02a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "acc82a44-70d2-445b-b1b9-a800e4095ba4" + "Date" : "Mon, 13 Jul 2020 17:03:47 GMT", + "x-ms-client-request-id" : "15567da2-d03b-4c39-ac84-d2fff672a8db" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099739dde06e786/javablobappendblockfromurlacdestinationfail26308743c54ea?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail046659f24ed7ad4/javablobappendblockfromurlacdestinationfail2741904e1d2c4?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fd61806e-20de-44ed-8b9f-b259bfae4c7d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3559dd6-4d79-42f8-96c9-ef15cda643aa", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "ETag" : "0x8D7E10AE9A5FEFD", + "Date" : "Mon, 13 Jul 2020 17:03:48 GMT", + "ETag" : "0x8D8274EB5D85CEB", "Content-Length" : "0", - "x-ms-request-id" : "caf57fb5-601e-0040-42f3-121998000000", - "x-ms-client-request-id" : "fd61806e-20de-44ed-8b9f-b259bfae4c7d", + "x-ms-request-id" : "9cb4117f-901e-0003-7a37-5970e6000000", + "x-ms-client-request-id" : "c3559dd6-4d79-42f8-96c9-ef15cda643aa", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099739dde06e786/javablobappendblockfromurlacdestinationfail1443672724208?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail046659f24ed7ad4/javablobappendblockfromurlacdestinationfail17078055980c4?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dcdc1f44-e478-4008-bfdc-4548e7561e17" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c2aad8b-49ce-4fc4-a20c-046e6779a00a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "253", "StatusCode" : "412", - "x-ms-request-id" : "caf57fd4-601e-0040-5cf3-121998000000", - "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:caf57fd4-601e-0040-5cf3-121998000000\nTime:2020-04-15T07:02:08.2551813Z", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "dcdc1f44-e478-4008-bfdc-4548e7561e17", + "x-ms-request-id" : "d393d20b-a01e-0055-4737-598109000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:d393d20b-a01e-0055-4737-598109000000\nTime:2020-07-13T17:03:48.8377264Z", + "Date" : "Mon, 13 Jul 2020 17:03:48 GMT", + "x-ms-client-request-id" : "9c2aad8b-49ce-4fc4-a20c-046e6779a00a", "Content-Type" : "application/xml" }, "Exception" : null @@ -138,43 +140,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurlacdestinationfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e67fc47a-8f81-48e3-b977-db291711b269" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2a3a9dd0-7af5-4f59-9e3e-cca30d7f1bfb" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57fe7-601e-0040-6df3-121998000000", - "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail099739dde06e786Wed, 15 Apr 2020 07:02:08 GMT\"0x8D7E10AE997FC26\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "e67fc47a-8f81-48e3-b977-db291711b269", + "x-ms-request-id" : "f83ffff4-601e-0007-6437-59fde1000000", + "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail046659f24ed7ad4Mon, 13 Jul 2020 17:03:47 GMT\"0x8D8274EB563C956\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:03:48 GMT", + "x-ms-client-request-id" : "2a3a9dd0-7af5-4f59-9e3e-cca30d7f1bfb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail099739dde06e786?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail046659f24ed7ad4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "01af1ac8-2e4d-4a7f-b4da-dc0456784c04" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ee028c7-0a71-4ea7-a46e-3ec7eeccaf8a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf58002-601e-0040-01f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "01af1ac8-2e4d-4a7f-b4da-dc0456784c04" + "x-ms-request-id" : "34f07189-401e-0096-7837-599853000000", + "Date" : "Mon, 13 Jul 2020 17:03:49 GMT", + "x-ms-client-request-id" : "4ee028c7-0a71-4ea7-a46e-3ec7eeccaf8a" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurlacdestinationfail099739dde06e786", "javablobappendblockfromurlacdestinationfail1443672724208", "javablobappendblockfromurlacdestinationfail26308743c54ea" ] + "variables" : [ "jtcappendblockfromurlacdestinationfail046659f24ed7ad4", "javablobappendblockfromurlacdestinationfail17078055980c4", "javablobappendblockfromurlacdestinationfail2741904e1d2c4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[3].json index 99977095fff0..ef264a431ce0 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[3].json @@ -1,166 +1,169 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail013279bbcca7376?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0008460c5b025ff?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3be1db16-ba03-4e63-8e7c-bcc87f15f206" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "02b43bb3-5763-402c-9bab-fece379bb213" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE9C5861F", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB6ACA12A", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf58021-601e-0040-1cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "3be1db16-ba03-4e63-8e7c-bcc87f15f206" + "x-ms-request-id" : "7825ad4e-801e-0020-7f37-59ea25000000", + "Date" : "Mon, 13 Jul 2020 17:03:49 GMT", + "x-ms-client-request-id" : "02b43bb3-5763-402c-9bab-fece379bb213" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail013279bbcca7376/javablobappendblockfromurlacdestinationfail141213f3b80eb", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0008460c5b025ff/javablobappendblockfromurlacdestinationfail199490d696e9b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4cf3b1a5-920a-44b6-b2ac-3fa4f1957c23" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "358f029c-a202-4f36-9ad6-5969d502cebb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE9CD3F6C", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB6DDA07E", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:50 GMT", + "x-ms-version-id" : "2020-07-13T17:03:50.1835390Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5803b-601e-0040-31f3-121998000000", + "x-ms-request-id" : "08ac44af-901e-005e-6537-597a62000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "4cf3b1a5-920a-44b6-b2ac-3fa4f1957c23" + "Date" : "Mon, 13 Jul 2020 17:03:49 GMT", + "x-ms-client-request-id" : "358f029c-a202-4f36-9ad6-5969d502cebb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail013279bbcca7376?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0008460c5b025ff?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "304b98dc-8785-4d7a-b49e-f2d4d0883332", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b23cbd34-7f0d-4a2a-b0cd-718728a5ab49", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE9D4298E", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB714FCBD", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf58059-601e-0040-4cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:07 GMT", - "x-ms-client-request-id" : "304b98dc-8785-4d7a-b49e-f2d4d0883332" + "x-ms-request-id" : "6edc5600-301e-009c-1137-593ce4000000", + "Date" : "Mon, 13 Jul 2020 17:03:50 GMT", + "x-ms-client-request-id" : "b23cbd34-7f0d-4a2a-b0cd-718728a5ab49" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail013279bbcca7376/javablobappendblockfromurlacdestinationfail141213f3b80eb", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0008460c5b025ff/javablobappendblockfromurlacdestinationfail199490d696e9b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "067bf92b-8929-4af0-a93e-daa9852b407c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc398043-84c2-4bde-9449-f9b019b1049b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "x-ms-version-id" : "2020-07-13T17:03:50.1835390Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:50 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", + "Date" : "Mon, 13 Jul 2020 17:03:50 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10AE9CD3F6C", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB6DDA07E", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:03:50 GMT", "Content-Length" : "0", - "x-ms-request-id" : "caf58071-601e-0040-62f3-121998000000", - "x-ms-client-request-id" : "067bf92b-8929-4af0-a93e-daa9852b407c", + "x-ms-request-id" : "af23b9b7-b01e-0076-0237-591bca000000", + "x-ms-client-request-id" : "bc398043-84c2-4bde-9449-f9b019b1049b", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail013279bbcca7376/javablobappendblockfromurlacdestinationfail2559450fb7fce", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0008460c5b025ff/javablobappendblockfromurlacdestinationfail250362391540a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6923bd17-1cb3-418f-a65b-adee0f4917ed" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8207203-1667-41bb-8915-270858ff762b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE9E27A2C", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB7815151", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:51 GMT", + "x-ms-version-id" : "2020-07-13T17:03:51.2563025Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf58094-601e-0040-7df3-121998000000", + "x-ms-request-id" : "c58eae74-d01e-003d-3737-59e799000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "6923bd17-1cb3-418f-a65b-adee0f4917ed" + "Date" : "Mon, 13 Jul 2020 17:03:51 GMT", + "x-ms-client-request-id" : "f8207203-1667-41bb-8915-270858ff762b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail013279bbcca7376/javablobappendblockfromurlacdestinationfail2559450fb7fce?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0008460c5b025ff/javablobappendblockfromurlacdestinationfail250362391540a?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "14788830-8adb-4c73-b419-0bf8040b114f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "67ee6439-edf8-4420-abba-6c91732fbf36", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "ETag" : "0x8D7E10AE9EB07BD", + "Date" : "Mon, 13 Jul 2020 17:03:51 GMT", + "ETag" : "0x8D8274EB7B674C7", "Content-Length" : "0", - "x-ms-request-id" : "caf580de-601e-0040-39f3-121998000000", - "x-ms-client-request-id" : "14788830-8adb-4c73-b419-0bf8040b114f", + "x-ms-request-id" : "4b9312f4-f01e-0067-0537-59817e000000", + "x-ms-client-request-id" : "67ee6439-edf8-4420-abba-6c91732fbf36", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail013279bbcca7376/javablobappendblockfromurlacdestinationfail141213f3b80eb?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0008460c5b025ff/javablobappendblockfromurlacdestinationfail199490d696e9b?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c6fc9f6c-afac-4ad9-a130-717a7f4c6670" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d3a5b1b-6940-462e-b2db-699df5eb1e59" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "253", "StatusCode" : "412", - "x-ms-request-id" : "caf58103-601e-0040-5cf3-121998000000", - "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:caf58103-601e-0040-5cf3-121998000000\nTime:2020-04-15T07:02:08.7146119Z", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "c6fc9f6c-afac-4ad9-a130-717a7f4c6670", + "x-ms-request-id" : "1efdddaa-801e-007d-4337-59e0a1000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:1efdddaa-801e-007d-4337-59e0a1000000\nTime:2020-07-13T17:03:52.1304347Z", + "Date" : "Mon, 13 Jul 2020 17:03:51 GMT", + "x-ms-client-request-id" : "8d3a5b1b-6940-462e-b2db-699df5eb1e59", "Content-Type" : "application/xml" }, "Exception" : null @@ -168,43 +171,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurlacdestinationfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fe98170f-e086-4fad-898a-81712ad4d4e1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "60a3bb76-9eb3-4fe9-8e90-3e4974482b6e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf58139-601e-0040-0df3-121998000000", - "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail013279bbcca7376Wed, 15 Apr 2020 07:02:08 GMT\"0x8D7E10AE9D4298E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "fe98170f-e086-4fad-898a-81712ad4d4e1", + "x-ms-request-id" : "4770d6b2-201e-0080-0c37-596e84000000", + "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail0008460c5b025ffMon, 13 Jul 2020 17:03:50 GMT\"0x8D8274EB714FCBD\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:03:51 GMT", + "x-ms-client-request-id" : "60a3bb76-9eb3-4fe9-8e90-3e4974482b6e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail013279bbcca7376?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0008460c5b025ff?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "25fe848f-c614-449e-b115-b7a0f11a8981" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b42c6cf3-8ede-4552-813f-041709830fd3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf58168-601e-0040-39f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "25fe848f-c614-449e-b115-b7a0f11a8981" + "x-ms-request-id" : "e0d1814e-701e-0046-6237-59a505000000", + "Date" : "Mon, 13 Jul 2020 17:03:51 GMT", + "x-ms-client-request-id" : "b42c6cf3-8ede-4552-813f-041709830fd3" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurlacdestinationfail013279bbcca7376", "javablobappendblockfromurlacdestinationfail141213f3b80eb", "javablobappendblockfromurlacdestinationfail2559450fb7fce" ] + "variables" : [ "jtcappendblockfromurlacdestinationfail0008460c5b025ff", "javablobappendblockfromurlacdestinationfail199490d696e9b", "javablobappendblockfromurlacdestinationfail250362391540a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[4].json index fd2b4790d31d..ea537b81d320 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[4].json @@ -1,158 +1,160 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail079564b845f60c0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail000348fa6530196?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f0a03dbb-127b-4c3d-95d9-2ae972e7c1cf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a1d7e7e-2e69-4dff-a935-37f336613723" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA0A40B6", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB8AB2896", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:53 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf58198-601e-0040-65f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "f0a03dbb-127b-4c3d-95d9-2ae972e7c1cf" + "x-ms-request-id" : "4ae96e31-701e-0034-3037-59a24a000000", + "Date" : "Mon, 13 Jul 2020 17:03:52 GMT", + "x-ms-client-request-id" : "4a1d7e7e-2e69-4dff-a935-37f336613723" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail079564b845f60c0/javablobappendblockfromurlacdestinationfail12960470efade", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail000348fa6530196/javablobappendblockfromurlacdestinationfail1307917dd9a88", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b01e9183-f998-490c-af5c-8513a8eeda19" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4aac48eb-2cdb-4b7d-b096-5dce39bcc1c3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA124831", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB8E2CF75", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:53 GMT", + "x-ms-version-id" : "2020-07-13T17:03:53.5729525Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf581c2-601e-0040-0ef3-121998000000", + "x-ms-request-id" : "79c85a25-001e-0087-1937-5902e7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "b01e9183-f998-490c-af5c-8513a8eeda19" + "Date" : "Mon, 13 Jul 2020 17:03:53 GMT", + "x-ms-client-request-id" : "4aac48eb-2cdb-4b7d-b096-5dce39bcc1c3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail079564b845f60c0?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail000348fa6530196?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f66dd05a-2f6e-49d3-a005-886eeba52c09", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2635eaf7-96f0-49b3-9647-d9f7dc1c8cb1", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA19A817", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB919DDCD", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:53 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf581ed-601e-0040-37f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "f66dd05a-2f6e-49d3-a005-886eeba52c09" + "x-ms-request-id" : "e6dbb058-201e-0074-7337-59a572000000", + "Date" : "Mon, 13 Jul 2020 17:03:53 GMT", + "x-ms-client-request-id" : "2635eaf7-96f0-49b3-9647-d9f7dc1c8cb1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail079564b845f60c0/javablobappendblockfromurlacdestinationfail12960470efade?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail000348fa6530196/javablobappendblockfromurlacdestinationfail1307917dd9a88?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fd0db106-27c3-4386-8b5f-70677e339a9b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba9756a5-493f-4f41-8230-579af7d9d6b3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA124831", - "x-ms-lease-id" : "ac1b3b5c-cbea-4d1c-810f-b59fe95ae179", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:08 GMT", + "ETag" : "0x8D8274EB8E2CF75", + "x-ms-lease-id" : "ac97d2ff-4631-4ccf-b6bc-46ac7a2b3531", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:53 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf58214-601e-0040-56f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "fd0db106-27c3-4386-8b5f-70677e339a9b" + "x-ms-request-id" : "732fcc11-401e-0062-7d37-5953a5000000", + "Date" : "Mon, 13 Jul 2020 17:03:53 GMT", + "x-ms-client-request-id" : "ba9756a5-493f-4f41-8230-579af7d9d6b3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail079564b845f60c0/javablobappendblockfromurlacdestinationfail2494448a56571", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail000348fa6530196/javablobappendblockfromurlacdestinationfail216315d2a557d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7d23f58b-6f70-415b-92ee-6e3b533a3d18" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47a73dff-2fa6-44b2-b1dc-9265fd394010" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA286D85", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EB989DC4A", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:54 GMT", + "x-ms-version-id" : "2020-07-13T17:03:54.6677322Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5822a-601e-0040-6af3-121998000000", + "x-ms-request-id" : "cf6d55c2-001e-0001-7d37-59ce5e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "7d23f58b-6f70-415b-92ee-6e3b533a3d18" + "Date" : "Mon, 13 Jul 2020 17:03:54 GMT", + "x-ms-client-request-id" : "47a73dff-2fa6-44b2-b1dc-9265fd394010" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail079564b845f60c0/javablobappendblockfromurlacdestinationfail2494448a56571?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail000348fa6530196/javablobappendblockfromurlacdestinationfail216315d2a557d?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dd6c7c85-e6b3-4c93-a961-31c73ec91c9f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "94d625e5-af2e-46c5-8dc7-2f80bba23cb8", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:55 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "ETag" : "0x8D7E10AEA2F7414", + "Date" : "Mon, 13 Jul 2020 17:03:54 GMT", + "ETag" : "0x8D8274EB9BF4DEE", "Content-Length" : "0", - "x-ms-request-id" : "caf58261-601e-0040-1df3-121998000000", - "x-ms-client-request-id" : "dd6c7c85-e6b3-4c93-a961-31c73ec91c9f", + "x-ms-request-id" : "a7b79e0c-b01e-002b-4e37-59114e000000", + "x-ms-client-request-id" : "94d625e5-af2e-46c5-8dc7-2f80bba23cb8", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail079564b845f60c0/javablobappendblockfromurlacdestinationfail12960470efade?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail000348fa6530196/javablobappendblockfromurlacdestinationfail1307917dd9a88?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7aa2c39e-4528-4f01-8c7c-69d6e4b55740" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "77414d61-ad55-4b30-9f39-9c9b1b8b3b25" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "265", "StatusCode" : "412", - "x-ms-request-id" : "caf5827e-601e-0040-39f3-121998000000", - "Body" : "\nLeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:caf5827e-601e-0040-39f3-121998000000\nTime:2020-04-15T07:02:09.1640356Z", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "7aa2c39e-4528-4f01-8c7c-69d6e4b55740", + "x-ms-request-id" : "54bddd6e-f01e-0005-1e37-594359000000", + "Body" : "\nLeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:54bddd6e-f01e-0005-1e37-594359000000\nTime:2020-07-13T17:03:55.4250696Z", + "Date" : "Mon, 13 Jul 2020 17:03:55 GMT", + "x-ms-client-request-id" : "77414d61-ad55-4b30-9f39-9c9b1b8b3b25", "Content-Type" : "application/xml" }, "Exception" : null @@ -160,43 +162,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurlacdestinationfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "57683427-d015-48c5-92ea-a84b83c3dbb3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "04011ea0-87ff-43a4-b3ca-5491d24e70ff" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf5828f-601e-0040-49f3-121998000000", - "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail079564b845f60c0Wed, 15 Apr 2020 07:02:08 GMT\"0x8D7E10AEA19A817\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "57683427-d015-48c5-92ea-a84b83c3dbb3", + "x-ms-request-id" : "fb6c181c-501e-001c-5837-59c3e2000000", + "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail000348fa6530196Mon, 13 Jul 2020 17:03:53 GMT\"0x8D8274EB919DDCD\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:03:55 GMT", + "x-ms-client-request-id" : "04011ea0-87ff-43a4-b3ca-5491d24e70ff", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail079564b845f60c0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail000348fa6530196?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "85817d2d-4a73-47e1-96bd-938f32f676e3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d293900-1c4b-4307-9832-0232aa4254f3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf582a5-601e-0040-5df3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "85817d2d-4a73-47e1-96bd-938f32f676e3" + "x-ms-request-id" : "0ee2f42c-301e-000a-2d37-593535000000", + "Date" : "Mon, 13 Jul 2020 17:03:55 GMT", + "x-ms-client-request-id" : "1d293900-1c4b-4307-9832-0232aa4254f3" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurlacdestinationfail079564b845f60c0", "javablobappendblockfromurlacdestinationfail12960470efade", "javablobappendblockfromurlacdestinationfail2494448a56571" ] + "variables" : [ "jtcappendblockfromurlacdestinationfail000348fa6530196", "javablobappendblockfromurlacdestinationfail1307917dd9a88", "javablobappendblockfromurlacdestinationfail216315d2a557d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[5].json index 07237d366996..f60eda9e2670 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[5].json @@ -1,136 +1,138 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0404933afcdd6c0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail00988028d67cdb9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4482adb3-d43d-4150-8895-6e5a69535c70" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e30c745-0c76-4615-8744-3a6ae581ab07" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA4C1477", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EBAA1BF6A", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:56 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf582c7-601e-0040-7cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "4482adb3-d43d-4150-8895-6e5a69535c70" + "x-ms-request-id" : "4bc38637-b01e-0049-7137-59d369000000", + "Date" : "Mon, 13 Jul 2020 17:03:56 GMT", + "x-ms-client-request-id" : "6e30c745-0c76-4615-8744-3a6ae581ab07" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0404933afcdd6c0/javablobappendblockfromurlacdestinationfail1978124e5be3e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail00988028d67cdb9/javablobappendblockfromurlacdestinationfail15461029b7250", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cb06378e-74a7-4a62-a092-12b2302f3aea" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0aa1181f-ccdf-4abd-a311-bad1894e6ff5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA535859", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EBAD73286", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:56 GMT", + "x-ms-version-id" : "2020-07-13T17:03:56.8522886Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf582d9-601e-0040-0bf3-121998000000", + "x-ms-request-id" : "a857adf1-a01e-0037-6537-59432e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "cb06378e-74a7-4a62-a092-12b2302f3aea" + "Date" : "Mon, 13 Jul 2020 17:03:56 GMT", + "x-ms-client-request-id" : "0aa1181f-ccdf-4abd-a311-bad1894e6ff5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0404933afcdd6c0?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail00988028d67cdb9?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "92bb01ff-194d-4edf-bb7f-8bc4c9a8543b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f5e0061-7e64-4e59-be4a-91d959629d23", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA59F547", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EBB09D370", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf582ea-601e-0040-1af3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "92bb01ff-194d-4edf-bb7f-8bc4c9a8543b" + "x-ms-request-id" : "ad1a0304-001e-004c-3c37-5901b2000000", + "Date" : "Mon, 13 Jul 2020 17:03:57 GMT", + "x-ms-client-request-id" : "4f5e0061-7e64-4e59-be4a-91d959629d23" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0404933afcdd6c0/javablobappendblockfromurlacdestinationfail26779935bd36d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail00988028d67cdb9/javablobappendblockfromurlacdestinationfail2368845e59e0e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a194ec47-97a7-4b41-b186-60fc7e957645" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "41bfd695-d1a5-4ac7-be0f-e2fae146bdbf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA644C54", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EBB4067C2", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:57 GMT", + "x-ms-version-id" : "2020-07-13T17:03:57.5417794Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf58302-601e-0040-2df3-121998000000", + "x-ms-request-id" : "262a2e8c-f01e-0077-5237-594416000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "x-ms-client-request-id" : "a194ec47-97a7-4b41-b186-60fc7e957645" + "Date" : "Mon, 13 Jul 2020 17:03:57 GMT", + "x-ms-client-request-id" : "41bfd695-d1a5-4ac7-be0f-e2fae146bdbf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0404933afcdd6c0/javablobappendblockfromurlacdestinationfail26779935bd36d?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail00988028d67cdb9/javablobappendblockfromurlacdestinationfail2368845e59e0e?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b8257ce9-893b-406d-8864-7b1517f010ce", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1eb01116-f2b0-4108-951a-13e508fa2fe7", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:57 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:08 GMT", - "ETag" : "0x8D7E10AEA6BA11B", + "Date" : "Mon, 13 Jul 2020 17:03:57 GMT", + "ETag" : "0x8D8274EBB762798", "Content-Length" : "0", - "x-ms-request-id" : "caf58320-601e-0040-46f3-121998000000", - "x-ms-client-request-id" : "b8257ce9-893b-406d-8864-7b1517f010ce", + "x-ms-request-id" : "3d87006d-f01e-0015-5337-598631000000", + "x-ms-client-request-id" : "1eb01116-f2b0-4108-951a-13e508fa2fe7", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0404933afcdd6c0/javablobappendblockfromurlacdestinationfail1978124e5be3e?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail00988028d67cdb9/javablobappendblockfromurlacdestinationfail15461029b7250?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7740367f-3921-4adc-b3fb-19bb4ef6e4de" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef772a3f-855d-429c-a4ce-b4ac8fc53909" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "AppendPositionConditionNotMet", "retry-after" : "0", "Content-Length" : "251", "StatusCode" : "412", - "x-ms-request-id" : "caf58347-601e-0040-65f3-121998000000", - "Body" : "\nAppendPositionConditionNotMetThe append position condition specified was not met.\nRequestId:caf58347-601e-0040-65f3-121998000000\nTime:2020-04-15T07:02:09.5574019Z", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "7740367f-3921-4adc-b3fb-19bb4ef6e4de", + "x-ms-request-id" : "74cd5d35-c01e-0053-6e37-59b2b6000000", + "Body" : "\nAppendPositionConditionNotMetThe append position condition specified was not met.\nRequestId:74cd5d35-c01e-0053-6e37-59b2b6000000\nTime:2020-07-13T17:03:58.2742071Z", + "Date" : "Mon, 13 Jul 2020 17:03:57 GMT", + "x-ms-client-request-id" : "ef772a3f-855d-429c-a4ce-b4ac8fc53909", "Content-Type" : "application/xml" }, "Exception" : null @@ -138,43 +140,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurlacdestinationfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6dbc96d8-7325-4485-ab66-42ffc4e7d8d9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b45268e-f22d-40f7-b5b5-fbf77740b035" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf58368-601e-0040-7ff3-121998000000", - "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail0404933afcdd6c0Wed, 15 Apr 2020 07:02:09 GMT\"0x8D7E10AEA59F547\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "6dbc96d8-7325-4485-ab66-42ffc4e7d8d9", + "x-ms-request-id" : "0d58b111-501e-007e-3437-5901c5000000", + "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail00988028d67cdb9Mon, 13 Jul 2020 17:03:57 GMT\"0x8D8274EBB09D370\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:03:57 GMT", + "x-ms-client-request-id" : "5b45268e-f22d-40f7-b5b5-fbf77740b035", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail0404933afcdd6c0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail00988028d67cdb9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d561844c-8023-4106-be65-cafe55c7fc1a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7f96c0e-6fde-464d-9212-44a3e64aa0bf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf5837c-601e-0040-0ff3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "d561844c-8023-4106-be65-cafe55c7fc1a" + "x-ms-request-id" : "c208fb2f-c01e-006c-7337-597a15000000", + "Date" : "Mon, 13 Jul 2020 17:03:58 GMT", + "x-ms-client-request-id" : "f7f96c0e-6fde-464d-9212-44a3e64aa0bf" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurlacdestinationfail0404933afcdd6c0", "javablobappendblockfromurlacdestinationfail1978124e5be3e", "javablobappendblockfromurlacdestinationfail26779935bd36d" ] + "variables" : [ "jtcappendblockfromurlacdestinationfail00988028d67cdb9", "javablobappendblockfromurlacdestinationfail15461029b7250", "javablobappendblockfromurlacdestinationfail2368845e59e0e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[6].json index 24465a64ff84..89ac2effb5f6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[6].json @@ -1,136 +1,138 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail026428ed85c4c5e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail07035506bb31787?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ae628f31-7fa5-432e-84c4-8137d2687579" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "303394aa-2361-49ba-9be6-90cd2843859f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA8A3DCD", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EBC542CCC", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:59 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf583a4-601e-0040-33f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "ae628f31-7fa5-432e-84c4-8137d2687579" + "x-ms-request-id" : "762d3659-001e-0097-7937-59c78f000000", + "Date" : "Mon, 13 Jul 2020 17:03:58 GMT", + "x-ms-client-request-id" : "303394aa-2361-49ba-9be6-90cd2843859f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail026428ed85c4c5e/javablobappendblockfromurlacdestinationfail1625465a86e29", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail07035506bb31787/javablobappendblockfromurlacdestinationfail19458124afe0f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b9909b6e-cb3a-4658-a4b0-f310a61e1f8d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8afdb465-06d5-429f-af78-cbc737917628" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA91CFDF", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EBC8C853C", + "Last-Modified" : "Mon, 13 Jul 2020 17:03:59 GMT", + "x-ms-version-id" : "2020-07-13T17:03:59.7183292Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf583c3-601e-0040-4df3-121998000000", + "x-ms-request-id" : "4a86ef54-801e-0099-2237-59ee3f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "b9909b6e-cb3a-4658-a4b0-f310a61e1f8d" + "Date" : "Mon, 13 Jul 2020 17:03:59 GMT", + "x-ms-client-request-id" : "8afdb465-06d5-429f-af78-cbc737917628" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail026428ed85c4c5e?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail07035506bb31787?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c5877d8e-9895-4819-a6d6-2ebc0f23cf4b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae456af5-9a11-418b-9c78-236271b69d5b", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA98BB78", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EBCC03801", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:00 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf583e1-601e-0040-66f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "c5877d8e-9895-4819-a6d6-2ebc0f23cf4b" + "x-ms-request-id" : "f40cfcdf-001e-0073-7337-59c911000000", + "Date" : "Mon, 13 Jul 2020 17:03:59 GMT", + "x-ms-client-request-id" : "ae456af5-9a11-418b-9c78-236271b69d5b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail026428ed85c4c5e/javablobappendblockfromurlacdestinationfail224389a00a92c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail07035506bb31787/javablobappendblockfromurlacdestinationfail232427aeb63c4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dfb5c64c-3a4b-4a2d-930f-1d40f6fc6e78" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "19e65d7f-3e89-482b-beff-1aeb6effe11f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AEA9F67BA", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "ETag" : "0x8D8274EBCF54530", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:00 GMT", + "x-ms-version-id" : "2020-07-13T17:04:00.4048176Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf583f4-601e-0040-77f3-121998000000", + "x-ms-request-id" : "02515b83-901e-0061-4737-59b2c1000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "dfb5c64c-3a4b-4a2d-930f-1d40f6fc6e78" + "Date" : "Mon, 13 Jul 2020 17:03:59 GMT", + "x-ms-client-request-id" : "19e65d7f-3e89-482b-beff-1aeb6effe11f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail026428ed85c4c5e/javablobappendblockfromurlacdestinationfail224389a00a92c?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail07035506bb31787/javablobappendblockfromurlacdestinationfail232427aeb63c4?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b9efd2b0-8e7a-4a28-a546-8106e8ab71b8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "57fa177d-5a17-46cf-895d-f7abd878369b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:09 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:00 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "ETag" : "0x8D7E10AEAA7CE1D", + "Date" : "Mon, 13 Jul 2020 17:04:00 GMT", + "ETag" : "0x8D8274EBD297E24", "Content-Length" : "0", - "x-ms-request-id" : "caf58410-601e-0040-12f3-121998000000", - "x-ms-client-request-id" : "b9efd2b0-8e7a-4a28-a546-8106e8ab71b8", + "x-ms-request-id" : "72516eaf-e01e-009f-1937-59dd80000000", + "x-ms-client-request-id" : "57fa177d-5a17-46cf-895d-f7abd878369b", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail026428ed85c4c5e/javablobappendblockfromurlacdestinationfail1625465a86e29?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail07035506bb31787/javablobappendblockfromurlacdestinationfail19458124afe0f?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0541eacb-e284-4f47-951f-5a2f651b6597" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2b9f5fc-4120-49ee-b66c-9f582c27144a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "MaxBlobSizeConditionNotMet", "retry-after" : "0", "Content-Length" : "246", "StatusCode" : "412", - "x-ms-request-id" : "caf58432-601e-0040-2ff3-121998000000", - "Body" : "\nMaxBlobSizeConditionNotMetThe max blob size condition specified was not met.\nRequestId:caf58432-601e-0040-2ff3-121998000000\nTime:2020-04-15T07:02:09.9517723Z", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "0541eacb-e284-4f47-951f-5a2f651b6597", + "x-ms-request-id" : "da54a22b-201e-0029-6e37-59aff6000000", + "Body" : "\nMaxBlobSizeConditionNotMetThe max blob size condition specified was not met.\nRequestId:da54a22b-201e-0029-6e37-59aff6000000\nTime:2020-07-13T17:04:01.1658128Z", + "Date" : "Mon, 13 Jul 2020 17:04:00 GMT", + "x-ms-client-request-id" : "b2b9f5fc-4120-49ee-b66c-9f582c27144a", "Content-Type" : "application/xml" }, "Exception" : null @@ -138,43 +140,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurlacdestinationfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "610f7654-8b99-4ac4-8273-c59713eee776" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b957ddfe-88e5-4734-8744-a9358b1e88fd" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf5844c-601e-0040-48f3-121998000000", - "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail026428ed85c4c5eWed, 15 Apr 2020 07:02:09 GMT\"0x8D7E10AEA98BB78\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "610f7654-8b99-4ac4-8273-c59713eee776", + "x-ms-request-id" : "8918973f-a01e-0018-2037-594ee5000000", + "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail07035506bb31787Mon, 13 Jul 2020 17:04:00 GMT\"0x8D8274EBCC03801\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:01 GMT", + "x-ms-client-request-id" : "b957ddfe-88e5-4734-8744-a9358b1e88fd", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail026428ed85c4c5e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail07035506bb31787?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "380d0bcc-f186-47a5-9484-ec63be04fe84" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a2ff420-948c-403e-9fa9-5b993d797a5c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf58464-601e-0040-60f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:09 GMT", - "x-ms-client-request-id" : "380d0bcc-f186-47a5-9484-ec63be04fe84" + "x-ms-request-id" : "f5942c29-301e-001a-5937-59f05d000000", + "Date" : "Mon, 13 Jul 2020 17:04:01 GMT", + "x-ms-client-request-id" : "1a2ff420-948c-403e-9fa9-5b993d797a5c" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurlacdestinationfail026428ed85c4c5e", "javablobappendblockfromurlacdestinationfail1625465a86e29", "javablobappendblockfromurlacdestinationfail224389a00a92c" ] + "variables" : [ "jtcappendblockfromurlacdestinationfail07035506bb31787", "javablobappendblockfromurlacdestinationfail19458124afe0f", "javablobappendblockfromurlacdestinationfail232427aeb63c4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[7].json new file mode 100644 index 000000000000..19e10972e422 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurlacdestinationfail[7].json @@ -0,0 +1,181 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail034758265a14738?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d308275-cdfe-436a-ac02-252149052414" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274EBE0B2874", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:02 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "36bbf205-101e-001d-3937-599c3e000000", + "Date" : "Mon, 13 Jul 2020 17:04:01 GMT", + "x-ms-client-request-id" : "1d308275-cdfe-436a-ac02-252149052414" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail034758265a14738/javablobappendblockfromurlacdestinationfail162893ee7a455", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "397624e3-2d04-4ee2-baa2-5df853b127b5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274EBE3C7FCB", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:02 GMT", + "x-ms-version-id" : "2020-07-13T17:04:02.5493451Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "196741d2-201e-005b-0237-59a8b9000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:04:02 GMT", + "x-ms-client-request-id" : "397624e3-2d04-4ee2-baa2-5df853b127b5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail034758265a14738?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e510f54c-cdce-4c30-b3ff-ffa459b4f691", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274EBE7A1F96", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:02 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "2e353b3e-101e-000d-6f37-595956000000", + "Date" : "Mon, 13 Jul 2020 17:04:02 GMT", + "x-ms-client-request-id" : "e510f54c-cdce-4c30-b3ff-ffa459b4f691" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail034758265a14738/javablobappendblockfromurlacdestinationfail230312b0a5377", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "27b6bdf0-2a55-4c5a-878b-3ef1f806111f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274EBEAB5B65", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:03 GMT", + "x-ms-version-id" : "2020-07-13T17:04:03.2768634Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a1ae5917-801e-000f-6837-59e7ee000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:04:02 GMT", + "x-ms-client-request-id" : "27b6bdf0-2a55-4c5a-878b-3ef1f806111f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail034758265a14738/javablobappendblockfromurlacdestinationfail230312b0a5377?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8415ee4b-cd1e-45eb-9704-ffbbb36dca38", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-blob-committed-block-count" : "1", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:03 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:04:03 GMT", + "ETag" : "0x8D8274EBEDEA9BC", + "Content-Length" : "0", + "x-ms-request-id" : "059308b9-201e-0039-2137-596a9e000000", + "x-ms-client-request-id" : "8415ee4b-cd1e-45eb-9704-ffbbb36dca38", + "x-ms-blob-append-offset" : "0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail034758265a14738/javablobappendblockfromurlacdestinationfail162893ee7a455?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87267261-861e-4f7c-b2c9-07759e185dd8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "253", + "StatusCode" : "412", + "x-ms-request-id" : "96055d53-901e-0013-4d37-59b58e000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:96055d53-901e-0013-4d37-59b58e000000\nTime:2020-07-13T17:04:03.9789991Z", + "Date" : "Mon, 13 Jul 2020 17:04:03 GMT", + "x-ms-client-request-id" : "87267261-861e-4f7c-b2c9-07759e185dd8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurlacdestinationfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2568dc7a-13e4-4e92-96d4-a2b305d4d4fe" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "824fd70f-001e-003e-8037-5906fd000000", + "Body" : "jtcappendblockfromurlacdestinationfailjtcappendblockfromurlacdestinationfail034758265a14738Mon, 13 Jul 2020 17:04:02 GMT\"0x8D8274EBE7A1F96\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:04 GMT", + "x-ms-client-request-id" : "2568dc7a-13e4-4e92-96d4-a2b305d4d4fe", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurlacdestinationfail034758265a14738?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16d856f8-d152-4cd2-9996-cf9c35604be0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "f7f8fcfc-301e-0068-6e37-59f712000000", + "Date" : "Mon, 13 Jul 2020 17:04:04 GMT", + "x-ms-client-request-id" : "16d856f8-d152-4cd2-9996-cf9c35604be0" + }, + "Exception" : null + } ], + "variables" : [ "jtcappendblockfromurlacdestinationfail034758265a14738", "javablobappendblockfromurlacdestinationfail162893ee7a455", "javablobappendblockfromurlacdestinationfail230312b0a5377" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[0].json index eef36a27bc73..337124d6be27 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[0].json @@ -1,139 +1,160 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0215388f3fa9c01da?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac041386d0815f48ea4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "da12b705-4c87-4f3b-ba31-7ce3bf7f5a13" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec587bae-2986-4745-9765-22bdffe3ecdf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE64D8BA6", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:02 GMT", + "ETag" : "0x8D8274EC989F7F8", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:21 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56f4e-601e-0040-19f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "da12b705-4c87-4f3b-ba31-7ce3bf7f5a13" + "x-ms-request-id" : "06c88450-101e-007f-2237-595e19000000", + "Date" : "Mon, 13 Jul 2020 17:04:21 GMT", + "x-ms-client-request-id" : "ec587bae-2986-4745-9765-22bdffe3ecdf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0215388f3fa9c01da/javablobappendblockfromurldestinationac1894055ab40369b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac041386d0815f48ea4/javablobappendblockfromurldestinationac140235cb06e2ae0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2cdca5a5-7966-4398-9681-4662ab376894" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46f32eb8-0256-4fb4-99eb-e0b3015a9612" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE655E233", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:02 GMT", + "ETag" : "0x8D8274EC9EB851D", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:22 GMT", + "x-ms-version-id" : "2020-07-13T17:04:22.1512989Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56f80-601e-0040-43f3-121998000000", + "x-ms-request-id" : "89caeec8-b01e-0059-1837-591601000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "2cdca5a5-7966-4398-9681-4662ab376894" + "Date" : "Mon, 13 Jul 2020 17:04:21 GMT", + "x-ms-client-request-id" : "46f32eb8-0256-4fb4-99eb-e0b3015a9612" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0215388f3fa9c01da?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac041386d0815f48ea4/javablobappendblockfromurldestinationac140235cb06e2ae0?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f8dfeaaf-9b5c-40ec-92ff-008ee4de81d1", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "234c0b54-6754-435c-b746-5ba410322238", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE65C7889", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:02 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a687ebc1-701e-000b-3437-596ae9000000", + "Date" : "Mon, 13 Jul 2020 17:04:21 GMT", + "x-ms-client-request-id" : "234c0b54-6754-435c-b746-5ba410322238" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac041386d0815f48ea4?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5c035256-4c30-41ce-bd7f-4c7f872fd713", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ECA75CDD5", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf56f9a-601e-0040-5cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "f8dfeaaf-9b5c-40ec-92ff-008ee4de81d1" + "x-ms-request-id" : "be64210a-c01e-000e-1c37-59b832000000", + "Date" : "Mon, 13 Jul 2020 17:04:22 GMT", + "x-ms-client-request-id" : "5c035256-4c30-41ce-bd7f-4c7f872fd713" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0215388f3fa9c01da/javablobappendblockfromurldestinationac229215cda1d9f6e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac041386d0815f48ea4/javablobappendblockfromurldestinationac2578869740ad908", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2a6f4941-8200-48f0-bc04-af70ac64d7fe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eeafb55b-407e-45f0-b390-282b2a8fe47a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE663EF4F", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:02 GMT", + "ETag" : "0x8D8274ECAB16A35", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:23 GMT", + "x-ms-version-id" : "2020-07-13T17:04:23.4482229Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf56fb4-601e-0040-71f3-121998000000", + "x-ms-request-id" : "f11faabf-f01e-003a-5137-598bfa000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "2a6f4941-8200-48f0-bc04-af70ac64d7fe" + "Date" : "Mon, 13 Jul 2020 17:04:22 GMT", + "x-ms-client-request-id" : "eeafb55b-407e-45f0-b390-282b2a8fe47a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0215388f3fa9c01da/javablobappendblockfromurldestinationac229215cda1d9f6e?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac041386d0815f48ea4/javablobappendblockfromurldestinationac2578869740ad908?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ab1f29b5-5767-4967-834d-20aae1328843", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a72dde95-d73d-421d-8c26-60a3e2d12b46", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:02 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:23 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "ETag" : "0x8D7E10AE66AF5DE", + "Date" : "Mon, 13 Jul 2020 17:04:22 GMT", + "ETag" : "0x8D8274ECAEB496C", "Content-Length" : "0", - "x-ms-request-id" : "caf56fcf-601e-0040-09f3-121998000000", - "x-ms-client-request-id" : "ab1f29b5-5767-4967-834d-20aae1328843", + "x-ms-request-id" : "77e104cf-201e-0064-0737-59601a000000", + "x-ms-client-request-id" : "a72dde95-d73d-421d-8c26-60a3e2d12b46", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0215388f3fa9c01da/javablobappendblockfromurldestinationac1894055ab40369b?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac041386d0815f48ea4/javablobappendblockfromurldestinationac140235cb06e2ae0?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eb070ce1-f2b3-4809-a179-8bddb3f60654" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "437d7022-0e71-4800-a119-f6b215b8e42a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:02 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:24 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:24 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AE674BC30", + "ETag" : "0x8D8274ECB33D15C", "Content-Length" : "0", - "x-ms-request-id" : "caf56fe9-601e-0040-1ff3-121998000000", - "x-ms-client-request-id" : "eb070ce1-f2b3-4809-a179-8bddb3f60654", + "x-ms-request-id" : "56b1399a-f01e-002a-0d37-594e92000000", + "x-ms-client-request-id" : "437d7022-0e71-4800-a119-f6b215b8e42a", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -141,43 +162,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "82425546-f222-4753-ad05-db38eca547f1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cdce8d4a-d271-41b7-9498-b0b17d9af1ab" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57081-601e-0040-29f3-121998000000", - "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac0215388f3fa9c01daWed, 15 Apr 2020 07:02:02 GMT\"0x8D7E10AE65C7889\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "82425546-f222-4753-ad05-db38eca547f1", + "x-ms-request-id" : "7df43114-a01e-0045-4e37-594461000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac041386d0815f48ea4Mon, 13 Jul 2020 17:04:23 GMT\"0x8D8274ECA75CDD5\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:24 GMT", + "x-ms-client-request-id" : "cdce8d4a-d271-41b7-9498-b0b17d9af1ab", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0215388f3fa9c01da?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac041386d0815f48ea4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2655ebfb-e26f-45f1-b091-5de9efdc49d6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e49cba32-7f8f-4c69-ac8b-225dc12cc7d5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf570a1-601e-0040-47f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "2655ebfb-e26f-45f1-b091-5de9efdc49d6" + "x-ms-request-id" : "ebd6370e-f01e-0048-1c37-598cb5000000", + "Date" : "Mon, 13 Jul 2020 17:04:24 GMT", + "x-ms-client-request-id" : "e49cba32-7f8f-4c69-ac8b-225dc12cc7d5" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurldestinationac0215388f3fa9c01da", "javablobappendblockfromurldestinationac1894055ab40369b", "javablobappendblockfromurldestinationac229215cda1d9f6e" ] + "variables" : [ "jtcappendblockfromurldestinationac041386d0815f48ea4", "javablobappendblockfromurldestinationac140235cb06e2ae0", "javablobappendblockfromurldestinationac2578869740ad908" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[1].json index 420315d765ce..bf6d682713b2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[1].json @@ -1,139 +1,160 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac099093ee3dbcc4094?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0944997d9f1488f66?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eac62e0e-8dae-4a4d-8cfa-222e46b545a5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "12c0c5ad-68ef-4838-ae35-c5d01ce868ed" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE6AD9CEC", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:03 GMT", + "ETag" : "0x8D8274ECBFB27C0", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf570d2-601e-0040-73f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "eac62e0e-8dae-4a4d-8cfa-222e46b545a5" + "x-ms-request-id" : "d0b0687a-101e-0022-3337-59549d000000", + "Date" : "Mon, 13 Jul 2020 17:04:25 GMT", + "x-ms-client-request-id" : "12c0c5ad-68ef-4838-ae35-c5d01ce868ed" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac099093ee3dbcc4094/javablobappendblockfromurldestinationac158540c0525be53", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0944997d9f1488f66/javablobappendblockfromurldestinationac18894565ab530b1", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4cc81f7e-0664-4e6d-bc3d-ed684b9fd6ad" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40b1fa1e-e7ef-482e-86c6-e4df2ce20f9e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE6B49391", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:03 GMT", + "ETag" : "0x8D8274ECC2DC837", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:25 GMT", + "x-ms-version-id" : "2020-07-13T17:04:25.9409975Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf570f5-601e-0040-12f3-121998000000", + "x-ms-request-id" : "5dedea48-501e-00a5-3f37-59c7f8000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "4cc81f7e-0664-4e6d-bc3d-ed684b9fd6ad" + "Date" : "Mon, 13 Jul 2020 17:04:25 GMT", + "x-ms-client-request-id" : "40b1fa1e-e7ef-482e-86c6-e4df2ce20f9e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac099093ee3dbcc4094?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0944997d9f1488f66/javablobappendblockfromurldestinationac18894565ab530b1?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c8625dc2-1c0f-436d-a298-ad8587cbad64", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a92ca345-2de3-422c-8dc3-38ff324ca3ed", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE6BB51A0", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:03 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "089aec1e-d01e-0012-0b37-59ea52000000", + "Date" : "Mon, 13 Jul 2020 17:04:25 GMT", + "x-ms-client-request-id" : "a92ca345-2de3-422c-8dc3-38ff324ca3ed" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0944997d9f1488f66?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0baa6555-6e54-4a79-8e58-e40dd02719af", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ECC94F24D", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57112-601e-0040-2ff3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "c8625dc2-1c0f-436d-a298-ad8587cbad64" + "x-ms-request-id" : "ab3be373-b01e-0014-7637-59d9ed000000", + "Date" : "Mon, 13 Jul 2020 17:04:26 GMT", + "x-ms-client-request-id" : "0baa6555-6e54-4a79-8e58-e40dd02719af" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac099093ee3dbcc4094/javablobappendblockfromurldestinationac2784858354133a6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0944997d9f1488f66/javablobappendblockfromurldestinationac2305571104debaa", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5d5f5196-be36-47df-a7f9-70e2d12d9b40" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "829695d3-d9ba-4c9f-b81a-bbda27dfe31e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE6C27996", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:03 GMT", + "ETag" : "0x8D8274ECCCAE82A", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:26 GMT", + "x-ms-version-id" : "2020-07-13T17:04:26.9707306Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5712d-601e-0040-48f3-121998000000", + "x-ms-request-id" : "30e260d4-201e-0016-7937-596755000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "x-ms-client-request-id" : "5d5f5196-be36-47df-a7f9-70e2d12d9b40" + "Date" : "Mon, 13 Jul 2020 17:04:26 GMT", + "x-ms-client-request-id" : "829695d3-d9ba-4c9f-b81a-bbda27dfe31e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac099093ee3dbcc4094/javablobappendblockfromurldestinationac2784858354133a6?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0944997d9f1488f66/javablobappendblockfromurldestinationac2305571104debaa?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "617bceaa-b637-41d7-8db5-ce4c3eeb6586", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6f6863e-9df1-4ee9-8234-e3d52080e73f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:03 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:27 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", - "ETag" : "0x8D7E10AE6C9CE5C", + "Date" : "Mon, 13 Jul 2020 17:04:26 GMT", + "ETag" : "0x8D8274ECCFEF9FB", "Content-Length" : "0", - "x-ms-request-id" : "caf5714d-601e-0040-66f3-121998000000", - "x-ms-client-request-id" : "617bceaa-b637-41d7-8db5-ce4c3eeb6586", + "x-ms-request-id" : "e5413f43-d01e-002d-3e37-5922f1000000", + "x-ms-client-request-id" : "e6f6863e-9df1-4ee9-8234-e3d52080e73f", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac099093ee3dbcc4094/javablobappendblockfromurldestinationac158540c0525be53?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0944997d9f1488f66/javablobappendblockfromurldestinationac18894565ab530b1?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "78d93611-d870-4244-ba54-871be5f0dd8c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "af82d38c-2968-4aec-abfc-1502a1a54cd5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:03 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:27 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:02 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:27 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AE6D6F0E9", + "ETag" : "0x8D8274ECD3CAA7A", "Content-Length" : "0", - "x-ms-request-id" : "caf57172-601e-0040-0af3-121998000000", - "x-ms-client-request-id" : "78d93611-d870-4244-ba54-871be5f0dd8c", + "x-ms-request-id" : "fd922933-f01e-0093-7637-594a88000000", + "x-ms-client-request-id" : "af82d38c-2968-4aec-abfc-1502a1a54cd5", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -141,43 +162,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6465edc4-8a79-4e3a-8149-90117eb57372" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5915199d-9fbc-4c76-8fe4-6ebee819f6b6" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf571dd-601e-0040-6ef3-121998000000", - "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac099093ee3dbcc4094Wed, 15 Apr 2020 07:02:03 GMT\"0x8D7E10AE6BB51A0\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "6465edc4-8a79-4e3a-8149-90117eb57372", + "x-ms-request-id" : "7550141d-b01e-0082-7737-59d03c000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac0944997d9f1488f66Mon, 13 Jul 2020 17:04:26 GMT\"0x8D8274ECC94F24D\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:27 GMT", + "x-ms-client-request-id" : "5915199d-9fbc-4c76-8fe4-6ebee819f6b6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac099093ee3dbcc4094?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0944997d9f1488f66?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a4003ef9-5f4b-4436-9ccf-d67e89c09d6f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3fe77202-ed56-4571-86bf-d2d1df3513d0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf571f0-601e-0040-80f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "a4003ef9-5f4b-4436-9ccf-d67e89c09d6f" + "x-ms-request-id" : "55465420-d01e-0084-4337-59e383000000", + "Date" : "Mon, 13 Jul 2020 17:04:28 GMT", + "x-ms-client-request-id" : "3fe77202-ed56-4571-86bf-d2d1df3513d0" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurldestinationac099093ee3dbcc4094", "javablobappendblockfromurldestinationac158540c0525be53", "javablobappendblockfromurldestinationac2784858354133a6" ] + "variables" : [ "jtcappendblockfromurldestinationac0944997d9f1488f66", "javablobappendblockfromurldestinationac18894565ab530b1", "javablobappendblockfromurldestinationac2305571104debaa" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[2].json index cc929dbb5d7f..8f7318be5523 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[2].json @@ -1,139 +1,160 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac080859afc0cefe6bc?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0684890b44a4a75f3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "756648b5-1e07-4ba4-9deb-2b3a7b38bf4b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff131826-d380-44ac-bbb3-c7dde02372c0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE6FCBA3D", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:03 GMT", + "ETag" : "0x8D8274ECDE1B750", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5720a-601e-0040-17f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "756648b5-1e07-4ba4-9deb-2b3a7b38bf4b" + "x-ms-request-id" : "58fbf34a-401e-0072-6137-5996cd000000", + "Date" : "Mon, 13 Jul 2020 17:04:28 GMT", + "x-ms-client-request-id" : "ff131826-d380-44ac-bbb3-c7dde02372c0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac080859afc0cefe6bc/javablobappendblockfromurldestinationac1974237e26d384c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0684890b44a4a75f3/javablobappendblockfromurldestinationac13577391f90cbbf", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "15c16b58-0425-433a-a5b1-d0bb3e793dd2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f56595e-f9eb-4d31-b820-547a8acb8ca3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE70CB3B4", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:03 GMT", + "ETag" : "0x8D8274ECE1B4C39", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:29 GMT", + "x-ms-version-id" : "2020-07-13T17:04:29.1753017Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5723c-601e-0040-3df3-121998000000", + "x-ms-request-id" : "0cc8f870-001e-00a8-2837-590f2c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "15c16b58-0425-433a-a5b1-d0bb3e793dd2" + "Date" : "Mon, 13 Jul 2020 17:04:28 GMT", + "x-ms-client-request-id" : "0f56595e-f9eb-4d31-b820-547a8acb8ca3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac080859afc0cefe6bc?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0684890b44a4a75f3/javablobappendblockfromurldestinationac13577391f90cbbf?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c7f3daff-74fd-4774-ab93-d53ec4a8a178", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d91cccec-e7ad-4f16-8bf9-b69bc2bb713a", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE738687A", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "880769b8-a01e-009e-6d37-59825c000000", + "Date" : "Mon, 13 Jul 2020 17:04:29 GMT", + "x-ms-client-request-id" : "d91cccec-e7ad-4f16-8bf9-b69bc2bb713a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0684890b44a4a75f3?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "da79a23d-18a5-42c8-bb06-e1a8d234c4eb", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ECE82EBB9", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57307-601e-0040-74f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "c7f3daff-74fd-4774-ab93-d53ec4a8a178" + "x-ms-request-id" : "e705cf00-901e-003c-3d37-59b845000000", + "Date" : "Mon, 13 Jul 2020 17:04:28 GMT", + "x-ms-client-request-id" : "da79a23d-18a5-42c8-bb06-e1a8d234c4eb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac080859afc0cefe6bc/javablobappendblockfromurldestinationac25610618069faa9", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0684890b44a4a75f3/javablobappendblockfromurldestinationac2935117765d86ed", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e78b15ec-870f-4ea7-b6b0-638e1b6786c0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d796dd9d-4bb6-415c-bea0-51b143788560" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE73F6893", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "ETag" : "0x8D8274ECEB75A91", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:30 GMT", + "x-ms-version-id" : "2020-07-13T17:04:30.1980305Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57323-601e-0040-0ff3-121998000000", + "x-ms-request-id" : "7e016ba8-e01e-007b-1b37-59d31e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "e78b15ec-870f-4ea7-b6b0-638e1b6786c0" + "Date" : "Mon, 13 Jul 2020 17:04:30 GMT", + "x-ms-client-request-id" : "d796dd9d-4bb6-415c-bea0-51b143788560" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac080859afc0cefe6bc/javablobappendblockfromurldestinationac25610618069faa9?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0684890b44a4a75f3/javablobappendblockfromurldestinationac2935117765d86ed?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fefe85e4-1eb1-4dec-bfda-67f41fe7957c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "af8febe0-0dee-407d-916d-8f2231208a36", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "ETag" : "0x8D7E10AE746BD59", + "Date" : "Mon, 13 Jul 2020 17:04:30 GMT", + "ETag" : "0x8D8274ECEEAF716", "Content-Length" : "0", - "x-ms-request-id" : "caf57355-601e-0040-3df3-121998000000", - "x-ms-client-request-id" : "fefe85e4-1eb1-4dec-bfda-67f41fe7957c", + "x-ms-request-id" : "63b30be0-601e-0091-6837-59f430000000", + "x-ms-client-request-id" : "af8febe0-0dee-407d-916d-8f2231208a36", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac080859afc0cefe6bc/javablobappendblockfromurldestinationac1974237e26d384c?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0684890b44a4a75f3/javablobappendblockfromurldestinationac13577391f90cbbf?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "795d54ac-ee26-42bb-b26f-f2ecdd3f2568" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c16a797f-0fcc-4c10-a745-a7e706203719" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:30 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AE74ED592", + "ETag" : "0x8D8274ECF2599C7", "Content-Length" : "0", - "x-ms-request-id" : "caf5737e-601e-0040-65f3-121998000000", - "x-ms-client-request-id" : "795d54ac-ee26-42bb-b26f-f2ecdd3f2568", + "x-ms-request-id" : "918537e1-f01e-0058-4937-5949dd000000", + "x-ms-client-request-id" : "c16a797f-0fcc-4c10-a745-a7e706203719", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -141,43 +162,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f2ff8aaa-b002-4aa1-9cd1-bf04be27c5ca" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d80791d6-b9be-4096-956a-1c3701a753ad" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf5739d-601e-0040-80f3-121998000000", - "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac080859afc0cefe6bcWed, 15 Apr 2020 07:02:04 GMT\"0x8D7E10AE738687A\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "f2ff8aaa-b002-4aa1-9cd1-bf04be27c5ca", + "x-ms-request-id" : "1cd469d5-601e-005a-7a37-59f765000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac0684890b44a4a75f3Mon, 13 Jul 2020 17:04:29 GMT\"0x8D8274ECE82EBB9\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:30 GMT", + "x-ms-client-request-id" : "d80791d6-b9be-4096-956a-1c3701a753ad", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac080859afc0cefe6bc?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0684890b44a4a75f3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9eca3cf5-fa54-45d3-8bee-4075138eda50" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82fd2294-b5fe-4bf1-a2e3-9659504c279e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf573ae-601e-0040-10f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "9eca3cf5-fa54-45d3-8bee-4075138eda50" + "x-ms-request-id" : "2fc02ef1-c01e-0098-1e37-59b1e3000000", + "Date" : "Mon, 13 Jul 2020 17:04:31 GMT", + "x-ms-client-request-id" : "82fd2294-b5fe-4bf1-a2e3-9659504c279e" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurldestinationac080859afc0cefe6bc", "javablobappendblockfromurldestinationac1974237e26d384c", "javablobappendblockfromurldestinationac25610618069faa9" ] + "variables" : [ "jtcappendblockfromurldestinationac0684890b44a4a75f3", "javablobappendblockfromurldestinationac13577391f90cbbf", "javablobappendblockfromurldestinationac2935117765d86ed" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[3].json index db31715210b4..43e31d00d578 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[3].json @@ -1,169 +1,192 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0431719ced5f4c7aa?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "28a9fbe1-94a6-4ff7-9d4c-c5f539296d36" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ccbd2676-f800-443b-b83a-ed6450cb92b6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE765F59D", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "ETag" : "0x8D8274ECFC3707D", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf573d9-601e-0040-38f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "28a9fbe1-94a6-4ff7-9d4c-c5f539296d36" + "x-ms-request-id" : "1055a871-201e-004b-7e37-596dd1000000", + "Date" : "Mon, 13 Jul 2020 17:04:31 GMT", + "x-ms-client-request-id" : "ccbd2676-f800-443b-b83a-ed6450cb92b6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0431719ced5f4c7aa/javablobappendblockfromurldestinationac145407dcfa39391", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8/javablobappendblockfromurldestinationac1851282ebc4dfa2", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "04060a3e-0078-4052-ae96-e7f63e5ccea6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "83695e78-3955-48da-8c87-b7a30dc2c89e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE76D132B", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "ETag" : "0x8D8274ECFFA0037", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:32 GMT", + "x-ms-version-id" : "2020-07-13T17:04:32.3125303Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf573f9-601e-0040-51f3-121998000000", + "x-ms-request-id" : "32464c97-401e-0010-4637-5954ea000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:03 GMT", - "x-ms-client-request-id" : "04060a3e-0078-4052-ae96-e7f63e5ccea6" + "Date" : "Mon, 13 Jul 2020 17:04:31 GMT", + "x-ms-client-request-id" : "83695e78-3955-48da-8c87-b7a30dc2c89e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0431719ced5f4c7aa?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8/javablobappendblockfromurldestinationac1851282ebc4dfa2?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "25ee83b4-7fbe-4c53-8c74-15c998c2faaf", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "80479957-3748-402f-9942-e00b2417184d", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE77447A6", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a78f2bf0-501e-008a-7737-59ca33000000", + "Date" : "Mon, 13 Jul 2020 17:04:32 GMT", + "x-ms-client-request-id" : "80479957-3748-402f-9942-e00b2417184d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "af6b7b7a-601c-4a32-a893-114e4aea11bf", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ED06990C1", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57423-601e-0040-73f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "25ee83b4-7fbe-4c53-8c74-15c998c2faaf" + "x-ms-request-id" : "2a10bfde-701e-0079-4337-596da6000000", + "Date" : "Mon, 13 Jul 2020 17:04:32 GMT", + "x-ms-client-request-id" : "af6b7b7a-601c-4a32-a893-114e4aea11bf" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0431719ced5f4c7aa/javablobappendblockfromurldestinationac145407dcfa39391", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8/javablobappendblockfromurldestinationac1851282ebc4dfa2", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3e8843b5-f8aa-42a6-9465-4d9cf072c894" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c733e4a-1c77-4457-b1a2-858b550ad68d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "x-ms-version-id" : "2020-07-13T17:04:32.3125303Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:32 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10AE76D132B", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:02:04 GMT", + "ETag" : "0x8D8274ECFFA0037", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:04:32 GMT", "Content-Length" : "0", - "x-ms-request-id" : "caf5746d-601e-0040-29f3-121998000000", - "x-ms-client-request-id" : "3e8843b5-f8aa-42a6-9465-4d9cf072c894", + "x-ms-request-id" : "1abaa0a4-401e-003f-5637-595921000000", + "x-ms-client-request-id" : "7c733e4a-1c77-4457-b1a2-858b550ad68d", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0431719ced5f4c7aa/javablobappendblockfromurldestinationac202703435b4c2dd", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8/javablobappendblockfromurldestinationac271384c3e862491", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6fe22663-dd9e-4475-8da9-9679fdb1d5cd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "51e6b153-01cb-4138-ba2c-3b6cb6d25503" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE7827503", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "ETag" : "0x8D8274ED0D8057F", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:33 GMT", + "x-ms-version-id" : "2020-07-13T17:04:33.7685652Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5749f-601e-0040-53f3-121998000000", + "x-ms-request-id" : "2eb05eb3-e01e-0019-6137-591139000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "6fe22663-dd9e-4475-8da9-9679fdb1d5cd" + "Date" : "Mon, 13 Jul 2020 17:04:33 GMT", + "x-ms-client-request-id" : "51e6b153-01cb-4138-ba2c-3b6cb6d25503" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0431719ced5f4c7aa/javablobappendblockfromurldestinationac202703435b4c2dd?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8/javablobappendblockfromurldestinationac271384c3e862491?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "41902709-0b90-4292-974f-8174b5696596", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "49d0d228-bb12-4ca8-9c18-53bb9e3e7dcd", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:34 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "ETag" : "0x8D7E10AE788DF36", + "Date" : "Mon, 13 Jul 2020 17:04:34 GMT", + "ETag" : "0x8D8274ED1119691", "Content-Length" : "0", - "x-ms-request-id" : "caf574b8-601e-0040-69f3-121998000000", - "x-ms-client-request-id" : "41902709-0b90-4292-974f-8174b5696596", + "x-ms-request-id" : "7a4b9b58-a01e-0008-0b37-598b8d000000", + "x-ms-client-request-id" : "49d0d228-bb12-4ca8-9c18-53bb9e3e7dcd", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0431719ced5f4c7aa/javablobappendblockfromurldestinationac145407dcfa39391?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8/javablobappendblockfromurldestinationac1851282ebc4dfa2?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b5ca18c6-f6c4-4ec5-90db-faa48936cd1c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad99e45f-446f-4665-9a46-5876610c9b6b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:34 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:34 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AE791BAEF", + "ETag" : "0x8D8274ED144BDDB", "Content-Length" : "0", - "x-ms-request-id" : "caf574db-601e-0040-04f3-121998000000", - "x-ms-client-request-id" : "b5ca18c6-f6c4-4ec5-90db-faa48936cd1c", + "x-ms-request-id" : "564cb060-501e-006e-5d37-59c4ad000000", + "x-ms-client-request-id" : "ad99e45f-446f-4665-9a46-5876610c9b6b", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -171,43 +194,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f8285caa-282f-495a-8796-81682348f5d9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "abafa681-4089-429b-b84b-05a0c0e80ee7" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57550-601e-0040-66f3-121998000000", - "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac0431719ced5f4c7aaWed, 15 Apr 2020 07:02:04 GMT\"0x8D7E10AE77447A6\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "f8285caa-282f-495a-8796-81682348f5d9", + "x-ms-request-id" : "ab3acaee-301e-0035-4337-59fd96000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac03986383fc7bcf2a8Mon, 13 Jul 2020 17:04:33 GMT\"0x8D8274ED06990C1\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:33 GMT", + "x-ms-client-request-id" : "abafa681-4089-429b-b84b-05a0c0e80ee7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0431719ced5f4c7aa?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac03986383fc7bcf2a8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1c29bea1-c141-4899-8753-674fd8a54f7b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "978238c7-38ce-4b8b-ad24-1da4e80000e2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf57566-601e-0040-78f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "1c29bea1-c141-4899-8753-674fd8a54f7b" + "x-ms-request-id" : "88277131-d01e-005f-7737-5925be000000", + "Date" : "Mon, 13 Jul 2020 17:04:34 GMT", + "x-ms-client-request-id" : "978238c7-38ce-4b8b-ad24-1da4e80000e2" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurldestinationac0431719ced5f4c7aa", "javablobappendblockfromurldestinationac145407dcfa39391", "javablobappendblockfromurldestinationac202703435b4c2dd" ] + "variables" : [ "jtcappendblockfromurldestinationac03986383fc7bcf2a8", "javablobappendblockfromurldestinationac1851282ebc4dfa2", "javablobappendblockfromurldestinationac271384c3e862491" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[4].json index 6193fc00f4e5..f69b300e1220 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[4].json @@ -1,139 +1,160 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac006622b4837f414a6?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac044260ce618db64d4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e53aaa12-e6e0-430b-8715-aab3e022a8f0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ab0b076-5969-477c-9e81-8c2f0e320ac3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE7B78484", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:04 GMT", + "ETag" : "0x8D8274ED1DEE550", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57586-601e-0040-10f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "e53aaa12-e6e0-430b-8715-aab3e022a8f0" + "x-ms-request-id" : "76e5fddb-701e-0024-0937-596722000000", + "Date" : "Mon, 13 Jul 2020 17:04:34 GMT", + "x-ms-client-request-id" : "7ab0b076-5969-477c-9e81-8c2f0e320ac3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac006622b4837f414a6/javablobappendblockfromurldestinationac1876759932f009d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac044260ce618db64d4/javablobappendblockfromurldestinationac1474145b80180e6", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1534136c-42c4-4698-ae65-b3770858607e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52b35322-c893-42d3-8ca2-ecdc7c628875" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE7C02908", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "ETag" : "0x8D8274ED213F36A", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:35 GMT", + "x-ms-version-id" : "2020-07-13T17:04:35.8380394Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf575b6-601e-0040-39f3-121998000000", + "x-ms-request-id" : "225fb376-b01e-003b-2a37-59d426000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "1534136c-42c4-4698-ae65-b3770858607e" + "Date" : "Mon, 13 Jul 2020 17:04:35 GMT", + "x-ms-client-request-id" : "52b35322-c893-42d3-8ca2-ecdc7c628875" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac006622b4837f414a6?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac044260ce618db64d4/javablobappendblockfromurldestinationac1474145b80180e6?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9b637d8b-1245-47e6-9ffa-a2a20a23dd71", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "be4ba988-5703-44aa-a6f1-1e77d53d1d68", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE7C6E8C2", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "26572c32-701e-008d-3937-59a650000000", + "Date" : "Mon, 13 Jul 2020 17:04:35 GMT", + "x-ms-client-request-id" : "be4ba988-5703-44aa-a6f1-1e77d53d1d68" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac044260ce618db64d4?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "26eda1ad-00c9-4913-8ff3-d2ed928aa8a4", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ED2777416", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf575e5-601e-0040-5af3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "9b637d8b-1245-47e6-9ffa-a2a20a23dd71" + "x-ms-request-id" : "47e28179-601e-0017-0437-593889000000", + "Date" : "Mon, 13 Jul 2020 17:04:36 GMT", + "x-ms-client-request-id" : "26eda1ad-00c9-4913-8ff3-d2ed928aa8a4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac006622b4837f414a6/javablobappendblockfromurldestinationac2224988046e2d82", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac044260ce618db64d4/javablobappendblockfromurldestinationac2954064bf22d01b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "14071dd2-f5c7-4013-82cf-6316bf416d04" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ffcafa5e-7463-4d82-af71-7a559eb6af45" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE7CE0F11", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "ETag" : "0x8D8274ED2A7E9F2", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:36 GMT", + "x-ms-version-id" : "2020-07-13T17:04:36.8077298Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5760c-601e-0040-79f3-121998000000", + "x-ms-request-id" : "732e30f4-801e-0042-6d37-592802000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "14071dd2-f5c7-4013-82cf-6316bf416d04" + "Date" : "Mon, 13 Jul 2020 17:04:35 GMT", + "x-ms-client-request-id" : "ffcafa5e-7463-4d82-af71-7a559eb6af45" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac006622b4837f414a6/javablobappendblockfromurldestinationac2224988046e2d82?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac044260ce618db64d4/javablobappendblockfromurldestinationac2954064bf22d01b?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b07f4696-4947-4308-a75e-5d44ad22c585", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c1163338-4b45-4297-a8e7-75833befdc76", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "ETag" : "0x8D7E10AE7D5B201", + "Date" : "Mon, 13 Jul 2020 17:04:36 GMT", + "ETag" : "0x8D8274ED2D89FCF", "Content-Length" : "0", - "x-ms-request-id" : "caf5762e-601e-0040-17f3-121998000000", - "x-ms-client-request-id" : "b07f4696-4947-4308-a75e-5d44ad22c585", + "x-ms-request-id" : "901ee520-d01e-0094-1737-5926eb000000", + "x-ms-client-request-id" : "c1163338-4b45-4297-a8e7-75833befdc76", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac006622b4837f414a6/javablobappendblockfromurldestinationac1876759932f009d?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac044260ce618db64d4/javablobappendblockfromurldestinationac1474145b80180e6?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "674deef5-6158-4f13-9892-88e4f3b84fa8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a88314dd-dd7e-48df-8532-e9912c7bde65" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:37 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AE8044731", + "ETag" : "0x8D8274ED30F2309", "Content-Length" : "0", - "x-ms-request-id" : "caf57658-601e-0040-37f3-121998000000", - "x-ms-client-request-id" : "674deef5-6158-4f13-9892-88e4f3b84fa8", + "x-ms-request-id" : "42cb53c4-c01e-001e-6c37-597d5a000000", + "x-ms-client-request-id" : "a88314dd-dd7e-48df-8532-e9912c7bde65", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -141,43 +162,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9121665a-40ed-4228-b8e3-b293b62101fe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bfffcfd-9b1e-4f38-83b4-2f43417d0d47" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57716-601e-0040-55f3-121998000000", - "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac006622b4837f414a6Wed, 15 Apr 2020 07:02:05 GMT\"0x8D7E10AE7C6E8C2\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:04 GMT", - "x-ms-client-request-id" : "9121665a-40ed-4228-b8e3-b293b62101fe", + "x-ms-request-id" : "5f619b83-c01e-0021-0137-59b5f9000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac044260ce618db64d4Mon, 13 Jul 2020 17:04:36 GMT\"0x8D8274ED2777416\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:36 GMT", + "x-ms-client-request-id" : "7bfffcfd-9b1e-4f38-83b4-2f43417d0d47", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac006622b4837f414a6?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac044260ce618db64d4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5b4b278b-30d9-4088-b5b5-139694298ee7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b836fc8-4a23-4460-8501-1bcabb1b44db" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf57731-601e-0040-6cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "5b4b278b-30d9-4088-b5b5-139694298ee7" + "x-ms-request-id" : "2232e22f-101e-009b-1b37-595087000000", + "Date" : "Mon, 13 Jul 2020 17:04:37 GMT", + "x-ms-client-request-id" : "3b836fc8-4a23-4460-8501-1bcabb1b44db" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurldestinationac006622b4837f414a6", "javablobappendblockfromurldestinationac1876759932f009d", "javablobappendblockfromurldestinationac2224988046e2d82" ] + "variables" : [ "jtcappendblockfromurldestinationac044260ce618db64d4", "javablobappendblockfromurldestinationac1474145b80180e6", "javablobappendblockfromurldestinationac2954064bf22d01b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[5].json index 0207aa14539d..e334ce64a5b2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[5].json @@ -1,161 +1,182 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac028687e5732e12a54?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ef7bee29-5f3c-4773-8ed0-5e7fff8ebc7c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "62d441a7-08fa-4a58-9fc3-fd6d13df97d4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE81CEE63", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "ETag" : "0x8D8274ED3B13593", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5776c-601e-0040-1df3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "ef7bee29-5f3c-4773-8ed0-5e7fff8ebc7c" + "x-ms-request-id" : "cb8c2e70-d01e-0060-2437-59ed1d000000", + "Date" : "Mon, 13 Jul 2020 17:04:38 GMT", + "x-ms-client-request-id" : "62d441a7-08fa-4a58-9fc3-fd6d13df97d4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac028687e5732e12a54/javablobappendblockfromurldestinationac139080c19d9d2d7", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983/javablobappendblockfromurldestinationac18926738fd716ec", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "63d343b3-6a35-4d6e-9d02-7fa454606d1a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4fb3dbdb-4ff2-44d8-9c9b-0f2de8d5c1c4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8315571", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "ETag" : "0x8D8274ED3E9A550", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:38 GMT", + "x-ms-version-id" : "2020-07-13T17:04:38.9162320Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf577de-601e-0040-80f3-121998000000", + "x-ms-request-id" : "8e00da84-501e-0051-1937-590c0e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "63d343b3-6a35-4d6e-9d02-7fa454606d1a" + "Date" : "Mon, 13 Jul 2020 17:04:38 GMT", + "x-ms-client-request-id" : "4fb3dbdb-4ff2-44d8-9c9b-0f2de8d5c1c4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac028687e5732e12a54?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983/javablobappendblockfromurldestinationac18926738fd716ec?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27c1c29d-83ec-469b-931f-01aa9713a92a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "968177f2-e627-4feb-83ef-1ec6fe521d73", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE83975B9", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "88bf8c96-901e-002c-6e37-597d2d000000", + "Date" : "Mon, 13 Jul 2020 17:04:38 GMT", + "x-ms-client-request-id" : "968177f2-e627-4feb-83ef-1ec6fe521d73" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5e639438-d593-418d-81bc-c5abe8f7c6ec", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ED451E1FA", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf5780b-601e-0040-2cf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "27c1c29d-83ec-469b-931f-01aa9713a92a" + "x-ms-request-id" : "b87c1850-201e-0006-4737-59a23d000000", + "Date" : "Mon, 13 Jul 2020 17:04:38 GMT", + "x-ms-client-request-id" : "5e639438-d593-418d-81bc-c5abe8f7c6ec" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac028687e5732e12a54/javablobappendblockfromurldestinationac139080c19d9d2d7?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983/javablobappendblockfromurldestinationac18926738fd716ec?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "77ed1ea0-dbf8-4952-8d39-7500dd3cc3ae" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fac75f3b-b77e-42a0-b4da-f76df1eb2adb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8315571", - "x-ms-lease-id" : "bd5f6e84-74d3-4d56-b31b-3670725fc92c", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "ETag" : "0x8D8274ED3E9A550", + "x-ms-lease-id" : "cfedc5f9-ec2e-4576-9090-19c83c060fc9", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf5783f-601e-0040-58f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "77ed1ea0-dbf8-4952-8d39-7500dd3cc3ae" + "x-ms-request-id" : "7663619f-801e-0030-1b37-592f4d000000", + "Date" : "Mon, 13 Jul 2020 17:04:39 GMT", + "x-ms-client-request-id" : "fac75f3b-b77e-42a0-b4da-f76df1eb2adb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac028687e5732e12a54/javablobappendblockfromurldestinationac245873fee301060", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983/javablobappendblockfromurldestinationac2178280ffffc30a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2959c04b-9f00-4f3c-b72f-ba8c810e6869" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6d62b78-dd16-4e97-b7db-8ce90561ddd7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8483E41", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "ETag" : "0x8D8274ED4BDE4E2", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:40 GMT", + "x-ms-version-id" : "2020-07-13T17:04:40.3072226Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57866-601e-0040-7af3-121998000000", + "x-ms-request-id" : "811630f3-101e-006f-1e37-599b71000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "2959c04b-9f00-4f3c-b72f-ba8c810e6869" + "Date" : "Mon, 13 Jul 2020 17:04:39 GMT", + "x-ms-client-request-id" : "a6d62b78-dd16-4e97-b7db-8ce90561ddd7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac028687e5732e12a54/javablobappendblockfromurldestinationac245873fee301060?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983/javablobappendblockfromurldestinationac2178280ffffc30a?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "402bca84-65b2-4cea-9cb2-2fefb289bae3", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "db8db709-fc3d-4d9a-877d-4b9505875d58", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:05 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:40 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "ETag" : "0x8D7E10AE84F1DB5", + "Date" : "Mon, 13 Jul 2020 17:04:40 GMT", + "ETag" : "0x8D8274ED4F21DC4", "Content-Length" : "0", - "x-ms-request-id" : "caf57886-601e-0040-15f3-121998000000", - "x-ms-client-request-id" : "402bca84-65b2-4cea-9cb2-2fefb289bae3", + "x-ms-request-id" : "40918a5f-901e-0085-5637-59bc5f000000", + "x-ms-client-request-id" : "db8db709-fc3d-4d9a-877d-4b9505875d58", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac028687e5732e12a54/javablobappendblockfromurldestinationac139080c19d9d2d7?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983/javablobappendblockfromurldestinationac18926738fd716ec?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cd22acb2-bed2-4cb1-a29b-4f3d18d6a0fa" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e20cb2a7-2359-4dbe-840e-8024970b2e08" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AE856E7C4", + "ETag" : "0x8D8274ED52B87BB", "Content-Length" : "0", - "x-ms-request-id" : "caf5789d-601e-0040-28f3-121998000000", - "x-ms-client-request-id" : "cd22acb2-bed2-4cb1-a29b-4f3d18d6a0fa", + "x-ms-request-id" : "1a1699c9-501e-0023-5137-590b41000000", + "x-ms-client-request-id" : "e20cb2a7-2359-4dbe-840e-8024970b2e08", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -163,43 +184,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "db20d6d5-abee-48f4-82d0-0abca7033a01" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e510c50-8733-4f7d-944e-1fc87c89cafb" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf578c9-601e-0040-4cf3-121998000000", - "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac028687e5732e12a54Wed, 15 Apr 2020 07:02:05 GMT\"0x8D7E10AE83975B9\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "db20d6d5-abee-48f4-82d0-0abca7033a01", + "x-ms-request-id" : "0057f108-301e-0025-5237-5938fe000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac058961b6dca602983Mon, 13 Jul 2020 17:04:39 GMT\"0x8D8274ED451E1FA\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:41 GMT", + "x-ms-client-request-id" : "4e510c50-8733-4f7d-944e-1fc87c89cafb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac028687e5732e12a54?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac058961b6dca602983?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5a368cb4-1198-4137-a795-ac84928f2fac" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "95f24141-9765-4253-8179-931952f87c9f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf57904-601e-0040-80f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "5a368cb4-1198-4137-a795-ac84928f2fac" + "x-ms-request-id" : "bfdc27f8-a01e-0027-0937-598646000000", + "Date" : "Mon, 13 Jul 2020 17:04:41 GMT", + "x-ms-client-request-id" : "95f24141-9765-4253-8179-931952f87c9f" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurldestinationac028687e5732e12a54", "javablobappendblockfromurldestinationac139080c19d9d2d7", "javablobappendblockfromurldestinationac245873fee301060" ] + "variables" : [ "jtcappendblockfromurldestinationac058961b6dca602983", "javablobappendblockfromurldestinationac18926738fd716ec", "javablobappendblockfromurldestinationac2178280ffffc30a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[6].json index 7b22949131f2..f471e965c217 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[6].json @@ -1,139 +1,160 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0795315e75f398094?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac066316ce06522f8c1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "70266252-4d9b-449f-b68a-3d211226c460" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40c70982-16c4-45f3-b92e-6efcbc0981be" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE86E7D58", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "ETag" : "0x8D8274ED5C94FDB", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57943-601e-0040-36f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "70266252-4d9b-449f-b68a-3d211226c460" + "x-ms-request-id" : "cd2328e4-601e-0065-7e37-593fc6000000", + "Date" : "Mon, 13 Jul 2020 17:04:41 GMT", + "x-ms-client-request-id" : "40c70982-16c4-45f3-b92e-6efcbc0981be" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0795315e75f398094/javablobappendblockfromurldestinationac1865689cf06189a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac066316ce06522f8c1/javablobappendblockfromurldestinationac196846b0ffa474f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cacff5b2-db23-47ee-a8b0-8e144d936c5d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d05a895e-0128-449d-89b9-fae21e06bd32" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8759AAB", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "ETag" : "0x8D8274ED5FC1D2A", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:42 GMT", + "x-ms-version-id" : "2020-07-13T17:04:42.3937087Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57973-601e-0040-63f3-121998000000", + "x-ms-request-id" : "8f813aa6-e01e-0054-6d37-59ded5000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "cacff5b2-db23-47ee-a8b0-8e144d936c5d" + "Date" : "Mon, 13 Jul 2020 17:04:41 GMT", + "x-ms-client-request-id" : "d05a895e-0128-449d-89b9-fae21e06bd32" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0795315e75f398094?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac066316ce06522f8c1/javablobappendblockfromurldestinationac196846b0ffa474f?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cacc6ab2-36ef-47aa-bbda-f12ee7dccf0c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1624194e-e82e-4d33-b028-f21b39ecd047", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE87F1B4F", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "e0d1e004-701e-0046-5a37-59a505000000", + "Date" : "Mon, 13 Jul 2020 17:04:41 GMT", + "x-ms-client-request-id" : "1624194e-e82e-4d33-b028-f21b39ecd047" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac066316ce06522f8c1?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab4d1d81-e44d-41e1-821c-c96d55b77533", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ED6651D98", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf579c4-601e-0040-2af3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "cacc6ab2-36ef-47aa-bbda-f12ee7dccf0c" + "x-ms-request-id" : "4ae9abf6-701e-0034-7837-59a24a000000", + "Date" : "Mon, 13 Jul 2020 17:04:42 GMT", + "x-ms-client-request-id" : "ab4d1d81-e44d-41e1-821c-c96d55b77533" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0795315e75f398094/javablobappendblockfromurldestinationac2967267a52d1433", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac066316ce06522f8c1/javablobappendblockfromurldestinationac2508295c61d9c7e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "849b59da-f83a-44d1-9884-7525aefc0cc8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3455ac04-5d41-4d11-89a3-fd12429f248f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE886B5C2", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "ETag" : "0x8D8274ED69C4AE3", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:43 GMT", + "x-ms-version-id" : "2020-07-13T17:04:43.4424547Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf579f5-601e-0040-56f3-121998000000", + "x-ms-request-id" : "79c8ad60-001e-0087-4037-5902e7000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "849b59da-f83a-44d1-9884-7525aefc0cc8" + "Date" : "Mon, 13 Jul 2020 17:04:43 GMT", + "x-ms-client-request-id" : "3455ac04-5d41-4d11-89a3-fd12429f248f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0795315e75f398094/javablobappendblockfromurldestinationac2967267a52d1433?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac066316ce06522f8c1/javablobappendblockfromurldestinationac2508295c61d9c7e?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c15c2ca2-2964-4311-9c24-2a0b6e76e270", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d67af517-71a6-4c60-9f2e-d61b52245350", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "ETag" : "0x8D7E10AE88E3196", + "Date" : "Mon, 13 Jul 2020 17:04:43 GMT", + "ETag" : "0x8D8274ED6D27FF8", "Content-Length" : "0", - "x-ms-request-id" : "caf57a1f-601e-0040-80f3-121998000000", - "x-ms-client-request-id" : "c15c2ca2-2964-4311-9c24-2a0b6e76e270", + "x-ms-request-id" : "e6dc1b19-201e-0074-6137-59a572000000", + "x-ms-client-request-id" : "d67af517-71a6-4c60-9f2e-d61b52245350", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0795315e75f398094/javablobappendblockfromurldestinationac1865689cf06189a?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac066316ce06522f8c1/javablobappendblockfromurldestinationac196846b0ffa474f?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f3413638-5db5-4d28-9035-a4f753a71b46" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "45a2c1ac-760f-4c13-936f-7ec2dff0747b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AE895AD72", + "ETag" : "0x8D8274ED70C381E", "Content-Length" : "0", - "x-ms-request-id" : "caf57a3a-601e-0040-17f3-121998000000", - "x-ms-client-request-id" : "f3413638-5db5-4d28-9035-a4f753a71b46", + "x-ms-request-id" : "73301c2f-401e-0062-7837-5953a5000000", + "x-ms-client-request-id" : "45a2c1ac-760f-4c13-936f-7ec2dff0747b", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -141,43 +162,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3e9c79ad-6ecd-4fbf-9e5f-afc79b3b5d3d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c5acdfb-d5dc-4f26-ab31-02df7ed63197" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57a75-601e-0040-47f3-121998000000", - "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac0795315e75f398094Wed, 15 Apr 2020 07:02:06 GMT\"0x8D7E10AE87F1B4F\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "3e9c79ad-6ecd-4fbf-9e5f-afc79b3b5d3d", + "x-ms-request-id" : "cf6d9ff7-001e-0001-3037-59ce5e000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac066316ce06522f8c1Mon, 13 Jul 2020 17:04:43 GMT\"0x8D8274ED6651D98\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:44 GMT", + "x-ms-client-request-id" : "8c5acdfb-d5dc-4f26-ab31-02df7ed63197", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0795315e75f398094?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac066316ce06522f8c1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "764b00ba-40e7-43df-9e7a-9fb109435a14" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "000c029d-7873-444a-b379-56db9c0b7b87" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf57aa1-601e-0040-6df3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:05 GMT", - "x-ms-client-request-id" : "764b00ba-40e7-43df-9e7a-9fb109435a14" + "x-ms-request-id" : "a7b7e68b-b01e-002b-6e37-59114e000000", + "Date" : "Mon, 13 Jul 2020 17:04:44 GMT", + "x-ms-client-request-id" : "000c029d-7873-444a-b379-56db9c0b7b87" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurldestinationac0795315e75f398094", "javablobappendblockfromurldestinationac1865689cf06189a", "javablobappendblockfromurldestinationac2967267a52d1433" ] + "variables" : [ "jtcappendblockfromurldestinationac066316ce06522f8c1", "javablobappendblockfromurldestinationac196846b0ffa474f", "javablobappendblockfromurldestinationac2508295c61d9c7e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[7].json index 8b09bd5cee02..eb3500fd6587 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[7].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[7].json @@ -1,139 +1,160 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac018159b9b0557423a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0781020b770c1d09e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "05b369c8-eb96-4464-8b41-38c5d9aefcb8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e8fad33-c4a9-4a38-9870-dd92bdd72255" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8AE54CC", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "ETag" : "0x8D8274ED7AE66C0", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57ad3-601e-0040-19f3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "05b369c8-eb96-4464-8b41-38c5d9aefcb8" + "x-ms-request-id" : "fb6c72ce-501e-001c-1137-59c3e2000000", + "Date" : "Mon, 13 Jul 2020 17:04:44 GMT", + "x-ms-client-request-id" : "2e8fad33-c4a9-4a38-9870-dd92bdd72255" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac018159b9b0557423a/javablobappendblockfromurldestinationac197801f9c1557bc", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0781020b770c1d09e/javablobappendblockfromurldestinationac170170dd54e9f90", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "15158415-13f3-416b-b9c0-8ed3a797e12b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ca75281-f770-4a49-aca0-869615e375d0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8B59925", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "ETag" : "0x8D8274ED7E1B068", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:45 GMT", + "x-ms-version-id" : "2020-07-13T17:04:45.5749736Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57b00-601e-0040-3df3-121998000000", + "x-ms-request-id" : "0ee33fa7-301e-000a-0237-593535000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "15158415-13f3-416b-b9c0-8ed3a797e12b" + "Date" : "Mon, 13 Jul 2020 17:04:44 GMT", + "x-ms-client-request-id" : "0ca75281-f770-4a49-aca0-869615e375d0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac018159b9b0557423a?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0781020b770c1d09e/javablobappendblockfromurldestinationac170170dd54e9f90?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9342c2c8-8703-4d98-b383-93cd1a29e77a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9673a5ab-9d2c-41f8-990a-316aefd9456e", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8BCCFB3", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4bc3cbcf-b01e-0049-0a37-59d369000000", + "Date" : "Mon, 13 Jul 2020 17:04:45 GMT", + "x-ms-client-request-id" : "9673a5ab-9d2c-41f8-990a-316aefd9456e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0781020b770c1d09e?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c9c6b93-489d-434a-97bb-b53afeb01646", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ED84C5F0A", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57b1f-601e-0040-5bf3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "9342c2c8-8703-4d98-b383-93cd1a29e77a" + "x-ms-request-id" : "a8583930-a01e-0037-0537-59432e000000", + "Date" : "Mon, 13 Jul 2020 17:04:46 GMT", + "x-ms-client-request-id" : "7c9c6b93-489d-434a-97bb-b53afeb01646" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac018159b9b0557423a/javablobappendblockfromurldestinationac21360348c4b3ccf", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0781020b770c1d09e/javablobappendblockfromurldestinationac202952f1e1ddc18", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3935d342-8c37-4b95-a869-c97df1b1f447" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7c30a05-9da8-459f-a484-92676eb16f53" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AE8C41B8B", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "ETag" : "0x8D8274ED87E3403", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:46 GMT", + "x-ms-version-id" : "2020-07-13T17:04:46.6017048Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "caf57b4f-601e-0040-05f3-121998000000", + "x-ms-request-id" : "ad1a6c37-001e-004c-0537-5901b2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "3935d342-8c37-4b95-a869-c97df1b1f447" + "Date" : "Mon, 13 Jul 2020 17:04:46 GMT", + "x-ms-client-request-id" : "b7c30a05-9da8-459f-a484-92676eb16f53" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac018159b9b0557423a/javablobappendblockfromurldestinationac21360348c4b3ccf?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0781020b770c1d09e/javablobappendblockfromurldestinationac202952f1e1ddc18?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fd2383b7-d393-4123-87b6-bd3ff5948f42", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "613f4d49-faa9-426e-b2b4-1975dbc9b9b5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "ETag" : "0x8D7E10AE8CB7048", + "Date" : "Mon, 13 Jul 2020 17:04:46 GMT", + "ETag" : "0x8D8274ED8AF3806", "Content-Length" : "0", - "x-ms-request-id" : "caf57b7e-601e-0040-30f3-121998000000", - "x-ms-client-request-id" : "fd2383b7-d393-4123-87b6-bd3ff5948f42", + "x-ms-request-id" : "42cb609b-c01e-001e-6337-597d5a000000", + "x-ms-client-request-id" : "613f4d49-faa9-426e-b2b4-1975dbc9b9b5", "x-ms-blob-append-offset" : "0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac018159b9b0557423a/javablobappendblockfromurldestinationac197801f9c1557bc?comp=appendblock", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0781020b770c1d09e/javablobappendblockfromurldestinationac170170dd54e9f90?comp=appendblock", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "368f1854-d090-4841-a8bc-ad3700d9e507" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "589d5c1a-f43a-4c1f-9622-266ba6f7109a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-committed-block-count" : "1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:06 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:47 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", + "Date" : "Mon, 13 Jul 2020 17:04:46 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AE8D3D6C1", + "ETag" : "0x8D8274ED8E76949", "Content-Length" : "0", - "x-ms-request-id" : "caf57bae-601e-0040-5bf3-121998000000", - "x-ms-client-request-id" : "368f1854-d090-4841-a8bc-ad3700d9e507", + "x-ms-request-id" : "5f61a351-c01e-0021-2137-59b5f9000000", + "x-ms-client-request-id" : "589d5c1a-f43a-4c1f-9622-266ba6f7109a", "x-ms-blob-append-offset" : "0" }, "Exception" : null @@ -141,43 +162,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1edfda52-7e74-4650-92b0-113fc251c7d1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a88d491-6c86-43d0-bfcf-deb27ef415a0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "caf57be2-601e-0040-03f3-121998000000", - "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac018159b9b0557423aWed, 15 Apr 2020 07:02:06 GMT\"0x8D7E10AE8BCCFB3\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "1edfda52-7e74-4650-92b0-113fc251c7d1", + "x-ms-request-id" : "2232fb42-101e-009b-1f37-595087000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac0781020b770c1d09eMon, 13 Jul 2020 17:04:46 GMT\"0x8D8274ED84C5F0A\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:46 GMT", + "x-ms-client-request-id" : "3a88d491-6c86-43d0-bfcf-deb27ef415a0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac018159b9b0557423a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac0781020b770c1d09e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3a348875-9e6a-46f7-a0eb-2367215eca10" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6178d45-9259-4a0c-ac1c-770bad7a2fad" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "caf57c01-601e-0040-1df3-121998000000", - "Date" : "Wed, 15 Apr 2020 07:02:06 GMT", - "x-ms-client-request-id" : "3a348875-9e6a-46f7-a0eb-2367215eca10" + "x-ms-request-id" : "cb8c3e11-d01e-0060-2c37-59ed1d000000", + "Date" : "Mon, 13 Jul 2020 17:04:47 GMT", + "x-ms-client-request-id" : "a6178d45-9259-4a0c-ac1c-770bad7a2fad" }, "Exception" : null } ], - "variables" : [ "jtcappendblockfromurldestinationac018159b9b0557423a", "javablobappendblockfromurldestinationac197801f9c1557bc", "javablobappendblockfromurldestinationac21360348c4b3ccf" ] + "variables" : [ "jtcappendblockfromurldestinationac0781020b770c1d09e", "javablobappendblockfromurldestinationac170170dd54e9f90", "javablobappendblockfromurldestinationac202952f1e1ddc18" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[8].json new file mode 100644 index 000000000000..7c589f4b256d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestappendblockfromurldestinationac[8].json @@ -0,0 +1,203 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac095303f6585383f7f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "59557310-2a75-48e3-9ede-098972dfb0b5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ED97FE49B", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:48 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "09f9352e-101e-008b-1637-5995ef000000", + "Date" : "Mon, 13 Jul 2020 17:04:47 GMT", + "x-ms-client-request-id" : "59557310-2a75-48e3-9ede-098972dfb0b5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac095303f6585383f7f/javablobappendblockfromurldestinationac14088428bb6aad7", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6a55a5b-22c1-4dcc-9536-2e237b24a122" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274ED9B39105", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:48 GMT", + "x-ms-version-id" : "2020-07-13T17:04:48.6281477Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8e00e926-501e-0051-4637-590c0e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:04:48 GMT", + "x-ms-client-request-id" : "b6a55a5b-22c1-4dcc-9536-2e237b24a122" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac095303f6585383f7f/javablobappendblockfromurldestinationac14088428bb6aad7?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29919885-6492-479f-ab1f-65c9459e6423", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "88bf96ac-901e-002c-6337-597d2d000000", + "Date" : "Mon, 13 Jul 2020 17:04:48 GMT", + "x-ms-client-request-id" : "29919885-6492-479f-ab1f-65c9459e6423" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac095303f6585383f7f?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f4638ce-f89f-400e-8660-b7324515d066", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274EDA16EB6C", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b87c1fa1-201e-0006-6e37-59a23d000000", + "Date" : "Mon, 13 Jul 2020 17:04:49 GMT", + "x-ms-client-request-id" : "4f4638ce-f89f-400e-8660-b7324515d066" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac095303f6585383f7f/javablobappendblockfromurldestinationac28976473b8dc74a", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2624c8e2-cd98-49bb-a756-e67c1d6a219e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274EDA4A201C", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:49 GMT", + "x-ms-version-id" : "2020-07-13T17:04:49.6148508Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76637358-801e-0030-0137-592f4d000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:04:49 GMT", + "x-ms-client-request-id" : "2624c8e2-cd98-49bb-a756-e67c1d6a219e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac095303f6585383f7f/javablobappendblockfromurldestinationac28976473b8dc74a?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66ec61a2-9b42-4700-8813-0ab9f6c56c30", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-blob-committed-block-count" : "1", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:04:49 GMT", + "ETag" : "0x8D8274EDA7C35BF", + "Content-Length" : "0", + "x-ms-request-id" : "81163f4c-101e-006f-0537-599b71000000", + "x-ms-client-request-id" : "66ec61a2-9b42-4700-8813-0ab9f6c56c30", + "x-ms-blob-append-offset" : "0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac095303f6585383f7f/javablobappendblockfromurldestinationac14088428bb6aad7?comp=appendblock", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b059fdb6-b2cf-42a9-83e8-de0c16202e68" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-committed-block-count" : "1", + "Last-Modified" : "Mon, 13 Jul 2020 17:04:50 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:04:49 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274EDAB21CA5", + "Content-Length" : "0", + "x-ms-request-id" : "1a16afc9-501e-0023-5037-590b41000000", + "x-ms-client-request-id" : "b059fdb6-b2cf-42a9-83e8-de0c16202e68", + "x-ms-blob-append-offset" : "0" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcappendblockfromurldestinationac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "584f577d-3e82-4539-859b-313563af8a6c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "00580240-301e-0025-6537-5938fe000000", + "Body" : "jtcappendblockfromurldestinationacjtcappendblockfromurldestinationac095303f6585383f7fMon, 13 Jul 2020 17:04:49 GMT\"0x8D8274EDA16EB6C\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:04:50 GMT", + "x-ms-client-request-id" : "584f577d-3e82-4539-859b-313563af8a6c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcappendblockfromurldestinationac095303f6585383f7f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "09feb467-6d0e-450c-a744-06ad2c6f0aae" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "bfdc3625-a01e-0027-5e37-598646000000", + "Date" : "Mon, 13 Jul 2020 17:04:50 GMT", + "x-ms-client-request-id" : "09feb467-6d0e-450c-a744-06ad2c6f0aae" + }, + "Exception" : null + } ], + "variables" : [ "jtcappendblockfromurldestinationac095303f6585383f7f", "javablobappendblockfromurldestinationac14088428bb6aad7", "javablobappendblockfromurldestinationac28976473b8dc74a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[0].json index 265148486ad5..24932a802713 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[0].json @@ -1,110 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac7e654844368eae485?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac02d37530d1bb0ce67?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "041964ff-2c7f-43f1-b031-e2dc7c9d01b0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1167508-c2a7-47d3-9421-a730e87b0858" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADD907134", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:47 GMT", + "ETag" : "0x8D8274E0C03BD56", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f7a2-e01e-0096-51f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "041964ff-2c7f-43f1-b031-e2dc7c9d01b0" + "x-ms-request-id" : "eb2cc21e-b01e-0092-2f36-591554000000", + "Date" : "Mon, 13 Jul 2020 16:59:02 GMT", + "x-ms-client-request-id" : "f1167508-c2a7-47d3-9421-a730e87b0858" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac7e654844368eae485/javablobcreateac1appendblobapitestcreateac7e60455638ec3a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac02d37530d1bb0ce67/javablobcreateac1appendblobapitestcreateac02d6351826b16b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b2f4a458-a6ff-4bc6-b542-2a6c20ac2564" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "84448765-87be-43f0-a247-634bf9c925bc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADD99C15C", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:47 GMT", + "ETag" : "0x8D8274E0C7A2EF5", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:04 GMT", + "x-ms-version-id" : "2020-07-13T16:59:04.3191541Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f7bb-e01e-0096-69f3-125242000000", + "x-ms-request-id" : "2e336a15-101e-000d-7536-595956000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "b2f4a458-a6ff-4bc6-b542-2a6c20ac2564" + "Date" : "Mon, 13 Jul 2020 16:59:03 GMT", + "x-ms-client-request-id" : "84448765-87be-43f0-a247-634bf9c925bc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac7e654844368eae485/javablobcreateac1appendblobapitestcreateac7e60455638ec3a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac02d37530d1bb0ce67/javablobcreateac1appendblobapitestcreateac02d6351826b16b?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bca0ac13-bdd3-4894-a533-78d474577e1e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "922408d4-9a53-4cc8-be5c-80d2ad6a050a", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADDA0C7EE", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0d58004f-501e-007e-4c36-5901c5000000", + "Date" : "Mon, 13 Jul 2020 16:59:04 GMT", + "x-ms-client-request-id" : "922408d4-9a53-4cc8-be5c-80d2ad6a050a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac02d37530d1bb0ce67/javablobcreateac1appendblobapitestcreateac02d6351826b16b", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dcce23f5-bb21-4814-b8ff-777200d2d735" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E0D1C7FFA", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:05 GMT", + "x-ms-version-id" : "2020-07-13T16:59:05.3849124Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f7d9-e01e-0096-01f3-125242000000", + "x-ms-request-id" : "4a85b1e5-801e-0099-4f36-59ee3f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "bca0ac13-bdd3-4894-a533-78d474577e1e" + "Date" : "Mon, 13 Jul 2020 16:59:04 GMT", + "x-ms-client-request-id" : "dcce23f5-bb21-4814-b8ff-777200d2d735" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "11b638ab-12f8-449e-b70f-b2977cd24e5f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "10e9a046-7074-4ff3-9004-d3a62e32df7d" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425f7ef-e01e-0096-15f3-125242000000", - "Body" : "jtccreateacjtccreateac0appendblobapitestcreateac7e654844368eae485Wed, 15 Apr 2020 07:01:47 GMT\"0x8D7E10ADD907134\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "11b638ab-12f8-449e-b70f-b2977cd24e5f", + "x-ms-request-id" : "262825ec-f01e-0077-2036-594416000000", + "Body" : "jtccreateacjtccreateac0appendblobapitestcreateac02d37530d1bb0ce67Mon, 13 Jul 2020 16:59:03 GMT\"0x8D8274E0C03BD56\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:59:05 GMT", + "x-ms-client-request-id" : "10e9a046-7074-4ff3-9004-d3a62e32df7d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac7e654844368eae485?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac02d37530d1bb0ce67?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "86b3627c-5c18-4bcd-ae30-a5b373887eed" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "12a38748-4c24-4e14-ab7d-46e2b0bb4fb5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425f80c-e01e-0096-32f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "86b3627c-5c18-4bcd-ae30-a5b373887eed" + "x-ms-request-id" : "54bcc06d-f01e-0005-4036-594359000000", + "Date" : "Mon, 13 Jul 2020 16:59:05 GMT", + "x-ms-client-request-id" : "12a38748-4c24-4e14-ab7d-46e2b0bb4fb5" }, "Exception" : null } ], - "variables" : [ "jtccreateac0appendblobapitestcreateac7e654844368eae485", "javablobcreateac1appendblobapitestcreateac7e60455638ec3a" ] + "variables" : [ "jtccreateac0appendblobapitestcreateac02d37530d1bb0ce67", "javablobcreateac1appendblobapitestcreateac02d6351826b16b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[1].json index 17a9a85d5685..014363b5ab98 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[1].json @@ -1,110 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac772486241036b3854?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc71793729b552ee69?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83f2be6e-121f-489b-8f51-0ee86e67d8fe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d757250-6dca-4464-82ba-e8ce65526e46" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADDC5BF46", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "ETag" : "0x8D8274E0DE91975", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f858-e01e-0096-75f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "83f2be6e-121f-489b-8f51-0ee86e67d8fe" + "x-ms-request-id" : "4ae81934-701e-0034-3d36-59a24a000000", + "Date" : "Mon, 13 Jul 2020 16:59:06 GMT", + "x-ms-client-request-id" : "8d757250-6dca-4464-82ba-e8ce65526e46" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac772486241036b3854/javablobcreateac1appendblobapitestcreateac7722241121621b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc71793729b552ee69/javablobcreateac1appendblobapitestcreateacc7166159e6ef7f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5243614f-f5fc-4f6f-89e0-f505623ae2e4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2e66a90-b522-4d22-8b01-f3c5877da5e8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADDCF3603", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "ETag" : "0x8D8274E0E228704", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:07 GMT", + "x-ms-version-id" : "2020-07-13T16:59:07.1001348Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f870-e01e-0096-09f3-125242000000", + "x-ms-request-id" : "af21eb1a-b01e-0076-7636-591bca000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "5243614f-f5fc-4f6f-89e0-f505623ae2e4" + "Date" : "Mon, 13 Jul 2020 16:59:06 GMT", + "x-ms-client-request-id" : "d2e66a90-b522-4d22-8b01-f3c5877da5e8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac772486241036b3854/javablobcreateac1appendblobapitestcreateac7722241121621b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc71793729b552ee69/javablobcreateac1appendblobapitestcreateacc7166159e6ef7f?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "06aa5a94-a31c-4acb-9a51-221bf25d627a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "889f07af-936d-4c35-a6b7-d8c2d4f2383a", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADDD92370", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "d3927d5c-a01e-0055-2136-598109000000", + "Date" : "Mon, 13 Jul 2020 16:59:06 GMT", + "x-ms-client-request-id" : "889f07af-936d-4c35-a6b7-d8c2d4f2383a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc71793729b552ee69/javablobcreateac1appendblobapitestcreateacc7166159e6ef7f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "36957ca7-bdf4-435d-810a-5356a7eab6fc" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E0E8ECA06", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:07 GMT", + "x-ms-version-id" : "2020-07-13T16:59:07.8106390Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f889-e01e-0096-1ef3-125242000000", + "x-ms-request-id" : "782347c4-801e-0020-2a36-59ea25000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "06aa5a94-a31c-4acb-9a51-221bf25d627a" + "Date" : "Mon, 13 Jul 2020 16:59:06 GMT", + "x-ms-client-request-id" : "36957ca7-bdf4-435d-810a-5356a7eab6fc" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83b0a7e0-4289-4809-946c-b2b41921e710" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23749b3b-1dc0-4555-a490-425a89b65713" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425f8a4-e01e-0096-33f3-125242000000", - "Body" : "jtccreateacjtccreateac0appendblobapitestcreateac772486241036b3854Wed, 15 Apr 2020 07:01:48 GMT\"0x8D7E10ADDC5BF46\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:47 GMT", - "x-ms-client-request-id" : "83b0a7e0-4289-4809-946c-b2b41921e710", + "x-ms-request-id" : "40ddd38c-e01e-0026-3136-59d99a000000", + "Body" : "jtccreateacjtccreateac0appendblobapitestcreateacc71793729b552ee69Mon, 13 Jul 2020 16:59:06 GMT\"0x8D8274E0DE91975\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:59:07 GMT", + "x-ms-client-request-id" : "23749b3b-1dc0-4555-a490-425a89b65713", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac772486241036b3854?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc71793729b552ee69?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "68725570-5100-45de-9e9b-992d4a42e755" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "11b06f0c-e1f5-46d4-a496-5f04f80026d0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425f8b4-e01e-0096-42f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "68725570-5100-45de-9e9b-992d4a42e755" + "x-ms-request-id" : "a8f11442-701e-0069-1b36-59a8ce000000", + "Date" : "Mon, 13 Jul 2020 16:59:07 GMT", + "x-ms-client-request-id" : "11b06f0c-e1f5-46d4-a496-5f04f80026d0" }, "Exception" : null } ], - "variables" : [ "jtccreateac0appendblobapitestcreateac772486241036b3854", "javablobcreateac1appendblobapitestcreateac7722241121621b" ] + "variables" : [ "jtccreateac0appendblobapitestcreateacc71793729b552ee69", "javablobcreateac1appendblobapitestcreateacc7166159e6ef7f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[2].json index 9406b86174ac..64b9b63c1072 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[2].json @@ -1,110 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac59f16343e22c224ee?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac602354992312b02f7?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6f5da902-310a-42d5-a407-070a11c70ac1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "484b921e-40b2-455e-9d6c-9f48eadb67dc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADDF45504", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "ETag" : "0x8D8274E0F385879", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f8ce-e01e-0096-58f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "6f5da902-310a-42d5-a407-070a11c70ac1" + "x-ms-request-id" : "b028ba6e-d01e-0070-5e36-592875000000", + "Date" : "Mon, 13 Jul 2020 16:59:08 GMT", + "x-ms-client-request-id" : "484b921e-40b2-455e-9d6c-9f48eadb67dc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac59f16343e22c224ee/javablobcreateac1appendblobapitestcreateac59f36360dc910e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac602354992312b02f7/javablobcreateac1appendblobapitestcreateac60277878454abd", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "11301f5d-ee65-4f8b-9078-99ce5c8cc497" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38a88ed9-1bbc-44af-8894-34f1f5c168f9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADDFC4436", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "ETag" : "0x8D8274E0F75355E", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:09 GMT", + "x-ms-version-id" : "2020-07-13T16:59:09.3197150Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f8e7-e01e-0096-6df3-125242000000", + "x-ms-request-id" : "81b839b5-901e-004e-6f36-59bf0a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "11301f5d-ee65-4f8b-9078-99ce5c8cc497" + "Date" : "Mon, 13 Jul 2020 16:59:09 GMT", + "x-ms-client-request-id" : "38a88ed9-1bbc-44af-8894-34f1f5c168f9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac59f16343e22c224ee/javablobcreateac1appendblobapitestcreateac59f36360dc910e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac602354992312b02f7/javablobcreateac1appendblobapitestcreateac60277878454abd?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2931752a-76a5-436e-b8dc-306025325d98" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "209dc6d0-050b-4427-bbc6-26588d646844", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE034ACD", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2925cf4a-c01e-007c-6e36-59bf7d000000", + "Date" : "Mon, 13 Jul 2020 16:59:09 GMT", + "x-ms-client-request-id" : "209dc6d0-050b-4427-bbc6-26588d646844" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac602354992312b02f7/javablobcreateac1appendblobapitestcreateac60277878454abd", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0740d172-f5e9-498b-95a6-4d849bcb068d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E0FDFCA71", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:10 GMT", + "x-ms-version-id" : "2020-07-13T16:59:10.0192129Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f8fd-e01e-0096-01f3-125242000000", + "x-ms-request-id" : "79c2c487-001e-005c-6836-59c4da000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "2931752a-76a5-436e-b8dc-306025325d98" + "Date" : "Mon, 13 Jul 2020 16:59:09 GMT", + "x-ms-client-request-id" : "0740d172-f5e9-498b-95a6-4d849bcb068d" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5c4d6cff-cb0c-4d2f-b8dc-931961858460" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "06105166-0606-4358-9aa1-ec1943106bb9" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425f90a-e01e-0096-0ef3-125242000000", - "Body" : "jtccreateacjtccreateac0appendblobapitestcreateac59f16343e22c224eeWed, 15 Apr 2020 07:01:48 GMT\"0x8D7E10ADDF45504\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "5c4d6cff-cb0c-4d2f-b8dc-931961858460", + "x-ms-request-id" : "5d85c730-701e-009d-3a36-596338000000", + "Body" : "jtccreateacjtccreateac0appendblobapitestcreateac602354992312b02f7Mon, 13 Jul 2020 16:59:08 GMT\"0x8D8274E0F385879\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:59:10 GMT", + "x-ms-client-request-id" : "06105166-0606-4358-9aa1-ec1943106bb9", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac59f16343e22c224ee?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac602354992312b02f7?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8a94bf49-4917-44ab-b8bd-1e0e552d63b1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "51698d0b-bb06-456c-9eeb-4a3b9d7c19fd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425f91f-e01e-0096-20f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "8a94bf49-4917-44ab-b8bd-1e0e552d63b1" + "x-ms-request-id" : "60570d92-b01e-0004-5936-591c85000000", + "Date" : "Mon, 13 Jul 2020 16:59:10 GMT", + "x-ms-client-request-id" : "51698d0b-bb06-456c-9eeb-4a3b9d7c19fd" }, "Exception" : null } ], - "variables" : [ "jtccreateac0appendblobapitestcreateac59f16343e22c224ee", "javablobcreateac1appendblobapitestcreateac59f36360dc910e" ] + "variables" : [ "jtccreateac0appendblobapitestcreateac602354992312b02f7", "javablobcreateac1appendblobapitestcreateac60277878454abd" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[3].json index da20cc5b64ad..2c44bb5017fc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[3].json @@ -1,140 +1,162 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacb4965429c3dfbe176?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacd3103426a8dc11c78?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "65daae71-8a23-442d-a0f4-db9f94ae8133" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae6f55ab-dbb4-4aad-ab80-a5c9e62e9917" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE194B42", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "ETag" : "0x8D8274E10958CAC", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f935-e01e-0096-34f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "65daae71-8a23-442d-a0f4-db9f94ae8133" + "x-ms-request-id" : "35b24190-f01e-0083-6336-598fe0000000", + "Date" : "Mon, 13 Jul 2020 16:59:10 GMT", + "x-ms-client-request-id" : "ae6f55ab-dbb4-4aad-ab80-a5c9e62e9917" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacb4965429c3dfbe176/javablobcreateac1appendblobapitestcreateacb4987595979254", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacd3103426a8dc11c78/javablobcreateac1appendblobapitestcreateacd311526499bea0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6492075c-b3c7-4ff3-8f50-73a05655cba0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a75193c-1568-46c6-aa4f-b83f791c3933" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE24E490", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "ETag" : "0x8D8274E10D10D32", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:11 GMT", + "x-ms-version-id" : "2020-07-13T16:59:11.5993394Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f94d-e01e-0096-47f3-125242000000", + "x-ms-request-id" : "9ab8b8f0-801e-0089-0d36-592b57000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "6492075c-b3c7-4ff3-8f50-73a05655cba0" + "Date" : "Mon, 13 Jul 2020 16:59:11 GMT", + "x-ms-client-request-id" : "8a75193c-1568-46c6-aa4f-b83f791c3933" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacd3103426a8dc11c78/javablobcreateac1appendblobapitestcreateacd311526499bea0?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad2d1543-3be2-493d-8e76-ba21531bc4f9", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "f7f79087-301e-0068-7836-59f712000000", + "Date" : "Mon, 13 Jul 2020 16:59:11 GMT", + "x-ms-client-request-id" : "ad2d1543-3be2-493d-8e76-ba21531bc4f9" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacb4965429c3dfbe176/javablobcreateac1appendblobapitestcreateacb4987595979254", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacd3103426a8dc11c78/javablobcreateac1appendblobapitestcreateacd311526499bea0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9bbbac01-4da9-4593-8e55-3bd8d01a28c2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dcb51ede-43c9-40df-b7c9-d3cd742894bf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:48 GMT", + "x-ms-version-id" : "2020-07-13T16:59:11.5993394Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", + "Date" : "Mon, 13 Jul 2020 16:59:11 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10ADE24E490", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:01:48 GMT", + "ETag" : "0x8D8274E10D10D32", + "x-ms-creation-time" : "Mon, 13 Jul 2020 16:59:11 GMT", "Content-Length" : "0", - "x-ms-request-id" : "7425f960-e01e-0096-5af3-125242000000", - "x-ms-client-request-id" : "9bbbac01-4da9-4593-8e55-3bd8d01a28c2", + "x-ms-request-id" : "640bb2b0-301e-0047-1836-59fad9000000", + "x-ms-client-request-id" : "dcb51ede-43c9-40df-b7c9-d3cd742894bf", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacb4965429c3dfbe176/javablobcreateac1appendblobapitestcreateacb4987595979254", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacd3103426a8dc11c78/javablobcreateac1appendblobapitestcreateacd311526499bea0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f08b55ff-bb60-48e5-9da9-f11dd4530e4e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "977d8d02-9815-4d03-9449-02aa51952a16" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE333FDA", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "ETag" : "0x8D8274E117B4EE5", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:12 GMT", + "x-ms-version-id" : "2020-07-13T16:59:12.7161333Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f96c-e01e-0096-65f3-125242000000", + "x-ms-request-id" : "05912d7e-201e-0039-4a36-596a9e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "f08b55ff-bb60-48e5-9da9-f11dd4530e4e" + "Date" : "Mon, 13 Jul 2020 16:59:12 GMT", + "x-ms-client-request-id" : "977d8d02-9815-4d03-9449-02aa51952a16" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0fd28aac-46f5-473d-a8ad-32d2294d9e08" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4186348e-dab5-42b6-9367-67409ac2b591" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425f97a-e01e-0096-72f3-125242000000", - "Body" : "jtccreateacjtccreateac0appendblobapitestcreateacb4965429c3dfbe176Wed, 15 Apr 2020 07:01:48 GMT\"0x8D7E10ADE194B42\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "0fd28aac-46f5-473d-a8ad-32d2294d9e08", + "x-ms-request-id" : "8917340e-a01e-0018-2d36-594ee5000000", + "Body" : "jtccreateacjtccreateac0appendblobapitestcreateacd3103426a8dc11c78Mon, 13 Jul 2020 16:59:11 GMT\"0x8D8274E10958CAC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:59:12 GMT", + "x-ms-client-request-id" : "4186348e-dab5-42b6-9367-67409ac2b591", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacb4965429c3dfbe176?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacd3103426a8dc11c78?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f4a91cc6-e859-4ed0-8297-e349e581d55b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0fea3d5-ffab-4b03-902f-6825a4107f3e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425f992-e01e-0096-09f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "f4a91cc6-e859-4ed0-8297-e349e581d55b" + "x-ms-request-id" : "19656083-201e-005b-1c36-59a8b9000000", + "Date" : "Mon, 13 Jul 2020 16:59:13 GMT", + "x-ms-client-request-id" : "a0fea3d5-ffab-4b03-902f-6825a4107f3e" }, "Exception" : null } ], - "variables" : [ "jtccreateac0appendblobapitestcreateacb4965429c3dfbe176", "javablobcreateac1appendblobapitestcreateacb4987595979254" ] + "variables" : [ "jtccreateac0appendblobapitestcreateacd3103426a8dc11c78", "javablobcreateac1appendblobapitestcreateacd311526499bea0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[4].json index ff944e7cf280..19d67abcad1b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[4].json @@ -1,110 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac6c680615cb600c5a6?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac9726437237c505309?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "497963a9-10d6-4729-890b-cc3fb28d6196" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ed6b44f-eb8c-40b4-9f37-d47133fe6768" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE4AA0B2", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "ETag" : "0x8D8274E12204FA5", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f9af-e01e-0096-20f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "497963a9-10d6-4729-890b-cc3fb28d6196" + "x-ms-request-id" : "024fbb53-901e-0061-2736-59b2c1000000", + "Date" : "Mon, 13 Jul 2020 16:59:13 GMT", + "x-ms-client-request-id" : "5ed6b44f-eb8c-40b4-9f37-d47133fe6768" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac6c680615cb600c5a6/javablobcreateac1appendblobapitestcreateac6c624812bae0ba", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac9726437237c505309/javablobcreateac1appendblobapitestcreateac97205082a44128", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2ea46143-84b2-4adf-bbaf-cce15ec16477" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "782daeee-c92b-4b2f-b2d6-bbbe49b9ef0e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE5379C1", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "ETag" : "0x8D8274E125B295D", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:14 GMT", + "x-ms-version-id" : "2020-07-13T16:59:14.1821789Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f9c3-e01e-0096-31f3-125242000000", + "x-ms-request-id" : "74cbb992-c01e-0053-0936-59b2b6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "2ea46143-84b2-4adf-bbaf-cce15ec16477" + "Date" : "Mon, 13 Jul 2020 16:59:14 GMT", + "x-ms-client-request-id" : "782daeee-c92b-4b2f-b2d6-bbbe49b9ef0e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac6c680615cb600c5a6/javablobcreateac1appendblobapitestcreateac6c624812bae0ba", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac9726437237c505309/javablobcreateac1appendblobapitestcreateac97205082a44128?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "20d37a15-cae1-409b-bd41-12a1f96877af" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae674c23-8941-45ca-8e91-cfaa01559742", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE5A0B09", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "ad17ca40-001e-004c-2c36-5901b2000000", + "Date" : "Mon, 13 Jul 2020 16:59:13 GMT", + "x-ms-client-request-id" : "ae674c23-8941-45ca-8e91-cfaa01559742" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac9726437237c505309/javablobcreateac1appendblobapitestcreateac97205082a44128", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d45b86a-bb98-4eeb-bf8c-167747f2c088" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E12C01816", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:14 GMT", + "x-ms-version-id" : "2020-07-13T16:59:14.8446502Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425f9d6-e01e-0096-42f3-125242000000", + "x-ms-request-id" : "a7b62475-b01e-002b-6236-59114e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "20d37a15-cae1-409b-bd41-12a1f96877af" + "Date" : "Mon, 13 Jul 2020 16:59:14 GMT", + "x-ms-client-request-id" : "1d45b86a-bb98-4eeb-bf8c-167747f2c088" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1ef5322c-03b2-4a91-af0e-28ba774e1a42" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "612002af-a679-4cb3-8557-995a1e95bc5a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425f9ee-e01e-0096-5af3-125242000000", - "Body" : "jtccreateacjtccreateac0appendblobapitestcreateac6c680615cb600c5a6Wed, 15 Apr 2020 07:01:49 GMT\"0x8D7E10ADE4AA0B2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "1ef5322c-03b2-4a91-af0e-28ba774e1a42", + "x-ms-request-id" : "0ee1a2ad-301e-000a-1836-593535000000", + "Body" : "jtccreateacjtccreateac0appendblobapitestcreateac9726437237c505309Mon, 13 Jul 2020 16:59:13 GMT\"0x8D8274E12204FA5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:59:14 GMT", + "x-ms-client-request-id" : "612002af-a679-4cb3-8557-995a1e95bc5a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac6c680615cb600c5a6?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac9726437237c505309?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c0ad7e5c-4b2b-4dfa-a3c1-63998d8fa8ec" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "555b2ea8-8096-4d7e-a018-438ba778392f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425f9f8-e01e-0096-63f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "c0ad7e5c-4b2b-4dfa-a3c1-63998d8fa8ec" + "x-ms-request-id" : "e6d9a50c-201e-0074-5936-59a572000000", + "Date" : "Mon, 13 Jul 2020 16:59:15 GMT", + "x-ms-client-request-id" : "555b2ea8-8096-4d7e-a018-438ba778392f" }, "Exception" : null } ], - "variables" : [ "jtccreateac0appendblobapitestcreateac6c680615cb600c5a6", "javablobcreateac1appendblobapitestcreateac6c624812bae0ba" ] + "variables" : [ "jtccreateac0appendblobapitestcreateac9726437237c505309", "javablobcreateac1appendblobapitestcreateac97205082a44128" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[5].json index d5c85e6daf83..68d0f3802efe 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[5].json @@ -1,132 +1,152 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac89378062e9a3bfc06?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacdca60126491ba3a7d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1c8f9820-9ae5-4a44-96fe-888f7bc43269" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2fbbce6b-91fa-445a-aea2-e9d8d25f4ec2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE705A93", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "ETag" : "0x8D8274E1368A825", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:15 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fa17-e01e-0096-7cf3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "1c8f9820-9ae5-4a44-96fe-888f7bc43269" + "x-ms-request-id" : "4b913490-f01e-0067-3236-59817e000000", + "Date" : "Mon, 13 Jul 2020 16:59:15 GMT", + "x-ms-client-request-id" : "2fbbce6b-91fa-445a-aea2-e9d8d25f4ec2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac89378062e9a3bfc06/javablobcreateac1appendblobapitestcreateac893835264abfff", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacdca60126491ba3a7d/javablobcreateac1appendblobapitestcreateacdca545436122f2", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bf10fdc1-9f4a-4e3e-a363-2ff3997c3605" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "749d72cd-f34d-4c77-a9df-5ca8bafdce16" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE790C17", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "ETag" : "0x8D8274E13AE9B29", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:16 GMT", + "x-ms-version-id" : "2020-07-13T16:59:16.4077630Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fa2c-e01e-0096-0df3-125242000000", + "x-ms-request-id" : "e0cfc07d-701e-0046-0a36-59a505000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "bf10fdc1-9f4a-4e3e-a363-2ff3997c3605" + "Date" : "Mon, 13 Jul 2020 16:59:15 GMT", + "x-ms-client-request-id" : "749d72cd-f34d-4c77-a9df-5ca8bafdce16" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac89378062e9a3bfc06/javablobcreateac1appendblobapitestcreateac893835264abfff?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacdca60126491ba3a7d/javablobcreateac1appendblobapitestcreateacdca545436122f2?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "828e246a-c2f6-42c6-9890-c38f4a404271" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "493c9fc0-28f1-4ee1-b3bb-66e730abc2ec", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE790C17", - "x-ms-lease-id" : "440cfd8f-15cb-4a55-b6bc-f54090548079", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "6edabb6d-301e-009c-6c36-593ce4000000", + "Date" : "Mon, 13 Jul 2020 16:59:15 GMT", + "x-ms-client-request-id" : "493c9fc0-28f1-4ee1-b3bb-66e730abc2ec" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacdca60126491ba3a7d/javablobcreateac1appendblobapitestcreateacdca545436122f2?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0bf97d63-3a84-4875-ac56-905de070cf83" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E13AE9B29", + "x-ms-lease-id" : "ad59b472-87a9-48ec-b8b2-5dfe75f9c121", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fa40-e01e-0096-1bf3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:48 GMT", - "x-ms-client-request-id" : "828e246a-c2f6-42c6-9890-c38f4a404271" + "x-ms-request-id" : "9cb333c9-901e-0003-0936-5970e6000000", + "Date" : "Mon, 13 Jul 2020 16:59:16 GMT", + "x-ms-client-request-id" : "0bf97d63-3a84-4875-ac56-905de070cf83" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac89378062e9a3bfc06/javablobcreateac1appendblobapitestcreateac893835264abfff", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacdca60126491ba3a7d/javablobcreateac1appendblobapitestcreateacdca545436122f2", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1ed1bf31-6b6e-43f5-adfd-c2903d259b54" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3df3df50-a186-4057-9e8c-9194338137a3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADE86CB0A", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "ETag" : "0x8D8274E1451D6C2", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:17 GMT", + "x-ms-version-id" : "2020-07-13T16:59:17.4775250Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fa4f-e01e-0096-29f3-125242000000", + "x-ms-request-id" : "34ee54ba-401e-0096-7c36-599853000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "1ed1bf31-6b6e-43f5-adfd-c2903d259b54" + "Date" : "Mon, 13 Jul 2020 16:59:16 GMT", + "x-ms-client-request-id" : "3df3df50-a186-4057-9e8c-9194338137a3" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "76547986-6457-4425-83c8-2b58f2708a34" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c68913e-7d84-4ced-9dba-b2930201957c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425fa6c-e01e-0096-40f3-125242000000", - "Body" : "jtccreateacjtccreateac0appendblobapitestcreateac89378062e9a3bfc06Wed, 15 Apr 2020 07:01:49 GMT\"0x8D7E10ADE705A93\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "76547986-6457-4425-83c8-2b58f2708a34", + "x-ms-request-id" : "f8b54885-c01e-00a7-6036-597940000000", + "Body" : "jtccreateacjtccreateac0appendblobapitestcreateacdca60126491ba3a7dMon, 13 Jul 2020 16:59:15 GMT\"0x8D8274E1368A825\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:59:17 GMT", + "x-ms-client-request-id" : "9c68913e-7d84-4ced-9dba-b2930201957c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateac89378062e9a3bfc06?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacdca60126491ba3a7d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a0bf2cce-4efc-4602-b0a5-e63694ae96da" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfc043fd-8dab-4ff9-8819-c682bdef9c73" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425fa98-e01e-0096-67f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "a0bf2cce-4efc-4602-b0a5-e63694ae96da" + "x-ms-request-id" : "492ec999-801e-0052-5c36-59ed6a000000", + "Date" : "Mon, 13 Jul 2020 16:59:17 GMT", + "x-ms-client-request-id" : "dfc043fd-8dab-4ff9-8819-c682bdef9c73" }, "Exception" : null } ], - "variables" : [ "jtccreateac0appendblobapitestcreateac89378062e9a3bfc06", "javablobcreateac1appendblobapitestcreateac893835264abfff" ] + "variables" : [ "jtccreateac0appendblobapitestcreateacdca60126491ba3a7d", "javablobcreateac1appendblobapitestcreateacdca545436122f2" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[6].json new file mode 100644 index 000000000000..51666d0a04fd --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateac[6].json @@ -0,0 +1,130 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc1a188115890d5051?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "60998296-27ce-4033-ac84-b0ed963ea108" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E1501F698", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:18 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "88c0d851-101e-0032-7536-5991f5000000", + "Date" : "Mon, 13 Jul 2020 16:59:18 GMT", + "x-ms-client-request-id" : "60998296-27ce-4033-ac84-b0ed963ea108" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc1a188115890d5051/javablobcreateac1appendblobapitestcreateacc1a5456001d624", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5bf8d73f-7b85-44d7-93db-ee773f33e9ca" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E1537F3DB", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:18 GMT", + "x-ms-version-id" : "2020-07-13T16:59:18.9845979Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4f6eec7e-101e-00a4-3436-599824000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:59:18 GMT", + "x-ms-client-request-id" : "5bf8d73f-7b85-44d7-93db-ee773f33e9ca" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc1a188115890d5051/javablobcreateac1appendblobapitestcreateacc1a5456001d624?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37528085-a8b5-467e-b504-154635fe4305", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "55b33bfd-d01e-0002-1536-592f3a000000", + "Date" : "Mon, 13 Jul 2020 16:59:18 GMT", + "x-ms-client-request-id" : "37528085-a8b5-467e-b504-154635fe4305" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc1a188115890d5051/javablobcreateac1appendblobapitestcreateacc1a5456001d624", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0163e2fa-e734-423a-bb3b-cad94eec033f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E15A56FA3", + "Last-Modified" : "Mon, 13 Jul 2020 16:59:19 GMT", + "x-ms-version-id" : "2020-07-13T16:59:19.7031091Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ef34e377-901e-0095-2d36-597937000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:59:19 GMT", + "x-ms-client-request-id" : "0163e2fa-e734-423a-bb3b-cad94eec033f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa2de504-a186-4c4b-8709-d693a1e8de9c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b36e83ad-701e-00a2-4036-59ab9b000000", + "Body" : "jtccreateacjtccreateac0appendblobapitestcreateacc1a188115890d5051Mon, 13 Jul 2020 16:59:18 GMT\"0x8D8274E1501F698\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:59:19 GMT", + "x-ms-client-request-id" : "aa2de504-a186-4c4b-8709-d693a1e8de9c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0appendblobapitestcreateacc1a188115890d5051?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "638697e6-bb85-4a26-925f-2b970b4cf1ee" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1568b019-b01e-0066-1936-59dea2000000", + "Date" : "Mon, 13 Jul 2020 16:59:19 GMT", + "x-ms-client-request-id" : "638697e6-bb85-4a26-925f-2b970b4cf1ee" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateac0appendblobapitestcreateacc1a188115890d5051", "javablobcreateac1appendblobapitestcreateacc1a5456001d624" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[0].json index d1a60afe21a7..6f80e3caa0b6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[0].json @@ -1,66 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail1840329380a11?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail04935848229dc?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a508ae65-117b-4aa9-9f05-9b329c210ae6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b6cc305-daf6-4e97-a077-eb5369a7b6ba" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADEA9C84C", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "ETag" : "0x8D8274DF99FF42D", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fab7-e01e-0096-80f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "a508ae65-117b-4aa9-9f05-9b329c210ae6" + "x-ms-request-id" : "9cb315d6-901e-0003-1a36-5970e6000000", + "Date" : "Mon, 13 Jul 2020 16:58:31 GMT", + "x-ms-client-request-id" : "8b6cc305-daf6-4e97-a077-eb5369a7b6ba" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail1840329380a11/javablobcreateacfail1appendblobapitestcreateacfail184896908b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail04935848229dc/javablobcreateacfail1appendblobapitestcreateacfail049757164f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2794b25a-356b-48c2-88ac-93d1603214ef" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "afb9818d-ed6a-4148-9b47-887c772395b3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADEB167A7", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:49 GMT", + "ETag" : "0x8D8274DFA39F942", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:33 GMT", + "x-ms-version-id" : "2020-07-13T16:58:33.6993602Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fad8-e01e-0096-18f3-125242000000", + "x-ms-request-id" : "5542cf57-d01e-0084-0c36-59e383000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "2794b25a-356b-48c2-88ac-93d1603214ef" + "Date" : "Mon, 13 Jul 2020 16:58:32 GMT", + "x-ms-client-request-id" : "afb9818d-ed6a-4148-9b47-887c772395b3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail1840329380a11/javablobcreateacfail1appendblobapitestcreateacfail184896908b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail04935848229dc/javablobcreateacfail1appendblobapitestcreateacfail049757164f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "917c188e-c14d-4e18-b343-efba0e164a9f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a098533-05e0-44de-8d21-b409ce422ea6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "7425faec-e01e-0096-27f3-125242000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:7425faec-e01e-0096-27f3-125242000000\nTime:2020-04-15T07:01:49.8766833Z", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "917c188e-c14d-4e18-b343-efba0e164a9f", + "x-ms-request-id" : "88c05cba-101e-0032-4b36-5991f5000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:88c05cba-101e-0032-4b36-5991f5000000\nTime:2020-07-13T16:58:34.1011713Z", + "Date" : "Mon, 13 Jul 2020 16:58:33 GMT", + "x-ms-client-request-id" : "8a098533-05e0-44de-8d21-b409ce422ea6", "Content-Type" : "application/xml" }, "Exception" : null @@ -68,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2b5218fb-01d6-4668-ba24-213d69d01221" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b1e0578-f4f1-444c-a389-39f213b27d30" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425fb07-e01e-0096-3df3-125242000000", - "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail1840329380a11Wed, 15 Apr 2020 07:01:49 GMT\"0x8D7E10ADEA9C84C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "2b5218fb-01d6-4668-ba24-213d69d01221", + "x-ms-request-id" : "f11da3a6-f01e-003a-4736-598bfa000000", + "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail04935848229dcMon, 13 Jul 2020 16:58:32 GMT\"0x8D8274DF99FF42D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:58:34 GMT", + "x-ms-client-request-id" : "4b1e0578-f4f1-444c-a389-39f213b27d30", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail1840329380a11?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail04935848229dc?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cdbbbadc-277e-4563-b25a-6e5b589d6ffc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c35c6761-13df-403e-925f-a50bc006a877" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425fb17-e01e-0096-48f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "cdbbbadc-277e-4563-b25a-6e5b589d6ffc" + "x-ms-request-id" : "301e7e84-301e-0057-4736-593fb1000000", + "Date" : "Mon, 13 Jul 2020 16:58:34 GMT", + "x-ms-client-request-id" : "c35c6761-13df-403e-925f-a50bc006a877" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail1840329380a11", "javablobcreateacfail1appendblobapitestcreateacfail184896908b" ] + "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail04935848229dc", "javablobcreateacfail1appendblobapitestcreateacfail049757164f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[1].json index 19260f440f60..f9e8741fc0e9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[1].json @@ -1,66 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail42880630a0be9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail59773454f04db?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2d766a85-baca-4ddf-8a3d-1316dd9f6d0a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4df87f91-c337-4b92-8efd-5e7379a2fdb0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADECF5AFE", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFB34223E", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fb41-e01e-0096-6af3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "2d766a85-baca-4ddf-8a3d-1316dd9f6d0a" + "x-ms-request-id" : "b36e26e7-701e-00a2-5136-59ab9b000000", + "Date" : "Mon, 13 Jul 2020 16:58:35 GMT", + "x-ms-client-request-id" : "4df87f91-c337-4b92-8efd-5e7379a2fdb0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail42880630a0be9/javablobcreateacfail1appendblobapitestcreateacfail4283605936", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail59773454f04db/javablobcreateacfail1appendblobapitestcreateacfail59790875ec", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3b697217-a525-4a70-91ab-a344780f1923" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "059b93a5-3054-406b-8d9f-60034630414f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADED7BD7E", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFB7CC602", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:35 GMT", + "x-ms-version-id" : "2020-07-13T16:58:35.8148610Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fb66-e01e-0096-09f3-125242000000", + "x-ms-request-id" : "6056f701-b01e-0004-0c36-591c85000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "3b697217-a525-4a70-91ab-a344780f1923" + "Date" : "Mon, 13 Jul 2020 16:58:35 GMT", + "x-ms-client-request-id" : "059b93a5-3054-406b-8d9f-60034630414f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail42880630a0be9/javablobcreateacfail1appendblobapitestcreateacfail4283605936", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail59773454f04db/javablobcreateacfail1appendblobapitestcreateacfail59790875ec", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "785440d7-b908-4f90-be98-7f54ff180ee2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2935e8c0-5344-4006-ad23-18220cb3ade2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "7425fb85-e01e-0096-23f3-125242000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:7425fb85-e01e-0096-23f3-125242000000\nTime:2020-04-15T07:01:50.1279270Z", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "785440d7-b908-4f90-be98-7f54ff180ee2", + "x-ms-request-id" : "e1ecf029-601e-004a-3c36-59320d000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:e1ecf029-601e-004a-3c36-59320d000000\nTime:2020-07-13T16:58:36.2881017Z", + "Date" : "Mon, 13 Jul 2020 16:58:35 GMT", + "x-ms-client-request-id" : "2935e8c0-5344-4006-ad23-18220cb3ade2", "Content-Type" : "application/xml" }, "Exception" : null @@ -68,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e603b79b-2d45-4175-bfb5-db8b5a898907" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "03e01df4-2c34-4a3d-a23b-b450e4083538" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425fb9b-e01e-0096-37f3-125242000000", - "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail42880630a0be9Wed, 15 Apr 2020 07:01:50 GMT\"0x8D7E10ADECF5AFE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "e603b79b-2d45-4175-bfb5-db8b5a898907", + "x-ms-request-id" : "c1834805-a01e-008e-7036-594734000000", + "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail59773454f04dbMon, 13 Jul 2020 16:58:35 GMT\"0x8D8274DFB34223E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:58:35 GMT", + "x-ms-client-request-id" : "03e01df4-2c34-4a3d-a23b-b450e4083538", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail42880630a0be9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail59773454f04db?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "48977582-a1ff-4c3c-aad6-71a289f5548d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc252dec-64d6-448b-80ef-a35ef492032e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425fbb5-e01e-0096-4cf3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "48977582-a1ff-4c3c-aad6-71a289f5548d" + "x-ms-request-id" : "640b6d81-301e-0047-7a36-59fad9000000", + "Date" : "Mon, 13 Jul 2020 16:58:36 GMT", + "x-ms-client-request-id" : "dc252dec-64d6-448b-80ef-a35ef492032e" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail42880630a0be9", "javablobcreateacfail1appendblobapitestcreateacfail4283605936" ] + "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail59773454f04db", "javablobcreateacfail1appendblobapitestcreateacfail59790875ec" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[2].json index 2de8f54ed402..3631cb3319c6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[2].json @@ -1,66 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail09d961659015d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailf3e37132464d8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7eb0fdda-7883-442d-98ee-fbed68d17610" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9cb9d5ee-8941-4f7b-9b60-63e896cae176" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADEF3B4F0", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFC76B6D4", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fbd0-e01e-0096-64f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "7eb0fdda-7883-442d-98ee-fbed68d17610" + "x-ms-request-id" : "bfda332d-a01e-0027-5536-598646000000", + "Date" : "Mon, 13 Jul 2020 16:58:36 GMT", + "x-ms-client-request-id" : "9cb9d5ee-8941-4f7b-9b60-63e896cae176" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail09d961659015d/javablobcreateacfail1appendblobapitestcreateacfail09d3894082", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailf3e37132464d8/javablobcreateacfail1appendblobapitestcreateacfailf3e294047c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c463cbec-abc7-4ccd-86f6-a57f97c63c25" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "57fdce42-c1db-439d-8ee0-875ba0df8e46" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADEFBEFF8", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFCB57F00", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:37 GMT", + "x-ms-version-id" : "2020-07-13T16:58:37.8643200Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fbef-e01e-0096-7df3-125242000000", + "x-ms-request-id" : "7689e674-601e-0081-4e36-593158000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "c463cbec-abc7-4ccd-86f6-a57f97c63c25" + "Date" : "Mon, 13 Jul 2020 16:58:37 GMT", + "x-ms-client-request-id" : "57fdce42-c1db-439d-8ee0-875ba0df8e46" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail09d961659015d/javablobcreateacfail1appendblobapitestcreateacfail09d3894082", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailf3e37132464d8/javablobcreateacfail1appendblobapitestcreateacfailf3e294047c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c5053c59-4023-4bb0-ac1d-a64ab9d2a189" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb2d9983-7771-4c20-87ad-8ad10c9600a4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "7425fbfb-e01e-0096-07f3-125242000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:7425fbfb-e01e-0096-07f3-125242000000\nTime:2020-04-15T07:01:50.3601524Z", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "c5053c59-4023-4bb0-ac1d-a64ab9d2a189", + "x-ms-request-id" : "024f8272-901e-0061-0736-59b2c1000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:024f8272-901e-0061-0736-59b2c1000000\nTime:2020-07-13T16:58:38.1952031Z", + "Date" : "Mon, 13 Jul 2020 16:58:38 GMT", + "x-ms-client-request-id" : "eb2d9983-7771-4c20-87ad-8ad10c9600a4", "Content-Type" : "application/xml" }, "Exception" : null @@ -68,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b773a9f5-a9ea-48b4-84b2-50d264ba08be" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c420908-c120-49e7-81d7-8086a40a876d" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425fc15-e01e-0096-1ff3-125242000000", - "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail09d961659015dWed, 15 Apr 2020 07:01:50 GMT\"0x8D7E10ADEF3B4F0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:49 GMT", - "x-ms-client-request-id" : "b773a9f5-a9ea-48b4-84b2-50d264ba08be", + "x-ms-request-id" : "0d57ee87-501e-007e-1e36-5901c5000000", + "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfailf3e37132464d8Mon, 13 Jul 2020 16:58:37 GMT\"0x8D8274DFC76B6D4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:58:38 GMT", + "x-ms-client-request-id" : "2c420908-c120-49e7-81d7-8086a40a876d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail09d961659015d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailf3e37132464d8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "612d34bc-9231-4331-bdb9-3be75c9dde7a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3892a4dc-6a17-4e25-81e1-b0c11b4966a7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425fc4b-e01e-0096-48f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "612d34bc-9231-4331-bdb9-3be75c9dde7a" + "x-ms-request-id" : "222f621c-101e-009b-1c36-595087000000", + "Date" : "Mon, 13 Jul 2020 16:58:38 GMT", + "x-ms-client-request-id" : "3892a4dc-6a17-4e25-81e1-b0c11b4966a7" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail09d961659015d", "javablobcreateacfail1appendblobapitestcreateacfail09d3894082" ] + "variables" : [ "jtccreateacfail0appendblobapitestcreateacfailf3e37132464d8", "javablobcreateacfail1appendblobapitestcreateacfailf3e294047c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[3].json index 99b10659ec66..35d715bbfcf2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[3].json @@ -1,96 +1,98 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailb0b60109714e9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail5e3319116db46?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a1ed0c7e-dd0b-49cc-9196-294a67b6b0b7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f598e4fc-1602-4c08-8a88-02f56459ffc0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADF261C17", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFD8FA8A0", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fc64-e01e-0096-5af3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "a1ed0c7e-dd0b-49cc-9196-294a67b6b0b7" + "x-ms-request-id" : "47e0bfa7-601e-0017-5836-593889000000", + "Date" : "Mon, 13 Jul 2020 16:58:38 GMT", + "x-ms-client-request-id" : "f598e4fc-1602-4c08-8a88-02f56459ffc0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailb0b60109714e9/javablobcreateacfail1appendblobapitestcreateacfailb0b6985182", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail5e3319116db46/javablobcreateacfail1appendblobapitestcreateacfail5e39915031", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1d003913-34db-4c69-8845-7456059ef8c9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a1f1fcc-fc46-4bbc-9560-a4cccb4762fd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADF2D9323", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFDC2B347", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:39 GMT", + "x-ms-version-id" : "2020-07-13T16:58:39.6285767Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fc74-e01e-0096-67f3-125242000000", + "x-ms-request-id" : "4bc1fdbc-b01e-0049-7c36-59d369000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "1d003913-34db-4c69-8845-7456059ef8c9" + "Date" : "Mon, 13 Jul 2020 16:58:38 GMT", + "x-ms-client-request-id" : "1a1f1fcc-fc46-4bbc-9560-a4cccb4762fd" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailb0b60109714e9/javablobcreateacfail1appendblobapitestcreateacfailb0b6985182", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail5e3319116db46/javablobcreateacfail1appendblobapitestcreateacfail5e39915031", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "07bb99de-1a89-43fe-bb26-12baf48bd170" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13f18322-6c45-4ea0-a9db-2175dfc81d0e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-committed-block-count" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "x-ms-version-id" : "2020-07-13T16:58:39.6285767Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", + "Date" : "Mon, 13 Jul 2020 16:58:39 GMT", "x-ms-blob-type" : "AppendBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10ADF2D9323", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFDC2B347", + "x-ms-creation-time" : "Mon, 13 Jul 2020 16:58:39 GMT", "Content-Length" : "0", - "x-ms-request-id" : "7425fc88-e01e-0096-79f3-125242000000", - "x-ms-client-request-id" : "07bb99de-1a89-43fe-bb26-12baf48bd170", + "x-ms-request-id" : "cf6bf398-001e-0001-1c36-59ce5e000000", + "x-ms-client-request-id" : "13f18322-6c45-4ea0-a9db-2175dfc81d0e", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailb0b60109714e9/javablobcreateacfail1appendblobapitestcreateacfailb0b6985182", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail5e3319116db46/javablobcreateacfail1appendblobapitestcreateacfail5e39915031", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2b8ae8c3-051d-4972-b30e-6357ee582dc5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "704e19ca-b563-40ad-bfab-12f183eb34b0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "7425fc9e-e01e-0096-08f3-125242000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:7425fc9e-e01e-0096-08f3-125242000000\nTime:2020-04-15T07:01:50.7345173Z", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "2b8ae8c3-051d-4972-b30e-6357ee582dc5", + "x-ms-request-id" : "564abce7-501e-006e-4236-59c4ad000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:564abce7-501e-006e-4236-59c4ad000000\nTime:2020-07-13T16:58:40.3445636Z", + "Date" : "Mon, 13 Jul 2020 16:58:39 GMT", + "x-ms-client-request-id" : "704e19ca-b563-40ad-bfab-12f183eb34b0", "Content-Type" : "application/xml" }, "Exception" : null @@ -98,43 +100,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "64f22ee8-e710-441e-9013-35ecf72b4fc8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a4a517c-5877-41ea-b06b-0f24ac3657d7" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425fcb9-e01e-0096-1bf3-125242000000", - "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfailb0b60109714e9Wed, 15 Apr 2020 07:01:50 GMT\"0x8D7E10ADF261C17\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "64f22ee8-e710-441e-9013-35ecf72b4fc8", + "x-ms-request-id" : "af21c5ff-b01e-0076-4c36-591bca000000", + "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail5e3319116db46Mon, 13 Jul 2020 16:58:39 GMT\"0x8D8274DFD8FA8A0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:58:40 GMT", + "x-ms-client-request-id" : "7a4a517c-5877-41ea-b06b-0f24ac3657d7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfailb0b60109714e9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail5e3319116db46?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fbd6bbfd-e75b-4ac1-b347-8a247599c56f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c254e631-b66d-4921-879e-661f5ee78c50" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425fcd1-e01e-0096-2ff3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "fbd6bbfd-e75b-4ac1-b347-8a247599c56f" + "x-ms-request-id" : "476e60bd-201e-0080-7f36-596e84000000", + "Date" : "Mon, 13 Jul 2020 16:58:40 GMT", + "x-ms-client-request-id" : "c254e631-b66d-4921-879e-661f5ee78c50" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0appendblobapitestcreateacfailb0b60109714e9", "javablobcreateacfail1appendblobapitestcreateacfailb0b6985182" ] + "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail5e3319116db46", "javablobcreateacfail1appendblobapitestcreateacfail5e39915031" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[4].json index f05ae08fd378..d7b6f8936b76 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[4].json @@ -1,88 +1,89 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail29e59926ee71d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail0f772512cbb9f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "398146ec-7520-48f5-aeb0-1c9084afcadf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "057b147e-a217-4dde-9c82-6492e2eed29b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADF559C4F", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFED3B59E", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fce8-e01e-0096-41f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "398146ec-7520-48f5-aeb0-1c9084afcadf" + "x-ms-request-id" : "0cc62a18-001e-00a8-0936-590f2c000000", + "Date" : "Mon, 13 Jul 2020 16:58:40 GMT", + "x-ms-client-request-id" : "057b147e-a217-4dde-9c82-6492e2eed29b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail29e59926ee71d/javablobcreateacfail1appendblobapitestcreateacfail29e93637e8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail0f772512cbb9f/javablobcreateacfail1appendblobapitestcreateacfail0f728104d8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "635f2323-d5ea-4389-9f68-9bdf9dc96eda" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "397d06c3-1d72-431e-aaa8-8ab4b549f3dd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADF5CEBD4", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFF095185", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:41 GMT", + "x-ms-version-id" : "2020-07-13T16:58:41.7691013Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fcf4-e01e-0096-4cf3-125242000000", + "x-ms-request-id" : "e53fa8db-d01e-002d-4636-5922f1000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "635f2323-d5ea-4389-9f68-9bdf9dc96eda" + "Date" : "Mon, 13 Jul 2020 16:58:41 GMT", + "x-ms-client-request-id" : "397d06c3-1d72-431e-aaa8-8ab4b549f3dd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail29e59926ee71d/javablobcreateacfail1appendblobapitestcreateacfail29e93637e8?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail0f772512cbb9f/javablobcreateacfail1appendblobapitestcreateacfail0f728104d8?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bc54927a-224e-4d24-9789-3f6491c4ec4c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bbd982ce-3639-47bf-ac5a-83ae029c33ab" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ADF5CEBD4", - "x-ms-lease-id" : "200aaeeb-07eb-4168-9a45-fb90522cc6ff", - "Last-Modified" : "Wed, 15 Apr 2020 07:01:50 GMT", + "ETag" : "0x8D8274DFF095185", + "x-ms-lease-id" : "4ba0acc1-88b3-4ced-827d-d96309c9c7f7", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "7425fd14-e01e-0096-68f3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "bc54927a-224e-4d24-9789-3f6491c4ec4c" + "x-ms-request-id" : "0b7ba3a9-401e-0086-4636-595d3b000000", + "Date" : "Mon, 13 Jul 2020 16:58:41 GMT", + "x-ms-client-request-id" : "bbd982ce-3639-47bf-ac5a-83ae029c33ab" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail29e59926ee71d/javablobcreateacfail1appendblobapitestcreateacfail29e93637e8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail0f772512cbb9f/javablobcreateacfail1appendblobapitestcreateacfail0f728104d8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "20e48566-3c29-4135-88ec-e510a702c1c6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "763ceb58-907f-4110-8ffe-04c673309a45" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "7425fd49-e01e-0096-13f3-125242000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:7425fd49-e01e-0096-13f3-125242000000\nTime:2020-04-15T07:01:51.1068770Z", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "20e48566-3c29-4135-88ec-e510a702c1c6", + "x-ms-request-id" : "492e8a15-801e-0052-5e36-59ed6a000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:492e8a15-801e-0052-5e36-59ed6a000000\nTime:2020-07-13T16:58:42.4616762Z", + "Date" : "Mon, 13 Jul 2020 16:58:41 GMT", + "x-ms-client-request-id" : "763ceb58-907f-4110-8ffe-04c673309a45", "Content-Type" : "application/xml" }, "Exception" : null @@ -90,43 +91,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4a9a3649-c257-41a5-b55a-9a7c85e08774" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "88fe17d6-1ffc-4bf4-ab91-f9b7cf1b00d0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "7425fd62-e01e-0096-27f3-125242000000", - "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail29e59926ee71dWed, 15 Apr 2020 07:01:50 GMT\"0x8D7E10ADF559C4F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "4a9a3649-c257-41a5-b55a-9a7c85e08774", + "x-ms-request-id" : "ebd45beb-f01e-0048-2436-598cb5000000", + "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail0f772512cbb9fMon, 13 Jul 2020 16:58:41 GMT\"0x8D8274DFED3B59E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:58:42 GMT", + "x-ms-client-request-id" : "88fe17d6-1ffc-4bf4-ab91-f9b7cf1b00d0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail29e59926ee71d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail0f772512cbb9f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cb515f14-9ba2-478d-afd7-3808b7a36445" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b55f8a8-7d4b-4a09-86e7-5aa893584f9d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7425fd81-e01e-0096-3ef3-125242000000", - "Date" : "Wed, 15 Apr 2020 07:01:50 GMT", - "x-ms-client-request-id" : "cb515f14-9ba2-478d-afd7-3808b7a36445" + "x-ms-request-id" : "77e06084-201e-0064-3236-59601a000000", + "Date" : "Mon, 13 Jul 2020 16:58:42 GMT", + "x-ms-client-request-id" : "3b55f8a8-7d4b-4a09-86e7-5aa893584f9d" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail29e59926ee71d", "javablobcreateacfail1appendblobapitestcreateacfail29e93637e8" ] + "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail0f772512cbb9f", "javablobcreateacfail1appendblobapitestcreateacfail0f728104d8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[5].json new file mode 100644 index 000000000000..75247bc53a37 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestcreateacfail[5].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail1ba28496ac1e6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1c5a6a6-4285-44f6-9ec3-5fae5366b5da" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E00129B5E", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3243da50-401e-0010-4636-5954ea000000", + "Date" : "Mon, 13 Jul 2020 16:58:43 GMT", + "x-ms-client-request-id" : "b1c5a6a6-4285-44f6-9ec3-5fae5366b5da" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail1ba28496ac1e6/javablobcreateacfail1appendblobapitestcreateacfail1ba182189c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ae1ab5b-dfa7-4970-9039-caa143da5faa" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274E00442DD0", + "Last-Modified" : "Mon, 13 Jul 2020 16:58:43 GMT", + "x-ms-version-id" : "2020-07-13T16:58:43.8325712Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "63b18be0-601e-0091-6c36-59f430000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:58:43 GMT", + "x-ms-client-request-id" : "7ae1ab5b-dfa7-4970-9039-caa143da5faa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail1ba28496ac1e6/javablobcreateacfail1appendblobapitestcreateacfail1ba182189c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed48887e-7cfb-4083-97e6-3665fac53dfa" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "08aa4e9f-901e-005e-5536-597a62000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:08aa4e9f-901e-005e-5536-597a62000000\nTime:2020-07-13T16:58:44.1760365Z", + "Date" : "Mon, 13 Jul 2020 16:58:43 GMT", + "x-ms-client-request-id" : "ed48887e-7cfb-4083-97e6-3665fac53dfa", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0e10093e-fd51-4e04-be35-3c726a03e510" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "9cb31e5d-901e-0003-5836-5970e6000000", + "Body" : "jtccreateacfailjtccreateacfail0appendblobapitestcreateacfail1ba28496ac1e6Mon, 13 Jul 2020 16:58:43 GMT\"0x8D8274E00129B5E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:58:43 GMT", + "x-ms-client-request-id" : "0e10093e-fd51-4e04-be35-3c726a03e510", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0appendblobapitestcreateacfail1ba28496ac1e6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ac91bf2-56b6-41eb-9a2d-773ddbcd23bd" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "5542eab0-d01e-0084-7a36-59e383000000", + "Date" : "Mon, 13 Jul 2020 16:58:44 GMT", + "x-ms-client-request-id" : "5ac91bf2-56b6-41eb-9a2d-773ddbcd23bd" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateacfail0appendblobapitestcreateacfail1ba28496ac1e6", "javablobcreateacfail1appendblobapitestcreateacfail1ba182189c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[0].json new file mode 100644 index 000000000000..7e44a59c1cf9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[0].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacd47962171ea779e37ba?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6d09006-77d3-43b5-a3a1-4713d4cb8bdb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32505B178", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3efee8ac-501e-008a-5bbc-5eca33000000", + "Date" : "Mon, 20 Jul 2020 17:34:24 GMT", + "x-ms-client-request-id" : "a6d09006-77d3-43b5-a3a1-4713d4cb8bdb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacd47962171ea779e37ba/javablobsealac1appendblobapitestsealacd47541301cc4bcbd", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66ee01d5-7be6-47b3-9cf0-d798529abf60" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32573E1FE", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:25 GMT", + "x-ms-version-id" : "2020-07-20T17:34:25.0998270Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "73ffeb16-701e-0024-02bc-5e6722000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:24 GMT", + "x-ms-client-request-id" : "66ee01d5-7be6-47b3-9cf0-d798529abf60" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacd47962171ea779e37ba/javablobsealac1appendblobapitestsealacd47541301cc4bcbd?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8727973-17c5-4603-a038-77fe4304b19d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD325C21037", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8e1b6cef-c01e-000e-6bbc-5eb832000000", + "Date" : "Mon, 20 Jul 2020 17:34:25 GMT", + "x-ms-client-request-id" : "f8727973-17c5-4603-a038-77fe4304b19d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "815def97-dffd-4bba-9993-dcb1f1c4e01a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "592bffcb-f01e-0048-5ebc-5e8cb5000000", + "Body" : "jtcsealacjtcsealac0appendblobapitestsealacd47962171ea779e37baMon, 20 Jul 2020 17:34:24 GMT\"0x8D82CD32505B178\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:25 GMT", + "x-ms-client-request-id" : "815def97-dffd-4bba-9993-dcb1f1c4e01a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacd47962171ea779e37ba?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "62cade0b-bcab-44d9-8cf1-4d4e00e13806" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a0eebeda-a01e-0045-0dbc-5e4461000000", + "Date" : "Mon, 20 Jul 2020 17:34:25 GMT", + "x-ms-client-request-id" : "62cade0b-bcab-44d9-8cf1-4d4e00e13806" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealac0appendblobapitestsealacd47962171ea779e37ba", "javablobsealac1appendblobapitestsealacd47541301cc4bcbd" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[1].json new file mode 100644 index 000000000000..3c3c0ef6f29d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[1].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacea27107351aa0b76081?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "41b09075-b3ee-4527-ae68-e25434360b20" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD326872009", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "33e6ef9e-f01e-0093-67bc-5e4a88000000", + "Date" : "Mon, 20 Jul 2020 17:34:25 GMT", + "x-ms-client-request-id" : "41b09075-b3ee-4527-ae68-e25434360b20" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacea27107351aa0b76081/javablobsealac1appendblobapitestsealacea285832aadd1c36", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "05b2d943-c002-4543-8923-bd27c621a7eb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD326C4BAF6", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:27 GMT", + "x-ms-version-id" : "2020-07-20T17:34:27.3073910Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a05f24f0-d01e-002d-23bc-5e22f1000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:26 GMT", + "x-ms-client-request-id" : "05b2d943-c002-4543-8923-bd27c621a7eb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacea27107351aa0b76081/javablobsealac1appendblobapitestsealacea285832aadd1c36?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dba56ad8-41a7-4865-9559-041f0f8bd1b6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD326FCEC29", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "04808db8-e01e-007b-67bc-5ed31e000000", + "Date" : "Mon, 20 Jul 2020 17:34:26 GMT", + "x-ms-client-request-id" : "dba56ad8-41a7-4865-9559-041f0f8bd1b6" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ffa0a87-60a2-4e09-960f-b664bb42b495" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "74327352-701e-0079-7bbc-5e6da6000000", + "Body" : "jtcsealacjtcsealac0appendblobapitestsealacea27107351aa0b76081Mon, 20 Jul 2020 17:34:26 GMT\"0x8D82CD326872009\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:27 GMT", + "x-ms-client-request-id" : "6ffa0a87-60a2-4e09-960f-b664bb42b495", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacea27107351aa0b76081?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32cb6916-7f6b-4158-ba0e-5fe220848043" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d87e0081-401e-0062-6ebc-5e53a5000000", + "Date" : "Mon, 20 Jul 2020 17:34:27 GMT", + "x-ms-client-request-id" : "32cb6916-7f6b-4158-ba0e-5fe220848043" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealac0appendblobapitestsealacea27107351aa0b76081", "javablobsealac1appendblobapitestsealacea285832aadd1c36" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[2].json new file mode 100644 index 000000000000..993761ebf1e9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[2].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac34484513f45f7079052?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9251216c-af88-4bea-b94c-35a7f9fee0e3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD327A3BDDA", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "cdd03126-001e-004c-25bc-5e01b2000000", + "Date" : "Mon, 20 Jul 2020 17:34:28 GMT", + "x-ms-client-request-id" : "9251216c-af88-4bea-b94c-35a7f9fee0e3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac34484513f45f7079052/javablobsealac1appendblobapitestsealac34404263c73d1ed3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1660ef06-2d11-4262-aa76-6ee9620922a9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD327DAA33D", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:29 GMT", + "x-ms-version-id" : "2020-07-20T17:34:29.1286845Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "38619105-001e-0073-58bc-5ec911000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:29 GMT", + "x-ms-client-request-id" : "1660ef06-2d11-4262-aa76-6ee9620922a9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac34484513f45f7079052/javablobsealac1appendblobapitestsealac34404263c73d1ed3?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9809f2b6-a7c5-4dea-87f9-f6e887ec3128" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32810FF5D", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4c01f9ac-801e-0099-02bc-5eee3f000000", + "Date" : "Mon, 20 Jul 2020 17:34:28 GMT", + "x-ms-client-request-id" : "9809f2b6-a7c5-4dea-87f9-f6e887ec3128" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9177668c-31b9-4ea7-b757-127f27d17a0d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8713e465-101e-006f-64bc-5e9b71000000", + "Body" : "jtcsealacjtcsealac0appendblobapitestsealac34484513f45f7079052Mon, 20 Jul 2020 17:34:28 GMT\"0x8D82CD327A3BDDA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:29 GMT", + "x-ms-client-request-id" : "9177668c-31b9-4ea7-b757-127f27d17a0d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac34484513f45f7079052?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f10a530-392b-4536-b435-44ffed74ca8b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a7346eb9-101e-001d-08bc-5e9c3e000000", + "Date" : "Mon, 20 Jul 2020 17:34:29 GMT", + "x-ms-client-request-id" : "6f10a530-392b-4536-b435-44ffed74ca8b" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealac0appendblobapitestsealac34484513f45f7079052", "javablobsealac1appendblobapitestsealac34404263c73d1ed3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[3].json new file mode 100644 index 000000000000..8720b18787a8 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[3].json @@ -0,0 +1,141 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac1f704216f6130eca03f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9533537c-d34d-4362-b397-22cc0883fc6e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD328B72850", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "480a2b97-b01e-0092-29bc-5e1554000000", + "Date" : "Mon, 20 Jul 2020 17:34:30 GMT", + "x-ms-client-request-id" : "9533537c-d34d-4362-b397-22cc0883fc6e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac1f704216f6130eca03f/javablobsealac1appendblobapitestsealac1f759101eaa2ff67", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "248734d2-8fa7-491d-be40-d6a0f905c340" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD328EE40F3", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:30 GMT", + "x-ms-version-id" : "2020-07-20T17:34:30.9349619Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a59ebdcd-301e-0068-7cbc-5ef712000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:30 GMT", + "x-ms-client-request-id" : "248734d2-8fa7-491d-be40-d6a0f905c340" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac1f704216f6130eca03f/javablobsealac1appendblobapitestsealac1f759101eaa2ff67", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cf48e284-b1c3-4f34-9fab-48ab2bf37c8b" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "x-ms-version-id" : "2020-07-20T17:34:30.9349619Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:30 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 20 Jul 2020 17:34:31 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD328EE40F3", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:34:30 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "75602846-b01e-0066-2bbc-5edea2000000", + "x-ms-client-request-id" : "cf48e284-b1c3-4f34-9fab-48ab2bf37c8b", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac1f704216f6130eca03f/javablobsealac1appendblobapitestsealac1f759101eaa2ff67?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "54ef178a-69ab-436c-9d5a-1aa930a979a2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD3295FB50F", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "cfb8735d-101e-0050-37bc-5e53d2000000", + "Date" : "Mon, 20 Jul 2020 17:34:30 GMT", + "x-ms-client-request-id" : "54ef178a-69ab-436c-9d5a-1aa930a979a2" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15984607-fff9-46c6-bfe0-7364fa02d0ab" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8418e732-f01e-003a-71bc-5e8bfa000000", + "Body" : "jtcsealacjtcsealac0appendblobapitestsealac1f704216f6130eca03fMon, 20 Jul 2020 17:34:30 GMT\"0x8D82CD328B72850\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:31 GMT", + "x-ms-client-request-id" : "15984607-fff9-46c6-bfe0-7364fa02d0ab", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac1f704216f6130eca03f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0329876f-2a42-48b5-929e-18188b0a62e7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "b5546081-501e-00a5-42bc-5ec7f8000000", + "Date" : "Mon, 20 Jul 2020 17:34:31 GMT", + "x-ms-client-request-id" : "0329876f-2a42-48b5-929e-18188b0a62e7" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealac0appendblobapitestsealac1f704216f6130eca03f", "javablobsealac1appendblobapitestsealac1f759101eaa2ff67" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[4].json new file mode 100644 index 000000000000..c3b96420dd4f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[4].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacb2955450a0335450caa?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4cb755bb-4a28-4de6-b1d6-935b1dc5e796" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32A04D6A9", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7b344cce-901e-0085-5ebc-5ebc5f000000", + "Date" : "Mon, 20 Jul 2020 17:34:32 GMT", + "x-ms-client-request-id" : "4cb755bb-4a28-4de6-b1d6-935b1dc5e796" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacb2955450a0335450caa/javablobsealac1appendblobapitestsealacb29532334196d005", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec8d126d-bc82-4666-ba52-21f932a26310" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32A3A856A", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:33 GMT", + "x-ms-version-id" : "2020-07-20T17:34:33.1135111Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3eae8ed4-b01e-0082-25bc-5ed03c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:33 GMT", + "x-ms-client-request-id" : "ec8d126d-bc82-4666-ba52-21f932a26310" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacb2955450a0335450caa/javablobsealac1appendblobapitestsealacb29532334196d005?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b04eee92-33fb-48b8-bdd5-74459d8f176e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32A706C4F", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c699cfc3-f01e-0058-03bc-5e49dd000000", + "Date" : "Mon, 20 Jul 2020 17:34:32 GMT", + "x-ms-client-request-id" : "b04eee92-33fb-48b8-bdd5-74459d8f176e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d998bab-1792-4d5b-8a4a-a0c1b0cfd961" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "243ee6f8-201e-0090-3bbc-5eabec000000", + "Body" : "jtcsealacjtcsealac0appendblobapitestsealacb2955450a0335450caaMon, 20 Jul 2020 17:34:32 GMT\"0x8D82CD32A04D6A9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:33 GMT", + "x-ms-client-request-id" : "2d998bab-1792-4d5b-8a4a-a0c1b0cfd961", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealacb2955450a0335450caa?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "88ba6199-6040-4107-b4b3-355ebce61c6a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "fa7a7a06-a01e-007a-1bbc-5e8cc2000000", + "Date" : "Mon, 20 Jul 2020 17:34:33 GMT", + "x-ms-client-request-id" : "88ba6199-6040-4107-b4b3-355ebce61c6a" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealac0appendblobapitestsealacb2955450a0335450caa", "javablobsealac1appendblobapitestsealacb29532334196d005" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[5].json new file mode 100644 index 000000000000..0e5fc14a6d1a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[5].json @@ -0,0 +1,132 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac36016519ba6c059ed4c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e0781cf-5421-4fb6-a102-3e7ac39d4d73" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32B10659C", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2c11ed34-201e-0064-1bbc-5e601a000000", + "Date" : "Mon, 20 Jul 2020 17:34:34 GMT", + "x-ms-client-request-id" : "7e0781cf-5421-4fb6-a102-3e7ac39d4d73" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac36016519ba6c059ed4c/javablobsealac1appendblobapitestsealac360283432cb1e3e3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "419ffca4-6af2-4482-b29c-4349e7e70fbe" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32B42FD90", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:34 GMT", + "x-ms-version-id" : "2020-07-20T17:34:34.8457360Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6d061b1b-901e-004e-0ebc-5ebf0a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:33 GMT", + "x-ms-client-request-id" : "419ffca4-6af2-4482-b29c-4349e7e70fbe" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac36016519ba6c059ed4c/javablobsealac1appendblobapitestsealac360283432cb1e3e3?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "28f4827a-571d-4f96-8652-7cbc7c3d6372" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32B42FD90", + "x-ms-lease-id" : "13dd5d2f-2aa4-49b2-b194-7f1ad9c8cfeb", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1ee271fa-c01e-00a7-04bc-5e7940000000", + "Date" : "Mon, 20 Jul 2020 17:34:34 GMT", + "x-ms-client-request-id" : "28f4827a-571d-4f96-8652-7cbc7c3d6372" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac36016519ba6c059ed4c/javablobsealac1appendblobapitestsealac360283432cb1e3e3?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "44b4a253-385f-4868-bb1f-d4176f51cc4b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32BB77F71", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fe205ec3-401e-0072-6ebc-5e96cd000000", + "Date" : "Mon, 20 Jul 2020 17:34:35 GMT", + "x-ms-client-request-id" : "44b4a253-385f-4868-bb1f-d4176f51cc4b" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ef19b03-a1f0-41c8-9e06-3ea4135b7e77" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "51794dda-801e-0020-41bc-5eea25000000", + "Body" : "jtcsealacjtcsealac0appendblobapitestsealac36016519ba6c059ed4cMon, 20 Jul 2020 17:34:34 GMT\"0x8D82CD32B10659C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:35 GMT", + "x-ms-client-request-id" : "1ef19b03-a1f0-41c8-9e06-3ea4135b7e77", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac36016519ba6c059ed4c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a95430d-820c-4ee4-89bf-50f5fcb53098" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "0732cf6d-401e-0096-20bc-5e9853000000", + "Date" : "Mon, 20 Jul 2020 17:34:35 GMT", + "x-ms-client-request-id" : "7a95430d-820c-4ee4-89bf-50f5fcb53098" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealac0appendblobapitestsealac36016519ba6c059ed4c", "javablobsealac1appendblobapitestsealac360283432cb1e3e3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[6].json new file mode 100644 index 000000000000..a89f5400aeea --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealac[6].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac07541491487db620309?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5eae846e-d1b1-4eec-a13f-46dcd29b0964" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32C603A25", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c482bf07-201e-0080-10bc-5e6e84000000", + "Date" : "Mon, 20 Jul 2020 17:34:35 GMT", + "x-ms-client-request-id" : "5eae846e-d1b1-4eec-a13f-46dcd29b0964" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac07541491487db620309/javablobsealac1appendblobapitestsealac07535965f441b145", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "86b4d1a3-05fe-4608-921a-207c386c1dc2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32C9116F5", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:37 GMT", + "x-ms-version-id" : "2020-07-20T17:34:37.0352885Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "48b0c30d-f01e-0005-79bc-5e4359000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:36 GMT", + "x-ms-client-request-id" : "86b4d1a3-05fe-4608-921a-207c386c1dc2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac07541491487db620309/javablobsealac1appendblobapitestsealac07535965f441b145?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "18613bc8-f340-4a16-83e5-b5aa02cc353e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD32CC26911", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4778d5b9-b01e-002b-1bbc-5e114e000000", + "Date" : "Mon, 20 Jul 2020 17:34:36 GMT", + "x-ms-client-request-id" : "18613bc8-f340-4a16-83e5-b5aa02cc353e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0857506-8a48-40a9-a05d-20ff42de6d7a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f94df220-f01e-0015-60bc-5e8631000000", + "Body" : "jtcsealacjtcsealac0appendblobapitestsealac07541491487db620309Mon, 20 Jul 2020 17:34:36 GMT\"0x8D82CD32C603A25\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:36 GMT", + "x-ms-client-request-id" : "b0857506-8a48-40a9-a05d-20ff42de6d7a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealac0appendblobapitestsealac07541491487db620309?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "296b085b-cbd1-44c2-b94d-bcb9f24a49ec" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "549dee28-e01e-009f-6bbc-5edd80000000", + "Date" : "Mon, 20 Jul 2020 17:34:37 GMT", + "x-ms-client-request-id" : "296b085b-cbd1-44c2-b94d-bcb9f24a49ec" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealac0appendblobapitestsealac07541491487db620309", "javablobsealac1appendblobapitestsealac07535965f441b145" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[0].json new file mode 100644 index 000000000000..ff8e5c5cd711 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[0].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailbf122590f133b46?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "68ecec9a-d872-420a-8c92-ffa8315263b3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD333F9B5B0", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f6327b71-701e-0034-2fbc-5ea24a000000", + "Date" : "Mon, 20 Jul 2020 17:34:48 GMT", + "x-ms-client-request-id" : "68ecec9a-d872-420a-8c92-ffa8315263b3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailbf122590f133b46/javablobsealacfail1appendblobapitestsealacfailbf124974cf77", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9036dab-f3dc-4baf-b737-9543caf1a963" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD334620514", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:50 GMT", + "x-ms-version-id" : "2020-07-20T17:34:50.1485844Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "cf68d1cf-501e-001c-75bc-5ec3e2000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:49 GMT", + "x-ms-client-request-id" : "c9036dab-f3dc-4baf-b737-9543caf1a963" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailbf122590f133b46/javablobsealacfail1appendblobapitestsealacfailbf124974cf77?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4ac1e85-8b01-404e-a8da-09c45241b054" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "253", + "StatusCode" : "412", + "x-ms-request-id" : "82d50cca-501e-007e-23bc-5e01c5000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:82d50cca-501e-007e-23bc-5e01c5000000\nTime:2020-07-20T17:34:50.5929361Z", + "Date" : "Mon, 20 Jul 2020 17:34:50 GMT", + "x-ms-client-request-id" : "e4ac1e85-8b01-404e-a8da-09c45241b054", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2b0eed6-111c-400f-8f84-976cde9036b7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "14452a98-c01e-0053-35bc-5eb2b6000000", + "Body" : "jtcsealacfailjtcsealacfail0appendblobapitestsealacfailbf122590f133b46Mon, 20 Jul 2020 17:34:49 GMT\"0x8D82CD333F9B5B0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:50 GMT", + "x-ms-client-request-id" : "f2b0eed6-111c-400f-8f84-976cde9036b7", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailbf122590f133b46?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b804736-9d64-4798-b528-e72e17ea7e58" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "19c103c6-201e-0029-2abc-5eaff6000000", + "Date" : "Mon, 20 Jul 2020 17:34:50 GMT", + "x-ms-client-request-id" : "0b804736-9d64-4798-b528-e72e17ea7e58" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealacfail0appendblobapitestsealacfailbf122590f133b46", "javablobsealacfail1appendblobapitestsealacfailbf124974cf77" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[1].json new file mode 100644 index 000000000000..c8e5ed7bf559 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[1].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfaild4e84647e1a09c6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "571bfdf0-3c69-4fb1-92a8-9ce17d3a7a26" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD3358F3E2F", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "00b3553f-901e-0013-79bc-5eb58e000000", + "Date" : "Mon, 20 Jul 2020 17:34:51 GMT", + "x-ms-client-request-id" : "571bfdf0-3c69-4fb1-92a8-9ce17d3a7a26" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfaild4e84647e1a09c6/javablobsealacfail1appendblobapitestsealacfaild4e11647850d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "385cde24-bb92-4570-9aa3-96bd31fc8c44" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD335C44675", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:52 GMT", + "x-ms-version-id" : "2020-07-20T17:34:52.4702325Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b1b19e91-401e-004d-5abc-5e5e6e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:52 GMT", + "x-ms-client-request-id" : "385cde24-bb92-4570-9aa3-96bd31fc8c44" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfaild4e84647e1a09c6/javablobsealacfail1appendblobapitestsealacfaild4e11647850d?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a69e1ab-8e14-4038-bbde-36b94563901d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "253", + "StatusCode" : "412", + "x-ms-request-id" : "5199d169-a01e-00a1-07bc-5e4aff000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5199d169-a01e-00a1-07bc-5e4aff000000\nTime:2020-07-20T17:34:52.8122929Z", + "Date" : "Mon, 20 Jul 2020 17:34:52 GMT", + "x-ms-client-request-id" : "0a69e1ab-8e14-4038-bbde-36b94563901d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ab572da-e6fa-4836-be9b-6c8d9d8846c1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "51233fea-301e-0035-6fbc-5efd96000000", + "Body" : "jtcsealacfailjtcsealacfail0appendblobapitestsealacfaild4e84647e1a09c6Mon, 20 Jul 2020 17:34:52 GMT\"0x8D82CD3358F3E2F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:52 GMT", + "x-ms-client-request-id" : "6ab572da-e6fa-4836-be9b-6c8d9d8846c1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfaild4e84647e1a09c6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "94918417-4c16-44de-8f52-b57fd360deec" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "09b2dba1-501e-006e-29bc-5ec4ad000000", + "Date" : "Mon, 20 Jul 2020 17:34:53 GMT", + "x-ms-client-request-id" : "94918417-4c16-44de-8f52-b57fd360deec" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealacfail0appendblobapitestsealacfaild4e84647e1a09c6", "javablobsealacfail1appendblobapitestsealacfaild4e11647850d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[2].json new file mode 100644 index 000000000000..d476fc40d856 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[2].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailfa720201b0c1ba1?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f4ed84f-942e-489f-ae09-66e3d911537f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD336959CDF", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "44906342-301e-0057-2bbc-5e3fb1000000", + "Date" : "Mon, 20 Jul 2020 17:34:53 GMT", + "x-ms-client-request-id" : "6f4ed84f-942e-489f-ae09-66e3d911537f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailfa720201b0c1ba1/javablobsealacfail1appendblobapitestsealacfailfa79092037dc", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "50210595-4ec1-4eff-b0af-5cd56a7704db" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD336CCBE92", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:54 GMT", + "x-ms-version-id" : "2020-07-20T17:34:54.2034578Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3abac5fe-501e-0041-64bc-5ec966000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:53 GMT", + "x-ms-client-request-id" : "50210595-4ec1-4eff-b0af-5cd56a7704db" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailfa720201b0c1ba1/javablobsealacfail1appendblobapitestsealacfailfa79092037dc?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "565563bd-5bf7-4ec6-a434-499639a2ee35" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "253", + "StatusCode" : "412", + "x-ms-request-id" : "70ce1341-201e-0016-49bc-5e6755000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:70ce1341-201e-0016-49bc-5e6755000000\nTime:2020-07-20T17:34:54.5397499Z", + "Date" : "Mon, 20 Jul 2020 17:34:53 GMT", + "x-ms-client-request-id" : "565563bd-5bf7-4ec6-a434-499639a2ee35", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "806d1ae3-0059-47d9-aa34-0683168885a0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "eb50515c-901e-003c-42bc-5eb845000000", + "Body" : "jtcsealacfailjtcsealacfail0appendblobapitestsealacfailfa720201b0c1ba1Mon, 20 Jul 2020 17:34:53 GMT\"0x8D82CD336959CDF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:54 GMT", + "x-ms-client-request-id" : "806d1ae3-0059-47d9-aa34-0683168885a0", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailfa720201b0c1ba1?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "60ab76aa-a517-4376-876c-6119c49ff379" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "fc681eec-b01e-0076-70bc-5e1bca000000", + "Date" : "Mon, 20 Jul 2020 17:34:54 GMT", + "x-ms-client-request-id" : "60ab76aa-a517-4376-876c-6119c49ff379" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealacfail0appendblobapitestsealacfailfa720201b0c1ba1", "javablobsealacfail1appendblobapitestsealacfailfa79092037dc" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[3].json new file mode 100644 index 000000000000..73c704f85d0e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[3].json @@ -0,0 +1,141 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail6d8552114952927?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb5724bc-4dee-47b1-aab9-999af8ce090b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD337A04266", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:55 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0f63b2eb-201e-0074-7dbc-5ea572000000", + "Date" : "Mon, 20 Jul 2020 17:34:54 GMT", + "x-ms-client-request-id" : "bb5724bc-4dee-47b1-aab9-999af8ce090b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail6d8552114952927/javablobsealacfail1appendblobapitestsealacfail6d81405358ad", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "71f9ad8b-01c0-4347-a7cc-d8454abacd7c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD337DA19B9", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:55 GMT", + "x-ms-version-id" : "2020-07-20T17:34:55.9687097Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1cd237dd-a01e-0037-09bc-5e432e000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:55 GMT", + "x-ms-client-request-id" : "71f9ad8b-01c0-4347-a7cc-d8454abacd7c" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail6d8552114952927/javablobsealacfail1appendblobapitestsealacfail6d81405358ad", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "07cac2ec-26db-4910-8e3b-13ad2fd13332" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "x-ms-version-id" : "2020-07-20T17:34:55.9687097Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:55 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 20 Jul 2020 17:34:56 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD337DA19B9", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:34:55 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "999ddd66-b01e-0049-27bc-5ed369000000", + "x-ms-client-request-id" : "07cac2ec-26db-4910-8e3b-13ad2fd13332", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail6d8552114952927/javablobsealacfail1appendblobapitestsealacfail6d81405358ad?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6021a5e1-1384-4d35-b2c2-39213620b60a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "253", + "StatusCode" : "412", + "x-ms-request-id" : "5adecc07-301e-000a-7fbc-5e3535000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5adecc07-301e-000a-7fbc-5e3535000000\nTime:2020-07-20T17:34:56.7051269Z", + "Date" : "Mon, 20 Jul 2020 17:34:56 GMT", + "x-ms-client-request-id" : "6021a5e1-1384-4d35-b2c2-39213620b60a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "713563b0-6f1d-4606-b335-0412d73f08ca" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "384e0a2f-c01e-006c-45bc-5e7a15000000", + "Body" : "jtcsealacfailjtcsealacfail0appendblobapitestsealacfail6d8552114952927Mon, 20 Jul 2020 17:34:55 GMT\"0x8D82CD337A04266\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:56 GMT", + "x-ms-client-request-id" : "713563b0-6f1d-4606-b335-0412d73f08ca", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail6d8552114952927?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cb62fb64-6a40-4844-9e8e-c3bac06156fb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "8a31c463-301e-001a-03bc-5ef05d000000", + "Date" : "Mon, 20 Jul 2020 17:34:57 GMT", + "x-ms-client-request-id" : "cb62fb64-6a40-4844-9e8e-c3bac06156fb" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealacfail0appendblobapitestsealacfail6d8552114952927", "javablobsealacfail1appendblobapitestsealacfail6d81405358ad" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[4].json new file mode 100644 index 000000000000..38da567b1699 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[4].json @@ -0,0 +1,132 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailae4678358e93511?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5119a59b-9af6-4f0d-8946-4f7a513d03e9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD338E7BCC5", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:57 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6af210f9-a01e-0018-2abc-5e4ee5000000", + "Date" : "Mon, 20 Jul 2020 17:34:57 GMT", + "x-ms-client-request-id" : "5119a59b-9af6-4f0d-8946-4f7a513d03e9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailae4678358e93511/javablobsealacfail1appendblobapitestsealacfailae434512da40", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b53a024-c059-4d1b-b053-f6a2454e9f7f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD3391FA614", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:58 GMT", + "x-ms-version-id" : "2020-07-20T17:34:58.1022228Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2763c7c9-001e-003e-29bc-5e06fd000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:57 GMT", + "x-ms-client-request-id" : "5b53a024-c059-4d1b-b053-f6a2454e9f7f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailae4678358e93511/javablobsealacfail1appendblobapitestsealacfailae434512da40?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "84a98fa1-31c1-4687-8dd9-cbfb92327d07" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD3391FA614", + "x-ms-lease-id" : "6baa36aa-1c8c-48c3-8765-2f93dc4b486f", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:58 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "102de9bd-301e-0078-3cbc-5e327a000000", + "Date" : "Mon, 20 Jul 2020 17:34:58 GMT", + "x-ms-client-request-id" : "84a98fa1-31c1-4687-8dd9-cbfb92327d07" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailae4678358e93511/javablobsealacfail1appendblobapitestsealacfailae434512da40?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7d8640d0-f2ad-496e-a2c9-bbe7ba442e4d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", + "retry-after" : "0", + "Content-Length" : "265", + "StatusCode" : "412", + "x-ms-request-id" : "13b5f0d6-601e-0075-12bc-5efaae000000", + "Body" : "\nLeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:13b5f0d6-601e-0075-12bc-5efaae000000\nTime:2020-07-20T17:34:58.9050592Z", + "Date" : "Mon, 20 Jul 2020 17:34:58 GMT", + "x-ms-client-request-id" : "7d8640d0-f2ad-496e-a2c9-bbe7ba442e4d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "392acfbf-ebbd-4cdc-afea-c325dce3c59f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "bd1b446f-301e-00a3-39bc-5ef447000000", + "Body" : "jtcsealacfailjtcsealacfail0appendblobapitestsealacfailae4678358e93511Mon, 20 Jul 2020 17:34:57 GMT\"0x8D82CD338E7BCC5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:58 GMT", + "x-ms-client-request-id" : "392acfbf-ebbd-4cdc-afea-c325dce3c59f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfailae4678358e93511?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d183925a-a259-442a-a2be-0ee7818313fe" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "8e1b9ce9-c01e-000e-3bbc-5eb832000000", + "Date" : "Mon, 20 Jul 2020 17:34:59 GMT", + "x-ms-client-request-id" : "d183925a-a259-442a-a2be-0ee7818313fe" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealacfail0appendblobapitestsealacfailae4678358e93511", "javablobsealacfail1appendblobapitestsealacfailae434512da40" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[5].json new file mode 100644 index 000000000000..52d1daf60c5a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealacfail[5].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail90d7557705d1c63?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba29b40a-da20-4ed1-8430-08b1024f39be" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD33A411625", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:59 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "592c4312-f01e-0048-77bc-5e8cb5000000", + "Date" : "Mon, 20 Jul 2020 17:34:59 GMT", + "x-ms-client-request-id" : "ba29b40a-da20-4ed1-8430-08b1024f39be" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail90d7557705d1c63/javablobsealacfail1appendblobapitestsealacfail90d061168b9d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "af3187ca-dec0-489c-952c-e8b95f31b668" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD33A793337", + "Last-Modified" : "Mon, 20 Jul 2020 17:35:00 GMT", + "x-ms-version-id" : "2020-07-20T17:35:00.3668279Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a0ef0370-a01e-0045-15bc-5e4461000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:59 GMT", + "x-ms-client-request-id" : "af3187ca-dec0-489c-952c-e8b95f31b668" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail90d7557705d1c63/javablobsealacfail1appendblobapitestsealacfail90d061168b9d?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6acfc975-d8da-418d-b886-3f16d9577ea9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AppendPositionConditionNotMet", + "retry-after" : "0", + "Content-Length" : "251", + "StatusCode" : "412", + "x-ms-request-id" : "33e74f96-f01e-0093-21bc-5e4a88000000", + "Body" : "\nAppendPositionConditionNotMetThe append position condition specified was not met.\nRequestId:33e74f96-f01e-0093-21bc-5e4a88000000\nTime:2020-07-20T17:35:00.6993500Z", + "Date" : "Mon, 20 Jul 2020 17:34:59 GMT", + "x-ms-client-request-id" : "6acfc975-d8da-418d-b886-3f16d9577ea9", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e760f674-9966-4708-86eb-76259f0f53fc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "90e7151e-e01e-0054-34bc-5eded5000000", + "Body" : "jtcsealacfailjtcsealacfail0appendblobapitestsealacfail90d7557705d1c63Mon, 20 Jul 2020 17:34:59 GMT\"0x8D82CD33A411625\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:35:00 GMT", + "x-ms-client-request-id" : "e760f674-9966-4708-86eb-76259f0f53fc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealacfail0appendblobapitestsealacfail90d7557705d1c63?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1621006-1e05-464e-be8d-0244042ef829" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "305dc0aa-a01e-008e-4fbc-5e4734000000", + "Date" : "Mon, 20 Jul 2020 17:35:01 GMT", + "x-ms-client-request-id" : "e1621006-1e05-464e-be8d-0244042ef829" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealacfail0appendblobapitestsealacfail90d7557705d1c63", "javablobsealacfail1appendblobapitestsealacfail90d061168b9d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealdefaults.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealdefaults.json new file mode 100644 index 000000000000..3ec195e19d43 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealdefaults.json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealdefaults0appendblobapitestsealdefaultsbca8473856d5c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2d78ef3-8ffb-462d-bcd8-214efb9334cf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD309806D52", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "87138b08-101e-006f-7dbb-5e9b71000000", + "Date" : "Mon, 20 Jul 2020 17:33:37 GMT", + "x-ms-client-request-id" : "f2d78ef3-8ffb-462d-bcd8-214efb9334cf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealdefaults0appendblobapitestsealdefaultsbca8473856d5c/javablobsealdefaults1appendblobapitestsealdefaultsbca5747080", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ca70890-335f-4c52-9024-0bbb1f80297b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD309EB94E5", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:38 GMT", + "x-ms-version-id" : "2020-07-20T17:33:38.9080805Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ea33734f-301e-0047-2bbb-5efad9000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:33:38 GMT", + "x-ms-client-request-id" : "3ca70890-335f-4c52-9024-0bbb1f80297b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealdefaults0appendblobapitestsealdefaultsbca8473856d5c/javablobsealdefaults1appendblobapitestsealdefaultsbca5747080?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f2c4e3d-30bd-4a27-81b8-327a318eafae" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD30A37C6F4", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1fe738c3-f01e-0083-59bb-5e8fe0000000", + "Date" : "Mon, 20 Jul 2020 17:33:38 GMT", + "x-ms-client-request-id" : "6f2c4e3d-30bd-4a27-81b8-327a318eafae" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealdefaults&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2165c671-3c12-446f-b720-32585895e930" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "95029ba6-001e-005c-12bb-5ec4da000000", + "Body" : "jtcsealdefaultsjtcsealdefaults0appendblobapitestsealdefaultsbca8473856d5cMon, 20 Jul 2020 17:33:38 GMT\"0x8D82CD309806D52\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:33:39 GMT", + "x-ms-client-request-id" : "2165c671-3c12-446f-b720-32585895e930", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealdefaults0appendblobapitestsealdefaultsbca8473856d5c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "291a0870-adc0-493f-a611-278ce97db3f6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "25f345d7-d01e-0070-03bb-5e2875000000", + "Date" : "Mon, 20 Jul 2020 17:33:40 GMT", + "x-ms-client-request-id" : "291a0870-adc0-493f-a611-278ce97db3f6" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealdefaults0appendblobapitestsealdefaultsbca8473856d5c", "javablobsealdefaults1appendblobapitestsealdefaultsbca5747080" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealerror.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealerror.json new file mode 100644 index 000000000000..95378c3faec2 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealerror.json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealerror0appendblobapitestsealerror3e686544183262bb?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e87ac739-b418-46bc-af7a-30cc97f11bbf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD31C619A51", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7432499e-701e-0079-22bb-5e6da6000000", + "Date" : "Mon, 20 Jul 2020 17:34:08 GMT", + "x-ms-client-request-id" : "e87ac739-b418-46bc-af7a-30cc97f11bbf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealerror0appendblobapitestsealerror3e686544183262bb/javablobsealerror1appendblobapitestsealerror3e65028859e93", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "016d7031-0d5f-49cd-a377-72fb28dd87d7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD31CBF96B1", + "Last-Modified" : "Mon, 20 Jul 2020 17:34:10 GMT", + "x-ms-version-id" : "2020-07-20T17:34:10.4964785Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "16fe4b8f-701e-008d-0fbb-5ea650000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:34:10 GMT", + "x-ms-client-request-id" : "016d7031-0d5f-49cd-a377-72fb28dd87d7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealerror0appendblobapitestsealerror3e686544183262bb/javablobsealerror2appendblobapitestsealerror3e6282063e70a?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b291f0c-e9db-4243-a380-73d066d09d7d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "BlobNotFound", + "retry-after" : "0", + "Content-Length" : "216", + "StatusCode" : "404", + "x-ms-request-id" : "3d635f52-501e-0051-32bb-5e0c0e000000", + "Body" : "\nBlobNotFoundThe specified blob does not exist.\nRequestId:3d635f52-501e-0051-32bb-5e0c0e000000\nTime:2020-07-20T17:34:10.9856795Z", + "Date" : "Mon, 20 Jul 2020 17:34:10 GMT", + "x-ms-client-request-id" : "9b291f0c-e9db-4243-a380-73d066d09d7d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealerror&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e47a996-1f4d-4499-850f-209f510818c1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e576e028-601e-0065-55bb-5e3fc6000000", + "Body" : "jtcsealerrorjtcsealerror0appendblobapitestsealerror3e686544183262bbMon, 20 Jul 2020 17:34:09 GMT\"0x8D82CD31C619A51\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:34:10 GMT", + "x-ms-client-request-id" : "9e47a996-1f4d-4499-850f-209f510818c1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealerror0appendblobapitestsealerror3e686544183262bb?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5d56b7b-2c35-4f98-8fdb-9469a735928f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "305d2ac5-a01e-008e-18bb-5e4734000000", + "Date" : "Mon, 20 Jul 2020 17:34:11 GMT", + "x-ms-client-request-id" : "d5d56b7b-2c35-4f98-8fdb-9469a735928f" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealerror0appendblobapitestsealerror3e686544183262bb", "javablobsealerror1appendblobapitestsealerror3e65028859e93", "javablobsealerror2appendblobapitestsealerror3e6282063e70a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealmin.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealmin.json new file mode 100644 index 000000000000..20e2420cbb44 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/AppendBlobAPITestsealmin.json @@ -0,0 +1,174 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealmin0appendblobapitestsealminb0d99321083abc6081?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e8449cc-16df-4048-b0fa-245c9dc696db" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD312009B2F", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5199495a-a01e-00a1-52bb-5e4aff000000", + "Date" : "Mon, 20 Jul 2020 17:33:51 GMT", + "x-ms-client-request-id" : "4e8449cc-16df-4048-b0fa-245c9dc696db" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealmin0appendblobapitestsealminb0d99321083abc6081/javablobsealmin1appendblobapitestsealminb0d223012e643c5", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e97403ee-8d59-4206-b016-60c04f9dcda7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD3126F51C2", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:53 GMT", + "x-ms-version-id" : "2020-07-20T17:33:53.1932098Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "719b24a9-101e-00a4-31bb-5e9824000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:33:52 GMT", + "x-ms-client-request-id" : "e97403ee-8d59-4206-b016-60c04f9dcda7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealmin0appendblobapitestsealminb0d99321083abc6081/javablobsealmin1appendblobapitestsealminb0d223012e643c5?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "83409b79-4cb9-412f-aad3-4666cfc4902a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD312AA69B2", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1ee23de3-c01e-00a7-34bb-5e7940000000", + "Date" : "Mon, 20 Jul 2020 17:33:53 GMT", + "x-ms-client-request-id" : "83409b79-4cb9-412f-aad3-4666cfc4902a" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealmin0appendblobapitestsealminb0d99321083abc6081/javablobsealmin1appendblobapitestsealminb0d223012e643c5", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a6bc981-8603-491d-be68-5e5b3f3b1ac2" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "x-ms-blob-sealed" : "true", + "x-ms-version-id" : "2020-07-20T17:33:53.1932098Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:53 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 20 Jul 2020 17:33:53 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD312AA69B2", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:33:53 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "66b16f62-301e-009c-7cbb-5e3ce4000000", + "x-ms-client-request-id" : "9a6bc981-8603-491d-be68-5e5b3f3b1ac2", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealmin0appendblobapitestsealminb0d99321083abc6081/javablobsealmin1appendblobapitestsealminb0d223012e643c5", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37593364-7264-43ef-8096-81955fa63dd1" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-committed-block-count" : "0", + "x-ms-blob-sealed" : "true", + "x-ms-version-id" : "2020-07-20T17:33:53.1932098Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:53 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 20 Jul 2020 17:33:53 GMT", + "x-ms-blob-type" : "AppendBlob", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD312AA69B2", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:33:53 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "0f63157f-201e-0074-06bb-5ea572000000", + "x-ms-client-request-id" : "37593364-7264-43ef-8096-81955fa63dd1", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsealmin&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1158322d-9ce2-4672-9dff-347c046ae5a5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "cdcfc10d-001e-004c-43bb-5e01b2000000", + "Body" : "jtcsealminjtcsealmin0appendblobapitestsealminb0d99321083abc6081Mon, 20 Jul 2020 17:33:52 GMT\"0x8D82CD312009B2F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:33:54 GMT", + "x-ms-client-request-id" : "1158322d-9ce2-4672-9dff-347c046ae5a5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsealmin0appendblobapitestsealminb0d99321083abc6081?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9fbbf4bf-cf01-4ba8-aed8-43ee9c8b3fd9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "b8bf57a7-901e-0061-3cbb-5eb2c1000000", + "Date" : "Mon, 20 Jul 2020 17:33:54 GMT", + "x-ms-client-request-id" : "9fbbf4bf-cf01-4ba8-aed8-43ee9c8b3fd9" + }, + "Exception" : null + } ], + "variables" : [ "jtcsealmin0appendblobapitestsealminb0d99321083abc6081", "javablobsealmin1appendblobapitestsealminb0d223012e643c5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[0].json index 660c76e92868..63084b6de482 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[0].json @@ -1,176 +1,198 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestace0c91169977a912a3f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaca5273324ac297374d0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fb4c9bf0-efba-49af-92bf-57c439f7cc19" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb130ca9-7fc1-4148-b4bb-908bd9e5c352" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1073C56E501", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:48 GMT", + "ETag" : "0x8D82524D0826BBE", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:52 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7b0b2-001e-00fa-15f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:48 GMT", - "x-ms-client-request-id" : "fb4c9bf0-efba-49af-92bf-57c439f7cc19" + "x-ms-request-id" : "41d504db-001e-0001-2b0d-57ce5e000000", + "Date" : "Fri, 10 Jul 2020 22:58:51 GMT", + "x-ms-client-request-id" : "bb130ca9-7fc1-4148-b4bb-908bd9e5c352" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestace0c91169977a912a3f/javablobcopydestac1blobapitestcopydestace0c83879929a2a0", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaca5273324ac297374d0/javablobcopydestac1blobapitestcopydestaca5289657cef2eb9", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "97aaa434-98ff-4bb5-b811-d542e755f84d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f40d9ab-a67e-4b38-8f2c-eeefb9109f54", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:49 GMT", + "x-ms-version-id" : "2020-07-10T22:58:52.8124259Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:52 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:48 GMT", + "Date" : "Fri, 10 Jul 2020 22:58:52 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073C628BF7", + "ETag" : "0x8D82524D0FB9563", "Content-Length" : "0", - "x-ms-request-id" : "5d795e72-f01e-00ab-41f0-12e764000000", - "x-ms-client-request-id" : "97aaa434-98ff-4bb5-b811-d542e755f84d" + "x-ms-request-id" : "9df11ca4-401e-005d-5f0d-579b06000000", + "x-ms-client-request-id" : "4f40d9ab-a67e-4b38-8f2c-eeefb9109f54" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestace0c91169977a912a3f/javablobcopydestac2blobapitestcopydestace0c85174efc880e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaca5273324ac297374d0/javablobcopydestac2blobapitestcopydestaca520944511c2626", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eb0fc752-4542-486c-a720-71ac3bbf1f02", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "06835789-9d3e-4188-905b-591199259249", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:49 GMT", + "x-ms-version-id" : "2020-07-10T22:58:53.3197888Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:53 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:49 GMT", + "Date" : "Fri, 10 Jul 2020 22:58:53 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073C6EEB03", + "ETag" : "0x8D82524D1490040", "Content-Length" : "0", - "x-ms-request-id" : "64297b4a-601e-000f-66f0-12dd80000000", - "x-ms-client-request-id" : "eb0fc752-4542-486c-a720-71ac3bbf1f02" + "x-ms-request-id" : "e9fbe186-701e-0069-420d-57a8ce000000", + "x-ms-client-request-id" : "06835789-9d3e-4188-905b-591199259249" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestace0c91169977a912a3f/javablobcopydestac2blobapitestcopydestace0c85174efc880e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaca5273324ac297374d0/javablobcopydestac2blobapitestcopydestaca520944511c2626?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3c383dc2-9aa7-4ff1-b2d4-af12858acc25" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69074488-3b0e-46fe-8276-6fcef6eddf95", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "3c522d2d-68b5-438d-a6b9-cfe93252783e", - "ETag" : "0x8D7E1073C7BE666", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:49 GMT", "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4ead5508-901e-003c-6f0d-57b845000000", + "Date" : "Fri, 10 Jul 2020 22:58:53 GMT", + "x-ms-client-request-id" : "69074488-3b0e-46fe-8276-6fcef6eddf95" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaca5273324ac297374d0/javablobcopydestac2blobapitestcopydestaca520944511c2626", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b4c0e1a-e289-4c6c-9611-92e8a94bb7a1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "a944bf17-6f92-4ce9-ae3d-78b5f54d50cd", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:54 GMT", + "x-ms-version-id" : "2020-07-10T22:58:54.2374394Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 10 Jul 2020 22:58:54 GMT", + "ETag" : "0x8D82524D1D4DEEA", "Content-Length" : "0", "x-ms-copy-status" : "success", - "StatusCode" : "202", - "x-ms-request-id" : "bde7b167-001e-00fa-24f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:48 GMT", - "x-ms-client-request-id" : "3c383dc2-9aa7-4ff1-b2d4-af12858acc25" + "x-ms-request-id" : "d74f7512-501e-0041-6f0d-57c966000000", + "x-ms-client-request-id" : "5b4c0e1a-e289-4c6c-9611-92e8a94bb7a1" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestace0c91169977a912a3f/javablobcopydestac2blobapitestcopydestace0c85174efc880e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaca5273324ac297374d0/javablobcopydestac2blobapitestcopydestaca520944511c2626", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f2daf7ed-2387-4ed9-82c1-73650b4111b3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "186641de-2b54-4b81-aa4e-f34a1ab08c05" }, "Response" : { + "x-ms-is-current-version" : "true", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:49 GMT", + "x-ms-version-id" : "2020-07-10T22:58:54.2374394Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:54 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:49 GMT", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:58:53 GMT", "Content-Length" : "7", - "x-ms-request-id" : "5d796090-f01e-00ab-60f0-12e764000000", + "x-ms-request-id" : "19d99a78-c01e-0031-180d-577091000000", "Content-Type" : "application/octet-stream", - "x-ms-version" : "2019-10-10", - "x-ms-copy-id" : "3c522d2d-68b5-438d-a6b9-cfe93252783e", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestace0c91169977a912a3f/javablobcopydestac1blobapitestcopydestace0c83879929a2a0", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "a944bf17-6f92-4ce9-ae3d-78b5f54d50cd", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopydestac0blobapitestcopydestaca5273324ac297374d0/javablobcopydestac1blobapitestcopydestaca5289657cef2eb9", "x-ms-copy-progress" : "7/7", - "Date" : "Wed, 15 Apr 2020 06:35:49 GMT", + "Date" : "Fri, 10 Jul 2020 22:58:55 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Wed, 15 Apr 2020 06:35:49 GMT", + "x-ms-copy-completion-time" : "Fri, 10 Jul 2020 22:58:54 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E1073C7BE666", - "Vary" : "Origin", + "ETag" : "0x8D82524D1D4DEEA", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "f2daf7ed-2387-4ed9-82c1-73650b4111b3" + "x-ms-client-request-id" : "186641de-2b54-4b81-aa4e-f34a1ab08c05" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "91075b6d-6fa1-47ac-8fea-20ffb89208af" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7383d316-f609-4e3b-a530-072590fb3fab" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64297d0d-601e-000f-48f0-12dd80000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestace0c91169977a912a3fWed, 15 Apr 2020 06:35:48 GMT\"0x8D7E1073C56E501\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:50 GMT", - "x-ms-client-request-id" : "91075b6d-6fa1-47ac-8fea-20ffb89208af", + "x-ms-request-id" : "c840989a-c01e-007c-760d-57bf7d000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestaca5273324ac297374d0Fri, 10 Jul 2020 22:58:52 GMT\"0x8D82524D0826BBE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:58:56 GMT", + "x-ms-client-request-id" : "7383d316-f609-4e3b-a530-072590fb3fab", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestace0c91169977a912a3f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaca5273324ac297374d0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2d472888-11bb-4d99-b9e8-0584f8801def" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd8bc03a-18c3-440d-8d96-06616846b910" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde7b49a-001e-00fa-58f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:49 GMT", - "x-ms-client-request-id" : "2d472888-11bb-4d99-b9e8-0584f8801def" + "x-ms-request-id" : "de844f39-b01e-0014-7c0d-57d9ed000000", + "Date" : "Fri, 10 Jul 2020 22:58:55 GMT", + "x-ms-client-request-id" : "cd8bc03a-18c3-440d-8d96-06616846b910" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestace0c91169977a912a3f", "javablobcopydestac1blobapitestcopydestace0c83879929a2a0", "javablobcopydestac2blobapitestcopydestace0c85174efc880e" ] + "variables" : [ "jtccopydestac0blobapitestcopydestaca5273324ac297374d0", "javablobcopydestac1blobapitestcopydestaca5289657cef2eb9", "javablobcopydestac2blobapitestcopydestaca520944511c2626" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[1].json index b1f7aef3e309..65317ff590ba 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[1].json @@ -1,176 +1,198 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac57029151404871b550?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2817638675e761b894?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fdf5eea7-c733-4386-b615-0c38207b6655" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "95475d8b-3a91-4023-833c-77065f0452bf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1073D3A207B", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:50 GMT", + "ETag" : "0x8D82524D38E7274", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d7960e2-f01e-00ab-1ef0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:49 GMT", - "x-ms-client-request-id" : "fdf5eea7-c733-4386-b615-0c38207b6655" + "x-ms-request-id" : "06ab83a1-401e-0010-4f0d-5754ea000000", + "Date" : "Fri, 10 Jul 2020 22:58:56 GMT", + "x-ms-client-request-id" : "95475d8b-3a91-4023-833c-77065f0452bf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac57029151404871b550/javablobcopydestac1blobapitestcopydestac57029474a144502", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2817638675e761b894/javablobcopydestac1blobapitestcopydestac28114331c46371a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3d07a474-2f38-490c-b2ff-6e2b2ffc36d9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0448ef4a-e400-49eb-aa7b-f0aa082695c3", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:50 GMT", + "x-ms-version-id" : "2020-07-10T22:58:57.4897527Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:57 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:50 GMT", + "Date" : "Fri, 10 Jul 2020 22:58:56 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073D41AF9B", + "ETag" : "0x8D82524D3C54977", "Content-Length" : "0", - "x-ms-request-id" : "64297d47-601e-000f-74f0-12dd80000000", - "x-ms-client-request-id" : "3d07a474-2f38-490c-b2ff-6e2b2ffc36d9" + "x-ms-request-id" : "c356d539-601e-0081-690d-573158000000", + "x-ms-client-request-id" : "0448ef4a-e400-49eb-aa7b-f0aa082695c3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac57029151404871b550/javablobcopydestac2blobapitestcopydestac570127478c73282", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2817638675e761b894/javablobcopydestac2blobapitestcopydestac2812994895f3c95", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6a375565-7e8a-4031-89c1-a9a7bd5f2bdf", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23d29f8f-6925-4ac5-907d-669f51b3b8b8", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:50 GMT", + "x-ms-version-id" : "2020-07-10T22:58:57.8460061Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:57 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:50 GMT", + "Date" : "Fri, 10 Jul 2020 22:58:57 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073D49EEF9", + "ETag" : "0x8D82524D3FBA59D", "Content-Length" : "0", - "x-ms-request-id" : "bde7b514-001e-00fa-40f0-12f991000000", - "x-ms-client-request-id" : "6a375565-7e8a-4031-89c1-a9a7bd5f2bdf" + "x-ms-request-id" : "9aad6cf7-b01e-0004-6f0d-571c85000000", + "x-ms-client-request-id" : "23d29f8f-6925-4ac5-907d-669f51b3b8b8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac57029151404871b550/javablobcopydestac2blobapitestcopydestac570127478c73282", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2817638675e761b894/javablobcopydestac2blobapitestcopydestac2812994895f3c95?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2bd5e59f-e8a7-4d8d-9cd3-697aa5a5a866" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a584ab98-5e8a-41d4-8fa6-130212e1c83c", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "12cb9d18-8299-4b42-9d4a-31a055c3758b", - "ETag" : "0x8D7E1073D52A39B", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:50 GMT", "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "34a88a7e-201e-0064-660d-57601a000000", + "Date" : "Fri, 10 Jul 2020 22:58:57 GMT", + "x-ms-client-request-id" : "a584ab98-5e8a-41d4-8fa6-130212e1c83c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2817638675e761b894/javablobcopydestac2blobapitestcopydestac2812994895f3c95", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e1d3770-ec16-4a5f-b2b6-0765359da769" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "b8cbc146-9da1-4739-854e-9357090537a9", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:58 GMT", + "x-ms-version-id" : "2020-07-10T22:58:58.6465754Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 10 Jul 2020 22:58:58 GMT", + "ETag" : "0x8D82524D4757FB1", "Content-Length" : "0", "x-ms-copy-status" : "success", - "StatusCode" : "202", - "x-ms-request-id" : "5d796129-f01e-00ab-59f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:50 GMT", - "x-ms-client-request-id" : "2bd5e59f-e8a7-4d8d-9cd3-697aa5a5a866" + "x-ms-request-id" : "8f7172bb-001e-00a8-290d-570f2c000000", + "x-ms-client-request-id" : "2e1d3770-ec16-4a5f-b2b6-0765359da769" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac57029151404871b550/javablobcopydestac2blobapitestcopydestac570127478c73282", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2817638675e761b894/javablobcopydestac2blobapitestcopydestac2812994895f3c95", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "792bb7a2-43be-458d-ad49-01ad1f64e602" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d63189be-9534-4200-8ab1-743ed0fd3884" }, "Response" : { + "x-ms-is-current-version" : "true", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:50 GMT", + "x-ms-version-id" : "2020-07-10T22:58:58.6465754Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:58:58 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:50 GMT", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:58:57 GMT", "Content-Length" : "7", - "x-ms-request-id" : "64297f1d-601e-000f-6af0-12dd80000000", + "x-ms-request-id" : "ac6c1a76-801e-0030-4f0d-572f4d000000", "Content-Type" : "application/octet-stream", - "x-ms-version" : "2019-10-10", - "x-ms-copy-id" : "12cb9d18-8299-4b42-9d4a-31a055c3758b", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac57029151404871b550/javablobcopydestac1blobapitestcopydestac57029474a144502", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "b8cbc146-9da1-4739-854e-9357090537a9", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2817638675e761b894/javablobcopydestac1blobapitestcopydestac28114331c46371a", "x-ms-copy-progress" : "7/7", - "Date" : "Wed, 15 Apr 2020 06:35:51 GMT", + "Date" : "Fri, 10 Jul 2020 22:58:59 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Wed, 15 Apr 2020 06:35:50 GMT", + "x-ms-copy-completion-time" : "Fri, 10 Jul 2020 22:58:58 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E1073D52A39B", - "Vary" : "Origin", + "ETag" : "0x8D82524D4757FB1", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "792bb7a2-43be-458d-ad49-01ad1f64e602" + "x-ms-client-request-id" : "d63189be-9534-4200-8ab1-743ed0fd3884" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c3a1cf6b-fc2d-4848-90ef-db2af0afcae2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d9c8d3d-eead-4299-bce5-c637d12e0115" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7b85f-001e-00fa-2bf0-12f991000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac57029151404871b550Wed, 15 Apr 2020 06:35:50 GMT\"0x8D7E1073D3A207B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:51 GMT", - "x-ms-client-request-id" : "c3a1cf6b-fc2d-4848-90ef-db2af0afcae2", + "x-ms-request-id" : "40b0f7af-501e-000c-800d-57068a000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac2817638675e761b894Fri, 10 Jul 2020 22:58:57 GMT\"0x8D82524D38E7274\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:59:00 GMT", + "x-ms-client-request-id" : "2d9c8d3d-eead-4299-bce5-c637d12e0115", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac57029151404871b550?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2817638675e761b894?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ec6ce892-3735-494c-946f-5a304d07a80e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "19df75f3-caab-44dd-96e5-062ee1ae0430" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d796391-f01e-00ab-50f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:51 GMT", - "x-ms-client-request-id" : "ec6ce892-3735-494c-946f-5a304d07a80e" + "x-ms-request-id" : "9c8a10df-c01e-006c-6a0d-577a15000000", + "Date" : "Fri, 10 Jul 2020 22:59:00 GMT", + "x-ms-client-request-id" : "19df75f3-caab-44dd-96e5-062ee1ae0430" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestac57029151404871b550", "javablobcopydestac1blobapitestcopydestac57029474a144502", "javablobcopydestac2blobapitestcopydestac570127478c73282" ] + "variables" : [ "jtccopydestac0blobapitestcopydestac2817638675e761b894", "javablobcopydestac1blobapitestcopydestac28114331c46371a", "javablobcopydestac2blobapitestcopydestac2812994895f3c95" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[2].json index 74e9685e4a9e..99c57a685eab 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[2].json @@ -1,176 +1,198 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2740811875fa7b7347?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac59c318252267ade464?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9314933a-8f6a-4952-b043-cf673292900e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9dae43fb-5292-4a19-b379-b985ce65dc3c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1073E0C6424", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:51 GMT", + "ETag" : "0x8D82524D5D70D03", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:00 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64297f3d-601e-000f-06f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:51 GMT", - "x-ms-client-request-id" : "9314933a-8f6a-4952-b043-cf673292900e" + "x-ms-request-id" : "e971a6a4-e01e-0054-7b0d-57ded5000000", + "Date" : "Fri, 10 Jul 2020 22:59:00 GMT", + "x-ms-client-request-id" : "9dae43fb-5292-4a19-b379-b985ce65dc3c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2740811875fa7b7347/javablobcopydestac1blobapitestcopydestac27411333f305a71", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac59c318252267ade464/javablobcopydestac1blobapitestcopydestac59c154610c7e4b6", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a41c9ebb-6678-4f65-a3ca-2bdfc8a19c2d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15f0a801-0aeb-4463-a542-3122fccd2cc0", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:51 GMT", + "x-ms-version-id" : "2020-07-10T22:59:01.3114711Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:01 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:51 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:01 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073E1537CC", + "ETag" : "0x8D82524D60C4847", "Content-Length" : "0", - "x-ms-request-id" : "bde7b8c7-001e-00fa-01f0-12f991000000", - "x-ms-client-request-id" : "a41c9ebb-6678-4f65-a3ca-2bdfc8a19c2d" + "x-ms-request-id" : "e156bd86-301e-0078-240d-57327a000000", + "x-ms-client-request-id" : "15f0a801-0aeb-4463-a542-3122fccd2cc0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2740811875fa7b7347/javablobcopydestac2blobapitestcopydestac27488115fd1d7e4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac59c318252267ade464/javablobcopydestac2blobapitestcopydestac59c589652e4e3db", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6654f0e1-4700-49d1-9aba-8c8800ffd087", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f9d8fa7-79e1-43a6-ab01-a22feb744266", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:51 GMT", + "x-ms-version-id" : "2020-07-10T22:59:01.6657235Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:01 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:51 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:01 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073E1F2542", + "ETag" : "0x8D82524D6427D53", "Content-Length" : "0", - "x-ms-request-id" : "5d796400-f01e-00ab-38f0-12e764000000", - "x-ms-client-request-id" : "6654f0e1-4700-49d1-9aba-8c8800ffd087" + "x-ms-request-id" : "e00588fc-501e-00a5-160d-57c7f8000000", + "x-ms-client-request-id" : "3f9d8fa7-79e1-43a6-ab01-a22feb744266" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2740811875fa7b7347/javablobcopydestac2blobapitestcopydestac27488115fd1d7e4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac59c318252267ade464/javablobcopydestac2blobapitestcopydestac59c589652e4e3db?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "74741ae7-4dac-4008-bcdf-436d17df3803" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "74863a02-99b0-4766-a57f-ad4a15b6f05d", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "9b7b22f1-1a16-483b-8f04-1e7a9709a931", - "ETag" : "0x8D7E1073E28280D", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:52 GMT", "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0e2dca9c-c01e-0098-6f0d-57b1e3000000", + "Date" : "Fri, 10 Jul 2020 22:59:01 GMT", + "x-ms-client-request-id" : "74863a02-99b0-4766-a57f-ad4a15b6f05d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac59c318252267ade464/javablobcopydestac2blobapitestcopydestac59c589652e4e3db", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8f7c239-2c9b-41b0-822b-ab41d20d0ff5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "a7e1b373-e173-471d-a811-dfae347722e8", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:02 GMT", + "x-ms-version-id" : "2020-07-10T22:59:02.3792294Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 10 Jul 2020 22:59:02 GMT", + "ETag" : "0x8D82524D6AF0E8F", "Content-Length" : "0", "x-ms-copy-status" : "success", - "StatusCode" : "202", - "x-ms-request-id" : "64297f69-601e-000f-2bf0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:51 GMT", - "x-ms-client-request-id" : "74741ae7-4dac-4008-bcdf-436d17df3803" + "x-ms-request-id" : "7d457a6b-501e-001c-670d-57c3e2000000", + "x-ms-client-request-id" : "c8f7c239-2c9b-41b0-822b-ab41d20d0ff5" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2740811875fa7b7347/javablobcopydestac2blobapitestcopydestac27488115fd1d7e4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac59c318252267ade464/javablobcopydestac2blobapitestcopydestac59c589652e4e3db", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2447b99b-6a7d-4264-9e62-871ce85ef615" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ee3aab1-4b75-41d7-8efd-0eaff7c211f8" }, "Response" : { + "x-ms-is-current-version" : "true", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:52 GMT", + "x-ms-version-id" : "2020-07-10T22:59:02.3792294Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:02 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:51 GMT", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:59:01 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde7bb3f-001e-00fa-1bf0-12f991000000", + "x-ms-request-id" : "f232fa0a-801e-0020-250d-57ea25000000", "Content-Type" : "application/octet-stream", - "x-ms-version" : "2019-10-10", - "x-ms-copy-id" : "9b7b22f1-1a16-483b-8f04-1e7a9709a931", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2740811875fa7b7347/javablobcopydestac1blobapitestcopydestac27411333f305a71", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "a7e1b373-e173-471d-a811-dfae347722e8", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopydestac0blobapitestcopydestac59c318252267ade464/javablobcopydestac1blobapitestcopydestac59c154610c7e4b6", "x-ms-copy-progress" : "7/7", - "Date" : "Wed, 15 Apr 2020 06:35:52 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:02 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Wed, 15 Apr 2020 06:35:52 GMT", + "x-ms-copy-completion-time" : "Fri, 10 Jul 2020 22:59:02 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E1073E28280D", - "Vary" : "Origin", + "ETag" : "0x8D82524D6AF0E8F", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "2447b99b-6a7d-4264-9e62-871ce85ef615" + "x-ms-client-request-id" : "1ee3aab1-4b75-41d7-8efd-0eaff7c211f8" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "77422e36-15e1-4013-81d4-73231a842f5d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9d12b42-3ebc-440e-b59c-4d33ffe513b7" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d796610-f01e-00ab-64f0-12e764000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac2740811875fa7b7347Wed, 15 Apr 2020 06:35:51 GMT\"0x8D7E1073E0C6424\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:52 GMT", - "x-ms-client-request-id" : "77422e36-15e1-4013-81d4-73231a842f5d", + "x-ms-request-id" : "264ac76d-a01e-0008-7a0d-578b8d000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac59c318252267ade464Fri, 10 Jul 2020 22:59:00 GMT\"0x8D82524D5D70D03\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:59:03 GMT", + "x-ms-client-request-id" : "a9d12b42-3ebc-440e-b59c-4d33ffe513b7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac2740811875fa7b7347?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac59c318252267ade464?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6cd4cfeb-6fdc-47b0-8875-17ad064752e1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd911f0e-8376-4e3b-b0cb-c0c8c71ffcd1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "642980c2-601e-000f-4df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:53 GMT", - "x-ms-client-request-id" : "6cd4cfeb-6fdc-47b0-8875-17ad064752e1" + "x-ms-request-id" : "0235100a-c01e-0053-7f0d-57b2b6000000", + "Date" : "Fri, 10 Jul 2020 22:59:04 GMT", + "x-ms-client-request-id" : "dd911f0e-8376-4e3b-b0cb-c0c8c71ffcd1" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestac2740811875fa7b7347", "javablobcopydestac1blobapitestcopydestac27411333f305a71", "javablobcopydestac2blobapitestcopydestac27488115fd1d7e4" ] + "variables" : [ "jtccopydestac0blobapitestcopydestac59c318252267ade464", "javablobcopydestac1blobapitestcopydestac59c154610c7e4b6", "javablobcopydestac2blobapitestcopydestac59c589652e4e3db" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[3].json index 4d97573f12a7..0b6854b1059b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[3].json @@ -1,208 +1,232 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaccab81826238176fa03?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3a9f1a2c-ac32-4cc1-8c8f-3b21f682f414" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ddd4f2c3-1e40-421f-b67e-e1b652670d40" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1073EE9061B", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:53 GMT", + "ETag" : "0x8D82524D82B9AB6", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7bbb6-001e-00fa-7ef0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:52 GMT", - "x-ms-client-request-id" : "3a9f1a2c-ac32-4cc1-8c8f-3b21f682f414" + "x-ms-request-id" : "4f010e88-a01e-0027-630d-578646000000", + "Date" : "Fri, 10 Jul 2020 22:59:03 GMT", + "x-ms-client-request-id" : "ddd4f2c3-1e40-421f-b67e-e1b652670d40" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaccab81826238176fa03/javablobcopydestac1blobapitestcopydestaccab50818970183b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d/javablobcopydestac1blobapitestcopydestacd9246271ba3741c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "150508cc-ffa0-474e-939e-a737d1204cd8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0023c302-9ec1-4b54-9f34-3b30f4d8666a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:53 GMT", + "x-ms-version-id" : "2020-07-10T22:59:05.2822959Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:05 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:52 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:04 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073EF322D9", + "ETag" : "0x8D82524D86A2E95", "Content-Length" : "0", - "x-ms-request-id" : "5d796676-f01e-00ab-35f0-12e764000000", - "x-ms-client-request-id" : "150508cc-ffa0-474e-939e-a737d1204cd8" + "x-ms-request-id" : "0767d995-701e-00a2-490d-57ab9b000000", + "x-ms-client-request-id" : "0023c302-9ec1-4b54-9f34-3b30f4d8666a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaccab81826238176fa03/javablobcopydestac2blobapitestcopydestaccab3996281a080f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d/javablobcopydestac2blobapitestcopydestacd92598476bd4dd0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "39ac6102-8a2a-436e-b89a-cbee164153da", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "717638e1-8424-4c4a-b9ce-60bd709c68e4", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:53 GMT", + "x-ms-version-id" : "2020-07-10T22:59:05.6765759Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:05 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:53 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:05 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073EFB8948", + "ETag" : "0x8D82524D8A67F3F", "Content-Length" : "0", - "x-ms-request-id" : "642980f3-601e-000f-78f0-12dd80000000", - "x-ms-client-request-id" : "39ac6102-8a2a-436e-b89a-cbee164153da" + "x-ms-request-id" : "e853517d-d01e-0070-200d-572875000000", + "x-ms-client-request-id" : "717638e1-8424-4c4a-b9ce-60bd709c68e4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d/javablobcopydestac2blobapitestcopydestacd92598476bd4dd0?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "908ced41-b323-4f5f-85e3-66576257fe70", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0b3a6077-f01e-0058-1f0d-5749dd000000", + "Date" : "Fri, 10 Jul 2020 22:59:05 GMT", + "x-ms-client-request-id" : "908ced41-b323-4f5f-85e3-66576257fe70" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaccab81826238176fa03/javablobcopydestac2blobapitestcopydestaccab3996281a080f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d/javablobcopydestac2blobapitestcopydestacd92598476bd4dd0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4e41f844-12b7-4ddb-be72-fa48261077b6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae9ccacd-a320-4d33-afb6-01e803be374d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:53 GMT", + "x-ms-version-id" : "2020-07-10T22:59:05.6765759Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:05 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:52 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:06 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E1073EFB8948", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:53 GMT", + "ETag" : "0x8D82524D8A67F3F", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:59:05 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde7bc07-001e-00fa-43f0-12f991000000", - "x-ms-client-request-id" : "4e41f844-12b7-4ddb-be72-fa48261077b6", + "x-ms-request-id" : "974fa430-b01e-002b-480d-57114e000000", + "x-ms-client-request-id" : "ae9ccacd-a320-4d33-afb6-01e803be374d", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaccab81826238176fa03/javablobcopydestac2blobapitestcopydestaccab3996281a080f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d/javablobcopydestac2blobapitestcopydestacd92598476bd4dd0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "31d4d8a5-c46d-47c9-8da8-4b21819be955" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23c4ec14-39db-4ad1-9017-723eba294e9d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "3ea2b6e5-7a9d-4f43-bb73-02df24afbe8c", - "ETag" : "0x8D7E1073F0C0803", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:53 GMT", + "x-ms-copy-id" : "d9ec03e0-a4a9-4ac1-a629-e80cc57bd5bd", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:06 GMT", + "x-ms-version-id" : "2020-07-10T22:59:06.7043057Z", "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 10 Jul 2020 22:59:05 GMT", + "ETag" : "0x8D82524D94329E1", "Content-Length" : "0", "x-ms-copy-status" : "success", - "StatusCode" : "202", - "x-ms-request-id" : "5d7966a7-f01e-00ab-5ef0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:52 GMT", - "x-ms-client-request-id" : "31d4d8a5-c46d-47c9-8da8-4b21819be955" + "x-ms-request-id" : "e93924cf-e01e-00a0-210d-571523000000", + "x-ms-client-request-id" : "23c4ec14-39db-4ad1-9017-723eba294e9d" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaccab81826238176fa03/javablobcopydestac2blobapitestcopydestaccab3996281a080f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d/javablobcopydestac2blobapitestcopydestacd92598476bd4dd0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "79e0c280-3cfd-4e68-b2be-6d7825c815c7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0f1b95b-724b-40a5-ab9f-e458cf05bcde" }, "Response" : { + "x-ms-is-current-version" : "true", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:53 GMT", + "x-ms-version-id" : "2020-07-10T22:59:06.7043057Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:06 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:53 GMT", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:59:05 GMT", "Content-Length" : "7", - "x-ms-request-id" : "6429827a-601e-000f-32f0-12dd80000000", + "x-ms-request-id" : "725250ad-001e-005c-320d-57c4da000000", "Content-Type" : "application/octet-stream", - "x-ms-version" : "2019-10-10", - "x-ms-copy-id" : "3ea2b6e5-7a9d-4f43-bb73-02df24afbe8c", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestaccab81826238176fa03/javablobcopydestac1blobapitestcopydestaccab50818970183b", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "d9ec03e0-a4a9-4ac1-a629-e80cc57bd5bd", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d/javablobcopydestac1blobapitestcopydestacd9246271ba3741c", "x-ms-copy-progress" : "7/7", - "Date" : "Wed, 15 Apr 2020 06:35:54 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:07 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Wed, 15 Apr 2020 06:35:53 GMT", + "x-ms-copy-completion-time" : "Fri, 10 Jul 2020 22:59:06 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E1073F0C0803", - "Vary" : "Origin", + "ETag" : "0x8D82524D94329E1", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "79e0c280-3cfd-4e68-b2be-6d7825c815c7" + "x-ms-client-request-id" : "c0f1b95b-724b-40a5-ab9f-e458cf05bcde" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6efb0fcb-baa5-434c-94d1-5954fc90854b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d3fb3334-70b8-4ae8-95d8-52c13967dc76" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7be37-001e-00fa-2af0-12f991000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestaccab81826238176fa03Wed, 15 Apr 2020 06:35:53 GMT\"0x8D7E1073EE9061B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:54 GMT", - "x-ms-client-request-id" : "6efb0fcb-baa5-434c-94d1-5954fc90854b", + "x-ms-request-id" : "958bc953-f01e-0093-640d-574a88000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacd924685043b9c5ae8dFri, 10 Jul 2020 22:59:04 GMT\"0x8D82524D82B9AB6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:59:07 GMT", + "x-ms-client-request-id" : "d3fb3334-70b8-4ae8-95d8-52c13967dc76", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestaccab81826238176fa03?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cc84a4a7-70f0-4b01-adc0-0945fe7c9b15" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b8b28553-7462-401c-aa5a-5a9e15b0620f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79692a-f01e-00ab-07f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:54 GMT", - "x-ms-client-request-id" : "cc84a4a7-70f0-4b01-adc0-0945fe7c9b15" + "x-ms-request-id" : "2652e4f8-f01e-0067-580d-57817e000000", + "Date" : "Fri, 10 Jul 2020 22:59:08 GMT", + "x-ms-client-request-id" : "b8b28553-7462-401c-aa5a-5a9e15b0620f" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestaccab81826238176fa03", "javablobcopydestac1blobapitestcopydestaccab50818970183b", "javablobcopydestac2blobapitestcopydestaccab3996281a080f" ] + "variables" : [ "jtccopydestac0blobapitestcopydestacd924685043b9c5ae8d", "javablobcopydestac1blobapitestcopydestacd9246271ba3741c", "javablobcopydestac2blobapitestcopydestacd92598476bd4dd0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[4].json index c7e33fb3a38d..ba37827b9ea0 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[4].json @@ -1,176 +1,198 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacdda14412c6d749a117?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacab09349146d587272f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "986563d5-5ff5-4c27-9f61-8a9498d5a911" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8f54dffd-f2ed-429c-a54d-a590caa6911c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1073FC63D7E", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:54 GMT", + "ETag" : "0x8D82524DABF5369", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "642982bd-601e-000f-68f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:54 GMT", - "x-ms-client-request-id" : "986563d5-5ff5-4c27-9f61-8a9498d5a911" + "x-ms-request-id" : "a6c21e56-b01e-003b-800d-57d426000000", + "Date" : "Fri, 10 Jul 2020 22:59:08 GMT", + "x-ms-client-request-id" : "8f54dffd-f2ed-429c-a54d-a590caa6911c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacdda14412c6d749a117/javablobcopydestac1blobapitestcopydestacdda59404bc446cb", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacab09349146d587272f/javablobcopydestac1blobapitestcopydestacab0033939086327", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ca11bd80-cee6-4335-9c4d-dacf7286bd86", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d69f9ef5-cf1e-47ea-97fb-975c9459f4a3", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:54 GMT", + "x-ms-version-id" : "2020-07-10T22:59:09.5363209Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:54 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073FCEEA59", + "ETag" : "0x8D82524DAF37289", "Content-Length" : "0", - "x-ms-request-id" : "bde7beb0-001e-00fa-13f0-12f991000000", - "x-ms-client-request-id" : "ca11bd80-cee6-4335-9c4d-dacf7286bd86" + "x-ms-request-id" : "8e2c1fae-801e-000f-430d-57e7ee000000", + "x-ms-client-request-id" : "d69f9ef5-cf1e-47ea-97fb-975c9459f4a3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacdda14412c6d749a117/javablobcopydestac2blobapitestcopydestacdda30363184b661", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacab09349146d587272f/javablobcopydestac2blobapitestcopydestacab044909bfd24b2", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9daf5be6-6d80-460e-b670-3e260466e23d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61c1e617-2cbd-4e1c-952b-2af62a496cdb", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:54 GMT", + "x-ms-version-id" : "2020-07-10T22:59:09.8875714Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:54 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073FD81445", + "ETag" : "0x8D82524DB290B42", "Content-Length" : "0", - "x-ms-request-id" : "5d796997-f01e-00ab-66f0-12e764000000", - "x-ms-client-request-id" : "9daf5be6-6d80-460e-b670-3e260466e23d" + "x-ms-request-id" : "21c611e7-f01e-0083-1c0d-578fe0000000", + "x-ms-client-request-id" : "61c1e617-2cbd-4e1c-952b-2af62a496cdb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacdda14412c6d749a117/javablobcopydestac2blobapitestcopydestacdda30363184b661", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacab09349146d587272f/javablobcopydestac2blobapitestcopydestacab044909bfd24b2?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ec1c9987-d4de-4aad-bb7b-1e10bdb0f810" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bce17958-6baa-4675-879b-e8364c1c30aa", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "1b358a47-dd1d-4075-a63d-74fdcdad85aa", - "ETag" : "0x8D7E1073FE42519", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:54 GMT", "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "73d954ce-301e-0057-3f0d-573fb1000000", + "Date" : "Fri, 10 Jul 2020 22:59:09 GMT", + "x-ms-client-request-id" : "bce17958-6baa-4675-879b-e8364c1c30aa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacab09349146d587272f/javablobcopydestac2blobapitestcopydestacab044909bfd24b2", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e88056ea-08da-4080-b87b-e9a7cd2b78b0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "772b8561-5ff8-479a-a7bb-d6bdeb0b250d", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:10 GMT", + "x-ms-version-id" : "2020-07-10T22:59:10.5580474Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 10 Jul 2020 22:59:10 GMT", + "ETag" : "0x8D82524DB8F32AA", "Content-Length" : "0", "x-ms-copy-status" : "success", - "StatusCode" : "202", - "x-ms-request-id" : "64298303-601e-000f-22f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:54 GMT", - "x-ms-client-request-id" : "ec1c9987-d4de-4aad-bb7b-1e10bdb0f810" + "x-ms-request-id" : "8e7200d3-901e-0003-640d-5770e6000000", + "x-ms-client-request-id" : "e88056ea-08da-4080-b87b-e9a7cd2b78b0" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacdda14412c6d749a117/javablobcopydestac2blobapitestcopydestacdda30363184b661", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacab09349146d587272f/javablobcopydestac2blobapitestcopydestacab044909bfd24b2", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9aec4f63-f90e-4e29-9ad8-2d2acb1715c0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15c2cc0a-592f-4a1e-82ed-6f43abc84ca2" }, "Response" : { + "x-ms-is-current-version" : "true", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:54 GMT", + "x-ms-version-id" : "2020-07-10T22:59:10.5580474Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:10 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:54 GMT", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:59:09 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde7c11c-001e-00fa-3bf0-12f991000000", + "x-ms-request-id" : "78c12c7c-001e-0073-640d-57c911000000", "Content-Type" : "application/octet-stream", - "x-ms-version" : "2019-10-10", - "x-ms-copy-id" : "1b358a47-dd1d-4075-a63d-74fdcdad85aa", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestacdda14412c6d749a117/javablobcopydestac1blobapitestcopydestacdda59404bc446cb", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "772b8561-5ff8-479a-a7bb-d6bdeb0b250d", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopydestac0blobapitestcopydestacab09349146d587272f/javablobcopydestac1blobapitestcopydestacab0033939086327", "x-ms-copy-progress" : "7/7", - "Date" : "Wed, 15 Apr 2020 06:35:55 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:11 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Wed, 15 Apr 2020 06:35:54 GMT", + "x-ms-copy-completion-time" : "Fri, 10 Jul 2020 22:59:10 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E1073FE42519", - "Vary" : "Origin", + "ETag" : "0x8D82524DB8F32AA", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "9aec4f63-f90e-4e29-9ad8-2d2acb1715c0" + "x-ms-client-request-id" : "15c2cc0a-592f-4a1e-82ed-6f43abc84ca2" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7a0ffb1f-6273-4d98-9485-379296519166" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9d9a5b38-e9d7-4a6b-97c7-c32475ca3af0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d796c4b-f01e-00ab-4ff0-12e764000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacdda14412c6d749a117Wed, 15 Apr 2020 06:35:54 GMT\"0x8D7E1073FC63D7E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:55 GMT", - "x-ms-client-request-id" : "7a0ffb1f-6273-4d98-9485-379296519166", + "x-ms-request-id" : "252e522c-301e-0047-130d-57fad9000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestacab09349146d587272fFri, 10 Jul 2020 22:59:09 GMT\"0x8D82524DABF5369\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:59:11 GMT", + "x-ms-client-request-id" : "9d9a5b38-e9d7-4a6b-97c7-c32475ca3af0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacdda14412c6d749a117?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestacab09349146d587272f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0f767603-1d01-47b7-8956-3cc41534815d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "02ee4757-7729-423f-bf4b-28ba4cbbcb5c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64298488-601e-000f-62f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:55 GMT", - "x-ms-client-request-id" : "0f767603-1d01-47b7-8956-3cc41534815d" + "x-ms-request-id" : "50aaa163-701e-001b-1f0d-57af81000000", + "Date" : "Fri, 10 Jul 2020 22:59:11 GMT", + "x-ms-client-request-id" : "02ee4757-7729-423f-bf4b-28ba4cbbcb5c" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestacdda14412c6d749a117", "javablobcopydestac1blobapitestcopydestacdda59404bc446cb", "javablobcopydestac2blobapitestcopydestacdda30363184b661" ] + "variables" : [ "jtccopydestac0blobapitestcopydestacab09349146d587272f", "javablobcopydestac1blobapitestcopydestacab0033939086327", "javablobcopydestac2blobapitestcopydestacab044909bfd24b2" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[5].json index 168c58139697..edeea18ea747 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[5].json @@ -1,199 +1,221 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8306e74f-b787-42a4-90bd-ab4bbbe13c68" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1460b0e4-0d86-4b96-a21a-6a3827a9fb46" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107409E25FF", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:56 GMT", + "ETag" : "0x8D82524DCFF7E54", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:12 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7c18b-001e-00fa-19f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:55 GMT", - "x-ms-client-request-id" : "8306e74f-b787-42a4-90bd-ab4bbbe13c68" + "x-ms-request-id" : "58060740-801e-0052-7d0d-57ed6a000000", + "Date" : "Fri, 10 Jul 2020 22:59:12 GMT", + "x-ms-client-request-id" : "1460b0e4-0d86-4b96-a21a-6a3827a9fb46" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f/javablobcopydestac1blobapitestcopydestac63a08709886728e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5/javablobcopydestac1blobapitestcopydestac66149377de6d85a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "184648c4-98dd-49dd-962a-457253bdeaa5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "14e8132f-335b-48ab-885f-9a6a60ee9963", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:56 GMT", + "x-ms-version-id" : "2020-07-10T22:59:13.3720511Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:13 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:55 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:12 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10740A755A2", + "ETag" : "0x8D82524DD3CBBBF", "Content-Length" : "0", - "x-ms-request-id" : "5d796cd5-f01e-00ab-4bf0-12e764000000", - "x-ms-client-request-id" : "184648c4-98dd-49dd-962a-457253bdeaa5" + "x-ms-request-id" : "9e364b7a-a01e-009e-2f0d-57825c000000", + "x-ms-client-request-id" : "14e8132f-335b-48ab-885f-9a6a60ee9963" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f/javablobcopydestac2blobapitestcopydestac63a307899f708ad", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5/javablobcopydestac2blobapitestcopydestac66188828aa6b512", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "22c2b70d-7017-4fbb-9520-5c343d10ef4f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "94722e66-33dc-4598-a057-c69ffdae478d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:56 GMT", + "x-ms-version-id" : "2020-07-10T22:59:13.7333065Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:13 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:56 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:12 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10740B00A44", + "ETag" : "0x8D82524DD73DB49", "Content-Length" : "0", - "x-ms-request-id" : "642984d8-601e-000f-1ff0-12dd80000000", - "x-ms-client-request-id" : "22c2b70d-7017-4fbb-9520-5c343d10ef4f" + "x-ms-request-id" : "ddf4ec5b-a01e-0037-7a0d-57432e000000", + "x-ms-client-request-id" : "94722e66-33dc-4598-a057-c69ffdae478d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f/javablobcopydestac2blobapitestcopydestac63a307899f708ad?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5/javablobcopydestac2blobapitestcopydestac66188828aa6b512?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ea8bf63e-9ee5-49e8-8ca3-eb2d37340f16" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0576c4f6-8e81-4673-a608-00f8cf88573c", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10740B00A44", - "x-ms-lease-id" : "aeaaef38-8dc6-490d-aeb0-9bfb538b321b", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:56 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9f379890-201e-005b-630d-57a8b9000000", + "Date" : "Fri, 10 Jul 2020 22:59:13 GMT", + "x-ms-client-request-id" : "0576c4f6-8e81-4673-a608-00f8cf88573c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5/javablobcopydestac2blobapitestcopydestac66188828aa6b512?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff73eb17-f771-4bf3-868f-27399e9d06c0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82524DD73DB49", + "x-ms-lease-id" : "cbd21c8d-7b89-493b-816e-3e26b3b515c8", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7c213-001e-00fa-0df0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:55 GMT", - "x-ms-client-request-id" : "ea8bf63e-9ee5-49e8-8ca3-eb2d37340f16" + "x-ms-request-id" : "6ba676d6-a01e-006a-2b0d-5749aa000000", + "Date" : "Fri, 10 Jul 2020 22:59:14 GMT", + "x-ms-client-request-id" : "ff73eb17-f771-4bf3-868f-27399e9d06c0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f/javablobcopydestac2blobapitestcopydestac63a307899f708ad", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5/javablobcopydestac2blobapitestcopydestac66188828aa6b512", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ebfa6efc-a173-4e52-b38a-b7c83dc84bad" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "019ab55f-8cdc-44fd-9c8b-6513c27b0292" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "f254da77-a742-4d6f-8de6-e38e12c1e474", - "ETag" : "0x8D7E10740C4F6D2", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:56 GMT", + "x-ms-copy-id" : "dd933789-ebeb-4f36-a824-610f56fbb383", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:14 GMT", + "x-ms-version-id" : "2020-07-10T22:59:14.8761211Z", "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 10 Jul 2020 22:59:14 GMT", + "ETag" : "0x8D82524DE221550", "Content-Length" : "0", "x-ms-copy-status" : "success", - "StatusCode" : "202", - "x-ms-request-id" : "5d796d44-f01e-00ab-32f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:55 GMT", - "x-ms-client-request-id" : "ebfa6efc-a173-4e52-b38a-b7c83dc84bad" + "x-ms-request-id" : "db72d468-d01e-0002-470d-572f3a000000", + "x-ms-client-request-id" : "019ab55f-8cdc-44fd-9c8b-6513c27b0292" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f/javablobcopydestac2blobapitestcopydestac63a307899f708ad", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5/javablobcopydestac2blobapitestcopydestac66188828aa6b512", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ea4cc96d-9aa2-4060-9870-d9cc44d29a15" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3cdd5a8c-28a2-4eb7-a8d8-d248011ce1f7" }, "Response" : { + "x-ms-is-current-version" : "true", "x-ms-lease-status" : "locked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "leased", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:56 GMT", + "x-ms-version-id" : "2020-07-10T22:59:14.8761211Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:14 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-blob-type" : "BlockBlob", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:56 GMT", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:59:13 GMT", "x-ms-lease-duration" : "infinite", "Content-Length" : "7", - "x-ms-request-id" : "64298661-601e-000f-6af0-12dd80000000", + "x-ms-request-id" : "47644551-d01e-0012-200d-57ea52000000", "Content-Type" : "application/octet-stream", - "x-ms-version" : "2019-10-10", - "x-ms-copy-id" : "f254da77-a742-4d6f-8de6-e38e12c1e474", - "x-ms-copy-source" : "https://azstoragesdkaccount.blob.core.windows.net/jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f/javablobcopydestac1blobapitestcopydestac63a08709886728e", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "dd933789-ebeb-4f36-a824-610f56fbb383", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5/javablobcopydestac1blobapitestcopydestac66149377de6d85a", "x-ms-copy-progress" : "7/7", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", + "Date" : "Fri, 10 Jul 2020 22:59:15 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "x-ms-copy-completion-time" : "Wed, 15 Apr 2020 06:35:56 GMT", + "x-ms-copy-completion-time" : "Fri, 10 Jul 2020 22:59:14 GMT", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10740C4F6D2", - "Vary" : "Origin", + "ETag" : "0x8D82524DE221550", "x-ms-copy-status" : "success", - "x-ms-client-request-id" : "ea4cc96d-9aa2-4060-9870-d9cc44d29a15" + "x-ms-client-request-id" : "3cdd5a8c-28a2-4eb7-a8d8-d248011ce1f7" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c61ce0ea-5973-4670-8b60-66a87c1e64ec" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0e3c223f-0a6b-4b10-9d23-84c49db01565" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7c4d4-001e-00fa-73f0-12f991000000", - "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac63a81064b9ee73b12fWed, 15 Apr 2020 06:35:56 GMT\"0x8D7E107409E25FF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:56 GMT", - "x-ms-client-request-id" : "c61ce0ea-5973-4670-8b60-66a87c1e64ec", + "x-ms-request-id" : "bd776201-001e-0087-020d-5702e7000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac661108425751ec69d5Fri, 10 Jul 2020 22:59:12 GMT\"0x8D82524DCFF7E54\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:59:15 GMT", + "x-ms-client-request-id" : "0e3c223f-0a6b-4b10-9d23-84c49db01565", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac661108425751ec69d5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "485cf7cf-7775-4531-83a8-887249198be8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f3f1b11-42fb-4a93-82dd-934b33d3f85e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d796f91-f01e-00ab-3ff0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:56 GMT", - "x-ms-client-request-id" : "485cf7cf-7775-4531-83a8-887249198be8" + "x-ms-request-id" : "10ecef21-001e-0097-1b0d-57c78f000000", + "Date" : "Fri, 10 Jul 2020 22:59:16 GMT", + "x-ms-client-request-id" : "0f3f1b11-42fb-4a93-82dd-934b33d3f85e" }, "Exception" : null } ], - "variables" : [ "jtccopydestac0blobapitestcopydestac63a81064b9ee73b12f", "javablobcopydestac1blobapitestcopydestac63a08709886728e", "javablobcopydestac2blobapitestcopydestac63a307899f708ad" ] + "variables" : [ "jtccopydestac0blobapitestcopydestac661108425751ec69d5", "javablobcopydestac1blobapitestcopydestac66149377de6d85a", "javablobcopydestac2blobapitestcopydestac66188828aa6b512" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[6].json new file mode 100644 index 000000000000..27458d29bca5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestac[6].json @@ -0,0 +1,198 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac1c215373bc4c567d30?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9dc936a-b61d-470e-837e-342e4c9082bc" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82524DFA08D4C", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:17 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "63ccc1c0-b01e-0092-210d-571554000000", + "Date" : "Fri, 10 Jul 2020 22:59:17 GMT", + "x-ms-client-request-id" : "f9dc936a-b61d-470e-837e-342e4c9082bc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac1c215373bc4c567d30/javablobcopydestac1blobapitestcopydestac1c213697bc11131", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00eaf30b-f1fc-49ba-a8f3-1634f14a889d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:59:17.7541704Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:17 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:59:17 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82524DFD96448", + "Content-Length" : "0", + "x-ms-request-id" : "8fa4db37-b01e-0066-150d-57dea2000000", + "x-ms-client-request-id" : "00eaf30b-f1fc-49ba-a8f3-1634f14a889d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac1c215373bc4c567d30/javablobcopydestac2blobapitestcopydestac1c218946aaabb52", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2b187b5-32dd-4b00-8c06-caa9ea544037", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:59:18.1144226Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:18 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:59:17 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82524E0105CA2", + "Content-Length" : "0", + "x-ms-request-id" : "0132fe46-f01e-003a-3f0d-578bfa000000", + "x-ms-client-request-id" : "f2b187b5-32dd-4b00-8c06-caa9ea544037" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac1c215373bc4c567d30/javablobcopydestac2blobapitestcopydestac1c218946aaabb52?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7219816b-6715-442d-a301-3970dd907af2", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "17f1f35a-901e-005e-2a0d-577a62000000", + "Date" : "Fri, 10 Jul 2020 22:59:18 GMT", + "x-ms-client-request-id" : "7219816b-6715-442d-a301-3970dd907af2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac1c215373bc4c567d30/javablobcopydestac2blobapitestcopydestac1c218946aaabb52", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5fd60d7a-1b84-405e-8741-d6a22ebf960a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "b568ffd9-b9ff-44ba-a368-8637704ead3f", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:18 GMT", + "x-ms-version-id" : "2020-07-10T22:59:18.7698881Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 10 Jul 2020 22:59:17 GMT", + "ETag" : "0x8D82524E07439B1", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "x-ms-request-id" : "5440068d-301e-000a-280d-573535000000", + "x-ms-client-request-id" : "5fd60d7a-1b84-405e-8741-d6a22ebf960a" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac1c215373bc4c567d30/javablobcopydestac2blobapitestcopydestac1c218946aaabb52", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6aa22bbb-74f3-4fc5-9ef9-cec9454d3232" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-10T22:59:18.7698881Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:59:18 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:59:18 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "9d8d9582-601e-0007-130d-57fde1000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "b568ffd9-b9ff-44ba-a368-8637704ead3f", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopydestac0blobapitestcopydestac1c215373bc4c567d30/javablobcopydestac1blobapitestcopydestac1c213697bc11131", + "x-ms-copy-progress" : "7/7", + "Date" : "Fri, 10 Jul 2020 22:59:20 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "x-ms-copy-completion-time" : "Fri, 10 Jul 2020 22:59:18 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82524E07439B1", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "6aa22bbb-74f3-4fc5-9ef9-cec9454d3232" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d85b872d-3234-472e-b0ce-087f76eca8cc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "cfe12fb0-f01e-0077-7d0d-574416000000", + "Body" : "jtccopydestacjtccopydestac0blobapitestcopydestac1c215373bc4c567d30Fri, 10 Jul 2020 22:59:17 GMT\"0x8D82524DFA08D4C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:59:20 GMT", + "x-ms-client-request-id" : "d85b872d-3234-472e-b0ce-087f76eca8cc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestac0blobapitestcopydestac1c215373bc4c567d30?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "400a7ca0-c04a-4841-850f-384902a6e4f3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "391861b5-401e-00a9-6d0d-5750f0000000", + "Date" : "Fri, 10 Jul 2020 22:59:20 GMT", + "x-ms-client-request-id" : "400a7ca0-c04a-4841-850f-384902a6e4f3" + }, + "Exception" : null + } ], + "variables" : [ "jtccopydestac0blobapitestcopydestac1c215373bc4c567d30", "javablobcopydestac1blobapitestcopydestac1c213697bc11131", "javablobcopydestac2blobapitestcopydestac1c218946aaabb52" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[0].json index 4f97728cd769..f12669bc1529 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[0].json @@ -1,94 +1,96 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail70150709aa01e9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail4809663705792c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b5b4e202-a729-40c7-b2b2-1dc85b304ad7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7b2c35e-f722-4afb-95a0-ecdee997b808" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107417D08E7", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:57 GMT", + "ETag" : "0x8D82523AC9ECFE5", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429869b-601e-000f-16f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", - "x-ms-client-request-id" : "b5b4e202-a729-40c7-b2b2-1dc85b304ad7" + "x-ms-request-id" : "dbc4954a-a01e-0045-020c-574461000000", + "Date" : "Fri, 10 Jul 2020 22:50:41 GMT", + "x-ms-client-request-id" : "c7b2c35e-f722-4afb-95a0-ecdee997b808" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail70150709aa01e9/javablobcopydestacfail1blobapitestcopydestacfail701857623a9", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail4809663705792c/javablobcopydestacfail1blobapitestcopydestacfail48084777f7f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3ebc5360-26e0-43df-b688-1c332bcf571f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2134265b-6cd4-454c-a4c5-56abbeed961d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:57 GMT", + "x-ms-version-id" : "2020-07-10T22:50:43.0577582Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:42 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10741858EAE", + "ETag" : "0x8D82523AD10F3AE", "Content-Length" : "0", - "x-ms-request-id" : "bde7c522-001e-00fa-3bf0-12f991000000", - "x-ms-client-request-id" : "3ebc5360-26e0-43df-b688-1c332bcf571f" + "x-ms-request-id" : "95871697-f01e-0093-3a0c-574a88000000", + "x-ms-client-request-id" : "2134265b-6cd4-454c-a4c5-56abbeed961d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail70150709aa01e9/javablobcopydestacfail2blobapitestcopydestacfail70176901f1a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail4809663705792c/javablobcopydestacfail2blobapitestcopydestacfail48023744153", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6cf6f6a3-0590-453e-9f11-ecd9c21bbe16", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82682911-6fb5-4040-a16d-1f8f3b5c2f92", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:57 GMT", + "x-ms-version-id" : "2020-07-10T22:50:43.5571138Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107418F2DED", + "ETag" : "0x8D82523AD5D25C2", "Content-Length" : "0", - "x-ms-request-id" : "5d796fee-f01e-00ab-12f0-12e764000000", - "x-ms-client-request-id" : "6cf6f6a3-0590-453e-9f11-ecd9c21bbe16" + "x-ms-request-id" : "f4ad80b1-201e-004b-050c-576dd1000000", + "x-ms-client-request-id" : "82682911-6fb5-4040-a16d-1f8f3b5c2f92" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail70150709aa01e9/javablobcopydestacfail2blobapitestcopydestacfail70176901f1a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail4809663705792c/javablobcopydestacfail2blobapitestcopydestacfail48023744153", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "075f7977-9c36-4758-a508-4c8d499e4231" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "385b3569-ceb6-40b9-880c-21d3fa355031" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "CannotVerifyCopySource", "retry-after" : "0", "Content-Length" : "229", "StatusCode" : "404", - "x-ms-request-id" : "642986c9-601e-000f-3cf0-12dd80000000", - "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:642986c9-601e-000f-3cf0-12dd80000000\nTime:2020-04-15T06:35:57.8020426Z", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", - "x-ms-client-request-id" : "075f7977-9c36-4758-a508-4c8d499e4231", + "x-ms-request-id" : "c1e528bf-301e-0035-5e0c-57fd96000000", + "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:c1e528bf-301e-0035-5e0c-57fd96000000\nTime:2020-07-10T22:50:44.0227871Z", + "Date" : "Fri, 10 Jul 2020 22:50:43 GMT", + "x-ms-client-request-id" : "385b3569-ceb6-40b9-880c-21d3fa355031", "Content-Type" : "application/xml" }, "Exception" : null @@ -96,43 +98,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "24148969-9503-444d-b807-be5490069327" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5e7cb7b0-a13b-44ef-883c-b7f1e8302ef8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7c583-001e-00fa-0cf0-12f991000000", - "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfail70150709aa01e9Wed, 15 Apr 2020 06:35:57 GMT\"0x8D7E107417D08E7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", - "x-ms-client-request-id" : "24148969-9503-444d-b807-be5490069327", + "x-ms-request-id" : "10e9f767-001e-0097-1a0c-57c78f000000", + "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfail4809663705792cFri, 10 Jul 2020 22:50:42 GMT\"0x8D82523AC9ECFE5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:50:43 GMT", + "x-ms-client-request-id" : "5e7cb7b0-a13b-44ef-883c-b7f1e8302ef8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail70150709aa01e9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail4809663705792c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "994e848f-8cbc-4de9-a272-84555db712ac" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "da63e8d4-8440-4004-9641-c087225d9753" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79703d-f01e-00ab-5ef0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", - "x-ms-client-request-id" : "994e848f-8cbc-4de9-a272-84555db712ac" + "x-ms-request-id" : "4776f843-101e-001d-500c-579c3e000000", + "Date" : "Fri, 10 Jul 2020 22:50:44 GMT", + "x-ms-client-request-id" : "da63e8d4-8440-4004-9641-c087225d9753" }, "Exception" : null } ], - "variables" : [ "jtccopydestacfail0blobapitestcopydestacfail70150709aa01e9", "javablobcopydestacfail1blobapitestcopydestacfail701857623a9", "javablobcopydestacfail2blobapitestcopydestacfail70176901f1a" ] + "variables" : [ "jtccopydestacfail0blobapitestcopydestacfail4809663705792c", "javablobcopydestacfail1blobapitestcopydestacfail48084777f7f", "javablobcopydestacfail2blobapitestcopydestacfail48023744153" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[1].json index 7691021a52e7..c0181f368a6d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[1].json @@ -1,94 +1,96 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailf7756731d0dc74?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail331780915275db?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3d269bb7-9082-4ccb-a941-6b241b5c5748" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d80672c-322c-4b1b-9dbc-4cbcdfbfda39" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10741B7398C", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:57 GMT", + "ETag" : "0x8D82523AE7F601B", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64298714-601e-000f-7df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", - "x-ms-client-request-id" : "3d269bb7-9082-4ccb-a941-6b241b5c5748" + "x-ms-request-id" : "e936bf31-e01e-00a0-620c-571523000000", + "Date" : "Fri, 10 Jul 2020 22:50:45 GMT", + "x-ms-client-request-id" : "5d80672c-322c-4b1b-9dbc-4cbcdfbfda39" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailf7756731d0dc74/javablobcopydestacfail1blobapitestcopydestacfailf7737378e9c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail331780915275db/javablobcopydestacfail1blobapitestcopydestacfail3312951625c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "133c236b-0532-4fa3-8ee0-ffaa588b4022", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d72305c-c2d7-4a49-8e9e-280e570dee01", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "x-ms-version-id" : "2020-07-10T22:50:45.8697620Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:45 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10741BF4A20", + "ETag" : "0x8D82523AEBE0794", "Content-Length" : "0", - "x-ms-request-id" : "bde7c5f7-001e-00fa-74f0-12f991000000", - "x-ms-client-request-id" : "133c236b-0532-4fa3-8ee0-ffaa588b4022" + "x-ms-request-id" : "f5e05c7f-501e-009a-6a0c-570f5b000000", + "x-ms-client-request-id" : "8d72305c-c2d7-4a49-8e9e-280e570dee01" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailf7756731d0dc74/javablobcopydestacfail2blobapitestcopydestacfailf7798498aec", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail331780915275db/javablobcopydestacfail2blobapitestcopydestacfail33110392a30", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a64e7867-326b-47f1-bd31-84a6705068ab", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92c9c591-9654-41f1-a4f1-976155be69b4", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "x-ms-version-id" : "2020-07-10T22:50:46.2250159Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:46 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10741C76253", + "ETag" : "0x8D82523AEF41591", "Content-Length" : "0", - "x-ms-request-id" : "5d797093-f01e-00ab-25f0-12e764000000", - "x-ms-client-request-id" : "a64e7867-326b-47f1-bd31-84a6705068ab" + "x-ms-request-id" : "3e08abdd-f01e-0048-690c-578cb5000000", + "x-ms-client-request-id" : "92c9c591-9654-41f1-a4f1-976155be69b4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailf7756731d0dc74/javablobcopydestacfail2blobapitestcopydestacfailf7798498aec", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail331780915275db/javablobcopydestacfail2blobapitestcopydestacfail33110392a30", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4aef1de7-c579-4c43-a395-8cca2626bde2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16c60ddf-e744-4585-94a0-7e42deeba473" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "CannotVerifyCopySource", "retry-after" : "0", "Content-Length" : "229", "StatusCode" : "404", - "x-ms-request-id" : "64298756-601e-000f-2ef0-12dd80000000", - "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:64298756-601e-000f-2ef0-12dd80000000\nTime:2020-04-15T06:35:58.1403586Z", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "4aef1de7-c579-4c43-a395-8cca2626bde2", + "x-ms-request-id" : "85d1747b-b01e-0082-5a0c-57d03c000000", + "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:85d1747b-b01e-0082-5a0c-57d03c000000\nTime:2020-07-10T22:50:46.6190338Z", + "Date" : "Fri, 10 Jul 2020 22:50:45 GMT", + "x-ms-client-request-id" : "16c60ddf-e744-4585-94a0-7e42deeba473", "Content-Type" : "application/xml" }, "Exception" : null @@ -96,43 +98,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e835790f-e921-491f-a13c-52cc437fc153" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "36bd5a4c-e233-4f21-af6b-84a6b0113ecb" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7c663-001e-00fa-5af0-12f991000000", - "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfailf7756731d0dc74Wed, 15 Apr 2020 06:35:57 GMT\"0x8D7E10741B7398C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", - "x-ms-client-request-id" : "e835790f-e921-491f-a13c-52cc437fc153", + "x-ms-request-id" : "0b3799ea-f01e-0058-770c-5749dd000000", + "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfail331780915275dbFri, 10 Jul 2020 22:50:45 GMT\"0x8D82523AE7F601B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:50:46 GMT", + "x-ms-client-request-id" : "36bd5a4c-e233-4f21-af6b-84a6b0113ecb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailf7756731d0dc74?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail331780915275db?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "165015b7-735e-411c-b88c-14137bb39689" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b89d227-38e2-4be6-b56b-354731513131" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7970da-f01e-00ab-61f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", - "x-ms-client-request-id" : "165015b7-735e-411c-b88c-14137bb39689" + "x-ms-request-id" : "713faf2a-a01e-007a-4f0c-578cc2000000", + "Date" : "Fri, 10 Jul 2020 22:50:46 GMT", + "x-ms-client-request-id" : "6b89d227-38e2-4be6-b56b-354731513131" }, "Exception" : null } ], - "variables" : [ "jtccopydestacfail0blobapitestcopydestacfailf7756731d0dc74", "javablobcopydestacfail1blobapitestcopydestacfailf7737378e9c", "javablobcopydestacfail2blobapitestcopydestacfailf7798498aec" ] + "variables" : [ "jtccopydestacfail0blobapitestcopydestacfail331780915275db", "javablobcopydestacfail1blobapitestcopydestacfail3312951625c", "javablobcopydestacfail2blobapitestcopydestacfail33110392a30" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[2].json index 093c03733226..0b19199e1a7c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[2].json @@ -1,94 +1,96 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail5f30071788c60a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaila1813848c2c6d0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aeadadcf-f29a-49fc-a06c-cf526c06d941" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "89b1cef3-4f3c-40fc-80a2-e4e9c32ec361" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10741E8404A", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "ETag" : "0x8D82523AFC68EAF", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429878e-601e-000f-62f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "aeadadcf-f29a-49fc-a06c-cf526c06d941" + "x-ms-request-id" : "37abcc2f-901e-004e-080c-57bf0a000000", + "Date" : "Fri, 10 Jul 2020 22:50:47 GMT", + "x-ms-client-request-id" : "89b1cef3-4f3c-40fc-80a2-e4e9c32ec361" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail5f30071788c60a/javablobcopydestacfail1blobapitestcopydestacfail5f394083c50", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaila1813848c2c6d0/javablobcopydestacfail1blobapitestcopydestacfaila18583583b4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ee5902b3-19d5-42e2-9376-0dcf39404f29", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "546c27d2-64ad-4b3c-bb83-0be490e66d95", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "x-ms-version-id" : "2020-07-10T22:50:47.9372353Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:47 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10741F0ED54", + "ETag" : "0x8D82523AFF98041", "Content-Length" : "0", - "x-ms-request-id" : "bde7c6d3-001e-00fa-44f0-12f991000000", - "x-ms-client-request-id" : "ee5902b3-19d5-42e2-9376-0dcf39404f29" + "x-ms-request-id" : "f4ad8569-201e-004b-3e0c-576dd1000000", + "x-ms-client-request-id" : "546c27d2-64ad-4b3c-bb83-0be490e66d95" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail5f30071788c60a/javablobcopydestacfail2blobapitestcopydestacfail5f38795448e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaila1813848c2c6d0/javablobcopydestacfail2blobapitestcopydestacfaila1812623d0b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fd5c9b5e-7247-44c6-9afa-f03edb66b6c9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "86a446aa-5af2-49c9-9aa6-897938b311ba", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "x-ms-version-id" : "2020-07-10T22:50:48.2784783Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10741F8DE75", + "ETag" : "0x8D82523B02D920F", "Content-Length" : "0", - "x-ms-request-id" : "5d797128-f01e-00ab-20f0-12e764000000", - "x-ms-client-request-id" : "fd5c9b5e-7247-44c6-9afa-f03edb66b6c9" + "x-ms-request-id" : "01306ec4-f01e-003a-600c-578bfa000000", + "x-ms-client-request-id" : "86a446aa-5af2-49c9-9aa6-897938b311ba" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail5f30071788c60a/javablobcopydestacfail2blobapitestcopydestacfail5f38795448e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaila1813848c2c6d0/javablobcopydestacfail2blobapitestcopydestacfaila1812623d0b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "af0a828c-b61d-401c-9848-54a4610326cb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "89a44017-ebe0-429d-996a-3e9bd90f7f8a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "TargetConditionNotMet", "retry-after" : "0", "Content-Length" : "265", "StatusCode" : "412", - "x-ms-request-id" : "642987c0-601e-000f-0bf0-12dd80000000", - "Body" : "TargetConditionNotMetThe target condition specified using HTTP conditional header(s) is not met.\nRequestId:642987c0-601e-000f-0bf0-12dd80000000\nTime:2020-04-15T06:35:58.4546523Z", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "af0a828c-b61d-401c-9848-54a4610326cb", + "x-ms-request-id" : "17ee6135-901e-005e-1a0c-577a62000000", + "Body" : "TargetConditionNotMetThe target condition specified using HTTP conditional header(s) is not met.\nRequestId:17ee6135-901e-005e-1a0c-577a62000000\nTime:2020-07-10T22:50:48.6275767Z", + "Date" : "Fri, 10 Jul 2020 22:50:48 GMT", + "x-ms-client-request-id" : "89a44017-ebe0-429d-996a-3e9bd90f7f8a", "Content-Type" : "application/xml" }, "Exception" : null @@ -96,43 +98,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "79099d59-6a0b-444b-bf3e-764608893a68" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d11f6d6f-1499-446e-8287-98c13abd4bbb" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7c729-001e-00fa-13f0-12f991000000", - "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfail5f30071788c60aWed, 15 Apr 2020 06:35:58 GMT\"0x8D7E10741E8404A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:57 GMT", - "x-ms-client-request-id" : "79099d59-6a0b-444b-bf3e-764608893a68", + "x-ms-request-id" : "543c5386-301e-000a-570c-573535000000", + "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfaila1813848c2c6d0Fri, 10 Jul 2020 22:50:47 GMT\"0x8D82523AFC68EAF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:50:48 GMT", + "x-ms-client-request-id" : "d11f6d6f-1499-446e-8287-98c13abd4bbb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail5f30071788c60a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaila1813848c2c6d0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c6720344-0d23-4a04-9aa7-dd83367419b0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7feba97-acd9-4bbd-b619-85e68598b897" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d797168-f01e-00ab-55f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "c6720344-0d23-4a04-9aa7-dd83367419b0" + "x-ms-request-id" : "72ced645-301e-001a-720c-57f05d000000", + "Date" : "Fri, 10 Jul 2020 22:50:49 GMT", + "x-ms-client-request-id" : "d7feba97-acd9-4bbd-b619-85e68598b897" }, "Exception" : null } ], - "variables" : [ "jtccopydestacfail0blobapitestcopydestacfail5f30071788c60a", "javablobcopydestacfail1blobapitestcopydestacfail5f394083c50", "javablobcopydestacfail2blobapitestcopydestacfail5f38795448e" ] + "variables" : [ "jtccopydestacfail0blobapitestcopydestacfaila1813848c2c6d0", "javablobcopydestacfail1blobapitestcopydestacfaila18583583b4", "javablobcopydestacfail2blobapitestcopydestacfaila1812623d0b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[3].json index 89a6195cbd56..776a99b4861a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[3].json @@ -1,126 +1,129 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailcff66597cfea0a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaild1770668eb62ec?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "86ddfb8b-cd42-4360-a6f9-040abb9c3d0a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c8add82-9107-4858-9bb4-0633ae8d6118" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10742191FF6", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "ETag" : "0x8D82523B110FD92", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "642987f9-601e-000f-3cf0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "86ddfb8b-cd42-4360-a6f9-040abb9c3d0a" + "x-ms-request-id" : "2f11f941-001e-003e-0e0c-5706fd000000", + "Date" : "Fri, 10 Jul 2020 22:50:49 GMT", + "x-ms-client-request-id" : "9c8add82-9107-4858-9bb4-0633ae8d6118" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailcff66597cfea0a/javablobcopydestacfail1blobapitestcopydestacfailcff890170a5", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaild1770668eb62ec/javablobcopydestacfail1blobapitestcopydestacfaild1781342926", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "296938c8-ef23-4f62-8c02-b2066bb97c09", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bcefcb2-8302-4a5d-8c35-c5ee06af2f5f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "x-ms-version-id" : "2020-07-10T22:50:50.1077823Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:50 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:49 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10742217EC7", + "ETag" : "0x8D82523B144B33F", "Content-Length" : "0", - "x-ms-request-id" : "bde7c785-001e-00fa-68f0-12f991000000", - "x-ms-client-request-id" : "296938c8-ef23-4f62-8c02-b2066bb97c09" + "x-ms-request-id" : "e79efbcc-601e-0075-2a0c-57faae000000", + "x-ms-client-request-id" : "7bcefcb2-8302-4a5d-8c35-c5ee06af2f5f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailcff66597cfea0a/javablobcopydestacfail2blobapitestcopydestacfailcff662841c1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaild1770668eb62ec/javablobcopydestacfail2blobapitestcopydestacfaild17513259ca", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7313f6b7-08b0-4115-b7fb-75bba73b7ec9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd908925-d0da-4fbc-a295-0a2299e9b466", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "x-ms-version-id" : "2020-07-10T22:50:50.4890533Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:50 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107422DDDC9", + "ETag" : "0x8D82523B17EB999", "Content-Length" : "0", - "x-ms-request-id" : "5d7971b8-f01e-00ab-1bf0-12e764000000", - "x-ms-client-request-id" : "7313f6b7-08b0-4115-b7fb-75bba73b7ec9" + "x-ms-request-id" : "01ab2083-401e-0086-750c-575d3b000000", + "x-ms-client-request-id" : "bd908925-d0da-4fbc-a295-0a2299e9b466" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailcff66597cfea0a/javablobcopydestacfail2blobapitestcopydestacfailcff662841c1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaild1770668eb62ec/javablobcopydestacfail2blobapitestcopydestacfaild17513259ca", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "75dc782b-1088-49be-8ffd-d42b778e67d2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92010919-994c-4492-b5d1-649a2118da5a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:58 GMT", + "x-ms-version-id" : "2020-07-10T22:50:50.4890533Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:50 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:50 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E107422DDDC9", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:58 GMT", + "ETag" : "0x8D82523B17EB999", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:50:50 GMT", "Content-Length" : "7", - "x-ms-request-id" : "64298828-601e-000f-65f0-12dd80000000", - "x-ms-client-request-id" : "75dc782b-1088-49be-8ffd-d42b778e67d2", + "x-ms-request-id" : "4c50a518-701e-0046-510c-57a505000000", + "x-ms-client-request-id" : "92010919-994c-4492-b5d1-649a2118da5a", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailcff66597cfea0a/javablobcopydestacfail2blobapitestcopydestacfailcff662841c1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaild1770668eb62ec/javablobcopydestacfail2blobapitestcopydestacfaild17513259ca", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c34befae-4b9f-448e-99b6-21796fff570f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f28cda22-fcc2-4ee7-a769-ec26b967e211" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "CannotVerifyCopySource", "retry-after" : "0", "Content-Length" : "229", "StatusCode" : "404", - "x-ms-request-id" : "bde7c7cf-001e-00fa-2af0-12f991000000", - "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:bde7c7cf-001e-00fa-2af0-12f991000000\nTime:2020-04-15T06:35:58.8507356Z", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "c34befae-4b9f-448e-99b6-21796fff570f", + "x-ms-request-id" : "31d3e0b9-501e-007e-330c-5701c5000000", + "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:31d3e0b9-501e-007e-330c-5701c5000000\nTime:2020-07-10T22:50:51.3131816Z", + "Date" : "Fri, 10 Jul 2020 22:50:50 GMT", + "x-ms-client-request-id" : "f28cda22-fcc2-4ee7-a769-ec26b967e211", "Content-Type" : "application/xml" }, "Exception" : null @@ -128,43 +131,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d881277f-26e0-4c40-87ba-9035ea1598e3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d6c62912-c0c3-4f5b-a54b-4f9fe4fd4c38" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d797205-f01e-00ab-62f0-12e764000000", - "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfailcff66597cfea0aWed, 15 Apr 2020 06:35:58 GMT\"0x8D7E10742191FF6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "d881277f-26e0-4c40-87ba-9035ea1598e3", + "x-ms-request-id" : "1fcc91ec-201e-0029-010c-57aff6000000", + "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfaild1770668eb62ecFri, 10 Jul 2020 22:50:49 GMT\"0x8D82523B110FD92\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:50:51 GMT", + "x-ms-client-request-id" : "d6c62912-c0c3-4f5b-a54b-4f9fe4fd4c38", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfailcff66597cfea0a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaild1770668eb62ec?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4dd30e31-c05d-461d-8ea7-21969ccbda02" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d550c651-c16a-4036-b07f-c913395b4110" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64298849-601e-000f-04f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "4dd30e31-c05d-461d-8ea7-21969ccbda02" + "x-ms-request-id" : "cc4417d5-401e-004d-0f0c-575e6e000000", + "Date" : "Fri, 10 Jul 2020 22:50:51 GMT", + "x-ms-client-request-id" : "d550c651-c16a-4036-b07f-c913395b4110" }, "Exception" : null } ], - "variables" : [ "jtccopydestacfail0blobapitestcopydestacfailcff66597cfea0a", "javablobcopydestacfail1blobapitestcopydestacfailcff890170a5", "javablobcopydestacfail2blobapitestcopydestacfailcff662841c1" ] + "variables" : [ "jtccopydestacfail0blobapitestcopydestacfaild1770668eb62ec", "javablobcopydestacfail1blobapitestcopydestacfaild1781342926", "javablobcopydestacfail2blobapitestcopydestacfaild17513259ca" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[4].json index d01d7465b973..8285981a9483 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[4].json @@ -1,116 +1,118 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildba738048db059?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail047381015d7ef5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "db781e9f-ba95-487f-b77d-7f036e79ed5a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cbb9e0bc-d509-4baa-9531-0c46c86a10cb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1074256539C", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:59 GMT", + "ETag" : "0x8D82523B2BA7B73", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:52 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7c859-001e-00fa-25f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "db781e9f-ba95-487f-b77d-7f036e79ed5a" + "x-ms-request-id" : "50192cd3-e01e-0036-800c-571cf2000000", + "Date" : "Fri, 10 Jul 2020 22:50:52 GMT", + "x-ms-client-request-id" : "cbb9e0bc-d509-4baa-9531-0c46c86a10cb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildba738048db059/javablobcopydestacfail1blobapitestcopydestacfaildba5210460a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail047381015d7ef5/javablobcopydestacfail1blobapitestcopydestacfail04739898fe9", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "79e14201-d5f5-49fc-b3d0-c33000b034dd", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f565b89-df60-43d9-a02c-83c7c13f0c16", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:59 GMT", + "x-ms-version-id" : "2020-07-10T22:50:52.8907647Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:52 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:52 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107425E482E", + "ETag" : "0x8D82523B2ED597F", "Content-Length" : "0", - "x-ms-request-id" : "5d79724b-f01e-00ab-1ff0-12e764000000", - "x-ms-client-request-id" : "79e14201-d5f5-49fc-b3d0-c33000b034dd" + "x-ms-request-id" : "3c56239d-401e-0096-5e0c-579853000000", + "x-ms-client-request-id" : "4f565b89-df60-43d9-a02c-83c7c13f0c16" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildba738048db059/javablobcopydestacfail2blobapitestcopydestacfaildba37886ee2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail047381015d7ef5/javablobcopydestacfail2blobapitestcopydestacfail04774417673", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e1778983-90c4-4755-8eff-9ac4011338d1", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ddcf76d2-ab8b-495f-a2a2-5261a642be06", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:59 GMT", + "x-ms-version-id" : "2020-07-10T22:50:53.3010571Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:53 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:59 GMT", + "Date" : "Fri, 10 Jul 2020 22:50:52 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1074266606B", + "ETag" : "0x8D82523B32BF48B", "Content-Length" : "0", - "x-ms-request-id" : "6429888e-601e-000f-3ef0-12dd80000000", - "x-ms-client-request-id" : "e1778983-90c4-4755-8eff-9ac4011338d1" + "x-ms-request-id" : "b25beebc-e01e-0019-140c-571139000000", + "x-ms-client-request-id" : "ddcf76d2-ab8b-495f-a2a2-5261a642be06" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildba738048db059/javablobcopydestacfail2blobapitestcopydestacfaildba37886ee2?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail047381015d7ef5/javablobcopydestacfail2blobapitestcopydestacfail04774417673?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b4d39220-de0d-41bf-8d12-9caa79c65057" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2fdbc63d-5065-427a-8d80-4fd988defa61" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1074266606B", - "x-ms-lease-id" : "ac3b0c45-5107-4bc0-a0d2-8acde32028e3", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:59 GMT", + "ETag" : "0x8D82523B32BF48B", + "x-ms-lease-id" : "de3e9253-3052-4ba7-aeb6-7632064790b7", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:53 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7c8d6-001e-00fa-14f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "b4d39220-de0d-41bf-8d12-9caa79c65057" + "x-ms-request-id" : "36f6fbeb-f01e-0015-420c-578631000000", + "Date" : "Fri, 10 Jul 2020 22:50:52 GMT", + "x-ms-client-request-id" : "2fdbc63d-5065-427a-8d80-4fd988defa61" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildba738048db059/javablobcopydestacfail2blobapitestcopydestacfaildba37886ee2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail047381015d7ef5/javablobcopydestacfail2blobapitestcopydestacfail04774417673", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fcda4618-61ac-4f27-9091-3e58cb80bbe5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cea46985-b894-4cfd-bbcd-a76d87f73218" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "CannotVerifyCopySource", "retry-after" : "0", "Content-Length" : "229", "StatusCode" : "404", - "x-ms-request-id" : "5d7972ad-f01e-00ab-75f0-12e764000000", - "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:5d7972ad-f01e-00ab-75f0-12e764000000\nTime:2020-04-15T06:35:59.2828230Z", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "fcda4618-61ac-4f27-9091-3e58cb80bbe5", + "x-ms-request-id" : "06577236-301e-0025-180c-5738fe000000", + "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:06577236-301e-0025-180c-5738fe000000\nTime:2020-07-10T22:50:54.0972357Z", + "Date" : "Fri, 10 Jul 2020 22:50:54 GMT", + "x-ms-client-request-id" : "cea46985-b894-4cfd-bbcd-a76d87f73218", "Content-Type" : "application/xml" }, "Exception" : null @@ -118,43 +120,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0e965cba-2a8f-4950-a5e2-5cac19afed49" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0430be2f-0113-4978-8f23-e5cae129dc35" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "642988d6-601e-000f-7af0-12dd80000000", - "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfaildba738048db059Wed, 15 Apr 2020 06:35:59 GMT\"0x8D7E1074256539C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:59 GMT", - "x-ms-client-request-id" : "0e965cba-2a8f-4950-a5e2-5cac19afed49", + "x-ms-request-id" : "f5e06946-501e-009a-0c0c-570f5b000000", + "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfail047381015d7ef5Fri, 10 Jul 2020 22:50:52 GMT\"0x8D82523B2BA7B73\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:50:54 GMT", + "x-ms-client-request-id" : "0430be2f-0113-4978-8f23-e5cae129dc35", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildba738048db059?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfail047381015d7ef5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d4ef96bf-6a42-471d-86ea-c81339038d19" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a636de27-51aa-4503-91b8-1c596b42c53c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde7c95d-001e-00fa-11f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:58 GMT", - "x-ms-client-request-id" : "d4ef96bf-6a42-471d-86ea-c81339038d19" + "x-ms-request-id" : "b1b64324-101e-0032-230c-5791f5000000", + "Date" : "Fri, 10 Jul 2020 22:50:54 GMT", + "x-ms-client-request-id" : "a636de27-51aa-4503-91b8-1c596b42c53c" }, "Exception" : null } ], - "variables" : [ "jtccopydestacfail0blobapitestcopydestacfaildba738048db059", "javablobcopydestacfail1blobapitestcopydestacfaildba5210460a", "javablobcopydestacfail2blobapitestcopydestacfaildba37886ee2" ] + "variables" : [ "jtccopydestacfail0blobapitestcopydestacfail047381015d7ef5", "javablobcopydestacfail1blobapitestcopydestacfail04739898fe9", "javablobcopydestacfail2blobapitestcopydestacfail04774417673" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[5].json new file mode 100644 index 000000000000..8366faae914c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopydestacfail[5].json @@ -0,0 +1,139 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildbc823532227d1?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3843c75-1edd-4f34-829a-ec046487ecaa" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82523B4782C62", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:55 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "02c92f80-601e-0091-0d0c-57f430000000", + "Date" : "Fri, 10 Jul 2020 22:50:54 GMT", + "x-ms-client-request-id" : "a3843c75-1edd-4f34-829a-ec046487ecaa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildbc823532227d1/javablobcopydestacfail1blobapitestcopydestacfaildbc19026aa4", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3800ed2d-861e-4bfe-b49e-93790e0842d8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:50:55.8288589Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:55 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:50:54 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82523B4ADAACD", + "Content-Length" : "0", + "x-ms-request-id" : "41d2c201-001e-0001-210c-57ce5e000000", + "x-ms-client-request-id" : "3800ed2d-861e-4bfe-b49e-93790e0842d8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildbc823532227d1/javablobcopydestacfail2blobapitestcopydestacfaildbc860764fe", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4631f2b-378c-4c39-9006-35556b318e0f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:50:56.1771084Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:50:56 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:50:56 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82523B4E2A729", + "Content-Length" : "0", + "x-ms-request-id" : "69eac287-d01e-0060-030c-57ed1d000000", + "x-ms-client-request-id" : "b4631f2b-378c-4c39-9006-35556b318e0f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildbc823532227d1/javablobcopydestacfail2blobapitestcopydestacfaildbc860764fe", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "36c75b75-f957-4082-a681-e38fb5dd6870" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "CannotVerifyCopySource", + "retry-after" : "0", + "Content-Length" : "229", + "StatusCode" : "404", + "x-ms-request-id" : "9deb2478-401e-005d-170c-579b06000000", + "Body" : "CannotVerifyCopySourceThe specified resource does not exist.\nRequestId:9deb2478-401e-005d-170c-579b06000000\nTime:2020-07-10T22:50:56.5717189Z", + "Date" : "Fri, 10 Jul 2020 22:50:56 GMT", + "x-ms-client-request-id" : "36c75b75-f957-4082-a681-e38fb5dd6870", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopydestacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e88a187-bbc2-4077-948c-7be766cfe599" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "78cb1656-901e-0095-2c0c-577937000000", + "Body" : "jtccopydestacfailjtccopydestacfail0blobapitestcopydestacfaildbc823532227d1Fri, 10 Jul 2020 22:50:55 GMT\"0x8D82523B4782C62\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:50:56 GMT", + "x-ms-client-request-id" : "2e88a187-bbc2-4077-948c-7be766cfe599", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopydestacfail0blobapitestcopydestacfaildbc823532227d1?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e003b9e-c298-4b0b-8801-d4279a765a01" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a1c4b343-d01e-002d-2d0c-5722f1000000", + "Date" : "Fri, 10 Jul 2020 22:50:57 GMT", + "x-ms-client-request-id" : "9e003b9e-c298-4b0b-8801-d4279a765a01" + }, + "Exception" : null + } ], + "variables" : [ "jtccopydestacfail0blobapitestcopydestacfaildbc823532227d1", "javablobcopydestacfail1blobapitestcopydestacfaildbc19026aa4", "javablobcopydestacfail2blobapitestcopydestacfaildbc860764fe" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[0].json new file mode 100644 index 000000000000..ef4321f0a4a7 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[0].json @@ -0,0 +1,234 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "18b2d563-2ca7-47b6-84fe-5c31cbd1c5e9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2D930DA69", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:17 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d19d54f1-e01e-00a0-09bb-5e1523000000", + "Date" : "Mon, 20 Jul 2020 17:32:16 GMT", + "x-ms-client-request-id" : "18b2d563-2ca7-47b6-84fe-5c31cbd1c5e9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2/javablobcopyseal1blobapitestcopysealb6d521550b0368437", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "402ec756-ce2f-4cd2-bea0-076b5296d25d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-20T17:32:17.8205988Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:17 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:17 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82CD2D9967613", + "Content-Length" : "0", + "x-ms-request-id" : "4d24e7b3-701e-00a2-76bb-5eab9b000000", + "x-ms-client-request-id" : "402ec756-ce2f-4cd2-bea0-076b5296d25d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2/javablobcopyseal2blobapitestcopysealb6d03075d36841cb8", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "383b371d-299f-4b25-9056-8d205a5b5af6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2D9E4A449", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:18 GMT", + "x-ms-version-id" : "2020-07-20T17:32:18.3319625Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "719ab120-101e-00a4-58bb-5e9824000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:17 GMT", + "x-ms-client-request-id" : "383b371d-299f-4b25-9056-8d205a5b5af6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2/javablobcopyseal2blobapitestcopysealb6d03075d36841cb8?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f46cd9ab-0e4f-46f4-a83f-3620490c45e4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2DA4CC7D7", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:19 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1ee1d4e0-c01e-00a7-5bbb-5e7940000000", + "Date" : "Mon, 20 Jul 2020 17:32:18 GMT", + "x-ms-client-request-id" : "f46cd9ab-0e4f-46f4-a83f-3620490c45e4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2/javablobcopyseal3blobapitestcopysealb6d0422104bec9374", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c26929af-f596-485b-90cd-a6e2b91a0e19" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "ec755232-d8cd-47c5-8d09-0e12941aebea", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:19 GMT", + "x-ms-version-id" : "2020-07-20T17:32:19.6879245Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Mon, 20 Jul 2020 17:32:19 GMT", + "ETag" : "0x8D82CD2DAB36474", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "x-ms-request-id" : "66b09e71-301e-009c-12bb-5e3ce4000000", + "x-ms-client-request-id" : "c26929af-f596-485b-90cd-a6e2b91a0e19" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2/javablobcopyseal3blobapitestcopysealb6d0422104bec9374", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "85cf3ac6-fcdc-47bc-b7b4-9e0e170d1b35" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-sealed" : "true", + "x-ms-version-id" : "2020-07-20T17:32:19.6879245Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:19 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "AppendBlob", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:32:19 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "0f621448-201e-0074-22bb-5ea572000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "ec755232-d8cd-47c5-8d09-0e12941aebea", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2/javablobcopyseal2blobapitestcopysealb6d03075d36841cb8", + "x-ms-copy-progress" : "0/0", + "x-ms-blob-committed-block-count" : "0", + "Date" : "Mon, 20 Jul 2020 17:32:20 GMT", + "x-ms-copy-completion-time" : "Mon, 20 Jul 2020 17:32:19 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD2DAB36474", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "85cf3ac6-fcdc-47bc-b7b4-9e0e170d1b35" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2/javablobcopyseal3blobapitestcopysealb6d0422104bec9374", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "14138a86-a1e4-4a8e-be1a-01dd627dc191" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-sealed" : "true", + "x-ms-version-id" : "2020-07-20T17:32:19.6879245Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:19 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "AppendBlob", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:32:19 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "cdce81e8-001e-004c-07bb-5e01b2000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "ec755232-d8cd-47c5-8d09-0e12941aebea", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2/javablobcopyseal2blobapitestcopysealb6d03075d36841cb8", + "x-ms-copy-progress" : "0/0", + "x-ms-blob-committed-block-count" : "0", + "Date" : "Mon, 20 Jul 2020 17:32:20 GMT", + "x-ms-copy-completion-time" : "Mon, 20 Jul 2020 17:32:19 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD2DAB36474", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "14138a86-a1e4-4a8e-be1a-01dd627dc191" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopyseal&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a2c8f2e-4fbc-42f8-89ef-1c5aba8fb170" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b8bebe84-901e-0061-29bb-5eb2c1000000", + "Body" : "jtccopysealjtccopyseal0blobapitestcopysealb6d649697f5e37266ef2Mon, 20 Jul 2020 17:32:17 GMT\"0x8D82CD2D930DA69\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:32:21 GMT", + "x-ms-client-request-id" : "7a2c8f2e-4fbc-42f8-89ef-1c5aba8fb170", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "057ca2aa-1744-41bf-8e12-49f19497c287" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "176f4131-c01e-0031-4ebb-5e7091000000", + "Date" : "Mon, 20 Jul 2020 17:32:21 GMT", + "x-ms-client-request-id" : "057ca2aa-1744-41bf-8e12-49f19497c287" + }, + "Exception" : null + } ], + "variables" : [ "jtccopyseal0blobapitestcopysealb6d649697f5e37266ef2", "javablobcopyseal1blobapitestcopysealb6d521550b0368437", "javablobcopyseal2blobapitestcopysealb6d03075d36841cb8", "javablobcopyseal3blobapitestcopysealb6d0422104bec9374" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[1].json new file mode 100644 index 000000000000..ba5f60f51563 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[1].json @@ -0,0 +1,232 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "475aace7-d237-4f80-ad5d-d6d9c3c7917d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2DC90B126", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a0117d94-b01e-0059-25bb-5e1601000000", + "Date" : "Mon, 20 Jul 2020 17:32:22 GMT", + "x-ms-client-request-id" : "475aace7-d237-4f80-ad5d-d6d9c3c7917d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d/javablobcopyseal1blobapitestcopyseal5dc71586fc3c8180c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "707c26db-5a00-4d8d-a257-9a622e21add0", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-20T17:32:23.2854720Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:23 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:22 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82CD2DCD87CC0", + "Content-Length" : "0", + "x-ms-request-id" : "a0edb6b1-a01e-0045-79bb-5e4461000000", + "x-ms-client-request-id" : "707c26db-5a00-4d8d-a257-9a622e21add0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d/javablobcopyseal2blobapitestcopyseal5dc159002239296cc", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5834e10-1be5-460b-8085-f1c5ac82a3e2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2DD0BCB0C", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:23 GMT", + "x-ms-version-id" : "2020-07-20T17:32:23.6217100Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3eadb357-b01e-0082-53bb-5ed03c000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:22 GMT", + "x-ms-client-request-id" : "d5834e10-1be5-460b-8085-f1c5ac82a3e2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d/javablobcopyseal2blobapitestcopyseal5dc159002239296cc?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ea71502a-89f0-47be-96c5-d2e278eea748" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2DD3DE0AE", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e7165e01-701e-0046-5ebb-5ea505000000", + "Date" : "Mon, 20 Jul 2020 17:32:23 GMT", + "x-ms-client-request-id" : "ea71502a-89f0-47be-96c5-d2e278eea748" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d/javablobcopyseal3blobapitestcopyseal5dc493877d61e3614", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "93a67d7d-db36-4b92-975c-dc6c118a261e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "9ca7b48a-196d-4d01-a5ae-5b1df0dbb469", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:24 GMT", + "x-ms-version-id" : "2020-07-20T17:32:24.2861819Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Mon, 20 Jul 2020 17:32:23 GMT", + "ETag" : "0x8D82CD2DD7107EA", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "x-ms-request-id" : "5ade532d-301e-000a-5abb-5e3535000000", + "x-ms-client-request-id" : "93a67d7d-db36-4b92-975c-dc6c118a261e" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d/javablobcopyseal3blobapitestcopyseal5dc493877d61e3614", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd28cf1f-de05-485d-a9cd-0eaf95f07df3" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-20T17:32:24.2861819Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:24 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "AppendBlob", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:32:24 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "8712ff6d-101e-006f-40bb-5e9b71000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "9ca7b48a-196d-4d01-a5ae-5b1df0dbb469", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d/javablobcopyseal2blobapitestcopyseal5dc159002239296cc", + "x-ms-blob-committed-block-count" : "0", + "x-ms-copy-progress" : "0/0", + "Date" : "Mon, 20 Jul 2020 17:32:25 GMT", + "x-ms-copy-completion-time" : "Mon, 20 Jul 2020 17:32:24 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD2DD7107EA", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "fd28cf1f-de05-485d-a9cd-0eaf95f07df3" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d/javablobcopyseal3blobapitestcopyseal5dc493877d61e3614", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b810a5a-2191-42c9-9793-263b7e06a760" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-20T17:32:24.2861819Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:24 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "AppendBlob", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:32:24 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "ea3308bd-301e-0047-77bb-5efad9000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "9ca7b48a-196d-4d01-a5ae-5b1df0dbb469", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d/javablobcopyseal2blobapitestcopyseal5dc159002239296cc", + "x-ms-blob-committed-block-count" : "0", + "x-ms-copy-progress" : "0/0", + "Date" : "Mon, 20 Jul 2020 17:32:25 GMT", + "x-ms-copy-completion-time" : "Mon, 20 Jul 2020 17:32:24 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD2DD7107EA", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "4b810a5a-2191-42c9-9793-263b7e06a760" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopyseal&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5bea66b-2bd5-411c-a1f4-651a8766689a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1fe6743b-f01e-0083-4fbb-5e8fe0000000", + "Body" : "jtccopysealjtccopyseal0blobapitestcopyseal5dc943296e4250209a2dMon, 20 Jul 2020 17:32:22 GMT\"0x8D82CD2DC90B126\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:32:25 GMT", + "x-ms-client-request-id" : "b5bea66b-2bd5-411c-a1f4-651a8766689a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "45ee1880-e981-4923-9ebd-a000a431b8d3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "950241e0-001e-005c-41bb-5ec4da000000", + "Date" : "Mon, 20 Jul 2020 17:32:26 GMT", + "x-ms-client-request-id" : "45ee1880-e981-4923-9ebd-a000a431b8d3" + }, + "Exception" : null + } ], + "variables" : [ "jtccopyseal0blobapitestcopyseal5dc943296e4250209a2d", "javablobcopyseal1blobapitestcopyseal5dc71586fc3c8180c", "javablobcopyseal2blobapitestcopyseal5dc159002239296cc", "javablobcopyseal3blobapitestcopyseal5dc493877d61e3614" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[2].json new file mode 100644 index 000000000000..5d73e6ad539a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[2].json @@ -0,0 +1,212 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1ee6e81-171d-4b62-9ba0-4fc8b28be9de" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2DF1647D8", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "25f2e929-d01e-0070-08bb-5e2875000000", + "Date" : "Mon, 20 Jul 2020 17:32:26 GMT", + "x-ms-client-request-id" : "b1ee6e81-171d-4b62-9ba0-4fc8b28be9de" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6/javablobcopyseal1blobapitestcopyseal0410001793751286a", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c511c36b-34b5-4bad-a838-f9b70849e517", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-20T17:32:27.6165433Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:27 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:26 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82CD2DF6D3420", + "Content-Length" : "0", + "x-ms-request-id" : "51782567-801e-0020-80bb-5eea25000000", + "x-ms-client-request-id" : "c511c36b-34b5-4bad-a838-f9b70849e517" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6/javablobcopyseal2blobapitestcopyseal04120361f7ac837eb", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f276d20d-3dec-47a1-a694-787afa836738" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2DFA145F0", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:27 GMT", + "x-ms-version-id" : "2020-07-20T17:32:27.9577861Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f6318a3a-701e-0034-66bb-5ea24a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:27 GMT", + "x-ms-client-request-id" : "f276d20d-3dec-47a1-a694-787afa836738" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6/javablobcopyseal3blobapitestcopyseal0414337142d57a6b0", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a9bedf0-fb10-4772-ad35-6a8061b4bb15" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "9b574d4a-02b7-4c07-a610-01b12812fa2c", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:28 GMT", + "x-ms-version-id" : "2020-07-20T17:32:28.2840176Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Mon, 20 Jul 2020 17:32:28 GMT", + "ETag" : "0x8D82CD2DFD33470", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "x-ms-request-id" : "999d2552-b01e-0049-59bb-5ed369000000", + "x-ms-client-request-id" : "7a9bedf0-fb10-4772-ad35-6a8061b4bb15" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6/javablobcopyseal3blobapitestcopyseal0414337142d57a6b0", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c62c9db1-6828-4edd-a818-e3631b67f021" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-sealed" : "true", + "x-ms-version-id" : "2020-07-20T17:32:28.2840176Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:28 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "AppendBlob", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:32:28 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "4c013185-801e-0099-39bb-5eee3f000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "9b574d4a-02b7-4c07-a610-01b12812fa2c", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6/javablobcopyseal2blobapitestcopyseal04120361f7ac837eb", + "x-ms-copy-progress" : "0/0", + "x-ms-blob-committed-block-count" : "0", + "Date" : "Mon, 20 Jul 2020 17:32:29 GMT", + "x-ms-copy-completion-time" : "Mon, 20 Jul 2020 17:32:28 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD2DFD33470", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "c62c9db1-6828-4edd-a818-e3631b67f021" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6/javablobcopyseal3blobapitestcopyseal0414337142d57a6b0", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0eea184-26c4-42ef-8f8a-aec1cd74df99" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-blob-sealed" : "true", + "x-ms-version-id" : "2020-07-20T17:32:28.2840176Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:28 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "AppendBlob", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:32:28 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "e199fa90-101e-000d-0ebb-5e5956000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "9b574d4a-02b7-4c07-a610-01b12812fa2c", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6/javablobcopyseal2blobapitestcopyseal04120361f7ac837eb", + "x-ms-copy-progress" : "0/0", + "x-ms-blob-committed-block-count" : "0", + "Date" : "Mon, 20 Jul 2020 17:32:29 GMT", + "x-ms-copy-completion-time" : "Mon, 20 Jul 2020 17:32:28 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD2DFD33470", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "b0eea184-26c4-42ef-8f8a-aec1cd74df99" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopyseal&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "84137fc1-a791-4c18-b22b-21ad055500f8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "391e24c2-401e-005d-80bb-5e9b06000000", + "Body" : "jtccopysealjtccopyseal0blobapitestcopyseal041582573e10338ff1f6Mon, 20 Jul 2020 17:32:27 GMT\"0x8D82CD2DF1647D8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:32:30 GMT", + "x-ms-client-request-id" : "84137fc1-a791-4c18-b22b-21ad055500f8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal041582573e10338ff1f6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8edcfca6-8c93-411e-b0c3-88cd934d5009" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "bafcdada-501e-009a-69bb-5e0f5b000000", + "Date" : "Mon, 20 Jul 2020 17:32:29 GMT", + "x-ms-client-request-id" : "8edcfca6-8c93-411e-b0c3-88cd934d5009" + }, + "Exception" : null + } ], + "variables" : [ "jtccopyseal0blobapitestcopyseal041582573e10338ff1f6", "javablobcopyseal1blobapitestcopyseal0410001793751286a", "javablobcopyseal2blobapitestcopyseal04120361f7ac837eb", "javablobcopyseal3blobapitestcopyseal0414337142d57a6b0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[3].json new file mode 100644 index 000000000000..8b488668dbea --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestcopyseal[3].json @@ -0,0 +1,210 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "76b44b6c-d5e5-4d56-bb24-79101301c215" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2E16486CC", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e74342d6-e01e-0036-23bb-5e1cf2000000", + "Date" : "Mon, 20 Jul 2020 17:32:30 GMT", + "x-ms-client-request-id" : "76b44b6c-d5e5-4d56-bb24-79101301c215" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138/javablobcopyseal1blobapitestcopyseal472275081c6184c76", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ac2b16d-42a0-4ea1-90bb-59a29d2e5cce", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-20T17:32:31.3241723Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:31 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:31 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82CD2E1A3187B", + "Content-Length" : "0", + "x-ms-request-id" : "fe1f3fcd-401e-0072-1bbb-5e96cd000000", + "x-ms-client-request-id" : "6ac2b16d-42a0-4ea1-90bb-59a29d2e5cce" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138/javablobcopyseal2blobapitestcopyseal47279881d1fa29bbe", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f86938d-8bee-4229-a8f0-ebffa25226e4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2E1D491BC", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:31 GMT", + "x-ms-version-id" : "2020-07-20T17:32:31.6484028Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fcca5096-201e-004b-63bb-5e6dd1000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:31 GMT", + "x-ms-client-request-id" : "4f86938d-8bee-4229-a8f0-ebffa25226e4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138/javablobcopyseal3blobapitestcopyseal47210074556654652", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "84fe03d7-ba0c-44d3-9f54-ca5386097d53" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "a1b62cee-338b-4a0e-8ef0-30d7ff3ebda0", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:31 GMT", + "x-ms-version-id" : "2020-07-20T17:32:31.9736346Z", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Mon, 20 Jul 2020 17:32:31 GMT", + "ETag" : "0x8D82CD2E2060AFC", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "x-ms-request-id" : "1cd147a7-a01e-0037-17bb-5e432e000000", + "x-ms-client-request-id" : "84fe03d7-ba0c-44d3-9f54-ca5386097d53" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138/javablobcopyseal3blobapitestcopyseal47210074556654652", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61ca5736-c807-4693-a2ec-887c0393a961" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-20T17:32:31.9736346Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "AppendBlob", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:32:31 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "bc598897-801e-000f-3fbb-5ee7ee000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "a1b62cee-338b-4a0e-8ef0-30d7ff3ebda0", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138/javablobcopyseal2blobapitestcopyseal47279881d1fa29bbe", + "x-ms-blob-committed-block-count" : "0", + "x-ms-copy-progress" : "0/0", + "Date" : "Mon, 20 Jul 2020 17:32:32 GMT", + "x-ms-copy-completion-time" : "Mon, 20 Jul 2020 17:32:31 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD2E2060AFC", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "61ca5736-c807-4693-a2ec-887c0393a961" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138/javablobcopyseal3blobapitestcopyseal47210074556654652", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d13f3f4c-59e9-403c-bc1d-4ba2983874ad" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-20T17:32:31.9736346Z", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "AppendBlob", + "x-ms-creation-time" : "Mon, 20 Jul 2020 17:32:31 GMT", + "Content-Length" : "0", + "x-ms-request-id" : "d19d8969-e01e-00a0-19bb-5e1523000000", + "Content-Type" : "application/octet-stream", + "x-ms-version" : "2019-12-12", + "x-ms-copy-id" : "a1b62cee-338b-4a0e-8ef0-30d7ff3ebda0", + "x-ms-copy-source" : "https://seanmccprodca.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138/javablobcopyseal2blobapitestcopyseal47279881d1fa29bbe", + "x-ms-blob-committed-block-count" : "0", + "x-ms-copy-progress" : "0/0", + "Date" : "Mon, 20 Jul 2020 17:32:33 GMT", + "x-ms-copy-completion-time" : "Mon, 20 Jul 2020 17:32:31 GMT", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D82CD2E2060AFC", + "x-ms-copy-status" : "success", + "x-ms-client-request-id" : "d13f3f4c-59e9-403c-bc1d-4ba2983874ad" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccopyseal&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "218b654f-3dea-49e0-8814-1706aee0dc58" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4d251d8e-701e-00a2-6abb-5eab9b000000", + "Body" : "jtccopysealjtccopyseal0blobapitestcopyseal472457975a82e6cda138Mon, 20 Jul 2020 17:32:30 GMT\"0x8D82CD2E16486CC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:32:33 GMT", + "x-ms-client-request-id" : "218b654f-3dea-49e0-8814-1706aee0dc58", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccopyseal0blobapitestcopyseal472457975a82e6cda138?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "165a60b5-43d9-4cb7-bab4-77884a496259" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "719ac93a-101e-00a4-30bb-5e9824000000", + "Date" : "Mon, 20 Jul 2020 17:32:33 GMT", + "x-ms-client-request-id" : "165a60b5-43d9-4cb7-bab4-77884a496259" + }, + "Exception" : null + } ], + "variables" : [ "jtccopyseal0blobapitestcopyseal472457975a82e6cda138", "javablobcopyseal1blobapitestcopyseal472275081c6184c76", "javablobcopyseal2blobapitestcopyseal47279881d1fa29bbe", "javablobcopyseal3blobapitestcopyseal47210074556654652" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[0].json index d3de9f4ac14a..ad5c738ccee0 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[0].json @@ -1,111 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3f2985472ec80319b722?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacad885646beefe11f2c48?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "21f1d3ac-eb55-4547-9d14-ab13798d955d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69ede1e7-fb98-4fd4-b5a6-5fa47fbb0b25" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075B41220E", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:40 GMT", + "ETag" : "0x8D8252334659055", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79bf83-f01e-00ab-69f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", - "x-ms-client-request-id" : "21f1d3ac-eb55-4547-9d14-ab13798d955d" + "x-ms-request-id" : "36f5b341-f01e-0015-570c-578631000000", + "Date" : "Fri, 10 Jul 2020 22:47:19 GMT", + "x-ms-client-request-id" : "69ede1e7-fb98-4fd4-b5a6-5fa47fbb0b25" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3f2985472ec80319b722/javablobdeleteac1blobapitestdeleteac3f241639cc4026a5b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacad885646beefe11f2c48/javablobdeleteac1blobapitestdeleteacad8529508d4c7931f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2a4070d3-e971-4d7d-8a35-8cc9a8df08b5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "26343a92-5e0a-452a-bf8e-6befdb48f9aa", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:40 GMT", + "x-ms-version-id" : "2020-07-10T22:47:21.4500935Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:21 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", + "Date" : "Fri, 10 Jul 2020 22:47:21 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075B4960F9", + "ETag" : "0x8D8252334E61047", "Content-Length" : "0", - "x-ms-request-id" : "6429bd8f-601e-000f-0df0-12dd80000000", - "x-ms-client-request-id" : "2a4070d3-e971-4d7d-8a35-8cc9a8df08b5" + "x-ms-request-id" : "11844d15-e01e-009f-4a0c-57dd80000000", + "x-ms-client-request-id" : "26343a92-5e0a-452a-bf8e-6befdb48f9aa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacad885646beefe11f2c48/javablobdeleteac1blobapitestdeleteacad8529508d4c7931f?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "421c0e65-ec62-4742-9fab-3d376e33c519", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "25d709a1-201e-0039-150c-576a9e000000", + "Date" : "Fri, 10 Jul 2020 22:47:21 GMT", + "x-ms-client-request-id" : "421c0e65-ec62-4742-9fab-3d376e33c519" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3f2985472ec80319b722/javablobdeleteac1blobapitestdeleteac3f241639cc4026a5b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacad885646beefe11f2c48/javablobdeleteac1blobapitestdeleteacad8529508d4c7931f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7e8675ad-464e-41de-ac23-6bd612a2efec" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "34daa684-8f3d-4b6b-b836-b2e010f0e42a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-delete-type-permanent" : "true", + "x-ms-delete-type-permanent" : "false", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde82dc7-001e-00fa-49f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", - "x-ms-client-request-id" : "7e8675ad-464e-41de-ac23-6bd612a2efec" + "x-ms-request-id" : "0764bcd0-701e-00a2-200c-57ab9b000000", + "Date" : "Fri, 10 Jul 2020 22:47:21 GMT", + "x-ms-client-request-id" : "34daa684-8f3d-4b6b-b836-b2e010f0e42a" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9d7b34b7-2048-4596-bedb-c745ded6da57" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc664ce0-532c-4a83-895d-f6b08d9b7632" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79bfb8-f01e-00ab-19f0-12e764000000", - "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac3f2985472ec80319b722Wed, 15 Apr 2020 06:36:40 GMT\"0x8D7E1075B41220E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", - "x-ms-client-request-id" : "9d7b34b7-2048-4596-bedb-c745ded6da57", + "x-ms-request-id" : "50188bac-e01e-0036-120c-571cf2000000", + "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteacad885646beefe11f2c48Fri, 10 Jul 2020 22:47:20 GMT\"0x8D8252334659055\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:47:22 GMT", + "x-ms-client-request-id" : "cc664ce0-532c-4a83-895d-f6b08d9b7632", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3f2985472ec80319b722?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacad885646beefe11f2c48?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "93680c85-6ba4-4388-b872-92e1580f4f53" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad592d1d-2e65-416a-a45f-e749309c909a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429bdb9-601e-000f-31f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", - "x-ms-client-request-id" : "93680c85-6ba4-4388-b872-92e1580f4f53" + "x-ms-request-id" : "880b89ef-d01e-0084-130c-57e383000000", + "Date" : "Fri, 10 Jul 2020 22:47:22 GMT", + "x-ms-client-request-id" : "ad592d1d-2e65-416a-a45f-e749309c909a" }, "Exception" : null } ], - "variables" : [ "jtcdeleteac0blobapitestdeleteac3f2985472ec80319b722", "javablobdeleteac1blobapitestdeleteac3f241639cc4026a5b" ] + "variables" : [ "jtcdeleteac0blobapitestdeleteacad885646beefe11f2c48", "javablobdeleteac1blobapitestdeleteacad8529508d4c7931f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[1].json index efe581fb9688..e4ac60098cb7 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[1].json @@ -1,111 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac826242158a805c8b5f17?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac46717060ac9db589f248?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4f4b0e1c-232e-4565-a2fc-01111d51e497" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "abb5ddc5-fe01-4e0c-92e1-2ab3fb72b362" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075B713F6E", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:41 GMT", + "ETag" : "0x8D82523364A7410", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde82e50-001e-00fa-43f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", - "x-ms-client-request-id" : "4f4b0e1c-232e-4565-a2fc-01111d51e497" + "x-ms-request-id" : "0e732cdb-601e-005a-0a0c-57f765000000", + "Date" : "Fri, 10 Jul 2020 22:47:22 GMT", + "x-ms-client-request-id" : "abb5ddc5-fe01-4e0c-92e1-2ab3fb72b362" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac826242158a805c8b5f17/javablobdeleteac1blobapitestdeleteac82618007a4bf993da", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac46717060ac9db589f248/javablobdeleteac1blobapitestdeleteac4676159200167499f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5df2eeb1-766f-4ec0-adf4-c3e48fc0544d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfee5139-6bce-45c1-a8bf-a37d0653805c", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:41 GMT", + "x-ms-version-id" : "2020-07-10T22:47:24.1970512Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:24 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", + "Date" : "Fri, 10 Jul 2020 22:47:23 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075B7B5261", + "ETag" : "0x8D8252336893750", "Content-Length" : "0", - "x-ms-request-id" : "5d79c016-f01e-00ab-68f0-12e764000000", - "x-ms-client-request-id" : "5df2eeb1-766f-4ec0-adf4-c3e48fc0544d" + "x-ms-request-id" : "2647e0ed-a01e-0008-390c-578b8d000000", + "x-ms-client-request-id" : "dfee5139-6bce-45c1-a8bf-a37d0653805c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac46717060ac9db589f248/javablobdeleteac1blobapitestdeleteac4676159200167499f?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9bfd4330-cedd-479d-b113-8355833d9f1f", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "31d2ea29-501e-007e-630c-5701c5000000", + "Date" : "Fri, 10 Jul 2020 22:47:24 GMT", + "x-ms-client-request-id" : "9bfd4330-cedd-479d-b113-8355833d9f1f" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac826242158a805c8b5f17/javablobdeleteac1blobapitestdeleteac82618007a4bf993da", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac46717060ac9db589f248/javablobdeleteac1blobapitestdeleteac4676159200167499f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fb59ab24-b79c-4f8f-8f3a-5c3d65989ac6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5fc7d6a8-d357-4d86-8ec1-cd7477b1f7b4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-delete-type-permanent" : "true", + "x-ms-delete-type-permanent" : "false", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429be45-601e-000f-29f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "fb59ab24-b79c-4f8f-8f3a-5c3d65989ac6" + "x-ms-request-id" : "0232e1e9-c01e-0053-100c-57b2b6000000", + "Date" : "Fri, 10 Jul 2020 22:47:24 GMT", + "x-ms-client-request-id" : "5fc7d6a8-d357-4d86-8ec1-cd7477b1f7b4" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0a166e6f-3066-4b94-980d-9aacbafd0108" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eafcb07d-d8a4-4efe-8b56-e5d3a939a947" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde82edf-001e-00fa-4bf0-12f991000000", - "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac826242158a805c8b5f17Wed, 15 Apr 2020 06:36:41 GMT\"0x8D7E1075B713F6E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", - "x-ms-client-request-id" : "0a166e6f-3066-4b94-980d-9aacbafd0108", + "x-ms-request-id" : "1fcb6e6e-201e-0029-340c-57aff6000000", + "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac46717060ac9db589f248Fri, 10 Jul 2020 22:47:23 GMT\"0x8D82523364A7410\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:47:25 GMT", + "x-ms-client-request-id" : "eafcb07d-d8a4-4efe-8b56-e5d3a939a947", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac826242158a805c8b5f17?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac46717060ac9db589f248?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "483bafcb-e3b3-4ecb-bcde-97081c588e8a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "27e8536d-3486-4611-a5df-03916f833d36" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79c07e-f01e-00ab-47f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:40 GMT", - "x-ms-client-request-id" : "483bafcb-e3b3-4ecb-bcde-97081c588e8a" + "x-ms-request-id" : "01045dff-901e-0013-560c-57b58e000000", + "Date" : "Fri, 10 Jul 2020 22:47:25 GMT", + "x-ms-client-request-id" : "27e8536d-3486-4611-a5df-03916f833d36" }, "Exception" : null } ], - "variables" : [ "jtcdeleteac0blobapitestdeleteac826242158a805c8b5f17", "javablobdeleteac1blobapitestdeleteac82618007a4bf993da" ] + "variables" : [ "jtcdeleteac0blobapitestdeleteac46717060ac9db589f248", "javablobdeleteac1blobapitestdeleteac4676159200167499f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[2].json index 06256270065f..37490e593494 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[2].json @@ -1,111 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacf1c196843199147c705a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac86690486f21b7c712949?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9015e546-4442-4c3b-807e-45bb652e02ab" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "28176bb3-c81d-421b-b66a-cedf8a6f47dd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075BB0A48B", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:41 GMT", + "ETag" : "0x8D8252337A6F77D", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429bedd-601e-000f-32f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "9015e546-4442-4c3b-807e-45bb652e02ab" + "x-ms-request-id" : "1f078d9b-801e-0089-190c-572b57000000", + "Date" : "Fri, 10 Jul 2020 22:47:25 GMT", + "x-ms-client-request-id" : "28176bb3-c81d-421b-b66a-cedf8a6f47dd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacf1c196843199147c705a/javablobdeleteac1blobapitestdeleteacf1c359893dbc3e4ae", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac86690486f21b7c712949/javablobdeleteac1blobapitestdeleteac86639246dcf4137a7", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3152470f-4d85-4a28-b9b2-bb1c94b0b433", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ceea5e0-2761-4861-9c38-a18a1ebf6aa1", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:41 GMT", + "x-ms-version-id" : "2020-07-10T22:47:26.3996201Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:26 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", + "Date" : "Fri, 10 Jul 2020 22:47:26 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075BB8B824", + "ETag" : "0x8D8252337D94D29", "Content-Length" : "0", - "x-ms-request-id" : "bde82f67-001e-00fa-4df0-12f991000000", - "x-ms-client-request-id" : "3152470f-4d85-4a28-b9b2-bb1c94b0b433" + "x-ms-request-id" : "60199f57-101e-00a4-510c-579824000000", + "x-ms-client-request-id" : "9ceea5e0-2761-4861-9c38-a18a1ebf6aa1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac86690486f21b7c712949/javablobdeleteac1blobapitestdeleteac86639246dcf4137a7?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b38d7de8-a500-48f7-94b6-50dabdd4bb1a", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "01aa12df-401e-0086-240c-575d3b000000", + "Date" : "Fri, 10 Jul 2020 22:47:26 GMT", + "x-ms-client-request-id" : "b38d7de8-a500-48f7-94b6-50dabdd4bb1a" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacf1c196843199147c705a/javablobdeleteac1blobapitestdeleteacf1c359893dbc3e4ae", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac86690486f21b7c712949/javablobdeleteac1blobapitestdeleteac86639246dcf4137a7", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e16805cf-8bdf-42e7-86c8-bd1c6f42298f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0a72560-8e9c-4c2a-9fe4-a33aff902872" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-delete-type-permanent" : "true", + "x-ms-delete-type-permanent" : "false", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79c0e7-f01e-00ab-1df0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "e16805cf-8bdf-42e7-86c8-bd1c6f42298f" + "x-ms-request-id" : "0e28e823-c01e-0098-5b0c-57b1e3000000", + "Date" : "Fri, 10 Jul 2020 22:47:26 GMT", + "x-ms-client-request-id" : "c0a72560-8e9c-4c2a-9fe4-a33aff902872" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "06a11458-18c1-4311-a88f-043917abf052" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec604992-fedc-42b1-9fdb-a4b867657a14" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429bf2c-601e-000f-7bf0-12dd80000000", - "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteacf1c196843199147c705aWed, 15 Apr 2020 06:36:41 GMT\"0x8D7E1075BB0A48B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "06a11458-18c1-4311-a88f-043917abf052", + "x-ms-request-id" : "d75b7096-501e-006e-0a0c-57c4ad000000", + "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac86690486f21b7c712949Fri, 10 Jul 2020 22:47:26 GMT\"0x8D8252337A6F77D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:47:27 GMT", + "x-ms-client-request-id" : "ec604992-fedc-42b1-9fdb-a4b867657a14", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacf1c196843199147c705a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac86690486f21b7c712949?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "795bf270-6cba-4ab7-b30e-b1663f7e0dc7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0e8c070e-73dd-4fc1-88d7-b962421e1705" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde82fd4-001e-00fa-2bf0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "795bf270-6cba-4ab7-b30e-b1663f7e0dc7" + "x-ms-request-id" : "8732295a-d01e-0094-190c-5726eb000000", + "Date" : "Fri, 10 Jul 2020 22:47:27 GMT", + "x-ms-client-request-id" : "0e8c070e-73dd-4fc1-88d7-b962421e1705" }, "Exception" : null } ], - "variables" : [ "jtcdeleteac0blobapitestdeleteacf1c196843199147c705a", "javablobdeleteac1blobapitestdeleteacf1c359893dbc3e4ae" ] + "variables" : [ "jtcdeleteac0blobapitestdeleteac86690486f21b7c712949", "javablobdeleteac1blobapitestdeleteac86639246dcf4137a7" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[3].json index caa6aca08c25..6ecceefc3aa0 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[3].json @@ -1,143 +1,164 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacec783414e02f495fa494?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3c691558c1e5ccbca9dc?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f29c7335-09f0-4d7a-89c6-3ed8b59c541c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c871330-de5f-4da7-a754-e9b86bbf6d38" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075BDC4F0E", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:41 GMT", + "ETag" : "0x8D8252338F9FCE8", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79c121-f01e-00ab-51f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "f29c7335-09f0-4d7a-89c6-3ed8b59c541c" + "x-ms-request-id" : "8f4fec1f-901e-0071-6d0c-5777a9000000", + "Date" : "Fri, 10 Jul 2020 22:47:27 GMT", + "x-ms-client-request-id" : "1c871330-de5f-4da7-a754-e9b86bbf6d38" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacec783414e02f495fa494/javablobdeleteac1blobapitestdeleteacec777256d24e7ce95", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3c691558c1e5ccbca9dc/javablobdeleteac1blobapitestdeleteac3c696415b79da64ee", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27fadbe2-1a5f-4e9b-a1de-90eccdb4ca77", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a584095-edb3-47de-aa91-622208ddc226", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:41 GMT", + "x-ms-version-id" : "2020-07-10T22:47:28.6712389Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:28 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", + "Date" : "Fri, 10 Jul 2020 22:47:28 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075BE59F4E", + "ETag" : "0x8D825233933EC45", "Content-Length" : "0", - "x-ms-request-id" : "6429bf8a-601e-000f-53f0-12dd80000000", - "x-ms-client-request-id" : "27fadbe2-1a5f-4e9b-a1de-90eccdb4ca77" + "x-ms-request-id" : "e152ae11-301e-0078-510c-57327a000000", + "x-ms-client-request-id" : "9a584095-edb3-47de-aa91-622208ddc226" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3c691558c1e5ccbca9dc/javablobdeleteac1blobapitestdeleteac3c696415b79da64ee?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "93b56a10-3044-400a-b29f-7492e857835f", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5d2a45ba-701e-009d-440c-576338000000", + "Date" : "Fri, 10 Jul 2020 22:47:28 GMT", + "x-ms-client-request-id" : "93b56a10-3044-400a-b29f-7492e857835f" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacec783414e02f495fa494/javablobdeleteac1blobapitestdeleteacec777256d24e7ce95", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3c691558c1e5ccbca9dc/javablobdeleteac1blobapitestdeleteac3c696415b79da64ee", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6f5f7ae0-226b-400e-a999-f00dcf2eba2c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "07e53341-dceb-44e8-bb99-580fd548dac9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:41 GMT", + "x-ms-version-id" : "2020-07-10T22:47:28.6712389Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:28 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", + "Date" : "Fri, 10 Jul 2020 22:47:28 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E1075BE59F4E", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:36:41 GMT", + "ETag" : "0x8D825233933EC45", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:47:28 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde83029-001e-00fa-7af0-12f991000000", - "x-ms-client-request-id" : "6f5f7ae0-226b-400e-a999-f00dcf2eba2c", + "x-ms-request-id" : "a1c40aa2-d01e-002d-4a0c-5722f1000000", + "x-ms-client-request-id" : "07e53341-dceb-44e8-bb99-580fd548dac9", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacec783414e02f495fa494/javablobdeleteac1blobapitestdeleteacec777256d24e7ce95", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3c691558c1e5ccbca9dc/javablobdeleteac1blobapitestdeleteac3c696415b79da64ee", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eea8b2b8-d5d4-491b-944c-56b50b590127" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc78d5ea-a756-4310-b03b-95e9728cc01c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-delete-type-permanent" : "true", + "x-ms-delete-type-permanent" : "false", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79c15c-f01e-00ab-06f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "eea8b2b8-d5d4-491b-944c-56b50b590127" + "x-ms-request-id" : "5fb0784c-e01e-007b-520c-57d31e000000", + "Date" : "Fri, 10 Jul 2020 22:47:29 GMT", + "x-ms-client-request-id" : "dc78d5ea-a756-4310-b03b-95e9728cc01c" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "700c21c4-b522-4bb6-a7a9-224724a8090a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c75af75-a05d-452c-a3a6-5073d39e6b99" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429bfca-601e-000f-0af0-12dd80000000", - "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteacec783414e02f495fa494Wed, 15 Apr 2020 06:36:41 GMT\"0x8D7E1075BDC4F0E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "700c21c4-b522-4bb6-a7a9-224724a8090a", + "x-ms-request-id" : "e8b9d61a-701e-0079-5c0c-576da6000000", + "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac3c691558c1e5ccbca9dcFri, 10 Jul 2020 22:47:28 GMT\"0x8D8252338F9FCE8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:47:29 GMT", + "x-ms-client-request-id" : "4c75af75-a05d-452c-a3a6-5073d39e6b99", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacec783414e02f495fa494?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac3c691558c1e5ccbca9dc?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b1258fe5-7edd-4179-bbff-723e83d1188d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2b958ef-df38-4d9f-9717-1a2d5711505d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde83093-001e-00fa-5df0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "b1258fe5-7edd-4179-bbff-723e83d1188d" + "x-ms-request-id" : "a6bd76d7-b01e-003b-6e0c-57d426000000", + "Date" : "Fri, 10 Jul 2020 22:47:29 GMT", + "x-ms-client-request-id" : "d2b958ef-df38-4d9f-9717-1a2d5711505d" }, "Exception" : null } ], - "variables" : [ "jtcdeleteac0blobapitestdeleteacec783414e02f495fa494", "javablobdeleteac1blobapitestdeleteacec777256d24e7ce95" ] + "variables" : [ "jtcdeleteac0blobapitestdeleteac3c691558c1e5ccbca9dc", "javablobdeleteac1blobapitestdeleteac3c696415b79da64ee" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[4].json index c2d3a9239e32..a6d0bece37e2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[4].json @@ -1,111 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac5a8009022fafebd4255a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac65772734e30b4d042f27?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b5442d4d-9013-4a8d-8c08-43ef043d2709" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "95c35a2c-35d0-45f4-bdc2-a01b78809463" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075C0E67B0", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:42 GMT", + "ETag" : "0x8D825233A9F057C", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79c1bd-f01e-00ab-59f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "b5442d4d-9013-4a8d-8c08-43ef043d2709" + "x-ms-request-id" : "69e9987f-d01e-0060-230c-57ed1d000000", + "Date" : "Fri, 10 Jul 2020 22:47:30 GMT", + "x-ms-client-request-id" : "95c35a2c-35d0-45f4-bdc2-a01b78809463" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac5a8009022fafebd4255a/javablobdeleteac1blobapitestdeleteac5a809493854b09f0d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac65772734e30b4d042f27/javablobdeleteac1blobapitestdeleteac65729533b41496d5f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d491dcd3-fc3b-4404-9292-a17cdfdfd66f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "135d38c0-1e32-42b4-8ac4-2cf23fdb2bdd", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:42 GMT", + "x-ms-version-id" : "2020-07-10T22:47:31.4332070Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:31 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", + "Date" : "Fri, 10 Jul 2020 22:47:30 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075C18F084", + "ETag" : "0x8D825233AD95DA6", "Content-Length" : "0", - "x-ms-request-id" : "6429c026-601e-000f-53f0-12dd80000000", - "x-ms-client-request-id" : "d491dcd3-fc3b-4404-9292-a17cdfdfd66f" + "x-ms-request-id" : "39155950-401e-00a9-3e0c-5750f0000000", + "x-ms-client-request-id" : "135d38c0-1e32-42b4-8ac4-2cf23fdb2bdd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac65772734e30b4d042f27/javablobdeleteac1blobapitestdeleteac65729533b41496d5f?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e082dbec-69a5-481a-a09d-17a0f6679ae4", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "f01ffb63-601e-004a-230c-57320d000000", + "Date" : "Fri, 10 Jul 2020 22:47:31 GMT", + "x-ms-client-request-id" : "e082dbec-69a5-481a-a09d-17a0f6679ae4" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac5a8009022fafebd4255a/javablobdeleteac1blobapitestdeleteac5a809493854b09f0d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac65772734e30b4d042f27/javablobdeleteac1blobapitestdeleteac65729533b41496d5f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "68d280c9-16b1-4bc8-81ed-30bbdec8fd80" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b049465b-a14f-4015-ad64-5a3003d695e7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-delete-type-permanent" : "true", + "x-ms-delete-type-permanent" : "false", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde83133-001e-00fa-6cf0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "68d280c9-16b1-4bc8-81ed-30bbdec8fd80" + "x-ms-request-id" : "72509fed-001e-005c-570c-57c4da000000", + "Date" : "Fri, 10 Jul 2020 22:47:31 GMT", + "x-ms-client-request-id" : "b049465b-a14f-4015-ad64-5a3003d695e7" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "855dc44d-e5c9-4e82-824f-b46cbc21c4a8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d69f8cfb-53b3-4511-b58a-d23560ef92d8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79c228-f01e-00ab-3bf0-12e764000000", - "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac5a8009022fafebd4255aWed, 15 Apr 2020 06:36:42 GMT\"0x8D7E1075C0E67B0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "855dc44d-e5c9-4e82-824f-b46cbc21c4a8", + "x-ms-request-id" : "b1b58d95-101e-0032-410c-5791f5000000", + "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac65772734e30b4d042f27Fri, 10 Jul 2020 22:47:31 GMT\"0x8D825233A9F057C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:47:32 GMT", + "x-ms-client-request-id" : "d69f8cfb-53b3-4511-b58a-d23560ef92d8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac5a8009022fafebd4255a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac65772734e30b4d042f27?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "82120195-d74e-4add-8782-dbdfcac88027" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "896f4d9a-a63d-4238-a286-e029ff5bca95" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429c081-601e-000f-24f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "82120195-d74e-4add-8782-dbdfcac88027" + "x-ms-request-id" : "9d894321-601e-0007-6e0c-57fde1000000", + "Date" : "Fri, 10 Jul 2020 22:47:33 GMT", + "x-ms-client-request-id" : "896f4d9a-a63d-4238-a286-e029ff5bca95" }, "Exception" : null } ], - "variables" : [ "jtcdeleteac0blobapitestdeleteac5a8009022fafebd4255a", "javablobdeleteac1blobapitestdeleteac5a809493854b09f0d" ] + "variables" : [ "jtcdeleteac0blobapitestdeleteac65772734e30b4d042f27", "javablobdeleteac1blobapitestdeleteac65729533b41496d5f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[5].json index bce014b6109d..8684405d907f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[5].json @@ -1,133 +1,152 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacd0638646ca0b6f9d63d2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac94c75889e809f77ecc8e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3aecd342-5d51-472a-80a2-ecfd7e759817" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16469187-ada9-4474-a85c-ce77f72550bd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075C3B7794", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:42 GMT", + "ETag" : "0x8D825233C1C76DD", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde831c8-001e-00fa-72f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", - "x-ms-client-request-id" : "3aecd342-5d51-472a-80a2-ecfd7e759817" + "x-ms-request-id" : "02c82072-601e-0091-360c-57f430000000", + "Date" : "Fri, 10 Jul 2020 22:47:32 GMT", + "x-ms-client-request-id" : "16469187-ada9-4474-a85c-ce77f72550bd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacd0638646ca0b6f9d63d2/javablobdeleteac1blobapitestdeleteacd065253372fac6b51", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac94c75889e809f77ecc8e/javablobdeleteac1blobapitestdeleteac94c50635701b7824a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b8483365-b7a3-4269-8459-ec79b2bccbf5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "061ded65-59a7-4aac-ae8b-a694b723de04", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:42 GMT", + "x-ms-version-id" : "2020-07-10T22:47:33.9259840Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:33 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:41 GMT", + "Date" : "Fri, 10 Jul 2020 22:47:33 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075C471066", + "ETag" : "0x8D825233C5594A3", "Content-Length" : "0", - "x-ms-request-id" : "5d79c282-f01e-00ab-0ff0-12e764000000", - "x-ms-client-request-id" : "b8483365-b7a3-4269-8459-ec79b2bccbf5" + "x-ms-request-id" : "37e72f35-401e-003f-6c0c-575921000000", + "x-ms-client-request-id" : "061ded65-59a7-4aac-ae8b-a694b723de04" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacd0638646ca0b6f9d63d2/javablobdeleteac1blobapitestdeleteacd065253372fac6b51?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac94c75889e809f77ecc8e/javablobdeleteac1blobapitestdeleteac94c50635701b7824a?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f0736392-d977-4831-866d-2f7875b23ebf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "988b53b9-05a2-41a5-b206-e28f8302b66e", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075C471066", - "x-ms-lease-id" : "dfd467d7-b51d-4399-9f4f-a2f8cb5ba1de", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:42 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "48d30540-701e-008d-2f0c-57a650000000", + "Date" : "Fri, 10 Jul 2020 22:47:33 GMT", + "x-ms-client-request-id" : "988b53b9-05a2-41a5-b206-e28f8302b66e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac94c75889e809f77ecc8e/javablobdeleteac1blobapitestdeleteac94c50635701b7824a?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f36d4719-aad9-4732-bc38-5942cab9728d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D825233C5594A3", + "x-ms-lease-id" : "a26de81d-362c-4b91-9d08-c5d63fbb8008", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429c0db-601e-000f-71f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "f0736392-d977-4831-866d-2f7875b23ebf" + "x-ms-request-id" : "39f110b2-101e-008b-610c-5795ef000000", + "Date" : "Fri, 10 Jul 2020 22:47:34 GMT", + "x-ms-client-request-id" : "f36d4719-aad9-4732-bc38-5942cab9728d" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacd0638646ca0b6f9d63d2/javablobdeleteac1blobapitestdeleteacd065253372fac6b51", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac94c75889e809f77ecc8e/javablobdeleteac1blobapitestdeleteac94c50635701b7824a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0ec359aa-5e0e-439d-adf7-4ff49e9fd6c0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d99fdac5-42dd-42b5-a72d-eddc4ae64750" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-delete-type-permanent" : "true", + "x-ms-delete-type-permanent" : "false", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde83253-001e-00fa-68f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "0ec359aa-5e0e-439d-adf7-4ff49e9fd6c0" + "x-ms-request-id" : "06568356-301e-0025-150c-5738fe000000", + "Date" : "Fri, 10 Jul 2020 22:47:34 GMT", + "x-ms-client-request-id" : "d99fdac5-42dd-42b5-a72d-eddc4ae64750" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b301f6b4-96f3-4d56-aac9-5f57a4bf0408" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "548d88c8-f56c-43d0-afdd-1991afd46736" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79c2de-f01e-00ab-64f0-12e764000000", - "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteacd0638646ca0b6f9d63d2Wed, 15 Apr 2020 06:36:42 GMT\"0x8D7E1075C3B7794\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "b301f6b4-96f3-4d56-aac9-5f57a4bf0408", + "x-ms-request-id" : "0b0f6130-a01e-00a1-1a0c-574aff000000", + "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac94c75889e809f77ecc8eFri, 10 Jul 2020 22:47:33 GMT\"0x8D825233C1C76DD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:47:34 GMT", + "x-ms-client-request-id" : "548d88c8-f56c-43d0-afdd-1991afd46736", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteacd0638646ca0b6f9d63d2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac94c75889e809f77ecc8e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "504cbca7-a2bf-4933-ab69-827e5ff8d47a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b25031d-45fd-487b-9a31-cc2727c676f4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429c10b-601e-000f-18f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "504cbca7-a2bf-4933-ab69-827e5ff8d47a" + "x-ms-request-id" : "094a5023-c01e-000e-130c-57b832000000", + "Date" : "Fri, 10 Jul 2020 22:47:35 GMT", + "x-ms-client-request-id" : "5b25031d-45fd-487b-9a31-cc2727c676f4" }, "Exception" : null } ], - "variables" : [ "jtcdeleteac0blobapitestdeleteacd0638646ca0b6f9d63d2", "javablobdeleteac1blobapitestdeleteacd065253372fac6b51" ] + "variables" : [ "jtcdeleteac0blobapitestdeleteac94c75889e809f77ecc8e", "javablobdeleteac1blobapitestdeleteac94c50635701b7824a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[6].json new file mode 100644 index 000000000000..cd82c67e3bcd --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteac[6].json @@ -0,0 +1,130 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac8d808808db0f0f75f757?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "258d0001-8b1b-4c42-a53f-a59466bf5058" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D825233DA3DF2E", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e84e7a6e-d01e-0070-240c-572875000000", + "Date" : "Fri, 10 Jul 2020 22:47:35 GMT", + "x-ms-client-request-id" : "258d0001-8b1b-4c42-a53f-a59466bf5058" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac8d808808db0f0f75f757/javablobdeleteac1blobapitestdeleteac8d882814ab2f97100", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "277529b0-487f-4511-9fba-31ee3064a348", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:47:36.4307683Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:47:36 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:47:35 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825233DD3EEE3", + "Content-Length" : "0", + "x-ms-request-id" : "3c554d7e-401e-0096-2a0c-579853000000", + "x-ms-client-request-id" : "277529b0-487f-4511-9fba-31ee3064a348" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac8d808808db0f0f75f757/javablobdeleteac1blobapitestdeleteac8d882814ab2f97100?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "384ec527-1500-439f-acb8-c81dbe827a87", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "3002f822-201e-0080-270c-576e84000000", + "Date" : "Fri, 10 Jul 2020 22:47:35 GMT", + "x-ms-client-request-id" : "384ec527-1500-439f-acb8-c81dbe827a87" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac8d808808db0f0f75f757/javablobdeleteac1blobapitestdeleteac8d882814ab2f97100", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a9380f4-033d-4567-a8f2-7341b645d1b3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-delete-type-permanent" : "false", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "b25a300c-e01e-0019-100c-571139000000", + "Date" : "Fri, 10 Jul 2020 22:47:36 GMT", + "x-ms-client-request-id" : "0a9380f4-033d-4567-a8f2-7341b645d1b3" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b7dd28a-8361-404d-86eb-5c2219b8609b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1b7f2461-601e-0017-7b0c-573889000000", + "Body" : "jtcdeleteacjtcdeleteac0blobapitestdeleteac8d808808db0f0f75f757Fri, 10 Jul 2020 22:47:36 GMT\"0x8D825233DA3DF2E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:47:36 GMT", + "x-ms-client-request-id" : "6b7dd28a-8361-404d-86eb-5c2219b8609b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteac0blobapitestdeleteac8d808808db0f0f75f757?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d12a695-38bf-4049-a119-2b5600ae6c6e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "fa95e4c3-501e-0051-170c-570c0e000000", + "Date" : "Fri, 10 Jul 2020 22:47:37 GMT", + "x-ms-client-request-id" : "0d12a695-38bf-4049-a119-2b5600ae6c6e" + }, + "Exception" : null + } ], + "variables" : [ "jtcdeleteac0blobapitestdeleteac8d808808db0f0f75f757", "javablobdeleteac1blobapitestdeleteac8d882814ab2f97100" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[0].json index fb29c156bea9..dd7dc6b70888 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[0].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailbb918652d3be86e2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail43657957ee823fab?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d827d7c8-23d7-4e97-92b0-e99e99c7a60f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "12ead1ca-35e1-4f66-bcf8-d6077b943313" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075C755A65", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:42 GMT", + "ETag" : "0x8D82523190447E2", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde832b7-001e-00fa-46f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "d827d7c8-23d7-4e97-92b0-e99e99c7a60f" + "x-ms-request-id" : "f01f96f2-601e-004a-3e0b-57320d000000", + "Date" : "Fri, 10 Jul 2020 22:46:34 GMT", + "x-ms-client-request-id" : "12ead1ca-35e1-4f66-bcf8-d6077b943313" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailbb918652d3be86e2/javablobdeleteacfail1blobapitestdeleteacfailbb96713556f08", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail43657957ee823fab/javablobdeleteacfail1blobapitestdeleteacfail4361392041d57", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "230fdd19-e5cd-49b5-858a-50802757ab08", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ce7499d-ae69-4d57-a8bf-0c80eccfb72f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:42 GMT", + "x-ms-version-id" : "2020-07-10T22:46:35.2741880Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:35 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", + "Date" : "Fri, 10 Jul 2020 22:46:34 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075C831652", + "ETag" : "0x8D8252319602DF8", "Content-Length" : "0", - "x-ms-request-id" : "5d79c34a-f01e-00ab-49f0-12e764000000", - "x-ms-client-request-id" : "230fdd19-e5cd-49b5-858a-50802757ab08" + "x-ms-request-id" : "725083cb-001e-005c-350b-57c4da000000", + "x-ms-client-request-id" : "9ce7499d-ae69-4d57-a8bf-0c80eccfb72f" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailbb918652d3be86e2/javablobdeleteacfail1blobapitestdeleteacfailbb96713556f08", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail43657957ee823fab/javablobdeleteacfail1blobapitestdeleteacfail4361392041d57", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c2ea5f38-b59b-4ed9-900e-6d2a78f9cab0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "338b7ff4-e668-4996-9f84-aa81bba63f4a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6429c144-601e-000f-4df0-12dd80000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6429c144-601e-000f-4df0-12dd80000000\nTime:2020-04-15T06:36:42.9841587Z", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "c2ea5f38-b59b-4ed9-900e-6d2a78f9cab0", + "x-ms-request-id" : "b1b557d8-101e-0032-2c0b-5791f5000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:b1b557d8-101e-0032-2c0b-5791f5000000\nTime:2020-07-10T22:46:35.7654722Z", + "Date" : "Fri, 10 Jul 2020 22:46:35 GMT", + "x-ms-client-request-id" : "338b7ff4-e668-4996-9f84-aa81bba63f4a", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "37738539-e172-40c5-8526-cf1908d44391" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe6cf7cd-0036-47a2-ab62-cbd89de54cdb" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde83332-001e-00fa-34f0-12f991000000", - "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfailbb918652d3be86e2Wed, 15 Apr 2020 06:36:42 GMT\"0x8D7E1075C755A65\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "37738539-e172-40c5-8526-cf1908d44391", + "x-ms-request-id" : "9d88ddb0-601e-0007-710b-57fde1000000", + "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfail43657957ee823fabFri, 10 Jul 2020 22:46:34 GMT\"0x8D82523190447E2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:46:36 GMT", + "x-ms-client-request-id" : "fe6cf7cd-0036-47a2-ab62-cbd89de54cdb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailbb918652d3be86e2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail43657957ee823fab?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c5878adb-633a-44dc-a7e7-250957deedd7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b762af4d-d3a3-4b38-9243-624c4db906ff" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79c3ab-f01e-00ab-1cf0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "c5878adb-633a-44dc-a7e7-250957deedd7" + "x-ms-request-id" : "02c7daa1-601e-0091-5e0b-57f430000000", + "Date" : "Fri, 10 Jul 2020 22:46:36 GMT", + "x-ms-client-request-id" : "b762af4d-d3a3-4b38-9243-624c4db906ff" }, "Exception" : null } ], - "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfailbb918652d3be86e2", "javablobdeleteacfail1blobapitestdeleteacfailbb96713556f08" ] + "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfail43657957ee823fab", "javablobdeleteacfail1blobapitestdeleteacfail4361392041d57" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[1].json index 754853eebfdc..39e2356c2cff 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[1].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailc7386934847c6418?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail866427302253d66f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1383942c-6d5b-4e59-87e5-37759ae4a458" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b900b23-31ef-46bb-8fcb-12aa05584d1b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075CA5C621", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:43 GMT", + "ETag" : "0x8D825231A80908C", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429c189-601e-000f-05f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "1383942c-6d5b-4e59-87e5-37759ae4a458" + "x-ms-request-id" : "37e6e8a0-401e-003f-5c0b-575921000000", + "Date" : "Fri, 10 Jul 2020 22:46:36 GMT", + "x-ms-client-request-id" : "5b900b23-31ef-46bb-8fcb-12aa05584d1b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailc7386934847c6418/javablobdeleteacfail1blobapitestdeleteacfailc7316687e2dc5", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail866427302253d66f/javablobdeleteacfail1blobapitestdeleteacfail866142551652f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2172a8b1-cc54-4564-9376-98e565a2f174", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "31b2da84-3241-45ca-8d3c-c901b877bb12", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:43 GMT", + "x-ms-version-id" : "2020-07-10T22:46:37.5287949Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", + "Date" : "Fri, 10 Jul 2020 22:46:36 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075CAE0126", + "ETag" : "0x8D825231AB80D7C", "Content-Length" : "0", - "x-ms-request-id" : "bde83394-001e-00fa-0cf0-12f991000000", - "x-ms-client-request-id" : "2172a8b1-cc54-4564-9376-98e565a2f174" + "x-ms-request-id" : "48d2b508-701e-008d-5e0b-57a650000000", + "x-ms-client-request-id" : "31b2da84-3241-45ca-8d3c-c901b877bb12" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailc7386934847c6418/javablobdeleteacfail1blobapitestdeleteacfailc7316687e2dc5", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail866427302253d66f/javablobdeleteacfail1blobapitestdeleteacfail866142551652f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "96b041e7-75dd-4d8f-8b82-ba27d1e50a50" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e011468-86f6-44f0-9340-00261d4de9b8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "5d79c409-f01e-00ab-6df0-12e764000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5d79c409-f01e-00ab-6df0-12e764000000\nTime:2020-04-15T06:36:43.2683508Z", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "96b041e7-75dd-4d8f-8b82-ba27d1e50a50", + "x-ms-request-id" : "39f0a56e-101e-008b-550b-5795ef000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:39f0a56e-101e-008b-550b-5795ef000000\nTime:2020-07-10T22:46:37.8954136Z", + "Date" : "Fri, 10 Jul 2020 22:46:37 GMT", + "x-ms-client-request-id" : "7e011468-86f6-44f0-9340-00261d4de9b8", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "667d0104-be46-4065-808a-328e0f68ec21" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "414e462b-e3be-442a-93b9-b7eccf62f238" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429c1b4-601e-000f-26f0-12dd80000000", - "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfailc7386934847c6418Wed, 15 Apr 2020 06:36:43 GMT\"0x8D7E1075CA5C621\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "667d0104-be46-4065-808a-328e0f68ec21", + "x-ms-request-id" : "06563e22-301e-0025-7a0b-5738fe000000", + "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfail866427302253d66fFri, 10 Jul 2020 22:46:37 GMT\"0x8D825231A80908C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:46:37 GMT", + "x-ms-client-request-id" : "414e462b-e3be-442a-93b9-b7eccf62f238", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailc7386934847c6418?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail866427302253d66f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8986f5d2-aa35-4d98-96e5-733b441cabc4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a951f08-9598-403b-a643-fd48630d2ea6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde833e3-001e-00fa-57f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "8986f5d2-aa35-4d98-96e5-733b441cabc4" + "x-ms-request-id" : "0b0f0af5-a01e-00a1-7b0b-574aff000000", + "Date" : "Fri, 10 Jul 2020 22:46:38 GMT", + "x-ms-client-request-id" : "6a951f08-9598-403b-a643-fd48630d2ea6" }, "Exception" : null } ], - "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfailc7386934847c6418", "javablobdeleteacfail1blobapitestdeleteacfailc7316687e2dc5" ] + "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfail866427302253d66f", "javablobdeleteacfail1blobapitestdeleteacfail866142551652f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[2].json index e6392286440f..823a33a9ede6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[2].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailf695054557caa21c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailef83988731ed0efa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4baa0725-c102-4088-8aec-6b81be3258bb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "30e95274-b3b2-4c29-a924-351d2acaa03d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075CCFC391", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:43 GMT", + "ETag" : "0x8D825231B95E26C", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79c44c-f01e-00ab-1ef0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "4baa0725-c102-4088-8aec-6b81be3258bb" + "x-ms-request-id" : "db6f6746-d01e-0002-2f0b-572f3a000000", + "Date" : "Fri, 10 Jul 2020 22:46:38 GMT", + "x-ms-client-request-id" : "30e95274-b3b2-4c29-a924-351d2acaa03d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailf695054557caa21c/javablobdeleteacfail1blobapitestdeleteacfailf6949032c236b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailef83988731ed0efa/javablobdeleteacfail1blobapitestdeleteacfailef80875672f2f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "80dc4ada-2333-4656-9bb1-a4a9abb98e03", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c451d21-523e-414d-947d-2658636c1664", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:43 GMT", + "x-ms-version-id" : "2020-07-10T22:46:39.3540965Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:39 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", + "Date" : "Fri, 10 Jul 2020 22:46:38 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075CD93A29", + "ETag" : "0x8D825231BCEB965", "Content-Length" : "0", - "x-ms-request-id" : "6429c1dd-601e-000f-49f0-12dd80000000", - "x-ms-client-request-id" : "80dc4ada-2333-4656-9bb1-a4a9abb98e03" + "x-ms-request-id" : "f96ec3dc-401e-0000-720b-579182000000", + "x-ms-client-request-id" : "1c451d21-523e-414d-947d-2658636c1664" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailf695054557caa21c/javablobdeleteacfail1blobapitestdeleteacfailf6949032c236b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailef83988731ed0efa/javablobdeleteacfail1blobapitestdeleteacfailef80875672f2f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "06b9c1a9-88e5-409e-bbc8-5bf58bd99507" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f3fe12a-cb44-44cc-88ad-aa85562ba785" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "bde83483-001e-00fa-6bf0-12f991000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bde83483-001e-00fa-6bf0-12f991000000\nTime:2020-04-15T06:36:43.5646814Z", - "Date" : "Wed, 15 Apr 2020 06:36:42 GMT", - "x-ms-client-request-id" : "06b9c1a9-88e5-409e-bbc8-5bf58bd99507", + "x-ms-request-id" : "e1e4f7cf-e01e-0026-280b-57d99a000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:e1e4f7cf-e01e-0026-280b-57d99a000000\nTime:2020-07-10T22:46:39.6904648Z", + "Date" : "Fri, 10 Jul 2020 22:46:39 GMT", + "x-ms-client-request-id" : "7f3fe12a-cb44-44cc-88ad-aa85562ba785", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2a7142ab-dfc6-4873-9339-ccd41b414a3c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "05073430-a81d-4ab9-a4d8-c3e007e3839c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79c48d-f01e-00ab-52f0-12e764000000", - "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfailf695054557caa21cWed, 15 Apr 2020 06:36:43 GMT\"0x8D7E1075CCFC391\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "2a7142ab-dfc6-4873-9339-ccd41b414a3c", + "x-ms-request-id" : "06a86443-401e-0010-370b-5754ea000000", + "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfailef83988731ed0efaFri, 10 Jul 2020 22:46:38 GMT\"0x8D825231B95E26C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:46:39 GMT", + "x-ms-client-request-id" : "05073430-a81d-4ab9-a4d8-c3e007e3839c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailf695054557caa21c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfailef83988731ed0efa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "95ffc8f2-b19a-4ef3-a974-87731bfa0781" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "401d4f1b-8539-47f6-a3b9-3c3ccf9d4d73" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429c221-601e-000f-03f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "95ffc8f2-b19a-4ef3-a974-87731bfa0781" + "x-ms-request-id" : "1b7efd3c-601e-0017-660b-573889000000", + "Date" : "Fri, 10 Jul 2020 22:46:39 GMT", + "x-ms-client-request-id" : "401d4f1b-8539-47f6-a3b9-3c3ccf9d4d73" }, "Exception" : null } ], - "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfailf695054557caa21c", "javablobdeleteacfail1blobapitestdeleteacfailf6949032c236b" ] + "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfailef83988731ed0efa", "javablobdeleteacfail1blobapitestdeleteacfailef80875672f2f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[3].json index 232cbe5a3f97..e280d15f5b95 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[3].json @@ -1,101 +1,103 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail536886424b27e3ff?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail622024273b5c8ba2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "14869f7f-54af-4ef3-8860-ef6aa6423bf2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ece106d5-92d6-4ce1-a007-99e721f96994" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075CFDE5A5", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:43 GMT", + "ETag" : "0x8D825231CB5D315", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde83514-001e-00fa-77f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "14869f7f-54af-4ef3-8860-ef6aa6423bf2" + "x-ms-request-id" : "fa95aa6c-501e-0051-200b-570c0e000000", + "Date" : "Fri, 10 Jul 2020 22:46:40 GMT", + "x-ms-client-request-id" : "ece106d5-92d6-4ce1-a007-99e721f96994" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail536886424b27e3ff/javablobdeleteacfail1blobapitestdeleteacfail536377731c37f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail622024273b5c8ba2/javablobdeleteacfail1blobapitestdeleteacfail622857779df6a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ce48b47e-1a4c-4935-a464-a553e6d6f737", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3e459a6-23c2-4195-9d13-692688d0e8ba", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:43 GMT", + "x-ms-version-id" : "2020-07-10T22:46:41.4125627Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", + "Date" : "Fri, 10 Jul 2020 22:46:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075D0584DB", + "ETag" : "0x8D825231D08D23B", "Content-Length" : "0", - "x-ms-request-id" : "5d79c4b0-f01e-00ab-6ff0-12e764000000", - "x-ms-client-request-id" : "ce48b47e-1a4c-4935-a464-a553e6d6f737" + "x-ms-request-id" : "4efa5472-a01e-0027-5d0b-578646000000", + "x-ms-client-request-id" : "b3e459a6-23c2-4195-9d13-692688d0e8ba" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail536886424b27e3ff/javablobdeleteacfail1blobapitestdeleteacfail536377731c37f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail622024273b5c8ba2/javablobdeleteacfail1blobapitestdeleteacfail622857779df6a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6e4bdc84-d7e2-4f6a-8eb5-fcca0030b693" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ccc7c038-3b9a-44d7-bd57-26988bdee9a0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:43 GMT", + "x-ms-version-id" : "2020-07-10T22:46:41.4125627Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:41 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", + "Date" : "Fri, 10 Jul 2020 22:46:41 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E1075D0584DB", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:36:43 GMT", + "ETag" : "0x8D825231D08D23B", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:46:41 GMT", "Content-Length" : "7", - "x-ms-request-id" : "6429c262-601e-000f-39f0-12dd80000000", - "x-ms-client-request-id" : "6e4bdc84-d7e2-4f6a-8eb5-fcca0030b693", + "x-ms-request-id" : "cc424d20-401e-004d-6f0b-575e6e000000", + "x-ms-client-request-id" : "ccc7c038-3b9a-44d7-bd57-26988bdee9a0", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail536886424b27e3ff/javablobdeleteacfail1blobapitestdeleteacfail536377731c37f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail622024273b5c8ba2/javablobdeleteacfail1blobapitestdeleteacfail622857779df6a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e786ec07-2b03-4508-aea3-939441cb5a7d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4047c3b2-9f45-4c0e-98c8-560d925a0a83" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "bde8358e-001e-00fa-6bf0-12f991000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bde8358e-001e-00fa-6bf0-12f991000000\nTime:2020-04-15T06:36:43.8849870Z", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "e786ec07-2b03-4508-aea3-939441cb5a7d", + "x-ms-request-id" : "8a1f8889-301e-00a3-480b-57f447000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8a1f8889-301e-00a3-480b-57f447000000\nTime:2020-07-10T22:46:42.3889021Z", + "Date" : "Fri, 10 Jul 2020 22:46:41 GMT", + "x-ms-client-request-id" : "4047c3b2-9f45-4c0e-98c8-560d925a0a83", "Content-Type" : "application/xml" }, "Exception" : null @@ -103,43 +105,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b1c3ab26-c08d-4ce4-b551-393321d3c06c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a02fc89c-1e58-4256-8ec5-00fa78d2827b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79c4de-f01e-00ab-17f0-12e764000000", - "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfail536886424b27e3ffWed, 15 Apr 2020 06:36:43 GMT\"0x8D7E1075CFDE5A5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "b1c3ab26-c08d-4ce4-b551-393321d3c06c", + "x-ms-request-id" : "b2df9f69-101e-0022-630b-57549d000000", + "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfail622024273b5c8ba2Fri, 10 Jul 2020 22:46:40 GMT\"0x8D825231CB5D315\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:46:41 GMT", + "x-ms-client-request-id" : "a02fc89c-1e58-4256-8ec5-00fa78d2827b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail536886424b27e3ff?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail622024273b5c8ba2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d9f3bfe2-9eba-482e-af31-76115685853e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b942e996-52ce-4971-b383-42ff0961971e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429c2a7-601e-000f-77f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "d9f3bfe2-9eba-482e-af31-76115685853e" + "x-ms-request-id" : "f22f8314-801e-0020-300b-57ea25000000", + "Date" : "Fri, 10 Jul 2020 22:46:42 GMT", + "x-ms-client-request-id" : "b942e996-52ce-4971-b383-42ff0961971e" }, "Exception" : null } ], - "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfail536886424b27e3ff", "javablobdeleteacfail1blobapitestdeleteacfail536377731c37f" ] + "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfail622024273b5c8ba2", "javablobdeleteacfail1blobapitestdeleteacfail622857779df6a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[4].json index dec4d0fcafdb..697755b9685d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[4].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail7f3053317f1afd4b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfaild3e370240a4aea81?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83c8744a-2506-40f7-970f-8b7bab0b1e87" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dca3f25f-1479-412e-b1e6-ca274897fc0c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075D3E59BE", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:44 GMT", + "ETag" : "0x8D825231E30BF92", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde8366f-001e-00fa-3cf0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "83c8744a-2506-40f7-970f-8b7bab0b1e87" + "x-ms-request-id" : "4c4efb0f-701e-0046-4e0b-57a505000000", + "Date" : "Fri, 10 Jul 2020 22:46:42 GMT", + "x-ms-client-request-id" : "dca3f25f-1479-412e-b1e6-ca274897fc0c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail7f3053317f1afd4b/javablobdeleteacfail1blobapitestdeleteacfail7f32171397a28", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfaild3e370240a4aea81/javablobdeleteacfail1blobapitestdeleteacfaild3e381758ed6a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "93d0db4b-5e32-4003-b8d5-90d275fd3ba8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b66a96e-b9b5-41df-abf3-5d71531d3290", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:44 GMT", + "x-ms-version-id" : "2020-07-10T22:46:43.7051980Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", + "Date" : "Fri, 10 Jul 2020 22:46:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075D473172", + "ETag" : "0x8D825231E66A64C", "Content-Length" : "0", - "x-ms-request-id" : "5d79c556-f01e-00ab-7cf0-12e764000000", - "x-ms-client-request-id" : "93d0db4b-5e32-4003-b8d5-90d275fd3ba8" + "x-ms-request-id" : "7d4334f6-501e-001c-530b-57c3e2000000", + "x-ms-client-request-id" : "6b66a96e-b9b5-41df-abf3-5d71531d3290" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail7f3053317f1afd4b/javablobdeleteacfail1blobapitestdeleteacfail7f32171397a28?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfaild3e370240a4aea81/javablobdeleteacfail1blobapitestdeleteacfaild3e381758ed6a?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "57e49d2d-b756-40d9-a527-8ff8008c97d6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82b1cf30-b15a-4648-ab70-6437e66edf46" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075D473172", - "x-ms-lease-id" : "04a572cd-869a-4781-93dc-19aa550ff985", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:44 GMT", + "ETag" : "0x8D825231E66A64C", + "x-ms-lease-id" : "9d214c6d-38e3-4b90-9e92-e67918e8d0fa", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429c319-601e-000f-58f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:44 GMT", - "x-ms-client-request-id" : "57e49d2d-b756-40d9-a527-8ff8008c97d6" + "x-ms-request-id" : "7ee8c3b9-201e-0006-340b-57a23d000000", + "Date" : "Fri, 10 Jul 2020 22:46:43 GMT", + "x-ms-client-request-id" : "82b1cf30-b15a-4648-ab70-6437e66edf46" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail7f3053317f1afd4b/javablobdeleteacfail1blobapitestdeleteacfail7f32171397a28", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfaild3e370240a4aea81/javablobdeleteacfail1blobapitestdeleteacfaild3e381758ed6a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dad832fd-136b-425f-b8a6-2b42fce8d056" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "05497342-58ac-41a6-b157-0e3d8d657180" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "bde836d4-001e-00fa-14f0-12f991000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:bde836d4-001e-00fa-14f0-12f991000000\nTime:2020-04-15T06:36:44.3404215Z", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "dad832fd-136b-425f-b8a6-2b42fce8d056", + "x-ms-request-id" : "4deb968d-901e-002c-080b-577d2d000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:4deb968d-901e-002c-080b-577d2d000000\nTime:2020-07-10T22:46:44.5125842Z", + "Date" : "Fri, 10 Jul 2020 22:46:43 GMT", + "x-ms-client-request-id" : "05497342-58ac-41a6-b157-0e3d8d657180", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a6aa60b4-691f-4c0a-a7df-b97c7a5b2305" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0f5940a-401a-406d-8d07-02fa6a52de20" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79c5bd-f01e-00ab-54f0-12e764000000", - "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfail7f3053317f1afd4bWed, 15 Apr 2020 06:36:44 GMT\"0x8D7E1075D3E59BE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:43 GMT", - "x-ms-client-request-id" : "a6aa60b4-691f-4c0a-a7df-b97c7a5b2305", + "x-ms-request-id" : "41990963-601e-0065-130b-573fc6000000", + "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfaild3e370240a4aea81Fri, 10 Jul 2020 22:46:43 GMT\"0x8D825231E30BF92\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:46:44 GMT", + "x-ms-client-request-id" : "e0f5940a-401a-406d-8d07-02fa6a52de20", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail7f3053317f1afd4b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfaild3e370240a4aea81?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "44a7f975-1d3c-428f-bb57-95e964656c94" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bca9d6be-86aa-4d9d-85a2-924bc8d29132" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429c347-601e-000f-7ef0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:44 GMT", - "x-ms-client-request-id" : "44a7f975-1d3c-428f-bb57-95e964656c94" + "x-ms-request-id" : "b1901ca3-d01e-004f-470b-57e0d6000000", + "Date" : "Fri, 10 Jul 2020 22:46:44 GMT", + "x-ms-client-request-id" : "bca9d6be-86aa-4d9d-85a2-924bc8d29132" }, "Exception" : null } ], - "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfail7f3053317f1afd4b", "javablobdeleteacfail1blobapitestdeleteacfail7f32171397a28" ] + "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfaild3e370240a4aea81", "javablobdeleteacfail1blobapitestdeleteacfaild3e381758ed6a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[5].json new file mode 100644 index 000000000000..a08e1a4e9860 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdeleteacfail[5].json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail5de259155c5b58e7?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b35f9102-84fa-4a98-9fb6-29f846902213" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D825231F8C0644", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e79d8fd2-601e-0075-440b-57faae000000", + "Date" : "Fri, 10 Jul 2020 22:46:45 GMT", + "x-ms-client-request-id" : "b35f9102-84fa-4a98-9fb6-29f846902213" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail5de259155c5b58e7/javablobdeleteacfail1blobapitestdeleteacfail5de75248a9a25", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4e442c4-ca8a-4de5-8d64-41025b3275cc", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:46:45.9738134Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:46:45 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:46:45 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825231FC0D016", + "Content-Length" : "0", + "x-ms-request-id" : "e001c527-501e-00a5-7e0b-57c7f8000000", + "x-ms-client-request-id" : "b4e442c4-ca8a-4de5-8d64-41025b3275cc" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail5de259155c5b58e7/javablobdeleteacfail1blobapitestdeleteacfail5de75248a9a25", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0897758-505b-4b73-83bb-a1f01d6172ce" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "385e49f5-401e-0072-0a0b-5796cd000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:385e49f5-401e-0072-0a0b-5796cd000000\nTime:2020-07-10T22:46:46.4533356Z", + "Date" : "Fri, 10 Jul 2020 22:46:45 GMT", + "x-ms-client-request-id" : "b0897758-505b-4b73-83bb-a1f01d6172ce", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdeleteacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61446f8d-21e8-4bc2-ac4e-f918747bf3e7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1b8a00c7-701e-0034-470b-57a24a000000", + "Body" : "jtcdeleteacfailjtcdeleteacfail0blobapitestdeleteacfail5de259155c5b58e7Fri, 10 Jul 2020 22:46:45 GMT\"0x8D825231F8C0644\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:46:46 GMT", + "x-ms-client-request-id" : "61446f8d-21e8-4bc2-ac4e-f918747bf3e7", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdeleteacfail0blobapitestdeleteacfail5de259155c5b58e7?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "688d6d77-8001-4f6f-927a-a0ca2a7cc7a2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "543a50fa-301e-000a-310b-573535000000", + "Date" : "Fri, 10 Jul 2020 22:46:46 GMT", + "x-ms-client-request-id" : "688d6d77-8001-4f6f-927a-a0ca2a7cc7a2" + }, + "Exception" : null + } ], + "variables" : [ "jtcdeleteacfail0blobapitestdeleteacfail5de259155c5b58e7", "javablobdeleteacfail1blobapitestdeleteacfail5de75248a9a25" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[0].json index b8e33fb3722a..a9d81762c715 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[0].json @@ -1,78 +1,100 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac188986739906842c22?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac90c525264c004d6a21?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "82c284b5-cbe7-4b54-aacb-761132ae7e5b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1cdaee60-de7e-486b-8c82-ba4e8dcb1e4a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107202A16C2", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:01 GMT", + "ETag" : "0x8D82521910293AC", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d790451-f01e-00ab-15ef-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", - "x-ms-client-request-id" : "82c284b5-cbe7-4b54-aacb-761132ae7e5b" + "x-ms-request-id" : "7ea7f0bc-601e-0038-7c0a-573542000000", + "Date" : "Fri, 10 Jul 2020 22:35:36 GMT", + "x-ms-client-request-id" : "1cdaee60-de7e-486b-8c82-ba4e8dcb1e4a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac188986739906842c22/javablobdownloadac1blobapitestdownloadac18882849c7f2bf1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac90c525264c004d6a21/javablobdownloadac1blobapitestdownloadac90c67117fd8fa29", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "56a7ff46-78c7-4456-8985-f40e1300cafe", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fd35599-b8c8-4665-afd1-4cc894a39ca8", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:01 GMT", + "x-ms-version-id" : "2020-07-10T22:35:37.9477797Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:37 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10720336746", + "ETag" : "0x8D8252191942125", "Content-Length" : "0", - "x-ms-request-id" : "642944b8-601e-000f-55ef-12dd80000000", - "x-ms-client-request-id" : "56a7ff46-78c7-4456-8985-f40e1300cafe" + "x-ms-request-id" : "8f4bd8fb-901e-0071-450a-5777a9000000", + "x-ms-client-request-id" : "7fd35599-b8c8-4665-afd1-4cc894a39ca8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac90c525264c004d6a21/javablobdownloadac1blobapitestdownloadac90c67117fd8fa29?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65978f8b-1dfd-4aaa-821e-bd47b6b2ce27", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "3dee659c-b01e-0059-340a-571601000000", + "Date" : "Fri, 10 Jul 2020 22:35:38 GMT", + "x-ms-client-request-id" : "65978f8b-1dfd-4aaa-821e-bd47b6b2ce27" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac188986739906842c22/javablobdownloadac1blobapitestdownloadac18882849c7f2bf1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac90c525264c004d6a21/javablobdownloadac1blobapitestdownloadac90c67117fd8fa29", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7dd19f39-eafe-497c-968d-8cb94a17d5ad" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "837cb899-2432-40d2-896b-e0386e88e581" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:01 GMT", + "x-ms-version-id" : "2020-07-10T22:35:37.9477797Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:37 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:38 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10720336746", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:01 GMT", + "ETag" : "0x8D8252191942125", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:35:37 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde74807-001e-00fa-49ef-12f991000000", + "x-ms-request-id" : "e9f44235-701e-0069-350a-57a8ce000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "7dd19f39-eafe-497c-968d-8cb94a17d5ad", + "x-ms-client-request-id" : "837cb899-2432-40d2-896b-e0386e88e581", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -80,43 +102,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "522a1a41-12c0-4394-b272-7f63d0f3b30e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6487321b-21e2-48ed-a43f-d15f0b3d07ca" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d7904a8-f01e-00ab-5cef-12e764000000", - "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac188986739906842c22Wed, 15 Apr 2020 06:35:01 GMT\"0x8D7E107202A16C2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", - "x-ms-client-request-id" : "522a1a41-12c0-4394-b272-7f63d0f3b30e", + "x-ms-request-id" : "4ea15dc4-901e-003c-090a-57b845000000", + "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac90c525264c004d6a21Fri, 10 Jul 2020 22:35:36 GMT\"0x8D82521910293AC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:35:38 GMT", + "x-ms-client-request-id" : "6487321b-21e2-48ed-a43f-d15f0b3d07ca", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac188986739906842c22?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac90c525264c004d6a21?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "203956d7-8532-401d-9966-35fd78901317" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b8fb8601-3474-458e-9b60-f981cd80c5ed" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "642944ea-601e-000f-7def-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", - "x-ms-client-request-id" : "203956d7-8532-401d-9966-35fd78901317" + "x-ms-request-id" : "3d79b294-701e-0024-7e0a-576722000000", + "Date" : "Fri, 10 Jul 2020 22:35:39 GMT", + "x-ms-client-request-id" : "b8fb8601-3474-458e-9b60-f981cd80c5ed" }, "Exception" : null } ], - "variables" : [ "jtcdownloadac0blobapitestdownloadac188986739906842c22", "javablobdownloadac1blobapitestdownloadac18882849c7f2bf1" ] + "variables" : [ "jtcdownloadac0blobapitestdownloadac90c525264c004d6a21", "javablobdownloadac1blobapitestdownloadac90c67117fd8fa29" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[1].json index b6c02bb794df..e87d608a04e5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[1].json @@ -1,78 +1,100 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac25c498942fcea389a7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac06c276690da44b7f58?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "69ec4107-04ce-471b-be48-155af7624f61" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d3a63869-7e35-430f-a6c2-28ea4bdac89f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072059D9D7", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:01 GMT", + "ETag" : "0x8D82521930FFA0F", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7485c-001e-00fa-15ef-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", - "x-ms-client-request-id" : "69ec4107-04ce-471b-be48-155af7624f61" + "x-ms-request-id" : "395917c5-901e-0085-6b0a-57bc5f000000", + "Date" : "Fri, 10 Jul 2020 22:35:40 GMT", + "x-ms-client-request-id" : "d3a63869-7e35-430f-a6c2-28ea4bdac89f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac25c498942fcea389a7/javablobdownloadac1blobapitestdownloadac25c288446a55a68", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac06c276690da44b7f58/javablobdownloadac1blobapitestdownloadac06c262536921d51", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "64f3b034-4b1e-4bb8-beaa-55dda136d558", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "476c233e-5235-45d4-9040-07a8d1c17b1f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "x-ms-version-id" : "2020-07-10T22:35:40.7858017Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:40 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107206298CE", + "ETag" : "0x8D8252193452D61", "Content-Length" : "0", - "x-ms-request-id" : "5d7904fb-f01e-00ab-26ef-12e764000000", - "x-ms-client-request-id" : "64f3b034-4b1e-4bb8-beaa-55dda136d558" + "x-ms-request-id" : "19d2a73e-c01e-0031-180a-577091000000", + "x-ms-client-request-id" : "476c233e-5235-45d4-9040-07a8d1c17b1f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac06c276690da44b7f58/javablobdownloadac1blobapitestdownloadac06c262536921d51?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "68c484b9-9983-46ae-8991-03c6d87ad96d", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c83b7c17-c01e-007c-010a-57bf7d000000", + "Date" : "Fri, 10 Jul 2020 22:35:40 GMT", + "x-ms-client-request-id" : "68c484b9-9983-46ae-8991-03c6d87ad96d" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac25c498942fcea389a7/javablobdownloadac1blobapitestdownloadac25c288446a55a68", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac06c276690da44b7f58/javablobdownloadac1blobapitestdownloadac06c262536921d51", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "64f91f43-f39a-4475-9ac0-81af0f5811e2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69ebf892-fbd4-462c-ae00-c3703ff9fe81" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "x-ms-version-id" : "2020-07-10T22:35:40.7858017Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:40 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:41 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E107206298CE", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:02 GMT", + "ETag" : "0x8D8252193452D61", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:35:40 GMT", "Content-Length" : "7", - "x-ms-request-id" : "6429450f-601e-000f-1cef-12dd80000000", + "x-ms-request-id" : "de79f8bf-b01e-0014-4f0a-57d9ed000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "64f91f43-f39a-4475-9ac0-81af0f5811e2", + "x-ms-client-request-id" : "69ebf892-fbd4-462c-ae00-c3703ff9fe81", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -80,43 +102,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4fe6f24f-10e4-4261-87c8-c7de737984ae" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "01ff7241-3d86-49e0-a1ac-3ddb803a987e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde748c6-001e-00fa-6fef-12f991000000", - "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac25c498942fcea389a7Wed, 15 Apr 2020 06:35:01 GMT\"0x8D7E1072059D9D7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", - "x-ms-client-request-id" : "4fe6f24f-10e4-4261-87c8-c7de737984ae", + "x-ms-request-id" : "06a5a4bb-401e-0010-770a-5754ea000000", + "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac06c276690da44b7f58Fri, 10 Jul 2020 22:35:40 GMT\"0x8D82521930FFA0F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:35:41 GMT", + "x-ms-client-request-id" : "01ff7241-3d86-49e0-a1ac-3ddb803a987e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac25c498942fcea389a7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac06c276690da44b7f58?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aa48fc7c-33bd-4376-8a37-e782ada07cc7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a581780-8807-42b1-84ab-c0d104bbfa73" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79053a-f01e-00ab-5cef-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", - "x-ms-client-request-id" : "aa48fc7c-33bd-4376-8a37-e782ada07cc7" + "x-ms-request-id" : "192bf53a-c01e-0021-440a-57b5f9000000", + "Date" : "Fri, 10 Jul 2020 22:35:41 GMT", + "x-ms-client-request-id" : "9a581780-8807-42b1-84ab-c0d104bbfa73" }, "Exception" : null } ], - "variables" : [ "jtcdownloadac0blobapitestdownloadac25c498942fcea389a7", "javablobdownloadac1blobapitestdownloadac25c288446a55a68" ] + "variables" : [ "jtcdownloadac0blobapitestdownloadac06c276690da44b7f58", "javablobdownloadac1blobapitestdownloadac06c262536921d51" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[2].json index 9021179c9668..028a20b9bd6e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[2].json @@ -1,78 +1,100 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac6c352078a40ee86987?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac5c102841642d7e9d14?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "105328b7-2026-438b-a9d3-a1a0b2645a52" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a51baad-5176-4130-81df-03f3844347ed" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107208A1214", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "ETag" : "0x8D825219467C505", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64294542-601e-000f-45ef-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", - "x-ms-client-request-id" : "105328b7-2026-438b-a9d3-a1a0b2645a52" + "x-ms-request-id" : "c34f5aac-601e-0081-7b0a-573158000000", + "Date" : "Fri, 10 Jul 2020 22:35:41 GMT", + "x-ms-client-request-id" : "5a51baad-5176-4130-81df-03f3844347ed" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac6c352078a40ee86987/javablobdownloadac1blobapitestdownloadac6c399534283a426", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac5c102841642d7e9d14/javablobdownloadac1blobapitestdownloadac5c173963b4c9fd1", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "80aeaa02-332e-4bde-91a9-5c7d2f544333", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46e96e32-e173-44f0-b9a9-9161028601bf", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "x-ms-version-id" : "2020-07-10T22:35:43.4016662Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:42 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10720946315", + "ETag" : "0x8D8252194D45396", "Content-Length" : "0", - "x-ms-request-id" : "bde7493b-001e-00fa-5aef-12f991000000", - "x-ms-client-request-id" : "80aeaa02-332e-4bde-91a9-5c7d2f544333" + "x-ms-request-id" : "9aa48ec9-b01e-0004-530a-571c85000000", + "x-ms-client-request-id" : "46e96e32-e173-44f0-b9a9-9161028601bf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac5c102841642d7e9d14/javablobdownloadac1blobapitestdownloadac5c173963b4c9fd1?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "22376742-3448-42f2-854a-f9f4cf204048", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "34a050df-201e-0064-0d0a-57601a000000", + "Date" : "Fri, 10 Jul 2020 22:35:43 GMT", + "x-ms-client-request-id" : "22376742-3448-42f2-854a-f9f4cf204048" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac6c352078a40ee86987/javablobdownloadac1blobapitestdownloadac6c399534283a426", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac5c102841642d7e9d14/javablobdownloadac1blobapitestdownloadac5c173963b4c9fd1", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6e338703-725c-488d-be8c-8fc53bc73b67" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ef2f978-8cb9-4e7e-991f-3bd43df2330e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "x-ms-version-id" : "2020-07-10T22:35:43.4016662Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:01 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:44 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10720946315", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:02 GMT", + "ETag" : "0x8D8252194D45396", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:35:43 GMT", "Content-Length" : "7", - "x-ms-request-id" : "5d7905a6-f01e-00ab-41ef-12e764000000", + "x-ms-request-id" : "8f6926de-001e-00a8-0d0a-570f2c000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "6e338703-725c-488d-be8c-8fc53bc73b67", + "x-ms-client-request-id" : "9ef2f978-8cb9-4e7e-991f-3bd43df2330e", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -80,43 +102,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "13d4ab77-4e34-4db6-ad9f-966eb7867397" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c957d7ca-e762-4a8f-99b6-0c0b131d316d" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64294581-601e-000f-7eef-12dd80000000", - "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac6c352078a40ee86987Wed, 15 Apr 2020 06:35:02 GMT\"0x8D7E107208A1214\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", - "x-ms-client-request-id" : "13d4ab77-4e34-4db6-ad9f-966eb7867397", + "x-ms-request-id" : "c1df244d-301e-0035-450a-57fd96000000", + "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac5c102841642d7e9d14Fri, 10 Jul 2020 22:35:42 GMT\"0x8D825219467C505\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:35:44 GMT", + "x-ms-client-request-id" : "c957d7ca-e762-4a8f-99b6-0c0b131d316d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac6c352078a40ee86987?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac5c102841642d7e9d14?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a3372def-2d41-4c7b-bafe-a2be60d25098" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ead7760-f1ba-459e-b2c1-5394ea016c26" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde749b3-001e-00fa-47ef-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", - "x-ms-client-request-id" : "a3372def-2d41-4c7b-bafe-a2be60d25098" + "x-ms-request-id" : "ac615af9-801e-0030-110a-572f4d000000", + "Date" : "Fri, 10 Jul 2020 22:35:44 GMT", + "x-ms-client-request-id" : "2ead7760-f1ba-459e-b2c1-5394ea016c26" }, "Exception" : null } ], - "variables" : [ "jtcdownloadac0blobapitestdownloadac6c352078a40ee86987", "javablobdownloadac1blobapitestdownloadac6c399534283a426" ] + "variables" : [ "jtcdownloadac0blobapitestdownloadac5c102841642d7e9d14", "javablobdownloadac1blobapitestdownloadac5c173963b4c9fd1" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[3].json index 15a104771199..40061bb34729 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[3].json @@ -1,110 +1,134 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac478704410b7a5b5c3a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac92e99312ed998fe949?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b12ab718-6cc4-407c-b388-fb1252e4fd55" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3640e943-146d-4df2-8769-b97d5fcfcef8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10720C6557B", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "ETag" : "0x8D8252196062CB2", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d790624-f01e-00ab-3aef-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", - "x-ms-client-request-id" : "b12ab718-6cc4-407c-b388-fb1252e4fd55" + "x-ms-request-id" : "b571365d-301e-008c-610a-57f98c000000", + "Date" : "Fri, 10 Jul 2020 22:35:44 GMT", + "x-ms-client-request-id" : "3640e943-146d-4df2-8769-b97d5fcfcef8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac478704410b7a5b5c3a/javablobdownloadac1blobapitestdownloadac478536034c3c624", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac92e99312ed998fe949/javablobdownloadac1blobapitestdownloadac92e404761070c54", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "227c80e0-bf49-493e-8ed7-31c6d9f48393", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3afae7de-52f7-4687-b036-bb46fa1e926a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "x-ms-version-id" : "2020-07-10T22:35:45.7283244Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:45 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10720CFF3AD", + "ETag" : "0x8D82521963758AC", "Content-Length" : "0", - "x-ms-request-id" : "642945c7-601e-000f-38ef-12dd80000000", - "x-ms-client-request-id" : "227c80e0-bf49-493e-8ed7-31c6d9f48393" + "x-ms-request-id" : "aeb98b60-801e-00a6-0a0a-57269c000000", + "x-ms-client-request-id" : "3afae7de-52f7-4687-b036-bb46fa1e926a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac92e99312ed998fe949/javablobdownloadac1blobapitestdownloadac92e404761070c54?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "db5cc2c3-ef02-4bf4-829a-13da872e3aaa", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1b820bfc-701e-0034-190a-57a24a000000", + "Date" : "Fri, 10 Jul 2020 22:35:45 GMT", + "x-ms-client-request-id" : "db5cc2c3-ef02-4bf4-829a-13da872e3aaa" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac478704410b7a5b5c3a/javablobdownloadac1blobapitestdownloadac478536034c3c624", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac92e99312ed998fe949/javablobdownloadac1blobapitestdownloadac92e404761070c54", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f31126cd-5491-4388-b353-79e987f97a7a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ccbbd65-aa5a-47d9-be26-6193bb796fdf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "x-ms-version-id" : "2020-07-10T22:35:45.7283244Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:45 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10720CFF3AD", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:02 GMT", + "ETag" : "0x8D82521963758AC", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:35:45 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde74a3e-001e-00fa-47ef-12f991000000", - "x-ms-client-request-id" : "f31126cd-5491-4388-b353-79e987f97a7a", + "x-ms-request-id" : "dffe72cd-501e-00a5-0d0a-57c7f8000000", + "x-ms-client-request-id" : "7ccbbd65-aa5a-47d9-be26-6193bb796fdf", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac478704410b7a5b5c3a/javablobdownloadac1blobapitestdownloadac478536034c3c624", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac92e99312ed998fe949/javablobdownloadac1blobapitestdownloadac92e404761070c54", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ff717deb-295f-4fd9-8381-01afa6cbf31f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "28fc4805-f2dd-41df-84ab-a037aeaa8ad2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:02 GMT", + "x-ms-version-id" : "2020-07-10T22:35:45.7283244Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:46 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10720CFF3AD", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:02 GMT", + "ETag" : "0x8D82521963758AC", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:35:45 GMT", "Content-Length" : "7", - "x-ms-request-id" : "5d7906af-f01e-00ab-3cef-12e764000000", + "x-ms-request-id" : "0e24248e-c01e-0098-160a-57b1e3000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "ff717deb-295f-4fd9-8381-01afa6cbf31f", + "x-ms-client-request-id" : "28fc4805-f2dd-41df-84ab-a037aeaa8ad2", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -112,43 +136,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "db954143-f91c-46f8-986a-b265e62059f6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8432f840-2d7c-47f4-9a10-0026a16cc632" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64294609-601e-000f-71ef-12dd80000000", - "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac478704410b7a5b5c3aWed, 15 Apr 2020 06:35:02 GMT\"0x8D7E10720C6557B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", - "x-ms-client-request-id" : "db954143-f91c-46f8-986a-b265e62059f6", + "x-ms-request-id" : "7d415fa8-501e-001c-370a-57c3e2000000", + "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac92e99312ed998fe949Fri, 10 Jul 2020 22:35:45 GMT\"0x8D8252196062CB2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:35:46 GMT", + "x-ms-client-request-id" : "8432f840-2d7c-47f4-9a10-0026a16cc632", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac478704410b7a5b5c3a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac92e99312ed998fe949?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6d872110-099c-4398-a430-c0a462f8dbaa" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa96c1f2-de69-457a-a037-514e881f88e9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde74a9e-001e-00fa-20ef-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", - "x-ms-client-request-id" : "6d872110-099c-4398-a430-c0a462f8dbaa" + "x-ms-request-id" : "4de8195c-901e-002c-200a-577d2d000000", + "Date" : "Fri, 10 Jul 2020 22:35:46 GMT", + "x-ms-client-request-id" : "fa96c1f2-de69-457a-a037-514e881f88e9" }, "Exception" : null } ], - "variables" : [ "jtcdownloadac0blobapitestdownloadac478704410b7a5b5c3a", "javablobdownloadac1blobapitestdownloadac478536034c3c624" ] + "variables" : [ "jtcdownloadac0blobapitestdownloadac92e99312ed998fe949", "javablobdownloadac1blobapitestdownloadac92e404761070c54" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[4].json index fabb1a135aea..c832241e5031 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[4].json @@ -1,78 +1,100 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadaccab98766a8639a6932?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadacff691487687d0b4a76?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fb89c5b3-347a-4b13-b4cc-db361a9fd7af" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a1da168-4750-42cd-b594-c0fe31b4ee9e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10721096226", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:03 GMT", + "ETag" : "0x8D825219798A7E3", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d790721-f01e-00ab-20ef-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:02 GMT", - "x-ms-client-request-id" : "fb89c5b3-347a-4b13-b4cc-db361a9fd7af" + "x-ms-request-id" : "0100aa61-901e-0013-600a-57b58e000000", + "Date" : "Fri, 10 Jul 2020 22:35:47 GMT", + "x-ms-client-request-id" : "5a1da168-4750-42cd-b594-c0fe31b4ee9e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadaccab98766a8639a6932/javablobdownloadac1blobapitestdownloadaccab4531368c6fe5", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadacff691487687d0b4a76/javablobdownloadac1blobapitestdownloadacff6316466c1e016", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "52426a89-6887-4fe1-8514-2b0809932dff", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "50dfb01e-c171-4332-bdc6-3b57e1ba3072", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:03 GMT", + "x-ms-version-id" : "2020-07-10T22:35:48.4192417Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10721370B8D", + "ETag" : "0x8D8252197D1F2A1", "Content-Length" : "0", - "x-ms-request-id" : "64294680-601e-000f-52ef-12dd80000000", - "x-ms-client-request-id" : "52426a89-6887-4fe1-8514-2b0809932dff" + "x-ms-request-id" : "8a1cc0d4-301e-00a3-2c0a-57f447000000", + "x-ms-client-request-id" : "50dfb01e-c171-4332-bdc6-3b57e1ba3072" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadacff691487687d0b4a76/javablobdownloadac1blobapitestdownloadacff6316466c1e016?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d15123fd-53fe-4647-af54-b4f920a36a11", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8807ecc6-d01e-0084-360a-57e383000000", + "Date" : "Fri, 10 Jul 2020 22:35:48 GMT", + "x-ms-client-request-id" : "d15123fd-53fe-4647-af54-b4f920a36a11" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadaccab98766a8639a6932/javablobdownloadac1blobapitestdownloadaccab4531368c6fe5", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadacff691487687d0b4a76/javablobdownloadac1blobapitestdownloadacff6316466c1e016", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "758f6c2f-00b5-471e-aabc-9c9942872456" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec151745-8c02-4639-8d99-c8467a3f637d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:03 GMT", + "x-ms-version-id" : "2020-07-10T22:35:48.4192417Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:49 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10721370B8D", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:03 GMT", + "ETag" : "0x8D8252197D1F2A1", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:35:48 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde74bde-001e-00fa-47ef-12f991000000", + "x-ms-request-id" : "2fff8a66-201e-0080-3e0a-576e84000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "758f6c2f-00b5-471e-aabc-9c9942872456", + "x-ms-client-request-id" : "ec151745-8c02-4639-8d99-c8467a3f637d", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -80,43 +102,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "79fdccc5-55f3-4128-817f-3c45b988e256" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "97048f52-de57-43eb-ab84-60455d11a6cf" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79081d-f01e-00ab-03ef-12e764000000", - "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadaccab98766a8639a6932Wed, 15 Apr 2020 06:35:03 GMT\"0x8D7E10721096226\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "79fdccc5-55f3-4128-817f-3c45b988e256", + "x-ms-request-id" : "1b7cd40c-601e-0017-310a-573889000000", + "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadacff691487687d0b4a76Fri, 10 Jul 2020 22:35:48 GMT\"0x8D825219798A7E3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:35:48 GMT", + "x-ms-client-request-id" : "97048f52-de57-43eb-ab84-60455d11a6cf", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadaccab98766a8639a6932?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadacff691487687d0b4a76?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d3b6396c-2617-46c8-870f-73e23a7c0a0f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8926006c-3c65-489a-87c2-c190510c5d16" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "642946b1-601e-000f-7fef-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "d3b6396c-2617-46c8-870f-73e23a7c0a0f" + "x-ms-request-id" : "117fcbbe-e01e-009f-770a-57dd80000000", + "Date" : "Fri, 10 Jul 2020 22:35:49 GMT", + "x-ms-client-request-id" : "8926006c-3c65-489a-87c2-c190510c5d16" }, "Exception" : null } ], - "variables" : [ "jtcdownloadac0blobapitestdownloadaccab98766a8639a6932", "javablobdownloadac1blobapitestdownloadaccab4531368c6fe5" ] + "variables" : [ "jtcdownloadac0blobapitestdownloadacff691487687d0b4a76", "javablobdownloadac1blobapitestdownloadacff6316466c1e016" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[5].json index 220c99cf2d9b..3a3f0553350a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[5].json @@ -1,101 +1,123 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac89e409512417530316?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac16e60500e7eb41e705?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "60b35d13-d93f-496e-b042-c94ab894488b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "702569f9-ca57-4abd-b764-ba0d469867ac" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10721589C4D", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:03 GMT", + "ETag" : "0x8D825219909CAC0", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde74c2b-001e-00fa-09ef-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "60b35d13-d93f-496e-b042-c94ab894488b" + "x-ms-request-id" : "0b0ae39f-a01e-00a1-790a-574aff000000", + "Date" : "Fri, 10 Jul 2020 22:35:49 GMT", + "x-ms-client-request-id" : "702569f9-ca57-4abd-b764-ba0d469867ac" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac89e409512417530316/javablobdownloadac1blobapitestdownloadac89e08009a27c3ea", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac16e60500e7eb41e705/javablobdownloadac1blobapitestdownloadac16e453606aad71a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "95017410-9c37-4b1d-91a2-bc8b88551c21", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4bc336dd-4826-486d-b041-c5177be84709", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:03 GMT", + "x-ms-version-id" : "2020-07-10T22:35:50.8279574Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:50 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:49 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072161CF3D", + "ETag" : "0x8D8252199415602", "Content-Length" : "0", - "x-ms-request-id" : "5d790878-f01e-00ab-5aef-12e764000000", - "x-ms-client-request-id" : "95017410-9c37-4b1d-91a2-bc8b88551c21" + "x-ms-request-id" : "3e04eaa4-f01e-0048-630a-578cb5000000", + "x-ms-client-request-id" : "4bc336dd-4826-486d-b041-c5177be84709" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac89e409512417530316/javablobdownloadac1blobapitestdownloadac89e08009a27c3ea?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac16e60500e7eb41e705/javablobdownloadac1blobapitestdownloadac16e453606aad71a?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4976bfde-4617-46f2-8177-85cd9c3ed5d8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a2493114-1406-4191-9d96-a60baee3c113", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072161CF3D", - "x-ms-lease-id" : "99381f9c-f095-419a-8ac1-1225da5b8757", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:03 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9d84bf9a-601e-0007-130a-57fde1000000", + "Date" : "Fri, 10 Jul 2020 22:35:51 GMT", + "x-ms-client-request-id" : "a2493114-1406-4191-9d96-a60baee3c113" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac16e60500e7eb41e705/javablobdownloadac1blobapitestdownloadac16e453606aad71a?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "89106d2e-1ac4-433b-8cfe-88fbea199112" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8252199415602", + "x-ms-lease-id" : "428c6359-4747-434b-b1bb-83477fed529a", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "642946f8-601e-000f-35ef-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "4976bfde-4617-46f2-8177-85cd9c3ed5d8" + "x-ms-request-id" : "37e3f9d0-401e-003f-320a-575921000000", + "Date" : "Fri, 10 Jul 2020 22:35:50 GMT", + "x-ms-client-request-id" : "89106d2e-1ac4-433b-8cfe-88fbea199112" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac89e409512417530316/javablobdownloadac1blobapitestdownloadac89e08009a27c3ea", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac16e60500e7eb41e705/javablobdownloadac1blobapitestdownloadac16e453606aad71a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7bdaac7e-7d13-4cf9-bb95-2b3b3285a44d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d47ff9f-331c-4619-8097-a2244773b1ef" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "locked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "leased", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:03 GMT", + "x-ms-version-id" : "2020-07-10T22:35:50.8279574Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:50 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", + "Date" : "Fri, 10 Jul 2020 22:35:52 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E1072161CF3D", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:03 GMT", + "ETag" : "0x8D8252199415602", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:35:50 GMT", "x-ms-lease-duration" : "infinite", "Content-Length" : "7", - "x-ms-request-id" : "bde74c8e-001e-00fa-60ef-12f991000000", + "x-ms-request-id" : "cfda4291-f01e-0077-5f0a-574416000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "7bdaac7e-7d13-4cf9-bb95-2b3b3285a44d", + "x-ms-client-request-id" : "3d47ff9f-331c-4619-8097-a2244773b1ef", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -103,43 +125,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b25882b2-c1cf-4442-9022-f7f09235d157" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2aa77e8e-4ea3-4ac7-8df8-3428a07944e6" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d7908dc-f01e-00ab-36ef-12e764000000", - "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac89e409512417530316Wed, 15 Apr 2020 06:35:03 GMT\"0x8D7E10721589C4D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "b25882b2-c1cf-4442-9022-f7f09235d157", + "x-ms-request-id" : "39126b2c-401e-00a9-080a-5750f0000000", + "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac16e60500e7eb41e705Fri, 10 Jul 2020 22:35:50 GMT\"0x8D825219909CAC0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:35:51 GMT", + "x-ms-client-request-id" : "2aa77e8e-4ea3-4ac7-8df8-3428a07944e6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac89e409512417530316?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac16e60500e7eb41e705?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "41137959-842f-4258-b7c5-452071820fc1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13eaaba0-c5c3-45b4-a17c-fdaddf5b23d1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64294729-601e-000f-57ef-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "41137959-842f-4258-b7c5-452071820fc1" + "x-ms-request-id" : "a6b89acb-b01e-003b-760a-57d426000000", + "Date" : "Fri, 10 Jul 2020 22:35:51 GMT", + "x-ms-client-request-id" : "13eaaba0-c5c3-45b4-a17c-fdaddf5b23d1" }, "Exception" : null } ], - "variables" : [ "jtcdownloadac0blobapitestdownloadac89e409512417530316", "javablobdownloadac1blobapitestdownloadac89e08009a27c3ea" ] + "variables" : [ "jtcdownloadac0blobapitestdownloadac16e60500e7eb41e705", "javablobdownloadac1blobapitestdownloadac16e453606aad71a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[6].json new file mode 100644 index 000000000000..4ff8c725a232 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadac[6].json @@ -0,0 +1,143 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac43c483550e83ca1fb9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cda2dcd0-1507-48ac-8fc1-4194bb46896b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D825219AAA016B", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8e27c240-801e-000f-6a0a-57e7ee000000", + "Date" : "Fri, 10 Jul 2020 22:35:53 GMT", + "x-ms-client-request-id" : "cda2dcd0-1507-48ac-8fc1-4194bb46896b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac43c483550e83ca1fb9/javablobdownloadac1blobapitestdownloadac43c28218ccccb7c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "504a5ac9-1274-4289-8bba-fd0128ff6ae8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:35:53.5258804Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:53 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:35:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825219ADD28B4", + "Content-Length" : "0", + "x-ms-request-id" : "21c0930c-f01e-0083-800a-578fe0000000", + "x-ms-client-request-id" : "504a5ac9-1274-4289-8bba-fd0128ff6ae8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac43c483550e83ca1fb9/javablobdownloadac1blobapitestdownloadac43c28218ccccb7c?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0fa1331-18d6-4ea3-93fc-6ecb39681754", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "73d0e948-301e-0057-590a-573fb1000000", + "Date" : "Fri, 10 Jul 2020 22:35:53 GMT", + "x-ms-client-request-id" : "a0fa1331-18d6-4ea3-93fc-6ecb39681754" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac43c483550e83ca1fb9/javablobdownloadac1blobapitestdownloadac43c28218ccccb7c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a8287f63-3c4d-4498-ab4b-80bf3f9c589f" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-10T22:35:53.5258804Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:35:53 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Fri, 10 Jul 2020 22:35:54 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D825219ADD28B4", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:35:53 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "8e6927fa-901e-0003-040a-5770e6000000", + "Body" : "[100, 101, 102, 97, 117, 108, 116]", + "x-ms-client-request-id" : "a8287f63-3c4d-4498-ab4b-80bf3f9c589f", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a2698ea-24cb-43e9-9b4a-e9fc7f921c59" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "36898ca5-501e-008a-4d0a-57ca33000000", + "Body" : "jtcdownloadacjtcdownloadac0blobapitestdownloadac43c483550e83ca1fb9Fri, 10 Jul 2020 22:35:53 GMT\"0x8D825219AAA016B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:35:54 GMT", + "x-ms-client-request-id" : "3a2698ea-24cb-43e9-9b4a-e9fc7f921c59", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadac0blobapitestdownloadac43c483550e83ca1fb9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9216038-4239-4bb2-b56a-13efac3ed59a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "78b83a8a-001e-0073-460a-57c911000000", + "Date" : "Fri, 10 Jul 2020 22:35:54 GMT", + "x-ms-client-request-id" : "b9216038-4239-4bb2-b56a-13efac3ed59a" + }, + "Exception" : null + } ], + "variables" : [ "jtcdownloadac0blobapitestdownloadac43c483550e83ca1fb9", "javablobdownloadac1blobapitestdownloadac43c28218ccccb7c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[0].json index 1ef1d716271a..c4d828f5d86c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[0].json @@ -1,112 +1,111 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail3f007237090d11?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail658790947a7544?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3279b110-d2b5-4ea6-8245-e8b38d1e24d1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "abf1ccf3-0886-4495-8a0c-8cdfc407859a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107219342A6", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:04 GMT", + "ETag" : "0x8D82521AE101192", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde74cf4-001e-00fa-2eef-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "3279b110-d2b5-4ea6-8245-e8b38d1e24d1" + "x-ms-request-id" : "b6ec2aca-901e-0061-320a-57b2c1000000", + "Date" : "Fri, 10 Jul 2020 22:36:25 GMT", + "x-ms-client-request-id" : "abf1ccf3-0886-4495-8a0c-8cdfc407859a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail3f007237090d11/javablobdownloadacfail1blobapitestdownloadacfail3f069269b82", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail658790947a7544/javablobdownloadacfail1blobapitestdownloadacfail65876733cf4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a827eade-da2a-4588-a623-20840314399e", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b480a15-3a97-4c21-857a-30b36d69923f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:04 GMT", + "x-ms-version-id" : "2020-07-10T22:36:26.3512713Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:26 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", + "Date" : "Fri, 10 Jul 2020 22:36:25 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107219C7542", + "ETag" : "0x8D82521AE6DC374", "Content-Length" : "0", - "x-ms-request-id" : "5d79095d-f01e-00ab-20ef-12e764000000", - "x-ms-client-request-id" : "a827eade-da2a-4588-a623-20840314399e" + "x-ms-request-id" : "f01bd2af-601e-004a-2c0a-57320d000000", + "x-ms-client-request-id" : "3b480a15-3a97-4c21-857a-30b36d69923f" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail3f007237090d11/javablobdownloadacfail1blobapitestdownloadacfail3f069269b82", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail658790947a7544/javablobdownloadacfail1blobapitestdownloadacfail65876733cf4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1b9ca1f1-ec2e-4a35-b226-6dc798bb9f01" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7472f4f-a721-4b94-9f39-9ba4c4d74701" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "304", - "x-ms-request-id" : "6429475d-601e-000f-77ef-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "1b9ca1f1-ec2e-4a35-b226-6dc798bb9f01" + "x-ms-request-id" : "dbbe8562-a01e-0045-600a-574461000000", + "Date" : "Fri, 10 Jul 2020 22:36:26 GMT", + "x-ms-client-request-id" : "d7472f4f-a721-4b94-9f39-9ba4c4d74701" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6c0b5dec-7a63-4198-838b-3959c0730e3f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "26fadd8b-7029-4df7-a085-86b51ba60b19" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde74d51-001e-00fa-75ef-12f991000000", - "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfail3f007237090d11Wed, 15 Apr 2020 06:35:04 GMT\"0x8D7E107219342A6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "6c0b5dec-7a63-4198-838b-3959c0730e3f", + "x-ms-request-id" : "9f657049-a01e-0055-6f0a-578109000000", + "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfail658790947a7544Fri, 10 Jul 2020 22:36:25 GMT\"0x8D82521AE101192\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:36:26 GMT", + "x-ms-client-request-id" : "26fadd8b-7029-4df7-a085-86b51ba60b19", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail3f007237090d11?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail658790947a7544?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4fc21413-8059-4325-8644-060c63373524" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9fc6cadb-6645-423c-8a07-c70bfb3ab780" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7909a7-f01e-00ab-60ef-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", - "x-ms-client-request-id" : "4fc21413-8059-4325-8644-060c63373524" + "x-ms-request-id" : "997f6519-d01e-005f-6c0a-5725be000000", + "Date" : "Fri, 10 Jul 2020 22:36:27 GMT", + "x-ms-client-request-id" : "9fc6cadb-6645-423c-8a07-c70bfb3ab780" }, "Exception" : null } ], - "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfail3f007237090d11", "javablobdownloadacfail1blobapitestdownloadacfail3f069269b82" ] + "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfail658790947a7544", "javablobdownloadacfail1blobapitestdownloadacfail65876733cf4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[1].json index aae1f564ffdc..5266204af3ed 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[1].json @@ -1,70 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail2ba78467da81c2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail0de51330d9e4dd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "42327af6-cca4-4851-bbae-089aea88e06d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0c027c16-1505-4b24-92b8-cc4e1b4514b4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10721C17C5F", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:04 GMT", + "ETag" : "0x8D82521AF9C12CA", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429478a-601e-000f-17ef-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "42327af6-cca4-4851-bbae-089aea88e06d" + "x-ms-request-id" : "a5007dd1-101e-006f-2d0a-579b71000000", + "Date" : "Fri, 10 Jul 2020 22:36:27 GMT", + "x-ms-client-request-id" : "0c027c16-1505-4b24-92b8-cc4e1b4514b4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail2ba78467da81c2/javablobdownloadacfail1blobapitestdownloadacfail2ba219101ea", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail0de51330d9e4dd/javablobdownloadacfail1blobapitestdownloadacfail0de17868ed5", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2e2b03bc-9077-41be-9a3f-7281537049b9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca331021-a00d-4635-a4bc-c1d4d24f448a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:04 GMT", + "x-ms-version-id" : "2020-07-10T22:36:28.7429756Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:28 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:03 GMT", + "Date" : "Fri, 10 Jul 2020 22:36:27 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10721CABC3F", + "ETag" : "0x8D82521AFDADC7C", "Content-Length" : "0", - "x-ms-request-id" : "bde74dc7-001e-00fa-53ef-12f991000000", - "x-ms-client-request-id" : "2e2b03bc-9077-41be-9a3f-7281537049b9" + "x-ms-request-id" : "2653ecb6-001e-002e-370a-57c395000000", + "x-ms-client-request-id" : "ca331021-a00d-4635-a4bc-c1d4d24f448a" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail2ba78467da81c2/javablobdownloadacfail1blobapitestdownloadacfail2ba219101ea", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail0de51330d9e4dd/javablobdownloadacfail1blobapitestdownloadacfail0de17868ed5", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b732a70c-d012-4905-9fe1-b2dc17717490" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7694dcad-3769-4ba1-9b1a-6809069eb51e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "5d790a22-f01e-00ab-47ef-12e764000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5d790a22-f01e-00ab-47ef-12e764000000\nTime:2020-04-15T06:35:04.4770819Z", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "b732a70c-d012-4905-9fe1-b2dc17717490", + "x-ms-request-id" : "713a0d73-a01e-007a-4e0a-578cc2000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:713a0d73-a01e-007a-4e0a-578cc2000000\nTime:2020-07-10T22:36:29.1555832Z", + "Date" : "Fri, 10 Jul 2020 22:36:28 GMT", + "x-ms-client-request-id" : "7694dcad-3769-4ba1-9b1a-6809069eb51e", "Content-Type" : "application/xml" }, "Exception" : null @@ -72,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "096b838a-16cf-4f96-88eb-cc289bedaf4f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "480c2b3c-5aa7-46a3-bd30-801c5fd01c84" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "642947b2-601e-000f-32ef-12dd80000000", - "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfail2ba78467da81c2Wed, 15 Apr 2020 06:35:04 GMT\"0x8D7E10721C17C5F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "096b838a-16cf-4f96-88eb-cc289bedaf4f", + "x-ms-request-id" : "63c85e45-b01e-0092-3b0a-571554000000", + "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfail0de51330d9e4ddFri, 10 Jul 2020 22:36:28 GMT\"0x8D82521AF9C12CA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:36:29 GMT", + "x-ms-client-request-id" : "480c2b3c-5aa7-46a3-bd30-801c5fd01c84", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail2ba78467da81c2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail0de51330d9e4dd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ccef29c0-31c3-460f-8c04-a6ff51d46845" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37f9b52e-8588-41fe-9efa-1a3bc083051d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde74e1a-001e-00fa-0fef-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "ccef29c0-31c3-460f-8c04-a6ff51d46845" + "x-ms-request-id" : "012bf06e-f01e-003a-2f0a-578bfa000000", + "Date" : "Fri, 10 Jul 2020 22:36:29 GMT", + "x-ms-client-request-id" : "37f9b52e-8588-41fe-9efa-1a3bc083051d" }, "Exception" : null } ], - "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfail2ba78467da81c2", "javablobdownloadacfail1blobapitestdownloadacfail2ba219101ea" ] + "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfail0de51330d9e4dd", "javablobdownloadacfail1blobapitestdownloadacfail0de17868ed5" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[2].json index 10fa2aa12b6b..38e9ae75ff66 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[2].json @@ -1,70 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailb82897054a4602?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail7cf2384352a140?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f3e5a5af-d4d7-4afb-a3fc-6b5ae663a603" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae87f2d9-f69e-48a4-8ab4-558f34d5ca10" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10721F16237", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:04 GMT", + "ETag" : "0x8D82521B0CF32C6", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:30 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d790a5e-f01e-00ab-77ef-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "f3e5a5af-d4d7-4afb-a3fc-6b5ae663a603" + "x-ms-request-id" : "17e79537-901e-005e-380a-577a62000000", + "Date" : "Fri, 10 Jul 2020 22:36:29 GMT", + "x-ms-client-request-id" : "ae87f2d9-f69e-48a4-8ab4-558f34d5ca10" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailb82897054a4602/javablobdownloadacfail1blobapitestdownloadacfailb821525334b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail7cf2384352a140/javablobdownloadacfail1blobapitestdownloadacfail7cf52482daf", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "08f82936-58b7-498b-bccc-c80754ed39f3", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "42ffd2e0-5a78-4e58-bc25-2b54c6154af6", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:04 GMT", + "x-ms-version-id" : "2020-07-10T22:36:30.6973681Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", + "Date" : "Fri, 10 Jul 2020 22:36:30 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10722069B0F", + "ETag" : "0x8D82521B10513F1", "Content-Length" : "0", - "x-ms-request-id" : "642947e8-601e-000f-58ef-12dd80000000", - "x-ms-client-request-id" : "08f82936-58b7-498b-bccc-c80754ed39f3" + "x-ms-request-id" : "54358e0a-301e-000a-710a-573535000000", + "x-ms-client-request-id" : "42ffd2e0-5a78-4e58-bc25-2b54c6154af6" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailb82897054a4602/javablobdownloadacfail1blobapitestdownloadacfailb821525334b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail7cf2384352a140/javablobdownloadacfail1blobapitestdownloadacfail7cf52482daf", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ad9cf4f5-2842-472f-a8f6-82c17ed3ae33" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "71f77454-817c-457a-867a-047f4eecb5ab" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "bde74eef-001e-00fa-44ef-12f991000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bde74eef-001e-00fa-44ef-12f991000000\nTime:2020-04-15T06:35:04.9512751Z", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "ad9cf4f5-2842-472f-a8f6-82c17ed3ae33", + "x-ms-request-id" : "72c9803f-301e-001a-590a-57f05d000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:72c9803f-301e-001a-590a-57f05d000000\nTime:2020-07-10T22:36:31.0715735Z", + "Date" : "Fri, 10 Jul 2020 22:36:31 GMT", + "x-ms-client-request-id" : "71f77454-817c-457a-867a-047f4eecb5ab", "Content-Type" : "application/xml" }, "Exception" : null @@ -72,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "84abdb2d-4de4-490a-8d2b-bb5f853300c2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "58633225-f90a-41ca-8375-95c74b962313" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d790afb-f01e-00ab-74ef-12e764000000", - "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfailb82897054a4602Wed, 15 Apr 2020 06:35:04 GMT\"0x8D7E10721F16237\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "84abdb2d-4de4-490a-8d2b-bb5f853300c2", + "x-ms-request-id" : "2f0d3633-001e-003e-410a-5706fd000000", + "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfail7cf2384352a140Fri, 10 Jul 2020 22:36:30 GMT\"0x8D82521B0CF32C6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:36:31 GMT", + "x-ms-client-request-id" : "58633225-f90a-41ca-8375-95c74b962313", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailb82897054a4602?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail7cf2384352a140?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ffa01348-de5d-4ea6-9260-dc9027debd81" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad266426-00af-4e4c-b37c-6757cbbe670c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64294840-601e-000f-25ef-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "ffa01348-de5d-4ea6-9260-dc9027debd81" + "x-ms-request-id" : "e799fc89-601e-0075-190a-57faae000000", + "Date" : "Fri, 10 Jul 2020 22:36:31 GMT", + "x-ms-client-request-id" : "ad266426-00af-4e4c-b37c-6757cbbe670c" }, "Exception" : null } ], - "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfailb82897054a4602", "javablobdownloadacfail1blobapitestdownloadacfailb821525334b" ] + "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfail7cf2384352a140", "javablobdownloadacfail1blobapitestdownloadacfail7cf52482daf" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[3].json index e3e3d1c31733..c6d61f0935f4 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[3].json @@ -1,144 +1,144 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail99706292b72339?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail6592138266a36a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "99315412-c026-4dc7-b69f-63720d8466a8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a077cd5-fa61-489e-81cc-f607cf561df3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072255B0B7", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:05 GMT", + "ETag" : "0x8D82521B1E6B4E6", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde74f99-001e-00fa-4fef-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", - "x-ms-client-request-id" : "99315412-c026-4dc7-b69f-63720d8466a8" + "x-ms-request-id" : "01a72999-401e-0086-330a-575d3b000000", + "Date" : "Fri, 10 Jul 2020 22:36:31 GMT", + "x-ms-client-request-id" : "8a077cd5-fa61-489e-81cc-f607cf561df3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail99706292b72339/javablobdownloadacfail1blobapitestdownloadacfail99701303c66", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail6592138266a36a/javablobdownloadacfail1blobapitestdownloadacfail6593795642c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "82b98949-3b25-47db-9704-38f198bb2e97", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4956bdc4-d462-4676-a72b-ab407ee2419c", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:05 GMT", + "x-ms-version-id" : "2020-07-10T22:36:32.5466863Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:32 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:04 GMT", + "Date" : "Fri, 10 Jul 2020 22:36:31 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107225EE24E", + "ETag" : "0x8D82521B21F42EF", "Content-Length" : "0", - "x-ms-request-id" : "5d790bcd-f01e-00ab-2fef-12e764000000", - "x-ms-client-request-id" : "82b98949-3b25-47db-9704-38f198bb2e97" + "x-ms-request-id" : "4c4abbd5-701e-0046-3d0a-57a505000000", + "x-ms-client-request-id" : "4956bdc4-d462-4676-a72b-ab407ee2419c" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail99706292b72339/javablobdownloadacfail1blobapitestdownloadacfail99701303c66", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail6592138266a36a/javablobdownloadacfail1blobapitestdownloadacfail6593795642c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "624f3f42-4b80-49a9-8df7-eedba0880f75" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "53487e25-ce42-4cfb-8455-e2ef7d03d962" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:05 GMT", + "x-ms-version-id" : "2020-07-10T22:36:32.5466863Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:32 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", + "Date" : "Fri, 10 Jul 2020 22:36:32 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E107225EE24E", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:05 GMT", + "ETag" : "0x8D82521B21F42EF", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:36:32 GMT", "Content-Length" : "7", - "x-ms-request-id" : "64294899-601e-000f-70ef-12dd80000000", - "x-ms-client-request-id" : "624f3f42-4b80-49a9-8df7-eedba0880f75", + "x-ms-request-id" : "31d071df-501e-007e-6d0a-5701c5000000", + "x-ms-client-request-id" : "53487e25-ce42-4cfb-8455-e2ef7d03d962", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail99706292b72339/javablobdownloadacfail1blobapitestdownloadacfail99701303c66", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail6592138266a36a/javablobdownloadacfail1blobapitestdownloadacfail6593795642c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8a7262fe-8c67-4b5a-8878-418bf8f1bedd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "21e7eb41-365e-48fc-8130-aa7806e1ed32" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "304", - "x-ms-request-id" : "bde74fef-001e-00fa-0eef-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "8a7262fe-8c67-4b5a-8878-418bf8f1bedd" + "x-ms-request-id" : "3c52eef7-401e-0096-310a-579853000000", + "Date" : "Fri, 10 Jul 2020 22:36:32 GMT", + "x-ms-client-request-id" : "21e7eb41-365e-48fc-8130-aa7806e1ed32" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f890d1e9-d8b4-4bee-9e27-2febf5d66999" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6370601b-23e1-40ef-8d8d-63f562dbf025" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d790c11-f01e-00ab-69f0-12e764000000", - "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfail99706292b72339Wed, 15 Apr 2020 06:35:05 GMT\"0x8D7E1072255B0B7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "f890d1e9-d8b4-4bee-9e27-2febf5d66999", + "x-ms-request-id" : "b2544890-e01e-0019-0d0a-571139000000", + "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfail6592138266a36aFri, 10 Jul 2020 22:36:32 GMT\"0x8D82521B1E6B4E6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:36:33 GMT", + "x-ms-client-request-id" : "6370601b-23e1-40ef-8d8d-63f562dbf025", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail99706292b72339?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail6592138266a36a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f528ede2-4401-4233-a291-5b3062a655cd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad85c0fa-30d6-4fe3-8309-1b1435e8c14f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "642948d3-601e-000f-18f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "f528ede2-4401-4233-a291-5b3062a655cd" + "x-ms-request-id" : "36f1a681-f01e-0015-4e0a-578631000000", + "Date" : "Fri, 10 Jul 2020 22:36:33 GMT", + "x-ms-client-request-id" : "ad85c0fa-30d6-4fe3-8309-1b1435e8c14f" }, "Exception" : null } ], - "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfail99706292b72339", "javablobdownloadacfail1blobapitestdownloadacfail99701303c66" ] + "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfail6592138266a36a", "javablobdownloadacfail1blobapitestdownloadacfail6593795642c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[4].json index bac52ff9dbc8..b5f6e75f6fdf 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[4].json @@ -1,92 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfaild8264540d22311?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailf6c5393671b8e0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bf15989e-5243-4ac9-87d1-7eec7e557029" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "547f958e-928c-442b-a794-e1bfb14bbd91" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072296C13B", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:05 GMT", + "ETag" : "0x8D82521B34F7A66", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde75075-001e-00fa-7cf0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "bf15989e-5243-4ac9-87d1-7eec7e557029" + "x-ms-request-id" : "06534d21-301e-0025-060a-5738fe000000", + "Date" : "Fri, 10 Jul 2020 22:36:33 GMT", + "x-ms-client-request-id" : "547f958e-928c-442b-a794-e1bfb14bbd91" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfaild8264540d22311/javablobdownloadacfail1blobapitestdownloadacfaild82463032cf", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailf6c5393671b8e0/javablobdownloadacfail1blobapitestdownloadacfailf6c20969b47", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7a98e96c-d09e-484c-8b06-eaa8efa0bfc7", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7597845e-bf37-40fd-a6b4-4cb3bd82cc90", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:05 GMT", + "x-ms-version-id" : "2020-07-10T22:36:34.9293849Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:34 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", + "Date" : "Fri, 10 Jul 2020 22:36:34 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107229F5616", + "ETag" : "0x8D82521B38AD519", "Content-Length" : "0", - "x-ms-request-id" : "5d790c6a-f01e-00ab-2ef0-12e764000000", - "x-ms-client-request-id" : "7a98e96c-d09e-484c-8b06-eaa8efa0bfc7" + "x-ms-request-id" : "f5dab711-501e-009a-520a-570f5b000000", + "x-ms-client-request-id" : "7597845e-bf37-40fd-a6b4-4cb3bd82cc90" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfaild8264540d22311/javablobdownloadacfail1blobapitestdownloadacfaild82463032cf?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailf6c5393671b8e0/javablobdownloadacfail1blobapitestdownloadacfailf6c20969b47?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2597e1e0-8c44-4b72-9a65-8d29590ecc35" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c9e3e64-1dd2-4fc0-b19a-d326098e4feb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107229F5616", - "x-ms-lease-id" : "c9c3f3d1-aa92-4233-9859-9c62c9628d4b", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:05 GMT", + "ETag" : "0x8D82521B38AD519", + "x-ms-lease-id" : "671aec9a-c420-43ec-8d8d-9849919206e7", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64294906-601e-000f-3af0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "2597e1e0-8c44-4b72-9a65-8d29590ecc35" + "x-ms-request-id" : "b1b2fc07-101e-0032-130a-5791f5000000", + "Date" : "Fri, 10 Jul 2020 22:36:34 GMT", + "x-ms-client-request-id" : "1c9e3e64-1dd2-4fc0-b19a-d326098e4feb" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfaild8264540d22311/javablobdownloadacfail1blobapitestdownloadacfaild82463032cf", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailf6c5393671b8e0/javablobdownloadacfail1blobapitestdownloadacfailf6c20969b47", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ce74faee-4221-4bbb-a0da-d4c7286289f9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a01b9b5f-7b11-4707-87c3-8094cfc0633c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "bde750d0-001e-00fa-4cf0-12f991000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:bde750d0-001e-00fa-4cf0-12f991000000\nTime:2020-04-15T06:35:05.9211999Z", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "ce74faee-4221-4bbb-a0da-d4c7286289f9", + "x-ms-request-id" : "02c47ddf-601e-0091-190a-57f430000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:02c47ddf-601e-0091-190a-57f430000000\nTime:2020-07-10T22:36:35.8206736Z", + "Date" : "Fri, 10 Jul 2020 22:36:35 GMT", + "x-ms-client-request-id" : "a01b9b5f-7b11-4707-87c3-8094cfc0633c", "Content-Type" : "application/xml" }, "Exception" : null @@ -94,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9177821b-dabc-4d85-9e7f-efc1f3115ba2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b78b1a4-798a-40f3-bd4f-e9db1c6c912c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d790ca0-f01e-00ab-59f0-12e764000000", - "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfaild8264540d22311Wed, 15 Apr 2020 06:35:05 GMT\"0x8D7E1072296C13B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "9177821b-dabc-4d85-9e7f-efc1f3115ba2", + "x-ms-request-id" : "41cd0e59-001e-0001-110a-57ce5e000000", + "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfailf6c5393671b8e0Fri, 10 Jul 2020 22:36:34 GMT\"0x8D82521B34F7A66\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:36:35 GMT", + "x-ms-client-request-id" : "0b78b1a4-798a-40f3-bd4f-e9db1c6c912c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfaild8264540d22311?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfailf6c5393671b8e0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0b2cf66a-b5d3-4f40-b3f7-0f4e5af0298f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ccf7c877-6fe2-463e-bf76-5717b331683e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429492b-601e-000f-55f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:05 GMT", - "x-ms-client-request-id" : "0b2cf66a-b5d3-4f40-b3f7-0f4e5af0298f" + "x-ms-request-id" : "69e62022-d01e-0060-6b0a-57ed1d000000", + "Date" : "Fri, 10 Jul 2020 22:36:35 GMT", + "x-ms-client-request-id" : "ccf7c877-6fe2-463e-bf76-5717b331683e" }, "Exception" : null } ], - "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfaild8264540d22311", "javablobdownloadacfail1blobapitestdownloadacfaild82463032cf" ] + "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfailf6c5393671b8e0", "javablobdownloadacfail1blobapitestdownloadacfailf6c20969b47" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[5].json new file mode 100644 index 000000000000..daca5f078e89 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestdownloadacfail[5].json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail830729558a7768?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a962566e-6151-40e5-8bb4-03226e527627" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82521B4AE6759", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9de085da-401e-005d-090a-579b06000000", + "Date" : "Fri, 10 Jul 2020 22:36:36 GMT", + "x-ms-client-request-id" : "a962566e-6151-40e5-8bb4-03226e527627" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail830729558a7768/javablobdownloadacfail1blobapitestdownloadacfail830415741f3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2dfec957-9e9e-48ca-acc2-db4743f523a9", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:36:37.1539695Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:36:37 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:36:36 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82521B4DE46EF", + "Content-Length" : "0", + "x-ms-request-id" : "78c66c4e-901e-0095-760a-577937000000", + "x-ms-client-request-id" : "2dfec957-9e9e-48ca-acc2-db4743f523a9" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail830729558a7768/javablobdownloadacfail1blobapitestdownloadacfail830415741f3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40a9dbae-a453-493c-9d7a-a6706fe0ab02" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "a1c22115-d01e-002d-2a0a-5722f1000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:a1c22115-d01e-002d-2a0a-5722f1000000\nTime:2020-07-10T22:36:37.5054876Z", + "Date" : "Fri, 10 Jul 2020 22:36:37 GMT", + "x-ms-client-request-id" : "40a9dbae-a453-493c-9d7a-a6706fe0ab02", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcdownloadacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ff4141c-addb-4a52-829d-d685671538a4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fc480b33-d01e-003d-4a0a-57e799000000", + "Body" : "jtcdownloadacfailjtcdownloadacfail0blobapitestdownloadacfail830729558a7768Fri, 10 Jul 2020 22:36:36 GMT\"0x8D82521B4AE6759\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:36:37 GMT", + "x-ms-client-request-id" : "5ff4141c-addb-4a52-829d-d685671538a4", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcdownloadacfail0blobapitestdownloadacfail830729558a7768?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa94e75c-686c-4141-8548-571b507dc8d9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "02d6aa5c-001e-004c-320a-5701b2000000", + "Date" : "Fri, 10 Jul 2020 22:36:37 GMT", + "x-ms-client-request-id" : "fa94e75c-686c-4141-8548-571b507dc8d9" + }, + "Exception" : null + } ], + "variables" : [ "jtcdownloadacfail0blobapitestdownloadacfail830729558a7768", "javablobdownloadacfail1blobapitestdownloadacfail830415741f3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[0].json index ad4171715e7a..8bed264d5b98 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[0].json @@ -1,79 +1,101 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac5c35497896e2d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc3984440d71b6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9bbb0636-7c97-41ac-97d0-6c1382262f51" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1f237dd2-7986-4aa3-8309-761815f40fd5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10724B6CAC0", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "ETag" : "0x8D825222A9BE024", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:54 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde758b3-001e-00fa-74f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:08 GMT", - "x-ms-client-request-id" : "9bbb0636-7c97-41ac-97d0-6c1382262f51" + "x-ms-request-id" : "9de2e21f-401e-005d-500b-579b06000000", + "Date" : "Fri, 10 Jul 2020 22:39:54 GMT", + "x-ms-client-request-id" : "1f237dd2-7986-4aa3-8309-761815f40fd5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac5c35497896e2d/javablobgetpropertiesac1blobapitestgetpropertiesac5c357954aa", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc3984440d71b6/javablobgetpropertiesac1blobapitestgetpropertiesacc3970434c1", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1c46d5d4-b6ff-4281-ab56-1186b92a2fb3", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f2388ef-50df-4d01-bf6f-a2f2b15f330c", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "x-ms-version-id" : "2020-07-10T22:39:55.4212543Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:55 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:08 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:55 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10724BF83D7", + "ETag" : "0x8D825222B0B76BF", "Content-Length" : "0", - "x-ms-request-id" : "5d7912ca-f01e-00ab-7df0-12e764000000", - "x-ms-client-request-id" : "1c46d5d4-b6ff-4281-ab56-1186b92a2fb3" + "x-ms-request-id" : "78c772b8-901e-0095-100b-577937000000", + "x-ms-client-request-id" : "2f2388ef-50df-4d01-bf6f-a2f2b15f330c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc3984440d71b6/javablobgetpropertiesac1blobapitestgetpropertiesacc3970434c1?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46761a74-1807-481f-b4e3-7c651a038ceb", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a1c2a78e-d01e-002d-0c0b-5722f1000000", + "Date" : "Fri, 10 Jul 2020 22:39:55 GMT", + "x-ms-client-request-id" : "46761a74-1807-481f-b4e3-7c651a038ceb" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac5c35497896e2d/javablobgetpropertiesac1blobapitestgetpropertiesac5c357954aa", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc3984440d71b6/javablobgetpropertiesac1blobapitestgetpropertiesacc3970434c1", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bc8440ec-dc6a-459c-95b6-32389076a7de" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d19e2900-739a-451c-9b3b-595ce4a477f9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "x-ms-version-id" : "2020-07-10T22:39:55.4212543Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:55 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10724BF83D7", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:09 GMT", + "ETag" : "0x8D825222B0B76BF", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:39:55 GMT", "Content-Length" : "7", - "x-ms-request-id" : "64294cc4-601e-000f-2af0-12dd80000000", - "x-ms-client-request-id" : "bc8440ec-dc6a-459c-95b6-32389076a7de", + "x-ms-request-id" : "fc4908cd-d01e-003d-4a0b-57e799000000", + "x-ms-client-request-id" : "d19e2900-739a-451c-9b3b-595ce4a477f9", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -81,43 +103,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b6bdb142-45eb-4751-b366-bc78df7c8bdd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92b65a18-c6eb-4458-9e86-10360b88b25e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7592b-001e-00fa-5bf0-12f991000000", - "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesac5c35497896e2dWed, 15 Apr 2020 06:35:09 GMT\"0x8D7E10724B6CAC0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:08 GMT", - "x-ms-client-request-id" : "b6bdb142-45eb-4751-b366-bc78df7c8bdd", + "x-ms-request-id" : "02d75fa5-001e-004c-140b-5701b2000000", + "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesacc3984440d71b6Fri, 10 Jul 2020 22:39:54 GMT\"0x8D825222A9BE024\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:39:56 GMT", + "x-ms-client-request-id" : "92b65a18-c6eb-4458-9e86-10360b88b25e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac5c35497896e2d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc3984440d71b6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f597de3e-b2a7-439e-9929-c6fce47af24f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8925ec7-6832-44f8-91db-0750b3b4f7e2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79130a-f01e-00ab-33f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", - "x-ms-client-request-id" : "f597de3e-b2a7-439e-9929-c6fce47af24f" + "x-ms-request-id" : "4ea39f36-901e-003c-490b-57b845000000", + "Date" : "Fri, 10 Jul 2020 22:39:57 GMT", + "x-ms-client-request-id" : "f8925ec7-6832-44f8-91db-0750b3b4f7e2" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesac5c35497896e2d", "javablobgetpropertiesac1blobapitestgetpropertiesac5c357954aa" ] + "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesacc3984440d71b6", "javablobgetpropertiesac1blobapitestgetpropertiesacc3970434c1" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[1].json index 1e6279c716b4..8d79221a999b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[1].json @@ -1,79 +1,101 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc8f068982234d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacf11357867e248?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "34ee8e2d-147f-4341-a599-6b167179e15c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f0ac300-1d2e-4be9-9eb4-76850c4f7a54" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10724E39EED", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "ETag" : "0x8D825222C5A65BA", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64294cfd-601e-000f-58f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", - "x-ms-client-request-id" : "34ee8e2d-147f-4341-a599-6b167179e15c" + "x-ms-request-id" : "3d7b648c-701e-0024-0c0b-576722000000", + "Date" : "Fri, 10 Jul 2020 22:39:57 GMT", + "x-ms-client-request-id" : "2f0ac300-1d2e-4be9-9eb4-76850c4f7a54" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc8f068982234d/javablobgetpropertiesac1blobapitestgetpropertiesacc8f9223317", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacf11357867e248/javablobgetpropertiesac1blobapitestgetpropertiesacf113522727", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "31a45aa8-9be5-4347-8d91-0f2a2a702a3d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "20a8023d-1762-4030-8fab-a41f1a94b823", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "x-ms-version-id" : "2020-07-10T22:39:58.0211065Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:58 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:57 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10724EC920A", + "ETag" : "0x8D825222C982B79", "Content-Length" : "0", - "x-ms-request-id" : "bde75981-001e-00fa-2cf0-12f991000000", - "x-ms-client-request-id" : "31a45aa8-9be5-4347-8d91-0f2a2a702a3d" + "x-ms-request-id" : "f5c8df50-601e-0028-290b-57f02a000000", + "x-ms-client-request-id" : "20a8023d-1762-4030-8fab-a41f1a94b823" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacf11357867e248/javablobgetpropertiesac1blobapitestgetpropertiesacf113522727?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "97958809-328e-4d55-8e60-62b04f0fe14c", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "e2eec0a2-201e-0074-080b-57a572000000", + "Date" : "Fri, 10 Jul 2020 22:39:58 GMT", + "x-ms-client-request-id" : "97958809-328e-4d55-8e60-62b04f0fe14c" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc8f068982234d/javablobgetpropertiesac1blobapitestgetpropertiesacc8f9223317", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacf11357867e248/javablobgetpropertiesac1blobapitestgetpropertiesacf113522727", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6921e9d5-14e8-44b4-a1dc-92a3e165c958" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc7b6808-b46b-4bbd-8db9-2f2cc0558bca" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "x-ms-version-id" : "2020-07-10T22:39:58.0211065Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:58 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:58 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10724EC920A", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:09 GMT", + "ETag" : "0x8D825222C982B79", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:39:58 GMT", "Content-Length" : "7", - "x-ms-request-id" : "5d791366-f01e-00ab-80f0-12e764000000", - "x-ms-client-request-id" : "6921e9d5-14e8-44b4-a1dc-92a3e165c958", + "x-ms-request-id" : "44112f34-801e-0099-250b-57ee3f000000", + "x-ms-client-request-id" : "cc7b6808-b46b-4bbd-8db9-2f2cc0558bca", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -81,43 +103,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b11ce177-a625-4874-b59c-0fa9aa3bdd63" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e219c757-9eb0-4f38-8d3d-94c314d7d133" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64294d2a-601e-000f-7af0-12dd80000000", - "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesacc8f068982234dWed, 15 Apr 2020 06:35:09 GMT\"0x8D7E10724E39EED\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", - "x-ms-client-request-id" : "b11ce177-a625-4874-b59c-0fa9aa3bdd63", + "x-ms-request-id" : "7916af86-e01e-0009-7d0b-57d451000000", + "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesacf11357867e248Fri, 10 Jul 2020 22:39:57 GMT\"0x8D825222C5A65BA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:39:59 GMT", + "x-ms-client-request-id" : "e219c757-9eb0-4f38-8d3d-94c314d7d133", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacc8f068982234d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacf11357867e248?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d768d5a7-d2a4-4f59-9cd8-d8b9978df4d9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9db74a4b-16e6-422c-9bf4-ccdd4b9b5ba9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde759d2-001e-00fa-6ff0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", - "x-ms-client-request-id" : "d768d5a7-d2a4-4f59-9cd8-d8b9978df4d9" + "x-ms-request-id" : "192d8620-c01e-0021-050b-57b5f9000000", + "Date" : "Fri, 10 Jul 2020 22:39:59 GMT", + "x-ms-client-request-id" : "9db74a4b-16e6-422c-9bf4-ccdd4b9b5ba9" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesacc8f068982234d", "javablobgetpropertiesac1blobapitestgetpropertiesacc8f9223317" ] + "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesacf11357867e248", "javablobgetpropertiesac1blobapitestgetpropertiesacf113522727" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[2].json index 77019fd059aa..601761254168 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[2].json @@ -1,79 +1,101 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac406222377fdbb?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesaca6984506d502d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "93535f6c-e748-4a51-963d-e77b21a68f17" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2ff0225-0ef6-4ba3-a072-08b3560ea587" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107251116A2", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "ETag" : "0x8D825222DB90995", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:59 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d7913b1-f01e-00ab-40f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", - "x-ms-client-request-id" : "93535f6c-e748-4a51-963d-e77b21a68f17" + "x-ms-request-id" : "d2e66e3f-301e-009c-020b-573ce4000000", + "Date" : "Fri, 10 Jul 2020 22:39:59 GMT", + "x-ms-client-request-id" : "b2ff0225-0ef6-4ba3-a072-08b3560ea587" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac406222377fdbb/javablobgetpropertiesac1blobapitestgetpropertiesac406450896a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesaca6984506d502d/javablobgetpropertiesac1blobapitestgetpropertiesaca6931782aa", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "522fba6a-2f7f-4517-9397-243513bcc27b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ab8a36c-4a5e-435c-936e-ac54930fd16f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "x-ms-version-id" : "2020-07-10T22:40:00.2807175Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:00 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:59 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107251A1595", + "ETag" : "0x8D825222DF0F587", "Content-Length" : "0", - "x-ms-request-id" : "64294d46-601e-000f-15f0-12dd80000000", - "x-ms-client-request-id" : "522fba6a-2f7f-4517-9397-243513bcc27b" + "x-ms-request-id" : "161abbc0-201e-0090-4f0b-57abec000000", + "x-ms-client-request-id" : "0ab8a36c-4a5e-435c-936e-ac54930fd16f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesaca6984506d502d/javablobgetpropertiesac1blobapitestgetpropertiesaca6931782aa?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6cd2c4a-0f45-49fc-bb1d-9c2bf486d82c", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "33bc0fe3-101e-0050-460b-5753d2000000", + "Date" : "Fri, 10 Jul 2020 22:40:00 GMT", + "x-ms-client-request-id" : "b6cd2c4a-0f45-49fc-bb1d-9c2bf486d82c" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac406222377fdbb/javablobgetpropertiesac1blobapitestgetpropertiesac406450896a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesaca6984506d502d/javablobgetpropertiesac1blobapitestgetpropertiesaca6931782aa", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a41df530-07bd-4216-941d-7de971ef7451" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1143f3b1-02b7-4fa0-af5c-11177c34fbd6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:09 GMT", + "x-ms-version-id" : "2020-07-10T22:40:00.2807175Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", + "Date" : "Fri, 10 Jul 2020 22:40:00 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E107251A1595", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:09 GMT", + "ETag" : "0x8D825222DF0F587", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:40:00 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde75a2a-001e-00fa-3df0-12f991000000", - "x-ms-client-request-id" : "a41df530-07bd-4216-941d-7de971ef7451", + "x-ms-request-id" : "5e41fe9b-c01e-00a7-300b-577940000000", + "x-ms-client-request-id" : "1143f3b1-02b7-4fa0-af5c-11177c34fbd6", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -81,43 +103,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "182e6ced-d810-4755-be9c-c989ef8d1dac" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e80b94df-34c0-4224-b855-ed419bf13be1" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d791401-f01e-00ab-05f0-12e764000000", - "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesac406222377fdbbWed, 15 Apr 2020 06:35:09 GMT\"0x8D7E107251116A2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", - "x-ms-client-request-id" : "182e6ced-d810-4755-be9c-c989ef8d1dac", + "x-ms-request-id" : "9c83d75b-c01e-006c-7a0b-577a15000000", + "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesaca6984506d502dFri, 10 Jul 2020 22:39:59 GMT\"0x8D825222DB90995\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:40:01 GMT", + "x-ms-client-request-id" : "e80b94df-34c0-4224-b855-ed419bf13be1", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac406222377fdbb?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesaca6984506d502d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "59e19e8e-c676-4932-b970-b8ce4e045c49" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ffe80971-cb09-494c-9082-3b46703edbc5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64294d7c-601e-000f-3cf0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "59e19e8e-c676-4932-b970-b8ce4e045c49" + "x-ms-request-id" : "8731016b-d01e-0094-3d0b-5726eb000000", + "Date" : "Fri, 10 Jul 2020 22:40:01 GMT", + "x-ms-client-request-id" : "ffe80971-cb09-494c-9082-3b46703edbc5" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesac406222377fdbb", "javablobgetpropertiesac1blobapitestgetpropertiesac406450896a" ] + "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesaca6984506d502d", "javablobgetpropertiesac1blobapitestgetpropertiesaca6931782aa" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[3].json index 439b61a34234..e989ea33fc2b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[3].json @@ -1,111 +1,135 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac7cd418284dbaf?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac6f166886b61ba?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "28166e08-17de-4b07-b4ac-52de9b47af5a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa33f308-dbe2-42a9-bf57-d935ef8508b4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107254215BE", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "ETag" : "0x8D825222F064A7B", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:02 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde75a96-001e-00fa-19f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", - "x-ms-client-request-id" : "28166e08-17de-4b07-b4ac-52de9b47af5a" + "x-ms-request-id" : "0e25d1a6-c01e-0098-1b0b-57b1e3000000", + "Date" : "Fri, 10 Jul 2020 22:40:01 GMT", + "x-ms-client-request-id" : "aa33f308-dbe2-42a9-bf57-d935ef8508b4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac7cd418284dbaf/javablobgetpropertiesac1blobapitestgetpropertiesac7cd74857a6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac6f166886b61ba/javablobgetpropertiesac1blobapitestgetpropertiesac6f18768348", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1f7ea32a-35bf-44bd-8cd0-2bfb87caa4d9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b887fefb-b3c0-44a4-8a61-b64bc27b336e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "x-ms-version-id" : "2020-07-10T22:40:02.4412569Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:02 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", + "Date" : "Fri, 10 Jul 2020 22:40:01 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107254A31C2", + "ETag" : "0x8D825222F3AA199", "Content-Length" : "0", - "x-ms-request-id" : "5d791452-f01e-00ab-4df0-12e764000000", - "x-ms-client-request-id" : "1f7ea32a-35bf-44bd-8cd0-2bfb87caa4d9" + "x-ms-request-id" : "7d42064c-501e-001c-440b-57c3e2000000", + "x-ms-client-request-id" : "b887fefb-b3c0-44a4-8a61-b64bc27b336e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac6f166886b61ba/javablobgetpropertiesac1blobapitestgetpropertiesac6f18768348?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ae5a9a2-97c8-457b-9150-ff61faf98d4d", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4de960f2-901e-002c-160b-577d2d000000", + "Date" : "Fri, 10 Jul 2020 22:40:02 GMT", + "x-ms-client-request-id" : "5ae5a9a2-97c8-457b-9150-ff61faf98d4d" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac7cd418284dbaf/javablobgetpropertiesac1blobapitestgetpropertiesac7cd74857a6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac6f166886b61ba/javablobgetpropertiesac1blobapitestgetpropertiesac6f18768348", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aa8d193e-4932-4d8a-8e05-51ae2430f581" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3623816c-264f-42d4-a132-5fe5cb454751" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "x-ms-version-id" : "2020-07-10T22:40:02.4412569Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", + "Date" : "Fri, 10 Jul 2020 22:40:02 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E107254A31C2", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:10 GMT", + "ETag" : "0x8D825222F3AA199", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:40:02 GMT", "Content-Length" : "7", - "x-ms-request-id" : "64294da4-601e-000f-60f0-12dd80000000", - "x-ms-client-request-id" : "aa8d193e-4932-4d8a-8e05-51ae2430f581", + "x-ms-request-id" : "0101fc6b-901e-0013-100b-57b58e000000", + "x-ms-client-request-id" : "3623816c-264f-42d4-a132-5fe5cb454751", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac7cd418284dbaf/javablobgetpropertiesac1blobapitestgetpropertiesac7cd74857a6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac6f166886b61ba/javablobgetpropertiesac1blobapitestgetpropertiesac6f18768348", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8ad7a019-cce9-4abe-92eb-49a30f938996" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8f166a03-91e8-4dea-b2dd-2f5649bda520" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "x-ms-version-id" : "2020-07-10T22:40:02.4412569Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:02 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", + "Date" : "Fri, 10 Jul 2020 22:40:03 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E107254A31C2", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:10 GMT", + "ETag" : "0x8D825222F3AA199", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:40:02 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde75ae6-001e-00fa-5df0-12f991000000", - "x-ms-client-request-id" : "8ad7a019-cce9-4abe-92eb-49a30f938996", + "x-ms-request-id" : "8a1db988-301e-00a3-020b-57f447000000", + "x-ms-client-request-id" : "8f166a03-91e8-4dea-b2dd-2f5649bda520", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -113,43 +137,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3ce908df-2bda-48de-bfb3-deabc83efe5d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7a197d7-2f9a-4271-aca1-aaaaea95f6b5" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79148d-f01e-00ab-7ff0-12e764000000", - "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesac7cd418284dbafWed, 15 Apr 2020 06:35:10 GMT\"0x8D7E107254215BE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:09 GMT", - "x-ms-client-request-id" : "3ce908df-2bda-48de-bfb3-deabc83efe5d", + "x-ms-request-id" : "4ef69379-a01e-0027-2d0b-578646000000", + "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesac6f166886b61baFri, 10 Jul 2020 22:40:02 GMT\"0x8D825222F064A7B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:40:03 GMT", + "x-ms-client-request-id" : "b7a197d7-2f9a-4271-aca1-aaaaea95f6b5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac7cd418284dbaf?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac6f166886b61ba?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8e5816bf-52ec-4ef4-91d4-1cc4d78049aa" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ddff3d3-c803-40a2-b661-0a7980bd7e00" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64294dc8-601e-000f-7df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "8e5816bf-52ec-4ef4-91d4-1cc4d78049aa" + "x-ms-request-id" : "0762be74-701e-00a2-150b-57ab9b000000", + "Date" : "Fri, 10 Jul 2020 22:40:03 GMT", + "x-ms-client-request-id" : "3ddff3d3-c803-40a2-b661-0a7980bd7e00" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesac7cd418284dbaf", "javablobgetpropertiesac1blobapitestgetpropertiesac7cd74857a6" ] + "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesac6f166886b61ba", "javablobgetpropertiesac1blobapitestgetpropertiesac6f18768348" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[4].json index 475416a4071a..108c1fba3eb7 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[4].json @@ -1,79 +1,101 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac3c0528852d996?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacbbc580128d879?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "35dc99ff-5c92-4776-a2fc-e66639a91558" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "62bcdaa3-0739-498c-8dfc-df1354b10e8d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10725784E31", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "ETag" : "0x8D82522307D3B33", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde75b55-001e-00fa-42f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "35dc99ff-5c92-4776-a2fc-e66639a91558" + "x-ms-request-id" : "e84ad6df-d01e-0070-7c0b-572875000000", + "Date" : "Fri, 10 Jul 2020 22:40:04 GMT", + "x-ms-client-request-id" : "62bcdaa3-0739-498c-8dfc-df1354b10e8d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac3c0528852d996/javablobgetpropertiesac1blobapitestgetpropertiesac3c06977645", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacbbc580128d879/javablobgetpropertiesac1blobapitestgetpropertiesacbbc211759c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "934724ea-f22e-4a59-8ce1-f30978cacdd7", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "91010ed6-b076-4449-9b00-bd1bf1aa8989", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "x-ms-version-id" : "2020-07-10T22:40:04.8809955Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:04 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", + "Date" : "Fri, 10 Jul 2020 22:40:04 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10725812D62", + "ETag" : "0x8D8252230AEE7E3", "Content-Length" : "0", - "x-ms-request-id" : "5d7914b5-f01e-00ab-21f0-12e764000000", - "x-ms-client-request-id" : "934724ea-f22e-4a59-8ce1-f30978cacdd7" + "x-ms-request-id" : "0b343e09-f01e-0058-710b-5749dd000000", + "x-ms-client-request-id" : "91010ed6-b076-4449-9b00-bd1bf1aa8989" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacbbc580128d879/javablobgetpropertiesac1blobapitestgetpropertiesacbbc211759c?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff7aceb0-6ed3-4186-a463-f9635f6d1a84", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9748c1bf-b01e-002b-610b-57114e000000", + "Date" : "Fri, 10 Jul 2020 22:40:04 GMT", + "x-ms-client-request-id" : "ff7aceb0-6ed3-4186-a463-f9635f6d1a84" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac3c0528852d996/javablobgetpropertiesac1blobapitestgetpropertiesac3c06977645", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacbbc580128d879/javablobgetpropertiesac1blobapitestgetpropertiesacbbc211759c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ed54b2e6-892d-47ce-ad8a-1ba3c7911234" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c95eeef-a0ac-4182-954a-fb6dbd0b5c80" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "x-ms-version-id" : "2020-07-10T22:40:04.8809955Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:04 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", + "Date" : "Fri, 10 Jul 2020 22:40:04 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10725812D62", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:10 GMT", + "ETag" : "0x8D8252230AEE7E3", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:40:04 GMT", "Content-Length" : "7", - "x-ms-request-id" : "64294df1-601e-000f-1df0-12dd80000000", - "x-ms-client-request-id" : "ed54b2e6-892d-47ce-ad8a-1ba3c7911234", + "x-ms-request-id" : "39eda1a7-101e-008b-650b-5795ef000000", + "x-ms-client-request-id" : "7c95eeef-a0ac-4182-954a-fb6dbd0b5c80", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -81,43 +103,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4508ba51-f6e2-45b5-9f79-42a02e1db654" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1f9670c-c078-46c5-b55f-bb34959d1736" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde75baa-001e-00fa-0ef0-12f991000000", - "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesac3c0528852d996Wed, 15 Apr 2020 06:35:10 GMT\"0x8D7E10725784E31\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "4508ba51-f6e2-45b5-9f79-42a02e1db654", + "x-ms-request-id" : "e932ef35-e01e-00a0-500b-571523000000", + "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesacbbc580128d879Fri, 10 Jul 2020 22:40:04 GMT\"0x8D82522307D3B33\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:40:05 GMT", + "x-ms-client-request-id" : "e1f9670c-c078-46c5-b55f-bb34959d1736", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac3c0528852d996?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesacbbc580128d879?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0a0033f0-1574-4e1c-976f-f1e1c2c88507" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7926bab-4242-4ae6-aa91-9bd42d35ad29" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7914e3-f01e-00ab-4af0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "0a0033f0-1574-4e1c-976f-f1e1c2c88507" + "x-ms-request-id" : "9580c870-f01e-0093-210b-574a88000000", + "Date" : "Fri, 10 Jul 2020 22:40:05 GMT", + "x-ms-client-request-id" : "d7926bab-4242-4ae6-aa91-9bd42d35ad29" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesac3c0528852d996", "javablobgetpropertiesac1blobapitestgetpropertiesac3c06977645" ] + "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesacbbc580128d879", "javablobgetpropertiesac1blobapitestgetpropertiesacbbc211759c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[5].json index 2e3e3a46a7ff..3cfe9e769bac 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[5].json @@ -1,102 +1,124 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac51b802907dfab?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac8f0094900edb4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3bfcbe81-ce22-4031-ab05-2c34f04b3938" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "80674c89-0822-41c1-b6d6-ce468ea94996" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10725A76B81", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "ETag" : "0x8D8252231B2F2FD", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64294e23-601e-000f-48f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "3bfcbe81-ce22-4031-ab05-2c34f04b3938" + "x-ms-request-id" : "264ceb6e-f01e-0067-590b-57817e000000", + "Date" : "Fri, 10 Jul 2020 22:40:05 GMT", + "x-ms-client-request-id" : "80674c89-0822-41c1-b6d6-ce468ea94996" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac51b802907dfab/javablobgetpropertiesac1blobapitestgetpropertiesac51b2798153", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac8f0094900edb4/javablobgetpropertiesac1blobapitestgetpropertiesac8f07090889", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3ff5b346-7d67-4280-92a9-bced657f1c84", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "de8d8e3c-5494-4379-9456-0dc49b3d17dd", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "x-ms-version-id" : "2020-07-10T22:40:06.8994331Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:06 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", + "Date" : "Fri, 10 Jul 2020 22:40:06 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10725B0D446", + "ETag" : "0x8D8252231E2E51B", "Content-Length" : "0", - "x-ms-request-id" : "bde75c2c-001e-00fa-07f0-12f991000000", - "x-ms-client-request-id" : "3ff5b346-7d67-4280-92a9-bced657f1c84" + "x-ms-request-id" : "a6ba557e-b01e-003b-470b-57d426000000", + "x-ms-client-request-id" : "de8d8e3c-5494-4379-9456-0dc49b3d17dd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac51b802907dfab/javablobgetpropertiesac1blobapitestgetpropertiesac51b2798153?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac8f0094900edb4/javablobgetpropertiesac1blobapitestgetpropertiesac8f07090889?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "76c33a43-8a4b-46a8-aa77-7082dff5497d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f928102-b57d-4ec5-b5a7-f92f63a9b369", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10725B0D446", - "x-ms-lease-id" : "2e86629c-fe3e-4508-a585-6dadac0f4984", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8e287448-801e-000f-280b-57e7ee000000", + "Date" : "Fri, 10 Jul 2020 22:40:06 GMT", + "x-ms-client-request-id" : "4f928102-b57d-4ec5-b5a7-f92f63a9b369" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac8f0094900edb4/javablobgetpropertiesac1blobapitestgetpropertiesac8f07090889?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69eab0fc-c560-446a-b89a-98c7a21e7bf6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8252231E2E51B", + "x-ms-lease-id" : "04df28e9-4dc0-47c0-b6fc-60267ac10dd7", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d791523-f01e-00ab-03f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "76c33a43-8a4b-46a8-aa77-7082dff5497d" + "x-ms-request-id" : "21c18aab-f01e-0083-560b-578fe0000000", + "Date" : "Fri, 10 Jul 2020 22:40:07 GMT", + "x-ms-client-request-id" : "69eab0fc-c560-446a-b89a-98c7a21e7bf6" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac51b802907dfab/javablobgetpropertiesac1blobapitestgetpropertiesac51b2798153", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac8f0094900edb4/javablobgetpropertiesac1blobapitestgetpropertiesac8f07090889", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ca3151fc-df27-423b-9e30-04832fc999a6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6df8c8c3-5305-412b-980c-46765ad1a8b4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "locked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "leased", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:10 GMT", + "x-ms-version-id" : "2020-07-10T22:40:06.8994331Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:06 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", + "Date" : "Fri, 10 Jul 2020 22:40:07 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10725B0D446", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:10 GMT", + "ETag" : "0x8D8252231E2E51B", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:40:06 GMT", "x-ms-lease-duration" : "infinite", "Content-Length" : "7", - "x-ms-request-id" : "64294e77-601e-000f-05f0-12dd80000000", - "x-ms-client-request-id" : "ca3151fc-df27-423b-9e30-04832fc999a6", + "x-ms-request-id" : "73d26391-301e-0057-4a0b-573fb1000000", + "x-ms-client-request-id" : "6df8c8c3-5305-412b-980c-46765ad1a8b4", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -104,43 +126,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "16548e1c-9a9c-4ce0-9d12-43630d49773c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "78e9ba99-202e-40de-bfaf-4c901df8a884" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde75c93-001e-00fa-61f0-12f991000000", - "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesac51b802907dfabWed, 15 Apr 2020 06:35:10 GMT\"0x8D7E10725A76B81\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "16548e1c-9a9c-4ce0-9d12-43630d49773c", + "x-ms-request-id" : "d176cefd-801e-001f-240b-572286000000", + "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesac8f0094900edb4Fri, 10 Jul 2020 22:40:06 GMT\"0x8D8252231B2F2FD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:40:07 GMT", + "x-ms-client-request-id" : "78e9ba99-202e-40de-bfaf-4c901df8a884", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac51b802907dfab?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac8f0094900edb4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c63fa91a-24ea-49dc-a13e-3ef99d7c91dc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bab36a66-c6ac-45a9-83de-b646fe62e63b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79156a-f01e-00ab-43f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "c63fa91a-24ea-49dc-a13e-3ef99d7c91dc" + "x-ms-request-id" : "98ab56b5-e01e-006b-1e0b-571676000000", + "Date" : "Fri, 10 Jul 2020 22:40:07 GMT", + "x-ms-client-request-id" : "bab36a66-c6ac-45a9-83de-b646fe62e63b" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesac51b802907dfab", "javablobgetpropertiesac1blobapitestgetpropertiesac51b2798153" ] + "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesac8f0094900edb4", "javablobgetpropertiesac1blobapitestgetpropertiesac8f07090889" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[6].json new file mode 100644 index 000000000000..e787ca836a1c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesac[6].json @@ -0,0 +1,144 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac46c327859245c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7e037c9-f02b-4c3e-b48e-f42db626f343" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8252233376F63", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:09 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5f6420c6-201e-0016-410b-576755000000", + "Date" : "Fri, 10 Jul 2020 22:40:08 GMT", + "x-ms-client-request-id" : "b7e037c9-f02b-4c3e-b48e-f42db626f343" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac46c327859245c/javablobgetpropertiesac1blobapitestgetpropertiesac46c13142f4", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ee0fc19-af3e-4a6b-896d-c71200b4baf6", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:40:09.5072915Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:09 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:40:08 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825223370AB7E", + "Content-Length" : "0", + "x-ms-request-id" : "7df21fc4-b01e-0076-180b-571bca000000", + "x-ms-client-request-id" : "2ee0fc19-af3e-4a6b-896d-c71200b4baf6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac46c327859245c/javablobgetpropertiesac1blobapitestgetpropertiesac46c13142f4?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15ea27ac-f241-4c14-a181-8a1236b1d652", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "10fe7ad3-101e-009b-120b-575087000000", + "Date" : "Fri, 10 Jul 2020 22:40:09 GMT", + "x-ms-client-request-id" : "15ea27ac-f241-4c14-a181-8a1236b1d652" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac46c327859245c/javablobgetpropertiesac1blobapitestgetpropertiesac46c13142f4", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7eb30161-fe46-419b-9135-9a608a9fb522" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-10T22:40:09.5072915Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:40:09 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Fri, 10 Jul 2020 22:40:09 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "ETag" : "0x8D825223370AB7E", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:40:09 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "9e2f9480-a01e-009e-620b-57825c000000", + "x-ms-client-request-id" : "7eb30161-fe46-419b-9135-9a608a9fb522", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7b868926-0b2c-411a-815d-714f4e6c4e59" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ddeea9c4-a01e-0037-680b-57432e000000", + "Body" : "jtcgetpropertiesacjtcgetpropertiesac0blobapitestgetpropertiesac46c327859245cFri, 10 Jul 2020 22:40:09 GMT\"0x8D8252233376F63\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:40:10 GMT", + "x-ms-client-request-id" : "7b868926-0b2c-411a-815d-714f4e6c4e59", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesac0blobapitestgetpropertiesac46c327859245c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "10c45793-395b-4c6d-9e83-4d7e97969e48" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "9f33ee56-201e-005b-160b-57a8b9000000", + "Date" : "Fri, 10 Jul 2020 22:40:10 GMT", + "x-ms-client-request-id" : "10c45793-395b-4c6d-9e83-4d7e97969e48" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetpropertiesac0blobapitestgetpropertiesac46c327859245c", "javablobgetpropertiesac1blobapitestgetpropertiesac46c13142f4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[0].json index 7455bf2cd81e..885dfd09c724 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[0].json @@ -1,112 +1,111 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail30b827323?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail7e5312897?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "87cebcb6-7a13-40b1-a1db-fcd11958423d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6027a66a-2586-4dd4-8de2-a0d90228ff64" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10725DB3206", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:11 GMT", + "ETag" : "0x8D825220A59DD57", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:00 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64294ea8-601e-000f-2df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "87cebcb6-7a13-40b1-a1db-fcd11958423d" + "x-ms-request-id" : "78b95c9d-001e-0073-3d0a-57c911000000", + "Date" : "Fri, 10 Jul 2020 22:39:00 GMT", + "x-ms-client-request-id" : "6027a66a-2586-4dd4-8de2-a0d90228ff64" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail30b827323/javablobgetpropertiesacfail115236b87a9b77c90a48c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail7e5312897/javablobgetpropertiesacfail197634c727e332b42f4f7", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "252f0f56-a551-4902-8e36-93c86a77e396", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "86316007-a2ae-4d7b-a3a7-39942af0fbb3", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:11 GMT", + "x-ms-version-id" : "2020-07-10T22:39:01.3227042Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:01 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:00 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10725E51027", + "ETag" : "0x8D825220ACC8712", "Content-Length" : "0", - "x-ms-request-id" : "bde75d27-001e-00fa-61f0-12f991000000", - "x-ms-client-request-id" : "252f0f56-a551-4902-8e36-93c86a77e396" + "x-ms-request-id" : "10fe59e9-101e-009b-1c0a-575087000000", + "x-ms-client-request-id" : "86316007-a2ae-4d7b-a3a7-39942af0fbb3" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail30b827323/javablobgetpropertiesacfail115236b87a9b77c90a48c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail7e5312897/javablobgetpropertiesacfail197634c727e332b42f4f7", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "25af5b38-64c0-4852-b8a3-1cdc77db021f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd4f509a-3bf9-4259-be62-cb56434d2e6d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "304", - "x-ms-request-id" : "5d7915e4-f01e-00ab-30f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "25af5b38-64c0-4852-b8a3-1cdc77db021f" + "x-ms-request-id" : "4e8de956-501e-0033-030a-57ce29000000", + "Date" : "Fri, 10 Jul 2020 22:39:01 GMT", + "x-ms-client-request-id" : "fd4f509a-3bf9-4259-be62-cb56434d2e6d" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e09de6d2-9972-4da5-968c-46d479fb581b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b1e85c9-6113-4072-bb23-fd9d86c838be" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64294ed7-601e-000f-53f0-12dd80000000", - "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail30b827323Wed, 15 Apr 2020 06:35:11 GMT\"0x8D7E10725DB3206\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "e09de6d2-9972-4da5-968c-46d479fb581b", + "x-ms-request-id" : "a12e0d3e-101e-007f-130a-575e19000000", + "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail7e5312897Fri, 10 Jul 2020 22:39:00 GMT\"0x8D825220A59DD57\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:39:01 GMT", + "x-ms-client-request-id" : "0b1e85c9-6113-4072-bb23-fd9d86c838be", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail30b827323?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail7e5312897?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bac06f96-75d0-4c94-be82-2da8016fc961" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9575a0cc-1825-4987-864a-ca29e4747216" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde75d70-001e-00fa-1ef0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:10 GMT", - "x-ms-client-request-id" : "bac06f96-75d0-4c94-be82-2da8016fc961" + "x-ms-request-id" : "56ead36f-f01e-002a-260a-574e92000000", + "Date" : "Fri, 10 Jul 2020 22:39:02 GMT", + "x-ms-client-request-id" : "9575a0cc-1825-4987-864a-ca29e4747216" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail30b827323", "javablobgetpropertiesacfail115236b87a9b77c90a48c" ] + "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail7e5312897", "javablobgetpropertiesacfail197634c727e332b42f4f7" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[1].json index 135da2a120fc..118dd030f767 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[1].json @@ -1,111 +1,110 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail989669544?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail348681803?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ab5cf65c-f2a2-4966-9da1-defd14588ab5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2bf8d8c5-d506-4a1a-aa03-d1bc823a70f6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072603797B", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:11 GMT", + "ETag" : "0x8D825220BE24928", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d791627-f01e-00ab-68f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "ab5cf65c-f2a2-4966-9da1-defd14588ab5" + "x-ms-request-id" : "e1e261c2-e01e-0026-6d0a-57d99a000000", + "Date" : "Fri, 10 Jul 2020 22:39:02 GMT", + "x-ms-client-request-id" : "2bf8d8c5-d506-4a1a-aa03-d1bc823a70f6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail989669544/javablobgetpropertiesacfail1226961d9737bc52604d4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail348681803/javablobgetpropertiesacfail158391323e93ddc3a1489", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4f315446-d7d3-4e7c-ab94-1b7912be9cc4", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5f0bb1c-3019-4490-b460-3228931e46bd", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:11 GMT", + "x-ms-version-id" : "2020-07-10T22:39:03.5683035Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:03 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:03 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107260BDB4D", + "ETag" : "0x8D825220C2354DB", "Content-Length" : "0", - "x-ms-request-id" : "64294ef8-601e-000f-6ff0-12dd80000000", - "x-ms-client-request-id" : "4f315446-d7d3-4e7c-ab94-1b7912be9cc4" + "x-ms-request-id" : "997fc56c-d01e-005f-760a-5725be000000", + "x-ms-client-request-id" : "d5f0bb1c-3019-4490-b460-3228931e46bd" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail989669544/javablobgetpropertiesacfail1226961d9737bc52604d4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail348681803/javablobgetpropertiesacfail158391323e93ddc3a1489", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "537068cb-6020-46c2-b406-9547947b8dd4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fdb96c81-3e67-44dc-be52-5fd4b3dc4465" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "bde75dcb-001e-00fa-6ef0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "537068cb-6020-46c2-b406-9547947b8dd4" + "x-ms-request-id" : "a50182dc-101e-006f-470a-579b71000000", + "Date" : "Fri, 10 Jul 2020 22:39:03 GMT", + "x-ms-client-request-id" : "fdb96c81-3e67-44dc-be52-5fd4b3dc4465" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b646689e-ff66-450a-86d6-d02d062a8d4c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b8fc9ad-0316-453d-91f4-e3c7993cfe2b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79167c-f01e-00ab-33f0-12e764000000", - "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail989669544Wed, 15 Apr 2020 06:35:11 GMT\"0x8D7E1072603797B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "b646689e-ff66-450a-86d6-d02d062a8d4c", + "x-ms-request-id" : "2654fe5e-001e-002e-790a-57c395000000", + "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail348681803Fri, 10 Jul 2020 22:39:03 GMT\"0x8D825220BE24928\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:39:04 GMT", + "x-ms-client-request-id" : "3b8fc9ad-0316-453d-91f4-e3c7993cfe2b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail989669544?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail348681803?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dc4d2ea7-7b7a-45b8-b8b0-858187261d71" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0bf0afe9-5c72-41db-b82a-05da0e648dec" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64294f18-601e-000f-0df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "dc4d2ea7-7b7a-45b8-b8b0-858187261d71" + "x-ms-request-id" : "10e57e69-001e-0097-3b0a-57c78f000000", + "Date" : "Fri, 10 Jul 2020 22:39:04 GMT", + "x-ms-client-request-id" : "0bf0afe9-5c72-41db-b82a-05da0e648dec" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail989669544", "javablobgetpropertiesacfail1226961d9737bc52604d4" ] + "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail348681803", "javablobgetpropertiesacfail158391323e93ddc3a1489" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[2].json index 919f221a59dd..3b6a51e9941b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[2].json @@ -1,111 +1,110 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail07a912699?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail1d7894755?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0a5dcffb-426d-4dbd-a1fa-48e6a54baa7e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3410c7e8-99df-405d-87fc-e40564c9750d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107262D99EB", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:11 GMT", + "ETag" : "0x8D825220D0D6FD9", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:05 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde75e24-001e-00fa-38f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "0a5dcffb-426d-4dbd-a1fa-48e6a54baa7e" + "x-ms-request-id" : "63c8e59a-b01e-0092-160a-571554000000", + "Date" : "Fri, 10 Jul 2020 22:39:04 GMT", + "x-ms-client-request-id" : "3410c7e8-99df-405d-87fc-e40564c9750d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail07a912699/javablobgetpropertiesacfail185540070f238cb88a46e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail1d7894755/javablobgetpropertiesacfail1326183121e3a66e61400", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4c540889-ab14-44db-9c94-a376736f0254", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab1e42b8-b712-4567-82e9-2c5f889cb1b5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:11 GMT", + "x-ms-version-id" : "2020-07-10T22:39:05.4716643Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:05 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:05 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107263650D3", + "ETag" : "0x8D825220D45C2E3", "Content-Length" : "0", - "x-ms-request-id" : "5d7916b6-f01e-00ab-65f0-12e764000000", - "x-ms-client-request-id" : "4c540889-ab14-44db-9c94-a376736f0254" + "x-ms-request-id" : "8f9e6669-b01e-0066-2f0a-57dea2000000", + "x-ms-client-request-id" : "ab1e42b8-b712-4567-82e9-2c5f889cb1b5" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail07a912699/javablobgetpropertiesacfail185540070f238cb88a46e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail1d7894755/javablobgetpropertiesacfail1326183121e3a66e61400", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d39202ce-4742-4eeb-97e8-d3899c4e20ee" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bfe1ef0e-0fdc-48b0-afcb-81329f28c761" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "64294f3d-601e-000f-2ff0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "d39202ce-4742-4eeb-97e8-d3899c4e20ee" + "x-ms-request-id" : "5436ba0e-301e-000a-4e0a-573535000000", + "Date" : "Fri, 10 Jul 2020 22:39:05 GMT", + "x-ms-client-request-id" : "bfe1ef0e-0fdc-48b0-afcb-81329f28c761" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ac91a6a7-3476-4e1d-9032-6fd25d2acf33" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bee7fd53-503b-46a5-86d1-4e52c17a52fc" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde75e7e-001e-00fa-07f0-12f991000000", - "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail07a912699Wed, 15 Apr 2020 06:35:11 GMT\"0x8D7E107262D99EB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "ac91a6a7-3476-4e1d-9032-6fd25d2acf33", + "x-ms-request-id" : "72ca82d1-301e-001a-660a-57f05d000000", + "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail1d7894755Fri, 10 Jul 2020 22:39:05 GMT\"0x8D825220D0D6FD9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:39:06 GMT", + "x-ms-client-request-id" : "bee7fd53-503b-46a5-86d1-4e52c17a52fc", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail07a912699?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail1d7894755?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5d7aad56-ad53-473f-8f1a-8afff5185dc7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "25a777f2-245c-4eba-b5bf-7842ca3dd49c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7916ef-f01e-00ab-17f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "5d7aad56-ad53-473f-8f1a-8afff5185dc7" + "x-ms-request-id" : "2f0e12c0-001e-003e-680a-5706fd000000", + "Date" : "Fri, 10 Jul 2020 22:39:06 GMT", + "x-ms-client-request-id" : "25a777f2-245c-4eba-b5bf-7842ca3dd49c" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail07a912699", "javablobgetpropertiesacfail185540070f238cb88a46e" ] + "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail1d7894755", "javablobgetpropertiesacfail1326183121e3a66e61400" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[3].json index f746277c5ec2..e06f1b3a7e54 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[3].json @@ -1,144 +1,144 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfailb7228228b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail33f90246a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "571de363-4132-45e1-ab44-2e263df99836" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69d30bd7-18e5-48ca-ab86-42a6ad660175" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107265C6784", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:12 GMT", + "ETag" : "0x8D825220E28ED8C", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64294f6a-601e-000f-56f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:12 GMT", - "x-ms-client-request-id" : "571de363-4132-45e1-ab44-2e263df99836" + "x-ms-request-id" : "e79adfad-601e-0075-0c0a-57faae000000", + "Date" : "Fri, 10 Jul 2020 22:39:06 GMT", + "x-ms-client-request-id" : "69d30bd7-18e5-48ca-ab86-42a6ad660175" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfailb7228228b/javablobgetpropertiesacfail15002976bcde17034f4b6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail33f90246a/javablobgetpropertiesacfail13959670130e290c1b48d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0c6f64a0-cebf-4ee8-9b94-ecc94e7c5610", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3a26510-5f94-4c23-9cee-0d08bacc22e3", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:12 GMT", + "x-ms-version-id" : "2020-07-10T22:39:07.2819501Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:07 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:06 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10726655B52", + "ETag" : "0x8D825220E59FD2D", "Content-Length" : "0", - "x-ms-request-id" : "bde75ee0-001e-00fa-63f0-12f991000000", - "x-ms-client-request-id" : "0c6f64a0-cebf-4ee8-9b94-ecc94e7c5610" + "x-ms-request-id" : "01a7cffb-401e-0086-200a-575d3b000000", + "x-ms-client-request-id" : "b3a26510-5f94-4c23-9cee-0d08bacc22e3" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfailb7228228b/javablobgetpropertiesacfail15002976bcde17034f4b6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail33f90246a/javablobgetpropertiesacfail13959670130e290c1b48d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6ad0a91e-d721-4cbf-95f9-d44ea155ad58" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3104f11-fed2-4cb3-aa1e-84d7013fcd35" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:12 GMT", + "x-ms-version-id" : "2020-07-10T22:39:07.2819501Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:07 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:07 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10726655B52", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:12 GMT", + "ETag" : "0x8D825220E59FD2D", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:39:07 GMT", "Content-Length" : "7", - "x-ms-request-id" : "5d79175e-f01e-00ab-77f0-12e764000000", - "x-ms-client-request-id" : "6ad0a91e-d721-4cbf-95f9-d44ea155ad58", + "x-ms-request-id" : "4c4bda6d-701e-0046-650a-57a505000000", + "x-ms-client-request-id" : "b3104f11-fed2-4cb3-aa1e-84d7013fcd35", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfailb7228228b/javablobgetpropertiesacfail15002976bcde17034f4b6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail33f90246a/javablobgetpropertiesacfail13959670130e290c1b48d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b7c16e01-1e2c-465c-9de8-72be58be5b5e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "99477218-edb3-4af9-b13f-7e53a8f78e38" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "304", - "x-ms-request-id" : "64294f99-601e-000f-79f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:12 GMT", - "x-ms-client-request-id" : "b7c16e01-1e2c-465c-9de8-72be58be5b5e" + "x-ms-request-id" : "31d0f188-501e-007e-6e0a-5701c5000000", + "Date" : "Fri, 10 Jul 2020 22:39:07 GMT", + "x-ms-client-request-id" : "99477218-edb3-4af9-b13f-7e53a8f78e38" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c94e420a-756a-45e4-8b79-e1201b3e68b6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e33b619d-b25f-4f43-8579-11bd6592192c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde75f34-001e-00fa-31f0-12f991000000", - "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfailb7228228bWed, 15 Apr 2020 06:35:12 GMT\"0x8D7E107265C6784\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "c94e420a-756a-45e4-8b79-e1201b3e68b6", + "x-ms-request-id" : "0e7212ac-601e-005a-500a-57f765000000", + "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail33f90246aFri, 10 Jul 2020 22:39:06 GMT\"0x8D825220E28ED8C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:39:07 GMT", + "x-ms-client-request-id" : "e33b619d-b25f-4f43-8579-11bd6592192c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfailb7228228b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail33f90246a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ad5c1773-1d1d-462d-97a2-4b1695573af9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cf32b084-6842-4e40-8d89-e8637d7dd264" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7917a9-f01e-00ab-39f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", - "x-ms-client-request-id" : "ad5c1773-1d1d-462d-97a2-4b1695573af9" + "x-ms-request-id" : "a2cf4782-801e-0042-4b0a-572802000000", + "Date" : "Fri, 10 Jul 2020 22:39:08 GMT", + "x-ms-client-request-id" : "cf32b084-6842-4e40-8d89-e8637d7dd264" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfailb7228228b", "javablobgetpropertiesacfail15002976bcde17034f4b6" ] + "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail33f90246a", "javablobgetpropertiesacfail13959670130e290c1b48d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[4].json index 0cd37e947b8f..f765a28f648e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[4].json @@ -1,133 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail9a866791a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail917881007?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ddbbacc3-f902-4d15-a2e0-76e32fc617c8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4139d47-e109-4e9c-92ea-f90752c6d8eb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072690CA60", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:12 GMT", + "ETag" : "0x8D825220F559B25", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64294fb9-601e-000f-16f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:12 GMT", - "x-ms-client-request-id" : "ddbbacc3-f902-4d15-a2e0-76e32fc617c8" + "x-ms-request-id" : "fa939657-501e-0051-670a-570c0e000000", + "Date" : "Fri, 10 Jul 2020 22:39:08 GMT", + "x-ms-client-request-id" : "d4139d47-e109-4e9c-92ea-f90752c6d8eb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail9a866791a/javablobgetpropertiesacfail176534bf017a2428a74e6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail917881007/javablobgetpropertiesacfail164265f4b1a8b4e01d43a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "575b4506-a05f-4c34-b5f0-845d954c1c30", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a1fce1a-95a0-4082-a02a-dc02e4674767", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:12 GMT", + "x-ms-version-id" : "2020-07-10T22:39:09.2543558Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:11 GMT", + "Date" : "Fri, 10 Jul 2020 22:39:08 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10726997013", + "ETag" : "0x8D825220F86F446", "Content-Length" : "0", - "x-ms-request-id" : "bde75f8b-001e-00fa-01f0-12f991000000", - "x-ms-client-request-id" : "575b4506-a05f-4c34-b5f0-845d954c1c30" + "x-ms-request-id" : "25d2f7e9-201e-0039-780a-576a9e000000", + "x-ms-client-request-id" : "4a1fce1a-95a0-4082-a02a-dc02e4674767" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail9a866791a/javablobgetpropertiesacfail176534bf017a2428a74e6?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail917881007/javablobgetpropertiesacfail164265f4b1a8b4e01d43a?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "94fa2158-b91a-483e-82e8-43f1cd73e91a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32891e30-a52e-409f-bed6-01e58aac996b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10726997013", - "x-ms-lease-id" : "2266b253-4339-4bd0-83c3-77fee5cb08f3", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:12 GMT", + "ETag" : "0x8D825220F86F446", + "x-ms-lease-id" : "76a8d3eb-314b-434d-8d1b-75ff12753b5a", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d7917e6-f01e-00ab-6ff0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:12 GMT", - "x-ms-client-request-id" : "94fa2158-b91a-483e-82e8-43f1cd73e91a" + "x-ms-request-id" : "09466533-c01e-000e-080a-57b832000000", + "Date" : "Fri, 10 Jul 2020 22:39:09 GMT", + "x-ms-client-request-id" : "32891e30-a52e-409f-bed6-01e58aac996b" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail9a866791a/javablobgetpropertiesacfail176534bf017a2428a74e6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail917881007/javablobgetpropertiesacfail164265f4b1a8b4e01d43a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "791d5f28-95de-436a-a360-148865c5556e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "986810fb-8925-44cf-a5a0-c1c7bb79925f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "StatusCode" : "412", - "x-ms-request-id" : "64294fe0-601e-000f-31f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:12 GMT", - "x-ms-client-request-id" : "791d5f28-95de-436a-a360-148865c5556e" + "x-ms-request-id" : "85cf5d15-b01e-0082-600a-57d03c000000", + "Date" : "Fri, 10 Jul 2020 22:39:09 GMT", + "x-ms-client-request-id" : "986810fb-8925-44cf-a5a0-c1c7bb79925f" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cf5f3134-410e-4822-bce3-af7b946e7133" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a5fe54c-1459-4321-89d7-03453edbfc9e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde75fda-001e-00fa-4bf0-12f991000000", - "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail9a866791aWed, 15 Apr 2020 06:35:12 GMT\"0x8D7E1072690CA60\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:12 GMT", - "x-ms-client-request-id" : "cf5f3134-410e-4822-bce3-af7b946e7133", + "x-ms-request-id" : "14c00f29-801e-007d-090a-57e0a1000000", + "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail917881007Fri, 10 Jul 2020 22:39:08 GMT\"0x8D825220F559B25\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:39:10 GMT", + "x-ms-client-request-id" : "0a5fe54c-1459-4321-89d7-03453edbfc9e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail9a866791a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail917881007?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5a494d90-bd68-456d-9219-623a22baa41e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "de5109ca-9171-4b51-bfc9-0562d46a14cc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d791832-f01e-00ab-30f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:12 GMT", - "x-ms-client-request-id" : "5a494d90-bd68-456d-9219-623a22baa41e" + "x-ms-request-id" : "48d011d6-701e-008d-020a-57a650000000", + "Date" : "Fri, 10 Jul 2020 22:39:10 GMT", + "x-ms-client-request-id" : "de5109ca-9171-4b51-bfc9-0562d46a14cc" }, "Exception" : null } ], - "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail9a866791a", "javablobgetpropertiesacfail176534bf017a2428a74e6" ] + "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail917881007", "javablobgetpropertiesacfail164265f4b1a8b4e01d43a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[5].json new file mode 100644 index 000000000000..eff8971a6329 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetpropertiesacfail[5].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail5d8691847?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff0ecb04-ea6a-47d9-baed-83db3cb99b4a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8252210A2601C", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:11 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b6eca4b4-901e-0061-550a-57b2c1000000", + "Date" : "Fri, 10 Jul 2020 22:39:10 GMT", + "x-ms-client-request-id" : "ff0ecb04-ea6a-47d9-baed-83db3cb99b4a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail5d8691847/javablobgetpropertiesacfail1648673a97e316fce24ad", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "68a8c46f-9343-4d1b-9368-dec2bea4e1ef", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:39:11.4999556Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:39:11 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:39:10 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8252210DD9B04", + "Content-Length" : "0", + "x-ms-request-id" : "f01ccdb6-601e-004a-420a-57320d000000", + "x-ms-client-request-id" : "68a8c46f-9343-4d1b-9368-dec2bea4e1ef" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail5d8691847/javablobgetpropertiesacfail1648673a97e316fce24ad", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9dab5b42-8ab3-43d4-b50b-6893ebbfa8e9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "StatusCode" : "412", + "x-ms-request-id" : "dbbfa152-a01e-0045-5a0a-574461000000", + "Date" : "Fri, 10 Jul 2020 22:39:11 GMT", + "x-ms-client-request-id" : "9dab5b42-8ab3-43d4-b50b-6893ebbfa8e9" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpropertiesacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6fe305d-2001-4a3c-a2e0-78265f91b28b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "9f66529f-a01e-0055-500a-578109000000", + "Body" : "jtcgetpropertiesacfailjtcgetpropertiesacfail0blobapitestgetpropertiesacfail5d8691847Fri, 10 Jul 2020 22:39:11 GMT\"0x8D8252210A2601C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:39:12 GMT", + "x-ms-client-request-id" : "e6fe305d-2001-4a3c-a2e0-78265f91b28b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpropertiesacfail0blobapitestgetpropertiesacfail5d8691847?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b932d7a0-5a76-47c2-a903-6171fbcc7cf3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e8b6869f-701e-0079-770a-576da6000000", + "Date" : "Fri, 10 Jul 2020 22:39:12 GMT", + "x-ms-client-request-id" : "b932d7a0-5a76-47c2-a903-6171fbcc7cf3" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetpropertiesacfail0blobapitestgetpropertiesacfail5d8691847", "javablobgetpropertiesacfail1648673a97e316fce24ad" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetsnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetsnapshot.json new file mode 100644 index 000000000000..da4706cb6ea1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgetsnapshot.json @@ -0,0 +1,141 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetsnapshot0blobapitestgetsnapshotd907412034d038887?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0286966d-92de-4a55-a767-ce07f708f407" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8291CECE867F3", + "Last-Modified" : "Thu, 16 Jul 2020 00:12:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "82b28b70-f01e-002a-1a05-5b4e92000000", + "Date" : "Thu, 16 Jul 2020 00:12:27 GMT", + "x-ms-client-request-id" : "0286966d-92de-4a55-a767-ce07f708f407" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetsnapshot0blobapitestgetsnapshotd907412034d038887/javablobgetsnapshot1blobapitestgetsnapshotd9059628be9f60", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "698dec5c-5199-4144-9c85-983513f079de", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T00:12:29.0349274Z", + "Last-Modified" : "Thu, 16 Jul 2020 00:12:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 00:12:28 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8291CED5268DA", + "Content-Length" : "0", + "x-ms-request-id" : "e351cae2-501e-009a-2205-5b0f5b000000", + "x-ms-client-request-id" : "698dec5c-5199-4144-9c85-983513f079de" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetsnapshot0blobapitestgetsnapshotd907412034d038887/javablobgetsnapshot2blobapitestgetsnapshotd9010694b67a5b", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "33531fc3-383c-4a71-a598-27331d08f551", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "Q7G6/s6+u/k=", + "x-ms-version-id" : "2020-07-16T00:12:29.5152695Z", + "Last-Modified" : "Thu, 16 Jul 2020 00:12:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 00:12:28 GMT", + "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", + "ETag" : "0x8D8291CED9BB437", + "Content-Length" : "0", + "x-ms-request-id" : "f119a691-101e-0040-6805-5b96ba000000", + "x-ms-client-request-id" : "33531fc3-383c-4a71-a598-27331d08f551" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetsnapshot0blobapitestgetsnapshotd907412034d038887/javablobgetsnapshot2blobapitestgetsnapshotd9010694b67a5b?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c566cd6f-e10f-4521-86ba-87a68c47cfe8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Thu, 16 Jul 2020 00:12:29 GMT", + "x-ms-version-id" : "2020-07-16T00:12:29.9445740Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Thu, 16 Jul 2020 00:12:29 GMT", + "x-ms-snapshot" : "2020-07-16T00:12:29.9435740Z", + "ETag" : "0x8D8291CED9BB437", + "Content-Length" : "0", + "x-ms-request-id" : "8612ad5c-a01e-00a1-0505-5b4aff000000", + "x-ms-client-request-id" : "c566cd6f-e10f-4521-86ba-87a68c47cfe8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetsnapshot&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "982d3e2c-1895-4439-a386-c86d229d8036" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "42acbb0c-001e-002e-0d05-5bc395000000", + "Body" : "jtcgetsnapshotjtcgetsnapshot0blobapitestgetsnapshotd907412034d038887Thu, 16 Jul 2020 00:12:28 GMT\"0x8D8291CECE867F3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:12:30 GMT", + "x-ms-client-request-id" : "982d3e2c-1895-4439-a386-c86d229d8036", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetsnapshot0blobapitestgetsnapshotd907412034d038887?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6014fd8e-db82-41bb-9d6f-200bed1368bb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "715275a4-401e-004d-6205-5b5e6e000000", + "Date" : "Thu, 16 Jul 2020 00:12:31 GMT", + "x-ms-client-request-id" : "6014fd8e-db82-41bb-9d6f-200bed1368bb" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetsnapshot0blobapitestgetsnapshotd907412034d038887", "javablobgetsnapshot1blobapitestgetsnapshotd9059628be9f60", "javablobgetsnapshot2blobapitestgetsnapshotd9010694b67a5b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsac[0].json new file mode 100644 index 000000000000..c241ca7a326c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsac[0].json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac1420963163ac0479b0a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a1c5bb5e-322a-415d-87a9-ef1841a32552" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8251FE6995608", + "Last-Modified" : "Fri, 10 Jul 2020 22:23:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "48cb1f57-701e-008d-4b08-57a650000000", + "Date" : "Fri, 10 Jul 2020 22:23:40 GMT", + "x-ms-client-request-id" : "a1c5bb5e-322a-415d-87a9-ef1841a32552" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac1420963163ac0479b0a/javablobgettagsac1blobapitestgettagsac1427522877fbae99", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "94f0f5bb-65de-4958-9801-9c05dcb3e84b", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:23:42.2327623Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:23:42 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:23:41 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8251FE6FAAF47", + "Content-Length" : "0", + "x-ms-request-id" : "36ed8b2d-f01e-0015-4108-578631000000", + "x-ms-client-request-id" : "94f0f5bb-65de-4958-9801-9c05dcb3e84b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac1420963163ac0479b0a/javablobgettagsac1blobapitestgettagsac1427522877fbae99?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba1604fa-ba43-4d3c-b150-4817a25ca1cb", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fa8f8b7f-501e-0051-1f08-570c0e000000", + "Date" : "Fri, 10 Jul 2020 22:23:42 GMT", + "x-ms-client-request-id" : "ba1604fa-ba43-4d3c-b150-4817a25ca1cb" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac1420963163ac0479b0a/javablobgettagsac1blobapitestgettagsac1427522877fbae99?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4ef6237-ca05-4cc9-9714-b58b5acd7818" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "115", + "StatusCode" : "200", + "x-ms-request-id" : "1fc4677c-201e-0029-0408-57aff6000000", + "Body" : "\nfooUkVEQUNURUQ=", + "Date" : "Fri, 10 Jul 2020 22:23:42 GMT", + "x-ms-client-request-id" : "a4ef6237-ca05-4cc9-9714-b58b5acd7818", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgettagsac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a792d58b-b144-4593-80d4-123104013e0c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4191140e-601e-0065-3608-573fc6000000", + "Body" : "jtcgettagsacjtcgettagsac0blobapitestgettagsac1420963163ac0479b0aFri, 10 Jul 2020 22:23:41 GMT\"0x8D8251FE6995608\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:23:43 GMT", + "x-ms-client-request-id" : "a792d58b-b144-4593-80d4-123104013e0c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac1420963163ac0479b0a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29c4f8b3-8776-42b9-a45b-964ffc83eefa" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2f0888e4-001e-003e-0a08-5706fd000000", + "Date" : "Fri, 10 Jul 2020 22:23:43 GMT", + "x-ms-client-request-id" : "29c4f8b3-8776-42b9-a45b-964ffc83eefa" + }, + "Exception" : null + } ], + "variables" : [ "jtcgettagsac0blobapitestgettagsac1420963163ac0479b0a", "javablobgettagsac1blobapitestgettagsac1427522877fbae99" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsac[1].json new file mode 100644 index 000000000000..b8ef790519e2 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsac[1].json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac31b60950a1b9a820e25?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa24b3dd-8d64-4b18-b368-ac639ac76d08" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8251FE840D5C1", + "Last-Modified" : "Fri, 10 Jul 2020 22:23:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "224cd68d-a01e-008e-2a08-574734000000", + "Date" : "Fri, 10 Jul 2020 22:23:44 GMT", + "x-ms-client-request-id" : "aa24b3dd-8d64-4b18-b368-ac639ac76d08" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac31b60950a1b9a820e25/javablobgettagsac1blobapitestgettagsac31b70963f193e14e", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "99e0f910-9960-40da-969a-572c06896f4c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:23:44.8055959Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:23:44 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:23:44 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8251FE8834497", + "Content-Length" : "0", + "x-ms-request-id" : "40ab4da5-501e-000c-7608-57068a000000", + "x-ms-client-request-id" : "99e0f910-9960-40da-969a-572c06896f4c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac31b60950a1b9a820e25/javablobgettagsac1blobapitestgettagsac31b70963f193e14e?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c427464-a657-4e3d-9f29-52f8ef11a57c", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c1da9e23-301e-0035-0f08-57fd96000000", + "Date" : "Fri, 10 Jul 2020 22:23:44 GMT", + "x-ms-client-request-id" : "1c427464-a657-4e3d-9f29-52f8ef11a57c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac31b60950a1b9a820e25/javablobgettagsac1blobapitestgettagsac31b70963f193e14e?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c059d03c-e053-4b8d-af66-1abaf0758127" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "115", + "StatusCode" : "200", + "x-ms-request-id" : "3b1b8e18-b01e-0049-2e08-57d369000000", + "Body" : "\nfooUkVEQUNURUQ=", + "Date" : "Fri, 10 Jul 2020 22:23:44 GMT", + "x-ms-client-request-id" : "c059d03c-e053-4b8d-af66-1abaf0758127", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgettagsac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "685f0d5c-7f8f-41c6-9569-2e01896b1a3c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1927955b-c01e-0021-7908-57b5f9000000", + "Body" : "jtcgettagsacjtcgettagsac0blobapitestgettagsac31b60950a1b9a820e25Fri, 10 Jul 2020 22:23:44 GMT\"0x8D8251FE840D5C1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:23:45 GMT", + "x-ms-client-request-id" : "685f0d5c-7f8f-41c6-9569-2e01896b1a3c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsac0blobapitestgettagsac31b60950a1b9a820e25?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cbbec36f-3eb1-44fb-b6c8-9177baf50220" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "44089a37-801e-0099-3d08-57ee3f000000", + "Date" : "Fri, 10 Jul 2020 22:23:45 GMT", + "x-ms-client-request-id" : "cbbec36f-3eb1-44fb-b6c8-9177baf50220" + }, + "Exception" : null + } ], + "variables" : [ "jtcgettagsac0blobapitestgettagsac31b60950a1b9a820e25", "javablobgettagsac1blobapitestgettagsac31b70963f193e14e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsacfail[0].json new file mode 100644 index 000000000000..bae7393ecabb --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestgettagsacfail[0].json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsacfail0blobapitestgettagsacfailb0f87371fe7737e?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bdd994cb-fcfc-4e4c-8770-f6c1fccf6fd5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8251FF5C8E197", + "Last-Modified" : "Fri, 10 Jul 2020 22:24:07 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "997d865f-d01e-005f-7b08-5725be000000", + "Date" : "Fri, 10 Jul 2020 22:24:06 GMT", + "x-ms-client-request-id" : "bdd994cb-fcfc-4e4c-8770-f6c1fccf6fd5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsacfail0blobapitestgettagsacfailb0f87371fe7737e/javablobgettagsacfail1blobapitestgettagsacfailb0f08785e5ee", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9142db4a-f55f-4b62-a011-829292062835", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:24:07.6778947Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:24:07 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:24:07 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8251FF62526B2", + "Content-Length" : "0", + "x-ms-request-id" : "dde9eb18-a01e-0037-1508-57432e000000", + "x-ms-client-request-id" : "9142db4a-f55f-4b62-a011-829292062835" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsacfail0blobapitestgettagsacfailb0f87371fe7737e/javablobgettagsacfail1blobapitestgettagsacfailb0f08785e5ee?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e1eda11-4bf7-4007-98a1-2789e9f04341" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "253", + "StatusCode" : "412", + "x-ms-request-id" : "78b46600-001e-0073-0708-57c911000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:78b46600-001e-0073-0708-57c911000000\nTime:2020-07-10T22:24:08.0846205Z", + "Date" : "Fri, 10 Jul 2020 22:24:07 GMT", + "x-ms-client-request-id" : "4e1eda11-4bf7-4007-98a1-2789e9f04341", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgettagsacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "56d6301e-6d6c-4869-9991-2a320e94294a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b6a9b2cd-501e-0023-4608-570b41000000", + "Body" : "jtcgettagsacfailjtcgettagsacfail0blobapitestgettagsacfailb0f87371fe7737eFri, 10 Jul 2020 22:24:07 GMT\"0x8D8251FF5C8E197\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:24:07 GMT", + "x-ms-client-request-id" : "56d6301e-6d6c-4869-9991-2a320e94294a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgettagsacfail0blobapitestgettagsacfailb0f87371fe7737e?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "36debfe0-cf91-4dec-89e4-abf46d5b1f1b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "8e25c0ae-801e-000f-7408-57e7ee000000", + "Date" : "Fri, 10 Jul 2020 22:24:08 GMT", + "x-ms-client-request-id" : "36debfe0-cf91-4dec-89e4-abf46d5b1f1b" + }, + "Exception" : null + } ], + "variables" : [ "jtcgettagsacfail0blobapitestgettagsacfailb0f87371fe7737e", "javablobgettagsacfail1blobapitestgettagsacfailb0f08785e5ee" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestissnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestissnapshot.json new file mode 100644 index 000000000000..469bcab1f293 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestissnapshot.json @@ -0,0 +1,141 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcissnapshot0blobapitestissnapshot9079418890e9a7cf35?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1cb40adb-0cb3-40aa-b9b5-dc8ebc4000e3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8291CF5E3FF12", + "Last-Modified" : "Thu, 16 Jul 2020 00:12:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1d8f1ad8-601e-0007-1505-5bfde1000000", + "Date" : "Thu, 16 Jul 2020 00:12:43 GMT", + "x-ms-client-request-id" : "1cb40adb-0cb3-40aa-b9b5-dc8ebc4000e3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcissnapshot0blobapitestissnapshot9079418890e9a7cf35/javablobissnapshot1blobapitestissnapshot90741806452ddf3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7c515c4-6b71-4e90-b07b-75aa1f0550ed", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T00:12:44.0065835Z", + "Last-Modified" : "Thu, 16 Jul 2020 00:12:44 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 00:12:43 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8291CF63EE72B", + "Content-Length" : "0", + "x-ms-request-id" : "794846e1-e01e-0026-4c05-5bd99a000000", + "x-ms-client-request-id" : "f7c515c4-6b71-4e90-b07b-75aa1f0550ed" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcissnapshot0blobapitestissnapshot9079418890e9a7cf35/javablobissnapshot2blobapitestissnapshot907034770584547", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d91679db-cf66-4649-a812-c86db629baaf", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "Q7G6/s6+u/k=", + "x-ms-version-id" : "2020-07-16T00:12:44.4128728Z", + "Last-Modified" : "Thu, 16 Jul 2020 00:12:44 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 00:12:43 GMT", + "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", + "ETag" : "0x8D8291CF67CE5D8", + "Content-Length" : "0", + "x-ms-request-id" : "6554e5a2-101e-0032-1405-5b91f5000000", + "x-ms-client-request-id" : "d91679db-cf66-4649-a812-c86db629baaf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcissnapshot0blobapitestissnapshot9079418890e9a7cf35/javablobissnapshot2blobapitestissnapshot907034770584547?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d1ca39ce-d030-418d-a0fa-b1b8aaf11d79" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Thu, 16 Jul 2020 00:12:44 GMT", + "x-ms-version-id" : "2020-07-16T00:12:44.8441778Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Thu, 16 Jul 2020 00:12:44 GMT", + "x-ms-snapshot" : "2020-07-16T00:12:44.8431778Z", + "ETag" : "0x8D8291CF67CE5D8", + "Content-Length" : "0", + "x-ms-request-id" : "9a118bbb-501e-00a5-1505-5bc7f8000000", + "x-ms-client-request-id" : "d1ca39ce-d030-418d-a0fa-b1b8aaf11d79" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcissnapshot&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f1da8ee-83eb-497f-bb83-12e4859f5bdc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d529de87-f01e-003a-5005-5b8bfa000000", + "Body" : "jtcissnapshotjtcissnapshot0blobapitestissnapshot9079418890e9a7cf35Thu, 16 Jul 2020 00:12:43 GMT\"0x8D8291CF5E3FF12\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:12:45 GMT", + "x-ms-client-request-id" : "4f1da8ee-83eb-497f-bb83-12e4859f5bdc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcissnapshot0blobapitestissnapshot9079418890e9a7cf35?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4456d623-126a-450b-863e-3f014cadd237" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "41e244c9-b01e-0059-0a05-5b1601000000", + "Date" : "Thu, 16 Jul 2020 00:12:45 GMT", + "x-ms-client-request-id" : "4456d623-126a-450b-863e-3f014cadd237" + }, + "Exception" : null + } ], + "variables" : [ "jtcissnapshot0blobapitestissnapshot9079418890e9a7cf35", "javablobissnapshot1blobapitestissnapshot90741806452ddf3", "javablobissnapshot2blobapitestissnapshot907034770584547" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[0].json index acea02d716cb..8d0385c3e39a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[0].json @@ -1,112 +1,131 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac4c81015423d1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacd17925526aab?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "717e376a-c824-45bb-8f30-d72b17e28729" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e27b1ab-1001-48e5-9ed0-5f4a7b9c9408" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10727DCA34A", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:14 GMT", + "ETag" : "0x8D82522A543E8CB", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d791b99-f01e-00ab-32f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", - "x-ms-client-request-id" : "717e376a-c824-45bb-8f30-d72b17e28729" + "x-ms-request-id" : "d1782cd9-801e-001f-460b-572286000000", + "Date" : "Fri, 10 Jul 2020 22:43:20 GMT", + "x-ms-client-request-id" : "4e27b1ab-1001-48e5-9ed0-5f4a7b9c9408" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac4c81015423d1/javablobsethttpheadersac1blobapitestsethttpheadersac4c8810946", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacd17925526aab/javablobsethttpheadersac1blobapitestsethttpheadersacd17787867", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "017442a6-8b06-42f6-85fb-ae65026e764f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0310af55-e1c6-4946-b001-8c8e654bf7af", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:14 GMT", + "x-ms-version-id" : "2020-07-10T22:43:21.0728013Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:21 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", + "Date" : "Fri, 10 Jul 2020 22:43:20 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10727F42313", + "ETag" : "0x8D82522A59F664D", "Content-Length" : "0", - "x-ms-request-id" : "642951ec-601e-000f-6df0-12dd80000000", - "x-ms-client-request-id" : "017442a6-8b06-42f6-85fb-ae65026e764f" + "x-ms-request-id" : "3df17758-b01e-0059-130b-571601000000", + "x-ms-client-request-id" : "0310af55-e1c6-4946-b001-8c8e654bf7af" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac4c81015423d1/javablobsethttpheadersac1blobapitestsethttpheadersac4c8810946?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacd17925526aab/javablobsethttpheadersac1blobapitestsethttpheadersacd17787867?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ab21e228-4b09-45bf-9ab0-e951e7a9e3f5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1133d189-0213-48e3-87d4-90cf59b1d83b", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10727FE5EB3", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:14 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "73d386d9-301e-0057-440b-573fb1000000", + "Date" : "Fri, 10 Jul 2020 22:43:21 GMT", + "x-ms-client-request-id" : "1133d189-0213-48e3-87d4-90cf59b1d83b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacd17925526aab/javablobsethttpheadersac1blobapitestsethttpheadersacd17787867?comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7866bda-d3fc-4dcd-b3f5-784fb8bbdcab" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522A628FAB4", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:21 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde76421-001e-00fa-14f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", - "x-ms-client-request-id" : "ab21e228-4b09-45bf-9ab0-e951e7a9e3f5" + "x-ms-request-id" : "e9f6b942-701e-0069-080b-57a8ce000000", + "Date" : "Fri, 10 Jul 2020 22:43:21 GMT", + "x-ms-client-request-id" : "d7866bda-d3fc-4dcd-b3f5-784fb8bbdcab" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "312bef8b-4112-430a-9508-a1a5de219f8b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0f4db4f-5865-4c4b-857b-9be52a88953f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d791c20-f01e-00ab-30f0-12e764000000", - "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersac4c81015423d1Wed, 15 Apr 2020 06:35:14 GMT\"0x8D7E10727DCA34A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", - "x-ms-client-request-id" : "312bef8b-4112-430a-9508-a1a5de219f8b", + "x-ms-request-id" : "8e6bfbca-901e-0003-6c0b-5770e6000000", + "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersacd17925526aabFri, 10 Jul 2020 22:43:20 GMT\"0x8D82522A543E8CB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:43:21 GMT", + "x-ms-client-request-id" : "b0f4db4f-5865-4c4b-857b-9be52a88953f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac4c81015423d1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacd17925526aab?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e451be1b-613d-4b88-a029-e2ae296214c9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2b47a3fe-6f45-4ff5-93bd-abaffc11cf3d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429520d-601e-000f-0df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", - "x-ms-client-request-id" : "e451be1b-613d-4b88-a029-e2ae296214c9" + "x-ms-request-id" : "fc4a2b47-d01e-003d-120b-57e799000000", + "Date" : "Fri, 10 Jul 2020 22:43:23 GMT", + "x-ms-client-request-id" : "2b47a3fe-6f45-4ff5-93bd-abaffc11cf3d" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersac4c81015423d1", "javablobsethttpheadersac1blobapitestsethttpheadersac4c8810946" ] + "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersacd17925526aab", "javablobsethttpheadersac1blobapitestsethttpheadersacd17787867" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[1].json index 5aaee92e9ecd..d08a696cfd38 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[1].json @@ -1,112 +1,131 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacefe345276d93?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac7281817476ac?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "831f5aa2-0f9e-467a-b2c2-164c20a4056a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f45df257-ea1d-4760-9565-fe7b24963aae" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10728179212", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:14 GMT", + "ETag" : "0x8D82522A7376EBD", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde76473-001e-00fa-57f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", - "x-ms-client-request-id" : "831f5aa2-0f9e-467a-b2c2-164c20a4056a" + "x-ms-request-id" : "0e2b5923-401e-0062-7e0b-5753a5000000", + "Date" : "Fri, 10 Jul 2020 22:43:23 GMT", + "x-ms-client-request-id" : "f45df257-ea1d-4760-9565-fe7b24963aae" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacefe345276d93/javablobsethttpheadersac1blobapitestsethttpheadersacefe248626", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac7281817476ac/javablobsethttpheadersac1blobapitestsethttpheadersac728041988", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "072ee0c5-495a-42a4-ab2b-6fd775afcf00", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a1ac128-b953-4985-a193-07f00ceda242", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "x-ms-version-id" : "2020-07-10T22:43:24.1139682Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:24 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", + "Date" : "Fri, 10 Jul 2020 22:43:23 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107281F5C1F", + "ETag" : "0x8D82522A76F71E2", "Content-Length" : "0", - "x-ms-request-id" : "5d791c54-f01e-00ab-5ef0-12e764000000", - "x-ms-client-request-id" : "072ee0c5-495a-42a4-ab2b-6fd775afcf00" + "x-ms-request-id" : "7eaa3994-601e-0038-620b-573542000000", + "x-ms-client-request-id" : "7a1ac128-b953-4985-a193-07f00ceda242" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacefe345276d93/javablobsethttpheadersac1blobapitestsethttpheadersacefe248626?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac7281817476ac/javablobsethttpheadersac1blobapitestsethttpheadersac728041988?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b87c9779-d001-4fab-a660-a1a11c4e6fd6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a66608b-be97-4b6e-bfd1-7021f6aca85e", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072827745C", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8e290195-801e-000f-7e0b-57e7ee000000", + "Date" : "Fri, 10 Jul 2020 22:43:23 GMT", + "x-ms-client-request-id" : "6a66608b-be97-4b6e-bfd1-7021f6aca85e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac7281817476ac/javablobsethttpheadersac1blobapitestsethttpheadersac728041988?comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ec5046b-a1e2-48e9-ba72-7e80d1bddcf1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522A7D96A97", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:24 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429523b-601e-000f-34f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "b87c9779-d001-4fab-a660-a1a11c4e6fd6" + "x-ms-request-id" : "9de573df-401e-005d-540b-579b06000000", + "Date" : "Fri, 10 Jul 2020 22:43:24 GMT", + "x-ms-client-request-id" : "5ec5046b-a1e2-48e9-ba72-7e80d1bddcf1" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7e115837-e20a-4d3f-9842-640d10f24426" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b909c78-473b-4919-9bb3-1084cd538b5a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde764be-001e-00fa-13f0-12f991000000", - "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersacefe345276d93Wed, 15 Apr 2020 06:35:14 GMT\"0x8D7E10728179212\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", - "x-ms-client-request-id" : "7e115837-e20a-4d3f-9842-640d10f24426", + "x-ms-request-id" : "34dd6add-701e-000b-210b-576ae9000000", + "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersac7281817476acFri, 10 Jul 2020 22:43:23 GMT\"0x8D82522A7376EBD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:43:24 GMT", + "x-ms-client-request-id" : "8b909c78-473b-4919-9bb3-1084cd538b5a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacefe345276d93?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac7281817476ac?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "30132c9a-5078-4f12-a2c9-524c5257a5c7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9d012e83-ee87-4a27-b16d-96ef314ff598" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d791caf-f01e-00ab-2bf0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", - "x-ms-client-request-id" : "30132c9a-5078-4f12-a2c9-524c5257a5c7" + "x-ms-request-id" : "dbc15f56-a01e-0045-140b-574461000000", + "Date" : "Fri, 10 Jul 2020 22:43:24 GMT", + "x-ms-client-request-id" : "9d012e83-ee87-4a27-b16d-96ef314ff598" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersacefe345276d93", "javablobsethttpheadersac1blobapitestsethttpheadersacefe248626" ] + "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersac7281817476ac", "javablobsethttpheadersac1blobapitestsethttpheadersac728041988" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[2].json index 035551064b35..04439c0c0960 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[2].json @@ -1,112 +1,131 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac18848917fcee?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac1d2217774d98?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ec9a8658-6f35-4864-afd6-7b477c8c8b09" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fe3dccd-0cbd-4ad2-a6c1-96a5c23cb1a6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107284B6687", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "ETag" : "0x8D82522A87B57CA", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429529e-601e-000f-0bf0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "ec9a8658-6f35-4864-afd6-7b477c8c8b09" + "x-ms-request-id" : "9582a1c4-f01e-0093-2e0b-574a88000000", + "Date" : "Fri, 10 Jul 2020 22:43:25 GMT", + "x-ms-client-request-id" : "6fe3dccd-0cbd-4ad2-a6c1-96a5c23cb1a6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac18848917fcee/javablobsethttpheadersac1blobapitestsethttpheadersac188937217", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac1d2217774d98/javablobsethttpheadersac1blobapitestsethttpheadersac1d2489380", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0a1945d9-bff9-414b-ad2f-cefc7ce3a253", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f8e5fa0-5de4-4045-abd5-fdb9e5184a59", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "x-ms-version-id" : "2020-07-10T22:43:26.2624990Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:26 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", + "Date" : "Fri, 10 Jul 2020 22:43:25 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072854A9A2", + "ETag" : "0x8D82522A8B748DE", "Content-Length" : "0", - "x-ms-request-id" : "bde7655f-001e-00fa-1af0-12f991000000", - "x-ms-client-request-id" : "0a1945d9-bff9-414b-ad2f-cefc7ce3a253" + "x-ms-request-id" : "9f67a78a-a01e-0055-6e0b-578109000000", + "x-ms-client-request-id" : "4f8e5fa0-5de4-4045-abd5-fdb9e5184a59" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac18848917fcee/javablobsethttpheadersac1blobapitestsethttpheadersac188937217?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac1d2217774d98/javablobsethttpheadersac1blobapitestsethttpheadersac1d2489380?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3b3b2a88-f2d8-4185-a826-ae47a9ec8d82" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4fb0991-21d9-460a-ae00-9433b77b15d1", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107285DAC80", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "264ddcc7-f01e-0067-570b-57817e000000", + "Date" : "Fri, 10 Jul 2020 22:43:26 GMT", + "x-ms-client-request-id" : "a4fb0991-21d9-460a-ae00-9433b77b15d1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac1d2217774d98/javablobsethttpheadersac1blobapitestsethttpheadersac1d2489380?comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "73e333a8-6edc-4019-ad79-fc18a2f600fa" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522A95F4042", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d791d1d-f01e-00ab-08f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:14 GMT", - "x-ms-client-request-id" : "3b3b2a88-f2d8-4185-a826-ae47a9ec8d82" + "x-ms-request-id" : "10e71d94-001e-0097-030b-57c78f000000", + "Date" : "Fri, 10 Jul 2020 22:43:27 GMT", + "x-ms-client-request-id" : "73e333a8-6edc-4019-ad79-fc18a2f600fa" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2cbe78a8-ef6a-47b5-9f68-c75c3ec44d3d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "203dce01-257b-4a07-8378-ae8edf9b896b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "642952fb-601e-000f-5ff0-12dd80000000", - "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersac18848917fceeWed, 15 Apr 2020 06:35:15 GMT\"0x8D7E107284B6687\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "2cbe78a8-ef6a-47b5-9f68-c75c3ec44d3d", + "x-ms-request-id" : "4773b264-101e-001d-520b-579c3e000000", + "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersac1d2217774d98Fri, 10 Jul 2020 22:43:25 GMT\"0x8D82522A87B57CA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:43:27 GMT", + "x-ms-client-request-id" : "203dce01-257b-4a07-8378-ae8edf9b896b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac18848917fcee?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac1d2217774d98?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "19f58abf-9b38-4ac1-ac03-ad4ab2a9bab8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fd74b87-3fa5-4001-b70b-f481fcb1eb9b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde765d3-001e-00fa-05f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "19f58abf-9b38-4ac1-ac03-ad4ab2a9bab8" + "x-ms-request-id" : "161b6947-201e-0090-210b-57abec000000", + "Date" : "Fri, 10 Jul 2020 22:43:27 GMT", + "x-ms-client-request-id" : "0fd74b87-3fa5-4001-b70b-f481fcb1eb9b" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersac18848917fcee", "javablobsethttpheadersac1blobapitestsethttpheadersac188937217" ] + "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersac1d2217774d98", "javablobsethttpheadersac1blobapitestsethttpheadersac1d2489380" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[3].json index e45a836ead61..8ac6f38e73e6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[3].json @@ -1,144 +1,165 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacfd1635895487?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac2ea148205aa5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b7586318-6cf5-4651-a125-bbe31fd6936d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "225d7221-1602-4885-a3a0-ac5ca79ee6e2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10728795752", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "ETag" : "0x8D82522AA02C7AD", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d791d87-f01e-00ab-6bf0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "b7586318-6cf5-4651-a125-bbe31fd6936d" + "x-ms-request-id" : "713cadf1-a01e-007a-7f0b-578cc2000000", + "Date" : "Fri, 10 Jul 2020 22:43:28 GMT", + "x-ms-client-request-id" : "225d7221-1602-4885-a3a0-ac5ca79ee6e2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacfd1635895487/javablobsethttpheadersac1blobapitestsethttpheadersacfd1737278", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac2ea148205aa5/javablobsethttpheadersac1blobapitestsethttpheadersac2ea559191", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "24afeb2a-aecc-4e8f-b65f-ce55d36093af", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b094f36-b7b8-43db-9c08-652dad808294", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "x-ms-version-id" : "2020-07-10T22:43:28.8783630Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:28 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", + "Date" : "Fri, 10 Jul 2020 22:43:28 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072882F0A8", + "ETag" : "0x8D82522AA466F0E", "Content-Length" : "0", - "x-ms-request-id" : "6429531e-601e-000f-7ef0-12dd80000000", - "x-ms-client-request-id" : "24afeb2a-aecc-4e8f-b65f-ce55d36093af" + "x-ms-request-id" : "34a35162-201e-0064-1d0b-57601a000000", + "x-ms-client-request-id" : "0b094f36-b7b8-43db-9c08-652dad808294" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac2ea148205aa5/javablobsethttpheadersac1blobapitestsethttpheadersac2ea559191?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a2a0e33-ee64-4a17-bfe6-eca9988011da", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "476210a5-d01e-0012-2d0b-57ea52000000", + "Date" : "Fri, 10 Jul 2020 22:43:29 GMT", + "x-ms-client-request-id" : "5a2a0e33-ee64-4a17-bfe6-eca9988011da" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacfd1635895487/javablobsethttpheadersac1blobapitestsethttpheadersacfd1737278", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac2ea148205aa5/javablobsethttpheadersac1blobapitestsethttpheadersac2ea559191", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bf4037da-17ba-4294-9baf-dfa9416abdeb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "186ce628-ef32-47e6-912f-919aacaffc62" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "x-ms-version-id" : "2020-07-10T22:43:28.8783630Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:28 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", + "Date" : "Fri, 10 Jul 2020 22:43:29 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E1072882F0A8", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:15 GMT", + "ETag" : "0x8D82522AA466F0E", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:43:28 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde76654-001e-00fa-7ef0-12f991000000", - "x-ms-client-request-id" : "bf4037da-17ba-4294-9baf-dfa9416abdeb", + "x-ms-request-id" : "d2e7b829-301e-009c-2a0b-573ce4000000", + "x-ms-client-request-id" : "186ce628-ef32-47e6-912f-919aacaffc62", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacfd1635895487/javablobsethttpheadersac1blobapitestsethttpheadersacfd1737278?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac2ea148205aa5/javablobsethttpheadersac1blobapitestsethttpheadersac2ea559191?comp=properties", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "58097a21-4430-4b8b-8d98-5c00b9e47a4e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bff4937d-814d-447a-a02d-36bfdeb32ade" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107289432DB", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "ETag" : "0x8D82522AB12E51B", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:30 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d791dda-f01e-00ab-3af0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "58097a21-4430-4b8b-8d98-5c00b9e47a4e" + "x-ms-request-id" : "99807933-d01e-005f-030b-5725be000000", + "Date" : "Fri, 10 Jul 2020 22:43:29 GMT", + "x-ms-client-request-id" : "bff4937d-814d-447a-a02d-36bfdeb32ade" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cd0f5e52-7e72-4732-a800-58c2cc86891d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "43b51a08-fd32-4f1c-a75a-f4a506db434a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64295347-601e-000f-24f0-12dd80000000", - "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersacfd1635895487Wed, 15 Apr 2020 06:35:15 GMT\"0x8D7E10728795752\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "cd0f5e52-7e72-4732-a800-58c2cc86891d", + "x-ms-request-id" : "192ed02a-c01e-0021-420b-57b5f9000000", + "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersac2ea148205aa5Fri, 10 Jul 2020 22:43:28 GMT\"0x8D82522AA02C7AD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:43:30 GMT", + "x-ms-client-request-id" : "43b51a08-fd32-4f1c-a75a-f4a506db434a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacfd1635895487?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac2ea148205aa5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3d7f28eb-c76b-4488-b92d-4e9614574f45" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6bdf7104-b189-47e2-908f-86aa2f65f3ce" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde7669f-001e-00fa-42f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "3d7f28eb-c76b-4488-b92d-4e9614574f45" + "x-ms-request-id" : "9f348cee-201e-005b-370b-57a8b9000000", + "Date" : "Fri, 10 Jul 2020 22:43:30 GMT", + "x-ms-client-request-id" : "6bdf7104-b189-47e2-908f-86aa2f65f3ce" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersacfd1635895487", "javablobsethttpheadersac1blobapitestsethttpheadersacfd1737278" ] + "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersac2ea148205aa5", "javablobsethttpheadersac1blobapitestsethttpheadersac2ea559191" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[4].json index 6cfe53d01ae2..480d5e45ddc1 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[4].json @@ -1,112 +1,131 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac54901274eff8?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacb2e82590c1d2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ea46f450-d2b8-4ee1-9625-95ce6ecaa474" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6075c739-9466-444d-a80e-8245c48c2091" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10728AEA504", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:15 GMT", + "ETag" : "0x8D82522ABBF925C", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d791e29-f01e-00ab-02f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "ea46f450-d2b8-4ee1-9625-95ce6ecaa474" + "x-ms-request-id" : "7917b638-e01e-0009-4c0b-57d451000000", + "Date" : "Fri, 10 Jul 2020 22:43:30 GMT", + "x-ms-client-request-id" : "6075c739-9466-444d-a80e-8245c48c2091" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac54901274eff8/javablobsethttpheadersac1blobapitestsethttpheadersac549363425", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacb2e82590c1d2/javablobsethttpheadersac1blobapitestsethttpheadersacb2e667369", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "785b2045-7904-4ba0-ae02-39977dce3849", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "74c20f1c-da13-471a-ab66-46361d138920", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "x-ms-version-id" : "2020-07-10T22:43:31.7283953Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:31 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", + "Date" : "Fri, 10 Jul 2020 22:43:31 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10728B7C8F8", + "ETag" : "0x8D82522ABF92953", "Content-Length" : "0", - "x-ms-request-id" : "64295372-601e-000f-4af0-12dd80000000", - "x-ms-client-request-id" : "785b2045-7904-4ba0-ae02-39977dce3849" + "x-ms-request-id" : "a12faf0c-101e-007f-4d0b-575e19000000", + "x-ms-client-request-id" : "74c20f1c-da13-471a-ab66-46361d138920" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac54901274eff8/javablobsethttpheadersac1blobapitestsethttpheadersac549363425?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacb2e82590c1d2/javablobsethttpheadersac1blobapitestsethttpheadersacb2e667369?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6095b7bc-5b01-4fa9-9edd-c6aa17d6037f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "74cf5a5a-d9c8-4961-b534-d5a3d2fbac89", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10728C119F2", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "676c6489-101e-0040-260b-5796ba000000", + "Date" : "Fri, 10 Jul 2020 22:43:31 GMT", + "x-ms-client-request-id" : "74cf5a5a-d9c8-4961-b534-d5a3d2fbac89" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacb2e82590c1d2/javablobsethttpheadersac1blobapitestsethttpheadersacb2e667369?comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d641a6b1-c88e-415a-960e-814c941165af" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522AC6AEB9D", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7671c-001e-00fa-2ef0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "6095b7bc-5b01-4fa9-9edd-c6aa17d6037f" + "x-ms-request-id" : "56ec7881-f01e-002a-010b-574e92000000", + "Date" : "Fri, 10 Jul 2020 22:43:32 GMT", + "x-ms-client-request-id" : "d641a6b1-c88e-415a-960e-814c941165af" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c611c72c-2b44-4ec6-a68d-280fe2033038" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8a3bae8-5d04-49b3-9c1b-16bfa40abe49" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d791e88-f01e-00ab-53f0-12e764000000", - "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersac54901274eff8Wed, 15 Apr 2020 06:35:15 GMT\"0x8D7E10728AEA504\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "c611c72c-2b44-4ec6-a68d-280fe2033038", + "x-ms-request-id" : "de7d5d81-b01e-0014-3d0b-57d9ed000000", + "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersacb2e82590c1d2Fri, 10 Jul 2020 22:43:31 GMT\"0x8D82522ABBF925C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:43:31 GMT", + "x-ms-client-request-id" : "f8a3bae8-5d04-49b3-9c1b-16bfa40abe49", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac54901274eff8?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacb2e82590c1d2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "21af0aa7-cec3-4a67-ae3c-653e69e581f2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "88b928cb-f3b6-4fca-99cd-c8d4b0653e75" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "642953a9-601e-000f-77f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "21af0aa7-cec3-4a67-ae3c-653e69e581f2" + "x-ms-request-id" : "9e30c0f5-a01e-009e-180b-57825c000000", + "Date" : "Fri, 10 Jul 2020 22:43:32 GMT", + "x-ms-client-request-id" : "88b928cb-f3b6-4fca-99cd-c8d4b0653e75" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersac54901274eff8", "javablobsethttpheadersac1blobapitestsethttpheadersac549363425" ] + "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersacb2e82590c1d2", "javablobsethttpheadersac1blobapitestsethttpheadersacb2e667369" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[5].json index 2d886eefbb7f..53fa2bf75949 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[5].json @@ -1,134 +1,153 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacbea38055fefe?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac17987480ad83?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "97766623-71b8-4c3d-8fe5-d95b88247beb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37c98b80-9657-4ea0-85df-ba49196fc5c7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10728DE1FD7", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "ETag" : "0x8D82522AD19C9C7", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde767a7-001e-00fa-30f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", - "x-ms-client-request-id" : "97766623-71b8-4c3d-8fe5-d95b88247beb" + "x-ms-request-id" : "e2efde81-201e-0074-3a0b-57a572000000", + "Date" : "Fri, 10 Jul 2020 22:43:33 GMT", + "x-ms-client-request-id" : "37c98b80-9657-4ea0-85df-ba49196fc5c7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacbea38055fefe/javablobsethttpheadersac1blobapitestsethttpheadersacbea22860b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac17987480ad83/javablobsethttpheadersac1blobapitestsethttpheadersac179105202", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d4d76e26-238d-4d1d-af8c-0b0b89035478", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69511673-ae23-40a7-9963-68f8069bbd32", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "x-ms-version-id" : "2020-07-10T22:43:34.0330369Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:34 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:15 GMT", + "Date" : "Fri, 10 Jul 2020 22:43:33 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10728E96C15", + "ETag" : "0x8D82522AD58F981", "Content-Length" : "0", - "x-ms-request-id" : "5d791f02-f01e-00ab-44f0-12e764000000", - "x-ms-client-request-id" : "d4d76e26-238d-4d1d-af8c-0b0b89035478" + "x-ms-request-id" : "10fef020-101e-009b-540b-575087000000", + "x-ms-client-request-id" : "69511673-ae23-40a7-9963-68f8069bbd32" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacbea38055fefe/javablobsethttpheadersac1blobapitestsethttpheadersacbea22860b?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac17987480ad83/javablobsethttpheadersac1blobapitestsethttpheadersac179105202?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9f496897-a4b1-4870-ac82-7b58e57c06be" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9409a2b1-98b5-4474-9d3e-aade130251b2", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10728E96C15", - "x-ms-lease-id" : "3ba240f2-04c0-48d0-a361-c722cbe8a99e", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "395ab99d-901e-0085-160b-57bc5f000000", + "Date" : "Fri, 10 Jul 2020 22:43:34 GMT", + "x-ms-client-request-id" : "9409a2b1-98b5-4474-9d3e-aade130251b2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac17987480ad83/javablobsethttpheadersac1blobapitestsethttpheadersac179105202?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7c626db-c50e-402a-91fa-2c443334af91" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522AD58F981", + "x-ms-lease-id" : "f0c8026e-8fc0-4b45-9d11-86059d61a228", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "642953e1-601e-000f-27f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "9f496897-a4b1-4870-ac82-7b58e57c06be" + "x-ms-request-id" : "252b5d8f-301e-0047-550b-57fad9000000", + "Date" : "Fri, 10 Jul 2020 22:43:34 GMT", + "x-ms-client-request-id" : "d7c626db-c50e-402a-91fa-2c443334af91" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacbea38055fefe/javablobsethttpheadersac1blobapitestsethttpheadersacbea22860b?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac17987480ad83/javablobsethttpheadersac1blobapitestsethttpheadersac179105202?comp=properties", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "18fc2d32-6ab8-4385-bde9-f4133168c7bb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2753ea2-f595-4069-8d45-4f64e7af309b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072900F155", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "ETag" : "0x8D82522AE0CB2D4", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde76832-001e-00fa-2af0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "18fc2d32-6ab8-4385-bde9-f4133168c7bb" + "x-ms-request-id" : "98ad0041-e01e-006b-370b-571676000000", + "Date" : "Fri, 10 Jul 2020 22:43:35 GMT", + "x-ms-client-request-id" : "d2753ea2-f595-4069-8d45-4f64e7af309b" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bde32dcd-0de9-43ea-a93a-531c650cf84b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6446029b-7e48-4d72-8327-c40708862ea2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d791f65-f01e-00ab-1df0-12e764000000", - "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersacbea38055fefeWed, 15 Apr 2020 06:35:16 GMT\"0x8D7E10728DE1FD7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "bde32dcd-0de9-43ea-a93a-531c650cf84b", + "x-ms-request-id" : "d74bf8a6-501e-0041-170b-57c966000000", + "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersac17987480ad83Fri, 10 Jul 2020 22:43:33 GMT\"0x8D82522AD19C9C7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:43:34 GMT", + "x-ms-client-request-id" : "6446029b-7e48-4d72-8327-c40708862ea2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersacbea38055fefe?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac17987480ad83?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3f139ddc-6c93-4099-ba36-07d8c07061c1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9790db19-6a3b-42ed-b887-5c406a356c74" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64295414-601e-000f-50f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "3f139ddc-6c93-4099-ba36-07d8c07061c1" + "x-ms-request-id" : "5f65090f-201e-0016-2f0b-576755000000", + "Date" : "Fri, 10 Jul 2020 22:43:35 GMT", + "x-ms-client-request-id" : "9790db19-6a3b-42ed-b887-5c406a356c74" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersacbea38055fefe", "javablobsethttpheadersac1blobapitestsethttpheadersacbea22860b" ] + "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersac17987480ad83", "javablobsethttpheadersac1blobapitestsethttpheadersac179105202" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[6].json new file mode 100644 index 000000000000..417753ed33e5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersac[6].json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac72425011e194?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f5f9ed5e-1975-409c-beea-d29997edf194" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522AEB5F984", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4ea57f45-901e-003c-7b0b-57b845000000", + "Date" : "Fri, 10 Jul 2020 22:43:36 GMT", + "x-ms-client-request-id" : "f5f9ed5e-1975-409c-beea-d29997edf194" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac72425011e194/javablobsethttpheadersac1blobapitestsethttpheadersac724130454", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "07c6cd6c-684d-49b3-aa59-75346bd4bb94", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:43:36.6489005Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:36 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:43:35 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82522AEE81FAD", + "Content-Length" : "0", + "x-ms-request-id" : "368ca44c-501e-008a-750b-57ca33000000", + "x-ms-client-request-id" : "07c6cd6c-684d-49b3-aa59-75346bd4bb94" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac72425011e194/javablobsethttpheadersac1blobapitestsethttpheadersac724130454?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9010088-aef4-4239-b954-6d60a4732106", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "02d837c1-001e-004c-1e0b-5701b2000000", + "Date" : "Fri, 10 Jul 2020 22:43:36 GMT", + "x-ms-client-request-id" : "a9010088-aef4-4239-b954-6d60a4732106" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac72425011e194/javablobsethttpheadersac1blobapitestsethttpheadersac724130454?comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb45930f-02d3-4b76-8737-a5264a76c1a7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522AF5E76B2", + "Last-Modified" : "Fri, 10 Jul 2020 22:43:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7cfd5fd8-a01e-0018-330b-574ee5000000", + "Date" : "Fri, 10 Jul 2020 22:43:37 GMT", + "x-ms-client-request-id" : "bb45930f-02d3-4b76-8737-a5264a76c1a7" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16082ed6-3ea9-43f6-8c18-b31f8a4a97d2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "2f0f82bd-001e-003e-4f0b-5706fd000000", + "Body" : "jtcsethttpheadersacjtcsethttpheadersac0blobapitestsethttpheadersac72425011e194Fri, 10 Jul 2020 22:43:36 GMT\"0x8D82522AEB5F984\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:43:37 GMT", + "x-ms-client-request-id" : "16082ed6-3ea9-43f6-8c18-b31f8a4a97d2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersac0blobapitestsethttpheadersac72425011e194?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f176023d-b29a-4a41-8700-5048fd670ce0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e15123c7-301e-0078-440b-57327a000000", + "Date" : "Fri, 10 Jul 2020 22:43:38 GMT", + "x-ms-client-request-id" : "f176023d-b29a-4a41-8700-5048fd670ce0" + }, + "Exception" : null + } ], + "variables" : [ "jtcsethttpheadersac0blobapitestsethttpheadersac72425011e194", "javablobsethttpheadersac1blobapitestsethttpheadersac724130454" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[0].json index fc8f2e58fa0b..790188d6fa33 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[0].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail005270ba70def760fa420da?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail040302a6be36f5896244879?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bade4dab-4e6d-4b63-82ad-94b7cd7bf2ad" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "49babd15-0365-41f8-b783-7acd3ac75b99" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107291AC274", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "ETag" : "0x8D825228E03F519", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde76896-001e-00fa-06f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "bade4dab-4e6d-4b63-82ad-94b7cd7bf2ad" + "x-ms-request-id" : "22522f1b-a01e-008e-620b-574734000000", + "Date" : "Fri, 10 Jul 2020 22:42:40 GMT", + "x-ms-client-request-id" : "49babd15-0365-41f8-b783-7acd3ac75b99" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail005270ba70def760fa420da/javablobsethttpheadersacfail1444211f6c92dce1e74c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail040302a6be36f5896244879/javablobsethttpheadersacfail199790609cee2c439d43", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2524efe0-fb1b-4ffc-b8c1-91cea90fefbe", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a8c73a43-2d4e-4866-ad17-6939fb0d2626", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "x-ms-version-id" : "2020-07-10T22:42:42.5143239Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:42 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", + "Date" : "Fri, 10 Jul 2020 22:42:42 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10729232782", + "ETag" : "0x8D825228EA3B0B2", "Content-Length" : "0", - "x-ms-request-id" : "5d791f9f-f01e-00ab-4bf0-12e764000000", - "x-ms-client-request-id" : "2524efe0-fb1b-4ffc-b8c1-91cea90fefbe" + "x-ms-request-id" : "72cbc688-301e-001a-1a0b-57f05d000000", + "x-ms-client-request-id" : "a8c73a43-2d4e-4866-ad17-6939fb0d2626" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail005270ba70def760fa420da/javablobsethttpheadersacfail1444211f6c92dce1e74c?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail040302a6be36f5896244879/javablobsethttpheadersacfail199790609cee2c439d43?comp=properties", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b0ca725c-52b2-4080-a836-906da9832d45" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "68be9ade-bba2-4284-8aa3-c9627d68e3ca" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6429544e-601e-000f-04f0-12dd80000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6429544e-601e-000f-04f0-12dd80000000\nTime:2020-04-15T06:35:16.7968906Z", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "b0ca725c-52b2-4080-a836-906da9832d45", + "x-ms-request-id" : "2f0f3696-001e-003e-690b-5706fd000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:2f0f3696-001e-003e-690b-5706fd000000\nTime:2020-07-10T22:42:42.9316303Z", + "Date" : "Fri, 10 Jul 2020 22:42:42 GMT", + "x-ms-client-request-id" : "68be9ade-bba2-4284-8aa3-c9627d68e3ca", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0b9e9453-eb74-4abe-bdfd-028238f978f6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5a94ca9-4935-4ff4-8c6b-f51373dc220e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde76901-001e-00fa-6af0-12f991000000", - "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail005270ba70def760fa420daWed, 15 Apr 2020 06:35:16 GMT\"0x8D7E107291AC274\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "0b9e9453-eb74-4abe-bdfd-028238f978f6", + "x-ms-request-id" : "e79c09df-601e-0075-690b-57faae000000", + "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail040302a6be36f5896244879Fri, 10 Jul 2020 22:42:41 GMT\"0x8D825228E03F519\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:42:43 GMT", + "x-ms-client-request-id" : "e5a94ca9-4935-4ff4-8c6b-f51373dc220e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail005270ba70def760fa420da?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail040302a6be36f5896244879?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dd1dfbdb-997f-4531-ade3-27b866d3095d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29db3a25-fa9e-4930-93ee-0a0d8b259b83" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d791ff4-f01e-00ab-17f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "dd1dfbdb-997f-4531-ade3-27b866d3095d" + "x-ms-request-id" : "01a8be9d-401e-0086-040b-575d3b000000", + "Date" : "Fri, 10 Jul 2020 22:42:43 GMT", + "x-ms-client-request-id" : "29db3a25-fa9e-4930-93ee-0a0d8b259b83" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersacfail005270ba70def760fa420da", "javablobsethttpheadersacfail1444211f6c92dce1e74c" ] + "variables" : [ "jtcsethttpheadersacfail040302a6be36f5896244879", "javablobsethttpheadersacfail199790609cee2c439d43" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[1].json index de334afc39e1..aa2c160d804b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[1].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail052361f3ed7828dd2742f6a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail062323314b61ed3af545baa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "58b94edb-bfe5-4de4-8dc5-e6f39e6883da" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e10f3617-ec00-4ba1-94c5-2e25138f1444" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072945923C", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:16 GMT", + "ETag" : "0x8D825228FD15D30", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64295485-601e-000f-34f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "58b94edb-bfe5-4de4-8dc5-e6f39e6883da" + "x-ms-request-id" : "4c4d455d-701e-0046-690b-57a505000000", + "Date" : "Fri, 10 Jul 2020 22:42:44 GMT", + "x-ms-client-request-id" : "e10f3617-ec00-4ba1-94c5-2e25138f1444" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail052361f3ed7828dd2742f6a/javablobsethttpheadersacfail177995d53f31cda15046", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail062323314b61ed3af545baa/javablobsethttpheadersacfail13438237e185b1f7c14b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "98b9911e-f14a-43fa-bca2-fa65aa292e4b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "98ed98ba-c7f3-43c4-b43e-4d5bf0719413", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "x-ms-version-id" : "2020-07-10T22:42:44.8820125Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", + "Date" : "Fri, 10 Jul 2020 22:42:44 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107294E1257", + "ETag" : "0x8D82522900D1F9D", "Content-Length" : "0", - "x-ms-request-id" : "bde76976-001e-00fa-56f0-12f991000000", - "x-ms-client-request-id" : "98b9911e-f14a-43fa-bca2-fa65aa292e4b" + "x-ms-request-id" : "b2deb787-101e-0022-0c0b-57549d000000", + "x-ms-client-request-id" : "98ed98ba-c7f3-43c4-b43e-4d5bf0719413" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail052361f3ed7828dd2742f6a/javablobsethttpheadersacfail177995d53f31cda15046?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail062323314b61ed3af545baa/javablobsethttpheadersacfail13438237e185b1f7c14b?comp=properties", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8b7bb15b-c9ec-44e5-9583-71cb8c58b69d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e6dcba2-f531-4ea0-b5c9-1685ce18ae50" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "5d79203c-f01e-00ab-5af0-12e764000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5d79203c-f01e-00ab-5af0-12e764000000\nTime:2020-04-15T06:35:17.0759742Z", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "8b7bb15b-c9ec-44e5-9583-71cb8c58b69d", + "x-ms-request-id" : "0e728237-601e-005a-0e0b-57f765000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:0e728237-601e-005a-0e0b-57f765000000\nTime:2020-07-10T22:42:45.3087761Z", + "Date" : "Fri, 10 Jul 2020 22:42:44 GMT", + "x-ms-client-request-id" : "4e6dcba2-f531-4ea0-b5c9-1685ce18ae50", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d66145cf-9109-4d66-ac4b-4c438e1abd55" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "42edf479-5227-4402-b5f4-ba24586fddd2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "642954c8-601e-000f-6cf0-12dd80000000", - "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail052361f3ed7828dd2742f6aWed, 15 Apr 2020 06:35:16 GMT\"0x8D7E1072945923C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "d66145cf-9109-4d66-ac4b-4c438e1abd55", + "x-ms-request-id" : "a2d12209-801e-0042-1b0b-572802000000", + "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail062323314b61ed3af545baaFri, 10 Jul 2020 22:42:44 GMT\"0x8D825228FD15D30\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:42:45 GMT", + "x-ms-client-request-id" : "42edf479-5227-4402-b5f4-ba24586fddd2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail052361f3ed7828dd2742f6a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail062323314b61ed3af545baa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "975bac6d-a06d-4432-b55f-edffde8eda8d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d555aa54-3b81-4d23-af71-1c59fab04bfa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde769cc-001e-00fa-21f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "975bac6d-a06d-4432-b55f-edffde8eda8d" + "x-ms-request-id" : "fa9492de-501e-0051-090b-570c0e000000", + "Date" : "Fri, 10 Jul 2020 22:42:45 GMT", + "x-ms-client-request-id" : "d555aa54-3b81-4d23-af71-1c59fab04bfa" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersacfail052361f3ed7828dd2742f6a", "javablobsethttpheadersacfail177995d53f31cda15046" ] + "variables" : [ "jtcsethttpheadersacfail062323314b61ed3af545baa", "javablobsethttpheadersacfail13438237e185b1f7c14b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[2].json index 2549525ca5b5..c41a212e3030 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[2].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail010842e8e481246f824269b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail089435d1bf3b8ab5bb4b019?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c8b278ac-efe7-4e1c-bc9a-736c6e5ba2a7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f6b6292-1813-4deb-b42f-2b9227ca1f97" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10729738431", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "ETag" : "0x8D8252290FAB8F0", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79209e-f01e-00ab-2ff0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "c8b278ac-efe7-4e1c-bc9a-736c6e5ba2a7" + "x-ms-request-id" : "25d4b550-201e-0039-150b-576a9e000000", + "Date" : "Fri, 10 Jul 2020 22:42:45 GMT", + "x-ms-client-request-id" : "9f6b6292-1813-4deb-b42f-2b9227ca1f97" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail010842e8e481246f824269b/javablobsethttpheadersacfail139852dc72063f031b49", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail089435d1bf3b8ab5bb4b019/javablobsethttpheadersacfail122250038869b023cc43", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f069bb06-be66-4c47-82b7-8d1dd7bb9e14", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e7bad84c-a852-46a4-b0bc-968c64cb6d3a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "x-ms-version-id" : "2020-07-10T22:42:46.7603503Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", + "Date" : "Fri, 10 Jul 2020 22:42:46 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107297C3239", + "ETag" : "0x8D82522912BBC2F", "Content-Length" : "0", - "x-ms-request-id" : "64295514-601e-000f-2df0-12dd80000000", - "x-ms-client-request-id" : "f069bb06-be66-4c47-82b7-8d1dd7bb9e14" + "x-ms-request-id" : "0947f098-c01e-000e-5b0b-57b832000000", + "x-ms-client-request-id" : "e7bad84c-a852-46a4-b0bc-968c64cb6d3a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail010842e8e481246f824269b/javablobsethttpheadersacfail139852dc72063f031b49?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail089435d1bf3b8ab5bb4b019/javablobsethttpheadersacfail122250038869b023cc43?comp=properties", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "619cbf43-31ac-4f75-8386-7dc6a8bf6b70" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2944e6fd-6409-4260-a88b-0ddd6fd6ff8a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "bde76a1d-001e-00fa-6bf0-12f991000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bde76a1d-001e-00fa-6bf0-12f991000000\nTime:2020-04-15T06:35:17.3761362Z", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "619cbf43-31ac-4f75-8386-7dc6a8bf6b70", + "x-ms-request-id" : "85cfe496-b01e-0082-2f0b-57d03c000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:85cfe496-b01e-0082-2f0b-57d03c000000\nTime:2020-07-10T22:42:47.1287221Z", + "Date" : "Fri, 10 Jul 2020 22:42:46 GMT", + "x-ms-client-request-id" : "2944e6fd-6409-4260-a88b-0ddd6fd6ff8a", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6b3a402d-973e-4fac-9109-304515605599" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d03b3337-9092-421a-a879-a90f152ebb42" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d7920e2-f01e-00ab-64f0-12e764000000", - "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail010842e8e481246f824269bWed, 15 Apr 2020 06:35:17 GMT\"0x8D7E10729738431\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:16 GMT", - "x-ms-client-request-id" : "6b3a402d-973e-4fac-9109-304515605599", + "x-ms-request-id" : "14c1580d-801e-007d-7f0b-57e0a1000000", + "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail089435d1bf3b8ab5bb4b019Fri, 10 Jul 2020 22:42:46 GMT\"0x8D8252290FAB8F0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:42:47 GMT", + "x-ms-client-request-id" : "d03b3337-9092-421a-a879-a90f152ebb42", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail010842e8e481246f824269b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail089435d1bf3b8ab5bb4b019?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d81f60a3-549a-473a-9e23-d172d70ad5da" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f14c42b-3e47-4ce8-959e-33c55296ef14" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64295549-601e-000f-59f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "d81f60a3-549a-473a-9e23-d172d70ad5da" + "x-ms-request-id" : "48d14232-701e-008d-490b-57a650000000", + "Date" : "Fri, 10 Jul 2020 22:42:47 GMT", + "x-ms-client-request-id" : "2f14c42b-3e47-4ce8-959e-33c55296ef14" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersacfail010842e8e481246f824269b", "javablobsethttpheadersacfail139852dc72063f031b49" ] + "variables" : [ "jtcsethttpheadersacfail089435d1bf3b8ab5bb4b019", "javablobsethttpheadersacfail122250038869b023cc43" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[3].json index ce9fe570f2f0..2a63183c5c48 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[3].json @@ -1,101 +1,103 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail030029744e0f09bce54d23a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail087914f58b2b1cdabe453ca?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3890c567-85c7-4655-a904-38fd973ed4cc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c25a85a1-f07b-4b39-8289-79b24ac26d50" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107299E6A7D", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "ETag" : "0x8D8252292235DB5", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde76a67-001e-00fa-2cf0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "3890c567-85c7-4655-a904-38fd973ed4cc" + "x-ms-request-id" : "b6ed4560-901e-0061-0f0b-57b2c1000000", + "Date" : "Fri, 10 Jul 2020 22:42:47 GMT", + "x-ms-client-request-id" : "c25a85a1-f07b-4b39-8289-79b24ac26d50" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail030029744e0f09bce54d23a/javablobsethttpheadersacfail193290edb3e0e356f540", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail087914f58b2b1cdabe453ca/javablobsethttpheadersacfail146297bc0669799d9e42", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "21dfab6b-caeb-47c8-b519-73584711b5d0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "846bc346-84e6-418c-bfc4-9bc0a09411e9", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "x-ms-version-id" : "2020-07-10T22:42:48.6977309Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", + "Date" : "Fri, 10 Jul 2020 22:42:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10729A7B96E", + "ETag" : "0x8D8252292535B1D", "Content-Length" : "0", - "x-ms-request-id" : "5d792131-f01e-00ab-24f0-12e764000000", - "x-ms-client-request-id" : "21dfab6b-caeb-47c8-b519-73584711b5d0" + "x-ms-request-id" : "f01e1d70-601e-004a-570b-57320d000000", + "x-ms-client-request-id" : "846bc346-84e6-418c-bfc4-9bc0a09411e9" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail030029744e0f09bce54d23a/javablobsethttpheadersacfail193290edb3e0e356f540", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail087914f58b2b1cdabe453ca/javablobsethttpheadersacfail146297bc0669799d9e42", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d7f22e09-0585-48e2-aca0-6ec3fb106cae" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "345db425-5d05-4522-b6c7-e145c6276d3e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "x-ms-version-id" : "2020-07-10T22:42:48.6977309Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", + "Date" : "Fri, 10 Jul 2020 22:42:48 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10729A7B96E", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:17 GMT", + "ETag" : "0x8D8252292535B1D", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:42:48 GMT", "Content-Length" : "7", - "x-ms-request-id" : "6429557e-601e-000f-0af0-12dd80000000", - "x-ms-client-request-id" : "d7f22e09-0585-48e2-aca0-6ec3fb106cae", + "x-ms-request-id" : "dbc120f7-a01e-0045-350b-574461000000", + "x-ms-client-request-id" : "345db425-5d05-4522-b6c7-e145c6276d3e", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail030029744e0f09bce54d23a/javablobsethttpheadersacfail193290edb3e0e356f540?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail087914f58b2b1cdabe453ca/javablobsethttpheadersacfail146297bc0669799d9e42?comp=properties", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ee336c58-d97e-4c8f-aaf9-5447185d8dd2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2338590f-82e7-48d3-8340-8ce37354b9a8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "bde76a97-001e-00fa-59f0-12f991000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bde76a97-001e-00fa-59f0-12f991000000\nTime:2020-04-15T06:35:17.7074531Z", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "ee336c58-d97e-4c8f-aaf9-5447185d8dd2", + "x-ms-request-id" : "e8b7eb58-701e-0079-310b-576da6000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:e8b7eb58-701e-0079-310b-576da6000000\nTime:2020-07-10T22:42:49.5062938Z", + "Date" : "Fri, 10 Jul 2020 22:42:49 GMT", + "x-ms-client-request-id" : "2338590f-82e7-48d3-8340-8ce37354b9a8", "Content-Type" : "application/xml" }, "Exception" : null @@ -103,43 +105,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f82ab296-7ea7-4394-a1e7-8ab26dba6088" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7273254e-145c-4862-86c8-e26e80a8495c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d792164-f01e-00ab-56f0-12e764000000", - "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail030029744e0f09bce54d23aWed, 15 Apr 2020 06:35:17 GMT\"0x8D7E107299E6A7D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "f82ab296-7ea7-4394-a1e7-8ab26dba6088", + "x-ms-request-id" : "7eaa0614-601e-0038-7f0b-573542000000", + "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail087914f58b2b1cdabe453caFri, 10 Jul 2020 22:42:48 GMT\"0x8D8252292235DB5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:42:49 GMT", + "x-ms-client-request-id" : "7273254e-145c-4862-86c8-e26e80a8495c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail030029744e0f09bce54d23a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail087914f58b2b1cdabe453ca?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ee2edaec-fb56-4db9-bda2-dac74d47ed4f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "51e1596f-c3dc-48c4-9c70-5be4306f50b6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "642955ab-601e-000f-2df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "ee2edaec-fb56-4db9-bda2-dac74d47ed4f" + "x-ms-request-id" : "02d80a13-001e-004c-7e0b-5701b2000000", + "Date" : "Fri, 10 Jul 2020 22:42:49 GMT", + "x-ms-client-request-id" : "51e1596f-c3dc-48c4-9c70-5be4306f50b6" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersacfail030029744e0f09bce54d23a", "javablobsethttpheadersacfail193290edb3e0e356f540" ] + "variables" : [ "jtcsethttpheadersacfail087914f58b2b1cdabe453ca", "javablobsethttpheadersacfail146297bc0669799d9e42" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[4].json index 4e77a54dcce7..e45a275cdc5e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[4].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail016469dcc717d3660d4f39b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail0740538e02061d06844383b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "198ce18d-73b5-4312-b6b1-d174972054c3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "450516ca-87a1-4388-8729-0427552ff9dc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10729D27F84", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "ETag" : "0x8D825229399BB3E", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde76ad3-001e-00fa-11f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "198ce18d-73b5-4312-b6b1-d174972054c3" + "x-ms-request-id" : "e725567e-101e-000d-500b-575956000000", + "Date" : "Fri, 10 Jul 2020 22:42:50 GMT", + "x-ms-client-request-id" : "450516ca-87a1-4388-8729-0427552ff9dc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail016469dcc717d3660d4f39b/javablobsethttpheadersacfail136530554b63a812ba4b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail0740538e02061d06844383b/javablobsethttpheadersacfail1932582c7827a72d1346", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2961bce6-b50b-4b61-b6e8-a741e5f6a03c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad8c11e1-d697-4a06-8436-107dfa74b862", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "x-ms-version-id" : "2020-07-10T22:42:51.2265327Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", + "Date" : "Fri, 10 Jul 2020 22:42:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10729DB0AC5", + "ETag" : "0x8D8252293D5386F", "Content-Length" : "0", - "x-ms-request-id" : "5d79219b-f01e-00ab-07f0-12e764000000", - "x-ms-client-request-id" : "2961bce6-b50b-4b61-b6e8-a741e5f6a03c" + "x-ms-request-id" : "63c9a4dd-b01e-0092-280b-571554000000", + "x-ms-client-request-id" : "ad8c11e1-d697-4a06-8436-107dfa74b862" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail016469dcc717d3660d4f39b/javablobsethttpheadersacfail136530554b63a812ba4b?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail0740538e02061d06844383b/javablobsethttpheadersacfail1932582c7827a72d1346?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3f66e75b-485f-48a5-b717-7c80f3ea495a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d481183-d8d8-42a5-b0bc-d277529570d0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10729DB0AC5", - "x-ms-lease-id" : "a2444ff6-cffd-4d77-82ee-924abb57ed93", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:17 GMT", + "ETag" : "0x8D8252293D5386F", + "x-ms-lease-id" : "0c1d93af-54c3-4c12-9fa9-5850f75efa0a", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "642955de-601e-000f-56f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "3f66e75b-485f-48a5-b717-7c80f3ea495a" + "x-ms-request-id" : "be4f7dff-301e-0068-1d0b-57f712000000", + "Date" : "Fri, 10 Jul 2020 22:42:50 GMT", + "x-ms-client-request-id" : "8d481183-d8d8-42a5-b0bc-d277529570d0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail016469dcc717d3660d4f39b/javablobsethttpheadersacfail136530554b63a812ba4b?comp=properties", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail0740538e02061d06844383b/javablobsethttpheadersacfail1932582c7827a72d1346?comp=properties", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "edfa363c-341b-4b9b-8255-cb404627e3c7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6c5a1d56-030c-4304-9ac5-71c2380a4790" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "bde76b1c-001e-00fa-51f0-12f991000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:bde76b1c-001e-00fa-51f0-12f991000000\nTime:2020-04-15T06:35:18.0427733Z", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "edfa363c-341b-4b9b-8255-cb404627e3c7", + "x-ms-request-id" : "8f9fc822-b01e-0066-530b-57dea2000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:8f9fc822-b01e-0066-530b-57dea2000000\nTime:2020-07-10T22:42:51.9815905Z", + "Date" : "Fri, 10 Jul 2020 22:42:51 GMT", + "x-ms-client-request-id" : "6c5a1d56-030c-4304-9ac5-71c2380a4790", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "91dd3933-6f5f-4596-86dc-b2173ec6c78a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fceb731-b7f1-42a8-8b09-ea22a0f0c6db" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d7921f4-f01e-00ab-5bf0-12e764000000", - "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail016469dcc717d3660d4f39bWed, 15 Apr 2020 06:35:17 GMT\"0x8D7E10729D27F84\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:17 GMT", - "x-ms-client-request-id" : "91dd3933-6f5f-4596-86dc-b2173ec6c78a", + "x-ms-request-id" : "33bd2879-101e-0050-030b-5753d2000000", + "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail0740538e02061d06844383bFri, 10 Jul 2020 22:42:50 GMT\"0x8D825229399BB3E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:42:52 GMT", + "x-ms-client-request-id" : "0fceb731-b7f1-42a8-8b09-ea22a0f0c6db", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail016469dcc717d3660d4f39b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail0740538e02061d06844383b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ea6e5693-26a6-4cf1-b9b3-4d6f037fc31f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66c7fa4a-dac6-4fef-a4a7-6ef3743ddab5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64295629-601e-000f-13f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:18 GMT", - "x-ms-client-request-id" : "ea6e5693-26a6-4cf1-b9b3-4d6f037fc31f" + "x-ms-request-id" : "37a98665-901e-004e-120b-57bf0a000000", + "Date" : "Fri, 10 Jul 2020 22:42:52 GMT", + "x-ms-client-request-id" : "66c7fa4a-dac6-4fef-a4a7-6ef3743ddab5" }, "Exception" : null } ], - "variables" : [ "jtcsethttpheadersacfail016469dcc717d3660d4f39b", "javablobsethttpheadersacfail136530554b63a812ba4b" ] + "variables" : [ "jtcsethttpheadersacfail0740538e02061d06844383b", "javablobsethttpheadersacfail1932582c7827a72d1346" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[5].json new file mode 100644 index 000000000000..e544f8418537 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsethttpheadersacfail[5].json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail000405543682a22b0e4ff7a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8292056-f2d9-4d81-a38e-c40f010ed0f7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8252294E4E5E9", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8f6b934c-001e-00a8-2e0b-570f2c000000", + "Date" : "Fri, 10 Jul 2020 22:42:52 GMT", + "x-ms-client-request-id" : "e8292056-f2d9-4d81-a38e-c40f010ed0f7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail000405543682a22b0e4ff7a/javablobsethttpheadersacfail1070954dd8da6768bc48", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "17729aae-cb52-4f03-ae02-cf3c0766b4a2", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:42:53.3420406Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:42:53 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:42:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8252295180576", + "Content-Length" : "0", + "x-ms-request-id" : "bd71cf3f-001e-0087-120b-5702e7000000", + "x-ms-client-request-id" : "17729aae-cb52-4f03-ae02-cf3c0766b4a2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail000405543682a22b0e4ff7a/javablobsethttpheadersacfail1070954dd8da6768bc48?comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d045d9d-5eca-479a-903e-e532e1ffda7e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "3b225afa-b01e-0049-4a0b-57d369000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:3b225afa-b01e-0049-4a0b-57d369000000\nTime:2020-07-10T22:42:53.7109351Z", + "Date" : "Fri, 10 Jul 2020 22:42:53 GMT", + "x-ms-client-request-id" : "6d045d9d-5eca-479a-903e-e532e1ffda7e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsethttpheadersacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "763fa885-dbb8-46e9-adbb-bf0c3a16fa63" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a50314b3-101e-006f-3b0b-579b71000000", + "Body" : "jtcsethttpheadersacfailjtcsethttpheadersacfail000405543682a22b0e4ff7aFri, 10 Jul 2020 22:42:53 GMT\"0x8D8252294E4E5E9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:42:53 GMT", + "x-ms-client-request-id" : "763fa885-dbb8-46e9-adbb-bf0c3a16fa63", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsethttpheadersacfail000405543682a22b0e4ff7a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "64b18347-10e2-41b9-b0b5-59564365e87c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "c3519ab0-601e-0081-430b-573158000000", + "Date" : "Fri, 10 Jul 2020 22:42:54 GMT", + "x-ms-client-request-id" : "64b18347-10e2-41b9-b0b5-59564365e87c" + }, + "Exception" : null + } ], + "variables" : [ "jtcsethttpheadersacfail000405543682a22b0e4ff7a", "javablobsethttpheadersacfail1070954dd8da6768bc48" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[0].json index 0f9240475edd..551a752cf520 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[0].json @@ -1,113 +1,133 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataacb7c95053292c7fe?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac592222441bfae92?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a0f4a9d2-84bf-46dc-bcae-06b87e213dc5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c92097a7-ce6d-4eb0-ba88-84e778a8d044" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072B53E07A", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:20 GMT", + "ETag" : "0x8D82522D82D0692", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429588c-601e-000f-71f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "a0f4a9d2-84bf-46dc-bcae-06b87e213dc5" + "x-ms-request-id" : "9f683821-a01e-0055-050b-578109000000", + "Date" : "Fri, 10 Jul 2020 22:44:45 GMT", + "x-ms-client-request-id" : "c92097a7-ce6d-4eb0-ba88-84e778a8d044" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataacb7c95053292c7fe/javablobsetmetadataac1blobapitestsetmetadataacb7c63711691b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac592222441bfae92/javablobsetmetadataac1blobapitestsetmetadataac592984445f45", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "15886067-a132-4825-b1ca-027bed9e27b2", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "05b6a385-73de-469e-923e-78a19722ffca", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:20 GMT", + "x-ms-version-id" : "2020-07-10T22:44:46.6647937Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:19 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:46 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072B5CFDEB", + "ETag" : "0x8D82522D8A3B381", "Content-Length" : "0", - "x-ms-request-id" : "bde770f2-001e-00fa-37f0-12f991000000", - "x-ms-client-request-id" : "15886067-a132-4825-b1ca-027bed9e27b2" + "x-ms-request-id" : "264e541e-f01e-0067-240b-57817e000000", + "x-ms-client-request-id" : "05b6a385-73de-469e-923e-78a19722ffca" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataacb7c95053292c7fe/javablobsetmetadataac1blobapitestsetmetadataacb7c63711691b?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac592222441bfae92/javablobsetmetadataac1blobapitestsetmetadataac592984445f45?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "043ec8b5-0a04-4636-9034-1d2ee5c6e320" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4cdb9738-24ba-4c18-aef7-89212241ffa6", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072B6479D0", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:20 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "41d07805-001e-0001-090b-57ce5e000000", + "Date" : "Fri, 10 Jul 2020 22:44:46 GMT", + "x-ms-client-request-id" : "4cdb9738-24ba-4c18-aef7-89212241ffa6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac592222441bfae92/javablobsetmetadataac1blobapitestsetmetadataac592984445f45?comp=metadata", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a404865-ff93-4fac-aa90-c58f17b2a3f3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522D925573E", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:47 GMT", + "x-ms-version-id" : "2020-07-10T22:44:47.5153998Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d792718-f01e-00ab-15f0-12e764000000", + "x-ms-request-id" : "cfdcf2d1-f01e-0077-290b-574416000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "043ec8b5-0a04-4636-9034-1d2ee5c6e320" + "Date" : "Fri, 10 Jul 2020 22:44:46 GMT", + "x-ms-client-request-id" : "8a404865-ff93-4fac-aa90-c58f17b2a3f3" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bd8b27cc-01d6-4cfa-ad40-092fd130050d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "25a2f369-5ac6-400c-a5c5-17e930051def" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "642958be-601e-000f-16f0-12dd80000000", - "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataacb7c95053292c7feWed, 15 Apr 2020 06:35:20 GMT\"0x8D7E1072B53E07A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "bd8b27cc-01d6-4cfa-ad40-092fd130050d", + "x-ms-request-id" : "b6edbfe4-901e-0061-4b0b-57b2c1000000", + "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac592222441bfae92Fri, 10 Jul 2020 22:44:45 GMT\"0x8D82522D82D0692\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:46 GMT", + "x-ms-client-request-id" : "25a2f369-5ac6-400c-a5c5-17e930051def", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataacb7c95053292c7fe?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac592222441bfae92?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "000c012c-9e5a-4f57-b445-6599713c6b0d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "745a6175-e9e7-409e-b443-aade7a2b3d3f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde77149-001e-00fa-7ff0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "000c012c-9e5a-4f57-b445-6599713c6b0d" + "x-ms-request-id" : "161bbc88-201e-0090-630b-57abec000000", + "Date" : "Fri, 10 Jul 2020 22:44:48 GMT", + "x-ms-client-request-id" : "745a6175-e9e7-409e-b443-aade7a2b3d3f" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataacb7c95053292c7fe", "javablobsetmetadataac1blobapitestsetmetadataacb7c63711691b" ] + "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac592222441bfae92", "javablobsetmetadataac1blobapitestsetmetadataac592984445f45" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[1].json index b76bc232a448..fd3e8d6c51eb 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[1].json @@ -1,113 +1,133 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac8ee96986b801117?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac67785604f97ad4e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a3d055e9-a1d6-4294-9c1b-cd9c8d26829e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a2394d62-01a4-4bcc-9bf5-48bfc65b74bc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072B7DB534", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:20 GMT", + "ETag" : "0x8D82522D9F487A5", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d792773-f01e-00ab-5ff0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "a3d055e9-a1d6-4294-9c1b-cd9c8d26829e" + "x-ms-request-id" : "713d3f70-a01e-007a-610b-578cc2000000", + "Date" : "Fri, 10 Jul 2020 22:44:48 GMT", + "x-ms-client-request-id" : "a2394d62-01a4-4bcc-9bf5-48bfc65b74bc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac8ee96986b801117/javablobsetmetadataac1blobapitestsetmetadataac8ee28695f43a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac67785604f97ad4e/javablobsetmetadataac1blobapitestsetmetadataac67774666eff8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0e0fca93-520c-4400-ac3c-5e024956a0ea", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6228a124-3286-4797-9578-981b34ed6f68", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:20 GMT", + "x-ms-version-id" : "2020-07-10T22:44:49.2866616Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:49 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:48 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072B85EC6A", + "ETag" : "0x8D82522DA33C438", "Content-Length" : "0", - "x-ms-request-id" : "642958e3-601e-000f-31f0-12dd80000000", - "x-ms-client-request-id" : "0e0fca93-520c-4400-ac3c-5e024956a0ea" + "x-ms-request-id" : "34a3dabc-201e-0064-7a0b-57601a000000", + "x-ms-client-request-id" : "6228a124-3286-4797-9578-981b34ed6f68" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac8ee96986b801117/javablobsetmetadataac1blobapitestsetmetadataac8ee28695f43a?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac67785604f97ad4e/javablobsetmetadataac1blobapitestsetmetadataac67774666eff8?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "95fb2eda-2909-47aa-abe5-a1bd7c9ed549" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7b4e7dc-205c-4c46-8b2f-c703de14e493", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072B8DB687", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:20 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4762572a-d01e-0012-710b-57ea52000000", + "Date" : "Fri, 10 Jul 2020 22:44:49 GMT", + "x-ms-client-request-id" : "d7b4e7dc-205c-4c46-8b2f-c703de14e493" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac67785604f97ad4e/javablobsetmetadataac1blobapitestsetmetadataac67774666eff8?comp=metadata", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "008e54d9-d246-4c7e-8dec-b8066e70877e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522DAA7D0E3", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:50 GMT", + "x-ms-version-id" : "2020-07-10T22:44:50.0492049Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde771a9-001e-00fa-4ef0-12f991000000", + "x-ms-request-id" : "d2e838f0-301e-009c-430b-573ce4000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "95fb2eda-2909-47aa-abe5-a1bd7c9ed549" + "Date" : "Fri, 10 Jul 2020 22:44:49 GMT", + "x-ms-client-request-id" : "008e54d9-d246-4c7e-8dec-b8066e70877e" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b39d737b-8cd6-4890-881f-e42508a8f851" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc6ead3f-cd32-41dc-8765-3535fb272e75" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d7927ba-f01e-00ab-1bf0-12e764000000", - "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac8ee96986b801117Wed, 15 Apr 2020 06:35:20 GMT\"0x8D7E1072B7DB534\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "b39d737b-8cd6-4890-881f-e42508a8f851", + "x-ms-request-id" : "9980bf70-d01e-005f-480b-5725be000000", + "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac67785604f97ad4eFri, 10 Jul 2020 22:44:48 GMT\"0x8D82522D9F487A5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:49 GMT", + "x-ms-client-request-id" : "dc6ead3f-cd32-41dc-8765-3535fb272e75", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac8ee96986b801117?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac67785604f97ad4e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c1543ab8-45ab-4160-b7ea-c3fe63d5a832" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5252bee8-524f-41b2-b59d-c65fb7f2d39f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429590e-601e-000f-54f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "c1543ab8-45ab-4160-b7ea-c3fe63d5a832" + "x-ms-request-id" : "192f5b97-c01e-0021-370b-57b5f9000000", + "Date" : "Fri, 10 Jul 2020 22:44:50 GMT", + "x-ms-client-request-id" : "5252bee8-524f-41b2-b59d-c65fb7f2d39f" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac8ee96986b801117", "javablobsetmetadataac1blobapitestsetmetadataac8ee28695f43a" ] + "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac67785604f97ad4e", "javablobsetmetadataac1blobapitestsetmetadataac67774666eff8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[2].json index 0b9e8f9dd2b4..d77919b2ae1c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[2].json @@ -1,113 +1,133 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac3c0602519934611?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac38b9595981d97b8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9b0a1fde-9529-42ef-90a9-7c9dd06e1025" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c541b7c6-2e3c-49b2-8661-b81035dbd7fb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072BA6A08D", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:20 GMT", + "ETag" : "0x8D82522DB55ABEE", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7720c-001e-00fa-1ef0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "9b0a1fde-9529-42ef-90a9-7c9dd06e1025" + "x-ms-request-id" : "118352a4-e01e-009f-750b-57dd80000000", + "Date" : "Fri, 10 Jul 2020 22:44:50 GMT", + "x-ms-client-request-id" : "c541b7c6-2e3c-49b2-8661-b81035dbd7fb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac3c0602519934611/javablobsetmetadataac1blobapitestsetmetadataac3c007859de90", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac38b9595981d97b8/javablobsetmetadataac1blobapitestsetmetadataac38b25033aaac", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "538d2e2e-51b4-4ca8-b943-dd46881dfc6f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "89b8ab6f-f456-4266-bf15-d3976dbd90f0", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "x-ms-version-id" : "2020-07-10T22:44:51.5722903Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:51 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072BAEDAF8", + "ETag" : "0x8D82522DB908697", "Content-Length" : "0", - "x-ms-request-id" : "5d7927f5-f01e-00ab-4af0-12e764000000", - "x-ms-client-request-id" : "538d2e2e-51b4-4ca8-b943-dd46881dfc6f" + "x-ms-request-id" : "25d5c850-201e-0039-2a0b-576a9e000000", + "x-ms-client-request-id" : "89b8ab6f-f456-4266-bf15-d3976dbd90f0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac3c0602519934611/javablobsetmetadataac1blobapitestsetmetadataac3c007859de90?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac38b9595981d97b8/javablobsetmetadataac1blobapitestsetmetadataac38b25033aaac?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "54e800b3-cf38-45df-9d4f-8dcd63d29e3d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f0ae8969-2fd6-481b-bf47-f1d726cdc8b5", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072BB78F9A", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "07640b00-701e-00a2-590b-57ab9b000000", + "Date" : "Fri, 10 Jul 2020 22:44:51 GMT", + "x-ms-client-request-id" : "f0ae8969-2fd6-481b-bf47-f1d726cdc8b5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac38b9595981d97b8/javablobsetmetadataac1blobapitestsetmetadataac38b25033aaac?comp=metadata", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0df03fc1-4c0b-4faa-83c6-b1013bdfd2b2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522DC05A4EB", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:52 GMT", + "x-ms-version-id" : "2020-07-10T22:44:52.3408379Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429593b-601e-000f-78f0-12dd80000000", + "x-ms-request-id" : "5018135c-e01e-0036-130b-571cf2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "54e800b3-cf38-45df-9d4f-8dcd63d29e3d" + "Date" : "Fri, 10 Jul 2020 22:44:51 GMT", + "x-ms-client-request-id" : "0df03fc1-4c0b-4faa-83c6-b1013bdfd2b2" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ec6ad3f2-6096-4e82-998e-19f1b15152e4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "daa25651-45b7-457c-9c41-aa582ae515da" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde77273-001e-00fa-74f0-12f991000000", - "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac3c0602519934611Wed, 15 Apr 2020 06:35:20 GMT\"0x8D7E1072BA6A08D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "ec6ad3f2-6096-4e82-998e-19f1b15152e4", + "x-ms-request-id" : "880abc2e-d01e-0084-780b-57e383000000", + "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac38b9595981d97b8Fri, 10 Jul 2020 22:44:51 GMT\"0x8D82522DB55ABEE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:52 GMT", + "x-ms-client-request-id" : "daa25651-45b7-457c-9c41-aa582ae515da", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac3c0602519934611?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac38b9595981d97b8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "80b93cce-f793-435e-9442-afb3d0df8068" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c0ee185-da73-4d10-b958-39fdd33d3601" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79284d-f01e-00ab-11f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "80b93cce-f793-435e-9442-afb3d0df8068" + "x-ms-request-id" : "0e72d564-601e-005a-070b-57f765000000", + "Date" : "Fri, 10 Jul 2020 22:44:52 GMT", + "x-ms-client-request-id" : "8c0ee185-da73-4d10-b958-39fdd33d3601" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac3c0602519934611", "javablobsetmetadataac1blobapitestsetmetadataac3c007859de90" ] + "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac38b9595981d97b8", "javablobsetmetadataac1blobapitestsetmetadataac38b25033aaac" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[3].json index c5e3c95f2253..04982525022f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[3].json @@ -1,145 +1,167 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaccb8783884ec7471?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac61b651268f89133?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3317298d-99f2-4dcc-87de-39dbe2ac8ed6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b30ced87-c313-492b-8c43-45462ca059f9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072BD0A827", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "ETag" : "0x8D82522DC9EEAC9", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:53 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429598b-601e-000f-31f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "3317298d-99f2-4dcc-87de-39dbe2ac8ed6" + "x-ms-request-id" : "31d22dbe-501e-007e-660b-5701c5000000", + "Date" : "Fri, 10 Jul 2020 22:44:53 GMT", + "x-ms-client-request-id" : "b30ced87-c313-492b-8c43-45462ca059f9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaccb8783884ec7471/javablobsetmetadataac1blobapitestsetmetadataaccb8530335967", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac61b651268f89133/javablobsetmetadataac1blobapitestsetmetadataac61b57512a3f6", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1cf01880-0fda-42fa-bb63-e5eaf5e187b9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b921a4de-b120-4010-a599-91476cf3538e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "x-ms-version-id" : "2020-07-10T22:44:53.6647816Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:53 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:53 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072BD88D01", + "ETag" : "0x8D82522DCCFD088", "Content-Length" : "0", - "x-ms-request-id" : "bde772b7-001e-00fa-30f0-12f991000000", - "x-ms-client-request-id" : "1cf01880-0fda-42fa-bb63-e5eaf5e187b9" + "x-ms-request-id" : "02326238-c01e-0053-140b-57b2b6000000", + "x-ms-client-request-id" : "b921a4de-b120-4010-a599-91476cf3538e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac61b651268f89133/javablobsetmetadataac1blobapitestsetmetadataac61b57512a3f6?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9960daaf-3b26-4ffc-88d0-6a0b3571b5c7", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1fca9caf-201e-0029-7e0b-57aff6000000", + "Date" : "Fri, 10 Jul 2020 22:44:53 GMT", + "x-ms-client-request-id" : "9960daaf-3b26-4ffc-88d0-6a0b3571b5c7" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaccb8783884ec7471/javablobsetmetadataac1blobapitestsetmetadataaccb8530335967", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac61b651268f89133/javablobsetmetadataac1blobapitestsetmetadataac61b57512a3f6", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "69fd23d1-df0e-46a4-ad80-4b416445aefd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d2c52f0-5f83-4f1d-afeb-fbd5b912764f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "x-ms-version-id" : "2020-07-10T22:44:53.6647816Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:53 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:53 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E1072BD88D01", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:21 GMT", + "ETag" : "0x8D82522DCCFD088", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:44:53 GMT", "Content-Length" : "7", - "x-ms-request-id" : "5d79288e-f01e-00ab-4bf0-12e764000000", - "x-ms-client-request-id" : "69fd23d1-df0e-46a4-ad80-4b416445aefd", + "x-ms-request-id" : "a49fa887-801e-006d-5f0b-5725c9000000", + "x-ms-client-request-id" : "1d2c52f0-5f83-4f1d-afeb-fbd5b912764f", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaccb8783884ec7471/javablobsetmetadataac1blobapitestsetmetadataaccb8530335967?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac61b651268f89133/javablobsetmetadataac1blobapitestsetmetadataac61b57512a3f6?comp=metadata", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83381d03-6ee4-424d-ab47-f31657f9d2bc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a88d9ee-7d01-4de1-b2ad-5c6135f78ed8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072BE8966E", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "ETag" : "0x8D82522DD818DB5", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:54 GMT", + "x-ms-version-id" : "2020-07-10T22:44:54.8306117Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "642959c7-601e-000f-5bf0-12dd80000000", + "x-ms-request-id" : "98ada399-e01e-006b-2c0b-571676000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "83381d03-6ee4-424d-ab47-f31657f9d2bc" + "Date" : "Fri, 10 Jul 2020 22:44:54 GMT", + "x-ms-client-request-id" : "1a88d9ee-7d01-4de1-b2ad-5c6135f78ed8" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8af14871-b432-4773-9bcb-8c4d35f3e6e4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "50782ed6-2d63-4c8b-9d1c-fcb29dfa6269" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde77333-001e-00fa-10f0-12f991000000", - "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataaccb8783884ec7471Wed, 15 Apr 2020 06:35:21 GMT\"0x8D7E1072BD0A827\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:20 GMT", - "x-ms-client-request-id" : "8af14871-b432-4773-9bcb-8c4d35f3e6e4", + "x-ms-request-id" : "d74c4b1f-501e-0041-420b-57c966000000", + "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac61b651268f89133Fri, 10 Jul 2020 22:44:53 GMT\"0x8D82522DC9EEAC9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:55 GMT", + "x-ms-client-request-id" : "50782ed6-2d63-4c8b-9d1c-fcb29dfa6269", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaccb8783884ec7471?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac61b651268f89133?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5eb84c72-2c42-44e6-96be-c62b66a1262c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d343d77-861b-458d-884a-179f8943f77f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7928d1-f01e-00ab-7ef0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "5eb84c72-2c42-44e6-96be-c62b66a1262c" + "x-ms-request-id" : "5f658927-201e-0016-230b-576755000000", + "Date" : "Fri, 10 Jul 2020 22:44:54 GMT", + "x-ms-client-request-id" : "6d343d77-861b-458d-884a-179f8943f77f" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataaccb8783884ec7471", "javablobsetmetadataac1blobapitestsetmetadataaccb8530335967" ] + "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac61b651268f89133", "javablobsetmetadataac1blobapitestsetmetadataac61b57512a3f6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[4].json index e92a693e4925..5775d553dfbd 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[4].json @@ -1,113 +1,133 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac27754531bc49bd5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac56d89903fa0e5fa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e0944f38-bd01-4975-9344-f2dd8056f7a8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5fd3d817-d34f-476f-bca2-8e2bb2603ac0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072C01FD0E", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "ETag" : "0x8D82522DE1D875E", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:55 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "642959ed-601e-000f-7af0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "e0944f38-bd01-4975-9344-f2dd8056f7a8" + "x-ms-request-id" : "4ea63c23-901e-003c-070b-57b845000000", + "Date" : "Fri, 10 Jul 2020 22:44:55 GMT", + "x-ms-client-request-id" : "5fd3d817-d34f-476f-bca2-8e2bb2603ac0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac27754531bc49bd5/javablobsetmetadataac1blobapitestsetmetadataac277338486a3b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac56d89903fa0e5fa/javablobsetmetadataac1blobapitestsetmetadataac56d56287174b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0a57b218-c88d-4e57-b465-370cf4095255", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3ae9536-ec55-4d55-90c2-f4d56d1efe58", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "x-ms-version-id" : "2020-07-10T22:44:56.1445487Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:56 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:55 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072C0D653F", + "ETag" : "0x8D82522DE4A326F", "Content-Length" : "0", - "x-ms-request-id" : "bde77394-001e-00fa-6af0-12f991000000", - "x-ms-client-request-id" : "0a57b218-c88d-4e57-b465-370cf4095255" + "x-ms-request-id" : "368d3591-501e-008a-600b-57ca33000000", + "x-ms-client-request-id" : "f3ae9536-ec55-4d55-90c2-f4d56d1efe58" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac27754531bc49bd5/javablobsetmetadataac1blobapitestsetmetadataac277338486a3b?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac56d89903fa0e5fa/javablobsetmetadataac1blobapitestsetmetadataac56d56287174b?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "faefb024-95da-4b42-99ba-4d49196c9a0e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ee27cde-d713-4967-b326-e2ba9f99575a", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072C16681D", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "02d89560-001e-004c-110b-5701b2000000", + "Date" : "Fri, 10 Jul 2020 22:44:55 GMT", + "x-ms-client-request-id" : "7ee27cde-d713-4967-b326-e2ba9f99575a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac56d89903fa0e5fa/javablobsetmetadataac1blobapitestsetmetadataac56d56287174b?comp=metadata", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "72c8dd26-492b-4198-a6ad-3ae715778116" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522DEB2F26B", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:56 GMT", + "x-ms-version-id" : "2020-07-10T22:44:56.8320379Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79291d-f01e-00ab-3df0-12e764000000", + "x-ms-request-id" : "b6ac7c2e-501e-0023-380b-570b41000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "faefb024-95da-4b42-99ba-4d49196c9a0e" + "Date" : "Fri, 10 Jul 2020 22:44:56 GMT", + "x-ms-client-request-id" : "72c8dd26-492b-4198-a6ad-3ae715778116" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "66a2cc2b-0b01-47c7-94a1-cbd3025dfc3b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c52e3377-024d-4135-a280-99ea434f69a3" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64295a27-601e-000f-26f0-12dd80000000", - "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac27754531bc49bd5Wed, 15 Apr 2020 06:35:21 GMT\"0x8D7E1072C01FD0E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "66a2cc2b-0b01-47c7-94a1-cbd3025dfc3b", + "x-ms-request-id" : "8f4f07fb-901e-0071-360b-5777a9000000", + "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac56d89903fa0e5faFri, 10 Jul 2020 22:44:55 GMT\"0x8D82522DE1D875E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:57 GMT", + "x-ms-client-request-id" : "c52e3377-024d-4135-a280-99ea434f69a3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac27754531bc49bd5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac56d89903fa0e5fa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b6c32b49-a874-4ef8-aaa7-252e349fefd2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5e54482a-7496-4891-ae55-67d70eb9e4a5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde773f0-001e-00fa-3af0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "b6c32b49-a874-4ef8-aaa7-252e349fefd2" + "x-ms-request-id" : "21c2b11f-f01e-0083-780b-578fe0000000", + "Date" : "Fri, 10 Jul 2020 22:44:56 GMT", + "x-ms-client-request-id" : "5e54482a-7496-4891-ae55-67d70eb9e4a5" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac27754531bc49bd5", "javablobsetmetadataac1blobapitestsetmetadataac277338486a3b" ] + "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac56d89903fa0e5fa", "javablobsetmetadataac1blobapitestsetmetadataac56d56287174b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[5].json index 68677e72cd78..c4e244aa99ce 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[5].json @@ -1,135 +1,155 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaceb3589752a09d5b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac60e0876936fdaf1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eafd5c1f-f3ed-4dd2-bc7f-69ec60df608f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f864ead-5f66-4b6b-9331-da17961c1d33" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072C306792", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "ETag" : "0x8D82522DF5C990E", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79296b-f01e-00ab-7ff0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "eafd5c1f-f3ed-4dd2-bc7f-69ec60df608f" + "x-ms-request-id" : "5d28cfef-701e-009d-1f0b-576338000000", + "Date" : "Fri, 10 Jul 2020 22:44:57 GMT", + "x-ms-client-request-id" : "0f864ead-5f66-4b6b-9331-da17961c1d33" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaceb3589752a09d5b/javablobsetmetadataac1blobapitestsetmetadataaceb374195180d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac60e0876936fdaf1/javablobsetmetadataac1blobapitestsetmetadataac60e791839ca1", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bc7b9fc7-6e55-4cbc-aa86-8f71af73bbf5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ef2d8d6-ee13-4b99-ac1b-a09140f3034b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "x-ms-version-id" : "2020-07-10T22:44:58.3421151Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:58 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:57 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072C3B0FD7", + "ETag" : "0x8D82522DF9984DF", "Content-Length" : "0", - "x-ms-request-id" : "64295a4f-601e-000f-4af0-12dd80000000", - "x-ms-client-request-id" : "bc7b9fc7-6e55-4cbc-aa86-8f71af73bbf5" + "x-ms-request-id" : "a1c39280-d01e-002d-140b-5722f1000000", + "x-ms-client-request-id" : "6ef2d8d6-ee13-4b99-ac1b-a09140f3034b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaceb3589752a09d5b/javablobsetmetadataac1blobapitestsetmetadataaceb374195180d?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac60e0876936fdaf1/javablobsetmetadataac1blobapitestsetmetadataac60e791839ca1?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a8c64927-1d90-4303-be69-8a4b8aeb6142" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3a11fee-4289-4819-9d0d-4678484c961a", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072C3B0FD7", - "x-ms-lease-id" : "ca61b03a-ab32-4dd1-ba9e-9e7199c11fa6", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:21 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5faffa52-e01e-007b-200b-57d31e000000", + "Date" : "Fri, 10 Jul 2020 22:44:58 GMT", + "x-ms-client-request-id" : "f3a11fee-4289-4819-9d0d-4678484c961a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac60e0876936fdaf1/javablobsetmetadataac1blobapitestsetmetadataac60e791839ca1?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "06a7b438-8b3d-467d-86e3-ec58d4274d2e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522DF9984DF", + "x-ms-lease-id" : "72b7935d-5933-4612-ac5e-5bf98cb42fab", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:58 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde77455-001e-00fa-14f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "a8c64927-1d90-4303-be69-8a4b8aeb6142" + "x-ms-request-id" : "e8b8d600-701e-0079-2c0b-576da6000000", + "Date" : "Fri, 10 Jul 2020 22:44:58 GMT", + "x-ms-client-request-id" : "06a7b438-8b3d-467d-86e3-ec58d4274d2e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaceb3589752a09d5b/javablobsetmetadataac1blobapitestsetmetadataaceb374195180d?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac60e0876936fdaf1/javablobsetmetadataac1blobapitestsetmetadataac60e791839ca1?comp=metadata", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ccbd31a1-dbc0-4e50-8cf5-d5043c1f4d26" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "45195ea3-094e-4fbc-8b93-29e90f4fe593" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072C4CEE73", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:22 GMT", + "ETag" : "0x8D82522E0546B7C", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:59 GMT", + "x-ms-version-id" : "2020-07-10T22:44:59.5689885Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d7929c0-f01e-00ab-48f0-12e764000000", + "x-ms-request-id" : "a6bc70bd-b01e-003b-7c0b-57d426000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "ccbd31a1-dbc0-4e50-8cf5-d5043c1f4d26" + "Date" : "Fri, 10 Jul 2020 22:44:59 GMT", + "x-ms-client-request-id" : "45195ea3-094e-4fbc-8b93-29e90f4fe593" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "07727bf7-ba79-4a87-85c3-d08115b57951" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a7e7153-8ec7-4912-aae3-1159c8d9da3a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64295a80-601e-000f-6ef0-12dd80000000", - "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataaceb3589752a09d5bWed, 15 Apr 2020 06:35:21 GMT\"0x8D7E1072C306792\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "07727bf7-ba79-4a87-85c3-d08115b57951", + "x-ms-request-id" : "69e8c171-d01e-0060-100b-57ed1d000000", + "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac60e0876936fdaf1Fri, 10 Jul 2020 22:44:57 GMT\"0x8D82522DF5C990E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:59 GMT", + "x-ms-client-request-id" : "7a7e7153-8ec7-4912-aae3-1159c8d9da3a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataaceb3589752a09d5b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac60e0876936fdaf1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3a683b32-f766-47e6-8623-0bec33657fab" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aca3180b-b6ed-44f5-8128-f43180157ff0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde774cc-001e-00fa-7af0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "3a683b32-f766-47e6-8623-0bec33657fab" + "x-ms-request-id" : "3914b90e-401e-00a9-5e0b-5750f0000000", + "Date" : "Fri, 10 Jul 2020 22:44:59 GMT", + "x-ms-client-request-id" : "aca3180b-b6ed-44f5-8128-f43180157ff0" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataaceb3589752a09d5b", "javablobsetmetadataac1blobapitestsetmetadataaceb374195180d" ] + "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac60e0876936fdaf1", "javablobsetmetadataac1blobapitestsetmetadataac60e791839ca1" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[6].json new file mode 100644 index 000000000000..392dc9a9285c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataac[6].json @@ -0,0 +1,133 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac09121776bd36277?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f4266989-7e51-4a24-91ba-010fbb4a3780" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522E105E5AA", + "Last-Modified" : "Fri, 10 Jul 2020 22:45:00 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f01efb21-601e-004a-700b-57320d000000", + "Date" : "Fri, 10 Jul 2020 22:45:00 GMT", + "x-ms-client-request-id" : "f4266989-7e51-4a24-91ba-010fbb4a3780" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac09121776bd36277/javablobsetmetadataac1blobapitestsetmetadataac0910536356c7", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7f4fcfc-9d7e-4f39-8baa-e93bb1c9c7be", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:45:01.0500453Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:45:01 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:45:00 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82522E136B765", + "Content-Length" : "0", + "x-ms-request-id" : "72504097-001e-005c-710b-57c4da000000", + "x-ms-client-request-id" : "a7f4fcfc-9d7e-4f39-8baa-e93bb1c9c7be" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac09121776bd36277/javablobsetmetadataac1blobapitestsetmetadataac0910536356c7?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c8cb205-8d5d-49f9-a5e5-b921fa0de81e", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "b1b4f934-101e-0032-6b0b-5791f5000000", + "Date" : "Fri, 10 Jul 2020 22:45:01 GMT", + "x-ms-client-request-id" : "2c8cb205-8d5d-49f9-a5e5-b921fa0de81e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac09121776bd36277/javablobsetmetadataac1blobapitestsetmetadataac0910536356c7?comp=metadata", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a5f7d8ea-605b-47ec-9f15-d1e5d4a523b3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522E198BF5E", + "Last-Modified" : "Fri, 10 Jul 2020 22:45:01 GMT", + "x-ms-version-id" : "2020-07-10T22:45:01.6935022Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "9d883b48-601e-0007-7f0b-57fde1000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:45:00 GMT", + "x-ms-client-request-id" : "a5f7d8ea-605b-47ec-9f15-d1e5d4a523b3" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c7c37af-b74d-4e27-8d74-ee5f5c8a8fdc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "02c752d5-601e-0091-330b-57f430000000", + "Body" : "jtcsetmetadataacjtcsetmetadataac0blobapitestsetmetadataac09121776bd36277Fri, 10 Jul 2020 22:45:00 GMT\"0x8D82522E105E5AA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:45:01 GMT", + "x-ms-client-request-id" : "4c7c37af-b74d-4e27-8d74-ee5f5c8a8fdc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataac0blobapitestsetmetadataac09121776bd36277?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe7a7261-2eec-4ebe-a804-a6c406dd80b2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "37e675b8-401e-003f-330b-575921000000", + "Date" : "Fri, 10 Jul 2020 22:45:01 GMT", + "x-ms-client-request-id" : "fe7a7261-2eec-4ebe-a804-a6c406dd80b2" + }, + "Exception" : null + } ], + "variables" : [ "jtcsetmetadataac0blobapitestsetmetadataac09121776bd36277", "javablobsetmetadataac1blobapitestsetmetadataac0910536356c7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[0].json index 787b8a3835cb..97ec1a96a950 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[0].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail873505153e2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail39829700dfe?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a30c6b7d-4746-4895-bfe9-295729a2f156" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ddde408-d0e9-4991-9185-185ad5e3b7da" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072C6A2325", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:22 GMT", + "ETag" : "0x8D82522BFA423D6", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d792a3e-f01e-00ab-34f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "a30c6b7d-4746-4895-bfe9-295729a2f156" + "x-ms-request-id" : "c351fc70-601e-0081-4e0b-573158000000", + "Date" : "Fri, 10 Jul 2020 22:44:04 GMT", + "x-ms-client-request-id" : "6ddde408-d0e9-4991-9185-185ad5e3b7da" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail873505153e2/javablobsetmetadataacfail1blobapitestsetmetadataacfail87360524", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail39829700dfe/javablobsetmetadataacfail1blobapitestsetmetadataacfail39821831", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "10b649c3-fc90-4b70-b322-1e5b956fcfe0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ffeb9456-791c-4120-9dd1-e382d47c1ae8", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:22 GMT", + "x-ms-version-id" : "2020-07-10T22:44:05.4314104Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:05 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:05 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072C7763F9", + "ETag" : "0x8D82522C00FFC78", "Content-Length" : "0", - "x-ms-request-id" : "64295aaf-601e-000f-16f0-12dd80000000", - "x-ms-client-request-id" : "10b649c3-fc90-4b70-b322-1e5b956fcfe0" + "x-ms-request-id" : "1fca54cd-201e-0029-490b-57aff6000000", + "x-ms-client-request-id" : "ffeb9456-791c-4120-9dd1-e382d47c1ae8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail873505153e2/javablobsetmetadataacfail1blobapitestsetmetadataacfail87360524?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail39829700dfe/javablobsetmetadataacfail1blobapitestsetmetadataacfail39821831?comp=metadata", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "50733ba7-d9b5-49df-8dcb-3056979e41e5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4deaa787-1703-4030-b8c5-081310289d0d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "bde7755b-001e-00fa-74f0-12f991000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bde7755b-001e-00fa-74f0-12f991000000\nTime:2020-04-15T06:35:22.3819195Z", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "50733ba7-d9b5-49df-8dcb-3056979e41e5", + "x-ms-request-id" : "01034524-901e-0013-0c0b-57b58e000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:01034524-901e-0013-0c0b-57b58e000000\nTime:2020-07-10T22:44:05.8468402Z", + "Date" : "Fri, 10 Jul 2020 22:44:05 GMT", + "x-ms-client-request-id" : "4deaa787-1703-4030-b8c5-081310289d0d", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5329f0a1-e643-4151-b94c-61c4df8f5ed0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6a6f7d7-9400-474a-a013-026e20b78b56" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d792aa3-f01e-00ab-0bf0-12e764000000", - "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfail873505153e2Wed, 15 Apr 2020 06:35:22 GMT\"0x8D7E1072C6A2325\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:21 GMT", - "x-ms-client-request-id" : "5329f0a1-e643-4151-b94c-61c4df8f5ed0", + "x-ms-request-id" : "1f060d2d-801e-0089-7a0b-572b57000000", + "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfail39829700dfeFri, 10 Jul 2020 22:44:04 GMT\"0x8D82522BFA423D6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:05 GMT", + "x-ms-client-request-id" : "a6a6f7d7-9400-474a-a013-026e20b78b56", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail873505153e2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail39829700dfe?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "73f2d4d5-0c50-4c4e-b57c-c48dee691658" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "60ca51f8-d5be-4ade-a619-4e0f5a9212bf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64295ad1-601e-000f-32f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "73f2d4d5-0c50-4c4e-b57c-c48dee691658" + "x-ms-request-id" : "6018577c-101e-00a4-480b-579824000000", + "Date" : "Fri, 10 Jul 2020 22:44:07 GMT", + "x-ms-client-request-id" : "60ca51f8-d5be-4ade-a619-4e0f5a9212bf" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfail873505153e2", "javablobsetmetadataacfail1blobapitestsetmetadataacfail87360524" ] + "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfail39829700dfe", "javablobsetmetadataacfail1blobapitestsetmetadataacfail39821831" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[1].json index 4f347a0631ff..8b4285d24a97 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[1].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail83517845624?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailf483787534d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "20363111-90f4-401a-98be-fd6d35948fac" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "213ac6c8-c508-4e82-b7ca-1e0cf8534777" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072C988EC6", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:22 GMT", + "ETag" : "0x8D82522C136A245", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde775ba-001e-00fa-41f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "20363111-90f4-401a-98be-fd6d35948fac" + "x-ms-request-id" : "01a926aa-401e-0086-4d0b-575d3b000000", + "Date" : "Fri, 10 Jul 2020 22:44:06 GMT", + "x-ms-client-request-id" : "213ac6c8-c508-4e82-b7ca-1e0cf8534777" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail83517845624/javablobsetmetadataacfail1blobapitestsetmetadataacfail83548864", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailf483787534d/javablobsetmetadataacfail1blobapitestsetmetadataacfailf4815372", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f9dbd680-de47-4e71-a7af-6f353d1e7c6b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "093c98ea-677b-4b8f-a23a-6515ad005228", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:22 GMT", + "x-ms-version-id" : "2020-07-10T22:44:07.7670753Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:07 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:06 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072CA0A0B9", + "ETag" : "0x8D82522C1746161", "Content-Length" : "0", - "x-ms-request-id" : "5d792ae6-f01e-00ab-48f0-12e764000000", - "x-ms-client-request-id" : "f9dbd680-de47-4e71-a7af-6f353d1e7c6b" + "x-ms-request-id" : "0e277aa4-c01e-0098-280b-57b1e3000000", + "x-ms-client-request-id" : "093c98ea-677b-4b8f-a23a-6515ad005228" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail83517845624/javablobsetmetadataacfail1blobapitestsetmetadataacfail83548864?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailf483787534d/javablobsetmetadataacfail1blobapitestsetmetadataacfailf4815372?comp=metadata", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ad851b40-af9d-47af-872f-530aa43552e6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e9bfed1-4767-4149-b1fa-e7a33a646eaa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "64295af5-601e-000f-55f0-12dd80000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:64295af5-601e-000f-55f0-12dd80000000\nTime:2020-04-15T06:35:22.6513165Z", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "ad851b40-af9d-47af-872f-530aa43552e6", + "x-ms-request-id" : "d75a8aba-501e-006e-670b-57c4ad000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:d75a8aba-501e-006e-670b-57c4ad000000\nTime:2020-07-10T22:44:08.1817789Z", + "Date" : "Fri, 10 Jul 2020 22:44:07 GMT", + "x-ms-client-request-id" : "9e9bfed1-4767-4149-b1fa-e7a33a646eaa", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "391f614f-5a78-4c3a-b824-33bb5bd3d520" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "62608130-0de4-4823-9ab5-11e14a59c0e8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde77622-001e-00fa-11f0-12f991000000", - "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfail83517845624Wed, 15 Apr 2020 06:35:22 GMT\"0x8D7E1072C988EC6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "391f614f-5a78-4c3a-b824-33bb5bd3d520", + "x-ms-request-id" : "72cc5f90-301e-001a-800b-57f05d000000", + "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfailf483787534dFri, 10 Jul 2020 22:44:07 GMT\"0x8D82522C136A245\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:07 GMT", + "x-ms-client-request-id" : "62608130-0de4-4823-9ab5-11e14a59c0e8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail83517845624?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailf483787534d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cde39a34-1760-4b56-941e-76bec010f759" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "297e04cc-9636-4678-80be-c9a10de28c0c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d792b36-f01e-00ab-11f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "cde39a34-1760-4b56-941e-76bec010f759" + "x-ms-request-id" : "7cfd933e-a01e-0018-5f0b-574ee5000000", + "Date" : "Fri, 10 Jul 2020 22:44:08 GMT", + "x-ms-client-request-id" : "297e04cc-9636-4678-80be-c9a10de28c0c" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfail83517845624", "javablobsetmetadataacfail1blobapitestsetmetadataacfail83548864" ] + "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfailf483787534d", "javablobsetmetadataacfail1blobapitestsetmetadataacfailf4815372" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[2].json index 5e92d94e9945..0ee98738f4e9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[2].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfaile8f099378f3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail45903018014?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0f413e0c-5b81-4c3e-a5ff-c3f62029fb46" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ce66b6b-d80f-489d-b32e-ff937689dac3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072CC41B8A", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:22 GMT", + "ETag" : "0x8D82522C26CCD40", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64295b37-601e-000f-09f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "0f413e0c-5b81-4c3e-a5ff-c3f62029fb46" + "x-ms-request-id" : "2f0fbe28-001e-003e-2b0b-5706fd000000", + "Date" : "Fri, 10 Jul 2020 22:44:09 GMT", + "x-ms-client-request-id" : "7ce66b6b-d80f-489d-b32e-ff937689dac3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfaile8f099378f3/javablobsetmetadataacfail1blobapitestsetmetadataacfaile8f88696", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail45903018014/javablobsetmetadataacfail1blobapitestsetmetadataacfail45919046", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "13fe54fc-f4f1-4a43-844b-8b020f63051d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d36a876b-2f86-4ccc-b80b-e49797d59a7b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:22 GMT", + "x-ms-version-id" : "2020-07-10T22:44:09.7364782Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072CD2921C", + "ETag" : "0x8D82522C2A0E32E", "Content-Length" : "0", - "x-ms-request-id" : "bde776a7-001e-00fa-01f0-12f991000000", - "x-ms-client-request-id" : "13fe54fc-f4f1-4a43-844b-8b020f63051d" + "x-ms-request-id" : "78c8d3db-901e-0095-650b-577937000000", + "x-ms-client-request-id" : "d36a876b-2f86-4ccc-b80b-e49797d59a7b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfaile8f099378f3/javablobsetmetadataacfail1blobapitestsetmetadataacfaile8f88696?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail45903018014/javablobsetmetadataacfail1blobapitestsetmetadataacfail45919046?comp=metadata", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "50a5c0af-1d80-4538-a948-d79dae64f649" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b2cc039-952e-43ec-b989-d8fda15d4a93" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "5d792bb3-f01e-00ab-75f0-12e764000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5d792bb3-f01e-00ab-75f0-12e764000000\nTime:2020-04-15T06:35:22.9705402Z", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "50a5c0af-1d80-4538-a948-d79dae64f649", + "x-ms-request-id" : "5a3fcfbe-c01e-0043-720b-5777de000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5a3fcfbe-c01e-0043-720b-5777de000000\nTime:2020-07-10T22:44:10.1183572Z", + "Date" : "Fri, 10 Jul 2020 22:44:09 GMT", + "x-ms-client-request-id" : "3b2cc039-952e-43ec-b989-d8fda15d4a93", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "31aeee3a-118b-4c85-9b2f-5277bb720554" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad633e3a-c970-4fe4-a933-08e487f647b5" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64295b83-601e-000f-4af0-12dd80000000", - "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfaile8f099378f3Wed, 15 Apr 2020 06:35:22 GMT\"0x8D7E1072CC41B8A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "31aeee3a-118b-4c85-9b2f-5277bb720554", + "x-ms-request-id" : "a1c36567-d01e-002d-0d0b-5722f1000000", + "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfail45903018014Fri, 10 Jul 2020 22:44:09 GMT\"0x8D82522C26CCD40\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:09 GMT", + "x-ms-client-request-id" : "ad633e3a-c970-4fe4-a933-08e487f647b5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfaile8f099378f3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail45903018014?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2d30c833-9f9e-4bb3-9df4-8ee209a6390c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "94e96107-2d0b-46e9-be73-d20ac83c67ed" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde776fe-001e-00fa-4df0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "2d30c833-9f9e-4bb3-9df4-8ee209a6390c" + "x-ms-request-id" : "5fafcd7d-e01e-007b-5a0b-57d31e000000", + "Date" : "Fri, 10 Jul 2020 22:44:10 GMT", + "x-ms-client-request-id" : "94e96107-2d0b-46e9-be73-d20ac83c67ed" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfaile8f099378f3", "javablobsetmetadataacfail1blobapitestsetmetadataacfaile8f88696" ] + "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfail45903018014", "javablobsetmetadataacfail1blobapitestsetmetadataacfail45919046" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[3].json index 9d9994621476..91d48f20e6f5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[3].json @@ -1,101 +1,103 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail5af522570ed?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailb1e266016e6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "16f17a6e-4305-4a7d-87af-8fdae7a921f4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fdb2d41c-df40-4abd-831c-f05156895dfa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072CF45BFC", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:23 GMT", + "ETag" : "0x8D82522C388DBD9", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d792c25-f01e-00ab-56f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "16f17a6e-4305-4a7d-87af-8fdae7a921f4" + "x-ms-request-id" : "e8b87c51-701e-0079-610b-576da6000000", + "Date" : "Fri, 10 Jul 2020 22:44:10 GMT", + "x-ms-client-request-id" : "fdb2d41c-df40-4abd-831c-f05156895dfa" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail5af522570ed/javablobsetmetadataacfail1blobapitestsetmetadataacfail5af84593", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailb1e266016e6/javablobsetmetadataacfail1blobapitestsetmetadataacfailb1e26202", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ef60566c-4e80-448b-9209-e8c4bd5bbbad", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bac21b7-4645-42b0-b52d-0c61bd4dfd17", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:23 GMT", + "x-ms-version-id" : "2020-07-10T22:44:11.5988055Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:11 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072CFDF236", + "ETag" : "0x8D82522C3BD0E57", "Content-Length" : "0", - "x-ms-request-id" : "64295bd5-601e-000f-0bf0-12dd80000000", - "x-ms-client-request-id" : "ef60566c-4e80-448b-9209-e8c4bd5bbbad" + "x-ms-request-id" : "a6bc1269-b01e-003b-4b0b-57d426000000", + "x-ms-client-request-id" : "7bac21b7-4645-42b0-b52d-0c61bd4dfd17" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail5af522570ed/javablobsetmetadataacfail1blobapitestsetmetadataacfail5af84593", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailb1e266016e6/javablobsetmetadataacfail1blobapitestsetmetadataacfailb1e26202", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ee4e28c1-3c3f-42c5-8b0a-91aa3581a1a7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "013b0707-1d99-4d77-bdde-d3c24fefa919" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:23 GMT", + "x-ms-version-id" : "2020-07-10T22:44:11.5988055Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:11 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E1072CFDF236", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:23 GMT", + "ETag" : "0x8D82522C3BD0E57", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:44:11 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde7778d-001e-00fa-49f0-12f991000000", - "x-ms-client-request-id" : "ee4e28c1-3c3f-42c5-8b0a-91aa3581a1a7", + "x-ms-request-id" : "69e87efd-d01e-0060-410b-57ed1d000000", + "x-ms-client-request-id" : "013b0707-1d99-4d77-bdde-d3c24fefa919", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail5af522570ed/javablobsetmetadataacfail1blobapitestsetmetadataacfail5af84593?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailb1e266016e6/javablobsetmetadataacfail1blobapitestsetmetadataacfailb1e26202?comp=metadata", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cd2167c3-32ec-4f1c-b407-281e2f5d48dd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ba169f9-a925-4e9b-b143-6c485778e2bb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "5d792cc0-f01e-00ab-5cf0-12e764000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5d792cc0-f01e-00ab-5cf0-12e764000000\nTime:2020-04-15T06:35:23.3959396Z", - "Date" : "Wed, 15 Apr 2020 06:35:22 GMT", - "x-ms-client-request-id" : "cd2167c3-32ec-4f1c-b407-281e2f5d48dd", + "x-ms-request-id" : "39147e9b-401e-00a9-750b-5750f0000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:39147e9b-401e-00a9-750b-5750f0000000\nTime:2020-07-10T22:44:12.4912327Z", + "Date" : "Fri, 10 Jul 2020 22:44:11 GMT", + "x-ms-client-request-id" : "4ba169f9-a925-4e9b-b143-6c485778e2bb", "Content-Type" : "application/xml" }, "Exception" : null @@ -103,43 +105,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b7e50312-efd2-47c7-8ade-4ff91fb67b05" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "312a063c-9470-4f25-9e96-af6ae7595382" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64295c21-601e-000f-43f0-12dd80000000", - "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfail5af522570edWed, 15 Apr 2020 06:35:23 GMT\"0x8D7E1072CF45BFC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", - "x-ms-client-request-id" : "b7e50312-efd2-47c7-8ade-4ff91fb67b05", + "x-ms-request-id" : "f01ea2c0-601e-004a-7f0b-57320d000000", + "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfailb1e266016e6Fri, 10 Jul 2020 22:44:11 GMT\"0x8D82522C388DBD9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:12 GMT", + "x-ms-client-request-id" : "312a063c-9470-4f25-9e96-af6ae7595382", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail5af522570ed?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailb1e266016e6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "04389bc5-ecf5-48e4-afce-11d848a43818" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8fed851d-4b0e-4437-a3a6-e4295e56300c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde777eb-001e-00fa-1ff0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", - "x-ms-client-request-id" : "04389bc5-ecf5-48e4-afce-11d848a43818" + "x-ms-request-id" : "72501eea-001e-005c-410b-57c4da000000", + "Date" : "Fri, 10 Jul 2020 22:44:12 GMT", + "x-ms-client-request-id" : "8fed851d-4b0e-4437-a3a6-e4295e56300c" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfail5af522570ed", "javablobsetmetadataacfail1blobapitestsetmetadataacfail5af84593" ] + "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfailb1e266016e6", "javablobsetmetadataacfail1blobapitestsetmetadataacfailb1e26202" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[4].json index 857989c380e7..369f4728700e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[4].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailc1523898854?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail4477325853c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "016b2076-5440-45fb-a179-dd75e55018e5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23b72cf7-1cc2-4ecd-a61c-767e633896aa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072D3CC104", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:23 GMT", + "ETag" : "0x8D82522C4C0F069", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d792d31-f01e-00ab-42f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", - "x-ms-client-request-id" : "016b2076-5440-45fb-a179-dd75e55018e5" + "x-ms-request-id" : "37a9f30f-901e-004e-240b-57bf0a000000", + "Date" : "Fri, 10 Jul 2020 22:44:12 GMT", + "x-ms-client-request-id" : "23b72cf7-1cc2-4ecd-a61c-767e633896aa" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailc1523898854/javablobsetmetadataacfail1blobapitestsetmetadataacfailc1542644", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail4477325853c/javablobsetmetadataacfail1blobapitestsetmetadataacfail44729351", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bc688ead-2d49-4f9d-b0a4-ae6ed6575d73", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6c8aae70-6eae-4e13-a23d-f7061c27f1b3", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:23 GMT", + "x-ms-version-id" : "2020-07-10T22:44:13.6862931Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:13 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", + "Date" : "Fri, 10 Jul 2020 22:44:13 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072D4B1338", + "ETag" : "0x8D82522C4FB94D3", "Content-Length" : "0", - "x-ms-request-id" : "64295c53-601e-000f-6ef0-12dd80000000", - "x-ms-client-request-id" : "bc688ead-2d49-4f9d-b0a4-ae6ed6575d73" + "x-ms-request-id" : "8f6c154e-001e-00a8-5c0b-570f2c000000", + "x-ms-client-request-id" : "6c8aae70-6eae-4e13-a23d-f7061c27f1b3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailc1523898854/javablobsetmetadataacfail1blobapitestsetmetadataacfailc1542644?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail4477325853c/javablobsetmetadataacfail1blobapitestsetmetadataacfail44729351?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5b62c911-2b85-4499-9bc8-2fa142ca3a1e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b73dee2d-1042-43aa-b54d-6fd874d39bb3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072D4B1338", - "x-ms-lease-id" : "7d7caaca-8d14-4fd2-9c23-94ea0714565b", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:23 GMT", + "ETag" : "0x8D82522C4FB94D3", + "x-ms-lease-id" : "0abe4d22-f6fb-4709-bcaa-7796ef6ef910", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde77852-001e-00fa-75f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", - "x-ms-client-request-id" : "5b62c911-2b85-4499-9bc8-2fa142ca3a1e" + "x-ms-request-id" : "37e639da-401e-003f-280b-575921000000", + "Date" : "Fri, 10 Jul 2020 22:44:13 GMT", + "x-ms-client-request-id" : "b73dee2d-1042-43aa-b54d-6fd874d39bb3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailc1523898854/javablobsetmetadataacfail1blobapitestsetmetadataacfailc1542644?comp=metadata", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail4477325853c/javablobsetmetadataacfail1blobapitestsetmetadataacfail44729351?comp=metadata", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "242404dc-9841-402a-a017-7786b2024d6c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "db8fea92-43e7-4d57-9e98-451016a042e9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "5d792d91-f01e-00ab-13f0-12e764000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:5d792d91-f01e-00ab-13f0-12e764000000\nTime:2020-04-15T06:35:23.8223409Z", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", - "x-ms-client-request-id" : "242404dc-9841-402a-a017-7786b2024d6c", + "x-ms-request-id" : "39ef9219-101e-008b-060b-5795ef000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:39ef9219-101e-008b-060b-5795ef000000\nTime:2020-07-10T22:44:14.4313098Z", + "Date" : "Fri, 10 Jul 2020 22:44:14 GMT", + "x-ms-client-request-id" : "db8fea92-43e7-4d57-9e98-451016a042e9", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1e0e128f-c539-4144-8341-8af174f5aeea" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87f76de1-9649-446c-a4df-c98954465b28" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64295c78-601e-000f-0cf0-12dd80000000", - "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfailc1523898854Wed, 15 Apr 2020 06:35:23 GMT\"0x8D7E1072D3CC104\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", - "x-ms-client-request-id" : "1e0e128f-c539-4144-8341-8af174f5aeea", + "x-ms-request-id" : "06558f70-301e-0025-6d0b-5738fe000000", + "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfail4477325853cFri, 10 Jul 2020 22:44:13 GMT\"0x8D82522C4C0F069\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:14 GMT", + "x-ms-client-request-id" : "87f76de1-9649-446c-a4df-c98954465b28", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailc1523898854?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfail4477325853c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "02f9d454-e84e-4fa9-b93e-31e80ea947e9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c8d925a-4021-4e4c-abc3-b96f221d58bf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde778a3-001e-00fa-3af0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:23 GMT", - "x-ms-client-request-id" : "02f9d454-e84e-4fa9-b93e-31e80ea947e9" + "x-ms-request-id" : "0b0e0cd6-a01e-00a1-1b0b-574aff000000", + "Date" : "Fri, 10 Jul 2020 22:44:14 GMT", + "x-ms-client-request-id" : "1c8d925a-4021-4e4c-abc3-b96f221d58bf" }, "Exception" : null } ], - "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfailc1523898854", "javablobsetmetadataacfail1blobapitestsetmetadataacfailc1542644" ] + "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfail4477325853c", "javablobsetmetadataacfail1blobapitestsetmetadataacfail44729351" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[5].json new file mode 100644 index 000000000000..0c88a97c6a7c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsetmetadataacfail[5].json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailf04742364c9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "951cb4ca-7a96-4f87-94fe-212c2905558f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82522C626A789", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:15 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0948af0c-c01e-000e-2c0b-57b832000000", + "Date" : "Fri, 10 Jul 2020 22:44:14 GMT", + "x-ms-client-request-id" : "951cb4ca-7a96-4f87-94fe-212c2905558f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailf04742364c9/javablobsetmetadataacfail1blobapitestsetmetadataacfailf0486419", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "438148ab-160b-4c65-b393-d1751e402220", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:44:15.9809284Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:44:15 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:44:15 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82522C659B704", + "Content-Length" : "0", + "x-ms-request-id" : "e84cdc7c-d01e-0070-650b-572875000000", + "x-ms-client-request-id" : "438148ab-160b-4c65-b393-d1751e402220" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailf04742364c9/javablobsetmetadataacfail1blobapitestsetmetadataacfailf0486419?comp=metadata", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f4cb9a13-dd30-4c4b-ab17-b7c64af434bf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "30020e53-201e-0080-420b-576e84000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:30020e53-201e-0080-420b-576e84000000\nTime:2020-07-10T22:44:16.3925772Z", + "Date" : "Fri, 10 Jul 2020 22:44:15 GMT", + "x-ms-client-request-id" : "f4cb9a13-dd30-4c4b-ab17-b7c64af434bf", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetmetadataacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "982fae9d-6369-4a1a-abd4-992fd207e07b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b2585d83-e01e-0019-6d0b-571139000000", + "Body" : "jtcsetmetadataacfailjtcsetmetadataacfail0blobapitestsetmetadataacfailf04742364c9Fri, 10 Jul 2020 22:44:15 GMT\"0x8D82522C626A789\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:44:15 GMT", + "x-ms-client-request-id" : "982fae9d-6369-4a1a-abd4-992fd207e07b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetmetadataacfail0blobapitestsetmetadataacfailf04742364c9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c069f6a6-9ffb-4b09-aca4-105d3c87d5fe" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1b7e7979-601e-0017-200b-573889000000", + "Date" : "Fri, 10 Jul 2020 22:44:16 GMT", + "x-ms-client-request-id" : "c069f6a6-9ffb-4b09-aca4-105d3c87d5fe" + }, + "Exception" : null + } ], + "variables" : [ "jtcsetmetadataacfail0blobapitestsetmetadataacfailf04742364c9", "javablobsetmetadataacfail1blobapitestsetmetadataacfailf0486419" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsac[0].json new file mode 100644 index 000000000000..773dd1e6ce51 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsac[0].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsac55521436487d168e4b6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d524f47-7347-42f7-b921-c5c4dd0fe2ab" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8251F3EE55EE9", + "Last-Modified" : "Fri, 10 Jul 2020 22:19:00 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "509816db-701e-001b-6f08-57af81000000", + "Date" : "Fri, 10 Jul 2020 22:18:59 GMT", + "x-ms-client-request-id" : "6d524f47-7347-42f7-b921-c5c4dd0fe2ab" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsac55521436487d168e4b6/javablobsettagsac1blobapitestsettagsac5557434120a7d24d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2f65db9-3b7f-4d97-ac76-029bbcb44727", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:19:00.9533244Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:19:00 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:19:00 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8251F3F52D93C", + "Content-Length" : "0", + "x-ms-request-id" : "98a1267b-e01e-006b-7a08-571676000000", + "x-ms-client-request-id" : "d2f65db9-3b7f-4d97-ac76-029bbcb44727" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsac55521436487d168e4b6/javablobsettagsac1blobapitestsettagsac5557434120a7d24d?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "488226eb-fc75-4643-ae3d-9234483f4ec5", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "73caab00-301e-0057-5008-573fb1000000", + "Date" : "Fri, 10 Jul 2020 22:19:01 GMT", + "x-ms-client-request-id" : "488226eb-fc75-4643-ae3d-9234483f4ec5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsac55521436487d168e4b6/javablobsettagsac1blobapitestsettagsac5557434120a7d24d?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee654955-a8fb-4722-99b6-a3daee8e6904", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5a3180ae-c01e-0043-6b08-5777de000000", + "Date" : "Fri, 10 Jul 2020 22:19:01 GMT", + "x-ms-client-request-id" : "ee654955-a8fb-4722-99b6-a3daee8e6904" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsettagsac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "993b411e-85fb-46a9-bdda-cebf58dbc4eb" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "95755235-f01e-0093-6408-574a88000000", + "Body" : "jtcsettagsacjtcsettagsac0blobapitestsettagsac55521436487d168e4b6Fri, 10 Jul 2020 22:19:00 GMT\"0x8D8251F3EE55EE9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:19:01 GMT", + "x-ms-client-request-id" : "993b411e-85fb-46a9-bdda-cebf58dbc4eb", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsac55521436487d168e4b6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "691f54f7-7dea-425c-96d3-f04054d3cf3b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "9d7ea87f-601e-0007-6108-57fde1000000", + "Date" : "Fri, 10 Jul 2020 22:19:02 GMT", + "x-ms-client-request-id" : "691f54f7-7dea-425c-96d3-f04054d3cf3b" + }, + "Exception" : null + } ], + "variables" : [ "jtcsettagsac0blobapitestsettagsac55521436487d168e4b6", "javablobsettagsac1blobapitestsettagsac5557434120a7d24d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsac[1].json new file mode 100644 index 000000000000..8dabc8500d5c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsac[1].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsace63023190865b6830df?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5aa1db0-f58d-4c0b-a794-49fbac614c22" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8251F40AF601D", + "Last-Modified" : "Fri, 10 Jul 2020 22:19:03 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0b2d7975-f01e-0058-6708-5749dd000000", + "Date" : "Fri, 10 Jul 2020 22:19:03 GMT", + "x-ms-client-request-id" : "e5aa1db0-f58d-4c0b-a794-49fbac614c22" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsace63023190865b6830df/javablobsettagsac1blobapitestsettagsace634814013068421", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd6caee8-f7d1-4979-aa0e-1d9c3ddbe438", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:19:03.6332327Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:19:03 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:19:02 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8251F40EBC527", + "Content-Length" : "0", + "x-ms-request-id" : "2ffa6360-201e-0080-2008-576e84000000", + "x-ms-client-request-id" : "bd6caee8-f7d1-4979-aa0e-1d9c3ddbe438" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsace63023190865b6830df/javablobsettagsac1blobapitestsettagsace634814013068421?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4922a939-5ef0-4917-8b27-18fc8e224fe2", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "263fd45e-a01e-0008-5408-578b8d000000", + "Date" : "Fri, 10 Jul 2020 22:19:03 GMT", + "x-ms-client-request-id" : "4922a939-5ef0-4917-8b27-18fc8e224fe2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsace63023190865b6830df/javablobsettagsac1blobapitestsettagsace634814013068421?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ba063d0-1141-4ebe-8d1d-0d0d1390a240", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7d3e5677-501e-001c-0208-57c3e2000000", + "Date" : "Fri, 10 Jul 2020 22:19:03 GMT", + "x-ms-client-request-id" : "3ba063d0-1141-4ebe-8d1d-0d0d1390a240" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsettagsac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae63f8ab-745e-4182-a5c6-9655036d3abe" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "872df31b-d01e-0094-6108-5726eb000000", + "Body" : "jtcsettagsacjtcsettagsac0blobapitestsettagsace63023190865b6830dfFri, 10 Jul 2020 22:19:03 GMT\"0x8D8251F40AF601D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:19:04 GMT", + "x-ms-client-request-id" : "ae63f8ab-745e-4182-a5c6-9655036d3abe", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsac0blobapitestsettagsace63023190865b6830df?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46e00109-7fdd-47fe-921e-489635150cd6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "9c7d93bd-c01e-006c-6608-577a15000000", + "Date" : "Fri, 10 Jul 2020 22:19:04 GMT", + "x-ms-client-request-id" : "46e00109-7fdd-47fe-921e-489635150cd6" + }, + "Exception" : null + } ], + "variables" : [ "jtcsettagsac0blobapitestsettagsace63023190865b6830df", "javablobsettagsac1blobapitestsettagsace634814013068421" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsacfail[0].json new file mode 100644 index 000000000000..8e148cd7f58e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettagsacfail[0].json @@ -0,0 +1,114 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsacfail0blobapitestsettagsacfailbc36390106abb2b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f46895e-04bb-4442-adf8-14866852ac57" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8251F4BA3C65D", + "Last-Modified" : "Fri, 10 Jul 2020 22:19:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b56a0fae-301e-008c-2108-57f98c000000", + "Date" : "Fri, 10 Jul 2020 22:19:21 GMT", + "x-ms-client-request-id" : "7f46895e-04bb-4442-adf8-14866852ac57" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsacfail0blobapitestsettagsacfailbc36390106abb2b/javablobsettagsacfail1blobapitestsettagsacfailbc398953c17a", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "93ec29f2-f9fd-46b4-8605-d2deb3706169", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:19:22.2294846Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:19:22 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:19:21 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8251F4C01553E", + "Content-Length" : "0", + "x-ms-request-id" : "33b27f45-101e-0050-3708-5753d2000000", + "x-ms-client-request-id" : "93ec29f2-f9fd-46b4-8605-d2deb3706169" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsacfail0blobapitestsettagsacfailbc36390106abb2b/javablobsettagsacfail1blobapitestsettagsacfailbc398953c17a?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d3496d2c-e52f-4eef-ab37-b30f193da5ad", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "253", + "StatusCode" : "412", + "x-ms-request-id" : "10dca6ce-001e-0097-2e08-57c78f000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:10dca6ce-001e-0097-2e08-57c78f000000\nTime:2020-07-10T22:19:22.7168912Z", + "Date" : "Fri, 10 Jul 2020 22:19:22 GMT", + "x-ms-client-request-id" : "d3496d2c-e52f-4eef-ab37-b30f193da5ad", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsettagsacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1820e37c-1a97-41f1-abf4-94e91bfa9897" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a4f8a619-101e-006f-5408-579b71000000", + "Body" : "jtcsettagsacfailjtcsettagsacfail0blobapitestsettagsacfailbc36390106abb2bFri, 10 Jul 2020 22:19:21 GMT\"0x8D8251F4BA3C65D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:19:22 GMT", + "x-ms-client-request-id" : "1820e37c-1a97-41f1-abf4-94e91bfa9897", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettagsacfail0blobapitestsettagsacfailbc36390106abb2b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "be82df3b-3aa6-41b3-b222-90d474f64360" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "9f2f48e1-201e-005b-3b08-57a8b9000000", + "Date" : "Fri, 10 Jul 2020 22:19:23 GMT", + "x-ms-client-request-id" : "be82df3b-3aa6-41b3-b222-90d474f64360" + }, + "Exception" : null + } ], + "variables" : [ "jtcsettagsacfail0blobapitestsettagsacfailbc36390106abb2b", "javablobsettagsacfail1blobapitestsettagsacfailbc398953c17a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[0].json new file mode 100644 index 000000000000..25e2d786fe7d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[0].json @@ -0,0 +1,124 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0655036b64db747b264d7?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bccb2f6c-a2b0-4275-a784-38ef355ba125" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82A71BD01DCB6", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:06 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "27c6d086-a01e-0055-6c5a-5c8109000000", + "Date" : "Fri, 17 Jul 2020 16:52:05 GMT", + "x-ms-client-request-id" : "bccb2f6c-a2b0-4275-a784-38ef355ba125" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0655036b64db747b264d7/javablobsettierrehydratepriority120642b8037355bfdf", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "24c6562c-5698-4551-92d8-4b2c08a0139c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-17T16:52:07.0300485Z", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:07 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 17 Jul 2020 16:52:06 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82A71BD67EB45", + "Content-Length" : "0", + "x-ms-request-id" : "c8a72cc7-c01e-0031-7c5a-5c7091000000", + "x-ms-client-request-id" : "24c6562c-5698-4551-92d8-4b2c08a0139c" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0655036b64db747b264d7/javablobsettierrehydratepriority120642b8037355bfdf", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4e3ed2d-af6a-41d7-9999-5a85470c5494" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-17T16:52:07.0300485Z", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:07 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Fri, 17 Jul 2020 16:52:06 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "ETag" : "0x8D82A71BD67EB45", + "x-ms-creation-time" : "Fri, 17 Jul 2020 16:52:07 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "a59445d5-801e-001f-7d5a-5c2286000000", + "x-ms-client-request-id" : "c4e3ed2d-af6a-41d7-9999-5a85470c5494", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsettierrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "04e1de65-d520-4c46-9d46-c41462abe824" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "42d0e68a-e01e-0054-395a-5cded5000000", + "Body" : "jtcsettierrehydratepriorityjtcsettierrehydratepriority0655036b64db747b264d7Fri, 17 Jul 2020 16:52:06 GMT\"0x8D82A71BD01DCB6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 17 Jul 2020 16:52:07 GMT", + "x-ms-client-request-id" : "04e1de65-d520-4c46-9d46-c41462abe824", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0655036b64db747b264d7?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f426077-2c51-496a-8c67-2b23d1111838" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "6f3a7ab3-801e-000f-045a-5ce7ee000000", + "Date" : "Fri, 17 Jul 2020 16:52:08 GMT", + "x-ms-client-request-id" : "0f426077-2c51-496a-8c67-2b23d1111838" + }, + "Exception" : null + } ], + "variables" : [ "jtcsettierrehydratepriority0655036b64db747b264d7", "javablobsettierrehydratepriority120642b8037355bfdf" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[1].json new file mode 100644 index 000000000000..e9c4d2b803da --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[1].json @@ -0,0 +1,164 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority00225461e4e7f9d89e413?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f78ba24-45ad-4d1f-878e-8b15ffc09cb1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82A71BE74459D", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:08 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "732df7ab-201e-0006-615a-5ca23d000000", + "Date" : "Fri, 17 Jul 2020 16:52:08 GMT", + "x-ms-client-request-id" : "9f78ba24-45ad-4d1f-878e-8b15ffc09cb1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority00225461e4e7f9d89e413/javablobsettierrehydratepriority154012842f426dfd40", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac224d07-9512-4f9a-80b2-c432c0935fcb", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-17T16:52:09.1295432Z", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:09 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 17 Jul 2020 16:52:09 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82A71BEA846C8", + "Content-Length" : "0", + "x-ms-request-id" : "9171e4b6-901e-0061-585a-5cb2c1000000", + "x-ms-client-request-id" : "ac224d07-9512-4f9a-80b2-c432c0935fcb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority00225461e4e7f9d89e413/javablobsettierrehydratepriority154012842f426dfd40?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1617a652-9308-4bd6-9baa-b010a7bd7f18" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a5bc387a-d01e-0094-355a-5c26eb000000", + "Date" : "Fri, 17 Jul 2020 16:52:09 GMT", + "x-ms-client-request-id" : "1617a652-9308-4bd6-9baa-b010a7bd7f18" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority00225461e4e7f9d89e413/javablobsettierrehydratepriority154012842f426dfd40?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "06490aaf-27bf-4e09-9998-b5eab177a597" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "9ff78820-f01e-0077-135a-5c4416000000", + "Date" : "Fri, 17 Jul 2020 16:52:09 GMT", + "x-ms-client-request-id" : "06490aaf-27bf-4e09-9998-b5eab177a597" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority00225461e4e7f9d89e413/javablobsettierrehydratepriority154012842f426dfd40", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "194399d8-4fa8-4bca-93bc-0756dc0f735e" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-17T16:52:09.1295432Z", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:09 GMT", + "retry-after" : "0", + "x-ms-access-tier-change-time" : "Fri, 17 Jul 2020 16:52:09 GMT", + "StatusCode" : "200", + "Date" : "Fri, 17 Jul 2020 16:52:09 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-rehydrate-priority" : "Standard", + "x-ms-access-tier" : "Archive", + "ETag" : "0x8D82A71BEA846C8", + "x-ms-creation-time" : "Fri, 17 Jul 2020 16:52:09 GMT", + "Content-Length" : "7", + "x-ms-archive-status" : "rehydrate-pending-to-hot", + "x-ms-request-id" : "847321e7-501e-006e-475a-5cc4ad000000", + "x-ms-client-request-id" : "194399d8-4fa8-4bca-93bc-0756dc0f735e", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsettierrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "317c45c0-7e00-4dad-a67c-429cddf5eca8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5e6f0195-701e-008d-755a-5ca650000000", + "Body" : "jtcsettierrehydratepriorityjtcsettierrehydratepriority00225461e4e7f9d89e413Fri, 17 Jul 2020 16:52:08 GMT\"0x8D82A71BE74459D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 17 Jul 2020 16:52:09 GMT", + "x-ms-client-request-id" : "317c45c0-7e00-4dad-a67c-429cddf5eca8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority00225461e4e7f9d89e413?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c9259df-3709-4db9-861d-2ac64d1b7782" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "af8af7bc-301e-0035-6d5a-5cfd96000000", + "Date" : "Fri, 17 Jul 2020 16:52:10 GMT", + "x-ms-client-request-id" : "7c9259df-3709-4db9-861d-2ac64d1b7782" + }, + "Exception" : null + } ], + "variables" : [ "jtcsettierrehydratepriority00225461e4e7f9d89e413", "javablobsettierrehydratepriority154012842f426dfd40" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[2].json new file mode 100644 index 000000000000..6f4b670cb508 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettierrehydratepriority[2].json @@ -0,0 +1,164 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0156978aeab57f79044bb?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef24d41f-66bd-41ea-a255-e3ba48195c03" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82A71BFEB3EC6", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:11 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d39edce1-401e-003f-025a-5c5921000000", + "Date" : "Fri, 17 Jul 2020 16:52:10 GMT", + "x-ms-client-request-id" : "ef24d41f-66bd-41ea-a255-e3ba48195c03" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0156978aeab57f79044bb/javablobsettierrehydratepriority131268a9ac5fb3bf41", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5e415ab-4309-4f33-8d03-223dd15855c0", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-17T16:52:11.5962944Z", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:11 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 17 Jul 2020 16:52:11 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82A71C020AC40", + "Content-Length" : "0", + "x-ms-request-id" : "a4ce95a1-001e-0087-665a-5c02e7000000", + "x-ms-client-request-id" : "b5e415ab-4309-4f33-8d03-223dd15855c0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0156978aeab57f79044bb/javablobsettierrehydratepriority131268a9ac5fb3bf41?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b8e08b04-74df-44e7-84fc-56321c65bc40" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "81705fb2-d01e-003d-4f5a-5ce799000000", + "Date" : "Fri, 17 Jul 2020 16:52:11 GMT", + "x-ms-client-request-id" : "b8e08b04-74df-44e7-84fc-56321c65bc40" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0156978aeab57f79044bb/javablobsettierrehydratepriority131268a9ac5fb3bf41?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b78f973-484f-45ac-8230-83af951d8aed" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "c748235b-801e-0020-715a-5cea25000000", + "Date" : "Fri, 17 Jul 2020 16:52:12 GMT", + "x-ms-client-request-id" : "8b78f973-484f-45ac-8230-83af951d8aed" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0156978aeab57f79044bb/javablobsettierrehydratepriority131268a9ac5fb3bf41", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6df6881c-2231-4fe3-932d-3ebb64520658" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-17T16:52:11.5962944Z", + "Last-Modified" : "Fri, 17 Jul 2020 16:52:11 GMT", + "retry-after" : "0", + "x-ms-access-tier-change-time" : "Fri, 17 Jul 2020 16:52:12 GMT", + "StatusCode" : "200", + "Date" : "Fri, 17 Jul 2020 16:52:12 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-rehydrate-priority" : "High", + "x-ms-access-tier" : "Archive", + "ETag" : "0x8D82A71C020AC40", + "x-ms-creation-time" : "Fri, 17 Jul 2020 16:52:11 GMT", + "Content-Length" : "7", + "x-ms-archive-status" : "rehydrate-pending-to-hot", + "x-ms-request-id" : "57567e8a-901e-0003-035a-5c70e6000000", + "x-ms-client-request-id" : "6df6881c-2231-4fe3-932d-3ebb64520658", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsettierrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "30ab2eba-67a4-493f-87d0-4575b2b91be9" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "52e72d99-a01e-0045-495a-5c4461000000", + "Body" : "jtcsettierrehydratepriorityjtcsettierrehydratepriority0156978aeab57f79044bbFri, 17 Jul 2020 16:52:11 GMT\"0x8D82A71BFEB3EC6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 17 Jul 2020 16:52:12 GMT", + "x-ms-client-request-id" : "30ab2eba-67a4-493f-87d0-4575b2b91be9", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettierrehydratepriority0156978aeab57f79044bb?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4aa394c-6bcc-4a14-a397-093916b75146" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "7e38ba19-b01e-0014-345a-5cd9ed000000", + "Date" : "Fri, 17 Jul 2020 16:52:13 GMT", + "x-ms-client-request-id" : "c4aa394c-6bcc-4a14-a397-093916b75146" + }, + "Exception" : null + } ], + "variables" : [ "jtcsettierrehydratepriority0156978aeab57f79044bb", "javablobsettierrehydratepriority131268a9ac5fb3bf41" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettiertags.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettiertags.json new file mode 100644 index 000000000000..babe05545126 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettiertags.json @@ -0,0 +1,195 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertags0blobapitestsettiertags24251160a51df0875?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f8029ff-336e-4e8a-b346-70e7a0e1afd3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8242D8C12A0D1", + "Last-Modified" : "Thu, 09 Jul 2020 17:28:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "07d3448d-801e-0042-0116-562802000000", + "Date" : "Thu, 09 Jul 2020 17:28:50 GMT", + "x-ms-client-request-id" : "4f8029ff-336e-4e8a-b346-70e7a0e1afd3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertags0blobapitestsettiertags24251160a51df0875/javablobsettiertags1blobapitestsettiertags242961005b312b", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "71cd7a2c-ca67-49f0-bcb9-3a157af9447e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-09T17:28:52.2993850Z", + "Last-Modified" : "Thu, 09 Jul 2020 17:28:52 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 09 Jul 2020 17:28:51 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8242D8C8B50BA", + "Content-Length" : "0", + "x-ms-request-id" : "8c4d18f4-c01e-000e-4116-56b832000000", + "x-ms-client-request-id" : "71cd7a2c-ca67-49f0-bcb9-3a157af9447e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertags2blobapitestsettiertags242954266a789e633?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "05acbb0c-1984-47fc-a09e-fca72db17bf9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8242D8CC4E9CE", + "Last-Modified" : "Thu, 09 Jul 2020 17:28:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "167ab5c5-b01e-0082-5916-56d03c000000", + "Date" : "Thu, 09 Jul 2020 17:28:52 GMT", + "x-ms-client-request-id" : "05acbb0c-1984-47fc-a09e-fca72db17bf9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertags2blobapitestsettiertags242954266a789e633/javablobsettiertags3blobapitestsettiertags24228160902970", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "adfce213-c39f-46a3-a47f-f4c5ddf58147", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-09T17:28:53.1319783Z", + "Last-Modified" : "Thu, 09 Jul 2020 17:28:53 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 09 Jul 2020 17:28:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8242D8D0A5BE7", + "Content-Length" : "0", + "x-ms-request-id" : "4e9c5f20-801e-007d-1016-56e0a1000000", + "x-ms-client-request-id" : "adfce213-c39f-46a3-a47f-f4c5ddf58147" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertags2blobapitestsettiertags242954266a789e633/javablobsettiertags3blobapitestsettiertags24228160902970?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "39f89466-6e57-4222-b118-bdd12b4768dc", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "b3cccfbc-701e-008d-5216-56a650000000", + "Date" : "Thu, 09 Jul 2020 17:28:53 GMT", + "x-ms-client-request-id" : "39f89466-6e57-4222-b118-bdd12b4768dc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertags2blobapitestsettiertags242954266a789e633/javablobsettiertags3blobapitestsettiertags24228160902970?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e73bec5f-f736-4cc8-85b5-ddca88b5f76f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3f4b8bec-901e-0061-3d16-56b2c1000000", + "Date" : "Thu, 09 Jul 2020 17:28:52 GMT", + "x-ms-client-request-id" : "e73bec5f-f736-4cc8-85b5-ddca88b5f76f" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertags2blobapitestsettiertags242954266a789e633?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "da8cb5c5-ad00-40a5-86d4-8ecba55e6bca" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d6031baf-601e-004a-6f16-56320d000000", + "Date" : "Thu, 09 Jul 2020 17:28:54 GMT", + "x-ms-client-request-id" : "da8cb5c5-ad00-40a5-86d4-8ecba55e6bca" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsettiertags&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47527bf0-fffb-465d-80cd-350d288f6428" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b2822d59-a01e-0045-0416-564461000000", + "Body" : "jtcsettiertagsjtcsettiertags0blobapitestsettiertags24251160a51df0875Thu, 09 Jul 2020 17:28:51 GMT\"0x8D8242D8C12A0D1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 09 Jul 2020 17:28:54 GMT", + "x-ms-client-request-id" : "47527bf0-fffb-465d-80cd-350d288f6428", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertags0blobapitestsettiertags24251160a51df0875?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "976aa477-b733-47ee-aeb7-f62cbec47702" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "626171f9-a01e-0055-1e16-568109000000", + "Date" : "Thu, 09 Jul 2020 17:28:54 GMT", + "x-ms-client-request-id" : "976aa477-b733-47ee-aeb7-f62cbec47702" + }, + "Exception" : null + } ], + "variables" : [ "jtcsettiertags0blobapitestsettiertags24251160a51df0875", "javablobsettiertags1blobapitestsettiertags242961005b312b", "jtcsettiertags2blobapitestsettiertags242954266a789e633", "javablobsettiertags3blobapitestsettiertags24228160902970" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettiertagsfail.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettiertagsfail.json new file mode 100644 index 000000000000..09b161ed020e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsettiertagsfail.json @@ -0,0 +1,179 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertagsfail0blobapitestsettiertagsfaile88192470b6f6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e41b702-05ac-4e42-bf53-73e096e557cf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8242DA0777ACA", + "Last-Modified" : "Thu, 09 Jul 2020 17:29:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1b0d44c0-201e-0090-4a16-56abec000000", + "Date" : "Thu, 09 Jul 2020 17:29:24 GMT", + "x-ms-client-request-id" : "2e41b702-05ac-4e42-bf53-73e096e557cf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertagsfail0blobapitestsettiertagsfaile88192470b6f6/javablobsettiertagsfail1blobapitestsettiertagsfaile8896480e7", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5635bd54-dcf9-4dec-a4b7-fb91e95a1a94", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-09T17:29:26.6478616Z", + "Last-Modified" : "Thu, 09 Jul 2020 17:29:26 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 09 Jul 2020 17:29:26 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8242DA1047A18", + "Content-Length" : "0", + "x-ms-request-id" : "de5a784d-101e-0050-7016-5653d2000000", + "x-ms-client-request-id" : "5635bd54-dcf9-4dec-a4b7-fb91e95a1a94" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertagsfail2blobapitestsettiertagsfaile8813197e6afa?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "277999e3-e3dd-4ff3-8a1b-a6445af77ceb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8242DA149F951", + "Last-Modified" : "Thu, 09 Jul 2020 17:29:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b13c6553-301e-0068-2916-56f712000000", + "Date" : "Thu, 09 Jul 2020 17:29:26 GMT", + "x-ms-client-request-id" : "277999e3-e3dd-4ff3-8a1b-a6445af77ceb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertagsfail2blobapitestsettiertagsfaile8813197e6afa/javablobsettiertagsfail3blobapitestsettiertagsfaile88132768a", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba88ebee-e5cd-442b-9716-570f88c8bef4", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-09T17:29:27.5805267Z", + "Last-Modified" : "Thu, 09 Jul 2020 17:29:27 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 09 Jul 2020 17:29:27 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8242DA192A339", + "Content-Length" : "0", + "x-ms-request-id" : "922435ab-c01e-006c-2b16-567a15000000", + "x-ms-client-request-id" : "ba88ebee-e5cd-442b-9716-570f88c8bef4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertagsfail2blobapitestsettiertagsfaile8813197e6afa/javablobsettiertagsfail3blobapitestsettiertagsfaile88132768a?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "64b5e190-a29c-4da5-b389-e03cc8b511b5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "fc244593-e01e-0054-4c16-56ded5000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:fc244593-e01e-0054-4c16-56ded5000000\nTime:2020-07-09T17:29:28.0354802Z", + "Date" : "Thu, 09 Jul 2020 17:29:27 GMT", + "x-ms-client-request-id" : "64b5e190-a29c-4da5-b389-e03cc8b511b5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsettiertagsfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61475418-cc8f-4ce2-8403-8f4d0a5caf31" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1a2e201b-301e-0078-1216-56327a000000", + "Body" : "jtcsettiertagsfailjtcsettiertagsfail0blobapitestsettiertagsfaile88192470b6f6Thu, 09 Jul 2020 17:29:25 GMT\"0x8D8242DA0777ACA\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcsettiertagsfail2blobapitestsettiertagsfaile8813197e6afaThu, 09 Jul 2020 17:29:27 GMT\"0x8D8242DA149F951\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 09 Jul 2020 17:29:28 GMT", + "x-ms-client-request-id" : "61475418-cc8f-4ce2-8403-8f4d0a5caf31", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertagsfail0blobapitestsettiertagsfaile88192470b6f6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6f42134-acc1-4f28-8a09-49efc8820d84" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "3cfbc97f-501e-00a5-2c16-56c7f8000000", + "Date" : "Thu, 09 Jul 2020 17:29:28 GMT", + "x-ms-client-request-id" : "e6f42134-acc1-4f28-8a09-49efc8820d84" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsettiertagsfail2blobapitestsettiertagsfaile8813197e6afa?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a227ab0-bc05-4e80-892f-2433df4a7d18" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "cd84663c-c01e-0098-0916-56b1e3000000", + "Date" : "Thu, 09 Jul 2020 17:29:29 GMT", + "x-ms-client-request-id" : "8a227ab0-bc05-4e80-892f-2433df4a7d18" + }, + "Exception" : null + } ], + "variables" : [ "jtcsettiertagsfail0blobapitestsettiertagsfaile88192470b6f6", "javablobsettiertagsfail1blobapitestsettiertagsfaile8896480e7", "jtcsettiertagsfail2blobapitestsettiertagsfaile8813197e6afa", "javablobsettiertagsfail3blobapitestsettiertagsfaile88132768a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[0].json index 20b49d74224b..2c0b83e3c75d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[0].json @@ -1,114 +1,134 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac68398089aa0de2863a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac21e521927d216e4f16?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3a8a367c-eede-4cab-b3bc-9f61d2a2089b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba38e6b2-5521-4ef7-8229-1375aa9ada14" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072E3E1A4D", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", + "ETag" : "0x8D82520F115F59E", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde77bdf-001e-00fa-15f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:24 GMT", - "x-ms-client-request-id" : "3a8a367c-eede-4cab-b3bc-9f61d2a2089b" + "x-ms-request-id" : "8e26ebc1-801e-000f-2009-57e7ee000000", + "Date" : "Fri, 10 Jul 2020 22:31:07 GMT", + "x-ms-client-request-id" : "ba38e6b2-5521-4ef7-8229-1375aa9ada14" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac68398089aa0de2863a/javablobsnapshotac1blobapitestsnapshotac6835890788d39d2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac21e521927d216e4f16/javablobsnapshotac1blobapitestsnapshotac21e43563be6683b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "988caa8f-7212-4ca3-9f10-dfa4662f9c62", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec2dd614-8ba7-47c6-a4cd-d27cbb936188", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", + "x-ms-version-id" : "2020-07-10T22:31:09.3703913Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:24 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:08 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072E45DBC5", + "ETag" : "0x8D82520F17E78E9", "Content-Length" : "0", - "x-ms-request-id" : "5d7930c2-f01e-00ab-66f0-12e764000000", - "x-ms-client-request-id" : "988caa8f-7212-4ca3-9f10-dfa4662f9c62" + "x-ms-request-id" : "9ddc6659-401e-005d-5d09-579b06000000", + "x-ms-client-request-id" : "ec2dd614-8ba7-47c6-a4cd-d27cbb936188" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac68398089aa0de2863a/javablobsnapshotac1blobapitestsnapshotac6835890788d39d2?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac21e521927d216e4f16/javablobsnapshotac1blobapitestsnapshotac21e43563be6683b?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7d3e6715-b958-4051-b3a0-e02095d8b646" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3599986d-6bcd-4802-a3b3-0ec60d705cac", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T06:35:25.4095874Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072E45DBC5", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "34d8f5cf-701e-000b-4209-576ae9000000", + "Date" : "Fri, 10 Jul 2020 22:31:09 GMT", + "x-ms-client-request-id" : "3599986d-6bcd-4802-a3b3-0ec60d705cac" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac21e521927d216e4f16/javablobsnapshotac1blobapitestsnapshotac21e43563be6683b?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ed5d529-9885-478a-8e4a-9cd2cd4159cc" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:09 GMT", + "x-ms-version-id" : "2020-07-10T22:31:10.2199950Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64295e06-601e-000f-48f0-12dd80000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "7d3e6715-b958-4051-b3a0-e02095d8b646" + "Date" : "Fri, 10 Jul 2020 22:31:10 GMT", + "x-ms-snapshot" : "2020-07-10T22:31:10.2189950Z", + "ETag" : "0x8D82520F17E78E9", + "Content-Length" : "0", + "x-ms-request-id" : "264a0fa6-f01e-0067-6a09-57817e000000", + "x-ms-client-request-id" : "9ed5d529-9885-478a-8e4a-9cd2cd4159cc" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fdec63ad-142c-41b2-8013-829c8df8459d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d74c9634-6570-40df-8d1b-a8b0e53c3910" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde77c49-001e-00fa-74f0-12f991000000", - "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac68398089aa0de2863aWed, 15 Apr 2020 06:35:25 GMT\"0x8D7E1072E3E1A4D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:24 GMT", - "x-ms-client-request-id" : "fdec63ad-142c-41b2-8013-829c8df8459d", + "x-ms-request-id" : "41caad2f-001e-0001-6b09-57ce5e000000", + "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac21e521927d216e4f16Fri, 10 Jul 2020 22:31:08 GMT\"0x8D82520F115F59E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:10 GMT", + "x-ms-client-request-id" : "d74c9634-6570-40df-8d1b-a8b0e53c3910", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac68398089aa0de2863a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac21e521927d216e4f16?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f13ebcaf-f0e9-46b7-a0d1-ead7673e35af" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0110e492-7473-456b-9715-ce51570bc385" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d793112-f01e-00ab-2df0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "f13ebcaf-f0e9-46b7-a0d1-ead7673e35af" + "x-ms-request-id" : "cfd88798-f01e-0077-0609-574416000000", + "Date" : "Fri, 10 Jul 2020 22:31:10 GMT", + "x-ms-client-request-id" : "0110e492-7473-456b-9715-ce51570bc385" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotac0blobapitestsnapshotac68398089aa0de2863a", "javablobsnapshotac1blobapitestsnapshotac6835890788d39d2" ] + "variables" : [ "jtcsnapshotac0blobapitestsnapshotac21e521927d216e4f16", "javablobsnapshotac1blobapitestsnapshotac21e43563be6683b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[1].json index 84e9f5c0c35b..4fcc930e1696 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[1].json @@ -1,114 +1,134 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac99e78342bebcc25928?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac04c61068c8d87ef768?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "12a27306-e71e-42d7-aca7-69efe5682733" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a90a7d26-6288-4bb0-ab04-caecde158966" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072E6907A2", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", + "ETag" : "0x8D82520F2DFAA71", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64295e61-601e-000f-10f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "12a27306-e71e-42d7-aca7-69efe5682733" + "x-ms-request-id" : "63c74077-b01e-0092-3b09-571554000000", + "Date" : "Fri, 10 Jul 2020 22:31:10 GMT", + "x-ms-client-request-id" : "a90a7d26-6288-4bb0-ab04-caecde158966" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac99e78342bebcc25928/javablobsnapshotac1blobapitestsnapshotac99e63861039ad51", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac04c61068c8d87ef768/javablobsnapshotac1blobapitestsnapshotac04c6370354425a3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1523fcdd-b3b7-4ac7-a5dc-db72aab2520f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1dafd09d-0338-44f6-a7fa-6f0c7a9c1d1b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", + "x-ms-version-id" : "2020-07-10T22:31:12.0553052Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:12 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:11 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072E713BE4", + "ETag" : "0x8D82520F318285C", "Content-Length" : "0", - "x-ms-request-id" : "bde77c94-001e-00fa-31f0-12f991000000", - "x-ms-client-request-id" : "1523fcdd-b3b7-4ac7-a5dc-db72aab2520f" + "x-ms-request-id" : "16188ffb-201e-0090-1f09-57abec000000", + "x-ms-client-request-id" : "1dafd09d-0338-44f6-a7fa-6f0c7a9c1d1b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac99e78342bebcc25928/javablobsnapshotac1blobapitestsnapshotac99e63861039ad51?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac04c61068c8d87ef768/javablobsnapshotac1blobapitestsnapshotac04c6370354425a3?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4c054a53-bcdd-4b43-854d-2671b0111425" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15b80cd0-9262-4e86-b8e4-0bd50eee40a8", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T06:35:25.6968554Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072E713BE4", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7137de13-a01e-007a-3f09-578cc2000000", + "Date" : "Fri, 10 Jul 2020 22:31:12 GMT", + "x-ms-client-request-id" : "15b80cd0-9262-4e86-b8e4-0bd50eee40a8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac04c61068c8d87ef768/javablobsnapshotac1blobapitestsnapshotac04c6370354425a3?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ceac7b3-44de-47a3-bef6-4eb28fca8272" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:12 GMT", + "x-ms-version-id" : "2020-07-10T22:31:12.8768881Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d793177-f01e-00ab-09f0-12e764000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "4c054a53-bcdd-4b43-854d-2671b0111425" + "Date" : "Fri, 10 Jul 2020 22:31:12 GMT", + "x-ms-snapshot" : "2020-07-10T22:31:12.8758881Z", + "ETag" : "0x8D82520F318285C", + "Content-Length" : "0", + "x-ms-request-id" : "349e3aab-201e-0064-3809-57601a000000", + "x-ms-client-request-id" : "3ceac7b3-44de-47a3-bef6-4eb28fca8272" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ca62addf-5e5c-4e3f-bcd7-df832fd8a213" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f4cee2f1-d8e2-4b29-8931-07157b4c58c2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "64295ebd-601e-000f-5af0-12dd80000000", - "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac99e78342bebcc25928Wed, 15 Apr 2020 06:35:25 GMT\"0x8D7E1072E6907A2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "ca62addf-5e5c-4e3f-bcd7-df832fd8a213", + "x-ms-request-id" : "476080f2-d01e-0012-7809-57ea52000000", + "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac04c61068c8d87ef768Fri, 10 Jul 2020 22:31:11 GMT\"0x8D82520F2DFAA71\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:13 GMT", + "x-ms-client-request-id" : "f4cee2f1-d8e2-4b29-8931-07157b4c58c2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac99e78342bebcc25928?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac04c61068c8d87ef768?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "68c64c1b-2fcb-45e4-b00f-d7ae4cc660c4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0f7853c3-baa2-4046-aaa5-46032310c401" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde77cea-001e-00fa-7cf0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "68c64c1b-2fcb-45e4-b00f-d7ae4cc660c4" + "x-ms-request-id" : "d2e3229e-301e-009c-0609-573ce4000000", + "Date" : "Fri, 10 Jul 2020 22:31:12 GMT", + "x-ms-client-request-id" : "0f7853c3-baa2-4046-aaa5-46032310c401" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotac0blobapitestsnapshotac99e78342bebcc25928", "javablobsnapshotac1blobapitestsnapshotac99e63861039ad51" ] + "variables" : [ "jtcsnapshotac0blobapitestsnapshotac04c61068c8d87ef768", "javablobsnapshotac1blobapitestsnapshotac04c6370354425a3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[2].json index 31a9e194ee85..2ccadac7e71f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[2].json @@ -1,114 +1,134 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac87653752cc800f4d80?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacd9024154a6a28a40f8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "97f5678d-6f8a-4c1f-8844-3de4b48b50ad" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29b6676f-63d7-4754-a33f-fa5d2d77569c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072E97EA14", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", + "ETag" : "0x8D82520F447B384", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d7931c9-f01e-00ab-51f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "97f5678d-6f8a-4c1f-8844-3de4b48b50ad" + "x-ms-request-id" : "997e825f-d01e-005f-6f09-5725be000000", + "Date" : "Fri, 10 Jul 2020 22:31:13 GMT", + "x-ms-client-request-id" : "29b6676f-63d7-4754-a33f-fa5d2d77569c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac87653752cc800f4d80/javablobsnapshotac1blobapitestsnapshotac87669848f1517a7", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacd9024154a6a28a40f8/javablobsnapshotac1blobapitestsnapshotacd90962506d277ac", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1ec1235a-fd7f-4391-9765-902c8a1c869c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ea7dd48-68d5-4029-895c-9a4177622b67", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", + "x-ms-version-id" : "2020-07-10T22:31:14.4199909Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:14 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:14 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072EA1F480", + "ETag" : "0x8D82520F480D3C3", "Content-Length" : "0", - "x-ms-request-id" : "64295eeb-601e-000f-04f0-12dd80000000", - "x-ms-client-request-id" : "1ec1235a-fd7f-4391-9765-902c8a1c869c" + "x-ms-request-id" : "192a4912-c01e-0021-7d09-57b5f9000000", + "x-ms-client-request-id" : "0ea7dd48-68d5-4029-895c-9a4177622b67" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac87653752cc800f4d80/javablobsnapshotac1blobapitestsnapshotac87669848f1517a7?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacd9024154a6a28a40f8/javablobsnapshotac1blobapitestsnapshotacd90962506d277ac?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e0c16dea-5419-405c-8333-da09ac2a9858" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "24d39957-eff6-419d-b508-409d51f8f159", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T06:35:26.0161547Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072EA1F480", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:25 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9f3216e3-201e-005b-4609-57a8b9000000", + "Date" : "Fri, 10 Jul 2020 22:31:14 GMT", + "x-ms-client-request-id" : "24d39957-eff6-419d-b508-409d51f8f159" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacd9024154a6a28a40f8/javablobsnapshotac1blobapitestsnapshotacd90962506d277ac?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "290f2b37-374a-43fe-8576-6488d8e6e3c0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:14 GMT", + "x-ms-version-id" : "2020-07-10T22:31:15.1545115Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde77d5a-001e-00fa-67f0-12f991000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "e0c16dea-5419-405c-8333-da09ac2a9858" + "Date" : "Fri, 10 Jul 2020 22:31:14 GMT", + "x-ms-snapshot" : "2020-07-10T22:31:15.1535115Z", + "ETag" : "0x8D82520F480D3C3", + "Content-Length" : "0", + "x-ms-request-id" : "c34deaa0-601e-0081-2a09-573158000000", + "x-ms-client-request-id" : "290f2b37-374a-43fe-8576-6488d8e6e3c0" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "abe35d76-3029-46e1-bec2-723241d02fbc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ee51fcf-bf9d-4a76-8687-857f0564cb11" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d793214-f01e-00ab-11f0-12e764000000", - "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac87653752cc800f4d80Wed, 15 Apr 2020 06:35:25 GMT\"0x8D7E1072E97EA14\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "abe35d76-3029-46e1-bec2-723241d02fbc", + "x-ms-request-id" : "6b99e921-a01e-006a-5509-5749aa000000", + "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotacd9024154a6a28a40f8Fri, 10 Jul 2020 22:31:14 GMT\"0x8D82520F447B384\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:14 GMT", + "x-ms-client-request-id" : "1ee51fcf-bf9d-4a76-8687-857f0564cb11", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac87653752cc800f4d80?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacd9024154a6a28a40f8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ad4b81e8-0936-4a86-af96-b1d9460c3ff8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b973aaa6-52ac-4904-9d87-b1fc368587bb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64295f20-601e-000f-27f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "ad4b81e8-0936-4a86-af96-b1d9460c3ff8" + "x-ms-request-id" : "6767e3da-101e-0040-7e09-5796ba000000", + "Date" : "Fri, 10 Jul 2020 22:31:15 GMT", + "x-ms-client-request-id" : "b973aaa6-52ac-4904-9d87-b1fc368587bb" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotac0blobapitestsnapshotac87653752cc800f4d80", "javablobsnapshotac1blobapitestsnapshotac87669848f1517a7" ] + "variables" : [ "jtcsnapshotac0blobapitestsnapshotacd9024154a6a28a40f8", "javablobsnapshotac1blobapitestsnapshotacd90962506d277ac" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[3].json index 1a4ea73f45ae..af5630bfee76 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[3].json @@ -1,146 +1,168 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac0098273758ed1ffbe2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac28c46086308b1e1ac2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0c27a0be-8c6c-44ab-b76e-bf2402effea3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4366fbc5-3fc0-4901-9184-b290382dddb5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072EC7DE4F", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "ETag" : "0x8D82520F5997058", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde77db2-001e-00fa-34f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "0c27a0be-8c6c-44ab-b76e-bf2402effea3" + "x-ms-request-id" : "56e7a8df-f01e-002a-4109-574e92000000", + "Date" : "Fri, 10 Jul 2020 22:31:16 GMT", + "x-ms-client-request-id" : "4366fbc5-3fc0-4901-9184-b290382dddb5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac0098273758ed1ffbe2/javablobsnapshotac1blobapitestsnapshotac009835317e0d6a1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac28c46086308b1e1ac2/javablobsnapshotac1blobapitestsnapshotac28c641779a15ec0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "154310f0-b106-4b7e-a7ed-32ac0c79f93c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5bae5621-4c4f-43a6-9290-f6bb52a05ebb", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "x-ms-version-id" : "2020-07-10T22:31:16.6335670Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:16 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:15 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072ED237C0", + "ETag" : "0x8D82520F5D2BEB6", "Content-Length" : "0", - "x-ms-request-id" : "5d793296-f01e-00ab-03f0-12e764000000", - "x-ms-client-request-id" : "154310f0-b106-4b7e-a7ed-32ac0c79f93c" + "x-ms-request-id" : "de77c3d9-b01e-0014-7909-57d9ed000000", + "x-ms-client-request-id" : "5bae5621-4c4f-43a6-9290-f6bb52a05ebb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac28c46086308b1e1ac2/javablobsnapshotac1blobapitestsnapshotac28c641779a15ec0?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bef65b70-dda5-47c7-b032-0478ba5c7acf", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9e2c5210-a01e-009e-7009-57825c000000", + "Date" : "Fri, 10 Jul 2020 22:31:16 GMT", + "x-ms-client-request-id" : "bef65b70-dda5-47c7-b032-0478ba5c7acf" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac0098273758ed1ffbe2/javablobsnapshotac1blobapitestsnapshotac009835317e0d6a1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac28c46086308b1e1ac2/javablobsnapshotac1blobapitestsnapshotac28c641779a15ec0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e49a8641-989c-4923-ac45-78ffe650726b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c56d7783-bf04-4fc1-a8e7-9200c263d9a9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "x-ms-version-id" : "2020-07-10T22:31:16.6335670Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:16 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:17 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E1072ED237C0", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:26 GMT", + "ETag" : "0x8D82520F5D2BEB6", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:31:16 GMT", "Content-Length" : "7", - "x-ms-request-id" : "64295f58-601e-000f-58f0-12dd80000000", - "x-ms-client-request-id" : "e49a8641-989c-4923-ac45-78ffe650726b", + "x-ms-request-id" : "e2ebea80-201e-0074-1e09-57a572000000", + "x-ms-client-request-id" : "c56d7783-bf04-4fc1-a8e7-9200c263d9a9", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac0098273758ed1ffbe2/javablobsnapshotac1blobapitestsnapshotac009835317e0d6a1?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac28c46086308b1e1ac2/javablobsnapshotac1blobapitestsnapshotac28c641779a15ec0?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eaf240ce-5e24-4604-a5c8-2c099bd00935" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ebd6047-4525-4553-b7b3-03851122249c" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T06:35:26.3905038Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072ED237C0", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:16 GMT", + "x-ms-version-id" : "2020-07-10T22:31:17.8974655Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde77e15-001e-00fa-0af0-12f991000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "eaf240ce-5e24-4604-a5c8-2c099bd00935" + "Date" : "Fri, 10 Jul 2020 22:31:17 GMT", + "x-ms-snapshot" : "2020-07-10T22:31:17.8964655Z", + "ETag" : "0x8D82520F5D2BEB6", + "Content-Length" : "0", + "x-ms-request-id" : "10fd1e0c-101e-009b-1b09-575087000000", + "x-ms-client-request-id" : "2ebd6047-4525-4553-b7b3-03851122249c" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2824109d-da1e-4293-bf41-cd71420fb265" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2628e434-0a61-4093-a1e6-e1f6545aa6d2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d793343-f01e-00ab-28f0-12e764000000", - "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac0098273758ed1ffbe2Wed, 15 Apr 2020 06:35:26 GMT\"0x8D7E1072EC7DE4F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:25 GMT", - "x-ms-client-request-id" : "2824109d-da1e-4293-bf41-cd71420fb265", + "x-ms-request-id" : "1fc68d5e-201e-0029-7c09-57aff6000000", + "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac28c46086308b1e1ac2Fri, 10 Jul 2020 22:31:16 GMT\"0x8D82520F5997058\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:18 GMT", + "x-ms-client-request-id" : "2628e434-0a61-4093-a1e6-e1f6545aa6d2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac0098273758ed1ffbe2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac28c46086308b1e1ac2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7dac3cf7-8b7d-4d22-a6ad-36f0ca22c337" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "43358b46-f0db-4be7-95f5-c45cf68683a2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64295f80-601e-000f-76f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "7dac3cf7-8b7d-4d22-a6ad-36f0ca22c337" + "x-ms-request-id" : "00ff32c9-901e-0013-4c09-57b58e000000", + "Date" : "Fri, 10 Jul 2020 22:31:18 GMT", + "x-ms-client-request-id" : "43358b46-f0db-4be7-95f5-c45cf68683a2" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotac0blobapitestsnapshotac0098273758ed1ffbe2", "javablobsnapshotac1blobapitestsnapshotac009835317e0d6a1" ] + "variables" : [ "jtcsnapshotac0blobapitestsnapshotac28c46086308b1e1ac2", "javablobsnapshotac1blobapitestsnapshotac28c641779a15ec0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[4].json index 3be0145a3cfe..8df25f79c9ba 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[4].json @@ -1,114 +1,134 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacbd231295541dd9ff5f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac8993375891698d283a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "291e7df4-7ca9-41a6-bf1a-fe7db1f6fa1e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "609ec6d2-a547-4e31-b258-a3b29274b10c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072F00AF79", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "ETag" : "0x8D82520F75B5DB4", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde77e8c-001e-00fa-74f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "291e7df4-7ca9-41a6-bf1a-fe7db1f6fa1e" + "x-ms-request-id" : "6013b144-101e-00a4-2409-579824000000", + "Date" : "Fri, 10 Jul 2020 22:31:19 GMT", + "x-ms-client-request-id" : "609ec6d2-a547-4e31-b258-a3b29274b10c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacbd231295541dd9ff5f/javablobsnapshotac1blobapitestsnapshotacbd223931180ecf6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac8993375891698d283a/javablobsnapshotac1blobapitestsnapshotac899063867d09d02", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8ee05f02-46c7-495a-9f77-27785498d4c0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7867123b-239c-4ec1-91b0-f03b1e080768", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "x-ms-version-id" : "2020-07-10T22:31:19.4545774Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:19 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:18 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072F0B56DA", + "ETag" : "0x8D82520F781326E", "Content-Length" : "0", - "x-ms-request-id" : "5d7933b3-f01e-00ab-0ff0-12e764000000", - "x-ms-client-request-id" : "8ee05f02-46c7-495a-9f77-27785498d4c0" + "x-ms-request-id" : "01a598b3-401e-0086-0b09-575d3b000000", + "x-ms-client-request-id" : "7867123b-239c-4ec1-91b0-f03b1e080768" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacbd231295541dd9ff5f/javablobsnapshotac1blobapitestsnapshotacbd223931180ecf6?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac8993375891698d283a/javablobsnapshotac1blobapitestsnapshotac899063867d09d02?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "79b675cc-3786-4a26-bb96-4c5ecea2a611" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "feef2f77-b07f-4f2f-9fbb-881bb2878475", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T06:35:26.7078008Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072F0B56DA", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4e9ed6ec-901e-003c-5e09-57b845000000", + "Date" : "Fri, 10 Jul 2020 22:31:19 GMT", + "x-ms-client-request-id" : "feef2f77-b07f-4f2f-9fbb-881bb2878475" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac8993375891698d283a/javablobsnapshotac1blobapitestsnapshotac899063867d09d02?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee51f520-fffb-48bf-980b-57f007745618" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:19 GMT", + "x-ms-version-id" : "2020-07-10T22:31:20.1630809Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64295fb0-601e-000f-1ef0-12dd80000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "79b675cc-3786-4a26-bb96-4c5ecea2a611" + "Date" : "Fri, 10 Jul 2020 22:31:19 GMT", + "x-ms-snapshot" : "2020-07-10T22:31:20.1620809Z", + "ETag" : "0x8D82520F781326E", + "Content-Length" : "0", + "x-ms-request-id" : "3687cc92-501e-008a-7b09-57ca33000000", + "x-ms-client-request-id" : "ee51f520-fffb-48bf-980b-57f007745618" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "47f7cff8-4115-4ecd-8c86-f11d0f219e9c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f0e63be-422b-4769-b6d3-410b066e04d6" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde77ef8-001e-00fa-57f0-12f991000000", - "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotacbd231295541dd9ff5fWed, 15 Apr 2020 06:35:26 GMT\"0x8D7E1072F00AF79\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "47f7cff8-4115-4ecd-8c86-f11d0f219e9c", + "x-ms-request-id" : "02d5152b-001e-004c-1709-5701b2000000", + "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac8993375891698d283aFri, 10 Jul 2020 22:31:19 GMT\"0x8D82520F75B5DB4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:20 GMT", + "x-ms-client-request-id" : "6f0e63be-422b-4769-b6d3-410b066e04d6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacbd231295541dd9ff5f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac8993375891698d283a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cf8f3ec5-27b7-4e78-98eb-544b0a6c4323" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92ba4736-6c96-410c-9353-949028eaf10d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7933eb-f01e-00ab-46f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "cf8f3ec5-27b7-4e78-98eb-544b0a6c4323" + "x-ms-request-id" : "b6aa97d2-501e-0023-2409-570b41000000", + "Date" : "Fri, 10 Jul 2020 22:31:20 GMT", + "x-ms-client-request-id" : "92ba4736-6c96-410c-9353-949028eaf10d" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotac0blobapitestsnapshotacbd231295541dd9ff5f", "javablobsnapshotac1blobapitestsnapshotacbd223931180ecf6" ] + "variables" : [ "jtcsnapshotac0blobapitestsnapshotac8993375891698d283a", "javablobsnapshotac1blobapitestsnapshotac899063867d09d02" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[5].json index 08ce818c3c29..36c4329a88f6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[5].json @@ -1,136 +1,156 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacb73647040fff50b5a5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac7198169670b9a63fe2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c3236e7c-7f60-474c-82a7-4204731ad17c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "89d35ed9-1cb3-4023-9caf-fbeaa28b311e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072F370FD6", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "ETag" : "0x8D82520F8ABCF18", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:21 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64295fe6-601e-000f-46f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "c3236e7c-7f60-474c-82a7-4204731ad17c" + "x-ms-request-id" : "8f4a276e-901e-0071-3509-5777a9000000", + "Date" : "Fri, 10 Jul 2020 22:31:20 GMT", + "x-ms-client-request-id" : "89d35ed9-1cb3-4023-9caf-fbeaa28b311e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacb73647040fff50b5a5/javablobsnapshotac1blobapitestsnapshotacb73343462c60251", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac7198169670b9a63fe2/javablobsnapshotac1blobapitestsnapshotac71935313d80da1b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ff258a60-40f5-4683-a048-308fb38f13d0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d18d07a0-8956-4a15-a0aa-f00df382e41f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "x-ms-version-id" : "2020-07-10T22:31:21.7612218Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:21 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:21 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072F3F6B91", + "ETag" : "0x8D82520F8E129BA", "Content-Length" : "0", - "x-ms-request-id" : "bde77f5e-001e-00fa-35f0-12f991000000", - "x-ms-client-request-id" : "ff258a60-40f5-4683-a048-308fb38f13d0" + "x-ms-request-id" : "21bf6e7d-f01e-0083-3709-578fe0000000", + "x-ms-client-request-id" : "d18d07a0-8956-4a15-a0aa-f00df382e41f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacb73647040fff50b5a5/javablobsnapshotac1blobapitestsnapshotacb73343462c60251?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac7198169670b9a63fe2/javablobsnapshotac1blobapitestsnapshotac71935313d80da1b?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c6175236-20b9-4afd-b9b3-6cb8ce1108c0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aeaca9ea-d650-4cc2-8fa8-bc0feb277911", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072F3F6B91", - "x-ms-lease-id" : "580b0425-90e2-46ac-a830-bea7e31fc3e8", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "3decb3db-b01e-0059-2709-571601000000", + "Date" : "Fri, 10 Jul 2020 22:31:22 GMT", + "x-ms-client-request-id" : "aeaca9ea-d650-4cc2-8fa8-bc0feb277911" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac7198169670b9a63fe2/javablobsnapshotac1blobapitestsnapshotac71935313d80da1b?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc61d1b7-63d6-463c-9c2c-0592964822b6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82520F8E129BA", + "x-ms-lease-id" : "5587f7e9-ddbf-47bb-8c42-211ce59adf65", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:21 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79344a-f01e-00ab-19f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "c6175236-20b9-4afd-b9b3-6cb8ce1108c0" + "x-ms-request-id" : "aeb833e7-801e-00a6-1809-57269c000000", + "Date" : "Fri, 10 Jul 2020 22:31:22 GMT", + "x-ms-client-request-id" : "cc61d1b7-63d6-463c-9c2c-0592964822b6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacb73647040fff50b5a5/javablobsnapshotac1blobapitestsnapshotacb73343462c60251?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac7198169670b9a63fe2/javablobsnapshotac1blobapitestsnapshotac71935313d80da1b?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c7cff481-4813-4808-a433-03d84d6351a8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5632d869-fbac-4a47-9089-6d080a8a36ac" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T06:35:27.1061718Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072F3F6B91", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:26 GMT", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:21 GMT", + "x-ms-version-id" : "2020-07-10T22:31:22.9240476Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429602c-601e-000f-79f0-12dd80000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "c7cff481-4813-4808-a433-03d84d6351a8" + "Date" : "Fri, 10 Jul 2020 22:31:22 GMT", + "x-ms-snapshot" : "2020-07-10T22:31:22.9230476Z", + "ETag" : "0x8D82520F8E129BA", + "Content-Length" : "0", + "x-ms-request-id" : "17e528ed-901e-005e-1d09-577a62000000", + "x-ms-client-request-id" : "5632d869-fbac-4a47-9089-6d080a8a36ac" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7ec6a9fe-d438-4159-a4f1-ea108f1bfc4f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f79542e5-0966-44cc-ac4a-db02ea4402f8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde77fa9-001e-00fa-76f0-12f991000000", - "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotacb73647040fff50b5a5Wed, 15 Apr 2020 06:35:26 GMT\"0x8D7E1072F370FD6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "7ec6a9fe-d438-4159-a4f1-ea108f1bfc4f", + "x-ms-request-id" : "40ac8739-501e-000c-6509-57068a000000", + "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotac7198169670b9a63fe2Fri, 10 Jul 2020 22:31:21 GMT\"0x8D82520F8ABCF18\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:22 GMT", + "x-ms-client-request-id" : "f79542e5-0966-44cc-ac4a-db02ea4402f8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacb73647040fff50b5a5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotac7198169670b9a63fe2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d003351d-947a-4acd-bfb7-43fc441eea92" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "81b52a6a-a43e-4516-bb3b-272aa1cf7c44" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7934b8-f01e-00ab-76f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:26 GMT", - "x-ms-client-request-id" : "d003351d-947a-4acd-bfb7-43fc441eea92" + "x-ms-request-id" : "88dfe5d9-c01e-001e-6309-577d5a000000", + "Date" : "Fri, 10 Jul 2020 22:31:23 GMT", + "x-ms-client-request-id" : "81b52a6a-a43e-4516-bb3b-272aa1cf7c44" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotac0blobapitestsnapshotacb73647040fff50b5a5", "javablobsnapshotac1blobapitestsnapshotacb73343462c60251" ] + "variables" : [ "jtcsnapshotac0blobapitestsnapshotac7198169670b9a63fe2", "javablobsnapshotac1blobapitestsnapshotac71935313d80da1b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[6].json new file mode 100644 index 000000000000..6da8234f5dab --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotac[6].json @@ -0,0 +1,134 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacc4219698b41dc8e723?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2121a306-17d7-4cdf-b67b-cf17b980f3ff" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82520FA419853", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9c814aeb-c01e-006c-3509-577a15000000", + "Date" : "Fri, 10 Jul 2020 22:31:23 GMT", + "x-ms-client-request-id" : "2121a306-17d7-4cdf-b67b-cf17b980f3ff" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacc4219698b41dc8e723/javablobsnapshotac1blobapitestsnapshotacc4249008d486ece", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6002970-3a1e-4782-b7b4-68c41a6d0e60", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:31:24.4651486Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:24 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:31:23 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82520FA7DBFDE", + "Content-Length" : "0", + "x-ms-request-id" : "61a156c1-701e-0056-4e09-57606d000000", + "x-ms-client-request-id" : "c6002970-3a1e-4782-b7b4-68c41a6d0e60" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacc4219698b41dc8e723/javablobsnapshotac1blobapitestsnapshotacc4249008d486ece?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a74e932-d7d3-4880-963d-9adcdcf49240", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "be49b8dc-301e-0068-7709-57f712000000", + "Date" : "Fri, 10 Jul 2020 22:31:24 GMT", + "x-ms-client-request-id" : "0a74e932-d7d3-4880-963d-9adcdcf49240" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacc4219698b41dc8e723/javablobsnapshotac1blobapitestsnapshotacc4249008d486ece?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "abc62008-ddd6-4822-9086-cb77d44bda46" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:24 GMT", + "x-ms-version-id" : "2020-07-10T22:31:25.1706483Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Fri, 10 Jul 2020 22:31:24 GMT", + "x-ms-snapshot" : "2020-07-10T22:31:25.1696483Z", + "ETag" : "0x8D82520FA7DBFDE", + "Content-Length" : "0", + "x-ms-request-id" : "8f9c2144-b01e-0066-2f09-57dea2000000", + "x-ms-client-request-id" : "abc62008-ddd6-4822-9086-cb77d44bda46" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "86aef466-63e3-4823-905a-ac9e0c4a4321" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "33b81ac5-101e-0050-5e09-5753d2000000", + "Body" : "jtcsnapshotacjtcsnapshotac0blobapitestsnapshotacc4219698b41dc8e723Fri, 10 Jul 2020 22:31:24 GMT\"0x8D82520FA419853\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:25 GMT", + "x-ms-client-request-id" : "86aef466-63e3-4823-905a-ac9e0c4a4321", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotac0blobapitestsnapshotacc4219698b41dc8e723?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c4c9967-5324-4fd2-864c-7021e4ba095d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "37a64859-901e-004e-7f09-57bf0a000000", + "Date" : "Fri, 10 Jul 2020 22:31:25 GMT", + "x-ms-client-request-id" : "4c4c9967-5324-4fd2-864c-7021e4ba095d" + }, + "Exception" : null + } ], + "variables" : [ "jtcsnapshotac0blobapitestsnapshotacc4219698b41dc8e723", "javablobsnapshotac1blobapitestsnapshotacc4249008d486ece" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[0].json index 71c96a277150..c89ee12a8dfd 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[0].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail4f07340574bad4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailb6a32465a1c588?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0eda2545-e497-4aed-84d1-cc5bc2cc1d17" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ffd2778-90ac-4dbf-aabd-b205e73c7ec5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072F93285D", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:27 GMT", + "ETag" : "0x8D82521041DB3E5", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64296090-601e-000f-4bf0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "0eda2545-e497-4aed-84d1-cc5bc2cc1d17" + "x-ms-request-id" : "a12b6c20-101e-007f-0209-575e19000000", + "Date" : "Fri, 10 Jul 2020 22:31:40 GMT", + "x-ms-client-request-id" : "2ffd2778-90ac-4dbf-aabd-b205e73c7ec5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail4f07340574bad4/javablobsnapshotacfail1blobapitestsnapshotacfail4f05863327d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailb6a32465a1c588/javablobsnapshotacfail1blobapitestsnapshotacfailb6a615683ac", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "800cfdcd-d441-463e-b7f1-e753edea85c6", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c065cfbb-a0e3-47e5-b24c-15c51a6e2f03", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:27 GMT", + "x-ms-version-id" : "2020-07-10T22:31:41.4952838Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072F9CBD09", + "ETag" : "0x8D8252104A45786", "Content-Length" : "0", - "x-ms-request-id" : "bde7806d-001e-00fa-1cf0-12f991000000", - "x-ms-client-request-id" : "800cfdcd-d441-463e-b7f1-e753edea85c6" + "x-ms-request-id" : "57faa364-801e-0052-1309-57ed6a000000", + "x-ms-client-request-id" : "c065cfbb-a0e3-47e5-b24c-15c51a6e2f03" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail4f07340574bad4/javablobsnapshotacfail1blobapitestsnapshotacfail4f05863327d?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailb6a32465a1c588/javablobsnapshotacfail1blobapitestsnapshotacfailb6a615683ac?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "53fded2f-ac8a-4d29-a316-edd4c1efaae7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "96affcb9-8b31-40fa-9679-54de7fd2e279" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "5d79357d-f01e-00ab-2bf0-12e764000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5d79357d-f01e-00ab-2bf0-12e764000000\nTime:2020-04-15T06:35:27.6689758Z", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "53fded2f-ac8a-4d29-a316-edd4c1efaae7", + "x-ms-request-id" : "f5c57a3b-601e-0028-1109-57f02a000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:f5c57a3b-601e-0028-1109-57f02a000000\nTime:2020-07-10T22:31:42.0694380Z", + "Date" : "Fri, 10 Jul 2020 22:31:41 GMT", + "x-ms-client-request-id" : "96affcb9-8b31-40fa-9679-54de7fd2e279", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "20266327-30fe-4270-b03d-c328afe7187a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0c4ece51-a363-45bf-bd2f-fde9ecd7d230" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "642960c6-601e-000f-77f0-12dd80000000", - "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfail4f07340574bad4Wed, 15 Apr 2020 06:35:27 GMT\"0x8D7E1072F93285D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "20266327-30fe-4270-b03d-c328afe7187a", + "x-ms-request-id" : "78b6aea4-001e-0073-3e09-57c911000000", + "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfailb6a32465a1c588Fri, 10 Jul 2020 22:31:40 GMT\"0x8D82521041DB3E5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:42 GMT", + "x-ms-client-request-id" : "0c4ece51-a363-45bf-bd2f-fde9ecd7d230", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail4f07340574bad4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailb6a32465a1c588?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9b4ad8ba-1e21-40c8-82ca-f448595b9799" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "803c37cb-a2b4-4fab-804d-25306fd747bb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde780bd-001e-00fa-63f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "9b4ad8ba-1e21-40c8-82ca-f448595b9799" + "x-ms-request-id" : "e72269e0-101e-000d-1009-575956000000", + "Date" : "Fri, 10 Jul 2020 22:31:42 GMT", + "x-ms-client-request-id" : "803c37cb-a2b4-4fab-804d-25306fd747bb" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfail4f07340574bad4", "javablobsnapshotacfail1blobapitestsnapshotacfail4f05863327d" ] + "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfailb6a32465a1c588", "javablobsnapshotacfail1blobapitestsnapshotacfailb6a615683ac" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[1].json index 073414b3130c..fbe6a8464ef2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[1].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail9be817625dadcb?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail2c4329445328bd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bb742a13-c144-405a-9c7e-692b4b0adf74" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7830a4e9-98d1-48a0-b405-592ae1427e2f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072FC148B1", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:27 GMT", + "ETag" : "0x8D8252105E6A392", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d7935c2-f01e-00ab-6bf0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "bb742a13-c144-405a-9c7e-692b4b0adf74" + "x-ms-request-id" : "d1732951-801e-001f-5009-572286000000", + "Date" : "Fri, 10 Jul 2020 22:31:43 GMT", + "x-ms-client-request-id" : "7830a4e9-98d1-48a0-b405-592ae1427e2f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail9be817625dadcb/javablobsnapshotacfail1blobapitestsnapshotacfail9be363174e8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail2c4329445328bd/javablobsnapshotacfail1blobapitestsnapshotacfail2c44549864f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "62835f2a-44eb-4a82-9054-f88ee94d3311", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b61a1de8-372a-45ba-9c52-779b9a523cde", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:27 GMT", + "x-ms-version-id" : "2020-07-10T22:31:43.9890613Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072FCA408A", + "ETag" : "0x8D825210620DCB5", "Content-Length" : "0", - "x-ms-request-id" : "642960ee-601e-000f-17f0-12dd80000000", - "x-ms-client-request-id" : "62835f2a-44eb-4a82-9054-f88ee94d3311" + "x-ms-request-id" : "a49bfb04-801e-006d-0a09-5725c9000000", + "x-ms-client-request-id" : "b61a1de8-372a-45ba-9c52-779b9a523cde" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail9be817625dadcb/javablobsnapshotacfail1blobapitestsnapshotacfail9be363174e8?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail2c4329445328bd/javablobsnapshotacfail1blobapitestsnapshotacfail2c44549864f?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e8ae4099-be93-4068-b150-a36c029127ba" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e2afc6c5-bf88-4b95-bebe-d6a89ce7ab26" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "bde78118-001e-00fa-31f0-12f991000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bde78118-001e-00fa-31f0-12f991000000\nTime:2020-04-15T06:35:27.9592409Z", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "e8ae4099-be93-4068-b150-a36c029127ba", + "x-ms-request-id" : "98a6ff85-e01e-006b-6d09-571676000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:98a6ff85-e01e-006b-6d09-571676000000\nTime:2020-07-10T22:31:44.4324885Z", + "Date" : "Fri, 10 Jul 2020 22:31:44 GMT", + "x-ms-client-request-id" : "e2afc6c5-bf88-4b95-bebe-d6a89ce7ab26", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "044b8335-9338-4f24-8a46-85ec26cda821" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "199932e0-af04-43b5-bcae-33d3cb268663" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d793614-f01e-00ab-32f0-12e764000000", - "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfail9be817625dadcbWed, 15 Apr 2020 06:35:27 GMT\"0x8D7E1072FC148B1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "044b8335-9338-4f24-8a46-85ec26cda821", + "x-ms-request-id" : "8e678071-901e-0003-2409-5770e6000000", + "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfail2c4329445328bdFri, 10 Jul 2020 22:31:43 GMT\"0x8D8252105E6A392\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:43 GMT", + "x-ms-client-request-id" : "199932e0-af04-43b5-bcae-33d3cb268663", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail9be817625dadcb?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail2c4329445328bd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "95a4f04a-d2b2-4f3b-8798-5f4aefae2f45" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "237de207-a11f-4d7f-bd3f-3274315475d8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "64296117-601e-000f-3df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "95a4f04a-d2b2-4f3b-8798-5f4aefae2f45" + "x-ms-request-id" : "fc4606cd-d01e-003d-0f09-57e799000000", + "Date" : "Fri, 10 Jul 2020 22:31:44 GMT", + "x-ms-client-request-id" : "237de207-a11f-4d7f-bd3f-3274315475d8" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfail9be817625dadcb", "javablobsnapshotacfail1blobapitestsnapshotacfail9be363174e8" ] + "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfail2c4329445328bd", "javablobsnapshotacfail1blobapitestsnapshotacfail2c44549864f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[2].json index fa36191a29b4..8df13ee5aab9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[2].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail922743352b973f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailed91569854747d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "df32d8e6-0017-48de-a455-f067adf1d09e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92d52e35-58e5-4981-bea7-53660b214763" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1072FF0A136", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:28 GMT", + "ETag" : "0x8D825210722C811", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde7817d-001e-00fa-0cf0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "df32d8e6-0017-48de-a455-f067adf1d09e" + "x-ms-request-id" : "7ea697b6-601e-0038-5f09-573542000000", + "Date" : "Fri, 10 Jul 2020 22:31:45 GMT", + "x-ms-client-request-id" : "92d52e35-58e5-4981-bea7-53660b214763" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail922743352b973f/javablobsnapshotacfail1blobapitestsnapshotacfail92297031af6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailed91569854747d/javablobsnapshotacfail1blobapitestsnapshotacfailed920371396", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "504be36b-77fc-4a6d-b1c2-c8c9068dd782", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "51414c30-63df-4e26-b664-804661c9c19d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:28 GMT", + "x-ms-version-id" : "2020-07-10T22:31:46.0805504Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1072FF9C057", + "ETag" : "0x8D82521075FFF80", "Content-Length" : "0", - "x-ms-request-id" : "5d793683-f01e-00ab-12f0-12e764000000", - "x-ms-client-request-id" : "504be36b-77fc-4a6d-b1c2-c8c9068dd782" + "x-ms-request-id" : "8e2710f4-801e-000f-7e09-57e7ee000000", + "x-ms-client-request-id" : "51414c30-63df-4e26-b664-804661c9c19d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail922743352b973f/javablobsnapshotacfail1blobapitestsnapshotacfail92297031af6?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailed91569854747d/javablobsnapshotacfail1blobapitestsnapshotacfailed920371396?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9426ed28-ebc6-40bc-84e5-b23cc0cbc358" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4404bfc1-1d43-4503-99c5-58501ed0d376" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "64296158-601e-000f-6df0-12dd80000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:64296158-601e-000f-6df0-12dd80000000\nTime:2020-04-15T06:35:28.2645191Z", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "9426ed28-ebc6-40bc-84e5-b23cc0cbc358", + "x-ms-request-id" : "9ddce565-401e-005d-3209-579b06000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:9ddce565-401e-005d-3209-579b06000000\nTime:2020-07-10T22:31:46.5007199Z", + "Date" : "Fri, 10 Jul 2020 22:31:45 GMT", + "x-ms-client-request-id" : "4404bfc1-1d43-4503-99c5-58501ed0d376", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "46f868de-6c6f-4eae-9f63-2a97b4b4e07b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d634c8c4-29dd-4089-9730-3880151717da" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde781b9-001e-00fa-3ff0-12f991000000", - "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfail922743352b973fWed, 15 Apr 2020 06:35:28 GMT\"0x8D7E1072FF0A136\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "46f868de-6c6f-4eae-9f63-2a97b4b4e07b", + "x-ms-request-id" : "34d9376b-701e-000b-6f09-576ae9000000", + "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfailed91569854747dFri, 10 Jul 2020 22:31:45 GMT\"0x8D825210722C811\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:46 GMT", + "x-ms-client-request-id" : "d634c8c4-29dd-4089-9730-3880151717da", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail922743352b973f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailed91569854747d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c87c9758-2a7f-4c25-a215-263751ae3734" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c745f410-4171-4327-8076-2c579cdd2565" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d7936c5-f01e-00ab-53f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:27 GMT", - "x-ms-client-request-id" : "c87c9758-2a7f-4c25-a215-263751ae3734" + "x-ms-request-id" : "78c4ce92-901e-0095-1d09-577937000000", + "Date" : "Fri, 10 Jul 2020 22:31:46 GMT", + "x-ms-client-request-id" : "c745f410-4171-4327-8076-2c579cdd2565" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfail922743352b973f", "javablobsnapshotacfail1blobapitestsnapshotacfail92297031af6" ] + "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfailed91569854747d", "javablobsnapshotacfail1blobapitestsnapshotacfailed920371396" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[3].json index a359155a9147..ed6f5b15e4ce 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[3].json @@ -1,101 +1,103 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailf60275398ffc90?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail7fd582263d5c35?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "64385c4d-8b58-43d5-93f6-e053ea72e814" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4ba9fa8-6de6-4345-b9b5-373e03232d07" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107301EC0A0", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:28 GMT", + "ETag" : "0x8D8252108512736", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429619f-601e-000f-24f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "64385c4d-8b58-43d5-93f6-e053ea72e814" + "x-ms-request-id" : "5a389dd2-c01e-0043-1309-5777de000000", + "Date" : "Fri, 10 Jul 2020 22:31:46 GMT", + "x-ms-client-request-id" : "a4ba9fa8-6de6-4345-b9b5-373e03232d07" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailf60275398ffc90/javablobsnapshotacfail1blobapitestsnapshotacfailf60119751f0", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail7fd582263d5c35/javablobsnapshotacfail1blobapitestsnapshotacfail7fd6179897a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7238a477-0f3c-449d-b918-8b06d2b1b172", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9067f906-a9ae-4730-be85-c6b78cfc3f83", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:28 GMT", + "x-ms-version-id" : "2020-07-10T22:31:48.0329423Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1073029673B", + "ETag" : "0x8D825210889E8CF", "Content-Length" : "0", - "x-ms-request-id" : "bde7820c-001e-00fa-0bf0-12f991000000", - "x-ms-client-request-id" : "7238a477-0f3c-449d-b918-8b06d2b1b172" + "x-ms-request-id" : "f4a88d8c-201e-004b-6209-576dd1000000", + "x-ms-client-request-id" : "9067f906-a9ae-4730-be85-c6b78cfc3f83" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailf60275398ffc90/javablobsnapshotacfail1blobapitestsnapshotacfailf60119751f0", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail7fd582263d5c35/javablobsnapshotacfail1blobapitestsnapshotacfail7fd6179897a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b229175c-7eea-4e69-bbab-26fc466f7056" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f9c8733-60dc-413c-91cd-49087c68cf75" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:28 GMT", + "x-ms-version-id" : "2020-07-10T22:31:48.0329423Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:48 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E1073029673B", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:35:28 GMT", + "ETag" : "0x8D825210889E8CF", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:31:48 GMT", "Content-Length" : "7", - "x-ms-request-id" : "5d79372d-f01e-00ab-2df0-12e764000000", - "x-ms-client-request-id" : "b229175c-7eea-4e69-bbab-26fc466f7056", + "x-ms-request-id" : "c1dd8cc4-301e-0035-2a09-57fd96000000", + "x-ms-client-request-id" : "5f9c8733-60dc-413c-91cd-49087c68cf75", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailf60275398ffc90/javablobsnapshotacfail1blobapitestsnapshotacfailf60119751f0?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail7fd582263d5c35/javablobsnapshotacfail1blobapitestsnapshotacfail7fd6179897a?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a365313c-fdc0-4485-aa59-5d6fe16e88a7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b785f33-fd82-484a-8941-c856f8c2a4bf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "642961de-601e-000f-54f0-12dd80000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:642961de-601e-000f-54f0-12dd80000000\nTime:2020-04-15T06:35:28.6258547Z", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "a365313c-fdc0-4485-aa59-5d6fe16e88a7", + "x-ms-request-id" : "10e27760-001e-0097-4e09-57c78f000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:10e27760-001e-0097-4e09-57c78f000000\nTime:2020-07-10T22:31:48.8519188Z", + "Date" : "Fri, 10 Jul 2020 22:31:48 GMT", + "x-ms-client-request-id" : "8b785f33-fd82-484a-8941-c856f8c2a4bf", "Content-Type" : "application/xml" }, "Exception" : null @@ -103,43 +105,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e127b9f6-f3d7-4f12-bc6e-99c34e1c190b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a6574664-a8d6-45bf-aa0c-01da18819289" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde78245-001e-00fa-3ef0-12f991000000", - "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfailf60275398ffc90Wed, 15 Apr 2020 06:35:28 GMT\"0x8D7E107301EC0A0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "e127b9f6-f3d7-4f12-bc6e-99c34e1c190b", + "x-ms-request-id" : "ac5f5e7b-801e-0030-7a09-572f4d000000", + "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfail7fd582263d5c35Fri, 10 Jul 2020 22:31:47 GMT\"0x8D8252108512736\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:49 GMT", + "x-ms-client-request-id" : "a6574664-a8d6-45bf-aa0c-01da18819289", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailf60275398ffc90?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfail7fd582263d5c35?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "72245eb9-102c-48c0-8642-371efca74ae3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1247b54a-8664-4f43-9b69-1ef677d6fee1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d793774-f01e-00ab-6df0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "72245eb9-102c-48c0-8642-371efca74ae3" + "x-ms-request-id" : "63c76361-b01e-0092-4c09-571554000000", + "Date" : "Fri, 10 Jul 2020 22:31:48 GMT", + "x-ms-client-request-id" : "1247b54a-8664-4f43-9b69-1ef677d6fee1" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfailf60275398ffc90", "javablobsnapshotacfail1blobapitestsnapshotacfailf60119751f0" ] + "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfail7fd582263d5c35", "javablobsnapshotacfail1blobapitestsnapshotacfail7fd6179897a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[4].json index d663e164ac85..60d65b8b5962 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[4].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfaile149672272dee9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailc6685201dec048?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "35ca9147-e68e-4ef3-b028-e7148d0ce5c5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a5f70a3-ff15-4828-b0f7-17897bbf81bf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1073054F8AB", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:28 GMT", + "ETag" : "0x8D8252109CB42A8", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "64296209-601e-000f-7af0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "35ca9147-e68e-4ef3-b028-e7148d0ce5c5" + "x-ms-request-id" : "1618bdd6-201e-0090-0209-57abec000000", + "Date" : "Fri, 10 Jul 2020 22:31:49 GMT", + "x-ms-client-request-id" : "9a5f70a3-ff15-4828-b0f7-17897bbf81bf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfaile149672272dee9/javablobsnapshotacfail1blobapitestsnapshotacfaile1475321c18", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailc6685201dec048/javablobsnapshotacfail1blobapitestsnapshotacfailc666184234f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2f5278fc-973c-4863-b9ed-cee4a878dfd6", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca09368e-d0a9-4d71-b0b3-334f553ccebd", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:28 GMT", + "x-ms-version-id" : "2020-07-10T22:31:50.5447336Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:50 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", + "Date" : "Fri, 10 Jul 2020 22:31:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107305E1861", + "ETag" : "0x8D825210A092DA8", "Content-Length" : "0", - "x-ms-request-id" : "bde782c8-001e-00fa-33f0-12f991000000", - "x-ms-client-request-id" : "2f5278fc-973c-4863-b9ed-cee4a878dfd6" + "x-ms-request-id" : "71382301-a01e-007a-7109-578cc2000000", + "x-ms-client-request-id" : "ca09368e-d0a9-4d71-b0b3-334f553ccebd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfaile149672272dee9/javablobsnapshotacfail1blobapitestsnapshotacfaile1475321c18?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailc6685201dec048/javablobsnapshotacfail1blobapitestsnapshotacfailc666184234f?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "44e06ef5-6511-47d3-846a-e2229132f8d0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dbda4cb9-aeb5-418c-b300-56d6ba105af1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107305E1861", - "x-ms-lease-id" : "a6ede98f-6bca-4ca5-a317-79c23e4c3ea5", - "Last-Modified" : "Wed, 15 Apr 2020 06:35:28 GMT", + "ETag" : "0x8D825210A092DA8", + "x-ms-lease-id" : "08e62662-3a6e-4534-a17a-a196e303d9e3", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d7937c4-f01e-00ab-34f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "44e06ef5-6511-47d3-846a-e2229132f8d0" + "x-ms-request-id" : "349e8402-201e-0064-3709-57601a000000", + "Date" : "Fri, 10 Jul 2020 22:31:50 GMT", + "x-ms-client-request-id" : "dbda4cb9-aeb5-418c-b300-56d6ba105af1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfaile149672272dee9/javablobsnapshotacfail1blobapitestsnapshotacfaile1475321c18?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailc6685201dec048/javablobsnapshotacfail1blobapitestsnapshotacfailc666184234f?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "34d825ea-47cf-4e09-a9f0-2ab2dfa4dec5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "db8fe4df-ba51-4b72-8c71-e9941073e3a3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "64296227-601e-000f-14f0-12dd80000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:64296227-601e-000f-14f0-12dd80000000\nTime:2020-04-15T06:35:28.9711740Z", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "34d825ea-47cf-4e09-a9f0-2ab2dfa4dec5", + "x-ms-request-id" : "47609826-d01e-0012-8009-57ea52000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:47609826-d01e-0012-8009-57ea52000000\nTime:2020-07-10T22:31:51.4637645Z", + "Date" : "Fri, 10 Jul 2020 22:31:51 GMT", + "x-ms-client-request-id" : "db8fe4df-ba51-4b72-8c71-e9941073e3a3", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b693111d-90a9-4bcf-aa54-e6fa2586778e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc22903d-b532-453b-abdc-2577a01dfc1b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde7832c-001e-00fa-0cf0-12f991000000", - "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfaile149672272dee9Wed, 15 Apr 2020 06:35:28 GMT\"0x8D7E1073054F8AB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "b693111d-90a9-4bcf-aa54-e6fa2586778e", + "x-ms-request-id" : "d2e35e66-301e-009c-5109-573ce4000000", + "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfailc6685201dec048Fri, 10 Jul 2020 22:31:50 GMT\"0x8D8252109CB42A8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:50 GMT", + "x-ms-client-request-id" : "fc22903d-b532-453b-abdc-2577a01dfc1b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfaile149672272dee9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailc6685201dec048?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7e00e97c-cde7-4f91-8f9f-03d6d41fb298" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ad26431-d551-4881-9a9f-52de98f1a48b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d793821-f01e-00ab-03f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:35:28 GMT", - "x-ms-client-request-id" : "7e00e97c-cde7-4f91-8f9f-03d6d41fb298" + "x-ms-request-id" : "997e9dc1-d01e-005f-4b09-5725be000000", + "Date" : "Fri, 10 Jul 2020 22:31:51 GMT", + "x-ms-client-request-id" : "7ad26431-d551-4881-9a9f-52de98f1a48b" }, "Exception" : null } ], - "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfaile149672272dee9", "javablobsnapshotacfail1blobapitestsnapshotacfaile1475321c18" ] + "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfailc6685201dec048", "javablobsnapshotacfail1blobapitestsnapshotacfailc666184234f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[5].json new file mode 100644 index 000000000000..7ff86e67bad6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsnapshotacfail[5].json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailb5c4393575a9ef?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e97d6134-c098-4395-92b3-b01c4d4a8e28" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D825210B3DA23B", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "192a86c8-c01e-0021-7709-57b5f9000000", + "Date" : "Fri, 10 Jul 2020 22:31:52 GMT", + "x-ms-client-request-id" : "e97d6134-c098-4395-92b3-b01c4d4a8e28" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailb5c4393575a9ef/javablobsnapshotacfail1blobapitestsnapshotacfailb5c599424a7", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1731ab3-8e27-49db-8b23-d70db102a9d1", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:31:52.9414399Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:31:52 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:31:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825210B76E2FF", + "Content-Length" : "0", + "x-ms-request-id" : "9f323b29-201e-005b-7609-57a8b9000000", + "x-ms-client-request-id" : "f1731ab3-8e27-49db-8b23-d70db102a9d1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailb5c4393575a9ef/javablobsnapshotacfail1blobapitestsnapshotacfailb5c599424a7?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38c8420e-c052-4d75-9fa6-b49ac1a5076f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "c34e1eae-601e-0081-3f09-573158000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:c34e1eae-601e-0081-3f09-573158000000\nTime:2020-07-10T22:31:53.3125898Z", + "Date" : "Fri, 10 Jul 2020 22:31:52 GMT", + "x-ms-client-request-id" : "38c8420e-c052-4d75-9fa6-b49ac1a5076f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsnapshotacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c445f8d4-6990-44fa-bfdf-addd10ebd845" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6b9a3534-a01e-006a-1109-5749aa000000", + "Body" : "jtcsnapshotacfailjtcsnapshotacfail0blobapitestsnapshotacfailb5c4393575a9efFri, 10 Jul 2020 22:31:52 GMT\"0x8D825210B3DA23B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:31:53 GMT", + "x-ms-client-request-id" : "c445f8d4-6990-44fa-bfdf-addd10ebd845", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsnapshotacfail0blobapitestsnapshotacfailb5c4393575a9ef?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37d629fe-327b-41cf-961d-1fcaa94541a2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "67681ef8-101e-0040-6109-5796ba000000", + "Date" : "Fri, 10 Jul 2020 22:31:53 GMT", + "x-ms-client-request-id" : "37d629fe-327b-41cf-961d-1fcaa94541a2" + }, + "Exception" : null + } ], + "variables" : [ "jtcsnapshotacfail0blobapitestsnapshotacfailb5c4393575a9ef", "javablobsnapshotacfail1blobapitestsnapshotacfailb5c599424a7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[0].json index db98ab68eabb..367df936996a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[0].json @@ -1,162 +1,183 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacda322208df2fa8?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac763975927d9b32?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8c61bdff-6f0c-49a9-8d05-33048a2ebf95" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d8f01614-db0b-4a8a-a5a6-186d6af8f5b6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10756EEBBCF", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:33 GMT", + "ETag" : "0x8D825244F009B91", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde81c7c-001e-00fa-0af0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:32 GMT", - "x-ms-client-request-id" : "8c61bdff-6f0c-49a9-8d05-33048a2ebf95" + "x-ms-request-id" : "bd76037e-001e-0087-710d-5702e7000000", + "Date" : "Fri, 10 Jul 2020 22:55:14 GMT", + "x-ms-client-request-id" : "d8f01614-db0b-4a8a-a5a6-186d6af8f5b6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacda322208df2fa8/javablobsynccopydestac1blobapitestsynccopydestacda343609a27", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac763975927d9b32/javablobsynccopydestac1blobapitestsynccopydestac76337372d22", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "63fc9d53-526f-4f89-9f92-1f292c15c416", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1026c232-c05e-4cf9-a987-9879ee814d06", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:33 GMT", + "x-ms-version-id" : "2020-07-10T22:55:15.5649067Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:15 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:14 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10756FB4688", + "ETag" : "0x8D825244F7E3E2B", "Content-Length" : "0", - "x-ms-request-id" : "5d79b22c-f01e-00ab-5cf0-12e764000000", - "x-ms-client-request-id" : "63fc9d53-526f-4f89-9f92-1f292c15c416" + "x-ms-request-id" : "8fa39af6-b01e-0066-690d-57dea2000000", + "x-ms-client-request-id" : "1026c232-c05e-4cf9-a987-9879ee814d06" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacda322208df2fa8?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac763975927d9b32?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7aeff9a2-dc94-445d-81e3-7e424b8a91e2", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e89e910-5b5b-4d76-aa55-9d3278ae4b83", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075704E4C7", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:33 GMT", + "ETag" : "0x8D825244FCF878B", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429b414-601e-000f-58f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", - "x-ms-client-request-id" : "7aeff9a2-dc94-445d-81e3-7e424b8a91e2" + "x-ms-request-id" : "17f03271-901e-005e-410d-577a62000000", + "Date" : "Fri, 10 Jul 2020 22:55:15 GMT", + "x-ms-client-request-id" : "3e89e910-5b5b-4d76-aa55-9d3278ae4b83" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacda322208df2fa8/javablobsynccopydestac2blobapitestsynccopydestacda35381448e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac763975927d9b32/javablobsynccopydestac2blobapitestsynccopydestac76394389166", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "777fbc7e-9e0c-4545-ad60-9a0b6a66b216", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad535c94-71bb-4d0b-9089-c8a08994edf5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:33 GMT", + "x-ms-version-id" : "2020-07-10T22:55:16.4765549Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:16 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:15 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107570CD6E4", + "ETag" : "0x8D825245009596D", "Content-Length" : "0", - "x-ms-request-id" : "bde81cf9-001e-00fa-7bf0-12f991000000", - "x-ms-client-request-id" : "777fbc7e-9e0c-4545-ad60-9a0b6a66b216" + "x-ms-request-id" : "543e317f-301e-000a-340d-573535000000", + "x-ms-client-request-id" : "ad535c94-71bb-4d0b-9089-c8a08994edf5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacda322208df2fa8/javablobsynccopydestac2blobapitestsynccopydestacda35381448e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac763975927d9b32/javablobsynccopydestac2blobapitestsynccopydestac76394389166?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f4d3637d-b971-421e-8f9c-b6d041de467a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d608925e-fa8b-41ed-9797-e9ea884deb5f", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "72d0445b-301e-001a-310d-57f05d000000", + "Date" : "Fri, 10 Jul 2020 22:55:16 GMT", + "x-ms-client-request-id" : "d608925e-fa8b-41ed-9797-e9ea884deb5f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac763975927d9b32/javablobsynccopydestac2blobapitestsynccopydestac76394389166", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "905ce38f-126b-440e-b700-01e14617f690" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "f0245405-9934-4b09-aa90-734cda0a0ff5", + "x-ms-copy-id" : "3dd0b38d-7cc1-46c5-bd4f-69d026265faa", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:33 GMT", + "x-ms-version-id" : "2020-07-10T22:55:17.4662581Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:17 GMT", "retry-after" : "0", "StatusCode" : "202", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", - "ETag" : "0x8D7E107571848EC", + "Date" : "Fri, 10 Jul 2020 22:55:17 GMT", + "ETag" : "0x8D8252450A7B3B2", "Content-Length" : "0", "x-ms-copy-status" : "success", - "x-ms-request-id" : "5d79b289-f01e-00ab-2af0-12e764000000", - "x-ms-client-request-id" : "f4d3637d-b971-421e-8f9c-b6d041de467a" + "x-ms-request-id" : "2f13719d-001e-003e-1c0d-5706fd000000", + "x-ms-client-request-id" : "905ce38f-126b-440e-b700-01e14617f690" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cccadb7d-2962-4c05-bd38-25070181b144" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0874db6-9ff7-42a5-8f80-762c7e00bed7" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429b467-601e-000f-22f0-12dd80000000", - "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestacda322208df2fa8Wed, 15 Apr 2020 06:36:33 GMT\"0x8D7E1075704E4C7\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", - "x-ms-client-request-id" : "cccadb7d-2962-4c05-bd38-25070181b144", + "x-ms-request-id" : "e7a049ca-601e-0075-5f0d-57faae000000", + "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac763975927d9b32Fri, 10 Jul 2020 22:55:16 GMT\"0x8D825244FCF878B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:55:17 GMT", + "x-ms-client-request-id" : "e0874db6-9ff7-42a5-8f80-762c7e00bed7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacda322208df2fa8?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac763975927d9b32?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8f082ac2-0657-4798-9537-8f94b3c98c7b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "babc82f8-4b8f-42ca-bcca-f66df6ca5e9e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde81d41-001e-00fa-3cf0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", - "x-ms-client-request-id" : "8f082ac2-0657-4798-9537-8f94b3c98c7b" + "x-ms-request-id" : "01ac4c61-401e-0086-290d-575d3b000000", + "Date" : "Fri, 10 Jul 2020 22:55:17 GMT", + "x-ms-client-request-id" : "babc82f8-4b8f-42ca-bcca-f66df6ca5e9e" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestacda322208df2fa8", "javablobsynccopydestac1blobapitestsynccopydestacda343609a27", "javablobsynccopydestac2blobapitestsynccopydestacda35381448e" ] + "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac763975927d9b32", "javablobsynccopydestac1blobapitestsynccopydestac76337372d22", "javablobsynccopydestac2blobapitestsynccopydestac76394389166" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[1].json index 8db31d53bc80..3c545eaea674 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[1].json @@ -1,162 +1,183 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac9f040507555549?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5ec11806e563ca?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e22171c2-7330-4b84-8b10-dc83fce902cb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "97398793-1972-4513-a934-7b8613133c57" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10757385BD3", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "ETag" : "0x8D825245187E120", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:18 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79b2f3-f01e-00ab-7ff0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", - "x-ms-client-request-id" : "e22171c2-7330-4b84-8b10-dc83fce902cb" + "x-ms-request-id" : "31d4e6b7-501e-007e-1e0d-5701c5000000", + "Date" : "Fri, 10 Jul 2020 22:55:18 GMT", + "x-ms-client-request-id" : "97398793-1972-4513-a934-7b8613133c57" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac9f040507555549/javablobsynccopydestac1blobapitestsynccopydestac9f058900127", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5ec11806e563ca/javablobsynccopydestac1blobapitestsynccopydestac5ec9314607e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a2bb2978-fef8-4908-9f9f-6b4eae711a4c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e282a87c-141c-456c-aea9-ce9c84f2ba22", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "x-ms-version-id" : "2020-07-10T22:55:19.3315858Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:19 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:18 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075742C0D5", + "ETag" : "0x8D8252451BCFE12", "Content-Length" : "0", - "x-ms-request-id" : "6429b4b0-601e-000f-5bf0-12dd80000000", - "x-ms-client-request-id" : "a2bb2978-fef8-4908-9f9f-6b4eae711a4c" + "x-ms-request-id" : "1fcdda40-201e-0029-1b0d-57aff6000000", + "x-ms-client-request-id" : "e282a87c-141c-456c-aea9-ce9c84f2ba22" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac9f040507555549?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5ec11806e563ca?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f9dec3e8-e12a-4c76-82ee-8f1bde43d08c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d463adc8-021b-484a-a327-efca463631f0", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107574D4A2F", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "ETag" : "0x8D8252451F8C4E8", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde81dce-001e-00fa-25f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", - "x-ms-client-request-id" : "f9dec3e8-e12a-4c76-82ee-8f1bde43d08c" + "x-ms-request-id" : "cc461181-401e-004d-6d0d-575e6e000000", + "Date" : "Fri, 10 Jul 2020 22:55:18 GMT", + "x-ms-client-request-id" : "d463adc8-021b-484a-a327-efca463631f0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac9f040507555549/javablobsynccopydestac2blobapitestsynccopydestac9f087185c97", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5ec11806e563ca/javablobsynccopydestac2blobapitestsynccopydestac5ec96136645", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ec866984-4231-4698-bcbd-c5d5094f0243", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "04fc178e-ab99-4aa9-a454-85ad5a3ff469", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "x-ms-version-id" : "2020-07-10T22:55:20.0931277Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:20 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:19 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10757573819", + "ETag" : "0x8D82524523131CD", "Content-Length" : "0", - "x-ms-request-id" : "5d79b37b-f01e-00ab-70f0-12e764000000", - "x-ms-client-request-id" : "ec866984-4231-4698-bcbd-c5d5094f0243" + "x-ms-request-id" : "5019fbd0-e01e-0036-5c0d-571cf2000000", + "x-ms-client-request-id" : "04fc178e-ab99-4aa9-a454-85ad5a3ff469" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac9f040507555549/javablobsynccopydestac2blobapitestsynccopydestac9f087185c97", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5ec11806e563ca/javablobsynccopydestac2blobapitestsynccopydestac5ec96136645?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fad712d2-0f08-46d1-9a1a-91e35ea9ccd7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8c3d50c-88dc-4755-b1c4-ea547cff0bb0", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "3c56f3c0-401e-0096-210d-579853000000", + "Date" : "Fri, 10 Jul 2020 22:55:19 GMT", + "x-ms-client-request-id" : "c8c3d50c-88dc-4755-b1c4-ea547cff0bb0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5ec11806e563ca/javablobsynccopydestac2blobapitestsynccopydestac5ec96136645", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a991ff43-38a2-47ca-8b5b-f55cee303c22" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "6b14b33a-c557-4717-bc1a-2fb1a0266281", + "x-ms-copy-id" : "2a856e65-e918-46b3-b6c1-9209eb4eba51", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "x-ms-version-id" : "2020-07-10T22:55:20.8356544Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:20 GMT", "retry-after" : "0", "StatusCode" : "202", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", - "ETag" : "0x8D7E10757641155", + "Date" : "Fri, 10 Jul 2020 22:55:20 GMT", + "ETag" : "0x8D8252452A386FD", "Content-Length" : "0", "x-ms-copy-status" : "success", - "x-ms-request-id" : "6429b4e2-601e-000f-80f0-12dd80000000", - "x-ms-client-request-id" : "fad712d2-0f08-46d1-9a1a-91e35ea9ccd7" + "x-ms-request-id" : "b25e7994-e01e-0019-0a0d-571139000000", + "x-ms-client-request-id" : "a991ff43-38a2-47ca-8b5b-f55cee303c22" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "956529ad-4686-41f4-8dfe-22f0b5c18747" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7530150a-5d4e-4196-b871-720818ddd60c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde81e3c-001e-00fa-7df0-12f991000000", - "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac9f040507555549Wed, 15 Apr 2020 06:36:34 GMT\"0x8D7E107574D4A2F\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", - "x-ms-client-request-id" : "956529ad-4686-41f4-8dfe-22f0b5c18747", + "x-ms-request-id" : "36f86bdf-f01e-0015-640d-578631000000", + "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac5ec11806e563caFri, 10 Jul 2020 22:55:19 GMT\"0x8D8252451F8C4E8\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:55:20 GMT", + "x-ms-client-request-id" : "7530150a-5d4e-4196-b871-720818ddd60c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac9f040507555549?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5ec11806e563ca?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fbd7c7c6-8861-4f56-bff9-40dcc718844a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "09acb19a-8cf2-46ef-aced-8a03675474eb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79b3dc-f01e-00ab-43f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:33 GMT", - "x-ms-client-request-id" : "fbd7c7c6-8861-4f56-bff9-40dcc718844a" + "x-ms-request-id" : "0658b026-301e-0025-520d-5738fe000000", + "Date" : "Fri, 10 Jul 2020 22:55:21 GMT", + "x-ms-client-request-id" : "09acb19a-8cf2-46ef-aced-8a03675474eb" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac9f040507555549", "javablobsynccopydestac1blobapitestsynccopydestac9f058900127", "javablobsynccopydestac2blobapitestsynccopydestac9f087185c97" ] + "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac5ec11806e563ca", "javablobsynccopydestac1blobapitestsynccopydestac5ec9314607e", "javablobsynccopydestac2blobapitestsynccopydestac5ec96136645" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[2].json index 6aa94f861b40..7134f174ef2a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[2].json @@ -1,162 +1,183 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacf7a23940d961be?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac67c67945021b17?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c26d61e3-d91b-4ea2-96db-21a355b57f57" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb4c9d5c-ccbf-4cfb-9fa5-683186e0f022" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10757A5489B", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "ETag" : "0x8D825245359E09D", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429b591-601e-000f-0bf0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", - "x-ms-client-request-id" : "c26d61e3-d91b-4ea2-96db-21a355b57f57" + "x-ms-request-id" : "f5e1fa72-501e-009a-280d-570f5b000000", + "Date" : "Fri, 10 Jul 2020 22:55:21 GMT", + "x-ms-client-request-id" : "eb4c9d5c-ccbf-4cfb-9fa5-683186e0f022" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacf7a23940d961be/javablobsynccopydestac1blobapitestsynccopydestacf7a454747b1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac67c67945021b17/javablobsynccopydestac1blobapitestsynccopydestac67c85676459", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9b86ba4d-2b2c-4c13-9968-f0870805c213", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae6e2e73-aa01-4b88-a73b-1e649268a88f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "x-ms-version-id" : "2020-07-10T22:55:22.3957652Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:22 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:22 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10757AFF4A1", + "ETag" : "0x8D8252453908C94", "Content-Length" : "0", - "x-ms-request-id" : "bde81efb-001e-00fa-14f0-12f991000000", - "x-ms-client-request-id" : "9b86ba4d-2b2c-4c13-9968-f0870805c213" + "x-ms-request-id" : "b1b71b58-101e-0032-010d-5791f5000000", + "x-ms-client-request-id" : "ae6e2e73-aa01-4b88-a73b-1e649268a88f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacf7a23940d961be?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac67c67945021b17?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "13db695a-1d3f-48a5-8513-f20f14571be1", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7d6e719d-1b6c-4a5f-b9a6-472a343344d7", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10757BA0959", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "ETag" : "0x8D8252453CD4199", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79b4ca-f01e-00ab-08f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", - "x-ms-client-request-id" : "13db695a-1d3f-48a5-8513-f20f14571be1" + "x-ms-request-id" : "02ca80da-601e-0091-600d-57f430000000", + "Date" : "Fri, 10 Jul 2020 22:55:22 GMT", + "x-ms-client-request-id" : "7d6e719d-1b6c-4a5f-b9a6-472a343344d7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacf7a23940d961be/javablobsynccopydestac2blobapitestsynccopydestacf7a95615e91", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac67c67945021b17/javablobsynccopydestac2blobapitestsynccopydestac67c10444570", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9f1da3ed-1b3a-4a1e-ac92-cc94c482fa73", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee9eeb2a-1bab-4c2d-8c93-305f241fa1bc", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:34 GMT", + "x-ms-version-id" : "2020-07-10T22:55:23.1703161Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:23 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:22 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10757C3CF80", + "ETag" : "0x8D825245406BC79", "Content-Length" : "0", - "x-ms-request-id" : "6429b5dd-601e-000f-43f0-12dd80000000", - "x-ms-client-request-id" : "9f1da3ed-1b3a-4a1e-ac92-cc94c482fa73" + "x-ms-request-id" : "41d3f988-001e-0001-700d-57ce5e000000", + "x-ms-client-request-id" : "ee9eeb2a-1bab-4c2d-8c93-305f241fa1bc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacf7a23940d961be/javablobsynccopydestac2blobapitestsynccopydestacf7a95615e91", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac67c67945021b17/javablobsynccopydestac2blobapitestsynccopydestac67c10444570?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "50612869-4945-4d14-8818-968f5d2ede9f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca460361-9514-4930-bc52-131ef68d9b13", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9dee78d0-401e-005d-2c0d-579b06000000", + "Date" : "Fri, 10 Jul 2020 22:55:23 GMT", + "x-ms-client-request-id" : "ca460361-9514-4930-bc52-131ef68d9b13" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac67c67945021b17/javablobsynccopydestac2blobapitestsynccopydestac67c10444570", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fcae6bdb-7ebe-40fc-aa75-99757d5248b4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "3ced41b0-337e-4900-9cb2-708ff8f83ec5", + "x-ms-copy-id" : "656bcbf5-c8fd-4090-8f1b-b65db272e0cb", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "x-ms-version-id" : "2020-07-10T22:55:24.0479396Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:24 GMT", "retry-after" : "0", "StatusCode" : "202", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", - "ETag" : "0x8D7E10757CE7D36", + "Date" : "Fri, 10 Jul 2020 22:55:23 GMT", + "ETag" : "0x8D82524548DB979", "Content-Length" : "0", "x-ms-copy-status" : "success", - "x-ms-request-id" : "bde81f5d-001e-00fa-61f0-12f991000000", - "x-ms-client-request-id" : "50612869-4945-4d14-8818-968f5d2ede9f" + "x-ms-request-id" : "78cc9600-901e-0095-630d-577937000000", + "x-ms-client-request-id" : "fcae6bdb-7ebe-40fc-aa75-99757d5248b4" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "56666127-0ab6-4bac-a27c-573b10bbeae2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38b3b491-1766-4ae0-8a47-f8a0ceb59e4c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79b55c-f01e-00ab-06f0-12e764000000", - "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestacf7a23940d961beWed, 15 Apr 2020 06:36:34 GMT\"0x8D7E10757BA0959\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", - "x-ms-client-request-id" : "56666127-0ab6-4bac-a27c-573b10bbeae2", + "x-ms-request-id" : "a1c57bd5-d01e-002d-7f0d-5722f1000000", + "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac67c67945021b17Fri, 10 Jul 2020 22:55:22 GMT\"0x8D8252453CD4199\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:55:23 GMT", + "x-ms-client-request-id" : "38b3b491-1766-4ae0-8a47-f8a0ceb59e4c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacf7a23940d961be?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac67c67945021b17?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9302f640-3145-4266-a332-82b109ab8585" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c557498-0c2a-48ae-af4c-2c11992fe262" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429b634-601e-000f-09f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", - "x-ms-client-request-id" : "9302f640-3145-4266-a332-82b109ab8585" + "x-ms-request-id" : "fc4ef2e5-d01e-003d-430d-57e799000000", + "Date" : "Fri, 10 Jul 2020 22:55:24 GMT", + "x-ms-client-request-id" : "1c557498-0c2a-48ae-af4c-2c11992fe262" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestacf7a23940d961be", "javablobsynccopydestac1blobapitestsynccopydestacf7a454747b1", "javablobsynccopydestac2blobapitestsynccopydestacf7a95615e91" ] + "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac67c67945021b17", "javablobsynccopydestac1blobapitestsynccopydestac67c85676459", "javablobsynccopydestac2blobapitestsynccopydestac67c10444570" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[3].json index 502ccb59c7c9..19354b36f217 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[3].json @@ -1,194 +1,217 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8969b0a5-b169-4f29-a441-d879e2a40be6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a85620e-5fec-4a29-8846-ba2a01a7ca8b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10757EDCCA5", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "ETag" : "0x8D82524554CC35D", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde81fe2-001e-00fa-4af0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", - "x-ms-client-request-id" : "8969b0a5-b169-4f29-a441-d879e2a40be6" + "x-ms-request-id" : "02db2150-001e-004c-790d-5701b2000000", + "Date" : "Fri, 10 Jul 2020 22:55:24 GMT", + "x-ms-client-request-id" : "7a85620e-5fec-4a29-8846-ba2a01a7ca8b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3/javablobsynccopydestac1blobapitestsynccopydestac5a35587715d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed/javablobsynccopydestac1blobapitestsynccopydestac83181028108", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1d0a720a-6825-4fd6-8937-a80a878c4489", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "da4e3633-a8e1-426c-b5f9-19205db25e8e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "x-ms-version-id" : "2020-07-10T22:55:25.6901101Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:24 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10757F720C0", + "ETag" : "0x8D82524558739ED", "Content-Length" : "0", - "x-ms-request-id" : "5d79b5e7-f01e-00ab-05f0-12e764000000", - "x-ms-client-request-id" : "1d0a720a-6825-4fd6-8937-a80a878c4489" + "x-ms-request-id" : "e728adbf-101e-000d-760d-575956000000", + "x-ms-client-request-id" : "da4e3633-a8e1-426c-b5f9-19205db25e8e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "229b141e-a62c-45e2-8a5b-3392e40fef49", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "762463cd-2ae1-4a57-903f-412aabd8b5ee", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075803CEA4", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "ETag" : "0x8D8252455C1A7BE", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429b66b-601e-000f-38f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "229b141e-a62c-45e2-8a5b-3392e40fef49" + "x-ms-request-id" : "a4a36e02-801e-006d-1f0d-5725c9000000", + "Date" : "Fri, 10 Jul 2020 22:55:25 GMT", + "x-ms-client-request-id" : "762463cd-2ae1-4a57-903f-412aabd8b5ee" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3/javablobsynccopydestac2blobapitestsynccopydestac5a310498e22", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed/javablobsynccopydestac2blobapitestsynccopydestac83117329718", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b4d45892-f6d3-4319-8873-2bf1134a15c8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "415f4ccb-3440-41d2-aa7e-1b71f236d6a3", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "x-ms-version-id" : "2020-07-10T22:55:26.4406422Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:26 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:26 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107580E7EED", + "ETag" : "0x8D8252455F9BF96", "Content-Length" : "0", - "x-ms-request-id" : "bde82063-001e-00fa-32f0-12f991000000", - "x-ms-client-request-id" : "b4d45892-f6d3-4319-8873-2bf1134a15c8" + "x-ms-request-id" : "395dcb56-901e-0085-040d-57bc5f000000", + "x-ms-client-request-id" : "415f4ccb-3440-41d2-aa7e-1b71f236d6a3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed/javablobsynccopydestac2blobapitestsynccopydestac83117329718?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69d9ae62-fd98-45ac-b098-c6d49cace55a", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "19d87f97-c01e-0031-3c0d-577091000000", + "Date" : "Fri, 10 Jul 2020 22:55:26 GMT", + "x-ms-client-request-id" : "69d9ae62-fd98-45ac-b098-c6d49cace55a" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3/javablobsynccopydestac2blobapitestsynccopydestac5a310498e22", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed/javablobsynccopydestac2blobapitestsynccopydestac83117329718", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bebcd53c-5661-4480-b27b-bf7763767044" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2af2efe1-78a3-4443-9586-89e5ecef340f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "x-ms-version-id" : "2020-07-10T22:55:26.4406422Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:26 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:36:34 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:26 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E107580E7EED", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:36:35 GMT", + "ETag" : "0x8D8252455F9BF96", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:55:26 GMT", "Content-Length" : "7", - "x-ms-request-id" : "5d79b658-f01e-00ab-66f0-12e764000000", - "x-ms-client-request-id" : "bebcd53c-5661-4480-b27b-bf7763767044", + "x-ms-request-id" : "c83fc0cb-c01e-007c-660d-57bf7d000000", + "x-ms-client-request-id" : "2af2efe1-78a3-4443-9586-89e5ecef340f", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3/javablobsynccopydestac2blobapitestsynccopydestac5a310498e22", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed/javablobsynccopydestac2blobapitestsynccopydestac83117329718", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7003c319-881d-48fd-a45b-0f40b8370e99" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f488c385-fe5d-4f04-a8f1-62d71d200da2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "43eecc2b-006b-4c9d-b483-5d69a85bfc82", + "x-ms-copy-id" : "2405acb5-9f6c-4c8b-955e-247144b332c3", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "x-ms-version-id" : "2020-07-10T22:55:27.7085433Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:27 GMT", "retry-after" : "0", "StatusCode" : "202", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "ETag" : "0x8D7E10758214CFD", + "Date" : "Fri, 10 Jul 2020 22:55:27 GMT", + "ETag" : "0x8D8252456C2F513", "Content-Length" : "0", "x-ms-copy-status" : "success", - "x-ms-request-id" : "6429b6a1-601e-000f-62f0-12dd80000000", - "x-ms-client-request-id" : "7003c319-881d-48fd-a45b-0f40b8370e99" + "x-ms-request-id" : "de82d18d-b01e-0014-3b0d-57d9ed000000", + "x-ms-client-request-id" : "f488c385-fe5d-4f04-a8f1-62d71d200da2" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2fa2d554-066a-41ff-8ee1-74048c0fb4bc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c482c212-855f-4875-940b-851bc652ce20" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde820c4-001e-00fa-02f0-12f991000000", - "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3Wed, 15 Apr 2020 06:36:35 GMT\"0x8D7E1075803CEA4\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "2fa2d554-066a-41ff-8ee1-74048c0fb4bc", + "x-ms-request-id" : "06aa91ee-401e-0010-140d-5754ea000000", + "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac831611875a61edFri, 10 Jul 2020 22:55:26 GMT\"0x8D8252455C1A7BE\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:55:27 GMT", + "x-ms-client-request-id" : "c482c212-855f-4875-940b-851bc652ce20", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "84749afe-b639-45be-bd45-62c96191ef4f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f94d34d-2644-494e-96e5-caacd8d0712b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79b6b1-f01e-00ab-31f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "84749afe-b639-45be-bd45-62c96191ef4f" + "x-ms-request-id" : "19333977-c01e-0021-250d-57b5f9000000", + "Date" : "Fri, 10 Jul 2020 22:55:28 GMT", + "x-ms-client-request-id" : "3f94d34d-2644-494e-96e5-caacd8d0712b" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac5a30350598e7c3", "javablobsynccopydestac1blobapitestsynccopydestac5a35587715d", "javablobsynccopydestac2blobapitestsynccopydestac5a310498e22" ] + "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac831611875a61ed", "javablobsynccopydestac1blobapitestsynccopydestac83181028108", "javablobsynccopydestac2blobapitestsynccopydestac83117329718" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[4].json index 4fdedb8c99e3..057d61ebc75d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[4].json @@ -1,162 +1,183 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac7b7551593a0a9c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d3435843-2988-4dd0-955b-800d094beb99" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e713fda-b808-4405-8b92-38ab2fa9a22a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107583B1CAB", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "ETag" : "0x8D82524577EA971", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429b6e0-601e-000f-17f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "d3435843-2988-4dd0-955b-800d094beb99" + "x-ms-request-id" : "c3559b76-601e-0081-660d-573158000000", + "Date" : "Fri, 10 Jul 2020 22:55:28 GMT", + "x-ms-client-request-id" : "6e713fda-b808-4405-8b92-38ab2fa9a22a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac7b7551593a0a9c/javablobsynccopydestac1blobapitestsynccopydestac7b794632551", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4/javablobsynccopydestac1blobapitestsynccopydestacc4627187237", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e4e30d4d-9461-402a-b56e-0ced1b4215e4", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3ed6d51-ca64-44f9-997b-29af25e884b8", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "x-ms-version-id" : "2020-07-10T22:55:29.3497115Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:29 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:29 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075843A566", + "ETag" : "0x8D8252457B5A31B", "Content-Length" : "0", - "x-ms-request-id" : "bde82139-001e-00fa-64f0-12f991000000", - "x-ms-client-request-id" : "e4e30d4d-9461-402a-b56e-0ced1b4215e4" + "x-ms-request-id" : "9aac3c52-b01e-0004-220d-571c85000000", + "x-ms-client-request-id" : "a3ed6d51-ca64-44f9-997b-29af25e884b8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac7b7551593a0a9c?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "32652b36-09d9-4eee-8975-b282015027af", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1affdec6-0223-43f5-ac4f-a31f4c3f95a5", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107584F9036", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "ETag" : "0x8D8252457EF9ECE", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79b6f7-f01e-00ab-67f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "32652b36-09d9-4eee-8975-b282015027af" + "x-ms-request-id" : "34a7557b-201e-0064-330d-57601a000000", + "Date" : "Fri, 10 Jul 2020 22:55:29 GMT", + "x-ms-client-request-id" : "1affdec6-0223-43f5-ac4f-a31f4c3f95a5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac7b7551593a0a9c/javablobsynccopydestac2blobapitestsynccopydestac7b727705942", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4/javablobsynccopydestac2blobapitestsynccopydestacc4635834327", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "53072f2e-da0a-4e54-bf58-afd3ef9ee896", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32a9fd76-f362-4768-b508-46c3fd0ea880", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:35 GMT", + "x-ms-version-id" : "2020-07-10T22:55:30.0972425Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:29 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10758575929", + "ETag" : "0x8D8252458278C74", "Content-Length" : "0", - "x-ms-request-id" : "6429b73a-601e-000f-5ef0-12dd80000000", - "x-ms-client-request-id" : "53072f2e-da0a-4e54-bf58-afd3ef9ee896" + "x-ms-request-id" : "161dd6dd-201e-0090-7c0d-57abec000000", + "x-ms-client-request-id" : "32a9fd76-f362-4768-b508-46c3fd0ea880" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac7b7551593a0a9c/javablobsynccopydestac2blobapitestsynccopydestac7b727705942", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4/javablobsynccopydestac2blobapitestsynccopydestacc4635834327?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a6b5e3c2-7e05-4058-af6b-ca5aaa0f5201" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2502f1ad-84a3-47ff-8716-5231856786bd", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "33c1eb03-101e-0050-480d-5753d2000000", + "Date" : "Fri, 10 Jul 2020 22:55:30 GMT", + "x-ms-client-request-id" : "2502f1ad-84a3-47ff-8716-5231856786bd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4/javablobsynccopydestac2blobapitestsynccopydestacc4635834327", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a15bd5c-1a0e-47ee-b9e8-a105239df68c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "bb09aecd-e1ec-4f11-b398-d11c8490a2e4", + "x-ms-copy-id" : "323694b2-86fe-41c3-bbeb-7b418c49323b", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "x-ms-version-id" : "2020-07-10T22:55:30.8577834Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:30 GMT", "retry-after" : "0", "StatusCode" : "202", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "ETag" : "0x8D7E107586ABC4A", + "Date" : "Fri, 10 Jul 2020 22:55:30 GMT", + "ETag" : "0x8D82524589D36CD", "Content-Length" : "0", "x-ms-copy-status" : "success", - "x-ms-request-id" : "bde821dc-001e-00fa-75f0-12f991000000", - "x-ms-client-request-id" : "a6b5e3c2-7e05-4058-af6b-ca5aaa0f5201" + "x-ms-request-id" : "5e4685d2-c01e-00a7-040d-577940000000", + "x-ms-client-request-id" : "0a15bd5c-1a0e-47ee-b9e8-a105239df68c" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "87ba544b-bc0a-4bfe-92c4-dc888b60a233" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a80ff451-f871-4837-a768-2f643acae7e2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79b783-f01e-00ab-60f0-12e764000000", - "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac7b7551593a0a9cWed, 15 Apr 2020 06:36:35 GMT\"0x8D7E107584F9036\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "87ba544b-bc0a-4bfe-92c4-dc888b60a233", + "x-ms-request-id" : "40b06886-501e-000c-540d-57068a000000", + "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4Fri, 10 Jul 2020 22:55:29 GMT\"0x8D8252457EF9ECE\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:55:30 GMT", + "x-ms-client-request-id" : "a80ff451-f871-4837-a768-2f643acae7e2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac7b7551593a0a9c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f6a1e2df-f097-4c14-add4-a0626686af79" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7e2a423-f37f-41f9-955c-f6a2dfe6965c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429b78c-601e-000f-1bf0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "f6a1e2df-f097-4c14-add4-a0626686af79" + "x-ms-request-id" : "9c88e325-c01e-006c-240d-577a15000000", + "Date" : "Fri, 10 Jul 2020 22:55:31 GMT", + "x-ms-client-request-id" : "f7e2a423-f37f-41f9-955c-f6a2dfe6965c" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac7b7551593a0a9c", "javablobsynccopydestac1blobapitestsynccopydestac7b794632551", "javablobsynccopydestac2blobapitestsynccopydestac7b727705942" ] + "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestacc467458778a7b4", "javablobsynccopydestac1blobapitestsynccopydestacc4627187237", "javablobsynccopydestac2blobapitestsynccopydestacc4635834327" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[5].json index 6f02e4d06ace..9512828dd4cc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[5].json @@ -1,184 +1,205 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5f13222b-83f6-47e6-bfdc-b845c982f730" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "11a321f4-65c9-4551-b82f-d5d826a16aa7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10758832C47", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "ETag" : "0x8D8252459437FE6", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde822ac-001e-00fa-1ef0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "5f13222b-83f6-47e6-bfdc-b845c982f730" + "x-ms-request-id" : "e96fd913-e01e-0054-0f0d-57ded5000000", + "Date" : "Fri, 10 Jul 2020 22:55:31 GMT", + "x-ms-client-request-id" : "11a321f4-65c9-4551-b82f-d5d826a16aa7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0c/javablobsynccopydestac1blobapitestsynccopydestac6ee8076793e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5/javablobsynccopydestac1blobapitestsynccopydestacca923892667", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a0689548-068e-4e42-b048-1662185133c1", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac4ef26a-f39a-44fd-8e2b-7c0335a5bd70", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "x-ms-version-id" : "2020-07-10T22:55:32.3488444Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:32 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:31 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107588C5882", + "ETag" : "0x8D82524597F44BC", "Content-Length" : "0", - "x-ms-request-id" : "5d79b7d7-f01e-00ab-1ef0-12e764000000", - "x-ms-client-request-id" : "a0689548-068e-4e42-b048-1662185133c1" + "x-ms-request-id" : "e1556e92-301e-0078-030d-57327a000000", + "x-ms-client-request-id" : "ac4ef26a-f39a-44fd-8e2b-7c0335a5bd70" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0c?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "49313f6e-f711-477a-a90c-ee767bb699c7", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6dda6b33-06f4-4295-ab64-104857ea028c", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10758955CF2", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "ETag" : "0x8D8252459B8CD3F", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429b7d1-601e-000f-54f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "49313f6e-f711-477a-a90c-ee767bb699c7" + "x-ms-request-id" : "e00485a1-501e-00a5-4c0d-57c7f8000000", + "Date" : "Fri, 10 Jul 2020 22:55:32 GMT", + "x-ms-client-request-id" : "6dda6b33-06f4-4295-ab64-104857ea028c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0c/javablobsynccopydestac2blobapitestsynccopydestac6ee39330afb", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5/javablobsynccopydestac2blobapitestsynccopydestacca962179213", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7cd22605-8eaf-4de6-b1ba-15b51887ecad", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c3c9c20-353f-40c2-a02b-c5cf70d34af4", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "x-ms-version-id" : "2020-07-10T22:55:33.0783635Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:33 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", + "Date" : "Fri, 10 Jul 2020 22:55:32 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107589D9AB9", + "ETag" : "0x8D8252459EE9593", "Content-Length" : "0", - "x-ms-request-id" : "bde822f9-001e-00fa-66f0-12f991000000", - "x-ms-client-request-id" : "7cd22605-8eaf-4de6-b1ba-15b51887ecad" + "x-ms-request-id" : "0e2c3c74-c01e-0098-480d-57b1e3000000", + "x-ms-client-request-id" : "7c3c9c20-353f-40c2-a02b-c5cf70d34af4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0c/javablobsynccopydestac2blobapitestsynccopydestac6ee39330afb?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5/javablobsynccopydestac2blobapitestsynccopydestacca962179213?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7880c002-3610-4cc1-a3e7-72c2ccf74c25" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fcb9d49a-7d0b-4355-af4f-14a78d6479c1", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7d44ba9a-501e-001c-760d-57c3e2000000", + "Date" : "Fri, 10 Jul 2020 22:55:32 GMT", + "x-ms-client-request-id" : "fcb9d49a-7d0b-4355-af4f-14a78d6479c1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5/javablobsynccopydestac2blobapitestsynccopydestacca962179213?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c44cc8ea-6b0e-4b0a-8b28-a94d799506e0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107589D9AB9", - "x-ms-lease-id" : "1f0e55ff-998f-47f9-b180-f8e2bae45955", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "ETag" : "0x8D8252459EE9593", + "x-ms-lease-id" : "bbdabec5-b3a5-4a2c-92ad-a20b6177954d", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79b82b-f01e-00ab-63f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "7880c002-3610-4cc1-a3e7-72c2ccf74c25" + "x-ms-request-id" : "69ec334e-d01e-0060-4a0d-57ed1d000000", + "Date" : "Fri, 10 Jul 2020 22:55:33 GMT", + "x-ms-client-request-id" : "c44cc8ea-6b0e-4b0a-8b28-a94d799506e0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0c/javablobsynccopydestac2blobapitestsynccopydestac6ee39330afb", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5/javablobsynccopydestac2blobapitestsynccopydestacca962179213", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7736dd61-3b4f-4051-915d-2ec57015e9ab" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "53b44777-1490-46a4-a542-7011bfbc5a55" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-copy-id" : "00294244-eb79-45e6-8b7d-84fbdd7fdfa4", + "x-ms-copy-id" : "789f39b1-c3c0-4a88-93d2-91f9b9b9ffb0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "x-ms-version-id" : "2020-07-10T22:55:34.3682798Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:34 GMT", "retry-after" : "0", "StatusCode" : "202", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "ETag" : "0x8D7E10758B39DCD", + "Date" : "Fri, 10 Jul 2020 22:55:34 GMT", + "ETag" : "0x8D825245AB60276", "Content-Length" : "0", "x-ms-copy-status" : "success", - "x-ms-request-id" : "6429b80f-601e-000f-0bf0-12dd80000000", - "x-ms-client-request-id" : "7736dd61-3b4f-4051-915d-2ec57015e9ab" + "x-ms-request-id" : "9dee9d4e-401e-005d-800d-579b06000000", + "x-ms-client-request-id" : "53b44777-1490-46a4-a542-7011bfbc5a55" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7dcca3ea-9f62-4758-a949-c970366506a6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f99805c-6bd2-42fe-a3a0-47a7e0bf9d90" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde8235e-001e-00fa-3df0-12f991000000", - "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0cWed, 15 Apr 2020 06:36:36 GMT\"0x8D7E10758955CF2\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:35 GMT", - "x-ms-client-request-id" : "7dcca3ea-9f62-4758-a949-c970366506a6", + "x-ms-request-id" : "78cca5ab-901e-0095-580d-577937000000", + "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestacca9992622235e5Fri, 10 Jul 2020 22:55:32 GMT\"0x8D8252459B8CD3F\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:55:34 GMT", + "x-ms-client-request-id" : "4f99805c-6bd2-42fe-a3a0-47a7e0bf9d90", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f2407980-41a9-4801-87fb-29997648a8af" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "26cf6425-0ba2-4072-9016-7eef4f9ef5c9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79b870-f01e-00ab-1bf0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "f2407980-41a9-4801-87fb-29997648a8af" + "x-ms-request-id" : "a1c58762-d01e-002d-010d-5722f1000000", + "Date" : "Fri, 10 Jul 2020 22:55:34 GMT", + "x-ms-client-request-id" : "26cf6425-0ba2-4072-9016-7eef4f9ef5c9" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac6ee62004704a0c", "javablobsynccopydestac1blobapitestsynccopydestac6ee8076793e", "javablobsynccopydestac2blobapitestsynccopydestac6ee39330afb" ] + "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestacca9992622235e5", "javablobsynccopydestac1blobapitestsynccopydestacca923892667", "javablobsynccopydestac2blobapitestsynccopydestacca962179213" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[6].json new file mode 100644 index 000000000000..6021a4a4af50 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestac[6].json @@ -0,0 +1,183 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac4886712555659d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46188739-cc9d-49f1-a057-abfa4801e749" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D825245B5F25A9", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fc4f08d7-d01e-003d-650d-57e799000000", + "Date" : "Fri, 10 Jul 2020 22:55:35 GMT", + "x-ms-client-request-id" : "46188739-cc9d-49f1-a057-abfa4801e749" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac4886712555659d/javablobsynccopydestac1blobapitestsynccopydestac48847026107", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e7f8035a-268e-431b-9d92-c9341e9ee562", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:55:35.8873612Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:35 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:55:35 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825245B9B340C", + "Content-Length" : "0", + "x-ms-request-id" : "02db2e26-001e-004c-260d-5701b2000000", + "x-ms-client-request-id" : "e7f8035a-268e-431b-9d92-c9341e9ee562" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac4886712555659d?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c09b337d-7655-4071-8f07-a7c3b23d052a", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D825245BD7F372", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e728b987-101e-000d-0f0d-575956000000", + "Date" : "Fri, 10 Jul 2020 22:55:35 GMT", + "x-ms-client-request-id" : "c09b337d-7655-4071-8f07-a7c3b23d052a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac4886712555659d/javablobsynccopydestac2blobapitestsynccopydestac48880444756", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf267ab9-1a28-4446-a696-a501b3dbdabb", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:55:36.6398969Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:36 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:55:36 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825245C0E07F9", + "Content-Length" : "0", + "x-ms-request-id" : "a4a37f78-801e-006d-3b0d-5725c9000000", + "x-ms-client-request-id" : "bf267ab9-1a28-4446-a696-a501b3dbdabb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac4886712555659d/javablobsynccopydestac2blobapitestsynccopydestac48880444756?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0ae16db-96fc-4b43-bcd9-6077b6bd0b72", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "d74ebf7b-501e-0041-670d-57c966000000", + "Date" : "Fri, 10 Jul 2020 22:55:36 GMT", + "x-ms-client-request-id" : "a0ae16db-96fc-4b43-bcd9-6077b6bd0b72" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac4886712555659d/javablobsynccopydestac2blobapitestsynccopydestac48880444756", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "902e60bb-e3f3-4152-b03b-9796e4846001" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-copy-id" : "663f84a8-f30a-4b85-9a4b-211ab8cd9989", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:55:37.3634104Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:55:37 GMT", + "retry-after" : "0", + "StatusCode" : "202", + "Date" : "Fri, 10 Jul 2020 22:55:37 GMT", + "ETag" : "0x8D825245C86D730", + "Content-Length" : "0", + "x-ms-copy-status" : "success", + "x-ms-request-id" : "f5cee284-601e-0028-440d-57f02a000000", + "x-ms-client-request-id" : "902e60bb-e3f3-4152-b03b-9796e4846001" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "19570dba-8866-4d04-8516-b6f79024751f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e2f3fd55-201e-0074-510d-57a572000000", + "Body" : "jtcsynccopydestacjtcsynccopydestac0blobapitestsynccopydestac4886712555659dFri, 10 Jul 2020 22:55:36 GMT\"0x8D825245BD7F372\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:55:37 GMT", + "x-ms-client-request-id" : "19570dba-8866-4d04-8516-b6f79024751f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestac0blobapitestsynccopydestac4886712555659d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47b27091-bf7d-4fd9-98ba-0542636d8916" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "44198587-801e-0099-580d-57ee3f000000", + "Date" : "Fri, 10 Jul 2020 22:55:37 GMT", + "x-ms-client-request-id" : "47b27091-bf7d-4fd9-98ba-0542636d8916" + }, + "Exception" : null + } ], + "variables" : [ "jtcsynccopydestac0blobapitestsynccopydestac4886712555659d", "javablobsynccopydestac1blobapitestsynccopydestac48847026107", "javablobsynccopydestac2blobapitestsynccopydestac48880444756" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[0].json index 91191560d785..c229828271f5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[0].json @@ -1,116 +1,118 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfaild9d89610b7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0e80716047?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "65f37252-de37-4637-a4d2-b85f5d81bf5e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "53bf6403-bbce-40a1-a2d3-ddf4489fa57d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10758CD1F4E", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "ETag" : "0x8D8252406B3F133", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429b83d-601e-000f-28f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "65f37252-de37-4637-a4d2-b85f5d81bf5e" + "x-ms-request-id" : "41d369ea-001e-0001-6b0c-57ce5e000000", + "Date" : "Fri, 10 Jul 2020 22:53:13 GMT", + "x-ms-client-request-id" : "53bf6403-bbce-40a1-a2d3-ddf4489fa57d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfaild9d89610b7/javablobsynccopydestacfail1675875abc230931984d0", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0e80716047/javablobsynccopydestacfail11585941c8a7e45e9e4e4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "da40fdbe-568e-4458-95dd-b4897da8c056", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "58334f7d-62b2-4986-9ef0-bd18eb409e44", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "x-ms-version-id" : "2020-07-10T22:53:14.2064666Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:14 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:13 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10758D72F01", + "ETag" : "0x8D8252407286A1A", "Content-Length" : "0", - "x-ms-request-id" : "bde823c3-001e-00fa-12f0-12f991000000", - "x-ms-client-request-id" : "da40fdbe-568e-4458-95dd-b4897da8c056" + "x-ms-request-id" : "69eb7dd8-d01e-0060-440c-57ed1d000000", + "x-ms-client-request-id" : "58334f7d-62b2-4986-9ef0-bd18eb409e44" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfaild9d89610b7?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0e80716047?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "64cca8d3-cc33-4270-847b-9d8d02f71e4f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2373826-6c42-4300-8344-b2a3c1129042", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10758DF2234", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "ETag" : "0x8D8252407738D10", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79b8c7-f01e-00ab-65f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "64cca8d3-cc33-4270-847b-9d8d02f71e4f" + "x-ms-request-id" : "9deceade-401e-005d-510c-579b06000000", + "Date" : "Fri, 10 Jul 2020 22:53:14 GMT", + "x-ms-client-request-id" : "f2373826-6c42-4300-8344-b2a3c1129042" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfaild9d89610b7/javablobsynccopydestacfail2500255049425ea4d94b8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0e80716047/javablobsynccopydestacfail2862048810c85a2ac446f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "912f0b56-3927-45d9-8649-06e393fa8ce7", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "947db6c4-8f6c-456b-8ebb-b7b40e72c928", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:36 GMT", + "x-ms-version-id" : "2020-07-10T22:53:15.1261222Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:15 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:14 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10758E6EA3F", + "ETag" : "0x8D8252407B4BE26", "Content-Length" : "0", - "x-ms-request-id" : "6429b873-601e-000f-4ef0-12dd80000000", - "x-ms-client-request-id" : "912f0b56-3927-45d9-8649-06e393fa8ce7" + "x-ms-request-id" : "78cbdbfd-901e-0095-540c-577937000000", + "x-ms-client-request-id" : "947db6c4-8f6c-456b-8ebb-b7b40e72c928" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfaild9d89610b7/javablobsynccopydestacfail2500255049425ea4d94b8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0e80716047/javablobsynccopydestacfail2862048810c85a2ac446f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4f22e34e-c5fd-443d-a2f7-a15507449d2e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "db885138-de14-485f-906a-7d70f4800d0e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "bde82432-001e-00fa-6bf0-12f991000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:bde82432-001e-00fa-6bf0-12f991000000\nTime:2020-04-15T06:36:36.9563762Z", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "4f22e34e-c5fd-443d-a2f7-a15507449d2e", + "x-ms-request-id" : "a1c51f4f-d01e-002d-3f0c-5722f1000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:a1c51f4f-d01e-002d-3f0c-5722f1000000\nTime:2020-07-10T22:53:15.6907964Z", + "Date" : "Fri, 10 Jul 2020 22:53:15 GMT", + "x-ms-client-request-id" : "db885138-de14-485f-906a-7d70f4800d0e", "Content-Type" : "application/xml" }, "Exception" : null @@ -118,43 +120,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dc226515-6ec2-4828-9286-95a57cf44130" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a13afe4-4f16-40e7-832f-ededcb8a2962" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79b925-f01e-00ab-28f0-12e764000000", - "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfaild9d89610b7Wed, 15 Apr 2020 06:36:36 GMT\"0x8D7E10758DF2234\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "dc226515-6ec2-4828-9286-95a57cf44130", + "x-ms-request-id" : "fc4e1d0a-d01e-003d-0b0c-57e799000000", + "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfail0e80716047Fri, 10 Jul 2020 22:53:14 GMT\"0x8D8252407738D10\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:53:15 GMT", + "x-ms-client-request-id" : "5a13afe4-4f16-40e7-832f-ededcb8a2962", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfaild9d89610b7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0e80716047?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ce4ce562-ef84-4fd6-97ae-3a465d520dcb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87306291-c71d-496e-8cc4-8ff3fa50616c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429b89f-601e-000f-6ef0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "ce4ce562-ef84-4fd6-97ae-3a465d520dcb" + "x-ms-request-id" : "02daa6be-001e-004c-310c-5701b2000000", + "Date" : "Fri, 10 Jul 2020 22:53:16 GMT", + "x-ms-client-request-id" : "87306291-c71d-496e-8cc4-8ff3fa50616c" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfaild9d89610b7", "javablobsynccopydestacfail1675875abc230931984d0", "javablobsynccopydestacfail2500255049425ea4d94b8" ] + "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfail0e80716047", "javablobsynccopydestacfail11585941c8a7e45e9e4e4", "javablobsynccopydestacfail2862048810c85a2ac446f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[1].json index 3fead631f0f6..1e87e4c6f10f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[1].json @@ -1,116 +1,118 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail02d49801db?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0ef32935b5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "db38c7e9-10bd-4edc-9208-bceb0b35634b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c01a3b0-f8ff-496f-a80c-ff90001ad7f9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107590C05B0", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "ETag" : "0x8D825240926A4C3", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:17 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "bde824a8-001e-00fa-4ff0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "db38c7e9-10bd-4edc-9208-bceb0b35634b" + "x-ms-request-id" : "e7282e85-101e-000d-310c-575956000000", + "Date" : "Fri, 10 Jul 2020 22:53:16 GMT", + "x-ms-client-request-id" : "9c01a3b0-f8ff-496f-a80c-ff90001ad7f9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail02d49801db/javablobsynccopydestacfail19691156fa03c7cc054fe", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0ef32935b5/javablobsynccopydestacfail154707c929cbfc144f4f4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "186f5f37-423a-4fe7-b96c-9f9e907bfa3f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a801e7b-19a8-4a34-be94-57c096ac45ce", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "x-ms-version-id" : "2020-07-10T22:53:18.0181826Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:18 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:17 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075914BBEA", + "ETag" : "0x8D82524096E0942", "Content-Length" : "0", - "x-ms-request-id" : "5d79b992-f01e-00ab-80f0-12e764000000", - "x-ms-client-request-id" : "186f5f37-423a-4fe7-b96c-9f9e907bfa3f" + "x-ms-request-id" : "a4a2b4df-801e-006d-3c0c-5725c9000000", + "x-ms-client-request-id" : "7a801e7b-19a8-4a34-be94-57c096ac45ce" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail02d49801db?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0ef32935b5?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dacb7aa7-f9a2-40df-88d6-b94a6c31978c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8107cb02-2276-48b8-9987-96ff24badb7a", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107591E3685", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "ETag" : "0x8D8252409A0E465", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:18 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429b8e4-601e-000f-1af0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "dacb7aa7-f9a2-40df-88d6-b94a6c31978c" + "x-ms-request-id" : "d74e4faf-501e-0041-230c-57c966000000", + "Date" : "Fri, 10 Jul 2020 22:53:18 GMT", + "x-ms-client-request-id" : "8107cb02-2276-48b8-9987-96ff24badb7a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail02d49801db/javablobsynccopydestacfail2798874eb0ef4498d442c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0ef32935b5/javablobsynccopydestacfail2695617c2e94cd26084d3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cca7811f-cee1-4bc7-b35d-e582d7fd4ca7", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "824b279d-43d7-4f51-89e2-c42d546b5db9", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "x-ms-version-id" : "2020-07-10T22:53:18.6806543Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:18 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:17 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075926C199", + "ETag" : "0x8D8252409D31F0F", "Content-Length" : "0", - "x-ms-request-id" : "bde82512-001e-00fa-27f0-12f991000000", - "x-ms-client-request-id" : "cca7811f-cee1-4bc7-b35d-e582d7fd4ca7" + "x-ms-request-id" : "f5ce1776-601e-0028-600c-57f02a000000", + "x-ms-client-request-id" : "824b279d-43d7-4f51-89e2-c42d546b5db9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail02d49801db/javablobsynccopydestacfail2798874eb0ef4498d442c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0ef32935b5/javablobsynccopydestacfail2695617c2e94cd26084d3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a379b57c-327e-4542-9163-232a01513b57" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38bba171-d2c4-4821-b3b0-9d1661199943" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "5d79b9de-f01e-00ab-3ff0-12e764000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5d79b9de-f01e-00ab-3ff0-12e764000000\nTime:2020-04-15T06:36:37.3917983Z", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "a379b57c-327e-4542-9163-232a01513b57", + "x-ms-request-id" : "e2f33c40-201e-0074-5c0c-57a572000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:e2f33c40-201e-0074-5c0c-57a572000000\nTime:2020-07-10T22:53:19.0731313Z", + "Date" : "Fri, 10 Jul 2020 22:53:19 GMT", + "x-ms-client-request-id" : "38bba171-d2c4-4821-b3b0-9d1661199943", "Content-Type" : "application/xml" }, "Exception" : null @@ -118,43 +120,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "85315ff0-d385-4ff9-bcc3-a50a799b72bb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b81a9964-947d-4bc2-8002-86497835dd52" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429b91c-601e-000f-42f0-12dd80000000", - "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfail02d49801dbWed, 15 Apr 2020 06:36:37 GMT\"0x8D7E107591E3685\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "85315ff0-d385-4ff9-bcc3-a50a799b72bb", + "x-ms-request-id" : "44185d25-801e-0099-7b0c-57ee3f000000", + "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfail0ef32935b5Fri, 10 Jul 2020 22:53:18 GMT\"0x8D8252409A0E465\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:53:18 GMT", + "x-ms-client-request-id" : "b81a9964-947d-4bc2-8002-86497835dd52", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail02d49801db?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0ef32935b5?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "521ff796-3d35-4572-84c7-272c76894103" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7334cf39-b64a-4934-a97c-4965e5282b93" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde82587-001e-00fa-07f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "521ff796-3d35-4572-84c7-272c76894103" + "x-ms-request-id" : "791ab5b6-e01e-0009-020c-57d451000000", + "Date" : "Fri, 10 Jul 2020 22:53:19 GMT", + "x-ms-client-request-id" : "7334cf39-b64a-4934-a97c-4965e5282b93" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfail02d49801db", "javablobsynccopydestacfail19691156fa03c7cc054fe", "javablobsynccopydestacfail2798874eb0ef4498d442c" ] + "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfail0ef32935b5", "javablobsynccopydestacfail154707c929cbfc144f4f4", "javablobsynccopydestacfail2695617c2e94cd26084d3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[2].json index 7e9406254472..c38feedcd288 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[2].json @@ -1,116 +1,118 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailcef954410e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail49f8722089?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0a26cf70-cbbc-417c-a679-65127f818483" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9792ffe3-717f-43e8-b69d-dfedce776df6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107594E4F36", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "ETag" : "0x8D825240AA5EFE6", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79ba2f-f01e-00ab-01f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:36 GMT", - "x-ms-client-request-id" : "0a26cf70-cbbc-417c-a679-65127f818483" + "x-ms-request-id" : "676ff766-101e-0040-620c-5796ba000000", + "Date" : "Fri, 10 Jul 2020 22:53:20 GMT", + "x-ms-client-request-id" : "9792ffe3-717f-43e8-b69d-dfedce776df6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailcef954410e/javablobsynccopydestacfail1652774738c0155d7445e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail49f8722089/javablobsynccopydestacfail173026034819e288ea44c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f7131b95-309e-4dff-a7c5-7a250644c868", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "278bd7ba-8909-4664-8a9a-e223386659b9", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "x-ms-version-id" : "2020-07-10T22:53:20.3678570Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:20 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:20 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075956B6AF", + "ETag" : "0x8D825240AD46A55", "Content-Length" : "0", - "x-ms-request-id" : "6429b952-601e-000f-6df0-12dd80000000", - "x-ms-client-request-id" : "f7131b95-309e-4dff-a7c5-7a250644c868" + "x-ms-request-id" : "d2eb676c-301e-009c-800c-573ce4000000", + "x-ms-client-request-id" : "278bd7ba-8909-4664-8a9a-e223386659b9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailcef954410e?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail49f8722089?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "56a21952-8baa-480c-a4dc-4d93e2eeae46", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa97cf17-d49d-4c8e-a7e1-6d227ad9dfbb", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E107595F4720", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "ETag" : "0x8D825240B054909", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde825f6-001e-00fa-63f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "56a21952-8baa-480c-a4dc-4d93e2eeae46" + "x-ms-request-id" : "3b262be4-b01e-0049-290c-57d369000000", + "Date" : "Fri, 10 Jul 2020 22:53:20 GMT", + "x-ms-client-request-id" : "aa97cf17-d49d-4c8e-a7e1-6d227ad9dfbb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailcef954410e/javablobsynccopydestacfail258537357f777ce150483", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail49f8722089/javablobsynccopydestacfail2953367e7f2a3b8a3447b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "81c6c9d8-15bb-4b3e-b1cf-beb18df0190f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fef94542-ae85-40cb-906e-71d5dbfe0965", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "x-ms-version-id" : "2020-07-10T22:53:21.0113162Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:21 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:20 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E1075966C020", + "ETag" : "0x8D825240B36C08A", "Content-Length" : "0", - "x-ms-request-id" : "5d79ba6b-f01e-00ab-33f0-12e764000000", - "x-ms-client-request-id" : "81c6c9d8-15bb-4b3e-b1cf-beb18df0190f" + "x-ms-request-id" : "4777ec7c-101e-001d-3d0c-579c3e000000", + "x-ms-client-request-id" : "fef94542-ae85-40cb-906e-71d5dbfe0965" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailcef954410e/javablobsynccopydestacfail258537357f777ce150483", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail49f8722089/javablobsynccopydestacfail2953367e7f2a3b8a3447b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "378f6ff7-3ca8-4ed3-ae2b-f0f06d2caa50" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "06c4ac31-da15-4d4c-8a31-235b658df1c8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "TargetConditionNotMet", "retry-after" : "0", "Content-Length" : "265", "StatusCode" : "412", - "x-ms-request-id" : "6429b97c-601e-000f-0cf0-12dd80000000", - "Body" : "TargetConditionNotMetThe target condition specified using HTTP conditional header(s) is not met.\nRequestId:6429b97c-601e-000f-0cf0-12dd80000000\nTime:2020-04-15T06:36:37.7562887Z", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "378f6ff7-3ca8-4ed3-ae2b-f0f06d2caa50", + "x-ms-request-id" : "161d7ed0-201e-0090-540c-57abec000000", + "Body" : "TargetConditionNotMetThe target condition specified using HTTP conditional header(s) is not met.\nRequestId:161d7ed0-201e-0090-540c-57abec000000\nTime:2020-07-10T22:53:21.3953668Z", + "Date" : "Fri, 10 Jul 2020 22:53:21 GMT", + "x-ms-client-request-id" : "06c4ac31-da15-4d4c-8a31-235b658df1c8", "Content-Type" : "application/xml" }, "Exception" : null @@ -118,43 +120,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8f5027d9-b25c-4323-9c47-a139c548d048" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e7a0f97-2d70-4cb7-866d-bb0256e33edf" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde82646-001e-00fa-29f0-12f991000000", - "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfailcef954410eWed, 15 Apr 2020 06:36:37 GMT\"0x8D7E107595F4720\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "8f5027d9-b25c-4323-9c47-a139c548d048", + "x-ms-request-id" : "33c12d9c-101e-0050-150c-5753d2000000", + "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfail49f8722089Fri, 10 Jul 2020 22:53:20 GMT\"0x8D825240B054909\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:53:21 GMT", + "x-ms-client-request-id" : "6e7a0f97-2d70-4cb7-866d-bb0256e33edf", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailcef954410e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail49f8722089?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "abe1fda0-7eb8-482d-862b-788ba651cb31" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ecb2c01-31b1-4ab5-b63e-933fdd645f8c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "5d79bab1-f01e-00ab-6df0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "abe1fda0-7eb8-482d-862b-788ba651cb31" + "x-ms-request-id" : "40b01a16-501e-000c-130c-57068a000000", + "Date" : "Fri, 10 Jul 2020 22:53:21 GMT", + "x-ms-client-request-id" : "7ecb2c01-31b1-4ab5-b63e-933fdd645f8c" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfailcef954410e", "javablobsynccopydestacfail1652774738c0155d7445e", "javablobsynccopydestacfail258537357f777ce150483" ] + "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfail49f8722089", "javablobsynccopydestacfail173026034819e288ea44c", "javablobsynccopydestacfail2953367e7f2a3b8a3447b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[3].json index c29d243fa675..013e380567ff 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[3].json @@ -1,148 +1,151 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "68ff67ca-a4e9-4f03-bfde-85cbde1a5ffc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a639ab5-b81b-4a6b-b6af-981a1319c712" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10759859EDC", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "ETag" : "0x8D825240C02DE03", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429b99f-601e-000f-2df0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "68ff67ca-a4e9-4f03-bfde-85cbde1a5ffc" + "x-ms-request-id" : "9c882832-c01e-006c-5b0c-577a15000000", + "Date" : "Fri, 10 Jul 2020 22:53:22 GMT", + "x-ms-client-request-id" : "1a639ab5-b81b-4a6b-b6af-981a1319c712" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618/javablobsynccopydestacfail1944770e4c8394760840d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688/javablobsynccopydestacfail199998bd66dce982fe4e5", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27759b1a-c724-4141-aaca-e6d1ac72a82a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2277da01-9556-48f3-8700-4272b35e4911", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:37 GMT", + "x-ms-version-id" : "2020-07-10T22:53:22.6694972Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:22 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:22 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107598DB25D", + "ETag" : "0x8D825240C339E2B", "Content-Length" : "0", - "x-ms-request-id" : "bde826a6-001e-00fa-7af0-12f991000000", - "x-ms-client-request-id" : "27759b1a-c724-4141-aaca-e6d1ac72a82a" + "x-ms-request-id" : "e96eccba-e01e-0054-4c0c-57ded5000000", + "x-ms-client-request-id" : "2277da01-9556-48f3-8700-4272b35e4911" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8f9f7502-fe73-4ef9-b8df-2b92ce4ac391", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b02f19b-4055-4ffc-be3f-fab6491aead6", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E1075994E330", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:38 GMT", + "ETag" : "0x8D825240C6E696E", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79bb05-f01e-00ab-34f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "8f9f7502-fe73-4ef9-b8df-2b92ce4ac391" + "x-ms-request-id" : "e154acb2-301e-0078-2f0c-57327a000000", + "Date" : "Fri, 10 Jul 2020 22:53:22 GMT", + "x-ms-client-request-id" : "3b02f19b-4055-4ffc-be3f-fab6491aead6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618/javablobsynccopydestacfail273036139fde89af83434", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688/javablobsynccopydestacfail274802eee9a51fbc37459", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ef4b8f47-3675-4415-b1f4-c2e19bbb4679", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29162440-e94d-4195-84ec-77123a6ce7e5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:38 GMT", + "x-ms-version-id" : "2020-07-10T22:53:23.4090248Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:23 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:22 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E107599CAA11", + "ETag" : "0x8D825240CA49D08", "Content-Length" : "0", - "x-ms-request-id" : "6429b9c8-601e-000f-51f0-12dd80000000", - "x-ms-client-request-id" : "ef4b8f47-3675-4415-b1f4-c2e19bbb4679" + "x-ms-request-id" : "e003f184-501e-00a5-400c-57c7f8000000", + "x-ms-client-request-id" : "29162440-e94d-4195-84ec-77123a6ce7e5" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618/javablobsynccopydestacfail273036139fde89af83434", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688/javablobsynccopydestacfail274802eee9a51fbc37459", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4a403cca-1472-49d4-94a4-5eb1b76161b8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6b6f64a-1847-47af-a240-3cf7fb942226" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:38 GMT", + "x-ms-version-id" : "2020-07-10T22:53:23.4090248Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:23 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:23 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E107599CAA11", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 06:36:38 GMT", + "ETag" : "0x8D825240CA49D08", + "x-ms-creation-time" : "Fri, 10 Jul 2020 22:53:23 GMT", "Content-Length" : "7", - "x-ms-request-id" : "bde826f6-001e-00fa-43f0-12f991000000", - "x-ms-client-request-id" : "4a403cca-1472-49d4-94a4-5eb1b76161b8", + "x-ms-request-id" : "0e2b5970-c01e-0098-0d0c-57b1e3000000", + "x-ms-client-request-id" : "b6b6f64a-1847-47af-a240-3cf7fb942226", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618/javablobsynccopydestacfail273036139fde89af83434", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688/javablobsynccopydestacfail274802eee9a51fbc37459", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6a93cd74-5918-4ab5-a34a-6f1c20cf1503" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d602f553-9fa2-498a-ac36-7ae18c6d5a4e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "5d79bb47-f01e-00ab-6af0-12e764000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5d79bb47-f01e-00ab-6af0-12e764000000\nTime:2020-04-15T06:36:38.1815443Z", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "6a93cd74-5918-4ab5-a34a-6f1c20cf1503", + "x-ms-request-id" : "7d445ac3-501e-001c-520c-57c3e2000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:7d445ac3-501e-001c-520c-57c3e2000000\nTime:2020-07-10T22:53:24.2697976Z", + "Date" : "Fri, 10 Jul 2020 22:53:23 GMT", + "x-ms-client-request-id" : "d602f553-9fa2-498a-ac36-7ae18c6d5a4e", "Content-Type" : "application/xml" }, "Exception" : null @@ -150,43 +153,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "245f3589-d5cc-45a4-86e2-4f5160f6394d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b55b2ad7-430f-4f4c-acd8-11e6580b4b73" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6429b9fb-601e-000f-7af0-12dd80000000", - "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618Wed, 15 Apr 2020 06:36:38 GMT\"0x8D7E1075994E330\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "245f3589-d5cc-45a4-86e2-4f5160f6394d", + "x-ms-request-id" : "4dedc4ca-901e-002c-690c-577d2d000000", + "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688Fri, 10 Jul 2020 22:53:23 GMT\"0x8D825240C6E696E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:53:24 GMT", + "x-ms-client-request-id" : "b55b2ad7-430f-4f4c-acd8-11e6580b4b73", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "85f75495-1df8-4b41-944e-adf2f2faafcd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "850df26a-7c63-41b8-87c4-4f02733f6ecc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "bde82755-001e-00fa-19f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "85f75495-1df8-4b41-944e-adf2f2faafcd" + "x-ms-request-id" : "010624e3-901e-0013-010c-57b58e000000", + "Date" : "Fri, 10 Jul 2020 22:53:24 GMT", + "x-ms-client-request-id" : "850df26a-7c63-41b8-87c4-4f02733f6ecc" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfailfde1630618", "javablobsynccopydestacfail1944770e4c8394760840d", "javablobsynccopydestacfail273036139fde89af83434" ] + "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfail2b56185688", "javablobsynccopydestacfail199998bd66dce982fe4e5", "javablobsynccopydestacfail274802eee9a51fbc37459" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[4].json index 8b379e2a45d4..b41c6277fa1b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[4].json @@ -1,138 +1,140 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail01262835ed?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "af41d96c-9902-4dfb-9a5b-3dd510cf0c72" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0d431e6-3ac3-4f82-bbab-75886cbb287f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10759C9B795", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:38 GMT", + "ETag" : "0x8D825240DE99864", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5d79bb9c-f01e-00ab-31f0-12e764000000", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "af41d96c-9902-4dfb-9a5b-3dd510cf0c72" + "x-ms-request-id" : "8a212280-301e-00a3-520c-57f447000000", + "Date" : "Fri, 10 Jul 2020 22:53:24 GMT", + "x-ms-client-request-id" : "b0d431e6-3ac3-4f82-bbab-75886cbb287f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582/javablobsynccopydestacfail1554646f518b5b2b2d492", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail01262835ed/javablobsynccopydestacfail19288466150bf73e0d41c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "214237b2-12b6-42e1-adf2-09581f7cf88a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7eaef07-19fa-495b-aa8f-9c111df1dcfe", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:38 GMT", + "x-ms-version-id" : "2020-07-10T22:53:25.7697064Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:38 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:24 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10759D1F798", + "ETag" : "0x8D825240E0CAC17", "Content-Length" : "0", - "x-ms-request-id" : "6429ba32-601e-000f-2af0-12dd80000000", - "x-ms-client-request-id" : "214237b2-12b6-42e1-adf2-09581f7cf88a" + "x-ms-request-id" : "880dbcf2-d01e-0084-7d0c-57e383000000", + "x-ms-client-request-id" : "c7eaef07-19fa-495b-aa8f-9c111df1dcfe" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail01262835ed?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e3a35566-170a-45f6-93ab-fb66226badab", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e8e64bb-cb42-41b9-8098-98dfd8dfe819", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10759DBC18F", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:38 GMT", + "ETag" : "0x8D825240E486184", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "bde827ab-001e-00fa-67f0-12f991000000", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", - "x-ms-client-request-id" : "e3a35566-170a-45f6-93ab-fb66226badab" + "x-ms-request-id" : "3004814b-201e-0080-640c-576e84000000", + "Date" : "Fri, 10 Jul 2020 22:53:25 GMT", + "x-ms-client-request-id" : "7e8e64bb-cb42-41b9-8098-98dfd8dfe819" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582/javablobsynccopydestacfail2533437d6d45a35b814bc", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail01262835ed/javablobsynccopydestacfail276843d121f8c72694478", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8a588bc6-90da-4f96-b5b8-89dd1b8f6976", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00d7ed83-c755-4f47-928b-1bd0e54601d0", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:38 GMT", + "x-ms-version-id" : "2020-07-10T22:53:26.5792848Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:26 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 06:36:37 GMT", + "Date" : "Fri, 10 Jul 2020 22:53:26 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10759E339C6", + "ETag" : "0x8D825240E885B50", "Content-Length" : "0", - "x-ms-request-id" : "5d79bbc5-f01e-00ab-54f0-12e764000000", - "x-ms-client-request-id" : "8a588bc6-90da-4f96-b5b8-89dd1b8f6976" + "x-ms-request-id" : "e850f418-d01e-0070-560c-572875000000", + "x-ms-client-request-id" : "00d7ed83-c755-4f47-928b-1bd0e54601d0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582/javablobsynccopydestacfail2533437d6d45a35b814bc?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail01262835ed/javablobsynccopydestacfail276843d121f8c72694478?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8234b407-b806-4af8-8b0d-1e3022fb52b0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4540afa-07f5-4b07-861a-e3b7ee87ecca" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10759E339C6", - "x-ms-lease-id" : "189b6749-77e1-4882-821e-23aa14202575", - "Last-Modified" : "Wed, 15 Apr 2020 06:36:38 GMT", + "ETag" : "0x8D825240E885B50", + "x-ms-lease-id" : "7be2345f-15db-4fb2-aebd-1dd0e72d659f", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6429ba67-601e-000f-55f0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:38 GMT", - "x-ms-client-request-id" : "8234b407-b806-4af8-8b0d-1e3022fb52b0" + "x-ms-request-id" : "0b385e46-f01e-0058-1f0c-5749dd000000", + "Date" : "Fri, 10 Jul 2020 22:53:26 GMT", + "x-ms-client-request-id" : "c4540afa-07f5-4b07-861a-e3b7ee87ecca" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582/javablobsynccopydestacfail2533437d6d45a35b814bc", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail01262835ed/javablobsynccopydestacfail276843d121f8c72694478", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "22536048-56a2-4863-8559-2caff18f3dbb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bbacc6ad-0f37-4590-bccb-2b37a0a8c759" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "bde82806-001e-00fa-37f0-12f991000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:bde82806-001e-00fa-37f0-12f991000000\nTime:2020-04-15T06:36:38.6539952Z", - "Date" : "Wed, 15 Apr 2020 06:36:38 GMT", - "x-ms-client-request-id" : "22536048-56a2-4863-8559-2caff18f3dbb", + "x-ms-request-id" : "974dd6df-b01e-002b-3c0c-57114e000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:974dd6df-b01e-002b-3c0c-57114e000000\nTime:2020-07-10T22:53:27.6978987Z", + "Date" : "Fri, 10 Jul 2020 22:53:26 GMT", + "x-ms-client-request-id" : "bbacc6ad-0f37-4590-bccb-2b37a0a8c759", "Content-Type" : "application/xml" }, "Exception" : null @@ -140,43 +142,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "34f0f7c1-cecb-4bc6-a7da-cb4dc906a96f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ed859a0-a07d-43bb-abd7-dd4141d4c553" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "5d79bc0c-f01e-00ab-0bf0-12e764000000", - "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582Wed, 15 Apr 2020 06:36:38 GMT\"0x8D7E10759DBC18F\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 06:36:38 GMT", - "x-ms-client-request-id" : "34f0f7c1-cecb-4bc6-a7da-cb4dc906a96f", + "x-ms-request-id" : "39f39907-101e-008b-2b0c-5795ef000000", + "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfail01262835edFri, 10 Jul 2020 22:53:26 GMT\"0x8D825240E486184\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:53:27 GMT", + "x-ms-client-request-id" : "9ed859a0-a07d-43bb-abd7-dd4141d4c553", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail01262835ed?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7a06e55a-6ef5-4c22-a698-b519b57fc87a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2cd5e42b-76fb-495a-af4e-a7e4d0982dba" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6429ba8f-601e-000f-7bf0-12dd80000000", - "Date" : "Wed, 15 Apr 2020 06:36:38 GMT", - "x-ms-client-request-id" : "7a06e55a-6ef5-4c22-a698-b519b57fc87a" + "x-ms-request-id" : "e9378b64-e01e-00a0-5f0c-571523000000", + "Date" : "Fri, 10 Jul 2020 22:53:28 GMT", + "x-ms-client-request-id" : "2cd5e42b-76fb-495a-af4e-a7e4d0982dba" }, "Exception" : null } ], - "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfail7e31042582", "javablobsynccopydestacfail1554646f518b5b2b2d492", "javablobsynccopydestacfail2533437d6d45a35b814bc" ] + "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfail01262835ed", "javablobsynccopydestacfail19288466150bf73e0d41c", "javablobsynccopydestacfail276843d121f8c72694478" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[5].json new file mode 100644 index 000000000000..203df4ef0d5a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestsynccopydestacfail[5].json @@ -0,0 +1,161 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0660274059?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5ea382b-673f-4de8-9810-252055927768" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D825240FC724D2", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "72516d1e-001e-005c-320c-57c4da000000", + "Date" : "Fri, 10 Jul 2020 22:53:28 GMT", + "x-ms-client-request-id" : "d5ea382b-673f-4de8-9810-252055927768" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0660274059/javablobsynccopydestacfail11749998ca18a70f3b45a", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "48abe945-6eea-4921-a480-cdc54d8ef716", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:53:28.9809945Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:53:28 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825240FF6D419", + "Content-Length" : "0", + "x-ms-request-id" : "95888fa4-f01e-0093-0c0c-574a88000000", + "x-ms-client-request-id" : "48abe945-6eea-4921-a480-cdc54d8ef716" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0660274059?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b22e041b-6140-47ea-974f-403061a0e150", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82524102E1B8A", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "26511032-f01e-0067-1f0c-57817e000000", + "Date" : "Fri, 10 Jul 2020 22:53:29 GMT", + "x-ms-client-request-id" : "b22e041b-6140-47ea-974f-403061a0e150" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0660274059/javablobsynccopydestacfail221199d9b82aff95d3401", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae580411-6fdf-4209-8b0c-02ea1b1102aa", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-10T22:53:29.7075126Z", + "Last-Modified" : "Fri, 10 Jul 2020 22:53:29 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Fri, 10 Jul 2020 22:53:29 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D825241065AFB6", + "Content-Length" : "0", + "x-ms-request-id" : "5a451143-c01e-0043-3e0c-5777de000000", + "x-ms-client-request-id" : "ae580411-6fdf-4209-8b0c-02ea1b1102aa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0660274059/javablobsynccopydestacfail221199d9b82aff95d3401", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0007002a-3083-4be3-b719-9f199639e5e8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "5fb1b124-e01e-007b-110c-57d31e000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5fb1b124-e01e-007b-110c-57d31e000000\nTime:2020-07-10T22:53:30.1458254Z", + "Date" : "Fri, 10 Jul 2020 22:53:29 GMT", + "x-ms-client-request-id" : "0007002a-3083-4be3-b719-9f199639e5e8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsynccopydestacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "940613c3-045c-439b-afc4-a4fe718de7cf" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "0e2ebaf6-401e-0062-6d0c-5753a5000000", + "Body" : "jtcsynccopydestacfailjtcsynccopydestacfail0blobapitestsynccopydestacfail0660274059Fri, 10 Jul 2020 22:53:29 GMT\"0x8D82524102E1B8A\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Fri, 10 Jul 2020 22:53:30 GMT", + "x-ms-client-request-id" : "940613c3-045c-439b-afc4-a4fe718de7cf", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsynccopydestacfail0blobapitestsynccopydestacfail0660274059?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4e54aaa-3cba-410b-94f9-3738a7ea0014" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "b6adab2e-501e-0023-330c-570b41000000", + "Date" : "Fri, 10 Jul 2020 22:53:30 GMT", + "x-ms-client-request-id" : "c4e54aaa-3cba-410b-94f9-3738a7ea0014" + }, + "Exception" : null + } ], + "variables" : [ "jtcsynccopydestacfail0blobapitestsynccopydestacfail0660274059", "javablobsynccopydestacfail11749998ca18a70f3b45a", "javablobsynccopydestacfail221199d9b82aff95d3401" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[0].json new file mode 100644 index 000000000000..4ad94f6f9120 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[0].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsize61a372717?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6bf35f33-b5b3-409c-8dc2-5f130fb97710" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82819FF1A5384", + "Last-Modified" : "Tue, 14 Jul 2020 17:18:59 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d46d6efa-901e-0054-2b02-5abe5e000000", + "Date" : "Tue, 14 Jul 2020 17:18:59 GMT", + "x-ms-client-request-id" : "6bf35f33-b5b3-409c-8dc2-5f130fb97710" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsize61a372717/javablobuploadincorrectsize192960ae99c1dbb885442", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0addb259-10d1-4120-888b-ca7ae000dbb7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Tue, 14 Jul 2020 17:19:00 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 14 Jul 2020 17:18:59 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82819FFBE88FD", + "Content-Length" : "0", + "x-ms-request-id" : "b2e2badf-b01e-0061-7402-5a100b000000", + "x-ms-client-request-id" : "0addb259-10d1-4120-888b-ca7ae000dbb7" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadincorrectsize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3062524d-62b2-4ecf-8aa6-b0466c650321" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3bcebc16-c01e-006e-3e02-5afdfd000000", + "Body" : "jtcuploadincorrectsizejtcuploadincorrectsize0blobapitestuploadincorrectsize61a372717Tue, 14 Jul 2020 17:18:59 GMT\"0x8D82819FF1A5384\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 14 Jul 2020 17:19:00 GMT", + "x-ms-client-request-id" : "3062524d-62b2-4ecf-8aa6-b0466c650321", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsize61a372717?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf4ee0d9-d744-4434-86cd-d42dae8ef27a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "8f04ebd6-801e-0040-0402-5a7d3a000000", + "Date" : "Tue, 14 Jul 2020 17:19:01 GMT", + "x-ms-client-request-id" : "bf4ee0d9-d744-4434-86cd-d42dae8ef27a" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadincorrectsize0blobapitestuploadincorrectsize61a372717", "javablobuploadincorrectsize192960ae99c1dbb885442" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[1].json new file mode 100644 index 000000000000..37e09ec0556d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[1].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsizec47250537?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3357dd18-4743-45cc-8c81-678638cd39d0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8281A00C3DE5B", + "Last-Modified" : "Tue, 14 Jul 2020 17:19:02 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4e84195f-e01e-009c-5b02-5a2f69000000", + "Date" : "Tue, 14 Jul 2020 17:19:01 GMT", + "x-ms-client-request-id" : "3357dd18-4743-45cc-8c81-678638cd39d0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsizec47250537/javablobuploadincorrectsize105800ad666ed1358e41c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b65064d9-44e9-4637-8afc-f1c27f9f1a99", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Tue, 14 Jul 2020 17:19:02 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 14 Jul 2020 17:19:01 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8281A00F2D3DC", + "Content-Length" : "0", + "x-ms-request-id" : "b9dba07a-101e-000a-1102-5a4d5d000000", + "x-ms-client-request-id" : "b65064d9-44e9-4637-8afc-f1c27f9f1a99" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadincorrectsize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "039695a3-cdd6-4f4f-bf61-0607b7441c14" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "919d11bb-201e-002b-5202-5a206c000000", + "Body" : "jtcuploadincorrectsizejtcuploadincorrectsize0blobapitestuploadincorrectsizec47250537Tue, 14 Jul 2020 17:19:02 GMT\"0x8D8281A00C3DE5B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 14 Jul 2020 17:19:02 GMT", + "x-ms-client-request-id" : "039695a3-cdd6-4f4f-bf61-0607b7441c14", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsizec47250537?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "44c31a46-1731-4413-a8a8-08a3dee3d7c6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "77df9095-901e-0010-4502-5a6232000000", + "Date" : "Tue, 14 Jul 2020 17:19:02 GMT", + "x-ms-client-request-id" : "44c31a46-1731-4413-a8a8-08a3dee3d7c6" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadincorrectsize0blobapitestuploadincorrectsizec47250537", "javablobuploadincorrectsize105800ad666ed1358e41c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[2].json new file mode 100644 index 000000000000..5a5e1216e04b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[2].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsizea0271001d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d37e8d0e-2ed0-4aff-817f-5aecbe772444" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8281A01899BB6", + "Last-Modified" : "Tue, 14 Jul 2020 17:19:03 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "167610af-a01e-0031-6502-5a0f03000000", + "Date" : "Tue, 14 Jul 2020 17:19:03 GMT", + "x-ms-client-request-id" : "d37e8d0e-2ed0-4aff-817f-5aecbe772444" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsizea0271001d/javablobuploadincorrectsize1958500e125872c20b445", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "70a6acea-8a74-46ec-a8bf-dd19d4162bbe", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Tue, 14 Jul 2020 17:19:03 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 14 Jul 2020 17:19:03 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8281A01B9A32A", + "Content-Length" : "0", + "x-ms-request-id" : "d2c931c3-d01e-00f2-7c02-5a8640000000", + "x-ms-client-request-id" : "70a6acea-8a74-46ec-a8bf-dd19d4162bbe" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadincorrectsize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bdd56435-50ac-4727-9134-747e0bed473e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8193fad7-d01e-003e-6d02-5ae2f5000000", + "Body" : "jtcuploadincorrectsizejtcuploadincorrectsize0blobapitestuploadincorrectsizea0271001dTue, 14 Jul 2020 17:19:03 GMT\"0x8D8281A01899BB6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 14 Jul 2020 17:19:03 GMT", + "x-ms-client-request-id" : "bdd56435-50ac-4727-9134-747e0bed473e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsizea0271001d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc682a78-2410-4fa2-b4af-8489aeb9b645" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a98ba26c-301e-013b-0902-5a50df000000", + "Date" : "Tue, 14 Jul 2020 17:19:03 GMT", + "x-ms-client-request-id" : "cc682a78-2410-4fa2-b4af-8489aeb9b645" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadincorrectsize0blobapitestuploadincorrectsizea0271001d", "javablobuploadincorrectsize1958500e125872c20b445" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[3].json new file mode 100644 index 000000000000..8577b8efce5c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlobAPITestuploadincorrectsize[3].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsize427036766?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8df45dbd-50b9-4d73-99b5-bd2404f101e5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8281A023E3FBF", + "Last-Modified" : "Tue, 14 Jul 2020 17:19:04 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "56b2105f-d01e-00d0-0e02-5ae876000000", + "Date" : "Tue, 14 Jul 2020 17:19:04 GMT", + "x-ms-client-request-id" : "8df45dbd-50b9-4d73-99b5-bd2404f101e5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsize427036766/javablobuploadincorrectsize1366272b06ad9df88a401", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f5fdea6-cca6-40d3-b436-202a2cf5b9cc", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Tue, 14 Jul 2020 17:19:04 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Tue, 14 Jul 2020 17:19:04 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8281A0270DF3E", + "Content-Length" : "0", + "x-ms-request-id" : "2f53615d-e01e-003d-0702-5ae1f2000000", + "x-ms-client-request-id" : "9f5fdea6-cca6-40d3-b436-202a2cf5b9cc" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadincorrectsize&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "429137e8-db49-453b-afe9-d423893e0e63" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "09b7b005-401e-009a-1102-5ad811000000", + "Body" : "jtcuploadincorrectsizejtcuploadincorrectsize0blobapitestuploadincorrectsize427036766Tue, 14 Jul 2020 17:19:04 GMT\"0x8D8281A023E3FBF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 14 Jul 2020 17:19:04 GMT", + "x-ms-client-request-id" : "429137e8-db49-453b-afe9-d423893e0e63", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadincorrectsize0blobapitestuploadincorrectsize427036766?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ddecade-681e-4e3b-8085-81c4f82d0b00" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "f65a13c8-701e-00bb-4b02-5ab520000000", + "Date" : "Tue, 14 Jul 2020 17:19:04 GMT", + "x-ms-client-request-id" : "2ddecade-681e-4e3b-8085-81c4f82d0b00" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadincorrectsize0blobapitestuploadincorrectsize427036766", "javablobuploadincorrectsize1366272b06ad9df88a401" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[0].json index 7acff1a27d44..9fa2dbbf55bc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[0].json @@ -1,140 +1,161 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac50b23613?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac8c984986?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "08fcc4d2-a64c-4635-907f-acb0924c0042" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "89b3c232-0a12-45e4-b26d-10a9c9e78192" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF8A10A10", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "ETag" : "0x8D8274D39E8379D", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f1d7-b01e-0049-4cf3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:32 GMT", - "x-ms-client-request-id" : "08fcc4d2-a64c-4635-907f-acb0924c0042" + "x-ms-request-id" : "08a7fa8a-901e-005e-3e36-597a62000000", + "Date" : "Mon, 13 Jul 2020 16:53:10 GMT", + "x-ms-client-request-id" : "89b3c232-0a12-45e4-b26d-10a9c9e78192" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac50b23613/javablobcommitblocklistac1686010183cf0d03db4fde", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac8c984986/javablobcommitblocklistac137522da9b34e1224f4ec7", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a82b985e-225f-4772-bab4-d3c4625cf046", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8912e56c-3279-464d-a228-ccac8a9b1549", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "x-ms-version-id" : "2020-07-13T16:53:11.8192075Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:32 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:10 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF8A86416", + "ETag" : "0x8D8274D3A5EF5CB", "Content-Length" : "0", - "x-ms-request-id" : "ec66f1e1-b01e-0049-55f3-120316000000", - "x-ms-client-request-id" : "a82b985e-225f-4772-bab4-d3c4625cf046" + "x-ms-request-id" : "d390aa63-a01e-0055-8036-598109000000", + "x-ms-client-request-id" : "8912e56c-3279-464d-a228-ccac8a9b1549" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac50b23613/javablobcommitblocklistac20579854a2ab9444a641ad", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac8c984986/javablobcommitblocklistac27066413aa3beddae94ed7", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1df2f54d-6c27-4ce6-ad66-d0c1dd6ecf66", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cab88b77-43af-47eb-ba88-98abd18a10d5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "x-ms-version-id" : "2020-07-13T16:53:12.3956180Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:12 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:32 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:12 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF8AF1C71", + "ETag" : "0x8D8274D3AB6E9D4", "Content-Length" : "0", - "x-ms-request-id" : "ec66f1e8-b01e-0049-5cf3-120316000000", - "x-ms-client-request-id" : "1df2f54d-6c27-4ce6-ad66-d0c1dd6ecf66" + "x-ms-request-id" : "f8b1f81e-c01e-00a7-0236-597940000000", + "x-ms-client-request-id" : "cab88b77-43af-47eb-ba88-98abd18a10d5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac50b23613/javablobcommitblocklistac1686010183cf0d03db4fde?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac8c984986/javablobcommitblocklistac137522da9b34e1224f4ec7?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cfa7c594-bbbe-4db0-93dc-1a27b66507b6", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8dc830f-a54f-4cce-9525-a1c91ed65239", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fd8f94a8-f01e-0093-6136-594a88000000", + "Date" : "Mon, 13 Jul 2020 16:53:12 GMT", + "x-ms-client-request-id" : "c8dc830f-a54f-4cce-9525-a1c91ed65239" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac8c984986/javablobcommitblocklistac137522da9b34e1224f4ec7?comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e4cc657-fe48-4e81-8480-08bd4a07ae7c", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF8B622FF", "x-ms-content-crc64" : "p1vsGtjjPsk=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:13 GMT", + "x-ms-version-id" : "2020-07-13T16:53:13.2162023Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f1f9-b01e-0049-6bf3-120316000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:32 GMT", - "x-ms-client-request-id" : "cfa7c594-bbbe-4db0-93dc-1a27b66507b6" + "Date" : "Mon, 13 Jul 2020 16:53:12 GMT", + "ETag" : "0x8D8274D3B33F8D7", + "Content-Length" : "0", + "x-ms-request-id" : "81b685c8-901e-004e-1636-59bf0a000000", + "x-ms-client-request-id" : "3e4cc657-fe48-4e81-8480-08bd4a07ae7c" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b78363ae-b330-4c3d-b691-b91fba2ff1bb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c246da24-4bb3-4afb-b561-d485a9e756c8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f202-b01e-0049-74f3-120316000000", - "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistac50b23613Wed, 15 Apr 2020 07:02:33 GMT\"0x8D7E10AF8A10A10\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "b78363ae-b330-4c3d-b691-b91fba2ff1bb", + "x-ms-request-id" : "7df09167-a01e-0045-1636-594461000000", + "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistac8c984986Mon, 13 Jul 2020 16:53:11 GMT\"0x8D8274D39E8379D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:13 GMT", + "x-ms-client-request-id" : "c246da24-4bb3-4afb-b561-d485a9e756c8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac50b23613?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac8c984986?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ada51abb-d4e4-40e1-8473-56f46689b346" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aba00813-8218-4408-8f14-18ca33ca2aa0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f20b-b01e-0049-7df3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "ada51abb-d4e4-40e1-8473-56f46689b346" + "x-ms-request-id" : "fa1a079a-401e-0000-2536-599182000000", + "Date" : "Mon, 13 Jul 2020 16:53:13 GMT", + "x-ms-client-request-id" : "aba00813-8218-4408-8f14-18ca33ca2aa0" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistac50b23613", "javablobcommitblocklistac1686010183cf0d03db4fde", "javablobcommitblocklistac20579854a2ab9444a641ad" ] + "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistac8c984986", "javablobcommitblocklistac137522da9b34e1224f4ec7", "javablobcommitblocklistac27066413aa3beddae94ed7" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[1].json index 590e1710e645..85aa99801535 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[1].json @@ -1,140 +1,161 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacea173682?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac27e72928?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6f5fcd31-0cf6-4763-84ac-56b9a6c3360f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4084856e-f85c-4e51-84cf-20805dc47faa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF8CC1C0B", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "ETag" : "0x8D8274D3C078048", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f21e-b01e-0049-0cf3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "6f5fcd31-0cf6-4763-84ac-56b9a6c3360f" + "x-ms-request-id" : "a68376a4-701e-000b-6736-596ae9000000", + "Date" : "Mon, 13 Jul 2020 16:53:14 GMT", + "x-ms-client-request-id" : "4084856e-f85c-4e51-84cf-20805dc47faa" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacea173682/javablobcommitblocklistac130484127cf7de8a3e4eb7", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac27e72928/javablobcommitblocklistac1975753a72a93f40ed46dd", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "45639eef-804b-4064-8c12-c041b1596165", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d3b657a2-c9b7-485e-bd05-5e3f4f0cd9be", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "x-ms-version-id" : "2020-07-13T16:53:14.9614457Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:14 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:14 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF8D3C430", + "ETag" : "0x8D8274D3C3E6D79", "Content-Length" : "0", - "x-ms-request-id" : "ec66f22f-b01e-0049-19f3-120316000000", - "x-ms-client-request-id" : "45639eef-804b-4064-8c12-c041b1596165" + "x-ms-request-id" : "55b0515f-d01e-0002-6e36-592f3a000000", + "x-ms-client-request-id" : "d3b657a2-c9b7-485e-bd05-5e3f4f0cd9be" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacea173682/javablobcommitblocklistac2037729194aa66137f43fe", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac27e72928/javablobcommitblocklistac278238997463a67dad455b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "04868f6e-3770-4d46-aad9-26edb265d7ba", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6bde14c9-8592-4abd-9abf-fbf8cba5ad69", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "x-ms-version-id" : "2020-07-13T16:53:15.3667350Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:15 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:15 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF8DB4011", + "ETag" : "0x8D8274D3C7C4516", "Content-Length" : "0", - "x-ms-request-id" : "ec66f238-b01e-0049-20f3-120316000000", - "x-ms-client-request-id" : "04868f6e-3770-4d46-aad9-26edb265d7ba" + "x-ms-request-id" : "db62ffaf-801e-006d-3536-5925c9000000", + "x-ms-client-request-id" : "6bde14c9-8592-4abd-9abf-fbf8cba5ad69" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacea173682/javablobcommitblocklistac130484127cf7de8a3e4eb7?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac27e72928/javablobcommitblocklistac1975753a72a93f40ed46dd?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aed13ce7-9136-448e-a0d7-dc42d7c81db5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a30b613c-da91-4445-a893-8f763e068465", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "e1cad795-d01e-004f-5b36-59e0d6000000", + "Date" : "Mon, 13 Jul 2020 16:53:15 GMT", + "x-ms-client-request-id" : "a30b613c-da91-4445-a893-8f763e068465" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac27e72928/javablobcommitblocklistac1975753a72a93f40ed46dd?comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f3a35a1-8d4a-4fee-99d9-acf543e1f53c", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF8E2BBE8", "x-ms-content-crc64" : "p1vsGtjjPsk=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:16 GMT", + "x-ms-version-id" : "2020-07-13T16:53:16.0432162Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f245-b01e-0049-2bf3-120316000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "aed13ce7-9136-448e-a0d7-dc42d7c81db5" + "Date" : "Mon, 13 Jul 2020 16:53:15 GMT", + "ETag" : "0x8D8274D3CE35712", + "Content-Length" : "0", + "x-ms-request-id" : "64093263-301e-0047-5836-59fad9000000", + "x-ms-client-request-id" : "7f3a35a1-8d4a-4fee-99d9-acf543e1f53c" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0a7d24fd-cace-47cc-a194-b29564776d1d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9dc60e03-62ca-4b57-ab7d-2b2ef4f3ad3a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f252-b01e-0049-37f3-120316000000", - "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistacea173682Wed, 15 Apr 2020 07:02:33 GMT\"0x8D7E10AF8CC1C0B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "0a7d24fd-cace-47cc-a194-b29564776d1d", + "x-ms-request-id" : "c180fa11-a01e-008e-2a36-594734000000", + "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistac27e72928Mon, 13 Jul 2020 16:53:14 GMT\"0x8D8274D3C078048\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:15 GMT", + "x-ms-client-request-id" : "9dc60e03-62ca-4b57-ab7d-2b2ef4f3ad3a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacea173682?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac27e72928?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0ffe84f6-2033-4e0b-acdd-b2a57dd09029" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "900f2e0b-04e7-47b5-aa45-c8000a735f42" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f262-b01e-0049-43f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "0ffe84f6-2033-4e0b-acdd-b2a57dd09029" + "x-ms-request-id" : "2e3123df-101e-000d-6b36-595956000000", + "Date" : "Mon, 13 Jul 2020 16:53:16 GMT", + "x-ms-client-request-id" : "900f2e0b-04e7-47b5-aa45-c8000a735f42" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistacea173682", "javablobcommitblocklistac130484127cf7de8a3e4eb7", "javablobcommitblocklistac2037729194aa66137f43fe" ] + "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistac27e72928", "javablobcommitblocklistac1975753a72a93f40ed46dd", "javablobcommitblocklistac278238997463a67dad455b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[2].json index a5026c0744d8..301c4b1eb020 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[2].json @@ -1,140 +1,161 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacd2c78879?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac77632135?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "17c3ff87-b3ad-4cd4-bab1-eb86155ac7ad" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a75922ef-5442-4247-8898-929810eefb45" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF8F9C6B4", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "ETag" : "0x8D8274D3D7D98A2", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:17 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f278-b01e-0049-56f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "17c3ff87-b3ad-4cd4-bab1-eb86155ac7ad" + "x-ms-request-id" : "8f7dba93-e01e-0054-3936-59ded5000000", + "Date" : "Mon, 13 Jul 2020 16:53:16 GMT", + "x-ms-client-request-id" : "a75922ef-5442-4247-8898-929810eefb45" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacd2c78879/javablobcommitblocklistac187854de15fb444ca841cd", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac77632135/javablobcommitblocklistac1269586a8934392b4a4482", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fb68d2b9-f8df-4512-b81b-e14d43bf7aaa", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4512391b-28f6-4d2c-91a2-09e9feb10209", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:33 GMT", + "x-ms-version-id" : "2020-07-13T16:53:17.3831716Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:17 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:16 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF90147B5", + "ETag" : "0x8D8274D3DAFF424", "Content-Length" : "0", - "x-ms-request-id" : "ec66f292-b01e-0049-69f3-120316000000", - "x-ms-client-request-id" : "fb68d2b9-f8df-4512-b81b-e14d43bf7aaa" + "x-ms-request-id" : "1a105554-501e-0023-5636-590b41000000", + "x-ms-client-request-id" : "4512391b-28f6-4d2c-91a2-09e9feb10209" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacd2c78879/javablobcommitblocklistac26709579fed985dc514656", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac77632135/javablobcommitblocklistac218422bdd23208ebb04ca8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "19d3ef7a-7a26-4749-9086-085b11e387ce", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fb014fd-26bd-40fe-ae12-c48367a6546c", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "x-ms-version-id" : "2020-07-13T16:53:17.7284168Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:17 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:16 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF908272C", + "ETag" : "0x8D8274D3DE47B2B", "Content-Length" : "0", - "x-ms-request-id" : "ec66f2a9-b01e-0049-7af3-120316000000", - "x-ms-client-request-id" : "19d3ef7a-7a26-4749-9086-085b11e387ce" + "x-ms-request-id" : "dbb5b502-301e-001a-3936-59f05d000000", + "x-ms-client-request-id" : "0fb014fd-26bd-40fe-ae12-c48367a6546c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacd2c78879/javablobcommitblocklistac187854de15fb444ca841cd?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac77632135/javablobcommitblocklistac1269586a8934392b4a4482?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e512d91c-1948-447a-b052-82e673cf09d1", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c08b5a04-5d33-4194-9683-477d50b53efb", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "cb882f2a-d01e-0060-1136-59ed1d000000", + "Date" : "Mon, 13 Jul 2020 16:53:17 GMT", + "x-ms-client-request-id" : "c08b5a04-5d33-4194-9683-477d50b53efb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac77632135/javablobcommitblocklistac1269586a8934392b4a4482?comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "319f9f7d-d021-4314-b9ee-780d2a5c58d3", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF90F7BED", "x-ms-content-crc64" : "p1vsGtjjPsk=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:18 GMT", + "x-ms-version-id" : "2020-07-13T16:53:18.3998943Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f2ba-b01e-0049-07f3-120316000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "e512d91c-1948-447a-b052-82e673cf09d1" + "Date" : "Mon, 13 Jul 2020 16:53:18 GMT", + "ETag" : "0x8D8274D3E4AC9B1", + "Content-Length" : "0", + "x-ms-request-id" : "c2018f01-c01e-006c-3d36-597a15000000", + "x-ms-client-request-id" : "319f9f7d-d021-4314-b9ee-780d2a5c58d3" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2eba2a50-edca-424b-960c-3ce83fd340e1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d0404ace-3245-44be-b027-d4ba60b12279" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f2db-b01e-0049-26f3-120316000000", - "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistacd2c78879Wed, 15 Apr 2020 07:02:33 GMT\"0x8D7E10AF8F9C6B4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "2eba2a50-edca-424b-960c-3ce83fd340e1", + "x-ms-request-id" : "225b4a2d-b01e-003b-7936-59d426000000", + "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistac77632135Mon, 13 Jul 2020 16:53:17 GMT\"0x8D8274D3D7D98A2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:18 GMT", + "x-ms-client-request-id" : "d0404ace-3245-44be-b027-d4ba60b12279", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacd2c78879?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac77632135?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3d374b85-7545-4af3-b335-5fc8e7dcec59" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b4f5e95-76d4-421e-9781-95826437786f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f2e6-b01e-0049-30f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "3d374b85-7545-4af3-b335-5fc8e7dcec59" + "x-ms-request-id" : "0ee01c23-301e-000a-2e36-593535000000", + "Date" : "Mon, 13 Jul 2020 16:53:19 GMT", + "x-ms-client-request-id" : "6b4f5e95-76d4-421e-9781-95826437786f" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistacd2c78879", "javablobcommitblocklistac187854de15fb444ca841cd", "javablobcommitblocklistac26709579fed985dc514656" ] + "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistac77632135", "javablobcommitblocklistac1269586a8934392b4a4482", "javablobcommitblocklistac218422bdd23208ebb04ca8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[3].json index e1e59d7e5c62..84bc657b0296 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[3].json @@ -1,172 +1,195 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6091952?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac84954981?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2c094b35-ec1d-4d9c-a9e9-f7d7301fd44e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7403efb7-b30d-47e4-9301-8f1481bf32a1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF926117B", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "ETag" : "0x8D8274D3EEAD860", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f2f5-b01e-0049-3ff3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "2c094b35-ec1d-4d9c-a9e9-f7d7301fd44e" + "x-ms-request-id" : "26540319-701e-008d-6636-59a650000000", + "Date" : "Mon, 13 Jul 2020 16:53:19 GMT", + "x-ms-client-request-id" : "7403efb7-b30d-47e4-9301-8f1481bf32a1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6091952/javablobcommitblocklistac134639435920e5f96a4a34", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac84954981/javablobcommitblocklistac158899e267e53296f24436", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ed5d9276-2233-482a-adb0-4c352ed4bcd9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4836975-e88f-42cf-8b73-3eac727f733e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "x-ms-version-id" : "2020-07-13T16:53:19.7978844Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:19 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:19 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF92E55F2", + "ETag" : "0x8D8274D3F2068DC", "Content-Length" : "0", - "x-ms-request-id" : "ec66f302-b01e-0049-48f3-120316000000", - "x-ms-client-request-id" : "ed5d9276-2233-482a-adb0-4c352ed4bcd9" + "x-ms-request-id" : "4ae66cc3-701e-0034-5336-59a24a000000", + "x-ms-client-request-id" : "c4836975-e88f-42cf-8b73-3eac727f733e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6091952/javablobcommitblocklistac280615048bc217962e4866", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac84954981/javablobcommitblocklistac27011777042ff84c204d33", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4b8e9a10-a924-416c-a086-007c5eccac70", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f80f965d-9cca-4e50-af3d-197a43e235aa", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "x-ms-version-id" : "2020-07-13T16:53:20.1481329Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:20 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:19 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF9358392", + "ETag" : "0x8D8274D3F55DA71", "Content-Length" : "0", - "x-ms-request-id" : "ec66f30f-b01e-0049-52f3-120316000000", - "x-ms-client-request-id" : "4b8e9a10-a924-416c-a086-007c5eccac70" + "x-ms-request-id" : "104f5529-201e-004b-7e36-596dd1000000", + "x-ms-client-request-id" : "f80f965d-9cca-4e50-af3d-197a43e235aa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac84954981/javablobcommitblocklistac158899e267e53296f24436?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a2df297d-1417-4707-a995-5f3669d5486d", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "63b01ef8-601e-0091-3a36-59f430000000", + "Date" : "Mon, 13 Jul 2020 16:53:20 GMT", + "x-ms-client-request-id" : "a2df297d-1417-4707-a995-5f3669d5486d" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6091952/javablobcommitblocklistac134639435920e5f96a4a34", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac84954981/javablobcommitblocklistac158899e267e53296f24436", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27641fa5-a55d-4444-b1ac-7842e1503e15" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "998f8fba-446d-4817-885e-e62aded6b18f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "x-ms-version-id" : "2020-07-13T16:53:19.7978844Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:19 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:20 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10AF92E55F2", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:02:34 GMT", + "ETag" : "0x8D8274D3F2068DC", + "x-ms-creation-time" : "Mon, 13 Jul 2020 16:53:19 GMT", "Content-Length" : "7", - "x-ms-request-id" : "ec66f31d-b01e-0049-5ff3-120316000000", - "x-ms-client-request-id" : "27641fa5-a55d-4444-b1ac-7842e1503e15", + "x-ms-request-id" : "0cc38a0b-001e-00a8-0c36-590f2c000000", + "x-ms-client-request-id" : "998f8fba-446d-4817-885e-e62aded6b18f", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6091952/javablobcommitblocklistac134639435920e5f96a4a34?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac84954981/javablobcommitblocklistac158899e267e53296f24436?comp=blocklist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2709107e-5858-42fa-8d37-a65995365060", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e38f43a4-a73b-463d-b5e3-b821f8645315", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF94713F7", "x-ms-content-crc64" : "p1vsGtjjPsk=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:21 GMT", + "x-ms-version-id" : "2020-07-13T16:53:21.2609258Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f32d-b01e-0049-6df3-120316000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "2709107e-5858-42fa-8d37-a65995365060" + "Date" : "Mon, 13 Jul 2020 16:53:21 GMT", + "ETag" : "0x8D8274D3FFF7FDA", + "Content-Length" : "0", + "x-ms-request-id" : "f83b59f0-601e-0007-6536-59fde1000000", + "x-ms-client-request-id" : "e38f43a4-a73b-463d-b5e3-b821f8645315" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "08edb74f-1f84-4e0f-83ee-39a1c1ca0ac9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a72e84a1-e97a-47d4-8b8d-5ac9d86a5b5a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f341-b01e-0049-7ef3-120316000000", - "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistacb6091952Wed, 15 Apr 2020 07:02:34 GMT\"0x8D7E10AF926117B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:33 GMT", - "x-ms-client-request-id" : "08edb74f-1f84-4e0f-83ee-39a1c1ca0ac9", + "x-ms-request-id" : "08974868-d01e-0012-3a36-59ea52000000", + "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistac84954981Mon, 13 Jul 2020 16:53:19 GMT\"0x8D8274D3EEAD860\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:21 GMT", + "x-ms-client-request-id" : "a72e84a1-e97a-47d4-8b8d-5ac9d86a5b5a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6091952?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac84954981?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "98ead9b3-4f67-49c8-b87d-9029d7f3e236" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "04a9ba92-8fcc-444d-ad1c-1c3df5cc1401" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f351-b01e-0049-0af3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "98ead9b3-4f67-49c8-b87d-9029d7f3e236" + "x-ms-request-id" : "56acc23e-f01e-002a-3e36-594e92000000", + "Date" : "Mon, 13 Jul 2020 16:53:21 GMT", + "x-ms-client-request-id" : "04a9ba92-8fcc-444d-ad1c-1c3df5cc1401" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistacb6091952", "javablobcommitblocklistac134639435920e5f96a4a34", "javablobcommitblocklistac280615048bc217962e4866" ] + "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistac84954981", "javablobcommitblocklistac158899e267e53296f24436", "javablobcommitblocklistac27011777042ff84c204d33" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[4].json index b1ac9db86df2..e46e33bd779b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[4].json @@ -1,140 +1,161 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6516803?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac7b840066?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "918588d8-4f9d-4f22-a58d-ca1209ab13fc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "67da5b37-0d93-4e2f-86ab-bad8958f4dc1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF95FA5E1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "ETag" : "0x8D8274D40A75F6E", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f367-b01e-0049-18f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "918588d8-4f9d-4f22-a58d-ca1209ab13fc" + "x-ms-request-id" : "8edae3b7-301e-00a3-4236-59f447000000", + "Date" : "Mon, 13 Jul 2020 16:53:21 GMT", + "x-ms-client-request-id" : "67da5b37-0d93-4e2f-86ab-bad8958f4dc1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6516803/javablobcommitblocklistac198667b11fa61ff15b4b98", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac7b840066/javablobcommitblocklistac195968fb7aa41391e04c89", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1e551fe9-a8d5-4232-878e-9dd72d8f40c2", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee6b191f-42fd-4ef3-8f5b-cc3cf627e7cc", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "x-ms-version-id" : "2020-07-13T16:53:22.7299725Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:22 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:22 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF967C327", + "ETag" : "0x8D8274D40DFCF8D", "Content-Length" : "0", - "x-ms-request-id" : "ec66f378-b01e-0049-25f3-120316000000", - "x-ms-client-request-id" : "1e551fe9-a8d5-4232-878e-9dd72d8f40c2" + "x-ms-request-id" : "ef33af7a-901e-0095-7036-597937000000", + "x-ms-client-request-id" : "ee6b191f-42fd-4ef3-8f5b-cc3cf627e7cc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6516803/javablobcommitblocklistac277379cc52c3d123794ec3", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac7b840066/javablobcommitblocklistac2497292790971757534e8c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a6f4fa3c-4d04-443c-9aee-bda3ce255ec0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16810bd2-e583-42ad-b4dc-bae2223ecb1f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "x-ms-version-id" : "2020-07-13T16:53:23.0792205Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:23 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:22 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF973ACE5", + "ETag" : "0x8D8274D41151A0D", "Content-Length" : "0", - "x-ms-request-id" : "ec66f391-b01e-0049-36f3-120316000000", - "x-ms-client-request-id" : "a6f4fa3c-4d04-443c-9aee-bda3ce255ec0" + "x-ms-request-id" : "55b06272-d01e-0002-1736-592f3a000000", + "x-ms-client-request-id" : "16810bd2-e583-42ad-b4dc-bae2223ecb1f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6516803/javablobcommitblocklistac198667b11fa61ff15b4b98?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac7b840066/javablobcommitblocklistac195968fb7aa41391e04c89?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "df6b2b57-67b2-4924-939f-253c23f4d9bc", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "70535ed2-e696-4aa6-a1e4-a874233e21b8", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "b36b79c0-701e-00a2-1a36-59ab9b000000", + "Date" : "Mon, 13 Jul 2020 16:53:22 GMT", + "x-ms-client-request-id" : "70535ed2-e696-4aa6-a1e4-a874233e21b8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac7b840066/javablobcommitblocklistac195968fb7aa41391e04c89?comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3fadfa8d-a2a9-4428-9841-af52b6cf623a", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF97E5DCE", "x-ms-content-crc64" : "p1vsGtjjPsk=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:23 GMT", + "x-ms-version-id" : "2020-07-13T16:53:23.7897256Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f3a8-b01e-0049-49f3-120316000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "df6b2b57-67b2-4924-939f-253c23f4d9bc" + "Date" : "Mon, 13 Jul 2020 16:53:23 GMT", + "ETag" : "0x8D8274D41815D18", + "Content-Length" : "0", + "x-ms-request-id" : "c2cec16c-a01e-007a-6336-598cc2000000", + "x-ms-client-request-id" : "3fadfa8d-a2a9-4428-9841-af52b6cf623a" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b238566f-8a09-4635-90be-900c0e9559a5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "60a44ac9-8a47-4fec-8dc6-b68306e4eace" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f3c4-b01e-0049-60f3-120316000000", - "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistacb6516803Wed, 15 Apr 2020 07:02:34 GMT\"0x8D7E10AF95FA5E1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "b238566f-8a09-4635-90be-900c0e9559a5", + "x-ms-request-id" : "2219e9db-a01e-00a1-7e36-594aff000000", + "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistac7b840066Mon, 13 Jul 2020 16:53:22 GMT\"0x8D8274D40A75F6E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:24 GMT", + "x-ms-client-request-id" : "60a44ac9-8a47-4fec-8dc6-b68306e4eace", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistacb6516803?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac7b840066?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "04fec5b9-5b1b-46d1-b472-03e1a4b7fe8f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7890eea6-0603-4764-85d1-c5c2f4f8c919" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f3d4-b01e-0049-6ff3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "04fec5b9-5b1b-46d1-b472-03e1a4b7fe8f" + "x-ms-request-id" : "db6310e0-801e-006d-5136-5925c9000000", + "Date" : "Mon, 13 Jul 2020 16:53:24 GMT", + "x-ms-client-request-id" : "7890eea6-0603-4764-85d1-c5c2f4f8c919" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistacb6516803", "javablobcommitblocklistac198667b11fa61ff15b4b98", "javablobcommitblocklistac277379cc52c3d123794ec3" ] + "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistac7b840066", "javablobcommitblocklistac195968fb7aa41391e04c89", "javablobcommitblocklistac2497292790971757534e8c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[5].json index c764430549ad..323805427cc8 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[5].json @@ -1,162 +1,183 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac3e165999?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8266062?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "78cc8fef-4b49-4d22-a192-8933a69a2c97" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a6113d9-94ad-4371-9733-cc7ee6ca822a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF9962C5E", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:34 GMT", + "ETag" : "0x8D8274D4222F494", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:24 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f3ec-b01e-0049-01f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "78cc8fef-4b49-4d22-a192-8933a69a2c97" + "x-ms-request-id" : "15651ef9-b01e-0066-0b36-59dea2000000", + "Date" : "Mon, 13 Jul 2020 16:53:24 GMT", + "x-ms-client-request-id" : "0a6113d9-94ad-4371-9733-cc7ee6ca822a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac3e165999/javablobcommitblocklistac165865895ca8f807be492e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8266062/javablobcommitblocklistac160049d96543543aa44af7", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ce15ef9a-49d4-4b7c-b2bb-2ce00bacda48", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae5ff1a8-2e93-4007-a17e-ceae051064f0", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "x-ms-version-id" : "2020-07-13T16:53:25.2177437Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:25 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF99DFB4B", + "ETag" : "0x8D8274D425B6A1D", "Content-Length" : "0", - "x-ms-request-id" : "ec66f3fa-b01e-0049-0bf3-120316000000", - "x-ms-client-request-id" : "ce15ef9a-49d4-4b7c-b2bb-2ce00bacda48" + "x-ms-request-id" : "8dd3f33d-e01e-00a0-5136-591523000000", + "x-ms-client-request-id" : "ae5ff1a8-2e93-4007-a17e-ceae051064f0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac3e165999/javablobcommitblocklistac2004149b2c3d5360c44b9d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8266062/javablobcommitblocklistac21097475020572283443df", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7322a0be-065d-428c-8a92-c389d8a6f7d4", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c201b95-a259-46a5-9be4-f59587f7dffe", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "x-ms-version-id" : "2020-07-13T16:53:25.5459770Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:25 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF9A5C55A", + "ETag" : "0x8D8274D428D58A1", "Content-Length" : "0", - "x-ms-request-id" : "ec66f405-b01e-0049-11f3-120316000000", - "x-ms-client-request-id" : "7322a0be-065d-428c-8a92-c389d8a6f7d4" + "x-ms-request-id" : "58ceef31-c01e-0031-0636-597091000000", + "x-ms-client-request-id" : "4c201b95-a259-46a5-9be4-f59587f7dffe" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac3e165999/javablobcommitblocklistac165865895ca8f807be492e?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8266062/javablobcommitblocklistac160049d96543543aa44af7?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "270fad5c-e3bc-44c6-8552-6451411163a4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ee4a81e-fbd9-4181-a259-b310a4b33d32", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c18108fd-a01e-008e-7036-594734000000", + "Date" : "Mon, 13 Jul 2020 16:53:25 GMT", + "x-ms-client-request-id" : "4ee4a81e-fbd9-4181-a259-b310a4b33d32" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8266062/javablobcommitblocklistac160049d96543543aa44af7?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6b03da3-7e52-4bba-86cb-92c3975524fa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF99DFB4B", - "x-ms-lease-id" : "d2bd0d68-3bdc-4847-820d-2231a02d047e", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "ETag" : "0x8D8274D425B6A1D", + "x-ms-lease-id" : "66c4e3f7-c84e-4b64-83f7-6cdde812d3a1", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f41f-b01e-0049-23f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "270fad5c-e3bc-44c6-8552-6451411163a4" + "x-ms-request-id" : "b29d8b89-401e-00a9-3336-5950f0000000", + "Date" : "Mon, 13 Jul 2020 16:53:25 GMT", + "x-ms-client-request-id" : "b6b03da3-7e52-4bba-86cb-92c3975524fa" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac3e165999/javablobcommitblocklistac165865895ca8f807be492e?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8266062/javablobcommitblocklistac160049d96543543aa44af7?comp=blocklist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e6208b9d-183a-49be-9a1d-f3a6af097404", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a103d1d2-4c9e-444d-8b71-329d0039bd95", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF9B3F98C", "x-ms-content-crc64" : "p1vsGtjjPsk=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:26 GMT", + "x-ms-version-id" : "2020-07-13T16:53:26.6717780Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f42d-b01e-0049-2df3-120316000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "e6208b9d-183a-49be-9a1d-f3a6af097404" + "Date" : "Mon, 13 Jul 2020 16:53:25 GMT", + "ETag" : "0x8D8274D43392144", + "Content-Length" : "0", + "x-ms-request-id" : "f88c9a3d-e01e-0009-2736-59d451000000", + "x-ms-client-request-id" : "a103d1d2-4c9e-444d-8b71-329d0039bd95" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "66981f37-1845-48ce-9b4d-e7dc007571da" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e357b715-035a-4d0e-8c27-18c9b94dd093" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f43f-b01e-0049-3cf3-120316000000", - "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistac3e165999Wed, 15 Apr 2020 07:02:34 GMT\"0x8D7E10AF9962C5E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "66981f37-1845-48ce-9b4d-e7dc007571da", + "x-ms-request-id" : "824a27fb-001e-003e-3f36-5906fd000000", + "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistace8266062Mon, 13 Jul 2020 16:53:24 GMT\"0x8D8274D4222F494\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:26 GMT", + "x-ms-client-request-id" : "e357b715-035a-4d0e-8c27-18c9b94dd093", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistac3e165999?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8266062?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4498b894-edb3-4e35-901f-be13cd117cb0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d59fdd83-09f5-42b3-8752-e3a44d32e3b3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f44e-b01e-0049-48f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "4498b894-edb3-4e35-901f-be13cd117cb0" + "x-ms-request-id" : "a1a8d571-801e-000f-3636-59e7ee000000", + "Date" : "Mon, 13 Jul 2020 16:53:27 GMT", + "x-ms-client-request-id" : "d59fdd83-09f5-42b3-8752-e3a44d32e3b3" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistac3e165999", "javablobcommitblocklistac165865895ca8f807be492e", "javablobcommitblocklistac2004149b2c3d5360c44b9d" ] + "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistace8266062", "javablobcommitblocklistac160049d96543543aa44af7", "javablobcommitblocklistac21097475020572283443df" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[6].json new file mode 100644 index 000000000000..5a035abe5e67 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistac[6].json @@ -0,0 +1,161 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8d28856?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e8d488ef-4008-47d6-b5a3-1e9f9b609d26" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274D43DF2717", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7688426d-601e-0081-2836-593158000000", + "Date" : "Mon, 13 Jul 2020 16:53:27 GMT", + "x-ms-client-request-id" : "e8d488ef-4008-47d6-b5a3-1e9f9b609d26" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8d28856/javablobcommitblocklistac1184280b7a44b127474217", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c04ff0c8-ed0d-4e1b-8d7d-c229996dd8ab", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:53:28.1118043Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:53:27 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D4415035B", + "Content-Length" : "0", + "x-ms-request-id" : "36b7bd71-101e-001d-4036-599c3e000000", + "x-ms-client-request-id" : "c04ff0c8-ed0d-4e1b-8d7d-c229996dd8ab" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8d28856/javablobcommitblocklistac233691d2b7d86e848c4737", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "610d96f5-e019-44cc-a9e3-8e7b62902947", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:53:28.4790669Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:53:27 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D444D0D8D", + "Content-Length" : "0", + "x-ms-request-id" : "da511a0a-201e-0029-5936-59aff6000000", + "x-ms-client-request-id" : "610d96f5-e019-44cc-a9e3-8e7b62902947" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8d28856/javablobcommitblocklistac1184280b7a44b127474217?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23805057-68ab-4688-b5b1-0e6058996d5c", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "f4062bd3-001e-0073-7636-59c911000000", + "Date" : "Mon, 13 Jul 2020 16:53:28 GMT", + "x-ms-client-request-id" : "23805057-68ab-4688-b5b1-0e6058996d5c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8d28856/javablobcommitblocklistac1184280b7a44b127474217?comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef672826-006d-4dd8-883d-a199d651bc21", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "p1vsGtjjPsk=", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:29 GMT", + "x-ms-version-id" : "2020-07-13T16:53:29.1155192Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:53:28 GMT", + "ETag" : "0x8D8274D44ADDCCA", + "Content-Length" : "0", + "x-ms-request-id" : "765de874-801e-0030-2236-592f4d000000", + "x-ms-client-request-id" : "ef672826-006d-4dd8-883d-a199d651bc21" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5681fe82-2f3d-4a0e-9ddf-db96d13508bc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8dfcee17-501e-0051-1036-590c0e000000", + "Body" : "jtccommitblocklistacjtccommitblocklistac0blockblobapitestcommitblocklistace8d28856Mon, 13 Jul 2020 16:53:27 GMT\"0x8D8274D43DF2717\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:29 GMT", + "x-ms-client-request-id" : "5681fe82-2f3d-4a0e-9ddf-db96d13508bc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistac0blockblobapitestcommitblocklistace8d28856?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "502f421a-98be-4dfc-864f-387d48ffb808" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "222c8822-101e-009b-2e36-595087000000", + "Date" : "Mon, 13 Jul 2020 16:53:29 GMT", + "x-ms-client-request-id" : "502f421a-98be-4dfc-864f-387d48ffb808" + }, + "Exception" : null + } ], + "variables" : [ "jtccommitblocklistac0blockblobapitestcommitblocklistace8d28856", "javablobcommitblocklistac1184280b7a44b127474217", "javablobcommitblocklistac233691d2b7d86e848c4737" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[0].json index 929438e1ef4b..a3715758c956 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[0].json @@ -1,95 +1,97 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail079165cc158f0638f148aa?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail051802644123e674df4f75?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f8e55bd9-58df-4f4f-9541-e50c7203cbca" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "247d18b6-0079-4bd3-ae07-3879b3cf707b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF9CD00F6", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "ETag" : "0x8D8274D4BBDC601", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f45d-b01e-0049-52f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "f8e55bd9-58df-4f4f-9541-e50c7203cbca" + "x-ms-request-id" : "a78c25a3-501e-008a-6a36-59ca33000000", + "Date" : "Mon, 13 Jul 2020 16:53:40 GMT", + "x-ms-client-request-id" : "247d18b6-0079-4bd3-ae07-3879b3cf707b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail079165cc158f0638f148aa/javablobcommitblocklistacfail1821765321593a505f4b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail051802644123e674df4f75/javablobcommitblocklistacfail1822326dada410b3db4a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1306873f-2175-4a35-95cf-a92309f7c456", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5c9ddbd0-02a3-4cc3-8030-7dfb75574bd4", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "x-ms-version-id" : "2020-07-13T16:53:41.5293600Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:41 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF9D54522", + "ETag" : "0x8D8274D4C145EA0", "Content-Length" : "0", - "x-ms-request-id" : "ec66f468-b01e-0049-5bf3-120316000000", - "x-ms-client-request-id" : "1306873f-2175-4a35-95cf-a92309f7c456" + "x-ms-request-id" : "4ae68cff-701e-0034-5636-59a24a000000", + "x-ms-client-request-id" : "5c9ddbd0-02a3-4cc3-8030-7dfb75574bd4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail079165cc158f0638f148aa/javablobcommitblocklistacfail2392878f8064830cdb4d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail051802644123e674df4f75/javablobcommitblocklistacfail207590cc7242b0042347", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2ab9adfe-b767-486c-ace5-a2b400d32ae3", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "903ae2bd-8868-4d8c-a17b-235c1fb12b7e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "x-ms-version-id" : "2020-07-13T16:53:41.9776797Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:41 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AF9DDD2AD", + "ETag" : "0x8D8274D4C58C71D", "Content-Length" : "0", - "x-ms-request-id" : "ec66f474-b01e-0049-63f3-120316000000", - "x-ms-client-request-id" : "2ab9adfe-b767-486c-ace5-a2b400d32ae3" + "x-ms-request-id" : "1ef7e00a-801e-007d-3636-59e0a1000000", + "x-ms-client-request-id" : "903ae2bd-8868-4d8c-a17b-235c1fb12b7e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail079165cc158f0638f148aa/javablobcommitblocklistacfail1821765321593a505f4b?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail051802644123e674df4f75/javablobcommitblocklistacfail1822326dada410b3db4a?comp=blocklist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "97ef5f9b-6794-4f59-a44e-33628f3adfed", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b027b883-42ce-4109-8bde-d40a8f95296c", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "ec66f482-b01e-0049-6df3-120316000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:ec66f482-b01e-0049-6df3-120316000000\nTime:2020-04-15T07:02:35.4700498Z", - "Date" : "Wed, 15 Apr 2020 07:02:34 GMT", - "x-ms-client-request-id" : "97ef5f9b-6794-4f59-a44e-33628f3adfed", + "x-ms-request-id" : "af1fefd9-b01e-0076-1736-591bca000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:af1fefd9-b01e-0076-1736-591bca000000\nTime:2020-07-13T16:53:42.3863571Z", + "Date" : "Mon, 13 Jul 2020 16:53:41 GMT", + "x-ms-client-request-id" : "b027b883-42ce-4109-8bde-d40a8f95296c", "Content-Type" : "application/xml" }, "Exception" : null @@ -97,43 +99,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "11a4b030-52ae-42b6-9462-ffeeff6d00b2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "79bd1a7f-cb97-49ab-9dc9-905220af26d7" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f48b-b01e-0049-76f3-120316000000", - "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail079165cc158f0638f148aaWed, 15 Apr 2020 07:02:35 GMT\"0x8D7E10AF9CD00F6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "11a4b030-52ae-42b6-9462-ffeeff6d00b2", + "x-ms-request-id" : "2fbce69f-c01e-0098-2036-59b1e3000000", + "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail051802644123e674df4f75Mon, 13 Jul 2020 16:53:40 GMT\"0x8D8274D4BBDC601\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:42 GMT", + "x-ms-client-request-id" : "79bd1a7f-cb97-49ab-9dc9-905220af26d7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail079165cc158f0638f148aa?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail051802644123e674df4f75?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e7626ae8-ff90-49f7-a3f6-781deeb50d1b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c2dc81e-ab9d-49b0-aded-b795150e0b31" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f493-b01e-0049-7ef3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "e7626ae8-ff90-49f7-a3f6-781deeb50d1b" + "x-ms-request-id" : "63b033ff-601e-0091-5536-59f430000000", + "Date" : "Mon, 13 Jul 2020 16:53:42 GMT", + "x-ms-client-request-id" : "8c2dc81e-ab9d-49b0-aded-b795150e0b31" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistacfail079165cc158f0638f148aa", "javablobcommitblocklistacfail1821765321593a505f4b", "javablobcommitblocklistacfail2392878f8064830cdb4d" ] + "variables" : [ "jtccommitblocklistacfail051802644123e674df4f75", "javablobcommitblocklistacfail1822326dada410b3db4a", "javablobcommitblocklistacfail207590cc7242b0042347" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[1].json index f00be90035d9..2b2a6661d7f7 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[1].json @@ -1,95 +1,97 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0594850d7ce0409df3465d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0357220fa399f8350c414d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f8bdb6d6-bdb5-44da-a65b-602c8dd6491a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "96d09120-b2c6-4d58-82a8-515e1171012d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AF9FE7D1C", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "ETag" : "0x8D8274D4D5AD4B8", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f4a0-b01e-0049-08f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "f8bdb6d6-bdb5-44da-a65b-602c8dd6491a" + "x-ms-request-id" : "8801332b-a01e-009e-7336-59825c000000", + "Date" : "Mon, 13 Jul 2020 16:53:43 GMT", + "x-ms-client-request-id" : "96d09120-b2c6-4d58-82a8-515e1171012d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0594850d7ce0409df3465d/javablobcommitblocklistacfail185130b764a4de656f49", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0357220fa399f8350c414d/javablobcommitblocklistacfail143831ee275d1668d245", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4662638b-d956-46f2-90a9-1c6acaaf7a19", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fddd0b75-e839-4afb-90e3-c680288ac3c4", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "x-ms-version-id" : "2020-07-13T16:53:44.0791768Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AFA06E852", + "ETag" : "0x8D8274D4D9949BE", "Content-Length" : "0", - "x-ms-request-id" : "ec66f4b8-b01e-0049-19f3-120316000000", - "x-ms-client-request-id" : "4662638b-d956-46f2-90a9-1c6acaaf7a19" + "x-ms-request-id" : "78208963-801e-0020-1536-59ea25000000", + "x-ms-client-request-id" : "fddd0b75-e839-4afb-90e3-c680288ac3c4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0594850d7ce0409df3465d/javablobcommitblocklistacfail2485951a78f63edb524e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0357220fa399f8350c414d/javablobcommitblocklistacfail213207c2229c522daa45", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0f00d6ed-e06e-4e91-9f02-ae33b8add2dc", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "463d4436-4ada-4f78-9e42-d8e70e56dfb7", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "x-ms-version-id" : "2020-07-13T16:53:44.4094115Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:44 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AFA0F27AF", + "ETag" : "0x8D8274D4DCBD4A3", "Content-Length" : "0", - "x-ms-request-id" : "ec66f4c9-b01e-0049-25f3-120316000000", - "x-ms-client-request-id" : "0f00d6ed-e06e-4e91-9f02-ae33b8add2dc" + "x-ms-request-id" : "d390d7d6-a01e-0055-2b36-598109000000", + "x-ms-client-request-id" : "463d4436-4ada-4f78-9e42-d8e70e56dfb7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0594850d7ce0409df3465d/javablobcommitblocklistacfail185130b764a4de656f49?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0357220fa399f8350c414d/javablobcommitblocklistacfail143831ee275d1668d245?comp=blocklist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "86bbf901-2c00-4583-a109-dabe51b4f007", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "59fffbd5-5db1-4654-8493-3f96bf3a9244", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "ec66f4dc-b01e-0049-31f3-120316000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:ec66f4dc-b01e-0049-31f3-120316000000\nTime:2020-04-15T07:02:35.7943553Z", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "86bbf901-2c00-4583-a109-dabe51b4f007", + "x-ms-request-id" : "40db9851-e01e-0026-4836-59d99a000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:40db9851-e01e-0026-4836-59d99a000000\nTime:2020-07-13T16:53:44.7326299Z", + "Date" : "Mon, 13 Jul 2020 16:53:43 GMT", + "x-ms-client-request-id" : "59fffbd5-5db1-4654-8493-3f96bf3a9244", "Content-Type" : "application/xml" }, "Exception" : null @@ -97,43 +99,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e1a5b027-1d64-49d0-9378-5929feffba56" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a9fa385-5246-4377-8834-3e9885158f3e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f4f5-b01e-0049-44f3-120316000000", - "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail0594850d7ce0409df3465dWed, 15 Apr 2020 07:02:35 GMT\"0x8D7E10AF9FE7D1C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "e1a5b027-1d64-49d0-9378-5929feffba56", + "x-ms-request-id" : "554011b6-d01e-0084-5636-59e383000000", + "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail0357220fa399f8350c414dMon, 13 Jul 2020 16:53:43 GMT\"0x8D8274D4D5AD4B8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:44 GMT", + "x-ms-client-request-id" : "6a9fa385-5246-4377-8834-3e9885158f3e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0594850d7ce0409df3465d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail0357220fa399f8350c414d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ebdc524d-782b-4ec1-b3f0-5af694e4a6ce" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "83a8ac5d-d681-47d4-ad73-111eb638e270" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f501-b01e-0049-4ef3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "ebdc524d-782b-4ec1-b3f0-5af694e4a6ce" + "x-ms-request-id" : "e53e3d5a-d01e-002d-4a36-5922f1000000", + "Date" : "Mon, 13 Jul 2020 16:53:45 GMT", + "x-ms-client-request-id" : "83a8ac5d-d681-47d4-ad73-111eb638e270" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistacfail0594850d7ce0409df3465d", "javablobcommitblocklistacfail185130b764a4de656f49", "javablobcommitblocklistacfail2485951a78f63edb524e" ] + "variables" : [ "jtccommitblocklistacfail0357220fa399f8350c414d", "javablobcommitblocklistacfail143831ee275d1668d245", "javablobcommitblocklistacfail213207c2229c522daa45" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[2].json index 9872f19fa090..51baa4865da6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[2].json @@ -1,95 +1,97 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00363307a0b0cb2e874756?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail069081a577210a9b0b47fa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6362021b-8e78-4c5e-8aa5-8df9213bb3f0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29ec3357-e6cd-4210-a9a9-bd9300318589" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AFA363C4D", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:35 GMT", + "ETag" : "0x8D8274D4E9DEC7A", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f519-b01e-0049-5ef3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "6362021b-8e78-4c5e-8aa5-8df9213bb3f0" + "x-ms-request-id" : "08976b61-d01e-0012-0736-59ea52000000", + "Date" : "Mon, 13 Jul 2020 16:53:45 GMT", + "x-ms-client-request-id" : "29ec3357-e6cd-4210-a9a9-bd9300318589" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00363307a0b0cb2e874756/javablobcommitblocklistacfail1914947adc3250ba0149", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail069081a577210a9b0b47fa/javablobcommitblocklistacfail19971558efc290f84f4a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ee299f3f-b3d6-4f9a-8350-24f6cc3b38c6", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb0077f3-e3d4-4265-9ab2-99435dda24ff", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "x-ms-version-id" : "2020-07-13T16:53:46.1606548Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AFA3F1CC1", + "ETag" : "0x8D8274D4ED70C94", "Content-Length" : "0", - "x-ms-request-id" : "ec66f52d-b01e-0049-6ef3-120316000000", - "x-ms-client-request-id" : "ee299f3f-b3d6-4f9a-8350-24f6cc3b38c6" + "x-ms-request-id" : "b0267767-d01e-0070-2736-592875000000", + "x-ms-client-request-id" : "bb0077f3-e3d4-4265-9ab2-99435dda24ff" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00363307a0b0cb2e874756/javablobcommitblocklistacfail235344af3351fa82204f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail069081a577210a9b0b47fa/javablobcommitblocklistacfail2810669e97f373041a46", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dddf7b48-ab35-417a-90b2-69971d72c7e9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47071207-e77d-439e-8133-9bf1aec29ea1", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "x-ms-version-id" : "2020-07-13T16:53:46.4918880Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AFA495866", + "ETag" : "0x8D8274D4F099760", "Content-Length" : "0", - "x-ms-request-id" : "ec66f54f-b01e-0049-0ef3-120316000000", - "x-ms-client-request-id" : "dddf7b48-ab35-417a-90b2-69971d72c7e9" + "x-ms-request-id" : "a8ed6f63-701e-0069-6d36-59a8ce000000", + "x-ms-client-request-id" : "47071207-e77d-439e-8133-9bf1aec29ea1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00363307a0b0cb2e874756/javablobcommitblocklistacfail1914947adc3250ba0149?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail069081a577210a9b0b47fa/javablobcommitblocklistacfail19971558efc290f84f4a?comp=blocklist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ae5f6803-a7b1-4756-beec-06e83049d188", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "26482643-4482-4247-bd4e-a531a7916a4a", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "ec66f565-b01e-0049-1ff3-120316000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:ec66f565-b01e-0049-1ff3-120316000000\nTime:2020-04-15T07:02:36.1717095Z", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "ae5f6803-a7b1-4756-beec-06e83049d188", + "x-ms-request-id" : "81b6b101-901e-004e-2836-59bf0a000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:81b6b101-901e-004e-2836-59bf0a000000\nTime:2020-07-13T16:53:46.8337283Z", + "Date" : "Mon, 13 Jul 2020 16:53:46 GMT", + "x-ms-client-request-id" : "26482643-4482-4247-bd4e-a531a7916a4a", "Content-Type" : "application/xml" }, "Exception" : null @@ -97,43 +99,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fae9e642-06f4-4d60-979a-60b445317699" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd377667-57a6-47a9-9c12-3019ad058186" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f574-b01e-0049-29f3-120316000000", - "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail00363307a0b0cb2e874756Wed, 15 Apr 2020 07:02:35 GMT\"0x8D7E10AFA363C4D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "fae9e642-06f4-4d60-979a-60b445317699", + "x-ms-request-id" : "ebd2af3e-f01e-0048-3636-598cb5000000", + "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail069081a577210a9b0b47faMon, 13 Jul 2020 16:53:45 GMT\"0x8D8274D4E9DEC7A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:46 GMT", + "x-ms-client-request-id" : "cd377667-57a6-47a9-9c12-3019ad058186", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00363307a0b0cb2e874756?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail069081a577210a9b0b47fa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a3488c3a-33a2-46b8-b85a-f12f2c99e6b5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "08822792-665a-477d-83c4-d3d05778872c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f583-b01e-0049-35f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "a3488c3a-33a2-46b8-b85a-f12f2c99e6b5" + "x-ms-request-id" : "a06cdbe0-501e-0041-6336-59c966000000", + "Date" : "Mon, 13 Jul 2020 16:53:47 GMT", + "x-ms-client-request-id" : "08822792-665a-477d-83c4-d3d05778872c" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistacfail00363307a0b0cb2e874756", "javablobcommitblocklistacfail1914947adc3250ba0149", "javablobcommitblocklistacfail235344af3351fa82204f" ] + "variables" : [ "jtccommitblocklistacfail069081a577210a9b0b47fa", "javablobcommitblocklistacfail19971558efc290f84f4a", "javablobcommitblocklistacfail2810669e97f373041a46" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[3].json index 144533dab2c1..d1fd2fce2dce 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[3].json @@ -1,127 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail087058356a4046c50c4c8a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail008207240ebffa825a4b9a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3078836e-8398-48b6-9f0b-c14c6bb47a32" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15676311-a269-4c14-a98b-903f218ba2d8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AFA6854D9", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "ETag" : "0x8D8274D4FE2ADAC", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f59c-b01e-0049-49f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", - "x-ms-client-request-id" : "3078836e-8398-48b6-9f0b-c14c6bb47a32" + "x-ms-request-id" : "f11c00c6-f01e-003a-4f36-598bfa000000", + "Date" : "Mon, 13 Jul 2020 16:53:47 GMT", + "x-ms-client-request-id" : "15676311-a269-4c14-a98b-903f218ba2d8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail087058356a4046c50c4c8a/javablobcommitblocklistacfail18148847fb0fecc8bc40", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail008207240ebffa825a4b9a/javablobcommitblocklistacfail151933a8155720124f49", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ab554a7e-5c14-40a5-8034-2875b9aa4f97", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "64fd4b85-fb2f-480f-8696-880d78b6be72", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "x-ms-version-id" : "2020-07-13T16:53:48.2891671Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AFA713536", + "ETag" : "0x8D8274D501BD597", "Content-Length" : "0", - "x-ms-request-id" : "ec66f5b1-b01e-0049-58f3-120316000000", - "x-ms-client-request-id" : "ab554a7e-5c14-40a5-8034-2875b9aa4f97" + "x-ms-request-id" : "79c0f160-001e-005c-3036-59c4da000000", + "x-ms-client-request-id" : "64fd4b85-fb2f-480f-8696-880d78b6be72" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail087058356a4046c50c4c8a/javablobcommitblocklistacfail2868295d45a8b90c7a40", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail008207240ebffa825a4b9a/javablobcommitblocklistacfail2934184b523a3a0f3a46", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83c38932-d940-4538-b154-8eebc5e8bb9d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5e6a5929-d0f2-4b16-830a-4024c4d06d7a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "x-ms-version-id" : "2020-07-13T16:53:48.6454217Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:48 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AFA7889FB", + "ETag" : "0x8D8274D505231C9", "Content-Length" : "0", - "x-ms-request-id" : "ec66f5b6-b01e-0049-5cf3-120316000000", - "x-ms-client-request-id" : "83c38932-d940-4538-b154-8eebc5e8bb9d" + "x-ms-request-id" : "a85270d2-a01e-0037-2736-59432e000000", + "x-ms-client-request-id" : "5e6a5929-d0f2-4b16-830a-4024c4d06d7a" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail087058356a4046c50c4c8a/javablobcommitblocklistacfail18148847fb0fecc8bc40", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail008207240ebffa825a4b9a/javablobcommitblocklistacfail151933a8155720124f49", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ad6e4dfc-ab64-43ca-8dd0-60a6b58ce19b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eaa76f91-f415-473e-b8f1-5737b52aacd5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "x-ms-version-id" : "2020-07-13T16:53:48.2891671Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:02:35 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:48 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10AFA713536", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:02:36 GMT", + "ETag" : "0x8D8274D501BD597", + "x-ms-creation-time" : "Mon, 13 Jul 2020 16:53:48 GMT", "Content-Length" : "7", - "x-ms-request-id" : "ec66f5c6-b01e-0049-68f3-120316000000", - "x-ms-client-request-id" : "ad6e4dfc-ab64-43ca-8dd0-60a6b58ce19b", + "x-ms-request-id" : "901adb90-d01e-0094-6636-5926eb000000", + "x-ms-client-request-id" : "eaa76f91-f415-473e-b8f1-5737b52aacd5", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail087058356a4046c50c4c8a/javablobcommitblocklistacfail18148847fb0fecc8bc40?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail008207240ebffa825a4b9a/javablobcommitblocklistacfail151933a8155720124f49?comp=blocklist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "854336f7-d1c0-4de2-b161-c1b4dbad7a4b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6cb7857f-1bef-45e1-bf0d-0627c706d8ac", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "ec66f5db-b01e-0049-79f3-120316000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:ec66f5db-b01e-0049-79f3-120316000000\nTime:2020-04-15T07:02:36.5550689Z", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", - "x-ms-client-request-id" : "854336f7-d1c0-4de2-b161-c1b4dbad7a4b", + "x-ms-request-id" : "265427fb-701e-008d-7036-59a650000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:265427fb-701e-008d-7036-59a650000000\nTime:2020-07-13T16:53:49.3670806Z", + "Date" : "Mon, 13 Jul 2020 16:53:49 GMT", + "x-ms-client-request-id" : "6cb7857f-1bef-45e1-bf0d-0627c706d8ac", "Content-Type" : "application/xml" }, "Exception" : null @@ -129,43 +132,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f89477e7-8565-45d2-91f1-695e1f22e63a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "78bf950b-ed18-4394-b9f9-0c3fbeac8f2d" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f5e5-b01e-0049-02f3-120316000000", - "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail087058356a4046c50c4c8aWed, 15 Apr 2020 07:02:36 GMT\"0x8D7E10AFA6854D9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", - "x-ms-client-request-id" : "f89477e7-8565-45d2-91f1-695e1f22e63a", + "x-ms-request-id" : "882201c7-d01e-005f-2536-5925be000000", + "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail008207240ebffa825a4b9aMon, 13 Jul 2020 16:53:47 GMT\"0x8D8274D4FE2ADAC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:49 GMT", + "x-ms-client-request-id" : "78bf950b-ed18-4394-b9f9-0c3fbeac8f2d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail087058356a4046c50c4c8a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail008207240ebffa825a4b9a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "13473824-f132-4657-9114-31b90c3aab8f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "adefcc85-1d79-44f7-b03f-89d756e806d1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f5f4-b01e-0049-0df3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", - "x-ms-client-request-id" : "13473824-f132-4657-9114-31b90c3aab8f" + "x-ms-request-id" : "fb684644-501e-001c-3e36-59c3e2000000", + "Date" : "Mon, 13 Jul 2020 16:53:49 GMT", + "x-ms-client-request-id" : "adefcc85-1d79-44f7-b03f-89d756e806d1" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistacfail087058356a4046c50c4c8a", "javablobcommitblocklistacfail18148847fb0fecc8bc40", "javablobcommitblocklistacfail2868295d45a8b90c7a40" ] + "variables" : [ "jtccommitblocklistacfail008207240ebffa825a4b9a", "javablobcommitblocklistacfail151933a8155720124f49", "javablobcommitblocklistacfail2934184b523a3a0f3a46" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[4].json index c87e9cc95dda..8e82b2879f65 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[4].json @@ -1,117 +1,119 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail005890d6fedf5513114178?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail036553455ab9fe2c1e449e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1c8ff3f6-6edf-49d8-9780-c9259f4de9c7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bec1b88d-4a6b-4061-a838-aee97d51ca9e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AFAA25E97", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "ETag" : "0x8D8274D516CC76C", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f602-b01e-0049-17f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", - "x-ms-client-request-id" : "1c8ff3f6-6edf-49d8-9780-c9259f4de9c7" + "x-ms-request-id" : "cf6ac989-001e-0001-2336-59ce5e000000", + "Date" : "Mon, 13 Jul 2020 16:53:49 GMT", + "x-ms-client-request-id" : "bec1b88d-4a6b-4061-a838-aee97d51ca9e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail005890d6fedf5513114178/javablobcommitblocklistacfail1946144c9b01dc06fd47", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail036553455ab9fe2c1e449e/javablobcommitblocklistacfail1330277517bb4dffc848", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "624e2ad0-5734-4839-aa38-e51f7d87919f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2bacffb2-64d8-4e38-9df8-b1a8fb73b630", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "x-ms-version-id" : "2020-07-13T16:53:50.8610000Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:50 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AFAAB65F1", + "ETag" : "0x8D8274D51A443D0", "Content-Length" : "0", - "x-ms-request-id" : "ec66f61d-b01e-0049-29f3-120316000000", - "x-ms-client-request-id" : "624e2ad0-5734-4839-aa38-e51f7d87919f" + "x-ms-request-id" : "79c4b204-001e-0087-7c36-5902e7000000", + "x-ms-client-request-id" : "2bacffb2-64d8-4e38-9df8-b1a8fb73b630" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail005890d6fedf5513114178/javablobcommitblocklistacfail2535330a054bc16f8b47", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail036553455ab9fe2c1e449e/javablobcommitblocklistacfail20466495c17117da434f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7028362f-2e2f-4dc6-8b6e-ac9854df4c6d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7b4292ba-0880-441f-9d63-7b7ac5342831", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "x-ms-version-id" : "2020-07-13T16:53:51.2592827Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", + "Date" : "Mon, 13 Jul 2020 16:53:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10AFAB3CC61", + "ETag" : "0x8D8274D51E109BB", "Content-Length" : "0", - "x-ms-request-id" : "ec66f62e-b01e-0049-37f3-120316000000", - "x-ms-client-request-id" : "7028362f-2e2f-4dc6-8b6e-ac9854df4c6d" + "x-ms-request-id" : "7a44aa39-a01e-0008-6a36-598b8d000000", + "x-ms-client-request-id" : "7b4292ba-0880-441f-9d63-7b7ac5342831" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail005890d6fedf5513114178/javablobcommitblocklistacfail1946144c9b01dc06fd47?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail036553455ab9fe2c1e449e/javablobcommitblocklistacfail1330277517bb4dffc848?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bac09645-a95f-4e84-bdf5-a3b8ec24e03e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "935b1600-b77d-4b62-ba3b-905694f6d56d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10AFAAB65F1", - "x-ms-lease-id" : "d903416a-2826-4fac-813f-3b7b25ed5e02", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:36 GMT", + "ETag" : "0x8D8274D51A443D0", + "x-ms-lease-id" : "c18eb7ee-c8fb-4ffd-8b8b-9addb9ab68e6", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ec66f63e-b01e-0049-45f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", - "x-ms-client-request-id" : "bac09645-a95f-4e84-bdf5-a3b8ec24e03e" + "x-ms-request-id" : "2a0babab-701e-0079-0e36-596da6000000", + "Date" : "Mon, 13 Jul 2020 16:53:51 GMT", + "x-ms-client-request-id" : "935b1600-b77d-4b62-ba3b-905694f6d56d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail005890d6fedf5513114178/javablobcommitblocklistacfail1946144c9b01dc06fd47?comp=blocklist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail036553455ab9fe2c1e449e/javablobcommitblocklistacfail1330277517bb4dffc848?comp=blocklist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "58e14d64-bc25-4c21-8ae4-43a90e77180e", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cf4983d1-1ae8-4a2b-8a0a-a38fa7f3d95e", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "ec66f648-b01e-0049-4df3-120316000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:ec66f648-b01e-0049-4df3-120316000000\nTime:2020-04-15T07:02:36.9164095Z", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", - "x-ms-client-request-id" : "58e14d64-bc25-4c21-8ae4-43a90e77180e", + "x-ms-request-id" : "104fa326-201e-004b-4436-596dd1000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:104fa326-201e-004b-4436-596dd1000000\nTime:2020-07-13T16:53:51.9915387Z", + "Date" : "Mon, 13 Jul 2020 16:53:51 GMT", + "x-ms-client-request-id" : "cf4983d1-1ae8-4a2b-8a0a-a38fa7f3d95e", "Content-Type" : "application/xml" }, "Exception" : null @@ -119,43 +121,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bbada305-c085-4b37-b61f-e9147397ce8f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ee19240-a142-485f-8364-15d1fd4ed6e0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ec66f654-b01e-0049-58f3-120316000000", - "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail005890d6fedf5513114178Wed, 15 Apr 2020 07:02:36 GMT\"0x8D7E10AFAA25E97\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", - "x-ms-client-request-id" : "bbada305-c085-4b37-b61f-e9147397ce8f", + "x-ms-request-id" : "476c0d76-201e-0080-2436-596e84000000", + "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail036553455ab9fe2c1e449eMon, 13 Jul 2020 16:53:50 GMT\"0x8D8274D516CC76C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:52 GMT", + "x-ms-client-request-id" : "9ee19240-a142-485f-8364-15d1fd4ed6e0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail005890d6fedf5513114178?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail036553455ab9fe2c1e449e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f157669f-b88a-470e-8de0-831eb0f8b973" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "12f2b8d9-e10d-4898-bd93-ed3dc83c305b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "ec66f660-b01e-0049-60f3-120316000000", - "Date" : "Wed, 15 Apr 2020 07:02:36 GMT", - "x-ms-client-request-id" : "f157669f-b88a-470e-8de0-831eb0f8b973" + "x-ms-request-id" : "08a84a17-901e-005e-7d36-597a62000000", + "Date" : "Mon, 13 Jul 2020 16:53:52 GMT", + "x-ms-client-request-id" : "12f2b8d9-e10d-4898-bd93-ed3dc83c305b" }, "Exception" : null } ], - "variables" : [ "jtccommitblocklistacfail005890d6fedf5513114178", "javablobcommitblocklistacfail1946144c9b01dc06fd47", "javablobcommitblocklistacfail2535330a054bc16f8b47" ] + "variables" : [ "jtccommitblocklistacfail036553455ab9fe2c1e449e", "javablobcommitblocklistacfail1330277517bb4dffc848", "javablobcommitblocklistacfail20466495c17117da434f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[5].json new file mode 100644 index 000000000000..ab40c0bf03ab --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestcommitblocklistacfail[5].json @@ -0,0 +1,140 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00194456580c3c4a094c97?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9391fd99-1478-49ff-9200-c53b2af2ebe9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274D52F2A46B", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9180fd56-f01e-0058-2d36-5949dd000000", + "Date" : "Mon, 13 Jul 2020 16:53:52 GMT", + "x-ms-client-request-id" : "9391fd99-1478-49ff-9200-c53b2af2ebe9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00194456580c3c4a094c97/javablobcommitblocklistacfail1006358ae87dfd4a9f47", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f06eff8-b426-4e27-a23b-138fa5c4b6f4", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:53:53.4008087Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:53 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:53:53 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D5327CF17", + "Content-Length" : "0", + "x-ms-request-id" : "e70214a7-901e-003c-2536-59b845000000", + "x-ms-client-request-id" : "4f06eff8-b426-4e27-a23b-138fa5c4b6f4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00194456580c3c4a094c97/javablobcommitblocklistacfail299704727b1427ae1744", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ecdaa79f-a453-4391-93bc-82605da287cb", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:53:53.7350485Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:53:53 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:53:53 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D535ACF55", + "Content-Length" : "0", + "x-ms-request-id" : "58f7e528-401e-0072-7436-5996cd000000", + "x-ms-client-request-id" : "ecdaa79f-a453-4391-93bc-82605da287cb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00194456580c3c4a094c97/javablobcommitblocklistacfail1006358ae87dfd4a9f47?comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bdc4ce0e-1131-434b-a5ca-9638811e27cc", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "f83b99c9-601e-0007-3136-59fde1000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:f83b99c9-601e-0007-3136-59fde1000000\nTime:2020-07-13T16:53:54.0752260Z", + "Date" : "Mon, 13 Jul 2020 16:53:53 GMT", + "x-ms-client-request-id" : "bdc4ce0e-1131-434b-a5ca-9638811e27cc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccommitblocklistacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "db4c3700-3ed3-4fb8-b357-762dac2ea7a1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fe9516ad-601e-0028-5036-59f02a000000", + "Body" : "jtccommitblocklistacfailjtccommitblocklistacfail00194456580c3c4a094c97Mon, 13 Jul 2020 16:53:53 GMT\"0x8D8274D52F2A46B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:53:53 GMT", + "x-ms-client-request-id" : "db4c3700-3ed3-4fb8-b357-762dac2ea7a1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccommitblocklistacfail00194456580c3c4a094c97?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "323ad97b-2421-4315-b3b8-1d70a5366b36" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "0b7a611a-401e-0086-1636-595d3b000000", + "Date" : "Mon, 13 Jul 2020 16:53:54 GMT", + "x-ms-client-request-id" : "323ad97b-2421-4315-b3b8-1d70a5366b36" + }, + "Exception" : null + } ], + "variables" : [ "jtccommitblocklistacfail00194456580c3c4a094c97", "javablobcommitblocklistacfail1006358ae87dfd4a9f47", "javablobcommitblocklistacfail299704727b1427ae1744" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblocklisttags.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblocklisttags.json new file mode 100644 index 000000000000..a9fa4a90896d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblocklisttags.json @@ -0,0 +1,160 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttags0blockblobapitestgetblocklisttagscd103076f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "30ebcddb-8884-4cfa-9123-cde8288ac2ee" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274C5A21B551", + "Last-Modified" : "Mon, 13 Jul 2020 16:46:55 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "bfd672a7-a01e-0027-5735-598646000000", + "Date" : "Mon, 13 Jul 2020 16:46:54 GMT", + "x-ms-client-request-id" : "30ebcddb-8884-4cfa-9123-cde8288ac2ee" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttags0blockblobapitestgetblocklisttagscd103076f/javablobgetblocklisttags1379087b53a3eb37e64b6f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b901e685-fc9c-42e0-93c9-c2df6001f905", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:46:56.2098045Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:46:56 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:46:55 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274C5A7D837D", + "Content-Length" : "0", + "x-ms-request-id" : "22293095-101e-009b-3e35-595087000000", + "x-ms-client-request-id" : "b901e685-fc9c-42e0-93c9-c2df6001f905" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttags0blockblobapitestgetblocklisttagscd103076f/javablobgetblocklisttags2171761e85dac18ec84980", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a2503ba-23cb-4850-8979-f0ac00b93565", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:46:56.7862159Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:46:56 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:46:56 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274C5AD5778F", + "Content-Length" : "0", + "x-ms-request-id" : "2ea6aa24-e01e-0019-1e35-591139000000", + "x-ms-client-request-id" : "5a2503ba-23cb-4850-8979-f0ac00b93565" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttags0blockblobapitestgetblocklisttagscd103076f/javablobgetblocklisttags1379087b53a3eb37e64b6f?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7146232c-48b7-4498-a9c8-5e6286601c05", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "76dee6d4-701e-0024-3635-596722000000", + "Date" : "Mon, 13 Jul 2020 16:46:56 GMT", + "x-ms-client-request-id" : "7146232c-48b7-4498-a9c8-5e6286601c05" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttags0blockblobapitestgetblocklisttagscd103076f/javablobgetblocklisttags1379087b53a3eb37e64b6f?blocklisttype=all&comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2d3c0a0-1bc3-4b44-983c-c5114a869312" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "7", + "Last-Modified" : "Mon, 13 Jul 2020 16:46:56 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 16:46:57 GMT", + "ETag" : "0x8D8274C5A7D837D", + "x-ms-request-id" : "7a403db1-a01e-0008-0f35-598b8d000000", + "Body" : "", + "x-ms-client-request-id" : "f2d3c0a0-1bc3-4b44-983c-c5114a869312", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetblocklisttags&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9492803e-3765-46dd-b6fa-eba1af1b84b6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "30dae968-201e-0016-3e35-596755000000", + "Body" : "jtcgetblocklisttagsjtcgetblocklisttags0blockblobapitestgetblocklisttagscd103076fMon, 13 Jul 2020 16:46:55 GMT\"0x8D8274C5A21B551\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:46:57 GMT", + "x-ms-client-request-id" : "9492803e-3765-46dd-b6fa-eba1af1b84b6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttags0blockblobapitestgetblocklisttagscd103076f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f691049-f978-412d-ade9-ea490176d3f8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "89c385f2-b01e-0059-6e35-591601000000", + "Date" : "Mon, 13 Jul 2020 16:46:57 GMT", + "x-ms-client-request-id" : "7f691049-f978-412d-ade9-ea490176d3f8" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetblocklisttags0blockblobapitestgetblocklisttagscd103076f", "javablobgetblocklisttags1379087b53a3eb37e64b6f", "javablobgetblocklisttags2171761e85dac18ec84980" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblocklisttagsfail.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblocklisttagsfail.json new file mode 100644 index 000000000000..7367f2a9508d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestgetblocklisttagsfail.json @@ -0,0 +1,139 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttagsfail063302c2a7fdddb09044139?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce62eb0c-78e6-4e8f-a439-8fe8cc8a7fbb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274D312A9679", + "Last-Modified" : "Mon, 13 Jul 2020 16:52:56 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2ea9ee59-e01e-0019-0136-591139000000", + "Date" : "Mon, 13 Jul 2020 16:52:56 GMT", + "x-ms-client-request-id" : "ce62eb0c-78e6-4e8f-a439-8fe8cc8a7fbb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttagsfail063302c2a7fdddb09044139/javablobgetblocklisttagsfail125093ac0c29a1cf864d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "869cfe1f-56a9-41b5-adf5-9e7a38f5f9df", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:52:57.0626986Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:52:56 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D31934BAA", + "Content-Length" : "0", + "x-ms-request-id" : "104f1d3a-201e-004b-5236-596dd1000000", + "x-ms-client-request-id" : "869cfe1f-56a9-41b5-adf5-9e7a38f5f9df" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttagsfail063302c2a7fdddb09044139/javablobgetblocklisttagsfail2142603ee6481827b24b", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82fd3060-addd-4ecb-8bea-200d9e697b26", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:52:57.5170226Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:52:57 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:52:56 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D31D89EB2", + "Content-Length" : "0", + "x-ms-request-id" : "4b8ed8f4-f01e-0067-5936-59817e000000", + "x-ms-client-request-id" : "82fd3060-addd-4ecb-8bea-200d9e697b26" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttagsfail063302c2a7fdddb09044139/javablobgetblocklisttagsfail125093ac0c29a1cf864d?blocklisttype=all&comp=blocklist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d6a093fa-8f3b-4dd4-b0ac-fe450e41decb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "553faa2d-d01e-0084-1736-59e383000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:553faa2d-d01e-0084-1736-59e383000000\nTime:2020-07-13T16:52:57.9643380Z", + "Date" : "Mon, 13 Jul 2020 16:52:57 GMT", + "x-ms-client-request-id" : "d6a093fa-8f3b-4dd4-b0ac-fe450e41decb", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetblocklisttagsfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2a710d3-7a89-47ad-8518-091138aa7378" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e701d6de-901e-003c-5d36-59b845000000", + "Body" : "jtcgetblocklisttagsfailjtcgetblocklisttagsfail063302c2a7fdddb09044139Mon, 13 Jul 2020 16:52:56 GMT\"0x8D8274D312A9679\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:52:57 GMT", + "x-ms-client-request-id" : "d2a710d3-7a89-47ad-8518-091138aa7378", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetblocklisttagsfail063302c2a7fdddb09044139?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "955a0653-f5df-4e6b-882a-e1d97c1d664b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "b29d5522-401e-00a9-3636-5950f0000000", + "Date" : "Mon, 13 Jul 2020 16:52:58 GMT", + "x-ms-client-request-id" : "955a0653-f5df-4e6b-882a-e1d97c1d664b" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetblocklisttagsfail063302c2a7fdddb09044139", "javablobgetblocklisttagsfail125093ac0c29a1cf864d", "javablobgetblocklisttagsfail2142603ee6481827b24b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[0].json index 6cfed5726013..8ce7055b512e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[0].json @@ -1,141 +1,162 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac6531307974842d7c4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc3b32066f5bdf8c22?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "905b670e-c7db-4f02-8517-49cd004005a8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00752f42-6495-4a63-a33b-c5dffc1383b3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B00EAC469", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "ETag" : "0x8D8274D8F9AE5AE", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a97d8-901e-0077-35f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", - "x-ms-client-request-id" : "905b670e-c7db-4f02-8517-49cd004005a8" + "x-ms-request-id" : "88bd1111-901e-002c-0736-597d2d000000", + "Date" : "Mon, 13 Jul 2020 16:55:34 GMT", + "x-ms-client-request-id" : "00752f42-6495-4a63-a33b-c5dffc1383b3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac6531307974842d7c4/javablobuploadac1blockblobapitestuploadac653041432f60aa9", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc3b32066f5bdf8c22/javablobuploadac1blockblobapitestuploadacc3b24238603a60d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "020f4aa5-d953-4320-a941-2fc15d1002cb", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6729fc7-72d4-46c7-8773-c75810e87e50", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "x-ms-version-id" : "2020-07-13T16:55:35.4934883Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:35 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:35 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B00F246ED", + "ETag" : "0x8D8274D9001EA63", "Content-Length" : "0", - "x-ms-request-id" : "cc6a97e9-901e-0077-44f3-12b537000000", - "x-ms-client-request-id" : "020f4aa5-d953-4320-a941-2fc15d1002cb" + "x-ms-request-id" : "cb89039c-d01e-0060-0236-59ed1d000000", + "x-ms-client-request-id" : "b6729fc7-72d4-46c7-8773-c75810e87e50" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac6531307974842d7c4/javablobuploadac2blockblobapitestuploadac65322981ffd7f3d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc3b32066f5bdf8c22/javablobuploadac2blockblobapitestuploadacc3b64234565ad01", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9712b907-5c2e-480a-9b61-091163c76d9e", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d9e0e6e-b197-4603-ac28-cf9cead7cbee", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "x-ms-version-id" : "2020-07-13T16:55:35.9718290Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:35 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:35 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B00FA10F2", + "ETag" : "0x8D8274D904AE792", "Content-Length" : "0", - "x-ms-request-id" : "cc6a97f3-901e-0077-4df3-12b537000000", - "x-ms-client-request-id" : "9712b907-5c2e-480a-9b61-091163c76d9e" + "x-ms-request-id" : "7628ac48-001e-0097-7336-59c78f000000", + "x-ms-client-request-id" : "6d9e0e6e-b197-4603-ac28-cf9cead7cbee" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac6531307974842d7c4/javablobuploadac1blockblobapitestuploadac653041432f60aa9", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc3b32066f5bdf8c22/javablobuploadac1blockblobapitestuploadacc3b24238603a60d?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "edaee296-1030-4e98-b359-46d405224795", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef38a51e-bf56-4316-ad2e-6067ba76ea77", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "74ca782f-c01e-0053-3936-59b2b6000000", + "Date" : "Mon, 13 Jul 2020 16:55:35 GMT", + "x-ms-client-request-id" : "ef38a51e-bf56-4316-ad2e-6067ba76ea77" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc3b32066f5bdf8c22/javablobuploadac1blockblobapitestuploadacc3b24238603a60d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c71c94bf-caaf-4b77-917c-bd59ce16576a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "x-ms-version-id" : "2020-07-13T16:55:36.7603896Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:36 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:36 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01018CC1", + "ETag" : "0x8D8274D90C313A8", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9803-901e-0077-59f3-12b537000000", - "x-ms-client-request-id" : "edaee296-1030-4e98-b359-46d405224795" + "x-ms-request-id" : "ad162a2c-001e-004c-3936-5901b2000000", + "x-ms-client-request-id" : "c71c94bf-caaf-4b77-917c-bd59ce16576a" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "55e551f0-c4b9-430a-b2d8-8cd79fed7b5e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9c6ca69-3923-46db-b445-2eb30acfbf07" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a980f-901e-0077-62f3-12b537000000", - "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadac6531307974842d7c4Wed, 15 Apr 2020 07:02:47 GMT\"0x8D7E10B00EAC469\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", - "x-ms-client-request-id" : "55e551f0-c4b9-430a-b2d8-8cd79fed7b5e", + "x-ms-request-id" : "301d61c1-301e-0057-5a36-593fb1000000", + "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadacc3b32066f5bdf8c22Mon, 13 Jul 2020 16:55:34 GMT\"0x8D8274D8F9AE5AE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:55:36 GMT", + "x-ms-client-request-id" : "c9c6ca69-3923-46db-b445-2eb30acfbf07", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac6531307974842d7c4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc3b32066f5bdf8c22?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a3514f15-f3e7-46e4-abe0-1d6ecf6c1dd4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "59523d6f-f95f-4bfd-8894-663a01154d80" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a981b-901e-0077-6cf3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", - "x-ms-client-request-id" : "a3514f15-f3e7-46e4-abe0-1d6ecf6c1dd4" + "x-ms-request-id" : "e4dd74ba-101e-0050-5b36-5953d2000000", + "Date" : "Mon, 13 Jul 2020 16:55:37 GMT", + "x-ms-client-request-id" : "59523d6f-f95f-4bfd-8894-663a01154d80" }, "Exception" : null } ], - "variables" : [ "jtcuploadac0blockblobapitestuploadac6531307974842d7c4", "javablobuploadac1blockblobapitestuploadac653041432f60aa9", "javablobuploadac2blockblobapitestuploadac65322981ffd7f3d" ] + "variables" : [ "jtcuploadac0blockblobapitestuploadacc3b32066f5bdf8c22", "javablobuploadac1blockblobapitestuploadacc3b24238603a60d", "javablobuploadac2blockblobapitestuploadacc3b64234565ad01" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[1].json index ebb982b4aeca..697332e8d651 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[1].json @@ -1,141 +1,162 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac227817761956f732e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac44161988cc398da9b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b7a37124-3f22-4807-8ac2-85082f5670b9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f77693d-23be-4716-b93b-5b57dfad0766" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B0119A7DD", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "ETag" : "0x8D8274D919248D0", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a9836-901e-0077-01f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", - "x-ms-client-request-id" : "b7a37124-3f22-4807-8ac2-85082f5670b9" + "x-ms-request-id" : "765f036f-801e-0030-3736-592f4d000000", + "Date" : "Mon, 13 Jul 2020 16:55:37 GMT", + "x-ms-client-request-id" : "3f77693d-23be-4716-b93b-5b57dfad0766" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac227817761956f732e/javablobuploadac1blockblobapitestuploadac227216933f8e610", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac44161988cc398da9b/javablobuploadac1blockblobapitestuploadac4411499129b785e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "02dc10fc-2385-4c91-bae5-c95a85b39624", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ea993ca5-653a-4bf5-b779-d98b64952f42", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "x-ms-version-id" : "2020-07-13T16:55:38.4485935Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:38 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:38 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B012214DA", + "ETag" : "0x8D8274D91C4D42F", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9845-901e-0077-0ef3-12b537000000", - "x-ms-client-request-id" : "02dc10fc-2385-4c91-bae5-c95a85b39624" + "x-ms-request-id" : "222da559-101e-009b-0d36-595087000000", + "x-ms-client-request-id" : "ea993ca5-653a-4bf5-b779-d98b64952f42" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac227817761956f732e/javablobuploadac2blockblobapitestuploadac22791647ff6ad5f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac44161988cc398da9b/javablobuploadac2blockblobapitestuploadac44118322e2ed6c6", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4d5311ac-d2a2-4e9e-a0b8-38cfac7ad0f8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3dd2f6c-d26a-4bc7-9ea7-11d582d4bd3c", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "x-ms-version-id" : "2020-07-13T16:55:38.8158552Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:38 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:38 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B012990B1", + "ETag" : "0x8D8274D91FCDE58", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9864-901e-0077-2af3-12b537000000", - "x-ms-client-request-id" : "4d5311ac-d2a2-4e9e-a0b8-38cfac7ad0f8" + "x-ms-request-id" : "c202f141-c01e-006c-1236-597a15000000", + "x-ms-client-request-id" : "f3dd2f6c-d26a-4bc7-9ea7-11d582d4bd3c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac227817761956f732e/javablobuploadac1blockblobapitestuploadac227216933f8e610", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac44161988cc398da9b/javablobuploadac1blockblobapitestuploadac4411499129b785e?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "11437d3c-91b2-452c-b73a-c96f78717055", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "783aaa15-4055-4865-ba2b-611607069324", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "3d81bda2-f01e-0015-5c36-598631000000", + "Date" : "Mon, 13 Jul 2020 16:55:38 GMT", + "x-ms-client-request-id" : "783aaa15-4055-4865-ba2b-611607069324" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac44161988cc398da9b/javablobuploadac1blockblobapitestuploadac4411499129b785e", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9d65df97-243c-4c82-9fe0-226f9a495a97", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "x-ms-version-id" : "2020-07-13T16:55:39.4903351Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:39 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:38 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B0130E572", + "ETag" : "0x8D8274D9263A21E", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9879-901e-0077-3ef3-12b537000000", - "x-ms-client-request-id" : "11437d3c-91b2-452c-b73a-c96f78717055" + "x-ms-request-id" : "a85352c4-a01e-0037-4e36-59432e000000", + "x-ms-client-request-id" : "9d65df97-243c-4c82-9fe0-226f9a495a97" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d51b772d-ec43-4b3a-802e-9f5459715e1d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5c3b7956-84e6-4014-82d8-88fba5e520d4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a9888-901e-0077-4df3-12b537000000", - "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadac227817761956f732eWed, 15 Apr 2020 07:02:47 GMT\"0x8D7E10B0119A7DD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", - "x-ms-client-request-id" : "d51b772d-ec43-4b3a-802e-9f5459715e1d", + "x-ms-request-id" : "901b8126-d01e-0094-2036-5926eb000000", + "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadac44161988cc398da9bMon, 13 Jul 2020 16:55:38 GMT\"0x8D8274D919248D0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:55:39 GMT", + "x-ms-client-request-id" : "5c3b7956-84e6-4014-82d8-88fba5e520d4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac227817761956f732e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac44161988cc398da9b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "efa8941b-2877-4d55-9688-ad98d4f9e203" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8813ac0a-ac02-4daa-a554-339dc86f4d58" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a9893-901e-0077-56f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:46 GMT", - "x-ms-client-request-id" : "efa8941b-2877-4d55-9688-ad98d4f9e203" + "x-ms-request-id" : "26549f2e-701e-008d-5336-59a650000000", + "Date" : "Mon, 13 Jul 2020 16:55:39 GMT", + "x-ms-client-request-id" : "8813ac0a-ac02-4daa-a554-339dc86f4d58" }, "Exception" : null } ], - "variables" : [ "jtcuploadac0blockblobapitestuploadac227817761956f732e", "javablobuploadac1blockblobapitestuploadac227216933f8e610", "javablobuploadac2blockblobapitestuploadac22791647ff6ad5f" ] + "variables" : [ "jtcuploadac0blockblobapitestuploadac44161988cc398da9b", "javablobuploadac1blockblobapitestuploadac4411499129b785e", "javablobuploadac2blockblobapitestuploadac44118322e2ed6c6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[2].json index 344e1c90f697..5b318f7d7044 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[2].json @@ -1,141 +1,162 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadaca2201990861d91452?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac7dc76357195ca5563?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "de8d3d53-847d-4ede-9984-24037a7b950c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f8d2118-9dd9-40c4-9071-c669ff7f506d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B01494EE1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "ETag" : "0x8D8274D92FE5A3E", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a98aa-901e-0077-6df3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "de8d3d53-847d-4ede-9984-24037a7b950c" + "x-ms-request-id" : "8822fa0a-d01e-005f-7a36-5925be000000", + "Date" : "Mon, 13 Jul 2020 16:55:40 GMT", + "x-ms-client-request-id" : "5f8d2118-9dd9-40c4-9071-c669ff7f506d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadaca2201990861d91452/javablobuploadac1blockblobapitestuploadaca22094752b02514", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac7dc76357195ca5563/javablobuploadac1blockblobapitestuploadac7dc9096414c3311", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1002c6c7-ce35-42da-a5cf-3175310d6aa0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d962bfd8-fe21-478e-9acc-1b37bdd5f1a5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "x-ms-version-id" : "2020-07-13T16:55:40.8633124Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:40 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01514674", + "ETag" : "0x8D8274D93354924", "Content-Length" : "0", - "x-ms-request-id" : "cc6a98b5-901e-0077-75f3-12b537000000", - "x-ms-client-request-id" : "1002c6c7-ce35-42da-a5cf-3175310d6aa0" + "x-ms-request-id" : "fb68f122-501e-001c-5336-59c3e2000000", + "x-ms-client-request-id" : "d962bfd8-fe21-478e-9acc-1b37bdd5f1a5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadaca2201990861d91452/javablobuploadac2blockblobapitestuploadaca22623553128f65", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac7dc76357195ca5563/javablobuploadac2blockblobapitestuploadac7dc857572973e5e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b20e39aa-f1e7-40d6-bd14-0257b1a9a423", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ea89ceb9-b28c-4f84-96da-f96808cc288b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:47 GMT", + "x-ms-version-id" : "2020-07-13T16:55:41.2545918Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01591083", + "ETag" : "0x8D8274D9370FD7E", "Content-Length" : "0", - "x-ms-request-id" : "cc6a98c2-901e-0077-7ff3-12b537000000", - "x-ms-client-request-id" : "b20e39aa-f1e7-40d6-bd14-0257b1a9a423" + "x-ms-request-id" : "cf6b4ee1-001e-0001-6936-59ce5e000000", + "x-ms-client-request-id" : "ea89ceb9-b28c-4f84-96da-f96808cc288b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadaca2201990861d91452/javablobuploadac1blockblobapitestuploadaca22094752b02514", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac7dc76357195ca5563/javablobuploadac1blockblobapitestuploadac7dc9096414c3311?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9185db94-3945-40f7-ae8b-167c4dee13fb", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6106b4d9-ef16-40d9-b1bd-e44281e0dfb4", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "79c570b3-001e-0087-4536-5902e7000000", + "Date" : "Mon, 13 Jul 2020 16:55:41 GMT", + "x-ms-client-request-id" : "6106b4d9-ef16-40d9-b1bd-e44281e0dfb4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac7dc76357195ca5563/javablobuploadac1blockblobapitestuploadac7dc9096414c3311", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc078c8b-63a6-4c08-95f6-0c650cd33f40", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:41.9470835Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:41 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01608C56", + "ETag" : "0x8D8274D93DA80E3", "Content-Length" : "0", - "x-ms-request-id" : "cc6a98ce-901e-0077-09f3-12b537000000", - "x-ms-client-request-id" : "9185db94-3945-40f7-ae8b-167c4dee13fb" + "x-ms-request-id" : "7a45dcca-a01e-0008-7236-598b8d000000", + "x-ms-client-request-id" : "bc078c8b-63a6-4c08-95f6-0c650cd33f40" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a2e2b9a4-7572-430a-ba6f-0d07e8bbf647" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9d117db3-275e-47ad-8f35-0fa2f25f3f41" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a98d8-901e-0077-13f3-12b537000000", - "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadaca2201990861d91452Wed, 15 Apr 2020 07:02:47 GMT\"0x8D7E10B01494EE1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "a2e2b9a4-7572-430a-ba6f-0d07e8bbf647", + "x-ms-request-id" : "2a0c9997-701e-0079-1936-596da6000000", + "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadac7dc76357195ca5563Mon, 13 Jul 2020 16:55:40 GMT\"0x8D8274D92FE5A3E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:55:41 GMT", + "x-ms-client-request-id" : "9d117db3-275e-47ad-8f35-0fa2f25f3f41", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadaca2201990861d91452?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac7dc76357195ca5563?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8f4e7b79-0383-461c-9e30-34eb7af7e973" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cfb78d91-d6cb-4148-bd20-3bc31fb36c68" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a98e6-901e-0077-20f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "8f4e7b79-0383-461c-9e30-34eb7af7e973" + "x-ms-request-id" : "1050abd5-201e-004b-5736-596dd1000000", + "Date" : "Mon, 13 Jul 2020 16:55:41 GMT", + "x-ms-client-request-id" : "cfb78d91-d6cb-4148-bd20-3bc31fb36c68" }, "Exception" : null } ], - "variables" : [ "jtcuploadac0blockblobapitestuploadaca2201990861d91452", "javablobuploadac1blockblobapitestuploadaca22094752b02514", "javablobuploadac2blockblobapitestuploadaca22623553128f65" ] + "variables" : [ "jtcuploadac0blockblobapitestuploadac7dc76357195ca5563", "javablobuploadac1blockblobapitestuploadac7dc9096414c3311", "javablobuploadac2blockblobapitestuploadac7dc857572973e5e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[3].json index ae78f7ab09ce..810fbda60ce2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[3].json @@ -1,173 +1,196 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac9fb050136e952336e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac67a192350c3c06514?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "931444fb-f6da-43b5-919b-56fccb3caf3c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "be2771a9-1381-4510-a268-daf94f9e3b10" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B01765D1B", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "ETag" : "0x8D8274D947A00A7", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a98f2-901e-0077-2cf3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "931444fb-f6da-43b5-919b-56fccb3caf3c" + "x-ms-request-id" : "476cfcb5-201e-0080-7336-596e84000000", + "Date" : "Mon, 13 Jul 2020 16:55:42 GMT", + "x-ms-client-request-id" : "be2771a9-1381-4510-a268-daf94f9e3b10" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac9fb050136e952336e/javablobuploadac1blockblobapitestuploadac9fb83443387635d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac67a192350c3c06514/javablobuploadac1blockblobapitestuploadac67a0759755148fb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5b517080-3b31-4869-81ae-0215cd5dbb97", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40dd0956-79c4-457f-a6a4-f2b29c7e39e1", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:43.3370741Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:42 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B017E067D", + "ETag" : "0x8D8274D94AEC075", "Content-Length" : "0", - "x-ms-request-id" : "cc6a98fc-901e-0077-33f3-12b537000000", - "x-ms-client-request-id" : "5b517080-3b31-4869-81ae-0215cd5dbb97" + "x-ms-request-id" : "c5898e79-d01e-003d-4936-59e799000000", + "x-ms-client-request-id" : "40dd0956-79c4-457f-a6a4-f2b29c7e39e1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac9fb050136e952336e/javablobuploadac2blockblobapitestuploadac9fb72160267b55c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac67a192350c3c06514/javablobuploadac2blockblobapitestuploadac67a16197f3fc9e8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "428aa3b0-083a-4405-b8b9-66ad9a1e06bb", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae392693-fab2-48c3-aef8-b4903c674056", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:43.6943283Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01853419", + "ETag" : "0x8D8274D94E543B3", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9909-901e-0077-3ef3-12b537000000", - "x-ms-client-request-id" : "428aa3b0-083a-4405-b8b9-66ad9a1e06bb" + "x-ms-request-id" : "08a917c0-901e-005e-2b36-597a62000000", + "x-ms-client-request-id" : "ae392693-fab2-48c3-aef8-b4903c674056" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac67a192350c3c06514/javablobuploadac1blockblobapitestuploadac67a0759755148fb?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "df41a491-0fef-4a81-b2fc-357960c42728", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9181c4f8-f01e-0058-3536-5949dd000000", + "Date" : "Mon, 13 Jul 2020 16:55:43 GMT", + "x-ms-client-request-id" : "df41a491-0fef-4a81-b2fc-357960c42728" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac9fb050136e952336e/javablobuploadac1blockblobapitestuploadac9fb83443387635d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac67a192350c3c06514/javablobuploadac1blockblobapitestuploadac67a0759755148fb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ca08f84f-1ff6-41fe-a9c6-f97166ecec0d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "90a31f9e-730d-4512-bdf1-4cdc5cdcb944" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:43.3370741Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:43 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:44 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B017E067D", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:02:48 GMT", + "ETag" : "0x8D8274D94AEC075", + "x-ms-creation-time" : "Mon, 13 Jul 2020 16:55:43 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6a9918-901e-0077-4bf3-12b537000000", - "x-ms-client-request-id" : "ca08f84f-1ff6-41fe-a9c6-f97166ecec0d", + "x-ms-request-id" : "e702b6a3-901e-003c-3136-59b845000000", + "x-ms-client-request-id" : "90a31f9e-730d-4512-bdf1-4cdc5cdcb944", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac9fb050136e952336e/javablobuploadac1blockblobapitestuploadac9fb83443387635d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac67a192350c3c06514/javablobuploadac1blockblobapitestuploadac67a0759755148fb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d164755d-e53c-4c66-a263-e4871f1ed6c9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cba4d651-18ef-40bb-9e83-a9c8d695a87f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:44.7690928Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:44 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B0193B683", + "ETag" : "0x8D8274D95891BA0", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9922-901e-0077-55f3-12b537000000", - "x-ms-client-request-id" : "d164755d-e53c-4c66-a263-e4871f1ed6c9" + "x-ms-request-id" : "58f8a118-401e-0072-1136-5996cd000000", + "x-ms-client-request-id" : "cba4d651-18ef-40bb-9e83-a9c8d695a87f" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e1e18af2-50c9-4417-9ab9-656023918609" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a1c17e0-2e71-40a6-af10-5c9ae8c60318" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a9928-901e-0077-5bf3-12b537000000", - "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadac9fb050136e952336eWed, 15 Apr 2020 07:02:48 GMT\"0x8D7E10B01765D1B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "e1e18af2-50c9-4417-9ab9-656023918609", + "x-ms-request-id" : "f83c717b-601e-0007-4936-59fde1000000", + "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadac67a192350c3c06514Mon, 13 Jul 2020 16:55:42 GMT\"0x8D8274D947A00A7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:55:44 GMT", + "x-ms-client-request-id" : "1a1c17e0-2e71-40a6-af10-5c9ae8c60318", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac9fb050136e952336e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac67a192350c3c06514?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "765d2184-a8f6-4ffd-9143-a34fcbe87d0f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1517b98-24b6-488c-86d7-58d2368bb1ee" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a992f-901e-0077-60f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "765d2184-a8f6-4ffd-9143-a34fcbe87d0f" + "x-ms-request-id" : "fe95f7d8-601e-0028-4136-59f02a000000", + "Date" : "Mon, 13 Jul 2020 16:55:44 GMT", + "x-ms-client-request-id" : "b1517b98-24b6-488c-86d7-58d2368bb1ee" }, "Exception" : null } ], - "variables" : [ "jtcuploadac0blockblobapitestuploadac9fb050136e952336e", "javablobuploadac1blockblobapitestuploadac9fb83443387635d", "javablobuploadac2blockblobapitestuploadac9fb72160267b55c" ] + "variables" : [ "jtcuploadac0blockblobapitestuploadac67a192350c3c06514", "javablobuploadac1blockblobapitestuploadac67a0759755148fb", "javablobuploadac2blockblobapitestuploadac67a16197f3fc9e8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[4].json index 94b236bcd150..918d2ab54c04 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[4].json @@ -1,141 +1,162 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc94659062172c1a1d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac5ec1499886dd017cd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "73f36e4e-6f4a-4325-8134-120ebe64ed81" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "33554c04-5085-419a-b94e-c32660d2e5ed" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B01AB3570", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "ETag" : "0x8D8274D962C8C94", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a993b-901e-0077-68f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "73f36e4e-6f4a-4325-8134-120ebe64ed81" + "x-ms-request-id" : "0b7ae262-401e-0086-5136-595d3b000000", + "Date" : "Mon, 13 Jul 2020 16:55:45 GMT", + "x-ms-client-request-id" : "33554c04-5085-419a-b94e-c32660d2e5ed" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc94659062172c1a1d/javablobuploadac1blockblobapitestuploadacc9473966e839c39", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac5ec1499886dd017cd/javablobuploadac1blockblobapitestuploadac5ec571330f0f152", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3803c803-c6dd-4087-8b77-b3587df6bf99", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69089257-a2ef-42b0-9697-5195c8d607fd", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:46.2071180Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01B41781", + "ETag" : "0x8D8274D9664AF8C", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9946-901e-0077-72f3-12b537000000", - "x-ms-client-request-id" : "3803c803-c6dd-4087-8b77-b3587df6bf99" + "x-ms-request-id" : "fd902280-f01e-0093-2b36-594a88000000", + "x-ms-client-request-id" : "69089257-a2ef-42b0-9697-5195c8d607fd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc94659062172c1a1d/javablobuploadac2blockblobapitestuploadacc9476388a3d8f63", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac5ec1499886dd017cd/javablobuploadac2blockblobapitestuploadac5ec32635230694e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5583a618-898b-4942-bbb8-860271e4a5a6", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "39ca00dd-20f9-443b-b4af-6b20664a1776", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:46.6124073Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:46 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01BAF6EE", + "ETag" : "0x8D8274D96A26010", "Content-Length" : "0", - "x-ms-request-id" : "cc6a994f-901e-0077-7af3-12b537000000", - "x-ms-client-request-id" : "5583a618-898b-4942-bbb8-860271e4a5a6" + "x-ms-request-id" : "ab3741ea-b01e-0014-4c36-59d9ed000000", + "x-ms-client-request-id" : "39ca00dd-20f9-443b-b4af-6b20664a1776" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc94659062172c1a1d/javablobuploadac1blockblobapitestuploadacc9473966e839c39", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac5ec1499886dd017cd/javablobuploadac1blockblobapitestuploadac5ec571330f0f152?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "062d7bde-dc99-40a6-8958-9ff9a880cf77", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f894bf77-42a9-4b7b-a054-12ae046e2a5b", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "d0aec460-101e-0022-7536-59549d000000", + "Date" : "Mon, 13 Jul 2020 16:55:46 GMT", + "x-ms-client-request-id" : "f894bf77-42a9-4b7b-a054-12ae046e2a5b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac5ec1499886dd017cd/javablobuploadac1blockblobapitestuploadac5ec571330f0f152", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f811c16-8a70-4e67-85ad-9188c060282a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:47.3059000Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:47 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:46 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01C1FD86", + "ETag" : "0x8D8274D970C0A8F", "Content-Length" : "0", - "x-ms-request-id" : "cc6a995b-901e-0077-03f3-12b537000000", - "x-ms-client-request-id" : "062d7bde-dc99-40a6-8958-9ff9a880cf77" + "x-ms-request-id" : "84083614-c01e-0043-6636-5977de000000", + "x-ms-client-request-id" : "5f811c16-8a70-4e67-85ad-9188c060282a" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e1dd42c6-8765-47f1-8c31-dd05e970ba65" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "25f0acde-86f6-4a40-8772-a68010e25e51" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a9966-901e-0077-0cf3-12b537000000", - "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadacc94659062172c1a1dWed, 15 Apr 2020 07:02:48 GMT\"0x8D7E10B01AB3570\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "e1dd42c6-8765-47f1-8c31-dd05e970ba65", + "x-ms-request-id" : "fa1b189e-401e-0000-6936-599182000000", + "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadac5ec1499886dd017cdMon, 13 Jul 2020 16:55:45 GMT\"0x8D8274D962C8C94\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:55:47 GMT", + "x-ms-client-request-id" : "25f0acde-86f6-4a40-8772-a68010e25e51", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc94659062172c1a1d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac5ec1499886dd017cd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fc35a367-db39-4860-8671-bb3dbd8b8b37" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47506878-7042-4cf9-827b-2bae74b1efc3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a9976-901e-0077-16f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "fc35a367-db39-4860-8671-bb3dbd8b8b37" + "x-ms-request-id" : "271d2f90-e01e-0036-7f36-591cf2000000", + "Date" : "Mon, 13 Jul 2020 16:55:47 GMT", + "x-ms-client-request-id" : "47506878-7042-4cf9-827b-2bae74b1efc3" }, "Exception" : null } ], - "variables" : [ "jtcuploadac0blockblobapitestuploadacc94659062172c1a1d", "javablobuploadac1blockblobapitestuploadacc9473966e839c39", "javablobuploadac2blockblobapitestuploadacc9476388a3d8f63" ] + "variables" : [ "jtcuploadac0blockblobapitestuploadac5ec1499886dd017cd", "javablobuploadac1blockblobapitestuploadac5ec571330f0f152", "javablobuploadac2blockblobapitestuploadac5ec32635230694e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[5].json index e8416116f4fc..cc4146fb31df 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[5].json @@ -1,163 +1,184 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc2e51310be46fabe1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacbb652464f654aef73?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a79de3cf-e896-40b0-abda-2d061a8e66b0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37189b18-5fc2-48d0-a364-5dcab8c2e9b1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B01D90750", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "ETag" : "0x8D8274D97B071D4", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a9988-901e-0077-25f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:47 GMT", - "x-ms-client-request-id" : "a79de3cf-e896-40b0-abda-2d061a8e66b0" + "x-ms-request-id" : "301d72ee-301e-0057-5736-593fb1000000", + "Date" : "Mon, 13 Jul 2020 16:55:47 GMT", + "x-ms-client-request-id" : "37189b18-5fc2-48d0-a364-5dcab8c2e9b1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc2e51310be46fabe1/javablobuploadac1blockblobapitestuploadacc2e5504947f2bf1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacbb652464f654aef73/javablobuploadac1blockblobapitestuploadacbb696922e4581bb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4588af15-e660-4bf8-9928-beb94cc1a5bc", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "57c86699-2480-4ad3-b019-e69491557306", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:48.7369196Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:48 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01E19AFD", + "ETag" : "0x8D8274D97E6B3EC", "Content-Length" : "0", - "x-ms-request-id" : "cc6a999c-901e-0077-35f3-12b537000000", - "x-ms-client-request-id" : "4588af15-e660-4bf8-9928-beb94cc1a5bc" + "x-ms-request-id" : "e4dd8044-101e-0050-4536-5953d2000000", + "x-ms-client-request-id" : "57c86699-2480-4ad3-b019-e69491557306" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc2e51310be46fabe1/javablobuploadac2blockblobapitestuploadacc2e976074656fea", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacbb652464f654aef73/javablobuploadac2blockblobapitestuploadacbb672709ace3854", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b9794b98-a772-4eec-a278-1609900ceca8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "01c38446-99a2-4e63-baa2-ed647d4573e2", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "x-ms-version-id" : "2020-07-13T16:55:49.0661552Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:49 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:48 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01EA76C0", + "ETag" : "0x8D8274D9818C989", "Content-Length" : "0", - "x-ms-request-id" : "cc6a99ac-901e-0077-44f3-12b537000000", - "x-ms-client-request-id" : "b9794b98-a772-4eec-a278-1609900ceca8" + "x-ms-request-id" : "be62be4e-c01e-000e-0236-59b832000000", + "x-ms-client-request-id" : "01c38446-99a2-4e63-baa2-ed647d4573e2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc2e51310be46fabe1/javablobuploadac1blockblobapitestuploadacc2e5504947f2bf1?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacbb652464f654aef73/javablobuploadac1blockblobapitestuploadacbb696922e4581bb?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aaa3d462-5eaf-42ba-b1e2-59877b5ae79d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0dc58827-0a18-47db-b87b-2e8967fcbdd1", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B01E19AFD", - "x-ms-lease-id" : "6366cd78-a91c-41f9-8d82-b2a43dddcf09", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:48 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "92228cd1-e01e-006b-3436-591676000000", + "Date" : "Mon, 13 Jul 2020 16:55:49 GMT", + "x-ms-client-request-id" : "0dc58827-0a18-47db-b87b-2e8967fcbdd1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacbb652464f654aef73/javablobuploadac1blockblobapitestuploadacbb696922e4581bb?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f2d2a2d-eb18-4390-93f8-fd2363ac9322" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274D97E6B3EC", + "x-ms-lease-id" : "20170e0f-58d0-441b-bdb4-6322b283364e", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a99bb-901e-0077-51f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "aaa3d462-5eaf-42ba-b1e2-59877b5ae79d" + "x-ms-request-id" : "f230414e-301e-008c-2736-59f98c000000", + "Date" : "Mon, 13 Jul 2020 16:55:49 GMT", + "x-ms-client-request-id" : "4f2d2a2d-eb18-4390-93f8-fd2363ac9322" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc2e51310be46fabe1/javablobuploadac1blockblobapitestuploadacc2e5504947f2bf1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacbb652464f654aef73/javablobuploadac1blockblobapitestuploadacbb696922e4581bb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f50b9e98-ab8e-4eaa-aac8-e5b6e1c2873a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ce0e652-7982-46fb-b55d-da4d77132838", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "x-ms-version-id" : "2020-07-13T16:55:50.1989610Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:50 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", + "Date" : "Mon, 13 Jul 2020 16:55:49 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B01F94761", + "ETag" : "0x8D8274D98C5A3DA", "Content-Length" : "0", - "x-ms-request-id" : "cc6a99c9-901e-0077-5bf3-12b537000000", - "x-ms-client-request-id" : "f50b9e98-ab8e-4eaa-aac8-e5b6e1c2873a" + "x-ms-request-id" : "e1ec24d0-601e-004a-7836-59320d000000", + "x-ms-client-request-id" : "4ce0e652-7982-46fb-b55d-da4d77132838" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ad5ea004-84d2-4a8a-9030-0448969160ec" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b0e21c7-551b-46c0-8759-e3da60a9d369" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a99d2-901e-0077-64f3-12b537000000", - "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadacc2e51310be46fabe1Wed, 15 Apr 2020 07:02:48 GMT\"0x8D7E10B01D90750\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "ad5ea004-84d2-4a8a-9030-0448969160ec", + "x-ms-request-id" : "06c37983-101e-007f-1236-595e19000000", + "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadacbb652464f654aef73Mon, 13 Jul 2020 16:55:48 GMT\"0x8D8274D97B071D4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:55:49 GMT", + "x-ms-client-request-id" : "6b0e21c7-551b-46c0-8759-e3da60a9d369", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacc2e51310be46fabe1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadacbb652464f654aef73?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c86ee19c-d837-431d-ac7d-66e7b1808f11" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b04b19af-2171-496f-820f-d866a81b5098" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a99e0-901e-0077-72f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "c86ee19c-d837-431d-ac7d-66e7b1808f11" + "x-ms-request-id" : "e1cb8348-d01e-004f-2b36-59e0d6000000", + "Date" : "Mon, 13 Jul 2020 16:55:50 GMT", + "x-ms-client-request-id" : "b04b19af-2171-496f-820f-d866a81b5098" }, "Exception" : null } ], - "variables" : [ "jtcuploadac0blockblobapitestuploadacc2e51310be46fabe1", "javablobuploadac1blockblobapitestuploadacc2e5504947f2bf1", "javablobuploadac2blockblobapitestuploadacc2e976074656fea" ] + "variables" : [ "jtcuploadac0blockblobapitestuploadacbb652464f654aef73", "javablobuploadac1blockblobapitestuploadacbb696922e4581bb", "javablobuploadac2blockblobapitestuploadacbb672709ace3854" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[6].json new file mode 100644 index 000000000000..50d5b6557547 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadac[6].json @@ -0,0 +1,162 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac78e45424702f984ba?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "567fe091-2752-4460-87a4-354e4a4bb566" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274D996DA55B", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2b58eda6-401e-005d-6136-599b06000000", + "Date" : "Mon, 13 Jul 2020 16:55:50 GMT", + "x-ms-client-request-id" : "567fe091-2752-4460-87a4-354e4a4bb566" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac78e45424702f984ba/javablobuploadac1blockblobapitestuploadac78e4112759da009", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f112cd1d-4c4a-41dd-beb3-8440165fc85a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:55:51.6249764Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:51 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:55:51 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D999F62A4", + "Content-Length" : "0", + "x-ms-request-id" : "94cd1515-a01e-006a-6436-5949aa000000", + "x-ms-client-request-id" : "f112cd1d-4c4a-41dd-beb3-8440165fc85a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac78e45424702f984ba/javablobuploadac2blockblobapitestuploadac78e767466b4c40f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0c2dfc6-92b2-4339-b20a-026a67254668", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:55:51.9642186Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:51 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:55:51 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D99D3264A", + "Content-Length" : "0", + "x-ms-request-id" : "9602752a-901e-0013-2b36-59b58e000000", + "x-ms-client-request-id" : "b0c2dfc6-92b2-4339-b20a-026a67254668" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac78e45424702f984ba/javablobuploadac1blockblobapitestuploadac78e4112759da009?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13eb8fa0-59b2-4e9d-b15d-25b8cf655017", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0b25c6c4-901e-0071-4736-5977a9000000", + "Date" : "Mon, 13 Jul 2020 16:55:51 GMT", + "x-ms-client-request-id" : "13eb8fa0-59b2-4e9d-b15d-25b8cf655017" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac78e45424702f984ba/javablobuploadac1blockblobapitestuploadac78e4112759da009", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "497d1e83-6cfb-47b6-8a46-a260a777e9a1", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:55:52.6907351Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:52 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:55:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D9A41DAC7", + "Content-Length" : "0", + "x-ms-request-id" : "8ad877d6-001e-002e-4736-59c395000000", + "x-ms-client-request-id" : "497d1e83-6cfb-47b6-8a46-a260a777e9a1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5e99fe82-aea7-46ec-a54a-1f55a161df42" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "bfd95a12-a01e-0027-6f36-598646000000", + "Body" : "jtcuploadacjtcuploadac0blockblobapitestuploadac78e45424702f984baMon, 13 Jul 2020 16:55:51 GMT\"0x8D8274D996DA55B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:55:52 GMT", + "x-ms-client-request-id" : "5e99fe82-aea7-46ec-a54a-1f55a161df42", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadac0blockblobapitestuploadac78e45424702f984ba?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b61e24b-af71-43ef-bf0a-c1094b530bc1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2e322d76-101e-000d-5836-595956000000", + "Date" : "Mon, 13 Jul 2020 16:55:52 GMT", + "x-ms-client-request-id" : "5b61e24b-af71-43ef-bf0a-c1094b530bc1" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadac0blockblobapitestuploadac78e45424702f984ba", "javablobuploadac1blockblobapitestuploadac78e4112759da009", "javablobuploadac2blockblobapitestuploadac78e767466b4c40f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[0].json index 1951631f8428..660e801c32d9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[0].json @@ -1,95 +1,97 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail8153050799dcd?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaildef810238d252?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0052325e-05ff-476b-bd0c-51ff37705b70" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "56ccbfc0-dcda-4178-8db7-ab421cbc6acd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B020EF139", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "ETag" : "0x8D8274D7384051B", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a99eb-901e-0077-7cf3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "0052325e-05ff-476b-bd0c-51ff37705b70" + "x-ms-request-id" : "4b8f857e-f01e-0067-6636-59817e000000", + "Date" : "Mon, 13 Jul 2020 16:54:46 GMT", + "x-ms-client-request-id" : "56ccbfc0-dcda-4178-8db7-ab421cbc6acd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail8153050799dcd/javablobuploadacfail1blockblobapitestuploadacfail81541308ad1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaildef810238d252/javablobuploadacfail1blockblobapitestuploadacfaildef10289e21", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "285ed64b-16f6-4233-a61b-188a866daa33", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15d3bb6f-2aed-4f86-a962-477b3ad0c5db", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "x-ms-version-id" : "2020-07-13T16:54:48.2788762Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B0226A3C7", + "ETag" : "0x8D8274D73DD899A", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9a08-901e-0077-16f3-12b537000000", - "x-ms-client-request-id" : "285ed64b-16f6-4233-a61b-188a866daa33" + "x-ms-request-id" : "6ed91953-301e-009c-0a36-593ce4000000", + "x-ms-client-request-id" : "15d3bb6f-2aed-4f86-a962-477b3ad0c5db" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail8153050799dcd/javablobuploadacfail2blockblobapitestuploadacfail81502382cd3", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaildef810238d252/javablobuploadacfail2blockblobapitestuploadacfaildef98077118", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "efdfc8c3-c543-4c54-9031-3f275d1f39cc", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b455e346-eb7e-42d5-aad1-01bab398dfb4", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "x-ms-version-id" : "2020-07-13T16:54:48.7161901Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:48 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B02301BE6", + "ETag" : "0x8D8274D7420442D", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9a1c-901e-0077-25f3-12b537000000", - "x-ms-client-request-id" : "efdfc8c3-c543-4c54-9031-3f275d1f39cc" + "x-ms-request-id" : "1cd163ee-601e-005a-5936-59f765000000", + "x-ms-client-request-id" : "b455e346-eb7e-42d5-aad1-01bab398dfb4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail8153050799dcd/javablobuploadacfail1blockblobapitestuploadacfail81541308ad1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaildef810238d252/javablobuploadacfail1blockblobapitestuploadacfaildef10289e21", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d39c5178-3313-4bb4-ba64-560587ff6c1a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69d1b3a9-ae62-4a68-8fca-9669241b0291", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6a9a35-901e-0077-37f3-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6a9a35-901e-0077-37f3-12b537000000\nTime:2020-04-15T07:02:49.4380654Z", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "d39c5178-3313-4bb4-ba64-560587ff6c1a", + "x-ms-request-id" : "7dfe26d8-e01e-007b-3336-59d31e000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:7dfe26d8-e01e-007b-3336-59d31e000000\nTime:2020-07-13T16:54:49.1469574Z", + "Date" : "Mon, 13 Jul 2020 16:54:48 GMT", + "x-ms-client-request-id" : "69d1b3a9-ae62-4a68-8fca-9669241b0291", "Content-Type" : "application/xml" }, "Exception" : null @@ -97,43 +99,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "70a77571-c9a2-49c8-8a38-91be09fb135f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52906efe-5f27-44be-b9e4-20821bde8aa1" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a9a48-901e-0077-47f3-12b537000000", - "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfail8153050799dcdWed, 15 Apr 2020 07:02:49 GMT\"0x8D7E10B020EF139\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "70a77571-c9a2-49c8-8a38-91be09fb135f", + "x-ms-request-id" : "0cc45142-001e-00a8-0d36-590f2c000000", + "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfaildef810238d252Mon, 13 Jul 2020 16:54:47 GMT\"0x8D8274D7384051B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:54:49 GMT", + "x-ms-client-request-id" : "52906efe-5f27-44be-b9e4-20821bde8aa1", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail8153050799dcd?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaildef810238d252?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5bc42ea5-0e2b-4049-8416-95d94d8bf1e6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e103a164-a671-42fd-9473-d744a22a0d46" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a9a5e-901e-0077-54f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "5bc42ea5-0e2b-4049-8416-95d94d8bf1e6" + "x-ms-request-id" : "34ec8280-401e-0096-2336-599853000000", + "Date" : "Mon, 13 Jul 2020 16:54:49 GMT", + "x-ms-client-request-id" : "e103a164-a671-42fd-9473-d744a22a0d46" }, "Exception" : null } ], - "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfail8153050799dcd", "javablobuploadacfail1blockblobapitestuploadacfail81541308ad1", "javablobuploadacfail2blockblobapitestuploadacfail81502382cd3" ] + "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfaildef810238d252", "javablobuploadacfail1blockblobapitestuploadacfaildef10289e21", "javablobuploadacfail2blockblobapitestuploadacfaildef98077118" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[1].json index d21eaf5951f0..d5dfc95e1ed9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[1].json @@ -1,95 +1,97 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaild0a68772e847e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6a6666147a17f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0f2ba2b6-bff8-4953-84e8-dcb73a4ae5d5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "956906c8-8fa4-4c32-ad08-2735b6cb03ea" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B02504FC6", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "ETag" : "0x8D8274D75268966", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:50 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a9a7d-901e-0077-71f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "0f2ba2b6-bff8-4953-84e8-dcb73a4ae5d5" + "x-ms-request-id" : "9cb27a07-901e-0003-2a36-5970e6000000", + "Date" : "Mon, 13 Jul 2020 16:54:49 GMT", + "x-ms-client-request-id" : "956906c8-8fa4-4c32-ad08-2735b6cb03ea" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaild0a68772e847e/javablobuploadacfail1blockblobapitestuploadacfaild0a295973c2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6a6666147a17f/javablobuploadacfail1blockblobapitestuploadacfail6a6062747d3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ed4c2b36-a73f-4fb4-a8da-b7a9269e4fd8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5eb05509-6301-43e2-b348-09808ee695de", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "x-ms-version-id" : "2020-07-13T16:54:50.7716530Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:50 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B02593185", + "ETag" : "0x8D8274D7559E7B2", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9a95-901e-0077-05f3-12b537000000", - "x-ms-client-request-id" : "ed4c2b36-a73f-4fb4-a8da-b7a9269e4fd8" + "x-ms-request-id" : "f8b2e73b-c01e-00a7-3436-597940000000", + "x-ms-client-request-id" : "5eb05509-6301-43e2-b348-09808ee695de" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaild0a68772e847e/javablobuploadacfail2blockblobapitestuploadacfaild0a841595c0", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6a6666147a17f/javablobuploadacfail2blockblobapitestuploadacfail6a633682268", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9a25e910-770b-477a-a243-b3892085b065", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd5b85cb-3b0f-4189-bff7-7268e8aad5db", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "x-ms-version-id" : "2020-07-13T16:54:51.1459186Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B026122B0", + "ETag" : "0x8D8274D75930372", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9aa6-901e-0077-14f3-12b537000000", - "x-ms-client-request-id" : "9a25e910-770b-477a-a243-b3892085b065" + "x-ms-request-id" : "754bced3-b01e-0082-0436-59d03c000000", + "x-ms-client-request-id" : "dd5b85cb-3b0f-4189-bff7-7268e8aad5db" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaild0a68772e847e/javablobuploadacfail1blockblobapitestuploadacfaild0a295973c2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6a6666147a17f/javablobuploadacfail1blockblobapitestuploadacfail6a6062747d3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "72196efb-63f4-4c1e-8e64-e29c4802c84e", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "015a8763-c117-4931-9d3c-86448c26390f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6a9aba-901e-0077-25f3-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6a9aba-901e-0077-25f3-12b537000000\nTime:2020-04-15T07:02:49.7843921Z", - "Date" : "Wed, 15 Apr 2020 07:02:48 GMT", - "x-ms-client-request-id" : "72196efb-63f4-4c1e-8e64-e29c4802c84e", + "x-ms-request-id" : "30de4d66-201e-0016-1436-596755000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:30de4d66-201e-0016-1436-596755000000\nTime:2020-07-13T16:54:51.4920315Z", + "Date" : "Mon, 13 Jul 2020 16:54:50 GMT", + "x-ms-client-request-id" : "015a8763-c117-4931-9d3c-86448c26390f", "Content-Type" : "application/xml" }, "Exception" : null @@ -97,43 +99,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f4d45bec-3a0a-4b16-9575-bdba588a8c03" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d01e2a63-594c-4d10-8334-967fc0166baf" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a9acd-901e-0077-34f3-12b537000000", - "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfaild0a68772e847eWed, 15 Apr 2020 07:02:49 GMT\"0x8D7E10B02504FC6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "f4d45bec-3a0a-4b16-9575-bdba588a8c03", + "x-ms-request-id" : "5de98b39-501e-00a5-7536-59c7f8000000", + "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfail6a6666147a17fMon, 13 Jul 2020 16:54:50 GMT\"0x8D8274D75268966\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:54:51 GMT", + "x-ms-client-request-id" : "d01e2a63-594c-4d10-8334-967fc0166baf", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaild0a68772e847e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6a6666147a17f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ad0956db-a376-477c-ad65-3877336a51ee" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "45802c63-e966-47c9-b563-32ace9c3c53b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a9add-901e-0077-40f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "ad0956db-a376-477c-ad65-3877336a51ee" + "x-ms-request-id" : "88bde974-101e-0032-0d36-5991f5000000", + "Date" : "Mon, 13 Jul 2020 16:54:51 GMT", + "x-ms-client-request-id" : "45802c63-e966-47c9-b563-32ace9c3c53b" }, "Exception" : null } ], - "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfaild0a68772e847e", "javablobuploadacfail1blockblobapitestuploadacfaild0a295973c2", "javablobuploadacfail2blockblobapitestuploadacfaild0a841595c0" ] + "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfail6a6666147a17f", "javablobuploadacfail1blockblobapitestuploadacfail6a6062747d3", "javablobuploadacfail2blockblobapitestuploadacfail6a633682268" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[2].json index 2e08b4025438..1fc013b2ac1a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[2].json @@ -1,95 +1,97 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfailb9e441877657f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail9e169459e019b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "01cf555d-90ad-4e88-bbf3-5c32954b0911" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "946892f0-e8ed-4c96-ad9c-832281d03c1b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B0285C48E", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "ETag" : "0x8D8274D765F5B91", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:52 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a9aea-901e-0077-49f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "01cf555d-90ad-4e88-bbf3-5c32954b0911" + "x-ms-request-id" : "492ceb0a-801e-0052-4736-59ed6a000000", + "Date" : "Mon, 13 Jul 2020 16:54:51 GMT", + "x-ms-client-request-id" : "946892f0-e8ed-4c96-ad9c-832281d03c1b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfailb9e441877657f/javablobuploadacfail1blockblobapitestuploadacfailb9e3483842d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail9e169459e019b/javablobuploadacfail1blockblobapitestuploadacfail9e115677b64", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8bb7dbb7-46c5-47e9-ab9a-61fb88674b5b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "89e5e1a8-0d23-46e4-bacd-1945378a6bfb", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:49 GMT", + "x-ms-version-id" : "2020-07-13T16:54:52.8331202Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:52 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:51 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B028D9479", + "ETag" : "0x8D8274D769475C2", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9af7-901e-0077-52f3-12b537000000", - "x-ms-client-request-id" : "8bb7dbb7-46c5-47e9-ab9a-61fb88674b5b" + "x-ms-request-id" : "4f6d7f13-101e-00a4-0a36-599824000000", + "x-ms-client-request-id" : "89e5e1a8-0d23-46e4-bacd-1945378a6bfb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfailb9e441877657f/javablobuploadacfail2blockblobapitestuploadacfailb9e33985bdc", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail9e169459e019b/javablobuploadacfail2blockblobapitestuploadacfail9e117994a2c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0335d182-acc1-43d0-baaa-a19f791327f8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f5cc02f-a450-447c-8f4a-1eab745c25da", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "x-ms-version-id" : "2020-07-13T16:54:53.1703610Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:53 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:52 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B029473F0", + "ETag" : "0x8D8274D76C7EB3A", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9b00-901e-0077-5bf3-12b537000000", - "x-ms-client-request-id" : "0335d182-acc1-43d0-baaa-a19f791327f8" + "x-ms-request-id" : "7df113e9-a01e-0045-0a36-594461000000", + "x-ms-client-request-id" : "7f5cc02f-a450-447c-8f4a-1eab745c25da" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfailb9e441877657f/javablobuploadacfail1blockblobapitestuploadacfailb9e3483842d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail9e169459e019b/javablobuploadacfail1blockblobapitestuploadacfail9e115677b64", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "147634b8-43b4-444a-89f0-34e76be0b2f2", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa0b1ee1-b389-40ee-986b-12ea2be847cf", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6a9b17-901e-0077-6bf3-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6a9b17-901e-0077-6bf3-12b537000000\nTime:2020-04-15T07:02:50.0776698Z", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "147634b8-43b4-444a-89f0-34e76be0b2f2", + "x-ms-request-id" : "8edb6dac-301e-00a3-7436-59f447000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8edb6dac-301e-00a3-7436-59f447000000\nTime:2020-07-13T16:54:53.5506246Z", + "Date" : "Mon, 13 Jul 2020 16:54:52 GMT", + "x-ms-client-request-id" : "fa0b1ee1-b389-40ee-986b-12ea2be847cf", "Content-Type" : "application/xml" }, "Exception" : null @@ -97,43 +99,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a022f3e5-78c8-4990-98e3-6fc6f4c5df4f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d13c7cda-dfbf-4578-825d-c540bec7e157" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a9b23-901e-0077-72f3-12b537000000", - "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfailb9e441877657fWed, 15 Apr 2020 07:02:49 GMT\"0x8D7E10B0285C48E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "a022f3e5-78c8-4990-98e3-6fc6f4c5df4f", + "x-ms-request-id" : "ef340592-901e-0095-6d36-597937000000", + "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfail9e169459e019bMon, 13 Jul 2020 16:54:52 GMT\"0x8D8274D765F5B91\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:54:53 GMT", + "x-ms-client-request-id" : "d13c7cda-dfbf-4578-825d-c540bec7e157", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfailb9e441877657f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail9e169459e019b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a2a4cdab-62a8-45ae-8de1-e6e272dbbb09" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "004f1779-1570-46a8-b108-e0b8e0302606" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a9b2f-901e-0077-7bf3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "a2a4cdab-62a8-45ae-8de1-e6e272dbbb09" + "x-ms-request-id" : "b36c4451-701e-00a2-5936-59ab9b000000", + "Date" : "Mon, 13 Jul 2020 16:54:54 GMT", + "x-ms-client-request-id" : "004f1779-1570-46a8-b108-e0b8e0302606" }, "Exception" : null } ], - "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfailb9e441877657f", "javablobuploadacfail1blockblobapitestuploadacfailb9e3483842d", "javablobuploadacfail2blockblobapitestuploadacfailb9e33985bdc" ] + "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfail9e169459e019b", "javablobuploadacfail1blockblobapitestuploadacfail9e115677b64", "javablobuploadacfail2blockblobapitestuploadacfail9e117994a2c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[3].json index 7a05ed6d91d1..46707c4dd430 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[3].json @@ -1,127 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6bf032103e1c1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail7b1805608b477?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "85fd9204-0ba2-44ee-83ff-c8172a46492a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f0e233fe-5a8b-455c-8be3-6e5c0f3188a0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B02B14BE1", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "ETag" : "0x8D8274D77A19F69", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:54 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a9b3d-901e-0077-07f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "85fd9204-0ba2-44ee-83ff-c8172a46492a" + "x-ms-request-id" : "89c72c0f-b01e-0059-3a36-591601000000", + "Date" : "Mon, 13 Jul 2020 16:54:54 GMT", + "x-ms-client-request-id" : "f0e233fe-5a8b-455c-8be3-6e5c0f3188a0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6bf032103e1c1/javablobuploadacfail1blockblobapitestuploadacfail6bf5610918f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail7b1805608b477/javablobuploadacfail1blockblobapitestuploadacfail7b118588b7e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2ac3c622-a87e-44ef-a851-823ec0c5f7c5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d112c16-4264-43f1-a287-bfb2f4fc7ac9", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "x-ms-version-id" : "2020-07-13T16:54:54.9346167Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:54 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:54 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B02B9DF39", + "ETag" : "0x8D8274D77D51F77", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9b52-901e-0077-16f3-12b537000000", - "x-ms-client-request-id" : "2ac3c622-a87e-44ef-a851-823ec0c5f7c5" + "x-ms-request-id" : "c2cf10b1-a01e-007a-6136-598cc2000000", + "x-ms-client-request-id" : "1d112c16-4264-43f1-a287-bfb2f4fc7ac9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6bf032103e1c1/javablobuploadacfail2blockblobapitestuploadacfail6bf66083170", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail7b1805608b477/javablobuploadacfail2blockblobapitestuploadacfail7b179923ef8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1755d434-1d45-4d46-9155-e6b0117e836c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1321b107-aa06-475e-afd9-ea106b40e4f5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "x-ms-version-id" : "2020-07-13T16:54:55.3188904Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:55 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:55 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B02C09794", + "ETag" : "0x8D8274D780FC228", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9b5d-901e-0077-20f3-12b537000000", - "x-ms-client-request-id" : "1755d434-1d45-4d46-9155-e6b0117e836c" + "x-ms-request-id" : "221a943e-a01e-00a1-7436-594aff000000", + "x-ms-client-request-id" : "1321b107-aa06-475e-afd9-ea106b40e4f5" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6bf032103e1c1/javablobuploadacfail1blockblobapitestuploadacfail6bf5610918f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail7b1805608b477/javablobuploadacfail1blockblobapitestuploadacfail7b118588b7e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d3aed3ff-2003-439a-96bc-cbc6bba73f79" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a098b0fd-c8ed-4ffb-aef9-b5510888be6a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "x-ms-version-id" : "2020-07-13T16:54:54.9346167Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:54 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:55 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B02B9DF39", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:02:50 GMT", + "ETag" : "0x8D8274D77D51F77", + "x-ms-creation-time" : "Mon, 13 Jul 2020 16:54:54 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6a9b71-901e-0077-2cf3-12b537000000", - "x-ms-client-request-id" : "d3aed3ff-2003-439a-96bc-cbc6bba73f79", + "x-ms-request-id" : "db63cff3-801e-006d-4936-5925c9000000", + "x-ms-client-request-id" : "a098b0fd-c8ed-4ffb-aef9-b5510888be6a", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6bf032103e1c1/javablobuploadacfail1blockblobapitestuploadacfail6bf5610918f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail7b1805608b477/javablobuploadacfail1blockblobapitestuploadacfail7b118588b7e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7ce3525a-7d2f-4289-bcc0-94b44c4b30af", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "363324e2-9e9b-458c-823e-4e18bbb7174c", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6a9b79-901e-0077-31f3-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6a9b79-901e-0077-31f3-12b537000000\nTime:2020-04-15T07:02:50.4129867Z", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "7ce3525a-7d2f-4289-bcc0-94b44c4b30af", + "x-ms-request-id" : "15660cc3-b01e-0066-1f36-59dea2000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:15660cc3-b01e-0066-1f36-59dea2000000\nTime:2020-07-13T16:54:56.0457179Z", + "Date" : "Mon, 13 Jul 2020 16:54:55 GMT", + "x-ms-client-request-id" : "363324e2-9e9b-458c-823e-4e18bbb7174c", "Content-Type" : "application/xml" }, "Exception" : null @@ -129,43 +132,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a047c15e-4f28-4df0-94fc-d513fa391292" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd16f880-ed37-4aa1-8d34-b1d934c3e77f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a9b7d-901e-0077-34f3-12b537000000", - "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfail6bf032103e1c1Wed, 15 Apr 2020 07:02:50 GMT\"0x8D7E10B02B14BE1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "a047c15e-4f28-4df0-94fc-d513fa391292", + "x-ms-request-id" : "8dd48c3c-e01e-00a0-1a36-591523000000", + "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfail7b1805608b477Mon, 13 Jul 2020 16:54:54 GMT\"0x8D8274D77A19F69\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:54:56 GMT", + "x-ms-client-request-id" : "fd16f880-ed37-4aa1-8d34-b1d934c3e77f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6bf032103e1c1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail7b1805608b477?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "515ef7a4-bf73-47ee-822b-bb08e114a454" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ecafa7a-fc77-4d81-9278-e22a7b081e42" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a9b84-901e-0077-3af3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "515ef7a4-bf73-47ee-822b-bb08e114a454" + "x-ms-request-id" : "58cfe42c-c01e-0031-0636-597091000000", + "Date" : "Mon, 13 Jul 2020 16:54:56 GMT", + "x-ms-client-request-id" : "4ecafa7a-fc77-4d81-9278-e22a7b081e42" }, "Exception" : null } ], - "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfail6bf032103e1c1", "javablobuploadacfail1blockblobapitestuploadacfail6bf5610918f", "javablobuploadacfail2blockblobapitestuploadacfail6bf66083170" ] + "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfail7b1805608b477", "javablobuploadacfail1blockblobapitestuploadacfail7b118588b7e", "javablobuploadacfail2blockblobapitestuploadacfail7b179923ef8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[4].json index 6efed0ad848a..6460293c01fd 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[4].json @@ -1,117 +1,119 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail0867456602dd5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaile82133901246a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d0dabdb1-dd0a-4a14-bebb-9f76caccbffe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "93115d57-0d89-490e-b2fe-b712a3c52986" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B02E2049B", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "ETag" : "0x8D8274D791A6B21", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a9b8f-901e-0077-43f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "d0dabdb1-dd0a-4a14-bebb-9f76caccbffe" + "x-ms-request-id" : "c181ba32-a01e-008e-6336-594734000000", + "Date" : "Mon, 13 Jul 2020 16:54:56 GMT", + "x-ms-client-request-id" : "93115d57-0d89-490e-b2fe-b712a3c52986" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail0867456602dd5/javablobuploadacfail1blockblobapitestuploadacfail08673739cad", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaile82133901246a/javablobuploadacfail1blockblobapitestuploadacfaile8252166cb3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2183eca9-85f9-4efd-8ea7-a490d914af24", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92f1d276-4a6f-483f-952d-f1652c09becf", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "x-ms-version-id" : "2020-07-13T16:54:57.4113817Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:57 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:56 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B02E9D45D", + "ETag" : "0x8D8274D794F0C19", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9b9d-901e-0077-4ef3-12b537000000", - "x-ms-client-request-id" : "2183eca9-85f9-4efd-8ea7-a490d914af24" + "x-ms-request-id" : "b29e4763-401e-00a9-2b36-5950f0000000", + "x-ms-client-request-id" : "92f1d276-4a6f-483f-952d-f1652c09becf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail0867456602dd5/javablobuploadacfail2blockblobapitestuploadacfail086214672a8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaile82133901246a/javablobuploadacfail2blockblobapitestuploadacfaile8211611e84", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8e223e40-23cc-4c8b-9d0b-0138ba7183d1", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6018485b-ff08-45d1-85ee-9a68c1956261", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "x-ms-version-id" : "2020-07-13T16:54:57.7866483Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:57 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", + "Date" : "Mon, 13 Jul 2020 16:54:56 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B02F12914", + "ETag" : "0x8D8274D79884EF3", "Content-Length" : "0", - "x-ms-request-id" : "cc6a9ba4-901e-0077-55f3-12b537000000", - "x-ms-client-request-id" : "8e223e40-23cc-4c8b-9d0b-0138ba7183d1" + "x-ms-request-id" : "f88d1819-e01e-0009-5e36-59d451000000", + "x-ms-client-request-id" : "6018485b-ff08-45d1-85ee-9a68c1956261" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail0867456602dd5/javablobuploadacfail1blockblobapitestuploadacfail08673739cad?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaile82133901246a/javablobuploadacfail1blockblobapitestuploadacfaile8252166cb3?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e813742e-d9ed-4e5f-831c-bf158905c5be" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "72836595-431c-4bc2-9585-683d2fe7982c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B02E9D45D", - "x-ms-lease-id" : "2f51f5cc-72b3-4a82-aa46-9eba7fa1d268", - "Last-Modified" : "Wed, 15 Apr 2020 07:02:50 GMT", + "ETag" : "0x8D8274D794F0C19", + "x-ms-lease-id" : "82e40b74-fb20-4003-866c-8e56f9fcce57", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6a9bad-901e-0077-5df3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "e813742e-d9ed-4e5f-831c-bf158905c5be" + "x-ms-request-id" : "824af431-001e-003e-4536-5906fd000000", + "Date" : "Mon, 13 Jul 2020 16:54:57 GMT", + "x-ms-client-request-id" : "72836595-431c-4bc2-9585-683d2fe7982c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail0867456602dd5/javablobuploadacfail1blockblobapitestuploadacfail08673739cad", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaile82133901246a/javablobuploadacfail1blockblobapitestuploadacfaile8252166cb3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1c94daa0-eebf-4eb4-ab95-dd7a3cac14bb", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "28ce15c3-2394-4726-95b1-e3321823a25f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "cc6a9bb7-901e-0077-64f3-12b537000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:cc6a9bb7-901e-0077-64f3-12b537000000\nTime:2020-04-15T07:02:50.7432979Z", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "1c94daa0-eebf-4eb4-ab95-dd7a3cac14bb", + "x-ms-request-id" : "a1a9954d-801e-000f-0136-59e7ee000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:a1a9954d-801e-000f-0136-59e7ee000000\nTime:2020-07-13T16:54:58.4849210Z", + "Date" : "Mon, 13 Jul 2020 16:54:58 GMT", + "x-ms-client-request-id" : "28ce15c3-2394-4726-95b1-e3321823a25f", "Content-Type" : "application/xml" }, "Exception" : null @@ -119,43 +121,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ae68b3d1-ce96-43fb-8f4d-a2eb7be6d9e5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf8be29a-b885-4e1d-8955-1f49146a500b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6a9bc4-901e-0077-70f3-12b537000000", - "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfail0867456602dd5Wed, 15 Apr 2020 07:02:50 GMT\"0x8D7E10B02E2049B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:02:49 GMT", - "x-ms-client-request-id" : "ae68b3d1-ce96-43fb-8f4d-a2eb7be6d9e5", + "x-ms-request-id" : "7688bf16-601e-0081-0e36-593158000000", + "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfaile82133901246aMon, 13 Jul 2020 16:54:57 GMT\"0x8D8274D791A6B21\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:54:57 GMT", + "x-ms-client-request-id" : "bf8be29a-b885-4e1d-8955-1f49146a500b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail0867456602dd5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfaile82133901246a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "45ebf6ed-cc72-49df-9a61-71ab3f2379c4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a0e628d-39a3-4539-a3d6-3c3a1c8d2d34" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6a9bcb-901e-0077-76f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:02:50 GMT", - "x-ms-client-request-id" : "45ebf6ed-cc72-49df-9a61-71ab3f2379c4" + "x-ms-request-id" : "cd1ec4d9-601e-0065-1936-593fc6000000", + "Date" : "Mon, 13 Jul 2020 16:54:58 GMT", + "x-ms-client-request-id" : "3a0e628d-39a3-4539-a3d6-3c3a1c8d2d34" }, "Exception" : null } ], - "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfail0867456602dd5", "javablobuploadacfail1blockblobapitestuploadacfail08673739cad", "javablobuploadacfail2blockblobapitestuploadacfail086214672a8" ] + "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfaile82133901246a", "javablobuploadacfail1blockblobapitestuploadacfaile8252166cb3", "javablobuploadacfail2blockblobapitestuploadacfaile8211611e84" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[5].json new file mode 100644 index 000000000000..8d16d4db7a4c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/BlockBlobAPITestuploadacfail[5].json @@ -0,0 +1,140 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6b817670d1621?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4e355f3-c1cd-450b-9542-873f29eedadf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274D7A9729E3", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:59 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1a114a53-501e-0023-4d36-590b41000000", + "Date" : "Mon, 13 Jul 2020 16:54:58 GMT", + "x-ms-client-request-id" : "e4e355f3-c1cd-450b-9542-873f29eedadf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6b817670d1621/javablobuploadacfail1blockblobapitestuploadacfail6b85297834d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd8942ce-e4da-4807-8593-01b9efb5661e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:54:59.8931486Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:54:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:54:58 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D7AC9BC1E", + "Content-Length" : "0", + "x-ms-request-id" : "36b85a2b-101e-001d-0236-599c3e000000", + "x-ms-client-request-id" : "dd8942ce-e4da-4807-8593-01b9efb5661e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6b817670d1621/javablobuploadacfail2blockblobapitestuploadacfail6b8356796e3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46c7e48c-c81b-499d-94b3-ba5633588f92", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T16:55:00.2524043Z", + "Last-Modified" : "Mon, 13 Jul 2020 16:55:00 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 16:55:00 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8274D7B008D8B", + "Content-Length" : "0", + "x-ms-request-id" : "da51920f-201e-0029-7636-59aff6000000", + "x-ms-client-request-id" : "46c7e48c-c81b-499d-94b3-ba5633588f92" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6b817670d1621/javablobuploadacfail1blockblobapitestuploadacfail6b85297834d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7d04682-2489-420d-999b-acce7dae85d6", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "765eb8aa-801e-0030-6a36-592f4d000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:765eb8aa-801e-0030-6a36-592f4d000000\nTime:2020-07-13T16:55:00.6308796Z", + "Date" : "Mon, 13 Jul 2020 16:54:59 GMT", + "x-ms-client-request-id" : "d7d04682-2489-420d-999b-acce7dae85d6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40f46c9c-045e-4bf1-8508-e4b4cd64ddfa" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8dfd79e7-501e-0051-0636-590c0e000000", + "Body" : "jtcuploadacfailjtcuploadacfail0blockblobapitestuploadacfail6b817670d1621Mon, 13 Jul 2020 16:54:59 GMT\"0x8D8274D7A9729E3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 16:55:00 GMT", + "x-ms-client-request-id" : "40f46c9c-045e-4bf1-8508-e4b4cd64ddfa", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadacfail0blockblobapitestuploadacfail6b817670d1621?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52b13184-e3dc-4ff6-a482-acf9af230e97" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "c2028258-c01e-006c-7d36-597a15000000", + "Date" : "Mon, 13 Jul 2020 16:55:00 GMT", + "x-ms-client-request-id" : "52b13184-e3dc-4ff6-a482-acf9af230e97" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadacfail0blockblobapitestuploadacfail6b817670d1621", "javablobuploadacfail1blockblobapitestuploadacfail6b85297834d", "javablobuploadacfail2blockblobapitestuploadacfail6b8356796e3" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistappendblobsflat.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistappendblobsflat.json new file mode 100644 index 000000000000..b73ef1564833 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistappendblobsflat.json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobsflat014733c332544da0b94ff5b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef89ef12-3988-484d-891a-34f9e287bc64" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2EC0F3CB4", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:48 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "00b21707-901e-0013-4bbb-5eb58e000000", + "Date" : "Mon, 20 Jul 2020 17:32:48 GMT", + "x-ms-client-request-id" : "ef89ef12-3988-484d-891a-34f9e287bc64" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobsflat014733c332544da0b94ff5b/javabloblistappendblobsflat1077241b8446bb51b7406", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb6389dc-097f-4432-b90c-020a8e64e0e1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2EC648313", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:49 GMT", + "x-ms-version-id" : "2020-07-20T17:32:49.3689619Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "102c990a-301e-0078-1bbb-5e327a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:32:49 GMT", + "x-ms-client-request-id" : "bb6389dc-097f-4432-b90c-020a8e64e0e1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobsflat014733c332544da0b94ff5b/javabloblistappendblobsflat1077241b8446bb51b7406?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4bfdd6e9-408f-48c2-bb2d-9953f06a2ab6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2EC9C3F08", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:32:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "cfb76eee-101e-0050-54bb-5e53d2000000", + "Date" : "Mon, 20 Jul 2020 17:32:48 GMT", + "x-ms-client-request-id" : "4bfdd6e9-408f-48c2-bb2d-9953f06a2ab6" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobsflat014733c332544da0b94ff5b?prefix=javablob&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ddbebee-abf7-4b75-bad4-dceaa19b1338" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4c17d963-401e-0000-09bb-5e9182000000", + "Body" : "javablobjavabloblistappendblobsflat1077241b8446bb51b74062020-07-20T17:32:49.3689619ZtrueMon, 20 Jul 2020 17:32:49 GMTMon, 20 Jul 2020 17:32:49 GMT0x8D82CD2EC9C3F080application/octet-streamAppendBlobunlockedavailabletruetrue", + "Date" : "Mon, 20 Jul 2020 17:32:49 GMT", + "x-ms-client-request-id" : "2ddbebee-abf7-4b75-bad4-dceaa19b1338", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistappendblobsflat&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d7acb4d-1e74-49e4-9684-ece7e93fe1eb" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "aac9631b-601e-0028-7bbb-5ef02a000000", + "Body" : "jtclistappendblobsflatjtclistappendblobsflat014733c332544da0b94ff5bMon, 20 Jul 2020 17:32:48 GMT\"0x8D82CD2EC0F3CB4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:32:49 GMT", + "x-ms-client-request-id" : "5d7acb4d-1e74-49e4-9684-ece7e93fe1eb", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobsflat014733c332544da0b94ff5b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bfdd4006-5489-4932-a776-bf31095f90df" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "eba70d6b-d01e-003d-68bb-5ee799000000", + "Date" : "Mon, 20 Jul 2020 17:32:50 GMT", + "x-ms-client-request-id" : "bfdd4006-5489-4932-a776-bf31095f90df" + }, + "Exception" : null + } ], + "variables" : [ "jtclistappendblobsflat014733c332544da0b94ff5b", "javabloblistappendblobsflat1077241b8446bb51b7406" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistappendblobshier.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistappendblobshier.json new file mode 100644 index 000000000000..cc6d8688a339 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistappendblobshier.json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobshier011586f9177e65877147429?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1e86f5a5-baed-4c06-b296-2ccbf1392cb2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2F519E46A", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:03 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "243e4c36-201e-0090-0cbb-5eabec000000", + "Date" : "Mon, 20 Jul 2020 17:33:03 GMT", + "x-ms-client-request-id" : "1e86f5a5-baed-4c06-b296-2ccbf1392cb2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobshier011586f9177e65877147429/javabloblistappendblobshier166782466a8f4ca11f4ca", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "581a36bb-0ef2-44c1-a842-eae962e30c5a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2F57ECEF0", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:04 GMT", + "x-ms-version-id" : "2020-07-20T17:33:04.6407920Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b064cad0-101e-0040-31bb-5e96ba000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 20 Jul 2020 17:33:04 GMT", + "x-ms-client-request-id" : "581a36bb-0ef2-44c1-a842-eae962e30c5a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobshier011586f9177e65877147429/javabloblistappendblobshier166782466a8f4ca11f4ca?comp=seal", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd0d283c-ce56-42f3-8b18-683f0168b18d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82CD2F5B63CB8", + "x-ms-blob-sealed" : "true", + "Last-Modified" : "Mon, 20 Jul 2020 17:33:05 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3ab9f852-501e-0041-4cbb-5ec966000000", + "Date" : "Mon, 20 Jul 2020 17:33:04 GMT", + "x-ms-client-request-id" : "bd0d283c-ce56-42f3-8b18-683f0168b18d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobshier011586f9177e65877147429?prefix=javablob&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0aeed63d-6c0e-4a31-926b-2d648b4281a2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "248a1d0a-a01e-0055-75bb-5e8109000000", + "Body" : "javablobjavabloblistappendblobshier166782466a8f4ca11f4ca2020-07-20T17:33:04.6407920ZtrueMon, 20 Jul 2020 17:33:04 GMTMon, 20 Jul 2020 17:33:05 GMT0x8D82CD2F5B63CB80application/octet-streamAppendBlobunlockedavailabletruetrue", + "Date" : "Mon, 20 Jul 2020 17:33:05 GMT", + "x-ms-client-request-id" : "0aeed63d-6c0e-4a31-926b-2d648b4281a2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistappendblobshier&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "859c0072-5850-4702-993b-49ea57012961" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "48b0969d-f01e-0005-46bb-5e4359000000", + "Body" : "jtclistappendblobshierjtclistappendblobshier011586f9177e65877147429Mon, 20 Jul 2020 17:33:03 GMT\"0x8D82CD2F519E46A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 20 Jul 2020 17:33:05 GMT", + "x-ms-client-request-id" : "859c0072-5850-4702-993b-49ea57012961", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistappendblobshier011586f9177e65877147429?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2d353ee-a15a-43e2-affc-8efedf8c03e2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "82d3d131-501e-007e-1bbb-5e01c5000000", + "Date" : "Mon, 20 Jul 2020 17:33:05 GMT", + "x-ms-client-request-id" : "b2d353ee-a15a-43e2-affc-8efedf8c03e2" + }, + "Exception" : null + } ], + "variables" : [ "jtclistappendblobshier011586f9177e65877147429", "javabloblistappendblobshier166782466a8f4ca11f4ca" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflators.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflators.json new file mode 100644 index 000000000000..9803f8fd4bab --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflators.json @@ -0,0 +1,107 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflators0containerapitestlistblobsflatorsa59637709?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d07024dd-1f41-4c49-9df9-1b1b39c9fdc6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82784272BC411", + "Last-Modified" : "Mon, 13 Jul 2020 23:26:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "dadc1a5e-601e-005d-3e6d-594724000000", + "Date" : "Mon, 13 Jul 2020 23:26:21 GMT", + "x-ms-client-request-id" : "d07024dd-1f41-4c49-9df9-1b1b39c9fdc6" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/test1?restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2407cee4-8724-45f8-9035-566088ae4def" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a7f8263e-301e-007f-386d-59823b000000", + "Body" : "bla.txt2020-05-18T09:53:04.5502688ZtrueMon, 18 May 2020 09:53:04 GMTMon, 18 May 2020 09:53:04 GMT0x8D7FB114288CFC90application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletruecompleteempty.txt2020-03-19T18:21:09.4878662ZtrueThu, 19 Mar 2020 18:21:09 GMTThu, 19 Mar 2020 18:21:09 GMT0x8D7CC324C3049C60text/plain1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueempty2.txt2020-03-19T18:36:03.0870309ZtrueThu, 19 Mar 2020 18:36:03 GMTThu, 19 Mar 2020 18:36:03 GMT0x8D7CC3460D0B3250text/plain1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletruecompletejavablobgetpropertiesors2blobapitestgetpropertiesors57d93407b2020-04-21T21:14:42.3905881ZtrueTue, 21 Apr 2020 21:14:42 GMTTue, 21 Apr 2020 21:14:42 GMT0x8D7E6390264E6597application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletruecompletejavablobgetpropertiesors2blobapitestgetpropertiesorsa300090272020-04-21T21:12:08.2403198ZtrueTue, 21 Apr 2020 21:12:08 GMTTue, 21 Apr 2020 21:12:08 GMT0x8D7E638A68348677application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletruecompletenetgetpropertiesors2blobapitestgetpropertiesors2020-04-23T22:04:56.9882747ZtrueThu, 23 Apr 2020 22:04:56 GMTThu, 23 Apr 2020 22:04:56 GMT0x8D7E7D25C0F807B1024application/octet-streameyObQAWrMwC74Eh3CuRM2g==BlockBlobHottrueunlockedavailabletruecompletepythonorstest2020-05-19T08:19:55.0147367ZtrueTue, 19 May 2020 08:19:55 GMTTue, 19 May 2020 08:19:55 GMT0x8D7FBCD695347271024application/octet-streameyObQAWrMwC74Eh3CuRM2g==BlockBlobHottrueunlockedavailabletruecompletetest-blob-19f4217a-3814-436b-a70d-3be4b0c604e22020-04-15T09:03:31.2849799ZtrueWed, 15 Apr 2020 09:03:31 GMTWed, 15 Apr 2020 09:03:31 GMT0x8D7E11BDEB2C86B1024application/octet-streamsVLUBL9mQUUJgLz3ayOPnw==BlockBlobHottrueunlockedavailabletruecomplete", + "Date" : "Mon, 13 Jul 2020 23:26:21 GMT", + "x-ms-client-request-id" : "2407cee4-8724-45f8-9035-566088ae4def", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/test2?restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5153d2bc-ef9a-469c-98b8-4245ff663d0e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6d9b466f-a01e-0084-4f6d-59a8c3000000", + "Body" : "bla.txtMon, 18 May 2020 09:55:04 GMTMon, 18 May 2020 09:55:04 GMT0x8D7FB118A463E240application/octet-streamAAAAAAAAAAA=1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrueempty2.txtThu, 19 Mar 2020 18:37:06 GMTThu, 19 Mar 2020 18:37:06 GMT0x8D7CC3486E43BC60text/plainAAAAAAAAAAA=1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletruejavablobgetpropertiesors2blobapitestgetpropertiesors57d93407b2020-04-21T21:15:42.8141548ZtrueTue, 21 Apr 2020 21:15:42 GMTTue, 21 Apr 2020 21:15:42 GMT0x8D7E6392667E1617application/octet-stream6RYQPwaVsyQ=wh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletruejavablobgetpropertiesors2blobapitestgetpropertiesorsa30009027Tue, 21 Apr 2020 21:13:08 GMTTue, 21 Apr 2020 21:13:08 GMT0x8D7E638CA717B137application/octet-stream6RYQPwaVsyQ=wh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletruenetgetpropertiesors2blobapitestgetpropertiesorsThu, 23 Apr 2020 22:06:35 GMTThu, 23 Apr 2020 22:06:35 GMT0x8D7E7D296E942361024application/octet-streammvPi4gbJB9o=eyObQAWrMwC74Eh3CuRM2g==BlockBlobHottrueunlockedavailabletruepythonorstest2020-05-19T08:22:07.2080089ZtrueTue, 19 May 2020 08:22:07 GMTTue, 19 May 2020 08:22:07 GMT0x8D7FBCDB81E37C01024application/octet-streamBlockBlobHottrueunlockedavailabletruetest-blob-19f4217a-3814-436b-a70d-3be4b0c604e22020-04-15T09:05:43.9282492ZtrueWed, 15 Apr 2020 09:05:43 GMTWed, 15 Apr 2020 09:05:43 GMT0x8D7E11C2DC2456B1024application/octet-stream94WCAc7HFGQ=sVLUBL9mQUUJgLz3ayOPnw==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 13 Jul 2020 23:26:22 GMT", + "x-ms-client-request-id" : "5153d2bc-ef9a-469c-98b8-4245ff663d0e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistblobsflators&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e9a2dc50-309a-41e3-8eff-3fb70f3ca180" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "86a74d5c-d01e-0067-3f6d-595d5c000000", + "Body" : "jtclistblobsflatorsjtclistblobsflators0containerapitestlistblobsflatorsa59637709Mon, 13 Jul 2020 23:26:21 GMT\"0x8D82784272BC411\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 23:26:23 GMT", + "x-ms-client-request-id" : "e9a2dc50-309a-41e3-8eff-3fb70f3ca180", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflators0containerapitestlistblobsflatorsa59637709?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "21e86bfe-fcb7-48ec-ad5c-433a92c2a17d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "ea0167d8-001e-0039-196d-59b6bc000000", + "Date" : "Mon, 13 Jul 2020 23:26:24 GMT", + "x-ms-client-request-id" : "21e86bfe-fcb7-48ec-ad5c-433a92c2a17d" + }, + "Exception" : null + } ], + "variables" : [ "jtclistblobsflators0containerapitestlistblobsflatorsa59637709" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[0].json new file mode 100644 index 000000000000..d866292ae2ba --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[0].json @@ -0,0 +1,112 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority060683109f5e38b69c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61027fca-e401-48a4-803d-cc5e560f6197" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829D7392C56AE", + "Last-Modified" : "Thu, 16 Jul 2020 22:26:02 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "790510da-601e-0017-51c0-5b3889000000", + "Date" : "Thu, 16 Jul 2020 22:26:02 GMT", + "x-ms-client-request-id" : "61027fca-e401-48a4-803d-cc5e560f6197" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority060683109f5e38b69c/javabloblistblobsflatrehydratepriority12444372d7eaebb", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa005ed2-3f47-4d8f-a06f-6a8e51dbb907", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T22:26:03.4703921Z", + "Last-Modified" : "Thu, 16 Jul 2020 22:26:03 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 22:26:02 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829D739A42F1D", + "Content-Length" : "0", + "x-ms-request-id" : "5b111e36-f01e-0077-1fc0-5b4416000000", + "x-ms-client-request-id" : "aa005ed2-3f47-4d8f-a06f-6a8e51dbb907" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority060683109f5e38b69c?restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac10755a-4abd-4819-a748-636bf5a0e4cd" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "46991b0c-001e-0073-66c0-5bc911000000", + "Body" : "javabloblistblobsflatrehydratepriority12444372d7eaebb2020-07-16T22:26:03.4703921ZtrueThu, 16 Jul 2020 22:26:03 GMTThu, 16 Jul 2020 22:26:03 GMT0x8D829D739A42F1D7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 22:26:03 GMT", + "x-ms-client-request-id" : "ac10755a-4abd-4819-a748-636bf5a0e4cd", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistblobsflatrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7d488dab-15a6-4b7e-acb5-2f1718df6e7e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8d747aa5-001e-0097-05c0-5bc78f000000", + "Body" : "jtclistblobsflatrehydratepriorityjtclistblobsflatrehydratepriority060683109f5e38b69cThu, 16 Jul 2020 22:26:02 GMT\"0x8D829D7392C56AE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 22:26:04 GMT", + "x-ms-client-request-id" : "7d488dab-15a6-4b7e-acb5-2f1718df6e7e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority060683109f5e38b69c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fcf3d163-3132-48be-8b6e-d885139f07b8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "7f23133f-301e-0057-6cc0-5b3fb1000000", + "Date" : "Thu, 16 Jul 2020 22:26:04 GMT", + "x-ms-client-request-id" : "fcf3d163-3132-48be-8b6e-d885139f07b8" + }, + "Exception" : null + } ], + "variables" : [ "jtclistblobsflatrehydratepriority060683109f5e38b69c", "javabloblistblobsflatrehydratepriority12444372d7eaebb" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[1].json new file mode 100644 index 000000000000..fd8412485c6e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[1].json @@ -0,0 +1,150 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority02510283cb1cfb28f9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed6ca2af-394d-4e0d-972c-3bdf9926d4d8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829D73AC8EDA0", + "Last-Modified" : "Thu, 16 Jul 2020 22:26:05 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "197775de-201e-0016-69c0-5b6755000000", + "Date" : "Thu, 16 Jul 2020 22:26:04 GMT", + "x-ms-client-request-id" : "ed6ca2af-394d-4e0d-972c-3bdf9926d4d8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority02510283cb1cfb28f9/javabloblistblobsflatrehydratepriority15576601ec6042d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b23ba35a-43ab-4202-b610-599d65cd8ee3", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T22:26:05.8180640Z", + "Last-Modified" : "Thu, 16 Jul 2020 22:26:05 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 22:26:05 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829D73B0A9020", + "Content-Length" : "0", + "x-ms-request-id" : "c6e2d90a-e01e-0026-37c0-5bd99a000000", + "x-ms-client-request-id" : "b23ba35a-43ab-4202-b610-599d65cd8ee3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority02510283cb1cfb28f9/javabloblistblobsflatrehydratepriority15576601ec6042d?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b684a715-9581-4b5f-a055-2f07112aee5a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3f533d23-901e-005e-60c0-5b7a62000000", + "Date" : "Thu, 16 Jul 2020 22:26:05 GMT", + "x-ms-client-request-id" : "b684a715-9581-4b5f-a055-2f07112aee5a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority02510283cb1cfb28f9/javabloblistblobsflatrehydratepriority15576601ec6042d?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7dfb587e-508a-4687-ba1f-9cbfb3c287ba" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "15cab93b-b01e-0082-07c0-5bd03c000000", + "Date" : "Thu, 16 Jul 2020 22:26:05 GMT", + "x-ms-client-request-id" : "7dfb587e-508a-4687-ba1f-9cbfb3c287ba" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority02510283cb1cfb28f9?restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8751554-6938-48d7-9e2d-f4cfdd97747f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a707bfba-d01e-002d-5dc0-5b22f1000000", + "Body" : "javabloblistblobsflatrehydratepriority15576601ec6042d2020-07-16T22:26:05.8180640ZtrueThu, 16 Jul 2020 22:26:05 GMTThu, 16 Jul 2020 22:26:05 GMT0x8D829D73B0A90207application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobArchiverehydrate-pending-to-hotStandardThu, 16 Jul 2020 22:26:06 GMTunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 22:26:06 GMT", + "x-ms-client-request-id" : "f8751554-6938-48d7-9e2d-f4cfdd97747f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistblobsflatrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c73de428-740c-4475-8484-96cd8fccea49" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6e0c727b-201e-004b-31c0-5b6dd1000000", + "Body" : "jtclistblobsflatrehydratepriorityjtclistblobsflatrehydratepriority02510283cb1cfb28f9Thu, 16 Jul 2020 22:26:05 GMT\"0x8D829D73AC8EDA0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 22:26:06 GMT", + "x-ms-client-request-id" : "c73de428-740c-4475-8484-96cd8fccea49", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority02510283cb1cfb28f9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b8b3f9b-0f6f-4cd8-8410-1df5325db2af" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "826b8bce-f01e-0093-52c0-5b4a88000000", + "Date" : "Thu, 16 Jul 2020 22:26:06 GMT", + "x-ms-client-request-id" : "4b8b3f9b-0f6f-4cd8-8410-1df5325db2af" + }, + "Exception" : null + } ], + "variables" : [ "jtclistblobsflatrehydratepriority02510283cb1cfb28f9", "javabloblistblobsflatrehydratepriority15576601ec6042d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[2].json new file mode 100644 index 000000000000..9b34b0a5ba17 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobsflatrehydratepriority[2].json @@ -0,0 +1,150 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority068306476250bc568c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "413e38ed-ba77-45f0-85cb-385b6d5a564f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829D73C6ED8F3", + "Last-Modified" : "Thu, 16 Jul 2020 22:26:08 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fcbbbed7-e01e-007b-0fc0-5bd31e000000", + "Date" : "Thu, 16 Jul 2020 22:26:08 GMT", + "x-ms-client-request-id" : "413e38ed-ba77-45f0-85cb-385b6d5a564f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority068306476250bc568c/javabloblistblobsflatrehydratepriority14802901046ae4f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ff6ffe0-9894-4bec-b007-aeab9e53feef", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T22:26:08.5329982Z", + "Last-Modified" : "Thu, 16 Jul 2020 22:26:08 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 22:26:08 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829D73CA8AD20", + "Content-Length" : "0", + "x-ms-request-id" : "5267847a-b01e-0076-6ec0-5b1bca000000", + "x-ms-client-request-id" : "4ff6ffe0-9894-4bec-b007-aeab9e53feef" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority068306476250bc568c/javabloblistblobsflatrehydratepriority14802901046ae4f?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5972de57-08e7-4b07-b872-c7c44a0e9dfd" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "dbe29e68-001e-0087-56c0-5b02e7000000", + "Date" : "Thu, 16 Jul 2020 22:26:07 GMT", + "x-ms-client-request-id" : "5972de57-08e7-4b07-b872-c7c44a0e9dfd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority068306476250bc568c/javabloblistblobsflatrehydratepriority14802901046ae4f?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f62550c6-e048-459f-9e2a-72ebeae9d167" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "3992f939-601e-005a-26c0-5bf765000000", + "Date" : "Thu, 16 Jul 2020 22:26:09 GMT", + "x-ms-client-request-id" : "f62550c6-e048-459f-9e2a-72ebeae9d167" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority068306476250bc568c?restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f8267cf-52df-47b9-abdf-b8a1d915b1d4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8dc66c37-601e-0091-4bc0-5bf430000000", + "Body" : "javabloblistblobsflatrehydratepriority14802901046ae4f2020-07-16T22:26:08.5329982ZtrueThu, 16 Jul 2020 22:26:08 GMTThu, 16 Jul 2020 22:26:08 GMT0x8D829D73CA8AD207application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobArchiverehydrate-pending-to-hotHighThu, 16 Jul 2020 22:26:09 GMTunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 22:26:08 GMT", + "x-ms-client-request-id" : "2f8267cf-52df-47b9-abdf-b8a1d915b1d4", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistblobsflatrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3f249bd-4981-441a-b670-8db80de377f7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "64a6cf1f-701e-0079-38c0-5b6da6000000", + "Body" : "jtclistblobsflatrehydratepriorityjtclistblobsflatrehydratepriority068306476250bc568cThu, 16 Jul 2020 22:26:08 GMT\"0x8D829D73C6ED8F3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 22:26:09 GMT", + "x-ms-client-request-id" : "c3f249bd-4981-441a-b670-8db80de377f7", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobsflatrehydratepriority068306476250bc568c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "814ee357-ee93-4377-97db-612295d7cb29" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a128b9c9-d01e-005f-15c0-5b25be000000", + "Date" : "Thu, 16 Jul 2020 22:26:10 GMT", + "x-ms-client-request-id" : "814ee357-ee93-4377-97db-612295d7cb29" + }, + "Exception" : null + } ], + "variables" : [ "jtclistblobsflatrehydratepriority068306476250bc568c", "javabloblistblobsflatrehydratepriority14802901046ae4f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierors.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierors.json new file mode 100644 index 000000000000..9ec76ca0880e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierors.json @@ -0,0 +1,107 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierors0containerapitestlistblobshierors3d8486925?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6440d54d-c90b-4c72-85a6-44d65ec36c9b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8278470455EF4", + "Last-Modified" : "Mon, 13 Jul 2020 23:28:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4929ce18-701e-001c-236d-591fc0000000", + "Date" : "Mon, 13 Jul 2020 23:28:24 GMT", + "x-ms-client-request-id" : "6440d54d-c90b-4c72-85a6-44d65ec36c9b" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/test1?prefix=/&delimiter=/&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "179bfd9c-1189-48a6-93e5-8694a3ca545e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "210c151d-301e-0022-726d-5988bf000000", + "Body" : "//", + "Date" : "Mon, 13 Jul 2020 23:28:24 GMT", + "x-ms-client-request-id" : "179bfd9c-1189-48a6-93e5-8694a3ca545e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/test2?prefix=/&delimiter=/&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "058cfb63-f0cb-432e-a3d9-eb41e2bab6a8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "1e1044d0-d01e-0018-5d6d-5905a5000000", + "Body" : "//", + "Date" : "Mon, 13 Jul 2020 23:28:25 GMT", + "x-ms-client-request-id" : "058cfb63-f0cb-432e-a3d9-eb41e2bab6a8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistblobshierors&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d278b929-6978-4505-97ec-b3f060894a90" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5c1900e6-201e-002e-656d-591fb7000000", + "Body" : "jtclistblobshierorsjtclistblobshierors0containerapitestlistblobshierors3d8486925Mon, 13 Jul 2020 23:28:24 GMT\"0x8D8278470455EF4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 23:28:26 GMT", + "x-ms-client-request-id" : "d278b929-6978-4505-97ec-b3f060894a90", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierors0containerapitestlistblobshierors3d8486925?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "97729b9b-8a2a-481e-848e-0bd5cf61b945" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2458a4d8-f01e-0070-7d6d-59f457000000", + "Date" : "Mon, 13 Jul 2020 23:28:26 GMT", + "x-ms-client-request-id" : "97729b9b-8a2a-481e-848e-0bd5cf61b945" + }, + "Exception" : null + } ], + "variables" : [ "jtclistblobshierors0containerapitestlistblobshierors3d8486925" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[0].json new file mode 100644 index 000000000000..280a511b5245 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[0].json @@ -0,0 +1,112 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority0688468e2431e2118a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23cc880f-26fd-4a4d-b946-1821aaac7aa6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829D7B9076006", + "Last-Modified" : "Thu, 16 Jul 2020 22:29:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "3c3fd033-a01e-0008-4dc0-5b8b8d000000", + "Date" : "Thu, 16 Jul 2020 22:29:36 GMT", + "x-ms-client-request-id" : "23cc880f-26fd-4a4d-b946-1821aaac7aa6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority0688468e2431e2118a/javabloblistblobshierrehydratepriority1393252298fce99", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f51d231-1846-4eca-aef9-019d1fd5191a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T22:29:37.8669143Z", + "Last-Modified" : "Thu, 16 Jul 2020 22:29:37 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 22:29:37 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829D7B96EA657", + "Content-Length" : "0", + "x-ms-request-id" : "7906c671-601e-0017-16c0-5b3889000000", + "x-ms-client-request-id" : "3f51d231-1846-4eca-aef9-019d1fd5191a" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority0688468e2431e2118a?delimiter=/&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7d03c33-7f5f-4735-a7d4-165108ed5b01" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ca436a4c-d01e-0060-6ac0-5bed1d000000", + "Body" : "/javabloblistblobshierrehydratepriority1393252298fce992020-07-16T22:29:37.8669143ZtrueThu, 16 Jul 2020 22:29:37 GMTThu, 16 Jul 2020 22:29:37 GMT0x8D829D7B96EA6577application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 22:29:37 GMT", + "x-ms-client-request-id" : "b7d03c33-7f5f-4735-a7d4-165108ed5b01", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistblobshierrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff578cfe-46dd-44fd-af25-0d586552c977" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a926d761-801e-0099-2dc0-5bee3f000000", + "Body" : "jtclistblobshierrehydratepriorityjtclistblobshierrehydratepriority0688468e2431e2118aThu, 16 Jul 2020 22:29:37 GMT\"0x8D829D7B9076006\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 22:29:38 GMT", + "x-ms-client-request-id" : "ff578cfe-46dd-44fd-af25-0d586552c977", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority0688468e2431e2118a?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d24c8d4-352e-4606-bf18-61779fa4ed7b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "46cfdff5-501e-001c-02c0-5bc3e2000000", + "Date" : "Thu, 16 Jul 2020 22:29:38 GMT", + "x-ms-client-request-id" : "1d24c8d4-352e-4606-bf18-61779fa4ed7b" + }, + "Exception" : null + } ], + "variables" : [ "jtclistblobshierrehydratepriority0688468e2431e2118a", "javabloblistblobshierrehydratepriority1393252298fce99" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[1].json new file mode 100644 index 000000000000..cca98ec9f75e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[1].json @@ -0,0 +1,150 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority04614041068277539b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "255ffd7e-d6dc-4ddb-a28e-3a4dc3a7af9c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829D7BAAD9942", + "Last-Modified" : "Thu, 16 Jul 2020 22:29:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "800e0bc2-c01e-0053-52c0-5bb2b6000000", + "Date" : "Thu, 16 Jul 2020 22:29:39 GMT", + "x-ms-client-request-id" : "255ffd7e-d6dc-4ddb-a28e-3a4dc3a7af9c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority04614041068277539b/javabloblistblobshierrehydratepriority10269857ef73c43", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "24266a3d-5894-4f95-9b8d-9f66dbddc269", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T22:29:40.3807036Z", + "Last-Modified" : "Thu, 16 Jul 2020 22:29:40 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 22:29:39 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829D7BAEE393C", + "Content-Length" : "0", + "x-ms-request-id" : "18088cb0-501e-007e-6ac0-5b01c5000000", + "x-ms-client-request-id" : "24266a3d-5894-4f95-9b8d-9f66dbddc269" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority04614041068277539b/javabloblistblobshierrehydratepriority10269857ef73c43?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "24aff4af-a703-4702-af5a-5725bf288937" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "61d04749-201e-0029-45c0-5baff6000000", + "Date" : "Thu, 16 Jul 2020 22:29:40 GMT", + "x-ms-client-request-id" : "24aff4af-a703-4702-af5a-5725bf288937" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority04614041068277539b/javabloblistblobshierrehydratepriority10269857ef73c43?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cb26ad18-c32a-451a-9f87-266dc4c20987" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d84ca203-301e-0025-1ec0-5b38fe000000", + "Date" : "Thu, 16 Jul 2020 22:29:40 GMT", + "x-ms-client-request-id" : "cb26ad18-c32a-451a-9f87-266dc4c20987" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority04614041068277539b?delimiter=/&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32024163-286f-40c6-9b9f-2be62486ccb0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "89a75ce6-101e-000d-01c0-5b5956000000", + "Body" : "/javabloblistblobshierrehydratepriority10269857ef73c432020-07-16T22:29:40.3807036ZtrueThu, 16 Jul 2020 22:29:40 GMTThu, 16 Jul 2020 22:29:40 GMT0x8D829D7BAEE393C7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobArchiverehydrate-pending-to-hotStandardThu, 16 Jul 2020 22:29:41 GMTunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 22:29:40 GMT", + "x-ms-client-request-id" : "32024163-286f-40c6-9b9f-2be62486ccb0", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistblobshierrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "10fadf5d-b3e7-44f1-a259-14ac6643d45f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7f97d186-c01e-006c-03c0-5b7a15000000", + "Body" : "jtclistblobshierrehydratepriorityjtclistblobshierrehydratepriority04614041068277539bThu, 16 Jul 2020 22:29:39 GMT\"0x8D829D7BAAD9942\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 22:29:41 GMT", + "x-ms-client-request-id" : "10fadf5d-b3e7-44f1-a259-14ac6643d45f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority04614041068277539b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab73d67b-5ba2-4aca-98b5-e99e30f53c95" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e292cce9-a01e-0018-56c0-5b4ee5000000", + "Date" : "Thu, 16 Jul 2020 22:29:41 GMT", + "x-ms-client-request-id" : "ab73d67b-5ba2-4aca-98b5-e99e30f53c95" + }, + "Exception" : null + } ], + "variables" : [ "jtclistblobshierrehydratepriority04614041068277539b", "javabloblistblobshierrehydratepriority10269857ef73c43" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[2].json new file mode 100644 index 000000000000..fb35ae1c749c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ContainerAPITestlistblobshierrehydratepriority[2].json @@ -0,0 +1,150 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority039462d734a2e85f46?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "75c8f2c1-085f-40e6-abe1-912bee5b3c70" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829D7BC4AB3C0", + "Last-Modified" : "Thu, 16 Jul 2020 22:29:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9f63f225-201e-0039-43c0-5b6a9e000000", + "Date" : "Thu, 16 Jul 2020 22:29:41 GMT", + "x-ms-client-request-id" : "75c8f2c1-085f-40e6-abe1-912bee5b3c70" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority039462d734a2e85f46/javabloblistblobshierrehydratepriority139710a6c5cbace", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5b83498-006e-43fc-9bca-46d04d2023a8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T22:29:43.0155803Z", + "Last-Modified" : "Thu, 16 Jul 2020 22:29:43 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 22:29:42 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829D7BC80461B", + "Content-Length" : "0", + "x-ms-request-id" : "289838a8-901e-0071-12c0-5b77a9000000", + "x-ms-client-request-id" : "e5b83498-006e-43fc-9bca-46d04d2023a8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority039462d734a2e85f46/javabloblistblobshierrehydratepriority139710a6c5cbace?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f31f14a-7f68-4e42-ad7c-e813a69ea8e8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "df12be2d-801e-0030-66c0-5b2f4d000000", + "Date" : "Thu, 16 Jul 2020 22:29:42 GMT", + "x-ms-client-request-id" : "7f31f14a-7f68-4e42-ad7c-e813a69ea8e8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority039462d734a2e85f46/javabloblistblobshierrehydratepriority139710a6c5cbace?comp=tier", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa6fb409-246a-46e1-89c4-3294ccfad00d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "cfe75b46-e01e-0054-2fc0-5bded5000000", + "Date" : "Thu, 16 Jul 2020 22:29:43 GMT", + "x-ms-client-request-id" : "aa6fb409-246a-46e1-89c4-3294ccfad00d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority039462d734a2e85f46?delimiter=/&restype=container&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aee7c20e-5335-4817-90b0-e88860531bb1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4b980e4f-d01e-004f-2bc0-5be0d6000000", + "Body" : "/javabloblistblobshierrehydratepriority139710a6c5cbace2020-07-16T22:29:43.0155803ZtrueThu, 16 Jul 2020 22:29:43 GMTThu, 16 Jul 2020 22:29:43 GMT0x8D829D7BC80461B7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobArchiverehydrate-pending-to-hotHighThu, 16 Jul 2020 22:29:43 GMTunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 22:29:43 GMT", + "x-ms-client-request-id" : "aee7c20e-5335-4817-90b0-e88860531bb1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtclistblobshierrehydratepriority&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f149e81-e65e-45a1-a57e-acab03ed52d5" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "25391a97-e01e-00a0-7ac0-5b1523000000", + "Body" : "jtclistblobshierrehydratepriorityjtclistblobshierrehydratepriority039462d734a2e85f46Thu, 16 Jul 2020 22:29:42 GMT\"0x8D829D7BC4AB3C0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 22:29:44 GMT", + "x-ms-client-request-id" : "9f149e81-e65e-45a1-a57e-acab03ed52d5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtclistblobshierrehydratepriority039462d734a2e85f46?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b449f867-5e91-4384-ae30-0fea43764a12" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "b01be586-801e-001f-03c0-5b2286000000", + "Date" : "Thu, 16 Jul 2020 22:29:44 GMT", + "x-ms-client-request-id" : "b449f867-5e91-4384-ae30-0fea43764a12" + }, + "Exception" : null + } ], + "variables" : [ "jtclistblobshierrehydratepriority039462d734a2e85f46", "javabloblistblobshierrehydratepriority139710a6c5cbace" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[0].json deleted file mode 100644 index a743dc72290e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse047859355dfd3ad1004f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "11e43952-a241-4e64-a67a-67a36eed5d85" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACE2CEBEF", - "Last-Modified" : "Thu, 07 May 2020 19:14:03 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe589-a01e-0020-2da3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "11e43952-a241-4e64-a67a-67a36eed5d85" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "548420fc-9031-44f9-9ef3-7f76a87410ee" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3a8e-101e-0047-66a3-249d7a000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse047859355dfd3ad1004fThu, 07 May 2020 19:14:03 GMT\"0x8D7F2BACE2CEBEF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "548420fc-9031-44f9-9ef3-7f76a87410ee", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse047859355dfd3ad1004f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a4e0db34-6206-4164-86f7-ebd7f236f590" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe5a5-a01e-0020-48a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "a4e0db34-6206-4164-86f7-ebd7f236f590" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse047859355dfd3ad1004f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[10].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[10].json deleted file mode 100644 index 83a0c311a847..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[10].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse0612118fb0ebc0441148?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4e0f1928-2b0c-41fd-8828-7c74cae329ce" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACFD696BC", - "Last-Modified" : "Thu, 07 May 2020 19:14:06 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe63c-a01e-0020-41a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "4e0f1928-2b0c-41fd-8828-7c74cae329ce" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2fa5da9c-54a5-48ff-b6a7-0fee09bd0e11" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3b9a-101e-0047-42a3-249d7a000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse0612118fb0ebc0441148Thu, 07 May 2020 19:14:06 GMT\"0x8D7F2BACFD696BC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "2fa5da9c-54a5-48ff-b6a7-0fee09bd0e11", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse0612118fb0ebc0441148?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "682ff9f6-b4d3-4b9f-94a2-3eb295aaa0bf" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe644-a01e-0020-47a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "682ff9f6-b4d3-4b9f-94a2-3eb295aaa0bf" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse0612118fb0ebc0441148" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[1].json deleted file mode 100644 index 412b6205c3c8..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse00296616a53ee62a5247?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3c1ebc01-66e8-4631-9753-f422d29b1e93" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACE55C06F", - "Last-Modified" : "Thu, 07 May 2020 19:14:03 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3aa0-101e-0047-78a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "3c1ebc01-66e8-4631-9753-f422d29b1e93" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b6d66af4-58d3-43cf-a7aa-8ed63f91479d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe5b3-a01e-0020-54a3-248d86000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse00296616a53ee62a5247Thu, 07 May 2020 19:14:03 GMT\"0x8D7F2BACE55C06F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "b6d66af4-58d3-43cf-a7aa-8ed63f91479d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse00296616a53ee62a5247?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f86776ad-317d-4111-af3f-79560384f7b5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3aa4-101e-0047-7ba3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "f86776ad-317d-4111-af3f-79560384f7b5" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse00296616a53ee62a5247" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[2].json deleted file mode 100644 index 1a5a15b852a8..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse076574a94aab5fb06d4d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d516f631-b95e-4338-b2e9-75ffc61ca607" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACE7E7B0F", - "Last-Modified" : "Thu, 07 May 2020 19:14:03 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe5bb-a01e-0020-5ca3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "d516f631-b95e-4338-b2e9-75ffc61ca607" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "281a3727-6021-4531-931a-859bf3614d35" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3aac-101e-0047-01a3-249d7a000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse076574a94aab5fb06d4dThu, 07 May 2020 19:14:03 GMT\"0x8D7F2BACE7E7B0F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "281a3727-6021-4531-931a-859bf3614d35", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse076574a94aab5fb06d4d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f1d3c613-ec85-4a6c-934e-e08943468a1d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe5c0-a01e-0020-60a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "f1d3c613-ec85-4a6c-934e-e08943468a1d" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse076574a94aab5fb06d4d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[3].json deleted file mode 100644 index 118a01ca9cdb..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse025047daf181e51f0347?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e211f88e-d68f-4aae-994e-f1b7db5084be" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACEA72875", - "Last-Modified" : "Thu, 07 May 2020 19:14:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3abe-101e-0047-0ea3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "e211f88e-d68f-4aae-994e-f1b7db5084be" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c64f8699-01b1-43a6-8bed-3c73802ad3ff" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe5cd-a01e-0020-6aa3-248d86000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse025047daf181e51f0347Thu, 07 May 2020 19:14:04 GMT\"0x8D7F2BACEA72875\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "c64f8699-01b1-43a6-8bed-3c73802ad3ff", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse025047daf181e51f0347?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3268b3b9-3188-42cf-aaa1-80eb699dc85f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3ad3-101e-0047-20a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "3268b3b9-3188-42cf-aaa1-80eb699dc85f" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse025047daf181e51f0347" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[4].json deleted file mode 100644 index bd43a01c193c..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse0863904145d628e51a4f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f7386514-1fe7-4e1d-83c3-d202b31d5275" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACED00A4F", - "Last-Modified" : "Thu, 07 May 2020 19:14:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe5d7-a01e-0020-71a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "f7386514-1fe7-4e1d-83c3-d202b31d5275" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ae584cda-473e-483a-9480-72ac7c350a2d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3ada-101e-0047-26a3-249d7a000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse0863904145d628e51a4fThu, 07 May 2020 19:14:04 GMT\"0x8D7F2BACED00A4F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "ae584cda-473e-483a-9480-72ac7c350a2d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse0863904145d628e51a4f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dd470c5c-9f2f-400e-86d4-c649220220c7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe5e4-a01e-0020-7da3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "dd470c5c-9f2f-400e-86d4-c649220220c7" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse0863904145d628e51a4f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[5].json deleted file mode 100644 index 55ed8433cba6..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse029572846c5c91409548?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "afea840e-c5b9-4203-afc4-8dda95dc156d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACEF9C947", - "Last-Modified" : "Thu, 07 May 2020 19:14:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3ae8-101e-0047-32a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "afea840e-c5b9-4203-afc4-8dda95dc156d" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cd19957e-011d-416f-b998-556f63f835b8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe5ea-a01e-0020-02a3-248d86000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse029572846c5c91409548Thu, 07 May 2020 19:14:04 GMT\"0x8D7F2BACEF9C947\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "cd19957e-011d-416f-b998-556f63f835b8", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse029572846c5c91409548?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fe593466-6965-4c6b-b61a-4ceed5c4c731" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3afb-101e-0047-44a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:03 GMT", - "x-ms-client-request-id" : "fe593466-6965-4c6b-b61a-4ceed5c4c731" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse029572846c5c91409548" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[6].json deleted file mode 100644 index 158636894f72..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[6].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse08027580f5bd065cc74c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0c00ca60-83c2-413a-9771-3c92f5d09c23" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACF259229", - "Last-Modified" : "Thu, 07 May 2020 19:14:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe5ee-a01e-0020-06a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "0c00ca60-83c2-413a-9771-3c92f5d09c23" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "eb8820a9-d901-45f7-a65a-5024af022320" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3b04-101e-0047-4da3-249d7a000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse08027580f5bd065cc74cThu, 07 May 2020 19:14:04 GMT\"0x8D7F2BACF259229\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "eb8820a9-d901-45f7-a65a-5024af022320", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse08027580f5bd065cc74c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6cf80875-53c3-4e47-95a9-a17af96e4c72" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe602-a01e-0020-13a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "6cf80875-53c3-4e47-95a9-a17af96e4c72" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse08027580f5bd065cc74c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[7].json deleted file mode 100644 index 092fb7dc00bb..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[7].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse077081fdaa0baeb51745?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c3dff626-bcab-49d0-a73b-c8488e525232" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACF51E9B2", - "Last-Modified" : "Thu, 07 May 2020 19:14:05 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3b33-101e-0047-6fa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "c3dff626-bcab-49d0-a73b-c8488e525232" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "124b80d2-fb47-4639-b941-27d0aa0d8c14" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe60f-a01e-0020-1ea3-248d86000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse077081fdaa0baeb51745Thu, 07 May 2020 19:14:05 GMT\"0x8D7F2BACF51E9B2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "124b80d2-fb47-4639-b941-27d0aa0d8c14", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse077081fdaa0baeb51745?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5e4ef5a2-8c58-4ebb-b5fc-4825f17df3f2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3b43-101e-0047-7da3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "5e4ef5a2-8c58-4ebb-b5fc-4825f17df3f2" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse077081fdaa0baeb51745" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[8].json deleted file mode 100644 index 10fee6b042a7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[8].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse0059768c4a74d9eb6340?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "57aa9de1-3f4a-42a9-9f6e-981ca694058c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACF7ACBD0", - "Last-Modified" : "Thu, 07 May 2020 19:14:05 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe615-a01e-0020-24a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "57aa9de1-3f4a-42a9-9f6e-981ca694058c" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8d80a67d-1e38-4cd3-ac9a-2e4ed800b5aa" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3b54-101e-0047-0ca3-249d7a000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse0059768c4a74d9eb6340Thu, 07 May 2020 19:14:05 GMT\"0x8D7F2BACF7ACBD0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "8d80a67d-1e38-4cd3-ac9a-2e4ed800b5aa", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse0059768c4a74d9eb6340?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cbfc5b62-fde4-4df4-bea9-99422a9b70a9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe629-a01e-0020-33a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "cbfc5b62-fde4-4df4-bea9-99422a9b70a9" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse0059768c4a74d9eb6340" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[9].json deleted file mode 100644 index ed636bf4ea8d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparse[9].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse01109263647243f8334f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "256ffe07-c1f2-48ab-b7a7-361beca211d7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACFA834E7", - "Last-Modified" : "Thu, 07 May 2020 19:14:05 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3b65-101e-0047-1ca3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:04 GMT", - "x-ms-client-request-id" : "256ffe07-c1f2-48ab-b7a7-361beca211d7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "09c6ddb8-9b5d-45f0-b938-aad51be1131f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe62f-a01e-0020-37a3-248d86000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse01109263647243f8334fThu, 07 May 2020 19:14:05 GMT\"0x8D7F2BACFA834E7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "09c6ddb8-9b5d-45f0-b938-aad51be1131f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparse01109263647243f8334f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2bdcb0c1-a128-4d1e-b727-f3c733a416ed" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3b74-101e-0047-28a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "2bdcb0c1-a128-4d1e-b727-f3c733a416ed" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse01109263647243f8334f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparseia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparseia.json deleted file mode 100644 index 64ad72577409..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionsparseia.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparseia013563fd8e7746e6984?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "00500432-453e-43d6-94a0-ef47980edf54" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD0044DE0", - "Last-Modified" : "Thu, 07 May 2020 19:14:06 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3ba5-101e-0047-4ca3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "00500432-453e-43d6-94a0-ef47980edf54" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionsparseia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c6669f44-e7bd-4bfb-8c0c-360e069737d4" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe654-a01e-0020-55a3-248d86000000", - "Body" : "jtcaccountsaspermissionsparseiajtcaccountsaspermissionsparseia013563fd8e7746e6984Thu, 07 May 2020 19:14:06 GMT\"0x8D7F2BAD0044DE0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "c6669f44-e7bd-4bfb-8c0c-360e069737d4", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionsparseia013563fd8e7746e6984?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2b5288e9-ca52-49ba-919a-4af886197999" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3bbc-101e-0047-60a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "2b5288e9-ca52-49ba-919a-4af886197999" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparseia013563fd8e7746e6984" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[0].json deleted file mode 100644 index b900d51d68bd..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring054545b7a528f6eceb?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bf11fdcf-3890-4a15-910d-3ace7fb9b652" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACC5E994D", - "Last-Modified" : "Thu, 07 May 2020 19:14:00 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe494-a01e-0020-69a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "bf11fdcf-3890-4a15-910d-3ace7fb9b652" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5788aa9b-1d1c-47c9-95ad-9e18545cd0ca" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3924-101e-0047-42a3-249d7a000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring054545b7a528f6ecebThu, 07 May 2020 19:14:00 GMT\"0x8D7F2BACC5E994D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "5788aa9b-1d1c-47c9-95ad-9e18545cd0ca", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring054545b7a528f6eceb?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "28e5f695-69fe-424e-8188-477123b9b38a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe4b3-a01e-0020-01a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "28e5f695-69fe-424e-8188-477123b9b38a" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring054545b7a528f6eceb" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[1].json deleted file mode 100644 index 84a955a66742..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring023410279843719a7d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ec056961-b9a3-448a-8358-ab61a99882fc" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACC8E9BB9", - "Last-Modified" : "Thu, 07 May 2020 19:14:00 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3936-101e-0047-54a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "ec056961-b9a3-448a-8358-ab61a99882fc" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "372fd5bd-bf32-4588-965a-6fa8fc6df3ac" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe4c4-a01e-0020-0fa3-248d86000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring023410279843719a7dThu, 07 May 2020 19:14:00 GMT\"0x8D7F2BACC8E9BB9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "372fd5bd-bf32-4588-965a-6fa8fc6df3ac", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring023410279843719a7d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4f385e55-380d-49a3-9a02-5fcfc1d5b543" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3946-101e-0047-60a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "4f385e55-380d-49a3-9a02-5fcfc1d5b543" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring023410279843719a7d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[2].json deleted file mode 100644 index 3d3ae7942ed3..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring082316b1e2c5cfe86e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "86053ef1-e514-472d-9430-8cb8125ee1d5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACCBAB24E", - "Last-Modified" : "Thu, 07 May 2020 19:14:00 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe4cd-a01e-0020-15a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "86053ef1-e514-472d-9430-8cb8125ee1d5" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a2a6d1d4-3b49-4c82-affc-175e289d2883" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3952-101e-0047-6ca3-249d7a000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring082316b1e2c5cfe86eThu, 07 May 2020 19:14:00 GMT\"0x8D7F2BACCBAB24E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "a2a6d1d4-3b49-4c82-affc-175e289d2883", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring082316b1e2c5cfe86e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f45b3647-866a-4ce0-828e-a239e3db6cf3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe4d6-a01e-0020-1ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "f45b3647-866a-4ce0-828e-a239e3db6cf3" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring082316b1e2c5cfe86e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[3].json deleted file mode 100644 index 0d0a43b84952..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring03914060e78db47536?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1b7038d7-1a78-4ea8-8ea9-c3047df78644" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACCE9CA41", - "Last-Modified" : "Thu, 07 May 2020 19:14:01 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f397d-101e-0047-0ca3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "1b7038d7-1a78-4ea8-8ea9-c3047df78644" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a6eba124-189f-465d-ab42-20cabc0a6930" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe4ec-a01e-0020-2da3-248d86000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring03914060e78db47536Thu, 07 May 2020 19:14:01 GMT\"0x8D7F2BACCE9CA41\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "a6eba124-189f-465d-ab42-20cabc0a6930", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring03914060e78db47536?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e637ec6a-6bd8-4072-8900-9dcb303ae626" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3999-101e-0047-22a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "e637ec6a-6bd8-4072-8900-9dcb303ae626" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring03914060e78db47536" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[4].json deleted file mode 100644 index dbd9daab4cf4..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring058507e5f6ea175cd1?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "67c7e952-c291-44da-bec7-f436878decbd" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACD18A0A1", - "Last-Modified" : "Thu, 07 May 2020 19:14:01 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe4f9-a01e-0020-39a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "67c7e952-c291-44da-bec7-f436878decbd" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6edd6270-e965-4d28-9460-5164e02e5223" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f39b9-101e-0047-3fa3-249d7a000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring058507e5f6ea175cd1Thu, 07 May 2020 19:14:01 GMT\"0x8D7F2BACD18A0A1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:00 GMT", - "x-ms-client-request-id" : "6edd6270-e965-4d28-9460-5164e02e5223", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring058507e5f6ea175cd1?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "56f89f22-d991-40e5-993e-0e5f981192d3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe513-a01e-0020-4fa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "56f89f22-d991-40e5-993e-0e5f981192d3" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring058507e5f6ea175cd1" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[5].json deleted file mode 100644 index a07c034c5789..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring012211e4f5813e1344?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f433579b-2b4c-46c7-9839-d0dec00a6809" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACD509451", - "Last-Modified" : "Thu, 07 May 2020 19:14:01 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f39d2-101e-0047-4fa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "f433579b-2b4c-46c7-9839-d0dec00a6809" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6669c73f-5449-4788-abbb-a41c4a0a86c9" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe51d-a01e-0020-57a3-248d86000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring012211e4f5813e1344Thu, 07 May 2020 19:14:01 GMT\"0x8D7F2BACD509451\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "6669c73f-5449-4788-abbb-a41c4a0a86c9", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring012211e4f5813e1344?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "22323e04-f5b0-41d4-b37b-d78c060dfc3b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f39e3-101e-0047-5ea3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "22323e04-f5b0-41d4-b37b-d78c060dfc3b" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring012211e4f5813e1344" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[6].json deleted file mode 100644 index 7ea2e2711c5a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[6].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring099977e3ab3d43b324?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4f4092e4-ef67-4273-a009-53f13dff20ed" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACD7D958D", - "Last-Modified" : "Thu, 07 May 2020 19:14:02 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe52b-a01e-0020-63a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "4f4092e4-ef67-4273-a009-53f13dff20ed" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a90fa300-0405-47b3-9718-9c4a120fcaa6" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3a00-101e-0047-6da3-249d7a000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring099977e3ab3d43b324Thu, 07 May 2020 19:14:02 GMT\"0x8D7F2BACD7D958D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "a90fa300-0405-47b3-9718-9c4a120fcaa6", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring099977e3ab3d43b324?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "248b3bc5-4802-48ea-84b7-8a6638c50c4e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe532-a01e-0020-69a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "248b3bc5-4802-48ea-84b7-8a6638c50c4e" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring099977e3ab3d43b324" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[7].json deleted file mode 100644 index 9f159b198e7d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[7].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring005919b21ea3b75812?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d83c9aa2-a139-40ef-b8b1-6cf56f5b7017" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACDACAD4A", - "Last-Modified" : "Thu, 07 May 2020 19:14:02 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3a0f-101e-0047-7aa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "d83c9aa2-a139-40ef-b8b1-6cf56f5b7017" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b5ecac6f-04e3-40fc-8934-6340929f6b7f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe54b-a01e-0020-7ea3-248d86000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring005919b21ea3b75812Thu, 07 May 2020 19:14:02 GMT\"0x8D7F2BACDACAD4A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "b5ecac6f-04e3-40fc-8934-6340929f6b7f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring005919b21ea3b75812?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "98bfab8a-f11b-4c96-94b7-c13ebf6ea149" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3a1c-101e-0047-03a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:01 GMT", - "x-ms-client-request-id" : "98bfab8a-f11b-4c96-94b7-c13ebf6ea149" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring005919b21ea3b75812" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[8].json deleted file mode 100644 index e2dcc8695c07..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[8].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring0182422f3254765358?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0155929a-3552-4dc1-951f-c5ce280242a1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACDD6EEE5", - "Last-Modified" : "Thu, 07 May 2020 19:14:02 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe55e-a01e-0020-0ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "0155929a-3552-4dc1-951f-c5ce280242a1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "29526ce3-052f-42bd-8d02-70ac72bb8d58" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3a35-101e-0047-1aa3-249d7a000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring0182422f3254765358Thu, 07 May 2020 19:14:02 GMT\"0x8D7F2BACDD6EEE5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "29526ce3-052f-42bd-8d02-70ac72bb8d58", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring0182422f3254765358?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "928b0c9f-d2f5-4e4a-8ea6-158d7d991def" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe568-a01e-0020-12a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "928b0c9f-d2f5-4e4a-8ea6-158d7d991def" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring0182422f3254765358" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[9].json deleted file mode 100644 index c2fa6c4b244c..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsaspermissionstostring[9].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring076779c0f3a5444c41?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "537db12d-0ff3-4b19-b928-8c24123026f6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACE014A6B", - "Last-Modified" : "Thu, 07 May 2020 19:14:03 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3a5a-101e-0047-3ca3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "537db12d-0ff3-4b19-b928-8c24123026f6" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c69475cc-674d-4fcd-96d5-371a39a1c9ee" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe57a-a01e-0020-21a3-248d86000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring076779c0f3a5444c41Thu, 07 May 2020 19:14:03 GMT\"0x8D7F2BACE014A6B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "c69475cc-674d-4fcd-96d5-371a39a1c9ee", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsaspermissionstostring076779c0f3a5444c41?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e4ebdff2-410b-476b-9acf-c85c9a639e79" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3a73-101e-0047-4ea3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:02 GMT", - "x-ms-client-request-id" : "e4ebdff2-410b-476b-9acf-c85c9a639e79" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring076779c0f3a5444c41" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeia.json deleted file mode 100644 index a9ae9a80335e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeia.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeia02550749929714e5da4ee?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "deb3d407-3c57-4275-928c-4ade45f32671" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD1924735", - "Last-Modified" : "Thu, 07 May 2020 19:14:09 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe732-a01e-0020-7ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "deb3d407-3c57-4275-928c-4ade45f32671" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypeia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "82cf8a06-ff90-4256-8f41-056cb29b24e4" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3caf-101e-0047-1fa3-249d7a000000", - "Body" : "jtcaccountsasresourcetypeiajtcaccountsasresourcetypeia02550749929714e5da4eeThu, 07 May 2020 19:14:09 GMT\"0x8D7F2BAD1924735\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "82cf8a06-ff90-4256-8f41-056cb29b24e4", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeia02550749929714e5da4ee?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3a64f018-7ad5-4e37-a91b-7662489972a2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe747-a01e-0020-09a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "3a64f018-7ad5-4e37-a91b-7662489972a2" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeia02550749929714e5da4ee" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[0].json deleted file mode 100644 index ec2d5ef3785f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeparse012045d2f60fb57edc4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f1b4a8f2-19e4-4fdf-879f-bc905d4a4e87" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD0F0889C", - "Last-Modified" : "Thu, 07 May 2020 19:14:07 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe6e8-a01e-0020-46a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "f1b4a8f2-19e4-4fdf-879f-bc905d4a4e87" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "28abbc7f-d37f-4455-b4d2-9731afa02a61" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3c3b-101e-0047-42a3-249d7a000000", - "Body" : "jtcaccountsasresourcetypeparsejtcaccountsasresourcetypeparse012045d2f60fb57edc4Thu, 07 May 2020 19:14:07 GMT\"0x8D7F2BAD0F0889C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "28abbc7f-d37f-4455-b4d2-9731afa02a61", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeparse012045d2f60fb57edc4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "817e2520-0332-45e1-8809-23bfddb1bcf7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe705-a01e-0020-58a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "817e2520-0332-45e1-8809-23bfddb1bcf7" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeparse012045d2f60fb57edc4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[1].json deleted file mode 100644 index b4b907bb8a11..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeparse0876682214dc61bbac4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bb5a2a31-e116-4f96-bab8-f1984e33a4b1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD1193562", - "Last-Modified" : "Thu, 07 May 2020 19:14:08 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3c61-101e-0047-60a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "bb5a2a31-e116-4f96-bab8-f1984e33a4b1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c2557ccb-f885-416b-80c7-a75713afe7cf" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe712-a01e-0020-61a3-248d86000000", - "Body" : "jtcaccountsasresourcetypeparsejtcaccountsasresourcetypeparse0876682214dc61bbac4Thu, 07 May 2020 19:14:08 GMT\"0x8D7F2BAD1193562\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "c2557ccb-f885-416b-80c7-a75713afe7cf", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeparse0876682214dc61bbac4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "aff37336-5bbf-4d1e-a708-7920b4ab591f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3c6d-101e-0047-6ba3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "aff37336-5bbf-4d1e-a708-7920b4ab591f" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeparse0876682214dc61bbac4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[2].json deleted file mode 100644 index 3887baeb8b12..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeparse039287f55c33f144dd4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7f244a57-46cd-4095-aee2-295d970459a7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD141F0C4", - "Last-Modified" : "Thu, 07 May 2020 19:14:08 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe718-a01e-0020-67a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "7f244a57-46cd-4095-aee2-295d970459a7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c918e29c-73f9-4bf7-872d-2d9bcea3d3d1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3c79-101e-0047-73a3-249d7a000000", - "Body" : "jtcaccountsasresourcetypeparsejtcaccountsasresourcetypeparse039287f55c33f144dd4Thu, 07 May 2020 19:14:08 GMT\"0x8D7F2BAD141F0C4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "c918e29c-73f9-4bf7-872d-2d9bcea3d3d1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeparse039287f55c33f144dd4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0e597010-ab98-4c96-806f-85e894dab6dd" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe72a-a01e-0020-74a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "0e597010-ab98-4c96-806f-85e894dab6dd" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeparse039287f55c33f144dd4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[3].json deleted file mode 100644 index 970514acb66d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypeparse[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeparse0573548681fb8b7af04?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e7c6ad0a-a252-4758-a218-c1b5cdce54c6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD16A4F50", - "Last-Modified" : "Thu, 07 May 2020 19:14:08 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3c85-101e-0047-7da3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "e7c6ad0a-a252-4758-a218-c1b5cdce54c6" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ee41fa12-d99a-4e3b-b229-74a165525a9a" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe72c-a01e-0020-76a3-248d86000000", - "Body" : "jtcaccountsasresourcetypeparsejtcaccountsasresourcetypeparse0573548681fb8b7af04Thu, 07 May 2020 19:14:08 GMT\"0x8D7F2BAD16A4F50\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "ee41fa12-d99a-4e3b-b229-74a165525a9a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypeparse0573548681fb8b7af04?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8adc89e3-5cb9-4e7d-955e-01e6eacc55c9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3c9b-101e-0047-0fa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "8adc89e3-5cb9-4e7d-955e-01e6eacc55c9" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeparse0573548681fb8b7af04" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[0].json deleted file mode 100644 index 0fce110d7c34..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypetostring0083916662e8c0907b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4026dcb8-7559-439d-a57d-880572f79876" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD031EC60", - "Last-Modified" : "Thu, 07 May 2020 19:14:06 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe66c-a01e-0020-6ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "4026dcb8-7559-439d-a57d-880572f79876" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7b9560c6-0fb9-4cef-bd55-74ade097ed87" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3bc7-101e-0047-6aa3-249d7a000000", - "Body" : "jtcaccountsasresourcetypetostringjtcaccountsasresourcetypetostring0083916662e8c0907bThu, 07 May 2020 19:14:06 GMT\"0x8D7F2BAD031EC60\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:05 GMT", - "x-ms-client-request-id" : "7b9560c6-0fb9-4cef-bd55-74ade097ed87", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypetostring0083916662e8c0907b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ee5173b7-024a-42e3-a034-4ee364e9bb66" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe67e-a01e-0020-76a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "ee5173b7-024a-42e3-a034-4ee364e9bb66" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypetostring0083916662e8c0907b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[1].json deleted file mode 100644 index 94429d8cb224..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypetostring0013534cc6be52d303?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cb1e199d-b7a8-4d45-ab2d-78f3ffd4bce0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD0660D8F", - "Last-Modified" : "Thu, 07 May 2020 19:14:07 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3bcf-101e-0047-70a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "cb1e199d-b7a8-4d45-ab2d-78f3ffd4bce0" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a97f1806-3d7e-4801-ac9c-0ccd0ef0791a" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe69e-a01e-0020-0ea3-248d86000000", - "Body" : "jtcaccountsasresourcetypetostringjtcaccountsasresourcetypetostring0013534cc6be52d303Thu, 07 May 2020 19:14:07 GMT\"0x8D7F2BAD0660D8F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "a97f1806-3d7e-4801-ac9c-0ccd0ef0791a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypetostring0013534cc6be52d303?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bb00bb3a-50a8-4eff-81b0-604c41accd97" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3bf2-101e-0047-06a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "bb00bb3a-50a8-4eff-81b0-604c41accd97" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypetostring0013534cc6be52d303" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[2].json deleted file mode 100644 index 36d4c5d11e68..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypetostring08327739c33073e9ed?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2dd68d37-9d2c-477d-84e0-2137412e4979" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD0930FB5", - "Last-Modified" : "Thu, 07 May 2020 19:14:07 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe6bb-a01e-0020-22a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "2dd68d37-9d2c-477d-84e0-2137412e4979" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1162710f-9c39-4358-96db-5b6fcfd36a03" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3c03-101e-0047-12a3-249d7a000000", - "Body" : "jtcaccountsasresourcetypetostringjtcaccountsasresourcetypetostring08327739c33073e9edThu, 07 May 2020 19:14:07 GMT\"0x8D7F2BAD0930FB5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "1162710f-9c39-4358-96db-5b6fcfd36a03", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypetostring08327739c33073e9ed?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d2f53036-f23f-4d91-86a6-1e290d9b6508" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe6c0-a01e-0020-26a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "d2f53036-f23f-4d91-86a6-1e290d9b6508" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypetostring08327739c33073e9ed" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[3].json deleted file mode 100644 index ca2a3a89678b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsasresourcetypetostring[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypetostring030726aed6529a7b68?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ce38a8ca-e840-4285-ad90-883a4de87fad" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD0BEF171", - "Last-Modified" : "Thu, 07 May 2020 19:14:07 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3c0f-101e-0047-1aa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "ce38a8ca-e840-4285-ad90-883a4de87fad" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsasresourcetypetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1b1389a9-ad10-4e1c-ae68-c7cf33c7e339" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe6e2-a01e-0020-42a3-248d86000000", - "Body" : "jtcaccountsasresourcetypetostringjtcaccountsasresourcetypetostring030726aed6529a7b68Thu, 07 May 2020 19:14:07 GMT\"0x8D7F2BAD0BEF171\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:07 GMT", - "x-ms-client-request-id" : "1b1389a9-ad10-4e1c-ae68-c7cf33c7e339", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsasresourcetypetostring030726aed6529a7b68?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "59d82a1b-aa49-49c8-8b8a-eb8fc7d06a57" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3c33-101e-0047-3aa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:06 GMT", - "x-ms-client-request-id" : "59d82a1b-aa49-49c8-8b8a-eb8fc7d06a57" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypetostring030726aed6529a7b68" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[0].json deleted file mode 100644 index 8ff110a1cbf7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturesstringtosign0538896227219ef06?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c8cbb00b-9f8e-4965-8eae-a734340b9cea" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACAECFC0C", - "Last-Modified" : "Thu, 07 May 2020 19:13:57 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe3e0-a01e-0020-59a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "c8cbb00b-9f8e-4965-8eae-a734340b9cea" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bf45a6ab-ff68-42d5-8655-1aa7c25a0bf1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f37e5-101e-0047-35a3-249d7a000000", - "Body" : "jtcaccountsassignaturesstringtosignjtcaccountsassignaturesstringtosign0538896227219ef06Thu, 07 May 2020 19:13:57 GMT\"0x8D7F2BACAECFC0C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "bf45a6ab-ff68-42d5-8655-1aa7c25a0bf1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturesstringtosign0538896227219ef06?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d16a08b7-08c4-437b-8029-1b7e508eb554" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe3fa-a01e-0020-6ea3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "d16a08b7-08c4-437b-8029-1b7e508eb554" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturesstringtosign0538896227219ef06" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[1].json deleted file mode 100644 index df17c689ee83..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturesstringtosign0616928009d40df37?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0a9942de-c54f-4834-aaa0-e2c2aafa9f45" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACB23420E", - "Last-Modified" : "Thu, 07 May 2020 19:13:58 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f380f-101e-0047-5ba3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "0a9942de-c54f-4834-aaa0-e2c2aafa9f45" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c915c5d3-f5ff-4057-b13f-f693db44f1b6" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe406-a01e-0020-77a3-248d86000000", - "Body" : "jtcaccountsassignaturesstringtosignjtcaccountsassignaturesstringtosign0616928009d40df37Thu, 07 May 2020 19:13:58 GMT\"0x8D7F2BACB23420E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "c915c5d3-f5ff-4057-b13f-f693db44f1b6", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturesstringtosign0616928009d40df37?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "35571fd8-d5ea-428d-97e3-bf1d4e29474f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f381f-101e-0047-65a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "35571fd8-d5ea-428d-97e3-bf1d4e29474f" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturesstringtosign0616928009d40df37" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[2].json deleted file mode 100644 index 0dcee3e01fa6..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturesstringtosign[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturesstringtosign0520101b30dada29c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9187a960-b6d0-4276-9dc3-478af5fbc021" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACB4C987B", - "Last-Modified" : "Thu, 07 May 2020 19:13:58 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe41d-a01e-0020-06a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "9187a960-b6d0-4276-9dc3-478af5fbc021" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "892be050-f01f-4a86-b4e6-6dbd2a3f901c" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3831-101e-0047-77a3-249d7a000000", - "Body" : "jtcaccountsassignaturesstringtosignjtcaccountsassignaturesstringtosign0520101b30dada29cThu, 07 May 2020 19:13:58 GMT\"0x8D7F2BACB4C987B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "892be050-f01f-4a86-b4e6-6dbd2a3f901c", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturesstringtosign0520101b30dada29c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5afc8dc7-7780-4d94-ba01-546d0e3de7ae" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe423-a01e-0020-0aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "5afc8dc7-7780-4d94-ba01-546d0e3de7ae" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturesstringtosign0520101b30dada29c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[0].json deleted file mode 100644 index a4192c29b181..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia00205761e9f07837d14?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c19ec296-c315-4d42-a0a1-f3fd83716357" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACB785477", - "Last-Modified" : "Thu, 07 May 2020 19:13:58 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3846-101e-0047-0ca3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "c19ec296-c315-4d42-a0a1-f3fd83716357" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c9166fba-fe51-4dd1-95cf-315819a968b6" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe42a-a01e-0020-10a3-248d86000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia00205761e9f07837d14Thu, 07 May 2020 19:13:58 GMT\"0x8D7F2BACB785477\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "c9166fba-fe51-4dd1-95cf-315819a968b6", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia00205761e9f07837d14?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b310662a-6a56-4082-aa13-567c476541da" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3854-101e-0047-17a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "b310662a-6a56-4082-aa13-567c476541da" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia00205761e9f07837d14" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[1].json deleted file mode 100644 index 8cc4606a2dee..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia028234c7c937c4fd774?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "06e0a74c-97c9-4e26-b638-706eb1077adf" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACBA6671C", - "Last-Modified" : "Thu, 07 May 2020 19:13:59 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe42f-a01e-0020-15a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "06e0a74c-97c9-4e26-b638-706eb1077adf" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2cdbb5bf-ee6b-4a26-9ddf-13e8674d7175" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3877-101e-0047-33a3-249d7a000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia028234c7c937c4fd774Thu, 07 May 2020 19:13:59 GMT\"0x8D7F2BACBA6671C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "2cdbb5bf-ee6b-4a26-9ddf-13e8674d7175", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia028234c7c937c4fd774?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5d53162e-4b34-4892-829f-c18f5db5de80" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe43f-a01e-0020-20a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "5d53162e-4b34-4892-829f-c18f5db5de80" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia028234c7c937c4fd774" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[2].json deleted file mode 100644 index 388a3a2c9637..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia042850359028b854ac4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2c36b173-c209-4cf2-9fc4-29d14417075e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACBD5F473", - "Last-Modified" : "Thu, 07 May 2020 19:13:59 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3891-101e-0047-4aa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "2c36b173-c209-4cf2-9fc4-29d14417075e" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3272ee29-cdcf-4831-a436-010ee7a973a5" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe452-a01e-0020-32a3-248d86000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia042850359028b854ac4Thu, 07 May 2020 19:13:59 GMT\"0x8D7F2BACBD5F473\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "3272ee29-cdcf-4831-a436-010ee7a973a5", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia042850359028b854ac4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ab418b75-cd3b-4160-b39e-6f2788c5ae94" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f38a1-101e-0047-56a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "ab418b75-cd3b-4160-b39e-6f2788c5ae94" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia042850359028b854ac4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[3].json deleted file mode 100644 index 436402c5b319..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia058766d3713312f9684?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2aff5191-05a8-42a1-907d-f439a4e681ac" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACC045572", - "Last-Modified" : "Thu, 07 May 2020 19:13:59 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe45c-a01e-0020-3aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "2aff5191-05a8-42a1-907d-f439a4e681ac" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "84118e00-40a1-4770-9e6e-d0c0596b0527" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f38ae-101e-0047-62a3-249d7a000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia058766d3713312f9684Thu, 07 May 2020 19:13:59 GMT\"0x8D7F2BACC045572\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:58 GMT", - "x-ms-client-request-id" : "84118e00-40a1-4770-9e6e-d0c0596b0527", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia058766d3713312f9684?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "afc0a05c-622d-43f6-8aea-0f833546319f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe463-a01e-0020-40a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "afc0a05c-622d-43f6-8aea-0f833546319f" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia058766d3713312f9684" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[4].json deleted file mode 100644 index 8e92890fc44b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestaccountsassignaturevaluesia[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia018998c681cf6bc4db4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b77a2264-8d47-4b07-83d4-51f9b4afb8be" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACC31BF3D", - "Last-Modified" : "Thu, 07 May 2020 19:13:59 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f38cb-101e-0047-7ba3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "b77a2264-8d47-4b07-83d4-51f9b4afb8be" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "58c34afb-7d3d-4040-9366-782ab407db1f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe484-a01e-0020-5ba3-248d86000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia018998c681cf6bc4db4Thu, 07 May 2020 19:13:59 GMT\"0x8D7F2BACC31BF3D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "58c34afb-7d3d-4040-9366-782ab407db1f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcaccountsassignaturevaluesia018998c681cf6bc4db4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "043924fa-69b5-453a-88ca-bd1997e1c4c3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f38eb-101e-0047-14a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:59 GMT", - "x-ms-client-request-id" : "043924fa-69b5-453a-88ca-bd1997e1c4c3" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia018998c681cf6bc4db4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[0].json index a8403797f2ab..5744ae228a1c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[0].json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrange0helpertestblobrange499385029beba560650?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0helpertestblobrange1f202400375b4a0ea9d?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a59d3b50-b329-4bfc-8978-baa88f5097e7" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5326a61c-f27f-455d-9461-424c00ef3d99" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABBC4CD33", - "Last-Modified" : "Thu, 07 May 2020 19:13:32 GMT", + "ETag" : "0x8D8291CBA35C62B", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "eb8fdb17-a01e-0020-32a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "a59d3b50-b329-4bfc-8978-baa88f5097e7" + "x-ms-request-id" : "d8bc88b9-b01e-0049-1705-5bd369000000", + "Date" : "Thu, 16 Jul 2020 00:11:02 GMT", + "x-ms-client-request-id" : "5326a61c-f27f-455d-9461-424c00ef3d99" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobrange&comp=list", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrange&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6a7c4ab0-8abe-4dc3-b8c9-c772349bf73b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff4b17a4-50db-4f87-84bf-e80ee8aa21e1" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "eb8fdb21-a01e-0020-39a3-248d86000000", - "Body" : "jtcblobrangejtcblobrange0helpertestblobrange499385029beba560650Thu, 07 May 2020 19:13:32 GMT\"0x8D7F2BABBC4CD33\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "6a7c4ab0-8abe-4dc3-b8c9-c772349bf73b", + "x-ms-request-id" : "27618948-601e-0017-6505-5b3889000000", + "Body" : "jtcblobrangejtcblobrange0helpertestblobrange1f202400375b4a0ea9dThu, 16 Jul 2020 00:11:03 GMT\"0x8D8291CBA35C62B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:03 GMT", + "x-ms-client-request-id" : "ff4b17a4-50db-4f87-84bf-e80ee8aa21e1", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrange0helpertestblobrange499385029beba560650?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0helpertestblobrange1f202400375b4a0ea9d?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6e18d8f4-29b1-440c-bf39-707c5a50dd1f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "73a11314-3600-4646-bee3-f20634946d88" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "eb8fdb23-a01e-0020-3ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "6e18d8f4-29b1-440c-bf39-707c5a50dd1f" + "x-ms-request-id" : "2d496a9f-e01e-0019-4b05-5b1139000000", + "Date" : "Thu, 16 Jul 2020 00:11:03 GMT", + "x-ms-client-request-id" : "73a11314-3600-4646-bee3-f20634946d88" }, "Exception" : null } ], - "variables" : [ "jtcblobrange0helpertestblobrange499385029beba560650" ] + "variables" : [ "jtcblobrange0helpertestblobrange1f202400375b4a0ea9d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[1].json index 49ac9bedfbe7..4adc586910eb 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[1].json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrange0helpertestblobrange67a391172879ed97838?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0helpertestblobrange101475617cb341566cb?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5cc6003f-4ded-4e01-9b8e-5c37e6a73418" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "24911054-41ad-4fa8-902f-5db67570afc2" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABBF4C26C", - "Last-Modified" : "Thu, 07 May 2020 19:13:32 GMT", + "ETag" : "0x8D8291CBAFC2E0D", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "eb8fdb2a-a01e-0020-41a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "5cc6003f-4ded-4e01-9b8e-5c37e6a73418" + "x-ms-request-id" : "ce269e3d-401e-0010-7f05-5b54ea000000", + "Date" : "Thu, 16 Jul 2020 00:11:04 GMT", + "x-ms-client-request-id" : "24911054-41ad-4fa8-902f-5db67570afc2" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobrange&comp=list", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrange&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5a092226-ac69-4de4-a91b-05eda2e5c74c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "75d76cf8-6132-49d9-b0e0-8c96144e1e04" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "eb8fdb33-a01e-0020-46a3-248d86000000", - "Body" : "jtcblobrangejtcblobrange0helpertestblobrange67a391172879ed97838Thu, 07 May 2020 19:13:32 GMT\"0x8D7F2BABBF4C26C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "5a092226-ac69-4de4-a91b-05eda2e5c74c", + "x-ms-request-id" : "3c63879a-a01e-009e-0405-5b825c000000", + "Body" : "jtcblobrangejtcblobrange0helpertestblobrange101475617cb341566cbThu, 16 Jul 2020 00:11:04 GMT\"0x8D8291CBAFC2E0D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:04 GMT", + "x-ms-client-request-id" : "75d76cf8-6132-49d9-b0e0-8c96144e1e04", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrange0helpertestblobrange67a391172879ed97838?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0helpertestblobrange101475617cb341566cb?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e393e419-14f7-4789-8ca2-787ae43eae75" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8fe632a0-d914-4873-a9d6-61bf952b4f93" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "eb8fdb42-a01e-0020-54a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "e393e419-14f7-4789-8ca2-787ae43eae75" + "x-ms-request-id" : "b1ce3e77-b01e-0082-2205-5bd03c000000", + "Date" : "Thu, 16 Jul 2020 00:11:04 GMT", + "x-ms-client-request-id" : "8fe632a0-d914-4873-a9d6-61bf952b4f93" }, "Exception" : null } ], - "variables" : [ "jtcblobrange0helpertestblobrange67a391172879ed97838" ] + "variables" : [ "jtcblobrange0helpertestblobrange101475617cb341566cb" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[2].json index 38afc2989e05..f47e61fdfc75 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrange[2].json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrange0helpertestblobrange163555371d53ebd1a01?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0helpertestblobrangee2668272c5d309591a5?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3bbc26c5-3d8c-4978-80f2-9ea5b2722a61" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa22e939-8dfd-49dd-9cb1-6b8f80d0ddb0" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABC21829F", - "Last-Modified" : "Thu, 07 May 2020 19:13:33 GMT", + "ETag" : "0x8D8291CBBB4739A", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:05 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "eb8fdb47-a01e-0020-59a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "3bbc26c5-3d8c-4978-80f2-9ea5b2722a61" + "x-ms-request-id" : "67e7f9d9-901e-003c-6d05-5bb845000000", + "Date" : "Thu, 16 Jul 2020 00:11:05 GMT", + "x-ms-client-request-id" : "fa22e939-8dfd-49dd-9cb1-6b8f80d0ddb0" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobrange&comp=list", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrange&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3bb69c40-cb32-4a85-a49e-10f72eef3af2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5915af0-271c-40fe-8f2c-a5788e83ad40" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "eb8fdb55-a01e-0020-63a3-248d86000000", - "Body" : "jtcblobrangejtcblobrange0helpertestblobrange163555371d53ebd1a01Thu, 07 May 2020 19:13:33 GMT\"0x8D7F2BABC21829F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "3bb69c40-cb32-4a85-a49e-10f72eef3af2", + "x-ms-request-id" : "c5888c3a-c01e-0043-1905-5b77de000000", + "Body" : "jtcblobrangejtcblobrange0helpertestblobrangee2668272c5d309591a5Thu, 16 Jul 2020 00:11:05 GMT\"0x8D8291CBBB4739A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:05 GMT", + "x-ms-client-request-id" : "b5915af0-271c-40fe-8f2c-a5788e83ad40", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrange0helpertestblobrange163555371d53ebd1a01?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0helpertestblobrangee2668272c5d309591a5?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bab5615d-dfb4-46a2-a562-1aee560f1de6" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "da4f72d9-40e6-46b8-acff-6bb2433731de" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "eb8fdb5d-a01e-0020-6aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "bab5615d-dfb4-46a2-a562-1aee560f1de6" + "x-ms-request-id" : "14ae6b44-901e-004e-3805-5bbf0a000000", + "Date" : "Thu, 16 Jul 2020 00:11:06 GMT", + "x-ms-client-request-id" : "da4f72d9-40e6-46b8-acff-6bb2433731de" }, "Exception" : null } ], - "variables" : [ "jtcblobrange0helpertestblobrange163555371d53ebd1a01" ] + "variables" : [ "jtcblobrange0helpertestblobrangee2668272c5d309591a5" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrangeia[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrangeia[0].json index 511869a97867..fa4d95618d13 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrangeia[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrangeia[0].json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrangeia0helpertestblobrangeia91151613f764088d3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrangeia0helpertestblobrangeia8a68086764ba0286d?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "024e41b6-def4-4a08-93bd-a839d029268b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b859fee9-1aad-4839-8c40-687ce9fd48f6" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABC4DF4A4", - "Last-Modified" : "Thu, 07 May 2020 19:13:33 GMT", + "ETag" : "0x8D8291CBC691A6F", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "eb8fdb67-a01e-0020-74a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "024e41b6-def4-4a08-93bd-a839d029268b" + "x-ms-request-id" : "1320dce5-901e-0095-6705-5b7937000000", + "Date" : "Thu, 16 Jul 2020 00:11:06 GMT", + "x-ms-client-request-id" : "b859fee9-1aad-4839-8c40-687ce9fd48f6" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobrangeia&comp=list", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrangeia&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b5b0f863-b2c0-44e5-9529-3ab952093623" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1805e3d4-b1da-402b-b618-48cdf4361c1f" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "eb8fdb71-a01e-0020-7ca3-248d86000000", - "Body" : "jtcblobrangeiajtcblobrangeia0helpertestblobrangeia91151613f764088d3Thu, 07 May 2020 19:13:33 GMT\"0x8D7F2BABC4DF4A4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "b5b0f863-b2c0-44e5-9529-3ab952093623", + "x-ms-request-id" : "e165bda4-201e-0064-7505-5b601a000000", + "Body" : "jtcblobrangeiajtcblobrangeia0helpertestblobrangeia8a68086764ba0286dThu, 16 Jul 2020 00:11:06 GMT\"0x8D8291CBC691A6F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:06 GMT", + "x-ms-client-request-id" : "1805e3d4-b1da-402b-b618-48cdf4361c1f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrangeia0helpertestblobrangeia91151613f764088d3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrangeia0helpertestblobrangeia8a68086764ba0286d?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "875fce9a-5910-42b3-bc2a-13a61131ed01" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "90e6a514-4d11-4ce4-8144-e5adbe650ab3" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "eb8fdb72-a01e-0020-7da3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "875fce9a-5910-42b3-bc2a-13a61131ed01" + "x-ms-request-id" : "f11c025c-701e-000b-5b05-5b6ae9000000", + "Date" : "Thu, 16 Jul 2020 00:11:06 GMT", + "x-ms-client-request-id" : "90e6a514-4d11-4ce4-8144-e5adbe650ab3" }, "Exception" : null } ], - "variables" : [ "jtcblobrangeia0helpertestblobrangeia91151613f764088d3" ] + "variables" : [ "jtcblobrangeia0helpertestblobrangeia8a68086764ba0286d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrangeia[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrangeia[1].json index a9725dc17ab5..204f00ae76ce 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrangeia[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobrangeia[1].json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrangeia0helpertestblobrangeia1d792945803b880d7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrangeia0helpertestblobrangeia77d686691923c4998?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "448449c8-0b10-4ee2-b876-3d803b3c60fa" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d95116ac-72f8-4c09-8146-62e8d1761a35" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABC7D9BC2", - "Last-Modified" : "Thu, 07 May 2020 19:13:33 GMT", + "ETag" : "0x8D8291CBD216D98", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "eb8fdb80-a01e-0020-09a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "448449c8-0b10-4ee2-b876-3d803b3c60fa" + "x-ms-request-id" : "5c9c56cc-601e-004a-5205-5b320d000000", + "Date" : "Thu, 16 Jul 2020 00:11:08 GMT", + "x-ms-client-request-id" : "d95116ac-72f8-4c09-8146-62e8d1761a35" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobrangeia&comp=list", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrangeia&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dec5601e-89cf-4a26-af1e-f689ddd1c9ff" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f35b8a15-73a0-4084-b481-d7e88e285ec6" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "eb8fdb84-a01e-0020-0ca3-248d86000000", - "Body" : "jtcblobrangeiajtcblobrangeia0helpertestblobrangeia1d792945803b880d7Thu, 07 May 2020 19:13:33 GMT\"0x8D7F2BABC7D9BC2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "dec5601e-89cf-4a26-af1e-f689ddd1c9ff", + "x-ms-request-id" : "d447d389-b01e-0004-1705-5b1c85000000", + "Body" : "jtcblobrangeiajtcblobrangeia0helpertestblobrangeia77d686691923c4998Thu, 16 Jul 2020 00:11:08 GMT\"0x8D8291CBD216D98\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:07 GMT", + "x-ms-client-request-id" : "f35b8a15-73a0-4084-b481-d7e88e285ec6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobrangeia0helpertestblobrangeia1d792945803b880d7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrangeia0helpertestblobrangeia77d686691923c4998?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7c4d523e-c275-4668-b727-5af422269095" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "55bb25e1-7c66-4d99-a69c-d6387c63789e" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "eb8fdb8c-a01e-0020-13a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "7c4d523e-c275-4668-b727-5af422269095" + "x-ms-request-id" : "81a5057e-e01e-00a0-0405-5b1523000000", + "Date" : "Thu, 16 Jul 2020 00:11:08 GMT", + "x-ms-client-request-id" : "55bb25e1-7c66-4d99-a69c-d6387c63789e" }, "Exception" : null } ], - "variables" : [ "jtcblobrangeia0helpertestblobrangeia1d792945803b880d7" ] + "variables" : [ "jtcblobrangeia0helpertestblobrangeia77d686691923c4998" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[0].json deleted file mode 100644 index 24083fb771d7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse09339223818f8f1b5c4e0?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9c342b2c-b4c4-4e0a-b6c7-ce32fb0adaff" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC488D093", - "Last-Modified" : "Thu, 07 May 2020 19:13:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f32b4-101e-0047-61a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "9c342b2c-b4c4-4e0a-b6c7-ce32fb0adaff" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f91bfcb5-a78d-42e9-a0d0-3e66b41c7c3e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe035-a01e-0020-68a3-248d86000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse09339223818f8f1b5c4e0Thu, 07 May 2020 19:13:47 GMT\"0x8D7F2BAC488D093\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "f91bfcb5-a78d-42e9-a0d0-3e66b41c7c3e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse09339223818f8f1b5c4e0?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d396ceea-0a5a-496c-b8a9-b0cca85ad171" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f32cf-101e-0047-77a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "d396ceea-0a5a-496c-b8a9-b0cca85ad171" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse09339223818f8f1b5c4e0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[1].json deleted file mode 100644 index 2b26379499d4..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse088156d1f22da6ca774b2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6840570a-b006-44ff-a1d3-2a2414e2b8c2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC4B6E176", - "Last-Modified" : "Thu, 07 May 2020 19:13:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe04f-a01e-0020-7ea3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "6840570a-b006-44ff-a1d3-2a2414e2b8c2" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bd550628-013a-4736-926b-9b73780d0410" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f32e2-101e-0047-02a3-249d7a000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse088156d1f22da6ca774b2Thu, 07 May 2020 19:13:47 GMT\"0x8D7F2BAC4B6E176\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "bd550628-013a-4736-926b-9b73780d0410", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse088156d1f22da6ca774b2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f0b36483-ba9a-42e1-a4d0-2491e607e668" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe05b-a01e-0020-03a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "f0b36483-ba9a-42e1-a4d0-2491e607e668" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse088156d1f22da6ca774b2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[2].json deleted file mode 100644 index 96c88df5e97e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse001969492ed58ab88a419?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3c78fea0-7d5d-4760-a6ce-1353a69193a2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC4E6E602", - "Last-Modified" : "Thu, 07 May 2020 19:13:47 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f32f7-101e-0047-16a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "3c78fea0-7d5d-4760-a6ce-1353a69193a2" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "78955d03-9392-46c0-8937-986dce641764" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe06c-a01e-0020-0da3-248d86000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse001969492ed58ab88a419Thu, 07 May 2020 19:13:47 GMT\"0x8D7F2BAC4E6E602\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "78955d03-9392-46c0-8937-986dce641764", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse001969492ed58ab88a419?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7ce7d0c3-4dcc-41d6-9b3b-c65e7bfd8411" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f330f-101e-0047-29a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "7ce7d0c3-4dcc-41d6-9b3b-c65e7bfd8411" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse001969492ed58ab88a419" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[3].json deleted file mode 100644 index 006e712e8d1b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse086575892f6ad9afba4ec?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c47408b4-da80-426b-b960-767d8f5ee32b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC515BA65", - "Last-Modified" : "Thu, 07 May 2020 19:13:48 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe076-a01e-0020-15a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "c47408b4-da80-426b-b960-767d8f5ee32b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c20e1a2c-581f-4405-938b-a13548320ea6" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3331-101e-0047-47a3-249d7a000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse086575892f6ad9afba4ecThu, 07 May 2020 19:13:48 GMT\"0x8D7F2BAC515BA65\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "c20e1a2c-581f-4405-938b-a13548320ea6", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse086575892f6ad9afba4ec?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "760b7b1e-318d-4353-b183-b24df4e95f93" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe090-a01e-0020-2aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "760b7b1e-318d-4353-b183-b24df4e95f93" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse086575892f6ad9afba4ec" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[4].json deleted file mode 100644 index 6af33444c173..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse005591e637afc4f5a042c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "081dc7a1-b029-4b7b-88c5-4a5648fa9a7c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC54485FE", - "Last-Modified" : "Thu, 07 May 2020 19:13:48 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3347-101e-0047-5ba3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "081dc7a1-b029-4b7b-88c5-4a5648fa9a7c" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "80e957df-dd52-495e-933c-b9aa87dadef3" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe0b0-a01e-0020-42a3-248d86000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse005591e637afc4f5a042cThu, 07 May 2020 19:13:48 GMT\"0x8D7F2BAC54485FE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:48 GMT", - "x-ms-client-request-id" : "80e957df-dd52-495e-933c-b9aa87dadef3", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse005591e637afc4f5a042c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "62247443-4e6b-4fbc-90bb-811c190451cd" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3359-101e-0047-6aa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "62247443-4e6b-4fbc-90bb-811c190451cd" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse005591e637afc4f5a042c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[5].json deleted file mode 100644 index eb02f7b1513b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse0859932fd102c4ca36477?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d61b2667-f1ca-4b20-b08a-34fcbf16d80a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC573F6F3", - "Last-Modified" : "Thu, 07 May 2020 19:13:48 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe0cf-a01e-0020-5aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:48 GMT", - "x-ms-client-request-id" : "d61b2667-f1ca-4b20-b08a-34fcbf16d80a" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f05767ad-34d8-4bba-9463-a5da58e79ffa" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3362-101e-0047-73a3-249d7a000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse0859932fd102c4ca36477Thu, 07 May 2020 19:13:48 GMT\"0x8D7F2BAC573F6F3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:47 GMT", - "x-ms-client-request-id" : "f05767ad-34d8-4bba-9463-a5da58e79ffa", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse0859932fd102c4ca36477?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b8786132-2cb5-4110-a811-742a1d95e4e5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe0dd-a01e-0020-64a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:48 GMT", - "x-ms-client-request-id" : "b8786132-2cb5-4110-a811-742a1d95e4e5" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse0859932fd102c4ca36477" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[6].json deleted file mode 100644 index 384dc978e532..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[6].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse0998776d4a9c0130d3417?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d49a39b6-5f66-46e9-9207-c507887d68e7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC5A337AC", - "Last-Modified" : "Thu, 07 May 2020 19:13:48 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3381-101e-0047-0da3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:48 GMT", - "x-ms-client-request-id" : "d49a39b6-5f66-46e9-9207-c507887d68e7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c271d51f-195f-4733-bb45-9e1776f3540c" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe0ec-a01e-0020-71a3-248d86000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse0998776d4a9c0130d3417Thu, 07 May 2020 19:13:48 GMT\"0x8D7F2BAC5A337AC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:48 GMT", - "x-ms-client-request-id" : "c271d51f-195f-4733-bb45-9e1776f3540c", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse0998776d4a9c0130d3417?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8c892c39-bce8-4938-bb32-a92512138e4e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3396-101e-0047-1fa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:48 GMT", - "x-ms-client-request-id" : "8c892c39-bce8-4938-bb32-a92512138e4e" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse0998776d4a9c0130d3417" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[7].json deleted file mode 100644 index 9297244a0262..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparse[7].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse082024e15926eef7e647e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "83fd8728-d9bb-4565-aab2-b21b7d2c15e6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC5D40896", - "Last-Modified" : "Thu, 07 May 2020 19:13:49 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe108-a01e-0020-09a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "83fd8728-d9bb-4565-aab2-b21b7d2c15e6" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7c7d529c-0b09-4f63-b430-db30aea57887" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f33b3-101e-0047-37a3-249d7a000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse082024e15926eef7e647eThu, 07 May 2020 19:13:49 GMT\"0x8D7F2BAC5D40896\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:48 GMT", - "x-ms-client-request-id" : "7c7d529c-0b09-4f63-b430-db30aea57887", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparse082024e15926eef7e647e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2ad3662b-e346-4c1a-9fd7-bcc8f5ad5aaf" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe118-a01e-0020-13a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "2ad3662b-e346-4c1a-9fd7-bcc8f5ad5aaf" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse082024e15926eef7e647e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparseia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparseia.json deleted file mode 100644 index 421901bdcf65..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionsparseia.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparseia06716405b7482f235b42?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "afd429f5-db2e-4de8-954c-7fd8c3a9976e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC60A9E05", - "Last-Modified" : "Thu, 07 May 2020 19:13:49 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f33dc-101e-0047-60a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:48 GMT", - "x-ms-client-request-id" : "afd429f5-db2e-4de8-954c-7fd8c3a9976e" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionsparseia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "75da3c70-fa16-4ee4-9414-8dae0c6fdef2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe121-a01e-0020-1ba3-248d86000000", - "Body" : "jtcblobsaspermissionsparseiajtcblobsaspermissionsparseia06716405b7482f235b42Thu, 07 May 2020 19:13:49 GMT\"0x8D7F2BAC60A9E05\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "75da3c70-fa16-4ee4-9414-8dae0c6fdef2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionsparseia06716405b7482f235b42?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1f66f982-f07d-464b-b15f-3fe2c0b9cbb6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f33ed-101e-0047-70a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "1f66f982-f07d-464b-b15f-3fe2c0b9cbb6" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparseia06716405b7482f235b42" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[0].json deleted file mode 100644 index 8c7c123809c3..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring0794765eeb923d136549?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "18eb859f-1bdb-4e62-a62b-33c8fff04069" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC337D399", - "Last-Modified" : "Thu, 07 May 2020 19:13:44 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdf62-a01e-0020-36a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "18eb859f-1bdb-4e62-a62b-33c8fff04069" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8db5d6d6-35ae-40b4-a0dd-2208ce19a690" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f31ca-101e-0047-25a3-249d7a000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring0794765eeb923d136549Thu, 07 May 2020 19:13:44 GMT\"0x8D7F2BAC337D399\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "8db5d6d6-35ae-40b4-a0dd-2208ce19a690", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring0794765eeb923d136549?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "516947ae-4011-4725-ba0f-778133405417" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdf7e-a01e-0020-4ea3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "516947ae-4011-4725-ba0f-778133405417" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring0794765eeb923d136549" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[1].json deleted file mode 100644 index eaf457062261..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring082780b975fe12b18749?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "60da4414-0ce8-4d95-849a-522d7cb693cb" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC366C693", - "Last-Modified" : "Thu, 07 May 2020 19:13:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3203-101e-0047-52a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "60da4414-0ce8-4d95-849a-522d7cb693cb" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "74857351-1424-4080-af25-38966f7dedf9" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdf9a-a01e-0020-64a3-248d86000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring082780b975fe12b18749Thu, 07 May 2020 19:13:45 GMT\"0x8D7F2BAC366C693\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "74857351-1424-4080-af25-38966f7dedf9", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring082780b975fe12b18749?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "87b7f297-4469-4666-878f-f5d34d319209" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3215-101e-0047-62a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "87b7f297-4469-4666-878f-f5d34d319209" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring082780b975fe12b18749" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[2].json deleted file mode 100644 index c640e9bb0697..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring09512594b29646a3c54a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "edb1a42d-ff74-4dce-a94f-02aeed5d589c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC3983383", - "Last-Modified" : "Thu, 07 May 2020 19:13:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdfad-a01e-0020-74a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "edb1a42d-ff74-4dce-a94f-02aeed5d589c" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c747da92-2e82-4fe6-bf31-3d0bf41f7a8f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3229-101e-0047-74a3-249d7a000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring09512594b29646a3c54aThu, 07 May 2020 19:13:45 GMT\"0x8D7F2BAC3983383\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "c747da92-2e82-4fe6-bf31-3d0bf41f7a8f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring09512594b29646a3c54a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c6abd881-e6cc-4c3f-bff7-d49918ed4e54" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdfb6-a01e-0020-7ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "c6abd881-e6cc-4c3f-bff7-d49918ed4e54" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring09512594b29646a3c54a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[3].json deleted file mode 100644 index 00b7ce1f13e4..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring008484e073a6bb1f4c40?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "087c62a7-e1ac-4941-90af-af0e033b6d7e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC3C7748C", - "Last-Modified" : "Thu, 07 May 2020 19:13:45 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3237-101e-0047-7ea3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "087c62a7-e1ac-4941-90af-af0e033b6d7e" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cf02d3b4-21af-4299-817a-9428e2ef8b81" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdfc3-a01e-0020-07a3-248d86000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring008484e073a6bb1f4c40Thu, 07 May 2020 19:13:45 GMT\"0x8D7F2BAC3C7748C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "cf02d3b4-21af-4299-817a-9428e2ef8b81", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring008484e073a6bb1f4c40?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c99e9484-cc14-420d-8452-a4743878378b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3242-101e-0047-08a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "c99e9484-cc14-420d-8452-a4743878378b" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring008484e073a6bb1f4c40" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[4].json deleted file mode 100644 index cc691e82d59e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring0129930f00ae52dab843?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "860c2efe-e5bd-4e3d-939b-7a09b7a85ab9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC3F7CFE1", - "Last-Modified" : "Thu, 07 May 2020 19:13:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdfdd-a01e-0020-1ea3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "860c2efe-e5bd-4e3d-939b-7a09b7a85ab9" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a1c146fd-55d7-49e6-a597-9d43a28a29a6" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3259-101e-0047-18a3-249d7a000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring0129930f00ae52dab843Thu, 07 May 2020 19:13:46 GMT\"0x8D7F2BAC3F7CFE1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "a1c146fd-55d7-49e6-a597-9d43a28a29a6", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring0129930f00ae52dab843?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a1a95135-b9f3-4207-a73b-114d1490c59a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdfe6-a01e-0020-24a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "a1a95135-b9f3-4207-a73b-114d1490c59a" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring0129930f00ae52dab843" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[5].json deleted file mode 100644 index aca69f99ba7b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring04236362a389f317304a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "08bcf58a-01f8-49c4-b99b-f7df0975de07" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC425B0E9", - "Last-Modified" : "Thu, 07 May 2020 19:13:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f326c-101e-0047-25a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "08bcf58a-01f8-49c4-b99b-f7df0975de07" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f0b2a74e-cef7-4c5f-aba9-519019f897d5" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdff5-a01e-0020-2fa3-248d86000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring04236362a389f317304aThu, 07 May 2020 19:13:46 GMT\"0x8D7F2BAC425B0E9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "f0b2a74e-cef7-4c5f-aba9-519019f897d5", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring04236362a389f317304a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "72e329c0-7ddb-44f3-852b-f29669106162" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3289-101e-0047-3ba3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:45 GMT", - "x-ms-client-request-id" : "72e329c0-7ddb-44f3-852b-f29669106162" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring04236362a389f317304a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[6].json deleted file mode 100644 index fc8497c33e8a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestblobsaspermissionstostring[6].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring082421557aa1636deb40?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0e3a6df0-3c3b-42aa-bdc5-838336fb64c2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC45E72BB", - "Last-Modified" : "Thu, 07 May 2020 19:13:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe00a-a01e-0020-42a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "0e3a6df0-3c3b-42aa-bdc5-838336fb64c2" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d3e6d767-e859-4793-948c-c8fac412d61b" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f329c-101e-0047-4ca3-249d7a000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring082421557aa1636deb40Thu, 07 May 2020 19:13:46 GMT\"0x8D7F2BAC45E72BB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "d3e6d767-e859-4793-948c-c8fac412d61b", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcblobsaspermissionstostring082421557aa1636deb40?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "552be254-55f3-4abb-819c-6bb48485ab18" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe011-a01e-0020-46a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:46 GMT", - "x-ms-client-request-id" : "552be254-55f3-4abb-819c-6bb48485ab18" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring082421557aa1636deb40" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestbloburlparts.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestbloburlparts.json new file mode 100644 index 000000000000..c49eef0f931b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestbloburlparts.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbloburlparts0helpertestbloburlpartsaed99133a2ef1110?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e80c7e3-c670-4d64-82c8-5c4c9f8e0fb7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8291CC154A047", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:15 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7abbaec7-901e-0003-0205-5b70e6000000", + "Date" : "Thu, 16 Jul 2020 00:11:14 GMT", + "x-ms-client-request-id" : "7e80c7e3-c670-4d64-82c8-5c4c9f8e0fb7" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbloburlparts&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1af029c8-3572-48e8-8cd3-eba74b9428a6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "24abef05-101e-0022-2705-5b549d000000", + "Body" : "jtcbloburlpartsjtcbloburlparts0helpertestbloburlpartsaed99133a2ef1110Thu, 16 Jul 2020 00:11:15 GMT\"0x8D8291CC154A047\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:15 GMT", + "x-ms-client-request-id" : "1af029c8-3572-48e8-8cd3-eba74b9428a6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbloburlparts0helpertestbloburlpartsaed99133a2ef1110?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2255d09-c33d-470e-99d4-5579b04d4a0f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a77047a5-701e-0069-4a05-5ba8ce000000", + "Date" : "Thu, 16 Jul 2020 00:11:15 GMT", + "x-ms-client-request-id" : "f2255d09-c33d-470e-99d4-5579b04d4a0f" + }, + "Exception" : null + } ], + "variables" : [ "jtcbloburlparts0helpertestbloburlpartsaed99133a2ef1110" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestbloburlpartsimplicitroot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestbloburlpartsimplicitroot.json index 6a4b34d56819..0d30687c1704 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestbloburlpartsimplicitroot.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestbloburlpartsimplicitroot.json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcbloburlpartsimplicitroot0232908c3702da67954f3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbloburlpartsimplicitroot0246213acbf81ff4794dc?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7ec400c7-ea79-439a-9b6c-f840df217995" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8e15aa92-76ab-43c2-affb-caa927d91bcf" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAD1BC2CA3", - "Last-Modified" : "Thu, 07 May 2020 19:14:09 GMT", + "ETag" : "0x8D8291CC20F38D4", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "a09f3cc7-101e-0047-34a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "7ec400c7-ea79-439a-9b6c-f840df217995" + "x-ms-request-id" : "c531f745-101e-00a4-0705-5b9824000000", + "Date" : "Thu, 16 Jul 2020 00:11:15 GMT", + "x-ms-client-request-id" : "8e15aa92-76ab-43c2-affb-caa927d91bcf" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcbloburlpartsimplicitroot&comp=list", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbloburlpartsimplicitroot&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1965b307-02f7-4a4f-9c4b-cca1dae92d1f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65143655-9845-42a5-88b0-f0988e7e65ea" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +34,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "eb8fe755-a01e-0020-15a3-248d86000000", - "Body" : "jtcbloburlpartsimplicitrootjtcbloburlpartsimplicitroot0232908c3702da67954f3Thu, 07 May 2020 19:14:09 GMT\"0x8D7F2BAD1BC2CA3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "1965b307-02f7-4a4f-9c4b-cca1dae92d1f", + "x-ms-request-id" : "a62815c8-e01e-006b-2405-5b1676000000", + "Body" : "jtcbloburlpartsimplicitrootjtcbloburlpartsimplicitroot0246213acbf81ff4794dcThu, 16 Jul 2020 00:11:16 GMT\"0x8D8291CC20F38D4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:16 GMT", + "x-ms-client-request-id" : "65143655-9845-42a5-88b0-f0988e7e65ea", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcbloburlpartsimplicitroot0232908c3702da67954f3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbloburlpartsimplicitroot0246213acbf81ff4794dc?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5a5f63bd-5ab4-43a5-b981-0503d51402fb" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cbf42f74-ff8d-4c41-9faa-e2e1b90ddbaf" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -55,11 +55,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "a09f3cd6-101e-0047-40a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:14:08 GMT", - "x-ms-client-request-id" : "5a5f63bd-5ab4-43a5-b981-0503d51402fb" + "x-ms-request-id" : "25b1d9fd-701e-009d-5805-5b6338000000", + "Date" : "Thu, 16 Jul 2020 00:11:16 GMT", + "x-ms-client-request-id" : "cbf42f74-ff8d-4c41-9faa-e2e1b90ddbaf" }, "Exception" : null } ], - "variables" : [ "jtcbloburlpartsimplicitroot0232908c3702da67954f3" ] + "variables" : [ "jtcbloburlpartsimplicitroot0246213acbf81ff4794dc" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[0].json deleted file mode 100644 index de6cc1696a03..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse01463540d126a3e6124?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3caafdae-d083-49da-8347-68d668bb1134" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC7B28BE5", - "Last-Modified" : "Thu, 07 May 2020 19:13:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe21e-a01e-0020-6ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "3caafdae-d083-49da-8347-68d668bb1134" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "814ad635-a520-472d-8720-5495481c502e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f354d-101e-0047-09a3-249d7a000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse01463540d126a3e6124Thu, 07 May 2020 19:13:52 GMT\"0x8D7F2BAC7B28BE5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "814ad635-a520-472d-8720-5495481c502e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse01463540d126a3e6124?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9e81de14-fcff-4b38-9d97-855cb35861f4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe227-a01e-0020-71a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "9e81de14-fcff-4b38-9d97-855cb35861f4" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse01463540d126a3e6124" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[1].json deleted file mode 100644 index 44d6baebe638..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse0274219e16362ce09e4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6617e9de-df2b-4439-81bc-0b77245b081d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC7E3EF56", - "Last-Modified" : "Thu, 07 May 2020 19:13:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f356d-101e-0047-23a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "6617e9de-df2b-4439-81bc-0b77245b081d" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9a99c892-36d4-429a-8ac6-79944f83cbfc" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe23f-a01e-0020-03a3-248d86000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse0274219e16362ce09e4Thu, 07 May 2020 19:13:52 GMT\"0x8D7F2BAC7E3EF56\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "9a99c892-36d4-429a-8ac6-79944f83cbfc", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse0274219e16362ce09e4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6ad958bf-238e-4b47-a05c-36877d328b98" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3581-101e-0047-32a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "6ad958bf-238e-4b47-a05c-36877d328b98" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse0274219e16362ce09e4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[2].json deleted file mode 100644 index 879c5b4dcb8e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse01057828fd465f7b604?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "81a3fcc3-0bf4-45c6-8d7a-9ba8a66cba23" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC8105319", - "Last-Modified" : "Thu, 07 May 2020 19:13:53 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe240-a01e-0020-04a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "81a3fcc3-0bf4-45c6-8d7a-9ba8a66cba23" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "57031e93-57c0-49bc-a73c-17ff52139d53" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f359a-101e-0047-4aa3-249d7a000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse01057828fd465f7b604Thu, 07 May 2020 19:13:53 GMT\"0x8D7F2BAC8105319\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "57031e93-57c0-49bc-a73c-17ff52139d53", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse01057828fd465f7b604?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0be4fd3a-5f5c-4a9e-9259-5771d7c52ede" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe260-a01e-0020-1ca3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "0be4fd3a-5f5c-4a9e-9259-5771d7c52ede" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse01057828fd465f7b604" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[3].json deleted file mode 100644 index 972503c72d0d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse034012f78e3cf3011b4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "62bf8f69-790a-4a36-b840-c4f3a4c9b8e5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC83AAFD3", - "Last-Modified" : "Thu, 07 May 2020 19:13:53 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f35bf-101e-0047-68a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "62bf8f69-790a-4a36-b840-c4f3a4c9b8e5" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ea4b6fe2-3cc1-4035-980e-976dcd1e6792" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe279-a01e-0020-35a3-248d86000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse034012f78e3cf3011b4Thu, 07 May 2020 19:13:53 GMT\"0x8D7F2BAC83AAFD3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "ea4b6fe2-3cc1-4035-980e-976dcd1e6792", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse034012f78e3cf3011b4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e1d6f67d-37c2-4d1f-83eb-e049a59f6ea0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f35cf-101e-0047-71a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "e1d6f67d-37c2-4d1f-83eb-e049a59f6ea0" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse034012f78e3cf3011b4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[4].json deleted file mode 100644 index 3d295a86604c..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse06151291cda23af0ce4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "191fc130-3e7b-4d09-8545-6ae20baaadb9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC869852E", - "Last-Modified" : "Thu, 07 May 2020 19:13:53 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe28a-a01e-0020-3ea3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "191fc130-3e7b-4d09-8545-6ae20baaadb9" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "84aa98d2-b151-4423-9042-c10a6213f3c0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f35e5-101e-0047-01a3-249d7a000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse06151291cda23af0ce4Thu, 07 May 2020 19:13:53 GMT\"0x8D7F2BAC869852E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:52 GMT", - "x-ms-client-request-id" : "84aa98d2-b151-4423-9042-c10a6213f3c0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse06151291cda23af0ce4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "04fb747a-ce96-4f11-95b5-0d2390ba68f9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe292-a01e-0020-44a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "04fb747a-ce96-4f11-95b5-0d2390ba68f9" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse06151291cda23af0ce4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[5].json deleted file mode 100644 index afe05e170b7f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse06390774f4a92b36464?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "667c8d05-a460-47de-80a7-b67e1eac50b5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC8971717", - "Last-Modified" : "Thu, 07 May 2020 19:13:53 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f35f3-101e-0047-0ea3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "667c8d05-a460-47de-80a7-b67e1eac50b5" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e055e2ea-83e4-453e-9b0b-2c22aca04cce" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe29f-a01e-0020-4fa3-248d86000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse06390774f4a92b36464Thu, 07 May 2020 19:13:53 GMT\"0x8D7F2BAC8971717\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "e055e2ea-83e4-453e-9b0b-2c22aca04cce", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse06390774f4a92b36464?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "04068459-721b-42c1-8f41-27cc09061081" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3611-101e-0047-27a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "04068459-721b-42c1-8f41-27cc09061081" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse06390774f4a92b36464" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[6].json deleted file mode 100644 index 0319d6ee4de9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[6].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse0992971ddbc2cba7fb4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "355ed75b-769c-4882-a40e-81fce01c6a25" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC8C59E3F", - "Last-Modified" : "Thu, 07 May 2020 19:13:54 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe2b0-a01e-0020-5aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "355ed75b-769c-4882-a40e-81fce01c6a25" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ec73e121-588c-4cee-84e8-935e3f81c9dc" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3631-101e-0047-42a3-249d7a000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse0992971ddbc2cba7fb4Thu, 07 May 2020 19:13:54 GMT\"0x8D7F2BAC8C59E3F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "ec73e121-588c-4cee-84e8-935e3f81c9dc", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse0992971ddbc2cba7fb4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d21c3b01-12d9-49ba-abc9-d0763bfd7d40" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe2c4-a01e-0020-6ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "d21c3b01-12d9-49ba-abc9-d0763bfd7d40" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse0992971ddbc2cba7fb4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[7].json deleted file mode 100644 index d528263a6ba8..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[7].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse0863330178294d7dee4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9c2afc22-ec0c-450f-98b7-420e254fc347" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC8F49025", - "Last-Modified" : "Thu, 07 May 2020 19:13:54 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3649-101e-0047-57a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "9c2afc22-ec0c-450f-98b7-420e254fc347" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5ec9f8de-65eb-49f1-976d-4b881801ab47" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe2da-a01e-0020-7da3-248d86000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse0863330178294d7dee4Thu, 07 May 2020 19:13:54 GMT\"0x8D7F2BAC8F49025\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "5ec9f8de-65eb-49f1-976d-4b881801ab47", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse0863330178294d7dee4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "da3c6955-dacd-47c3-af17-cf0c7ed7d2fc" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f365e-101e-0047-69a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:53 GMT", - "x-ms-client-request-id" : "da3c6955-dacd-47c3-af17-cf0c7ed7d2fc" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse0863330178294d7dee4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[8].json deleted file mode 100644 index 098f8bc43ce8..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparse[8].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse091245212294349dd44?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b8faf8e0-846c-4e45-9afa-27169fb08616" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC923B3AE", - "Last-Modified" : "Thu, 07 May 2020 19:13:54 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe2e3-a01e-0020-04a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "b8faf8e0-846c-4e45-9afa-27169fb08616" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1abe827f-b363-4a4a-9cb9-a6698f752ed8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f366e-101e-0047-76a3-249d7a000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse091245212294349dd44Thu, 07 May 2020 19:13:54 GMT\"0x8D7F2BAC923B3AE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "1abe827f-b363-4a4a-9cb9-a6698f752ed8", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparse091245212294349dd44?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "af1b85f6-e5d2-4a08-9399-cc3d1659193e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe2f0-a01e-0020-0ea3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "af1b85f6-e5d2-4a08-9399-cc3d1659193e" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse091245212294349dd44" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparseia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparseia.json deleted file mode 100644 index e37145941bd9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionsparseia.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparseia00935699cab4b478da?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "081cb1bb-7b8d-4229-9dd8-035003059581" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC95193BB", - "Last-Modified" : "Thu, 07 May 2020 19:13:55 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f368a-101e-0047-0ca3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "081cb1bb-7b8d-4229-9dd8-035003059581" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionsparseia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "23ceac65-94ce-44f2-91c6-9ba097c6c124" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe30a-a01e-0020-26a3-248d86000000", - "Body" : "jtccontainersaspermissionsparseiajtccontainersaspermissionsparseia00935699cab4b478daThu, 07 May 2020 19:13:55 GMT\"0x8D7F2BAC95193BB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "23ceac65-94ce-44f2-91c6-9ba097c6c124", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionsparseia00935699cab4b478da?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "72d15138-a0df-4a71-99fa-f01bb82b1765" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3697-101e-0047-15a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "72d15138-a0df-4a71-99fa-f01bb82b1765" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparseia00935699cab4b478da" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[0].json deleted file mode 100644 index a9f5bcc02bf3..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring069123d90887b8c7a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b5919a85-fa43-4feb-8a1e-8df3bc9916d3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC63504BE", - "Last-Modified" : "Thu, 07 May 2020 19:13:49 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe125-a01e-0020-1da3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "b5919a85-fa43-4feb-8a1e-8df3bc9916d3" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f97d431b-7c9a-4807-9b46-5dec88295e82" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3407-101e-0047-06a3-249d7a000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring069123d90887b8c7aThu, 07 May 2020 19:13:49 GMT\"0x8D7F2BAC63504BE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "f97d431b-7c9a-4807-9b46-5dec88295e82", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring069123d90887b8c7a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3e03dba0-1049-4871-a29f-a47eeed3924e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe136-a01e-0020-2aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "3e03dba0-1049-4871-a29f-a47eeed3924e" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring069123d90887b8c7a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[1].json deleted file mode 100644 index 4c042e8abbdb..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring03223198a1430b774?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9d36796f-faf7-457e-9ddd-2ed841f62fb6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC6694FB7", - "Last-Modified" : "Thu, 07 May 2020 19:13:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3436-101e-0047-2aa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "9d36796f-faf7-457e-9ddd-2ed841f62fb6" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "04d1b588-ec31-4478-b02e-22421dbe9e54" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe159-a01e-0020-48a3-248d86000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring03223198a1430b774Thu, 07 May 2020 19:13:50 GMT\"0x8D7F2BAC6694FB7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "04d1b588-ec31-4478-b02e-22421dbe9e54", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring03223198a1430b774?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "14ce391c-0d68-4d74-95b1-142bcfb74422" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3466-101e-0047-51a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "14ce391c-0d68-4d74-95b1-142bcfb74422" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring03223198a1430b774" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[2].json deleted file mode 100644 index 054758f8baee..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring07777364d9c7a09f2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "366f2fb2-38d7-45bf-905b-5daf5446015a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC699AB78", - "Last-Modified" : "Thu, 07 May 2020 19:13:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe164-a01e-0020-50a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "366f2fb2-38d7-45bf-905b-5daf5446015a" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9e9645f3-24b8-4043-a037-3b2af65675e8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f347e-101e-0047-63a3-249d7a000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring07777364d9c7a09f2Thu, 07 May 2020 19:13:50 GMT\"0x8D7F2BAC699AB78\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:49 GMT", - "x-ms-client-request-id" : "9e9645f3-24b8-4043-a037-3b2af65675e8", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring07777364d9c7a09f2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "56986975-93ac-48e5-a60b-dcd2322a0d74" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe16d-a01e-0020-57a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "56986975-93ac-48e5-a60b-dcd2322a0d74" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring07777364d9c7a09f2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[3].json deleted file mode 100644 index 84b76bde2c7d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring0646132eda1534bdf?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "facc872b-0239-44ca-97e1-0287255955df" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC6C8C4E0", - "Last-Modified" : "Thu, 07 May 2020 19:13:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f349f-101e-0047-7fa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "facc872b-0239-44ca-97e1-0287255955df" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2052c2e8-1bfc-4f6b-b077-5638f91aaf3c" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe17f-a01e-0020-68a3-248d86000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring0646132eda1534bdfThu, 07 May 2020 19:13:50 GMT\"0x8D7F2BAC6C8C4E0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "2052c2e8-1bfc-4f6b-b077-5638f91aaf3c", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring0646132eda1534bdf?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d553ba11-7048-4182-aade-db2dcd697415" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f34af-101e-0047-0ca3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "d553ba11-7048-4182-aade-db2dcd697415" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring0646132eda1534bdf" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[4].json deleted file mode 100644 index 9f3f74b70c4e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring0040453d1ee1bd2d7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "332dc055-c015-4a54-b3a0-422926cfac37" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC6F54F4F", - "Last-Modified" : "Thu, 07 May 2020 19:13:51 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe1a9-a01e-0020-0aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "332dc055-c015-4a54-b3a0-422926cfac37" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a626c6e0-4318-42d2-a236-143a2c31e847" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f34d1-101e-0047-27a3-249d7a000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring0040453d1ee1bd2d7Thu, 07 May 2020 19:13:51 GMT\"0x8D7F2BAC6F54F4F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "a626c6e0-4318-42d2-a236-143a2c31e847", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring0040453d1ee1bd2d7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c6bd46b9-11b5-4f01-8788-5fc9677fb040" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe1c1-a01e-0020-21a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "c6bd46b9-11b5-4f01-8788-5fc9677fb040" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring0040453d1ee1bd2d7" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[5].json deleted file mode 100644 index 137b0374afed..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring071085f6ea52fb01d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cde829d0-c538-4c54-b29b-58a60d3b325b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC723A512", - "Last-Modified" : "Thu, 07 May 2020 19:13:51 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f34e6-101e-0047-3ba3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "cde829d0-c538-4c54-b29b-58a60d3b325b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ff56d7f5-d47c-481e-8474-dd1aec1e4a4b" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe1d5-a01e-0020-31a3-248d86000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring071085f6ea52fb01dThu, 07 May 2020 19:13:51 GMT\"0x8D7F2BAC723A512\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "ff56d7f5-d47c-481e-8474-dd1aec1e4a4b", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring071085f6ea52fb01d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "34f60d90-53de-4350-b61d-6931109466a5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f34f4-101e-0047-44a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:50 GMT", - "x-ms-client-request-id" : "34f60d90-53de-4350-b61d-6931109466a5" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring071085f6ea52fb01d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[6].json deleted file mode 100644 index 33e0c0163451..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[6].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring085993b4f5e457d61?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e020c9e4-0f0b-47f1-811b-d9e6fb0f071f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC752A143", - "Last-Modified" : "Thu, 07 May 2020 19:13:51 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe1e9-a01e-0020-41a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "e020c9e4-0f0b-47f1-811b-d9e6fb0f071f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5b3c963a-dbf9-423d-a902-cd9e44dc1fbd" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f350b-101e-0047-57a3-249d7a000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring085993b4f5e457d61Thu, 07 May 2020 19:13:51 GMT\"0x8D7F2BAC752A143\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "5b3c963a-dbf9-423d-a902-cd9e44dc1fbd", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring085993b4f5e457d61?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2a1467c9-7d41-4b5e-90ef-5ba4bf8cbda9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe1ef-a01e-0020-45a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "2a1467c9-7d41-4b5e-90ef-5ba4bf8cbda9" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring085993b4f5e457d61" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[7].json deleted file mode 100644 index 05f16f8a8ff5..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestcontainersaspermissionstostring[7].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring0007465c7b5392ae3?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "10cb38c2-f4bc-43ec-8a9c-82460a561e75" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC7834158", - "Last-Modified" : "Thu, 07 May 2020 19:13:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3524-101e-0047-6ba3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "10cb38c2-f4bc-43ec-8a9c-82460a561e75" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9c057f70-5323-4d6a-95ac-8e513a0db325" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe209-a01e-0020-58a3-248d86000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring0007465c7b5392ae3Thu, 07 May 2020 19:13:52 GMT\"0x8D7F2BAC7834158\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "9c057f70-5323-4d6a-95ac-8e513a0db325", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtccontainersaspermissionstostring0007465c7b5392ae3?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9121fefa-2c56-4410-b6e5-5b6b61c32d44" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3535-101e-0047-78a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:51 GMT", - "x-ms-client-request-id" : "9121fefa-2c56-4410-b6e5-5b6b61c32d44" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring0007465c7b5392ae3" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[0].json deleted file mode 100644 index bd24d0604f19..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangeparse0helpertestiprangeparse561542335b9c4ff1?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "061de6d9-dd9a-42a8-b956-b8da402fc3b1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACA06DED1", - "Last-Modified" : "Thu, 07 May 2020 19:13:56 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3709-101e-0047-72a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "061de6d9-dd9a-42a8-b956-b8da402fc3b1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtciprangeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0902932a-b945-45b4-87da-a850520438cb" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe386-a01e-0020-0ba3-248d86000000", - "Body" : "jtciprangeparsejtciprangeparse0helpertestiprangeparse561542335b9c4ff1Thu, 07 May 2020 19:13:56 GMT\"0x8D7F2BACA06DED1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "0902932a-b945-45b4-87da-a850520438cb", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangeparse0helpertestiprangeparse561542335b9c4ff1?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4e78ccb4-69d7-4a72-af5a-6b0bfe0b0d80" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3710-101e-0047-76a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "4e78ccb4-69d7-4a72-af5a-6b0bfe0b0d80" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangeparse0helpertestiprangeparse561542335b9c4ff1" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[1].json deleted file mode 100644 index 7b2a780c40fa..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangeparse0helpertestiprangeparse45f212252470bac5?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "021aa7da-fd8d-4c29-882d-8ffc99146b66" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACA32CD88", - "Last-Modified" : "Thu, 07 May 2020 19:13:56 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe38c-a01e-0020-10a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "021aa7da-fd8d-4c29-882d-8ffc99146b66" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtciprangeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5912a165-f54e-4a40-aca6-3a4585bbb436" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f371c-101e-0047-80a3-249d7a000000", - "Body" : "jtciprangeparsejtciprangeparse0helpertestiprangeparse45f212252470bac5Thu, 07 May 2020 19:13:56 GMT\"0x8D7F2BACA32CD88\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "5912a165-f54e-4a40-aca6-3a4585bbb436", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangeparse0helpertestiprangeparse45f212252470bac5?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e16bde3d-f3de-4d72-a37b-3b92c85d1784" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe395-a01e-0020-15a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "e16bde3d-f3de-4d72-a37b-3b92c85d1784" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangeparse0helpertestiprangeparse45f212252470bac5" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[2].json deleted file mode 100644 index aa399df6dd17..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangeparse[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangeparse0helpertestiprangeparse095652220ca54d0b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "267063cc-9779-41ab-88f8-1c0258409e81" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACA5F7484", - "Last-Modified" : "Thu, 07 May 2020 19:13:56 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3730-101e-0047-13a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "267063cc-9779-41ab-88f8-1c0258409e81" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtciprangeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e41fc0f1-eb83-4353-9cf3-500aeaf184c1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe39c-a01e-0020-1ca3-248d86000000", - "Body" : "jtciprangeparsejtciprangeparse0helpertestiprangeparse095652220ca54d0bThu, 07 May 2020 19:13:56 GMT\"0x8D7F2BACA5F7484\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "e41fc0f1-eb83-4353-9cf3-500aeaf184c1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangeparse0helpertestiprangeparse095652220ca54d0b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "24c568ee-7b2c-4ee6-ad36-f4753aba2817" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3750-101e-0047-2da3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "24c568ee-7b2c-4ee6-ad36-f4753aba2817" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangeparse0helpertestiprangeparse095652220ca54d0b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[0].json deleted file mode 100644 index e51f6dbc5467..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangetostring0helpertestiprangetostringd1f033309a87e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "57385b06-e8ed-436a-ad48-bf37c955da32" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC9806938", - "Last-Modified" : "Thu, 07 May 2020 19:13:55 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe323-a01e-0020-3aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "57385b06-e8ed-436a-ad48-bf37c955da32" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtciprangetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a4a843c8-6876-4245-86af-5c01e67a4871" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f36a7-101e-0047-20a3-249d7a000000", - "Body" : "jtciprangetostringjtciprangetostring0helpertestiprangetostringd1f033309a87eThu, 07 May 2020 19:13:55 GMT\"0x8D7F2BAC9806938\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "a4a843c8-6876-4245-86af-5c01e67a4871", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangetostring0helpertestiprangetostringd1f033309a87e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0879f7dc-b96b-4fc0-aff4-c1c90c92e118" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe330-a01e-0020-45a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "0879f7dc-b96b-4fc0-aff4-c1c90c92e118" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangetostring0helpertestiprangetostringd1f033309a87e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[1].json deleted file mode 100644 index 94644dee5242..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangetostring0helpertestiprangetostringca0167490b9a6?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7a748bce-2dcf-4c4d-8877-0f79224ae326" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC9AFF73A", - "Last-Modified" : "Thu, 07 May 2020 19:13:55 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f36bd-101e-0047-35a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:54 GMT", - "x-ms-client-request-id" : "7a748bce-2dcf-4c4d-8877-0f79224ae326" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtciprangetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c1caec24-d6f5-43c4-9799-5837d8d03b3a" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe33a-a01e-0020-4da3-248d86000000", - "Body" : "jtciprangetostringjtciprangetostring0helpertestiprangetostringca0167490b9a6Thu, 07 May 2020 19:13:55 GMT\"0x8D7F2BAC9AFF73A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "c1caec24-d6f5-43c4-9799-5837d8d03b3a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangetostring0helpertestiprangetostringca0167490b9a6?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4ad08b9f-42c3-444d-844e-197edfccca9b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f36d2-101e-0047-44a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "4ad08b9f-42c3-444d-844e-197edfccca9b" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangetostring0helpertestiprangetostringca0167490b9a6" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[2].json deleted file mode 100644 index e184af42d110..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestiprangetostring[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangetostring0helpertestiprangetostring39c69873be105?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "727e5e25-76dd-4edd-9725-31930d5bff25" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC9DE0956", - "Last-Modified" : "Thu, 07 May 2020 19:13:56 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe35c-a01e-0020-64a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "727e5e25-76dd-4edd-9725-31930d5bff25" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtciprangetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "17b42657-7561-462b-99a3-0e8f3c3eee47" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f36f2-101e-0047-5fa3-249d7a000000", - "Body" : "jtciprangetostringjtciprangetostring0helpertestiprangetostring39c69873be105Thu, 07 May 2020 19:13:56 GMT\"0x8D7F2BAC9DE0956\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "17b42657-7561-462b-99a3-0e8f3c3eee47", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtciprangetostring0helpertestiprangetostring39c69873be105?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d0c4d5cc-5f37-4a61-a385-92405310aa75" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe375-a01e-0020-7aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:55 GMT", - "x-ms-client-request-id" : "d0c4d5cc-5f37-4a61-a385-92405310aa75" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangetostring0helpertestiprangetostring39c69873be105" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestrequestproperty.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestrequestproperty.json index cce021a3db4c..8bf7c95e8eb9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestrequestproperty.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestrequestproperty.json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcrequestproperty0helpertestrequestpropertya748894003457?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrequestproperty0helpertestrequestpropertye4915713f4085?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ac2f5cf4-421b-44c8-a0cf-4c31e09bb1db" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2518781b-e9ee-4a0b-8a2b-24ed2f38cbdb" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABB52DCEE", - "Last-Modified" : "Thu, 07 May 2020 19:13:31 GMT", + "ETag" : "0x8D8291CB9219CDF", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:01 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "eb8fdac9-a01e-0020-74a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:31 GMT", - "x-ms-client-request-id" : "ac2f5cf4-421b-44c8-a0cf-4c31e09bb1db" + "x-ms-request-id" : "f99e5de6-e01e-009f-6305-5bdd80000000", + "Date" : "Thu, 16 Jul 2020 00:11:00 GMT", + "x-ms-client-request-id" : "2518781b-e9ee-4a0b-8a2b-24ed2f38cbdb" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcrequestproperty0helpertestrequestpropertya748894003457?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrequestproperty0helpertestrequestpropertye4915713f4085?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "78cf3460-8a6b-4bb6-84ae-277f41f99a94" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2886e93-d6c6-44a4-8a1f-7beb80ed0f23" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -34,18 +34,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "eb8fdaeb-a01e-0020-12a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:31 GMT", - "x-ms-client-request-id" : "78cf3460-8a6b-4bb6-84ae-277f41f99a94" + "x-ms-request-id" : "7e802afe-001e-0097-2305-5bc78f000000", + "Date" : "Thu, 16 Jul 2020 00:11:02 GMT", + "x-ms-client-request-id" : "f2886e93-d6c6-44a4-8a1f-7beb80ed0f23" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcrequestproperty&comp=list", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrequestproperty&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "46677f74-8047-481e-9f86-69bed45fb10e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2565815-e656-4195-af19-f81d0c645ab1" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -53,13 +53,13 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "eb8fdaff-a01e-0020-21a3-248d86000000", - "Body" : "jtcrequestproperty", - "Date" : "Thu, 07 May 2020 19:13:32 GMT", - "x-ms-client-request-id" : "46677f74-8047-481e-9f86-69bed45fb10e", + "x-ms-request-id" : "1085faac-501e-0051-5405-5b0c0e000000", + "Body" : "jtcrequestproperty", + "Date" : "Thu, 16 Jul 2020 00:11:02 GMT", + "x-ms-client-request-id" : "b2565815-e656-4195-af19-f81d0c645ab1", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "jtcrequestproperty0helpertestrequestpropertya748894003457" ] + "variables" : [ "jtcrequestproperty0helpertestrequestpropertye4915713f4085" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestsasprotocolparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestsasprotocolparse[0].json deleted file mode 100644 index e27ce9085f35..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestsasprotocolparse[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcsasprotocolparse0helpertestsasprotocolparse1949613706ba?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2201de76-89a6-4356-8653-2fbfe27cd5ab" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACA8EBF7F", - "Last-Modified" : "Thu, 07 May 2020 19:13:57 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fe3b2-a01e-0020-2fa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "2201de76-89a6-4356-8653-2fbfe27cd5ab" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcsasprotocolparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "33a1040a-b4b0-4ca5-8890-bd16d432f85f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3777-101e-0047-50a3-249d7a000000", - "Body" : "jtcsasprotocolparsejtcsasprotocolparse0helpertestsasprotocolparse1949613706baThu, 07 May 2020 19:13:57 GMT\"0x8D7F2BACA8EBF7F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "33a1040a-b4b0-4ca5-8890-bd16d432f85f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcsasprotocolparse0helpertestsasprotocolparse1949613706ba?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "aa2ab65e-a7d9-4955-9dfc-f6397d7e87ee" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fe3c5-a01e-0020-40a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "aa2ab65e-a7d9-4955-9dfc-f6397d7e87ee" - }, - "Exception" : null - } ], - "variables" : [ "jtcsasprotocolparse0helpertestsasprotocolparse1949613706ba" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestsasprotocolparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestsasprotocolparse[1].json deleted file mode 100644 index b9de2a9674fd..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestsasprotocolparse[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcsasprotocolparse0helpertestsasprotocolparse4ec41200fa72?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a7c84ba2-5959-4cb6-9fc1-2000ee8ec0a8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BACABD1480", - "Last-Modified" : "Thu, 07 May 2020 19:13:57 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3799-101e-0047-71a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "a7c84ba2-5959-4cb6-9fc1-2000ee8ec0a8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcsasprotocolparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8e1ac86f-424b-4f5a-9370-6333eadb9850" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fe3d8-a01e-0020-53a3-248d86000000", - "Body" : "jtcsasprotocolparsejtcsasprotocolparse0helpertestsasprotocolparse4ec41200fa72Thu, 07 May 2020 19:13:57 GMT\"0x8D7F2BACABD1480\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:57 GMT", - "x-ms-client-request-id" : "8e1ac86f-424b-4f5a-9370-6333eadb9850", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcsasprotocolparse0helpertestsasprotocolparse4ec41200fa72?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0b479234-8f7e-491d-a49b-d0fefbf1ff7a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f37b1-101e-0047-05a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:56 GMT", - "x-ms-client-request-id" : "0b479234-8f7e-491d-a49b-d0fefbf1ff7a" - }, - "Exception" : null - } ], - "variables" : [ "jtcsasprotocolparse0helpertestsasprotocolparse4ec41200fa72" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[0].json deleted file mode 100644 index a74032a8d35a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign0813321d0c4fb0fad?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2e739cbd-b630-4bec-988a-bce15a8e2c11" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABCB58243", - "Last-Modified" : "Thu, 07 May 2020 19:13:34 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdb98-a01e-0020-1da3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "2e739cbd-b630-4bec-988a-bce15a8e2c11" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "58350f9b-b31e-40ef-9429-817daf5bdbc2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdba3-a01e-0020-27a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign0813321d0c4fb0fadThu, 07 May 2020 19:13:34 GMT\"0x8D7F2BABCB58243\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:33 GMT", - "x-ms-client-request-id" : "58350f9b-b31e-40ef-9429-817daf5bdbc2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign0813321d0c4fb0fad?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dc8f2ecd-66a2-4c98-94d3-da5f6d2d258f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdbac-a01e-0020-30a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "dc8f2ecd-66a2-4c98-94d3-da5f6d2d258f" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign0813321d0c4fb0fad" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[10].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[10].json deleted file mode 100644 index 476249027856..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[10].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign00703563589e12a67?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "58acb777-beac-48ca-8d63-bf937280a8f6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABEE2E56C", - "Last-Modified" : "Thu, 07 May 2020 19:13:37 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f2e42-101e-0047-2fa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "58acb777-beac-48ca-8d63-bf937280a8f6" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "67d5723a-9ff8-4ae5-a0e1-e52ce682bb01" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdc96-a01e-0020-6ea3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign00703563589e12a67Thu, 07 May 2020 19:13:37 GMT\"0x8D7F2BABEE2E56C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "67d5723a-9ff8-4ae5-a0e1-e52ce682bb01", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign00703563589e12a67?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fd9a04ec-9ebd-4f82-9c27-573025071335" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f2e59-101e-0047-43a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "fd9a04ec-9ebd-4f82-9c27-573025071335" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign00703563589e12a67" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[11].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[11].json deleted file mode 100644 index 156361eddf6c..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[11].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign05292879ece6ea88a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "44894db6-401e-41d7-a608-ccfe53c2c3b1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABF15B126", - "Last-Modified" : "Thu, 07 May 2020 19:13:37 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdcb8-a01e-0020-0ba3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "44894db6-401e-41d7-a608-ccfe53c2c3b1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f91be0ef-3c3e-4e1c-84a8-757c01b82880" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f2e6c-101e-0047-52a3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign05292879ece6ea88aThu, 07 May 2020 19:13:37 GMT\"0x8D7F2BABF15B126\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "f91be0ef-3c3e-4e1c-84a8-757c01b82880", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign05292879ece6ea88a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e4a85b56-de21-4d67-a56b-79809ab582e0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdcd9-a01e-0020-26a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "e4a85b56-de21-4d67-a56b-79809ab582e0" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign05292879ece6ea88a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[1].json deleted file mode 100644 index 986b23d9dc27..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign06247963edf3b5f09?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "72a40f55-995d-42ab-885a-a026fe3d56d0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABCE9490E", - "Last-Modified" : "Thu, 07 May 2020 19:13:34 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdbb5-a01e-0020-36a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "72a40f55-995d-42ab-885a-a026fe3d56d0" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b151dce7-96eb-490b-8135-be742b2269b4" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdbbb-a01e-0020-3ba3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign06247963edf3b5f09Thu, 07 May 2020 19:13:34 GMT\"0x8D7F2BABCE9490E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "b151dce7-96eb-490b-8135-be742b2269b4", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign06247963edf3b5f09?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f0ee64a4-236c-4535-9c04-a19acb3d3c4d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdbc1-a01e-0020-3fa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "f0ee64a4-236c-4535-9c04-a19acb3d3c4d" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign06247963edf3b5f09" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[2].json deleted file mode 100644 index 60442e92dcaf..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign020578e04a9400c36?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6e97fe85-1c58-46bf-b957-587c50cf503d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABD1D0FE1", - "Last-Modified" : "Thu, 07 May 2020 19:13:34 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdbc3-a01e-0020-41a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "6e97fe85-1c58-46bf-b957-587c50cf503d" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "519dc6af-4a3a-4969-8e02-269715661c7d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdbc8-a01e-0020-44a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign020578e04a9400c36Thu, 07 May 2020 19:13:34 GMT\"0x8D7F2BABD1D0FE1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "519dc6af-4a3a-4969-8e02-269715661c7d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign020578e04a9400c36?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "512f15c7-aba9-4ba5-bc03-12984a499b72" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdbcd-a01e-0020-49a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "512f15c7-aba9-4ba5-bc03-12984a499b72" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign020578e04a9400c36" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[3].json deleted file mode 100644 index 7fd8f89b5ca7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign039435ee7d9a16772?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c38a2631-3f0e-458d-b9fa-32e3f5b25428" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABD5124D8", - "Last-Modified" : "Thu, 07 May 2020 19:13:35 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdbde-a01e-0020-57a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "c38a2631-3f0e-458d-b9fa-32e3f5b25428" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fb544c33-962f-4076-accb-df42274d7bad" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdbec-a01e-0020-61a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign039435ee7d9a16772Thu, 07 May 2020 19:13:35 GMT\"0x8D7F2BABD5124D8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:34 GMT", - "x-ms-client-request-id" : "fb544c33-962f-4076-accb-df42274d7bad", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign039435ee7d9a16772?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "49ae44d1-6d23-492c-b97a-cec89f1d0a4d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdbf8-a01e-0020-6ca3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "49ae44d1-6d23-492c-b97a-cec89f1d0a4d" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign039435ee7d9a16772" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[4].json deleted file mode 100644 index 230c37030576..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign029957b1e23cdbce6?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f5ee76d0-952d-478e-a3d6-3f0ce52067d1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABD844F2B", - "Last-Modified" : "Thu, 07 May 2020 19:13:35 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdc00-a01e-0020-71a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "f5ee76d0-952d-478e-a3d6-3f0ce52067d1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c6d2dd57-c76f-455b-a253-b219ef0c9226" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdc05-a01e-0020-74a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign029957b1e23cdbce6Thu, 07 May 2020 19:13:35 GMT\"0x8D7F2BABD844F2B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "c6d2dd57-c76f-455b-a253-b219ef0c9226", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign029957b1e23cdbce6?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0b660595-2c7b-4297-937c-d7fa956bef28" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdc08-a01e-0020-77a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "0b660595-2c7b-4297-937c-d7fa956bef28" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign029957b1e23cdbce6" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[5].json deleted file mode 100644 index e2d78551f40d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign009007a1a61fea73b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f37b6627-9e3b-48bd-a6a1-39221bb8edae" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABDB9EB17", - "Last-Modified" : "Thu, 07 May 2020 19:13:35 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdc0e-a01e-0020-7ca3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "f37b6627-9e3b-48bd-a6a1-39221bb8edae" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2b56ee4d-a0b5-4ac8-8dc1-1936be30152f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdc16-a01e-0020-01a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign009007a1a61fea73bThu, 07 May 2020 19:13:35 GMT\"0x8D7F2BABDB9EB17\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "2b56ee4d-a0b5-4ac8-8dc1-1936be30152f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign009007a1a61fea73b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f97d5b3a-273b-44f7-bfc3-0b2a72bd985b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdc19-a01e-0020-04a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "f97d5b3a-273b-44f7-bfc3-0b2a72bd985b" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign009007a1a61fea73b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[6].json deleted file mode 100644 index db3ba34d0320..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[6].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign0106618e090e59638?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "52353a45-9f94-49eb-9801-1567b3a17258" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABDEDB1D9", - "Last-Modified" : "Thu, 07 May 2020 19:13:36 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdc28-a01e-0020-11a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "52353a45-9f94-49eb-9801-1567b3a17258" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5c4e584e-49d3-4619-8bae-35e1d414a19a" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdc3d-a01e-0020-22a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign0106618e090e59638Thu, 07 May 2020 19:13:36 GMT\"0x8D7F2BABDEDB1D9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:35 GMT", - "x-ms-client-request-id" : "5c4e584e-49d3-4619-8bae-35e1d414a19a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign0106618e090e59638?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2f8f8043-50fb-4a60-810a-8b0f2f7db79c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdc41-a01e-0020-26a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "2f8f8043-50fb-4a60-810a-8b0f2f7db79c" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign0106618e090e59638" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[7].json deleted file mode 100644 index c61784cb1790..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[7].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign0301791e57a9feb60?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7d0243cf-48c4-49a3-8941-bde1cd6ef7f1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABE2178A8", - "Last-Modified" : "Thu, 07 May 2020 19:13:36 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdc4a-a01e-0020-2fa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "7d0243cf-48c4-49a3-8941-bde1cd6ef7f1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0ba0f5fc-a0de-44e9-bb50-1da02b783ea2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f2de3-101e-0047-5da3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign0301791e57a9feb60Thu, 07 May 2020 19:13:36 GMT\"0x8D7F2BABE2178A8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "0ba0f5fc-a0de-44e9-bb50-1da02b783ea2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign0301791e57a9feb60?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bfd039dc-26b8-4426-bb82-50d818d36d52" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdc5d-a01e-0020-40a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "bfd039dc-26b8-4426-bb82-50d818d36d52" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign0301791e57a9feb60" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[8].json deleted file mode 100644 index 0df38064bb7f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[8].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign0475857899429bb23?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3e1fdc17-8838-46df-b612-32456ab726c9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABE86F389", - "Last-Modified" : "Thu, 07 May 2020 19:13:37 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f2e02-101e-0047-77a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "3e1fdc17-8838-46df-b612-32456ab726c9" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2f70e6b8-a849-4bd1-a14d-e82c7e8c7845" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdc76-a01e-0020-56a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign0475857899429bb23Thu, 07 May 2020 19:13:37 GMT\"0x8D7F2BABE86F389\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "2f70e6b8-a849-4bd1-a14d-e82c7e8c7845", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign0475857899429bb23?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "81de46f3-4ea0-43c9-8f6a-f931488f303f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f2e1d-101e-0047-0fa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "81de46f3-4ea0-43c9-8f6a-f931488f303f" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign0475857899429bb23" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[9].json deleted file mode 100644 index 41468053b60b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosign[9].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign006073b2de652ad84?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2251774e-70dc-4c0b-9646-3107afc432f7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABEB1A6D3", - "Last-Modified" : "Thu, 07 May 2020 19:13:37 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdc87-a01e-0020-64a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "2251774e-70dc-4c0b-9646-3107afc432f7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e14065bb-ab48-474e-8a1f-db61569fff46" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f2e2b-101e-0047-1ba3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign006073b2de652ad84Thu, 07 May 2020 19:13:37 GMT\"0x8D7F2BABEB1A6D3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:36 GMT", - "x-ms-client-request-id" : "e14065bb-ab48-474e-8a1f-db61569fff46", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosign006073b2de652ad84?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e7ed6201-123b-4898-814d-3c26273bf43c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdc8e-a01e-0020-69a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "e7ed6201-123b-4898-814d-3c26273bf43c" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign006073b2de652ad84" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[0].json deleted file mode 100644 index cbd9a38a87c7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0240021b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b297797c-523e-4250-ad7b-908dfdfa60a5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABF4FF270", - "Last-Modified" : "Thu, 07 May 2020 19:13:38 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f2e8e-101e-0047-6ea3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "b297797c-523e-4250-ad7b-908dfdfa60a5" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "086a2a2c-5e7f-4b29-9a59-dadaaa942eb6" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdcef-a01e-0020-36a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0240021bThu, 07 May 2020 19:13:38 GMT\"0x8D7F2BABF4FF270\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "086a2a2c-5e7f-4b29-9a59-dadaaa942eb6", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0240021b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8d402a5a-dc67-422b-b3eb-ed588faedae4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f2ea7-101e-0047-04a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:37 GMT", - "x-ms-client-request-id" : "8d402a5a-dc67-422b-b3eb-ed588faedae4" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0240021b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[10].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[10].json deleted file mode 100644 index b778c6c80570..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[10].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey00489141?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2b8809e1-32bf-46f7-8f77-6c8ce30dd784" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC139748C", - "Last-Modified" : "Thu, 07 May 2020 19:13:41 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3033-101e-0047-5da3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "2b8809e1-32bf-46f7-8f77-6c8ce30dd784" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4b4f9a2c-1e05-425c-af61-1e80c33b2c42" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fde27-a01e-0020-39a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey00489141Thu, 07 May 2020 19:13:41 GMT\"0x8D7F2BAC139748C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "4b4f9a2c-1e05-425c-af61-1e80c33b2c42", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey00489141?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "99c0269a-7892-4ed4-a437-d873bb0cd5df" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3046-101e-0047-6aa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "99c0269a-7892-4ed4-a437-d873bb0cd5df" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey00489141" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[11].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[11].json deleted file mode 100644 index 19e84ce4ba6d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[11].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey043707a9?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9bbecbe2-4603-4c2c-8cd6-b95680e90ddb" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC16A92A3", - "Last-Modified" : "Thu, 07 May 2020 19:13:41 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fde3f-a01e-0020-50a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "9bbecbe2-4603-4c2c-8cd6-b95680e90ddb" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c6dfdcab-7d3c-4ff9-868d-c649a96d8a29" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f304a-101e-0047-6ea3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey043707a9Thu, 07 May 2020 19:13:41 GMT\"0x8D7F2BAC16A92A3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "c6dfdcab-7d3c-4ff9-868d-c649a96d8a29", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey043707a9?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b62f5b5d-0385-4d12-8497-06fb94877ce0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fde58-a01e-0020-65a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "b62f5b5d-0385-4d12-8497-06fb94877ce0" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey043707a9" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[12].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[12].json deleted file mode 100644 index eda6bff0f0ee..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[12].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey04639751?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b664382f-76f1-4cf5-981d-dabed2a04f2d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC1995F05", - "Last-Modified" : "Thu, 07 May 2020 19:13:42 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f307c-101e-0047-14a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "b664382f-76f1-4cf5-981d-dabed2a04f2d" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f7626155-84dc-410e-8b15-d8ec436eb783" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fde67-a01e-0020-72a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey04639751Thu, 07 May 2020 19:13:42 GMT\"0x8D7F2BAC1995F05\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "f7626155-84dc-410e-8b15-d8ec436eb783", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey04639751?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3eb5ebff-ee26-447d-91e1-ff94d796bb27" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f30a0-101e-0047-32a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "3eb5ebff-ee26-447d-91e1-ff94d796bb27" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey04639751" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[13].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[13].json deleted file mode 100644 index f3198d622343..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[13].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey07104933?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8bebd8b4-0883-4f4d-ab2a-56daaec56361" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC1C28BF1", - "Last-Modified" : "Thu, 07 May 2020 19:13:42 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fde78-a01e-0020-7fa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "8bebd8b4-0883-4f4d-ab2a-56daaec56361" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "23c61c0d-adb7-4ecc-bf79-a35ca2bdf367" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f30bf-101e-0047-4ba3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey07104933Thu, 07 May 2020 19:13:42 GMT\"0x8D7F2BAC1C28BF1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "23c61c0d-adb7-4ecc-bf79-a35ca2bdf367", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey07104933?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d86b85f4-c755-4cf6-89a2-b60a1cf904d5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fde83-a01e-0020-05a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "d86b85f4-c755-4cf6-89a2-b60a1cf904d5" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey07104933" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[14].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[14].json deleted file mode 100644 index 80c5cb0eeeec..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[14].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey084111f7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "794dd7c7-40a4-4bc9-b60a-9d8e598812eb" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC1EDD509", - "Last-Modified" : "Thu, 07 May 2020 19:13:42 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f30cc-101e-0047-57a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "794dd7c7-40a4-4bc9-b60a-9d8e598812eb" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d76a058b-17d1-463f-8c79-c290e3c92256" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fde90-a01e-0020-0ea3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey084111f7Thu, 07 May 2020 19:13:42 GMT\"0x8D7F2BAC1EDD509\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "d76a058b-17d1-463f-8c79-c290e3c92256", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey084111f7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "63f6b4af-bffe-4d88-a21a-74062167af02" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f30e2-101e-0047-64a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "63f6b4af-bffe-4d88-a21a-74062167af02" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey084111f7" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[15].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[15].json deleted file mode 100644 index 56a199abfcb9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[15].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey09279171?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ff5947e1-87b4-46d3-9320-62745c0db14f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC219C1C8", - "Last-Modified" : "Thu, 07 May 2020 19:13:43 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fde9a-a01e-0020-16a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "ff5947e1-87b4-46d3-9320-62745c0db14f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b7502136-ddc1-43a0-b10e-03286e1991c1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f30fa-101e-0047-76a3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey09279171Thu, 07 May 2020 19:13:43 GMT\"0x8D7F2BAC219C1C8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "b7502136-ddc1-43a0-b10e-03286e1991c1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey09279171?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "da8f30f2-31ab-419d-ac91-18c586d53342" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdec2-a01e-0020-38a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "da8f30f2-31ab-419d-ac91-18c586d53342" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey09279171" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[16].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[16].json deleted file mode 100644 index e5e55da2f3e4..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[16].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey054830c5?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "feaaf281-887c-4d2b-9ebc-cc2252856c13" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC247A388", - "Last-Modified" : "Thu, 07 May 2020 19:13:43 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3116-101e-0047-0ca3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "feaaf281-887c-4d2b-9ebc-cc2252856c13" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fecaae98-61ea-493c-bf67-cd200d4e4f8a" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdecd-a01e-0020-43a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey054830c5Thu, 07 May 2020 19:13:43 GMT\"0x8D7F2BAC247A388\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "fecaae98-61ea-493c-bf67-cd200d4e4f8a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey054830c5?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d8b195fa-c42c-4314-8374-c9956a5150ca" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3131-101e-0047-20a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:42 GMT", - "x-ms-client-request-id" : "d8b195fa-c42c-4314-8374-c9956a5150ca" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey054830c5" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[1].json deleted file mode 100644 index 4934f6115d65..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0198370b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dfa7c3d6-d587-480a-b13f-061cf351cdad" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABF86B6EF", - "Last-Modified" : "Thu, 07 May 2020 19:13:38 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdcf5-a01e-0020-3aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "dfa7c3d6-d587-480a-b13f-061cf351cdad" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "95081519-7992-4223-baa6-35843fe26b45" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f2ec5-101e-0047-1da3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0198370bThu, 07 May 2020 19:13:38 GMT\"0x8D7F2BABF86B6EF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "95081519-7992-4223-baa6-35843fe26b45", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0198370b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "91f35e08-0c8a-49ce-bcf9-ed788e163b67" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdcff-a01e-0020-43a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "91f35e08-0c8a-49ce-bcf9-ed788e163b67" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0198370b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[2].json deleted file mode 100644 index 7687525221c4..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0591033a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1f887279-8276-47ea-ba99-f7ea687a91f4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABFB731CC", - "Last-Modified" : "Thu, 07 May 2020 19:13:39 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f2ed6-101e-0047-2da3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "1f887279-8276-47ea-ba99-f7ea687a91f4" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a7396e20-3064-4f13-aadb-df07ce057597" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdd29-a01e-0020-65a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0591033aThu, 07 May 2020 19:13:39 GMT\"0x8D7F2BABFB731CC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "a7396e20-3064-4f13-aadb-df07ce057597", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0591033a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3abea32f-9526-4a1a-b46e-f9ffaf426d7a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f2f08-101e-0047-55a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "3abea32f-9526-4a1a-b46e-f9ffaf426d7a" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0591033a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[3].json deleted file mode 100644 index 5f5a5ebd7a05..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[3].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey08902930?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "824c822e-e6dd-4e73-b3fc-780a41c14d16" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BABFE9130C", - "Last-Modified" : "Thu, 07 May 2020 19:13:39 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdd40-a01e-0020-78a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "824c822e-e6dd-4e73-b3fc-780a41c14d16" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dab85286-d4e1-4f45-8345-52575fd0f7b7" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f2f25-101e-0047-6ea3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey08902930Thu, 07 May 2020 19:13:39 GMT\"0x8D7F2BABFE9130C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "dab85286-d4e1-4f45-8345-52575fd0f7b7", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey08902930?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3f4fb26e-c138-48d7-8232-66372b64e640" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdd53-a01e-0020-09a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "3f4fb26e-c138-48d7-8232-66372b64e640" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey08902930" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[4].json deleted file mode 100644 index fa8b6f74f8df..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[4].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey00350616?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "69e2d9c4-d952-48f5-911f-acb097df4fab" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC0180707", - "Last-Modified" : "Thu, 07 May 2020 19:13:39 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f2f32-101e-0047-7aa3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:38 GMT", - "x-ms-client-request-id" : "69e2d9c4-d952-48f5-911f-acb097df4fab" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "38be04be-3d61-421c-bba7-9dce3bd9a2c4" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdd6c-a01e-0020-21a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey00350616Thu, 07 May 2020 19:13:39 GMT\"0x8D7F2BAC0180707\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "38be04be-3d61-421c-bba7-9dce3bd9a2c4", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey00350616?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a639dafb-886a-4184-b506-29e6d33be6e9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f2f3a-101e-0047-01a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "a639dafb-886a-4184-b506-29e6d33be6e9" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey00350616" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[5].json deleted file mode 100644 index 0cfb8ead80fa..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[5].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0058965c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7e5ab7a5-064d-41df-b4cb-5f1eca72831b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC0474F72", - "Last-Modified" : "Thu, 07 May 2020 19:13:39 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdd7f-a01e-0020-2ea3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "7e5ab7a5-064d-41df-b4cb-5f1eca72831b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "91d48edf-5ca5-4eaa-9c0e-46b9d1a298c2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f2f57-101e-0047-1ba3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0058965cThu, 07 May 2020 19:13:39 GMT\"0x8D7F2BAC0474F72\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "91d48edf-5ca5-4eaa-9c0e-46b9d1a298c2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0058965c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "61bc9f28-bfb4-4f9c-9194-6c795fa1a5cc" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdd9c-a01e-0020-48a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "61bc9f28-bfb4-4f9c-9194-6c795fa1a5cc" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0058965c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[6].json deleted file mode 100644 index d904bcfef208..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[6].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey03863488?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "39838f25-3dd7-4e6e-bff3-c23c2e892374" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC0790332", - "Last-Modified" : "Thu, 07 May 2020 19:13:40 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f2f6e-101e-0047-2ea3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "39838f25-3dd7-4e6e-bff3-c23c2e892374" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "60024e52-1414-42c5-9d12-d8ac72dc82bd" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fddac-a01e-0020-55a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey03863488Thu, 07 May 2020 19:13:40 GMT\"0x8D7F2BAC0790332\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "60024e52-1414-42c5-9d12-d8ac72dc82bd", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey03863488?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "814d4a72-9d80-42a2-8753-b2644de480f1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f2f81-101e-0047-40a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:39 GMT", - "x-ms-client-request-id" : "814d4a72-9d80-42a2-8753-b2644de480f1" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey03863488" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[7].json deleted file mode 100644 index 97df073cc74a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[7].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey045663d2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1cd51dbf-320f-43a3-a2f8-ba9521cb21b8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC0A9F9E0", - "Last-Modified" : "Thu, 07 May 2020 19:13:40 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fddbe-a01e-0020-5fa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "1cd51dbf-320f-43a3-a2f8-ba9521cb21b8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6c47d810-0f3a-4087-9534-a653dda7e4e5" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f2f93-101e-0047-4fa3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey045663d2Thu, 07 May 2020 19:13:40 GMT\"0x8D7F2BAC0A9F9E0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "6c47d810-0f3a-4087-9534-a653dda7e4e5", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey045663d2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b5ceaa8b-ae75-4936-a8e5-bf9595db9a5b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fddd6-a01e-0020-74a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "b5ceaa8b-ae75-4936-a8e5-bf9595db9a5b" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey045663d2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[8].json deleted file mode 100644 index f8b950b5c5f8..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[8].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey076017c9?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c5a85cc9-eec0-4eaa-a673-a35d54b0a014" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC0D962FD", - "Last-Modified" : "Thu, 07 May 2020 19:13:40 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f2fd0-101e-0047-09a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "c5a85cc9-eec0-4eaa-a673-a35d54b0a014" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "31dfac25-6378-4f18-b895-3ed9e1c20480" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdde9-a01e-0020-05a3-248d86000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey076017c9Thu, 07 May 2020 19:13:40 GMT\"0x8D7F2BAC0D962FD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "31dfac25-6378-4f18-b895-3ed9e1c20480", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey076017c9?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "277ac82c-9305-4751-878f-d41549866b05" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3002-101e-0047-32a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "277ac82c-9305-4751-878f-d41549866b05" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey076017c9" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[9].json deleted file mode 100644 index dc3f04db383b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturesstringtosignuserdelegationkey[9].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey07909709?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4a8ce625-da04-49f4-b71a-ebb608bf57d0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC10884A0", - "Last-Modified" : "Thu, 07 May 2020 19:13:41 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fde12-a01e-0020-27a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "4a8ce625-da04-49f4-b71a-ebb608bf57d0" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "aec2bf1c-1c8c-4d80-8eaf-bd2ba0e95b55" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f301a-101e-0047-45a3-249d7a000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey07909709Thu, 07 May 2020 19:13:41 GMT\"0x8D7F2BAC10884A0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:40 GMT", - "x-ms-client-request-id" : "aec2bf1c-1c8c-4d80-8eaf-bd2ba0e95b55", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey07909709?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "647e874d-c707-4fb2-b307-008f8879a7d8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fde1f-a01e-0020-32a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:41 GMT", - "x-ms-client-request-id" : "647e874d-c707-4fb2-b307-008f8879a7d8" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey07909709" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[0].json deleted file mode 100644 index 09be695500b6..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[0].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturevaluescanonicalizedresource0919823621?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "158ac79b-e903-48ab-94fb-e9d25cab0166" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC27B336E", - "Last-Modified" : "Thu, 07 May 2020 19:13:43 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fded6-a01e-0020-49a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "158ac79b-e903-48ab-94fb-e9d25cab0166" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturevaluescanonicalizedresource&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3e847b6c-fe24-4cf3-8434-8b566df17c27" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3141-101e-0047-30a3-249d7a000000", - "Body" : "jtcservicesassignaturevaluescanonicalizedresourcejtcservicesassignaturevaluescanonicalizedresource0919823621Thu, 07 May 2020 19:13:43 GMT\"0x8D7F2BAC27B336E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "3e847b6c-fe24-4cf3-8434-8b566df17c27", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturevaluescanonicalizedresource0919823621?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "031b1b49-9839-4fd6-85bf-209445881c61" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdeee-a01e-0020-5aa3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "031b1b49-9839-4fd6-85bf-209445881c61" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluescanonicalizedresource0919823621" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[1].json deleted file mode 100644 index 0e2f99b3cdc5..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[1].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturevaluescanonicalizedresource0564725db1?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a522e85d-8bd0-4e87-ab1d-5f9ad53bd655" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC2A93C1E", - "Last-Modified" : "Thu, 07 May 2020 19:13:43 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f3157-101e-0047-43a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "a522e85d-8bd0-4e87-ab1d-5f9ad53bd655" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturevaluescanonicalizedresource&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "abf4163a-14ba-4442-9d94-55bd59821e20" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdf09-a01e-0020-6fa3-248d86000000", - "Body" : "jtcservicesassignaturevaluescanonicalizedresourcejtcservicesassignaturevaluescanonicalizedresource0564725db1Thu, 07 May 2020 19:13:43 GMT\"0x8D7F2BAC2A93C1E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "abf4163a-14ba-4442-9d94-55bd59821e20", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturevaluescanonicalizedresource0564725db1?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "925a4ca1-e5f9-436d-ba65-924da93ce671" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f3182-101e-0047-66a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "925a4ca1-e5f9-436d-ba65-924da93ce671" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluescanonicalizedresource0564725db1" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[2].json deleted file mode 100644 index 23c596c354df..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluescanonicalizedresource[2].json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturevaluescanonicalizedresource030692a8af?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8f8e4f98-7151-4f9c-a652-83ccdaa405e5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC2D7C1D9", - "Last-Modified" : "Thu, 07 May 2020 19:13:44 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "eb8fdf2d-a01e-0020-11a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "8f8e4f98-7151-4f9c-a652-83ccdaa405e5" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturevaluescanonicalizedresource&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7795cbca-780c-42d6-aa4a-9012f7903033" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a09f3197-101e-0047-78a3-249d7a000000", - "Body" : "jtcservicesassignaturevaluescanonicalizedresourcejtcservicesassignaturevaluescanonicalizedresource030692a8afThu, 07 May 2020 19:13:44 GMT\"0x8D7F2BAC2D7C1D9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "7795cbca-780c-42d6-aa4a-9012f7903033", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturevaluescanonicalizedresource030692a8af?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fbdf37ff-7e91-4870-9418-ed21aaaec5e2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "eb8fdf42-a01e-0020-20a3-248d86000000", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "fbdf37ff-7e91-4870-9418-ed21aaaec5e2" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluescanonicalizedresource030692a8af" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia.json deleted file mode 100644 index 7651793f9098..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestservicesassignaturevaluesia.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturevaluesia078916494145cada2a4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cdccb121-7a91-4a1f-b04a-481d813b936b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7F2BAC308B147", - "Last-Modified" : "Thu, 07 May 2020 19:13:44 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a09f31a1-101e-0047-02a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:43 GMT", - "x-ms-client-request-id" : "cdccb121-7a91-4a1f-b04a-481d813b936b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net?prefix=jtcservicesassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4a6b8f80-9835-4fe1-9ea2-22e71998ad06" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "eb8fdf4f-a01e-0020-2aa3-248d86000000", - "Body" : "jtcservicesassignaturevaluesiajtcservicesassignaturevaluesia078916494145cada2a4Thu, 07 May 2020 19:13:44 GMT\"0x8D7F2BAC308B147\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "4a6b8f80-9835-4fe1-9ea2-22e71998ad06", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://kasobolcanarytest.blob.core.windows.net/jtcservicesassignaturevaluesia078916494145cada2a4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "24db1572-7c06-4a27-97b1-136da46a78ab" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a09f31b4-101e-0047-11a3-249d7a000000", - "Date" : "Thu, 07 May 2020 19:13:44 GMT", - "x-ms-client-request-id" : "24db1572-7c06-4a27-97b1-136da46a78ab" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesia078916494145cada2a4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTesturlparser.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTesturlparser.json new file mode 100644 index 000000000000..70caff0468ff --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTesturlparser.json @@ -0,0 +1,65 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcurlparser0helpertesturlparser407259300197e44b041?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "55471a11-2f32-4cba-a617-af51198b640e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8291CC09984E3", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:14 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e0d85917-401e-0096-3e05-5b9853000000", + "Date" : "Thu, 16 Jul 2020 00:11:13 GMT", + "x-ms-client-request-id" : "55471a11-2f32-4cba-a617-af51198b640e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcurlparser&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1591478c-7355-40e5-b0a9-1c3d444277ec" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e3d9fcbc-d01e-003d-3105-5be799000000", + "Body" : "jtcurlparserjtcurlparser0helpertesturlparser407259300197e44b041Thu, 16 Jul 2020 00:11:14 GMT\"0x8D8291CC09984E3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:13 GMT", + "x-ms-client-request-id" : "1591478c-7355-40e5-b0a9-1c3d444277ec", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcurlparser0helpertesturlparser407259300197e44b041?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "58f42db1-b701-4bbf-9868-72ed88b053f8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "3d3afb07-d01e-0084-0805-5be383000000", + "Date" : "Thu, 16 Jul 2020 00:11:14 GMT", + "x-ms-client-request-id" : "58f42db1-b701-4bbf-9868-72ed88b053f8" + }, + "Exception" : null + } ], + "variables" : [ "jtcurlparser0helpertesturlparser407259300197e44b041" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestutilityconvertstreamtobufferreplayable.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestutilityconvertstreamtobufferreplayable.json index 897655d011ff..cebdddaf3002 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestutilityconvertstreamtobufferreplayable.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/HelperTestutilityconvertstreamtobufferreplayable.json @@ -1,65 +1,65 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcutilityconvertstreamtobufferreplayable0306399d7e1bf4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcutilityconvertstreamtobufferreplayable01036890a08515?restype=container", "Headers" : { - "x-ms-version" : "2019-07-07", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3c981c48-dacd-407d-9c24-aee014d60598" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c9c2311-7ce0-4b63-9255-93bbcfa7bc59" }, "Response" : { - "x-ms-version" : "2019-07-07", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8071EE2EDA5AC", - "Last-Modified" : "Tue, 02 Jun 2020 18:00:51 GMT", + "ETag" : "0x8D8291CC2B8F21E", + "Last-Modified" : "Thu, 16 Jul 2020 00:11:17 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "c5379dc9-001e-0080-2607-39b2a6000000", - "Date" : "Tue, 02 Jun 2020 18:00:50 GMT", - "x-ms-client-request-id" : "3c981c48-dacd-407d-9c24-aee014d60598" + "x-ms-request-id" : "33a0c0c8-801e-006d-2205-5b25c9000000", + "Date" : "Thu, 16 Jul 2020 00:11:16 GMT", + "x-ms-client-request-id" : "2c9c2311-7ce0-4b63-9255-93bbcfa7bc59" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcutilityconvertstreamtobufferreplayable&comp=list", "Headers" : { - "x-ms-version" : "2019-07-07", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "14a89470-71e3-4535-bbbc-c5aca43f25c2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bbe763e8-041e-411b-a38f-f53978b17803" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-07-07", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "53084217-001e-0016-3107-39bb77000000", - "Body" : "jtcutilityconvertstreamtobufferreplayablejtcutilityconvertstreamtobufferreplayable0306399d7e1bf4Tue, 02 Jun 2020 18:00:51 GMT\"0x8D8071EE2EDA5AC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Tue, 02 Jun 2020 18:00:51 GMT", - "x-ms-client-request-id" : "14a89470-71e3-4535-bbbc-c5aca43f25c2", + "x-ms-request-id" : "6213775c-301e-008c-0705-5bf98c000000", + "Body" : "jtcutilityconvertstreamtobufferreplayablejtcutilityconvertstreamtobufferreplayable01036890a08515Thu, 16 Jul 2020 00:11:17 GMT\"0x8D8291CC2B8F21E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 00:11:17 GMT", + "x-ms-client-request-id" : "bbe763e8-041e-411b-a38f-f53978b17803", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcutilityconvertstreamtobufferreplayable0306399d7e1bf4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcutilityconvertstreamtobufferreplayable01036890a08515?restype=container", "Headers" : { - "x-ms-version" : "2019-07-07", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cf15f617-ecd9-4b4f-98b5-386623b5d0e1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "76702701-96fc-4e6b-9d91-089a90b3545f" }, "Response" : { - "x-ms-version" : "2019-07-07", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "13f8c9ec-a01e-0020-0d07-393607000000", - "Date" : "Tue, 02 Jun 2020 18:00:51 GMT", - "x-ms-client-request-id" : "cf15f617-ecd9-4b4f-98b5-386623b5d0e1" + "x-ms-request-id" : "685a41ea-801e-001f-3d05-5b2286000000", + "Date" : "Thu, 16 Jul 2020 00:11:18 GMT", + "x-ms-client-request-id" : "76702701-96fc-4e6b-9d91-089a90b3545f" }, "Exception" : null } ], - "variables" : [ "jtcutilityconvertstreamtobufferreplayable0306399d7e1bf4", "6268bc1e-14a6-4b03-8b7d-b064105be4cb" ] + "variables" : [ "jtcutilityconvertstreamtobufferreplayable01036890a08515", "c3c5c66b-bac7-4af8-a4ad-62f556c2277a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[0].json index a7b954cb92d3..e4dd756d9bd2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[0].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac753421262?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb8666861e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bc33deed-d0df-4049-a269-236944296407" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "abdd8419-7bc6-4b9c-bb64-c29ba5c5929f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1A2D6CBD", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:29 GMT", + "ETag" : "0x8D827525171D03E", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac1d2-901e-0077-03f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:28 GMT", - "x-ms-client-request-id" : "bc33deed-d0df-4049-a269-236944296407" + "x-ms-request-id" : "d39c57cc-a01e-0055-023b-598109000000", + "Date" : "Mon, 13 Jul 2020 17:29:37 GMT", + "x-ms-client-request-id" : "abdd8419-7bc6-4b9c-bb64-c29ba5c5929f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac753421262/javablobacquireblobleaseac152907a5360762e80043e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb8666861e/javablobacquireblobleaseac173435e4bf81e5b1e2475", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "967dd5c2-2e6e-4c23-a973-d992e1fa65fd", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f602e55e-723d-4c48-99e2-17f07b384332", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:29 GMT", + "x-ms-version-id" : "2020-07-13T17:29:38.7057531Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:38 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:28 GMT", + "Date" : "Mon, 13 Jul 2020 17:29:38 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1A3558B6", + "ETag" : "0x8D8275251DB5D7B", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac1dd-901e-0077-0cf3-12b537000000", - "x-ms-client-request-id" : "967dd5c2-2e6e-4c23-a973-d992e1fa65fd" + "x-ms-request-id" : "f84c79cc-601e-0007-1c3b-59fde1000000", + "x-ms-client-request-id" : "f602e55e-723d-4c48-99e2-17f07b384332" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac753421262/javablobacquireblobleaseac152907a5360762e80043e?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb8666861e/javablobacquireblobleaseac173435e4bf81e5b1e2475?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "854f56ce-2046-404f-9747-0e7771d0a927" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "74bde7c6-f4da-4553-bdd5-6f024058effa", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1A3558B6", - "x-ms-lease-id" : "5b86ff15-fc30-4dfa-ad16-9059e96c5e1f", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:29 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "34fba646-401e-0096-613b-599853000000", + "Date" : "Mon, 13 Jul 2020 17:29:38 GMT", + "x-ms-client-request-id" : "74bde7c6-f4da-4553-bdd5-6f024058effa" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb8666861e/javablobacquireblobleaseac173435e4bf81e5b1e2475?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9427e1e-c9ad-41db-8b71-083f7ddf1cb7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8275251DB5D7B", + "x-ms-lease-id" : "e948ed6f-91d4-4243-9836-ac0dc17e1e92", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac1ec-901e-0077-18f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:28 GMT", - "x-ms-client-request-id" : "854f56ce-2046-404f-9747-0e7771d0a927" + "x-ms-request-id" : "783219da-801e-0020-443b-59ea25000000", + "Date" : "Mon, 13 Jul 2020 17:29:39 GMT", + "x-ms-client-request-id" : "f9427e1e-c9ad-41db-8b71-083f7ddf1cb7" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "260ecd80-4ced-4247-a6e5-03b19d61c29c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ff8e485-69bd-4be9-b663-de6e972880b7" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac1f3-901e-0077-1df3-12b537000000", - "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac753421262Wed, 15 Apr 2020 07:03:29 GMT\"0x8D7E10B1A2D6CBD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:28 GMT", - "x-ms-client-request-id" : "260ecd80-4ced-4247-a6e5-03b19d61c29c", + "x-ms-request-id" : "6ee6627d-301e-009c-513b-593ce4000000", + "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseacb8666861eMon, 13 Jul 2020 17:29:38 GMT\"0x8D827525171D03E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:29:39 GMT", + "x-ms-client-request-id" : "1ff8e485-69bd-4be9-b663-de6e972880b7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac753421262?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb8666861e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a887755e-f55f-4b4f-a2a5-9d2498a6f4bc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "326f7aec-9591-43bc-9052-a3a58f73cea8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac1fa-901e-0077-24f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:28 GMT", - "x-ms-client-request-id" : "a887755e-f55f-4b4f-a2a5-9d2498a6f4bc" + "x-ms-request-id" : "af2c3c5f-b01e-0076-7c3b-591bca000000", + "Date" : "Mon, 13 Jul 2020 17:29:40 GMT", + "x-ms-client-request-id" : "326f7aec-9591-43bc-9052-a3a58f73cea8" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac753421262", "javablobacquireblobleaseac152907a5360762e80043e" ] + "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseacb8666861e", "javablobacquireblobleaseac173435e4bf81e5b1e2475" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[1].json index 828d13ecb655..4b165ae80e94 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[1].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac6f261980a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb57078380?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "448b14a3-e1ba-4718-a727-8dbd1cd3d452" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5c40bc57-06fa-42de-9fb1-b0f09a42b138" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1A5410D1", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:29 GMT", + "ETag" : "0x8D82752534E2A6E", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac201-901e-0077-2bf3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "448b14a3-e1ba-4718-a727-8dbd1cd3d452" + "x-ms-request-id" : "c59e7275-d01e-003d-373b-59e799000000", + "Date" : "Mon, 13 Jul 2020 17:29:40 GMT", + "x-ms-client-request-id" : "5c40bc57-06fa-42de-9fb1-b0f09a42b138" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac6f261980a/javablobacquireblobleaseac19915629ca4a129838426", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb57078380/javablobacquireblobleaseac1783894333543dd8a142e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e5ca7486-52d0-4bdd-9c61-db5bc25cd5ae", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "72742948-7945-401c-ac03-07b7e88ff542", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:29 GMT", + "x-ms-version-id" : "2020-07-13T17:29:41.5537818Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", + "Date" : "Mon, 13 Jul 2020 17:29:41 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1A5BD5A0", + "ETag" : "0x8D82752538DF09A", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac20f-901e-0077-33f3-12b537000000", - "x-ms-client-request-id" : "e5ca7486-52d0-4bdd-9c61-db5bc25cd5ae" + "x-ms-request-id" : "4b9c9e68-f01e-0067-523b-59817e000000", + "x-ms-client-request-id" : "72742948-7945-401c-ac03-07b7e88ff542" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac6f261980a/javablobacquireblobleaseac19915629ca4a129838426?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb57078380/javablobacquireblobleaseac1783894333543dd8a142e?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2d73caaf-26d0-4e1a-a68c-e46c672e573c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b06e993b-e2a9-4af4-ae14-387d65e318e9", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1A5BD5A0", - "x-ms-lease-id" : "2da2d616-01ba-4f81-86ae-cbb2fe104642", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:29 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "1f0dcdeb-801e-007d-7e3b-59e0a1000000", + "Date" : "Mon, 13 Jul 2020 17:29:41 GMT", + "x-ms-client-request-id" : "b06e993b-e2a9-4af4-ae14-387d65e318e9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb57078380/javablobacquireblobleaseac1783894333543dd8a142e?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4531c7b-335d-4155-a340-950c78a2fbd5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82752538DF09A", + "x-ms-lease-id" : "4d8c0c66-8d0d-46f9-96ea-16f8605cb82e", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac217-901e-0077-37f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "2d73caaf-26d0-4e1a-a68c-e46c672e573c" + "x-ms-request-id" : "477d8b56-201e-0080-153b-596e84000000", + "Date" : "Mon, 13 Jul 2020 17:29:41 GMT", + "x-ms-client-request-id" : "d4531c7b-335d-4155-a340-950c78a2fbd5" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "70e854e3-e03f-43f3-bd3b-d35f8072d162" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee1ab46d-82bc-4654-a7fe-58f86d0f6936" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac223-901e-0077-3ef3-12b537000000", - "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac6f261980aWed, 15 Apr 2020 07:03:29 GMT\"0x8D7E10B1A5410D1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "70e854e3-e03f-43f3-bd3b-d35f8072d162", + "x-ms-request-id" : "2a1cf9bd-701e-0079-213b-596da6000000", + "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseacb57078380Mon, 13 Jul 2020 17:29:41 GMT\"0x8D82752534E2A6E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:29:41 GMT", + "x-ms-client-request-id" : "ee1ab46d-82bc-4654-a7fe-58f86d0f6936", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac6f261980a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseacb57078380?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cef531e3-ba75-4caf-a24f-b868e0c3e637" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66cba386-ed8e-4af9-969e-c96189e2caf0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac22f-901e-0077-48f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "cef531e3-ba75-4caf-a24f-b868e0c3e637" + "x-ms-request-id" : "1ac024b1-401e-003f-283b-595921000000", + "Date" : "Mon, 13 Jul 2020 17:29:42 GMT", + "x-ms-client-request-id" : "66cba386-ed8e-4af9-969e-c96189e2caf0" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac6f261980a", "javablobacquireblobleaseac19915629ca4a129838426" ] + "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseacb57078380", "javablobacquireblobleaseac1783894333543dd8a142e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[2].json index a2a262e72017..0034094acd95 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[2].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac24c243340?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac80d734809?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7a0ec585-ef6a-40ed-b855-32aba6cc39b6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "881391e2-495d-4753-bafa-c592f7bfaf78" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1A7C3BE7", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "ETag" : "0x8D8275254A0E8AF", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac23f-901e-0077-54f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "7a0ec585-ef6a-40ed-b855-32aba6cc39b6" + "x-ms-request-id" : "2ebb8e49-e01e-0019-263b-591139000000", + "Date" : "Mon, 13 Jul 2020 17:29:42 GMT", + "x-ms-client-request-id" : "881391e2-495d-4753-bafa-c592f7bfaf78" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac24c243340/javablobacquireblobleaseac13590632c28fa1e3bb48e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac80d734809/javablobacquireblobleaseac113592627fec00b7fd45a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0f238484-5201-416e-acc1-9babf37d0f36", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3155c9e4-adcc-42f3-9770-fa65c0fe1c8f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "x-ms-version-id" : "2020-07-13T17:29:43.6832979Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", + "Date" : "Mon, 13 Jul 2020 17:29:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1A864B26", + "ETag" : "0x8D8275254D2B9BE", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac24f-901e-0077-5ff3-12b537000000", - "x-ms-client-request-id" : "0f238484-5201-416e-acc1-9babf37d0f36" + "x-ms-request-id" : "7a5aea39-a01e-0008-383b-598b8d000000", + "x-ms-client-request-id" : "3155c9e4-adcc-42f3-9770-fa65c0fe1c8f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac24c243340/javablobacquireblobleaseac13590632c28fa1e3bb48e?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac80d734809/javablobacquireblobleaseac113592627fec00b7fd45a?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2f22e268-a462-4403-ad37-c51d6cdde33c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "234b53b0-9a7c-4e17-917b-a67680a9e4cb", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1A864B26", - "x-ms-lease-id" : "6e310dba-782c-4003-87ae-e2db6e1f98f4", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "56549e8a-501e-006e-3e3b-59c4ad000000", + "Date" : "Mon, 13 Jul 2020 17:29:43 GMT", + "x-ms-client-request-id" : "234b53b0-9a7c-4e17-917b-a67680a9e4cb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac80d734809/javablobacquireblobleaseac113592627fec00b7fd45a?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fddbcedb-407c-4501-b3db-f44708dbe1e7" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8275254D2B9BE", + "x-ms-lease-id" : "6f34ba75-59bc-4681-a228-08aa782ebfba", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac257-901e-0077-67f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "2f22e268-a462-4403-ad37-c51d6cdde33c" + "x-ms-request-id" : "ab473579-301e-0035-1b3b-59fd96000000", + "Date" : "Mon, 13 Jul 2020 17:29:44 GMT", + "x-ms-client-request-id" : "fddbcedb-407c-4501-b3db-f44708dbe1e7" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0245dec3-50ca-4fad-a4b6-22e712fea21d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e8d1da9-9226-4506-b97a-543bffda55ca" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac261-901e-0077-6ff3-12b537000000", - "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac24c243340Wed, 15 Apr 2020 07:03:30 GMT\"0x8D7E10B1A7C3BE7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "0245dec3-50ca-4fad-a4b6-22e712fea21d", + "x-ms-request-id" : "88357c24-d01e-005f-6c3b-5925be000000", + "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac80d734809Mon, 13 Jul 2020 17:29:43 GMT\"0x8D8275254A0E8AF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:29:44 GMT", + "x-ms-client-request-id" : "9e8d1da9-9226-4506-b97a-543bffda55ca", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac24c243340?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac80d734809?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e2f74206-b25a-47c6-b680-8853c13d0df1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "154c8a29-5434-443e-bcd5-dbdb49b8b140" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac26d-901e-0077-79f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "e2f74206-b25a-47c6-b680-8853c13d0df1" + "x-ms-request-id" : "76f00932-701e-0024-563b-596722000000", + "Date" : "Mon, 13 Jul 2020 17:29:44 GMT", + "x-ms-client-request-id" : "154c8a29-5434-443e-bcd5-dbdb49b8b140" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac24c243340", "javablobacquireblobleaseac13590632c28fa1e3bb48e" ] + "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac80d734809", "javablobacquireblobleaseac113592627fec00b7fd45a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[3].json index c6bec9efad99..ef462330d6ff 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[3].json @@ -1,145 +1,166 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac85a75866a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac29454948e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f9d22d39-3f8c-494b-aa51-974d390930fe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "54d66b92-cc70-4520-8d1b-f372fe71e72e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1AA1F57E", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "ETag" : "0x8D8275255E7D7FD", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac27b-901e-0077-01f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "f9d22d39-3f8c-494b-aa51-974d390930fe" + "x-ms-request-id" : "226a0acb-b01e-003b-683b-59d426000000", + "Date" : "Mon, 13 Jul 2020 17:29:44 GMT", + "x-ms-client-request-id" : "54d66b92-cc70-4520-8d1b-f372fe71e72e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac85a75866a/javablobacquireblobleaseac18152393d3234b6be142e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac29454948e/javablobacquireblobleaseac175205abf704ddb5cf46e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4bd81eb7-a948-4020-8161-fa3ccdf2c3bc", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa568b6d-02cb-4284-b049-36570f517308", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "x-ms-version-id" : "2020-07-13T17:29:45.8758605Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:45 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", + "Date" : "Mon, 13 Jul 2020 17:29:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1AAAA4BB", + "ETag" : "0x8D8275256216FCD", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac28b-901e-0077-0df3-12b537000000", - "x-ms-client-request-id" : "4bd81eb7-a948-4020-8161-fa3ccdf2c3bc" + "x-ms-request-id" : "265e990d-701e-008d-5d3b-59a650000000", + "x-ms-client-request-id" : "fa568b6d-02cb-4284-b049-36570f517308" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac29454948e/javablobacquireblobleaseac175205abf704ddb5cf46e?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4d95769-0dcd-4307-a68e-621d610c7cc6", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "47e9b7f7-601e-0017-283b-593889000000", + "Date" : "Mon, 13 Jul 2020 17:29:46 GMT", + "x-ms-client-request-id" : "c4d95769-0dcd-4307-a68e-621d610c7cc6" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac85a75866a/javablobacquireblobleaseac18152393d3234b6be142e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac29454948e/javablobacquireblobleaseac175205abf704ddb5cf46e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0341d451-355f-4dee-9d9c-b5aa7c7eba61" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66582917-eee1-4644-81b1-3b4ab82f458b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "x-ms-version-id" : "2020-07-13T17:29:45.8758605Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", + "Date" : "Mon, 13 Jul 2020 17:29:45 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B1AAAA4BB", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:03:30 GMT", + "ETag" : "0x8D8275256216FCD", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:29:45 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ac293-901e-0077-15f3-12b537000000", - "x-ms-client-request-id" : "0341d451-355f-4dee-9d9c-b5aa7c7eba61", + "x-ms-request-id" : "7332b927-801e-0042-083b-592802000000", + "x-ms-client-request-id" : "66582917-eee1-4644-81b1-3b4ab82f458b", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac85a75866a/javablobacquireblobleaseac18152393d3234b6be142e?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac29454948e/javablobacquireblobleaseac175205abf704ddb5cf46e?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "89a10e02-05c4-446f-b0ea-750988f2370f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "86578e2b-6e0a-4929-84e0-360f907ad073" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1AAAA4BB", - "x-ms-lease-id" : "29317b27-812c-4bb6-898e-7ee9fc34772a", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "ETag" : "0x8D8275256216FCD", + "x-ms-lease-id" : "ea13a18c-dd96-43de-ab1c-dcfc1736aeaf", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac298-901e-0077-19f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "89a10e02-05c4-446f-b0ea-750988f2370f" + "x-ms-request-id" : "902877d0-d01e-0094-6e3b-5926eb000000", + "Date" : "Mon, 13 Jul 2020 17:29:46 GMT", + "x-ms-client-request-id" : "86578e2b-6e0a-4929-84e0-360f907ad073" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7b908c8d-b61b-44db-b066-bf8d8aea1ec7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4cc3404-04fa-4b3a-8a9d-b37243644417" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac29c-901e-0077-1cf3-12b537000000", - "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac85a75866aWed, 15 Apr 2020 07:03:30 GMT\"0x8D7E10B1AA1F57E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "7b908c8d-b61b-44db-b066-bf8d8aea1ec7", + "x-ms-request-id" : "42d2f85e-c01e-001e-563b-597d5a000000", + "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac29454948eMon, 13 Jul 2020 17:29:45 GMT\"0x8D8275255E7D7FD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:29:47 GMT", + "x-ms-client-request-id" : "a4cc3404-04fa-4b3a-8a9d-b37243644417", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac85a75866a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac29454948e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6b8f547c-29ca-4699-ba42-b40e35234d90" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4287ae53-7aeb-450f-9a05-1065ca91f003" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac2a7-901e-0077-26f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "6b8f547c-29ca-4699-ba42-b40e35234d90" + "x-ms-request-id" : "5f66c9da-c01e-0021-1e3b-59b5f9000000", + "Date" : "Mon, 13 Jul 2020 17:29:47 GMT", + "x-ms-client-request-id" : "4287ae53-7aeb-450f-9a05-1065ca91f003" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac85a75866a", "javablobacquireblobleaseac18152393d3234b6be142e" ] + "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac29454948e", "javablobacquireblobleaseac175205abf704ddb5cf46e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[4].json index add2ee883578..f22381c04fc6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[4].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac194836143?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac993637360?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e0799f95-6e26-4859-81c7-7a292cd66d69" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f92cf266-91a5-47e0-945e-20beeddb1379" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1ACF7904", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "ETag" : "0x8D827525773F435", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac2ad-901e-0077-2bf3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:29 GMT", - "x-ms-client-request-id" : "e0799f95-6e26-4859-81c7-7a292cd66d69" + "x-ms-request-id" : "22414732-101e-009b-033b-595087000000", + "Date" : "Mon, 13 Jul 2020 17:29:47 GMT", + "x-ms-client-request-id" : "f92cf266-91a5-47e0-945e-20beeddb1379" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac194836143/javablobacquireblobleaseac100376c2a4510383bf461", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac993637360/javablobacquireblobleaseac1067436fb0efe309804c6", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5c91a1aa-b7c5-4560-9f10-c54e20f97df0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d099718-9519-43b8-a772-c1b26da2b504", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "x-ms-version-id" : "2020-07-13T17:29:48.4496921Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", + "Date" : "Mon, 13 Jul 2020 17:29:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1AF049D7", + "ETag" : "0x8D8275257AA2C19", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac2de-901e-0077-51f3-12b537000000", - "x-ms-client-request-id" : "5c91a1aa-b7c5-4560-9f10-c54e20f97df0" + "x-ms-request-id" : "cb95518c-d01e-0060-1b3b-59ed1d000000", + "x-ms-client-request-id" : "3d099718-9519-43b8-a772-c1b26da2b504" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac194836143/javablobacquireblobleaseac100376c2a4510383bf461?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac993637360/javablobacquireblobleaseac1067436fb0efe309804c6?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f7e7695b-08d8-446a-aae7-d6b7c38de735" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5419a0b1-f9da-44f8-8094-c6e7f61deeec", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1AF049D7", - "x-ms-lease-id" : "b3db24b4-1b75-4484-99bd-077d7765f756", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:30 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0a01789d-101e-008b-3f3b-5995ef000000", + "Date" : "Mon, 13 Jul 2020 17:29:48 GMT", + "x-ms-client-request-id" : "5419a0b1-f9da-44f8-8094-c6e7f61deeec" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac993637360/javablobacquireblobleaseac1067436fb0efe309804c6?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "226f99dd-761d-4e06-8675-4b2f17fc8dd4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8275257AA2C19", + "x-ms-lease-id" : "df75de5d-55ba-4e3e-ac99-abed33595f5c", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac2ec-901e-0077-5ef3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "f7e7695b-08d8-446a-aae7-d6b7c38de735" + "x-ms-request-id" : "8e09f44b-501e-0051-6c3b-590c0e000000", + "Date" : "Mon, 13 Jul 2020 17:29:48 GMT", + "x-ms-client-request-id" : "226f99dd-761d-4e06-8675-4b2f17fc8dd4" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "05533fa4-7047-4e04-ac73-af1e10577b31" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c707a0a-6af9-4bfe-bdfa-c3760ed4a19d" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac2f2-901e-0077-63f3-12b537000000", - "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac194836143Wed, 15 Apr 2020 07:03:30 GMT\"0x8D7E10B1ACF7904\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "05533fa4-7047-4e04-ac73-af1e10577b31", + "x-ms-request-id" : "88c554e9-901e-002c-283b-597d2d000000", + "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac993637360Mon, 13 Jul 2020 17:29:48 GMT\"0x8D827525773F435\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:29:48 GMT", + "x-ms-client-request-id" : "9c707a0a-6af9-4bfe-bdfa-c3760ed4a19d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac194836143?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac993637360?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ce0dae68-eb48-4665-91f8-591517ddc607" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bede190a-fb32-4954-9a90-00700a40377c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac303-901e-0077-71f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "ce0dae68-eb48-4665-91f8-591517ddc607" + "x-ms-request-id" : "b8807cc8-201e-0006-4b3b-59a23d000000", + "Date" : "Mon, 13 Jul 2020 17:29:49 GMT", + "x-ms-client-request-id" : "bede190a-fb32-4954-9a90-00700a40377c" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac194836143", "javablobacquireblobleaseac100376c2a4510383bf461" ] + "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac993637360", "javablobacquireblobleaseac1067436fb0efe309804c6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[5].json new file mode 100644 index 000000000000..8b23c4832a95 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseac[5].json @@ -0,0 +1,132 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac5a7529175?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e1832bf1-0013-441f-820f-86e56790832c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8275258BF99FD", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76706c4a-801e-0030-373b-592f4d000000", + "Date" : "Mon, 13 Jul 2020 17:29:49 GMT", + "x-ms-client-request-id" : "e1832bf1-0013-441f-820f-86e56790832c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac5a7529175/javablobacquireblobleaseac154819229e73505cbb44e", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "08a8571a-eb77-492f-973c-6ce200bd4d55", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T17:29:50.5962156Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:50 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:29:49 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8275258F18D8E", + "Content-Length" : "0", + "x-ms-request-id" : "811f3661-101e-006f-463b-599b71000000", + "x-ms-client-request-id" : "08a8571a-eb77-492f-973c-6ce200bd4d55" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac5a7529175/javablobacquireblobleaseac154819229e73505cbb44e?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5fb71a59-6337-4da4-a600-f7da1540b1c0", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4098e639-901e-0085-393b-59bc5f000000", + "Date" : "Mon, 13 Jul 2020 17:29:50 GMT", + "x-ms-client-request-id" : "5fb71a59-6337-4da4-a600-f7da1540b1c0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac5a7529175/javablobacquireblobleaseac154819229e73505cbb44e?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16422f9e-d78a-4b7e-b485-15b01f7a3519" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8275258F18D8E", + "x-ms-lease-id" : "c40a5abc-cfb5-46b6-a76e-92a62bea61ef", + "Last-Modified" : "Mon, 13 Jul 2020 17:29:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1a2454d1-501e-0023-1f3b-590b41000000", + "Date" : "Mon, 13 Jul 2020 17:29:50 GMT", + "x-ms-client-request-id" : "16422f9e-d78a-4b7e-b485-15b01f7a3519" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c02d4a8-3f16-45c3-a4d8-1727e9b98914" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "00622837-301e-0025-0c3b-5938fe000000", + "Body" : "jtcacquireblobleaseacjtcacquireblobleaseac0leaseapitestacquireblobleaseac5a7529175Mon, 13 Jul 2020 17:29:50 GMT\"0x8D8275258BF99FD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:29:51 GMT", + "x-ms-client-request-id" : "4c02d4a8-3f16-45c3-a4d8-1727e9b98914", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseac0leaseapitestacquireblobleaseac5a7529175?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "42ed48a7-a02e-44b0-8647-c1f1f4d0148b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "bfe3ed25-a01e-0027-443b-598646000000", + "Date" : "Mon, 13 Jul 2020 17:29:51 GMT", + "x-ms-client-request-id" : "42ed48a7-a02e-44b0-8647-c1f1f4d0148b" + }, + "Exception" : null + } ], + "variables" : [ "jtcacquireblobleaseac0leaseapitestacquireblobleaseac5a7529175", "javablobacquireblobleaseac154819229e73505cbb44e" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[0].json index 7f9d0573407e..66621fc5dd14 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[0].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail052643aba162c700d2460a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail0932184ac50818a74d48d3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e7375748-8354-440b-901b-baa14c189f53" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a4afef4-f70a-4b4d-9dcf-5780a466c729" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1B1125CF", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "ETag" : "0x8D8275261574E6C", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac316-901e-0077-03f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "e7375748-8354-440b-901b-baa14c189f53" + "x-ms-request-id" : "58e0d0dc-c01e-0031-113b-597091000000", + "Date" : "Mon, 13 Jul 2020 17:30:04 GMT", + "x-ms-client-request-id" : "8a4afef4-f70a-4b4d-9dcf-5780a466c729" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail052643aba162c700d2460a/javablobacquireblobleaseacfail125562eb388cb4ca4d4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail0932184ac50818a74d48d3/javablobacquireblobleaseacfail156759f59a6a2ae80b4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "374bc06f-95c5-46de-a874-c0db373ec4d1", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9643143-f4f2-4cc2-bf6a-340938fd4a3d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "x-ms-version-id" : "2020-07-13T17:30:05.3687354Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:05 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", + "Date" : "Mon, 13 Jul 2020 17:30:04 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1B198693", + "ETag" : "0x8D8275261BFD03A", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac323-901e-0077-0df3-12b537000000", - "x-ms-client-request-id" : "374bc06f-95c5-46de-a874-c0db373ec4d1" + "x-ms-request-id" : "a425addf-801e-001f-653b-592286000000", + "x-ms-client-request-id" : "b9643143-f4f2-4cc2-bf6a-340938fd4a3d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail052643aba162c700d2460a/javablobacquireblobleaseacfail125562eb388cb4ca4d4?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail0932184ac50818a74d48d3/javablobacquireblobleaseacfail156759f59a6a2ae80b4?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b08853dc-c451-48f2-808f-5061640d7ce5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f02589a-3ddd-4b7f-8178-6e4c3b775995" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ac334-901e-0077-1bf3-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ac334-901e-0077-1bf3-12b537000000\nTime:2020-04-15T07:03:31.2324060Z", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "b08853dc-c451-48f2-808f-5061640d7ce5", + "x-ms-request-id" : "e1f4cf38-601e-004a-023b-59320d000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:e1f4cf38-601e-004a-023b-59320d000000\nTime:2020-07-13T17:30:05.8283575Z", + "Date" : "Mon, 13 Jul 2020 17:30:05 GMT", + "x-ms-client-request-id" : "5f02589a-3ddd-4b7f-8178-6e4c3b775995", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aae67d2c-937a-46e4-82f4-e0f68b392aa9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d7c2750-4061-4a04-85bf-51333f27b3ec" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac33d-901e-0077-21f3-12b537000000", - "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail052643aba162c700d2460aWed, 15 Apr 2020 07:03:31 GMT\"0x8D7E10B1B1125CF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "aae67d2c-937a-46e4-82f4-e0f68b392aa9", + "x-ms-request-id" : "222a8f05-a01e-00a1-5f3b-594aff000000", + "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail0932184ac50818a74d48d3Mon, 13 Jul 2020 17:30:04 GMT\"0x8D8275261574E6C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:30:05 GMT", + "x-ms-client-request-id" : "0d7c2750-4061-4a04-85bf-51333f27b3ec", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail052643aba162c700d2460a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail0932184ac50818a74d48d3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "09a9f9b9-9d5a-4154-bfae-8c25a76efcef" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0f0c463-7067-4044-9afe-0d32ebc8672d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac342-901e-0077-25f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "09a9f9b9-9d5a-4154-bfae-8c25a76efcef" + "x-ms-request-id" : "7be091a2-601e-0075-283b-59faae000000", + "Date" : "Mon, 13 Jul 2020 17:30:06 GMT", + "x-ms-client-request-id" : "b0f0c463-7067-4044-9afe-0d32ebc8672d" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseacfail052643aba162c700d2460a", "javablobacquireblobleaseacfail125562eb388cb4ca4d4" ] + "variables" : [ "jtcacquireblobleaseacfail0932184ac50818a74d48d3", "javablobacquireblobleaseacfail156759f59a6a2ae80b4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[1].json index 042075e56c79..1a7ea775d55b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[1].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail09746804cce2ab25134b58?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail065263f3e4780f53a14451?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "33d3bdda-c737-440e-8d21-f8e726f71e17" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "76ac4ae9-a51d-4539-9552-258c3ef9ccd3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1B3A89C7", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "ETag" : "0x8D8275262D3F67E", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:07 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac351-901e-0077-32f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "33d3bdda-c737-440e-8d21-f8e726f71e17" + "x-ms-request-id" : "f23ad9ec-301e-008c-053b-59f98c000000", + "Date" : "Mon, 13 Jul 2020 17:30:06 GMT", + "x-ms-client-request-id" : "76ac4ae9-a51d-4539-9552-258c3ef9ccd3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail09746804cce2ab25134b58/javablobacquireblobleaseacfail168116cfaf2cdf58e64", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail065263f3e4780f53a14451/javablobacquireblobleaseacfail18748681b991c18db24", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ca8e0afe-f903-4dd2-9ec6-381808d2c25e", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "260ec136-7038-46b3-a84b-ead8254577ff", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "x-ms-version-id" : "2020-07-13T17:30:07.6003242Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:07 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", + "Date" : "Mon, 13 Jul 2020 17:30:06 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1B4386CF", + "ETag" : "0x8D82752631453AA", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac35c-901e-0077-3af3-12b537000000", - "x-ms-client-request-id" : "ca8e0afe-f903-4dd2-9ec6-381808d2c25e" + "x-ms-request-id" : "c2d73bd0-a01e-007a-4d3b-598cc2000000", + "x-ms-client-request-id" : "260ec136-7038-46b3-a84b-ead8254577ff" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail09746804cce2ab25134b58/javablobacquireblobleaseacfail168116cfaf2cdf58e64?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail065263f3e4780f53a14451/javablobacquireblobleaseacfail18748681b991c18db24?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0224fa88-a281-40c7-9e2b-f2e0e87e60df" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "42074e4b-f5c8-4c1e-a185-e5ef7cd5f64d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ac36f-901e-0077-48f3-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ac36f-901e-0077-48f3-12b537000000\nTime:2020-04-15T07:03:31.5116699Z", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "0224fa88-a281-40c7-9e2b-f2e0e87e60df", + "x-ms-request-id" : "f8395559-101e-0040-203b-5996ba000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:f8395559-101e-0040-203b-5996ba000000\nTime:2020-07-13T17:30:08.0166947Z", + "Date" : "Mon, 13 Jul 2020 17:30:07 GMT", + "x-ms-client-request-id" : "42074e4b-f5c8-4c1e-a185-e5ef7cd5f64d", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "658c99e9-3001-4ce2-aaeb-8c2fa78ad82c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d606516c-22da-482f-a1e9-70be16d1e519" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac37b-901e-0077-53f3-12b537000000", - "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail09746804cce2ab25134b58Wed, 15 Apr 2020 07:03:31 GMT\"0x8D7E10B1B3A89C7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "658c99e9-3001-4ce2-aaeb-8c2fa78ad82c", + "x-ms-request-id" : "06d769d6-101e-007f-163b-595e19000000", + "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail065263f3e4780f53a14451Mon, 13 Jul 2020 17:30:07 GMT\"0x8D8275262D3F67E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:30:07 GMT", + "x-ms-client-request-id" : "d606516c-22da-482f-a1e9-70be16d1e519", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail09746804cce2ab25134b58?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail065263f3e4780f53a14451?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5065be2d-a943-41e5-afb4-0358a72fb342" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61bd184b-fe73-419b-8b2c-d5109a82a825" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac386-901e-0077-5df3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "5065be2d-a943-41e5-afb4-0358a72fb342" + "x-ms-request-id" : "89d7d992-b01e-0059-4b3b-591601000000", + "Date" : "Mon, 13 Jul 2020 17:30:08 GMT", + "x-ms-client-request-id" : "61bd184b-fe73-419b-8b2c-d5109a82a825" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseacfail09746804cce2ab25134b58", "javablobacquireblobleaseacfail168116cfaf2cdf58e64" ] + "variables" : [ "jtcacquireblobleaseacfail065263f3e4780f53a14451", "javablobacquireblobleaseacfail18748681b991c18db24" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[2].json index 73ce1f04999f..b94f7482e404 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[2].json @@ -1,69 +1,70 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail034996bf1790271319491f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail0905426da5d3997e004068?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "446dbad6-c39b-4e10-89a5-69c510f4ae02" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "836a9087-dfe4-46ee-b90e-75882f2bf708" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1B66FBB7", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "ETag" : "0x8D8275263FBE983", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac396-901e-0077-6bf3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "446dbad6-c39b-4e10-89a5-69c510f4ae02" + "x-ms-request-id" : "a6924d58-701e-000b-473b-596ae9000000", + "Date" : "Mon, 13 Jul 2020 17:30:08 GMT", + "x-ms-client-request-id" : "836a9087-dfe4-46ee-b90e-75882f2bf708" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail034996bf1790271319491f/javablobacquireblobleaseacfail19809582f4861fb5d94", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail0905426da5d3997e004068/javablobacquireblobleaseacfail1057654266c4ab7de34", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "730df721-839d-4a8f-a086-6f6ff90612ea", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c343879a-9b47-4c39-8c35-63e8dc0feab2", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "x-ms-version-id" : "2020-07-13T17:30:09.4846664Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", + "Date" : "Mon, 13 Jul 2020 17:30:08 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1B6FAA6F", + "ETag" : "0x8D827526433DAC8", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac3a6-901e-0077-76f3-12b537000000", - "x-ms-client-request-id" : "730df721-839d-4a8f-a086-6f6ff90612ea" + "x-ms-request-id" : "be695620-c01e-000e-703b-59b832000000", + "x-ms-client-request-id" : "c343879a-9b47-4c39-8c35-63e8dc0feab2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail034996bf1790271319491f/javablobacquireblobleaseacfail19809582f4861fb5d94?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail0905426da5d3997e004068/javablobacquireblobleaseacfail1057654266c4ab7de34?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "39960850-2864-437c-ad44-904a479f5c7c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "478c8efd-ef50-4947-af5d-0072af66c2aa" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ac3bb-901e-0077-06f3-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ac3bb-901e-0077-06f3-12b537000000\nTime:2020-04-15T07:03:31.8009420Z", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "39960850-2864-437c-ad44-904a479f5c7c", + "x-ms-request-id" : "8ee7311e-301e-00a3-5c3b-59f447000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8ee7311e-301e-00a3-5c3b-59f447000000\nTime:2020-07-13T17:30:09.8457810Z", + "Date" : "Mon, 13 Jul 2020 17:30:09 GMT", + "x-ms-client-request-id" : "478c8efd-ef50-4947-af5d-0072af66c2aa", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +72,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e18f00ba-7fce-4b86-872c-3e7138f3264d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f02dbb7-3188-4175-a8de-900549fce6df" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac3c8-901e-0077-11f3-12b537000000", - "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail034996bf1790271319491fWed, 15 Apr 2020 07:03:31 GMT\"0x8D7E10B1B66FBB7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:30 GMT", - "x-ms-client-request-id" : "e18f00ba-7fce-4b86-872c-3e7138f3264d", + "x-ms-request-id" : "f12801ef-f01e-003a-7c3b-598bfa000000", + "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail0905426da5d3997e004068Mon, 13 Jul 2020 17:30:09 GMT\"0x8D8275263FBE983\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:30:09 GMT", + "x-ms-client-request-id" : "5f02dbb7-3188-4175-a8de-900549fce6df", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail034996bf1790271319491f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail0905426da5d3997e004068?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1ffe6d21-24ea-4636-ad18-5e2296b6dcc9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40359c28-447b-41c5-94fc-7bb184a1b350" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac3d4-901e-0077-1af3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:31 GMT", - "x-ms-client-request-id" : "1ffe6d21-24ea-4636-ad18-5e2296b6dcc9" + "x-ms-request-id" : "77e4ae47-201e-0064-6d3b-59601a000000", + "Date" : "Mon, 13 Jul 2020 17:30:10 GMT", + "x-ms-client-request-id" : "40359c28-447b-41c5-94fc-7bb184a1b350" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseacfail034996bf1790271319491f", "javablobacquireblobleaseacfail19809582f4861fb5d94" ] + "variables" : [ "jtcacquireblobleaseacfail0905426da5d3997e004068", "javablobacquireblobleaseacfail1057654266c4ab7de34" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[3].json index 901a2e6141c6..e15709c5b828 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[3].json @@ -1,101 +1,103 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail067103db74356625b74249?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail075775693901268c55413e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d80d6814-94a3-418b-8c43-4e10c00e7393" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f373e594-5c7e-4c71-859e-004ff99a2d25" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B1B8D78AF", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "ETag" : "0x8D82752650F4F5B", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:10 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ac3dd-901e-0077-23f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:31 GMT", - "x-ms-client-request-id" : "d80d6814-94a3-418b-8c43-4e10c00e7393" + "x-ms-request-id" : "56bb115b-f01e-002a-653b-594e92000000", + "Date" : "Mon, 13 Jul 2020 17:30:09 GMT", + "x-ms-client-request-id" : "f373e594-5c7e-4c71-859e-004ff99a2d25" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail067103db74356625b74249/javablobacquireblobleaseacfail13751719a32f7a2b664", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail075775693901268c55413e/javablobacquireblobleaseacfail1949878cf57eda513e4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1d0eeb34-6844-4a9a-8289-64d897a85756", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ef5bb284-b088-43f8-b140-bca7a61fac4e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "x-ms-version-id" : "2020-07-13T17:30:11.2979515Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:31 GMT", + "Date" : "Mon, 13 Jul 2020 17:30:11 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B1B96004B", + "ETag" : "0x8D8275265488A3B", "Content-Length" : "0", - "x-ms-request-id" : "cc6ac3ed-901e-0077-2cf3-12b537000000", - "x-ms-client-request-id" : "1d0eeb34-6844-4a9a-8289-64d897a85756" + "x-ms-request-id" : "a7ffe8c6-501e-0041-713b-59c966000000", + "x-ms-client-request-id" : "ef5bb284-b088-43f8-b140-bca7a61fac4e" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail067103db74356625b74249/javablobacquireblobleaseacfail13751719a32f7a2b664", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail075775693901268c55413e/javablobacquireblobleaseacfail1949878cf57eda513e4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dd9137f1-9c3f-499a-a9af-45432641980f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c28cd0d1-09d8-49a2-9893-3456e117d993" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:31 GMT", + "x-ms-version-id" : "2020-07-13T17:30:11.2979515Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:03:31 GMT", + "Date" : "Mon, 13 Jul 2020 17:30:10 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B1B96004B", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:03:31 GMT", + "ETag" : "0x8D8275265488A3B", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:30:11 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ac401-901e-0077-3ef3-12b537000000", - "x-ms-client-request-id" : "dd9137f1-9c3f-499a-a9af-45432641980f", + "x-ms-request-id" : "302af98c-301e-0057-2d3b-593fb1000000", + "x-ms-client-request-id" : "c28cd0d1-09d8-49a2-9893-3456e117d993", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail067103db74356625b74249/javablobacquireblobleaseacfail13751719a32f7a2b664?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail075775693901268c55413e/javablobacquireblobleaseacfail1949878cf57eda513e4?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f8c745b7-3922-4342-8551-a2234e567fcf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eff7110d-6e1b-4849-a6db-ca091a3e957d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ac416-901e-0077-50f3-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ac416-901e-0077-50f3-12b537000000\nTime:2020-04-15T07:03:32.0842083Z", - "Date" : "Wed, 15 Apr 2020 07:03:31 GMT", - "x-ms-client-request-id" : "f8c745b7-3922-4342-8551-a2234e567fcf", + "x-ms-request-id" : "7dfc303f-a01e-0045-6a3b-594461000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:7dfc303f-a01e-0045-6a3b-594461000000\nTime:2020-07-13T17:30:12.0339572Z", + "Date" : "Mon, 13 Jul 2020 17:30:12 GMT", + "x-ms-client-request-id" : "eff7110d-6e1b-4849-a6db-ca091a3e957d", "Content-Type" : "application/xml" }, "Exception" : null @@ -103,43 +105,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fceeff3a-3099-4cd2-a976-df6375a64ed0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "31a346d3-9623-46e4-89e6-36efe6d941e9" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ac424-901e-0077-59f3-12b537000000", - "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail067103db74356625b74249Wed, 15 Apr 2020 07:03:31 GMT\"0x8D7E10B1B8D78AF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:31 GMT", - "x-ms-client-request-id" : "fceeff3a-3099-4cd2-a976-df6375a64ed0", + "x-ms-request-id" : "ebdefed8-f01e-0048-4f3b-598cb5000000", + "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail075775693901268c55413eMon, 13 Jul 2020 17:30:10 GMT\"0x8D82752650F4F5B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:30:11 GMT", + "x-ms-client-request-id" : "31a346d3-9623-46e4-89e6-36efe6d941e9", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail067103db74356625b74249?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail075775693901268c55413e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7d497c9f-6944-46f4-bd7b-1b8918699f07" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fc7897c-6179-4bc1-9d29-3c7510ac8784" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ac434-901e-0077-67f3-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:31 GMT", - "x-ms-client-request-id" : "7d497c9f-6944-46f4-bd7b-1b8918699f07" + "x-ms-request-id" : "d0b63ef9-101e-0022-6a3b-59549d000000", + "Date" : "Mon, 13 Jul 2020 17:30:11 GMT", + "x-ms-client-request-id" : "7fc7897c-6179-4bc1-9d29-3c7510ac8784" }, "Exception" : null } ], - "variables" : [ "jtcacquireblobleaseacfail067103db74356625b74249", "javablobacquireblobleaseacfail13751719a32f7a2b664" ] + "variables" : [ "jtcacquireblobleaseacfail075775693901268c55413e", "javablobacquireblobleaseacfail1949878cf57eda513e4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[4].json new file mode 100644 index 000000000000..37c4c34fbab3 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestacquireblobleaseacfail[4].json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail00952698bb270962ba4986?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ac62ac3-ace3-4b8a-96fb-9932c8ae7836" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82752665A36BC", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5df975d8-501e-00a5-343b-59c7f8000000", + "Date" : "Mon, 13 Jul 2020 17:30:12 GMT", + "x-ms-client-request-id" : "5ac62ac3-ace3-4b8a-96fb-9932c8ae7836" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail00952698bb270962ba4986/javablobacquireblobleaseacfail101762c492de2c9cb24", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "72a2f0d6-a93f-47a1-a49e-7d190e83033e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-13T17:30:13.4815065Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:30:13 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:30:12 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D827526695B959", + "Content-Length" : "0", + "x-ms-request-id" : "08a3aa25-d01e-0012-733b-59ea52000000", + "x-ms-client-request-id" : "72a2f0d6-a93f-47a1-a49e-7d190e83033e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail00952698bb270962ba4986/javablobacquireblobleaseacfail101762c492de2c9cb24?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c494ee67-7247-4a16-9880-25e986179dea" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "ab48d4ef-b01e-0014-0e3b-59d9ed000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:ab48d4ef-b01e-0014-0e3b-59d9ed000000\nTime:2020-07-13T17:30:13.8078265Z", + "Date" : "Mon, 13 Jul 2020 17:30:12 GMT", + "x-ms-client-request-id" : "c494ee67-7247-4a16-9880-25e986179dea", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcacquireblobleaseacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f584571c-ca78-490f-8569-6486c17ad5b6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f8c5f50a-c01e-00a7-7e3b-597940000000", + "Body" : "jtcacquireblobleaseacfailjtcacquireblobleaseacfail00952698bb270962ba4986Mon, 13 Jul 2020 17:30:13 GMT\"0x8D82752665A36BC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:30:13 GMT", + "x-ms-client-request-id" : "f584571c-ca78-490f-8569-6486c17ad5b6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcacquireblobleaseacfail00952698bb270962ba4986?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e468a4d-7926-4246-b41b-265c525f06e6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "40ea5787-e01e-0026-063b-59d99a000000", + "Date" : "Mon, 13 Jul 2020 17:30:13 GMT", + "x-ms-client-request-id" : "3e468a4d-7926-4246-b41b-265c525f06e6" + }, + "Exception" : null + } ], + "variables" : [ "jtcacquireblobleaseacfail00952698bb270962ba4986", "javablobacquireblobleaseacfail101762c492de2c9cb24" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[0].json index 8b02ab1a8045..39f796d139c6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[0].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacd5944347cc0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac87c956623e7?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8a1e6869-01d6-42d8-881a-36363821b77a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "91c600e3-6478-413c-84b0-886d061a172e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2CAC693C", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:00 GMT", + "ETag" : "0x8D82380D8853354", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6add43-901e-0077-6ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:59 GMT", - "x-ms-client-request-id" : "8a1e6869-01d6-42d8-881a-36363821b77a" + "x-ms-request-id" : "0a91370b-701e-00a2-6469-55ab9b000000", + "Date" : "Wed, 08 Jul 2020 20:52:36 GMT", + "x-ms-client-request-id" : "91c600e3-6478-413c-84b0-886d061a172e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacd5944347cc0/javablobbreakblobleaseac1leaseapitestbreakblobleaseacd59373217", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac87c956623e7/javablobbreakblobleaseac1leaseapitestbreakblobleaseac87c854016", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3a33c5b5-42ca-458b-bbdc-c8be09bca88d", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "96b6adfc-76df-47b8-ae94-e33f2de45e94", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:00 GMT", + "x-ms-version-id" : "2020-07-08T20:52:37.5818563Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:59 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:37 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2CB4E903", + "ETag" : "0x8D82380D8F7A143", "Content-Length" : "0", - "x-ms-request-id" : "cc6add4b-901e-0077-75f4-12b537000000", - "x-ms-client-request-id" : "3a33c5b5-42ca-458b-bbdc-c8be09bca88d" + "x-ms-request-id" : "dc95a561-501e-007e-7c69-5501c5000000", + "x-ms-client-request-id" : "96b6adfc-76df-47b8-ae94-e33f2de45e94" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacd5944347cc0/javablobbreakblobleaseac1leaseapitestbreakblobleaseacd59373217?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac87c956623e7/javablobbreakblobleaseac1leaseapitestbreakblobleaseac87c854016?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f45e901a-b895-444f-baa0-a77f56109fa3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f604a62-6bc3-442f-abda-b5f089d5f29e", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2CB4E903", - "x-ms-lease-id" : "30dbda84-a6e0-4a1b-aad9-ddf3c51bc975", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:00 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "17b88a54-301e-001a-6169-55f05d000000", + "Date" : "Wed, 08 Jul 2020 20:52:37 GMT", + "x-ms-client-request-id" : "6f604a62-6bc3-442f-abda-b5f089d5f29e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac87c956623e7/javablobbreakblobleaseac1leaseapitestbreakblobleaseac87c854016?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "187d5f8b-b596-4a90-b203-6aa4973852fa" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380D8F7A143", + "x-ms-lease-id" : "6723ab7d-24e9-4288-81f9-82ca533745ef", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6add59-901e-0077-01f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:59 GMT", - "x-ms-client-request-id" : "f45e901a-b895-444f-baa0-a77f56109fa3" + "x-ms-request-id" : "e68d8837-701e-0056-5569-55606d000000", + "Date" : "Wed, 08 Jul 2020 20:52:37 GMT", + "x-ms-client-request-id" : "187d5f8b-b596-4a90-b203-6aa4973852fa" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacd5944347cc0/javablobbreakblobleaseac1leaseapitestbreakblobleaseacd59373217?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac87c956623e7/javablobbreakblobleaseac1leaseapitestbreakblobleaseac87c854016?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c9d41950-a89e-43c4-a53a-e02f450323a7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c45b0a84-11cf-4a20-8a6c-d310b60e28e4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2CB4E903", + "ETag" : "0x8D82380D8F7A143", "x-ms-lease-time" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:00 GMT", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6add66-901e-0077-0bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:59 GMT", - "x-ms-client-request-id" : "c9d41950-a89e-43c4-a53a-e02f450323a7" + "x-ms-request-id" : "26c06755-b01e-0092-3969-551554000000", + "Date" : "Wed, 08 Jul 2020 20:52:38 GMT", + "x-ms-client-request-id" : "c45b0a84-11cf-4a20-8a6c-d310b60e28e4" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "09ed60ad-496e-41fb-81ae-854a8e40e5f0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b32f7136-dc85-4699-83e1-8a074d603b3e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6add90-901e-0077-2cf4-12b537000000", - "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseacd5944347cc0Wed, 15 Apr 2020 07:04:00 GMT\"0x8D7E10B2CAC693C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "09ed60ad-496e-41fb-81ae-854a8e40e5f0", + "x-ms-request-id" : "7ddcd231-001e-002e-1269-55c395000000", + "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseac87c956623e7Wed, 08 Jul 2020 20:52:36 GMT\"0x8D82380D8853354\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:38 GMT", + "x-ms-client-request-id" : "b32f7136-dc85-4699-83e1-8a074d603b3e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacd5944347cc0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac87c956623e7?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e9402451-9be2-43a0-b979-1723bfc00162" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "21c0de65-118e-4fb0-9c3c-d44942d5fe9a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6add95-901e-0077-31f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "e9402451-9be2-43a0-b979-1723bfc00162" + "x-ms-request-id" : "042ecdc0-a01e-006a-3d69-5549aa000000", + "Date" : "Wed, 08 Jul 2020 20:52:38 GMT", + "x-ms-client-request-id" : "21c0de65-118e-4fb0-9c3c-d44942d5fe9a" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseacd5944347cc0", "javablobbreakblobleaseac1leaseapitestbreakblobleaseacd59373217" ] + "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseac87c956623e7", "javablobbreakblobleaseac1leaseapitestbreakblobleaseac87c854016" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[1].json index 997a35218e77..caf90ba89830 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[1].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac2f56084946d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6710835806a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "721775cf-6dd9-4b8a-a850-74d756254654" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb68ad2c-d136-4317-8723-fe6311172db5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D001B9C", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "ETag" : "0x8D82380DA9427AA", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6add9f-901e-0077-38f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "721775cf-6dd9-4b8a-a850-74d756254654" + "x-ms-request-id" : "7a5986ba-101e-007f-1869-555e19000000", + "Date" : "Wed, 08 Jul 2020 20:52:39 GMT", + "x-ms-client-request-id" : "fb68ad2c-d136-4317-8723-fe6311172db5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac2f56084946d/javablobbreakblobleaseac1leaseapitestbreakblobleaseac2f5630813", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6710835806a/javablobbreakblobleaseac1leaseapitestbreakblobleaseac67171404b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f78f68a4-b997-403a-a922-10283053fe2b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f608684-c4d5-4d4e-a314-46925fbe7472", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "x-ms-version-id" : "2020-07-08T20:52:40.6690665Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:40 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2D089B45", + "ETag" : "0x8D82380DACEB369", "Content-Length" : "0", - "x-ms-request-id" : "cc6addab-901e-0077-42f4-12b537000000", - "x-ms-client-request-id" : "f78f68a4-b997-403a-a922-10283053fe2b" + "x-ms-request-id" : "312e60ef-701e-0024-1769-556722000000", + "x-ms-client-request-id" : "6f608684-c4d5-4d4e-a314-46925fbe7472" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac2f56084946d/javablobbreakblobleaseac1leaseapitestbreakblobleaseac2f5630813?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6710835806a/javablobbreakblobleaseac1leaseapitestbreakblobleaseac67171404b?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c0547136-8a08-4c21-b8fd-db3432818c95" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "71a36c6d-bb72-4eb2-a847-56468bd1fdb2", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D089B45", - "x-ms-lease-id" : "e97dc9a5-5491-4632-99ef-25031411ddd2", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "04950a85-001e-004c-0c69-5501b2000000", + "Date" : "Wed, 08 Jul 2020 20:52:40 GMT", + "x-ms-client-request-id" : "71a36c6d-bb72-4eb2-a847-56468bd1fdb2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6710835806a/javablobbreakblobleaseac1leaseapitestbreakblobleaseac67171404b?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1bfe4f4-c2fb-4b7c-8671-8c205495e7c1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380DACEB369", + "x-ms-lease-id" : "5c4ede3b-a9b4-4c54-a097-72354597a359", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6addb5-901e-0077-4bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "c0547136-8a08-4c21-b8fd-db3432818c95" + "x-ms-request-id" : "22f782e1-601e-0038-5d69-553542000000", + "Date" : "Wed, 08 Jul 2020 20:52:41 GMT", + "x-ms-client-request-id" : "b1bfe4f4-c2fb-4b7c-8671-8c205495e7c1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac2f56084946d/javablobbreakblobleaseac1leaseapitestbreakblobleaseac2f5630813?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6710835806a/javablobbreakblobleaseac1leaseapitestbreakblobleaseac67171404b?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cd941578-fda8-4e33-b478-2388ef201371" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "561633e6-4fd0-45ef-be43-1de70918fabc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D089B45", + "ETag" : "0x8D82380DACEB369", "x-ms-lease-time" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6addba-901e-0077-50f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "cd941578-fda8-4e33-b478-2388ef201371" + "x-ms-request-id" : "988b1ac2-d01e-0060-5d69-55ed1d000000", + "Date" : "Wed, 08 Jul 2020 20:52:41 GMT", + "x-ms-client-request-id" : "561633e6-4fd0-45ef-be43-1de70918fabc" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "67c120cb-3e2e-455e-a84b-81ef75f8840f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6060b5b1-a318-46f7-9938-1c89f58463ee" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6addca-901e-0077-5ef4-12b537000000", - "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseac2f56084946dWed, 15 Apr 2020 07:04:01 GMT\"0x8D7E10B2D001B9C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "67c120cb-3e2e-455e-a84b-81ef75f8840f", + "x-ms-request-id" : "59d40015-901e-0061-3469-55b2c1000000", + "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseac6710835806aWed, 08 Jul 2020 20:52:40 GMT\"0x8D82380DA9427AA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:41 GMT", + "x-ms-client-request-id" : "6060b5b1-a318-46f7-9938-1c89f58463ee", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac2f56084946d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6710835806a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3e4095e5-dbd6-4d94-8787-9e05b0069b85" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f655dc7f-46fd-40ec-b92a-ca68ac7f259d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6addd6-901e-0077-69f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "3e4095e5-dbd6-4d94-8787-9e05b0069b85" + "x-ms-request-id" : "dcaac033-301e-0025-4c69-5538fe000000", + "Date" : "Wed, 08 Jul 2020 20:52:42 GMT", + "x-ms-client-request-id" : "f655dc7f-46fd-40ec-b92a-ca68ac7f259d" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseac2f56084946d", "javablobbreakblobleaseac1leaseapitestbreakblobleaseac2f5630813" ] + "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseac6710835806a", "javablobbreakblobleaseac1leaseapitestbreakblobleaseac67171404b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[2].json index 6f93d91f8ddf..3311b6edc949 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[2].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac45c264971c9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6ac40202966?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "55e260cd-6796-41e4-9c3e-dfbd8b469618" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "69cec36b-2835-4c62-8a3e-b2e932dd0175" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D2F745F", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "ETag" : "0x8D82380DC1C4823", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adde0-901e-0077-72f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "55e260cd-6796-41e4-9c3e-dfbd8b469618" + "x-ms-request-id" : "b279892b-201e-0039-7569-556a9e000000", + "Date" : "Wed, 08 Jul 2020 20:52:41 GMT", + "x-ms-client-request-id" : "69cec36b-2835-4c62-8a3e-b2e932dd0175" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac45c264971c9/javablobbreakblobleaseac1leaseapitestbreakblobleaseac45c72523e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6ac40202966/javablobbreakblobleaseac1leaseapitestbreakblobleaseac6ac747174", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c5e6cb25-656c-4c3d-8b39-1a617d458183", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e72d1e33-1ace-4251-aa2b-c70a38fbb2be", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "x-ms-version-id" : "2020-07-08T20:52:43.1818636Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:42 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2D392CC1", + "ETag" : "0x8D82380DC4E1F8C", "Content-Length" : "0", - "x-ms-request-id" : "cc6addf3-901e-0077-7ff4-12b537000000", - "x-ms-client-request-id" : "c5e6cb25-656c-4c3d-8b39-1a617d458183" + "x-ms-request-id" : "86f48bb7-401e-004d-5869-555e6e000000", + "x-ms-client-request-id" : "e72d1e33-1ace-4251-aa2b-c70a38fbb2be" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac45c264971c9/javablobbreakblobleaseac1leaseapitestbreakblobleaseac45c72523e?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6ac40202966/javablobbreakblobleaseac1leaseapitestbreakblobleaseac6ac747174?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "37cb055a-e2a2-4864-8bfe-87c75ca52079" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "360e1467-4724-4d65-8b57-8556243dc28b", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D392CC1", - "x-ms-lease-id" : "e8125c14-4091-47e0-ac5f-25ef7bc70efe", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "aaef7de1-701e-009d-5769-556338000000", + "Date" : "Wed, 08 Jul 2020 20:52:43 GMT", + "x-ms-client-request-id" : "360e1467-4724-4d65-8b57-8556243dc28b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6ac40202966/javablobbreakblobleaseac1leaseapitestbreakblobleaseac6ac747174?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7442adac-5953-47a7-ace4-9709323f7c8e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380DC4E1F8C", + "x-ms-lease-id" : "12c06549-453d-4b30-8dfd-74e53d03cacb", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6addff-901e-0077-09f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "37cb055a-e2a2-4864-8bfe-87c75ca52079" + "x-ms-request-id" : "8b0dbdc0-f01e-003a-3e69-558bfa000000", + "Date" : "Wed, 08 Jul 2020 20:52:43 GMT", + "x-ms-client-request-id" : "7442adac-5953-47a7-ace4-9709323f7c8e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac45c264971c9/javablobbreakblobleaseac1leaseapitestbreakblobleaseac45c72523e?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6ac40202966/javablobbreakblobleaseac1leaseapitestbreakblobleaseac6ac747174?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f527a444-94a9-4c64-af37-58ab6a21e7b5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "abb44b52-1c25-4d9e-a168-a84c2cff3618" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D392CC1", + "ETag" : "0x8D82380DC4E1F8C", "x-ms-lease-time" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ade04-901e-0077-0ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "f527a444-94a9-4c64-af37-58ab6a21e7b5" + "x-ms-request-id" : "6bf29853-901e-004e-1169-55bf0a000000", + "Date" : "Wed, 08 Jul 2020 20:52:43 GMT", + "x-ms-client-request-id" : "abb44b52-1c25-4d9e-a168-a84c2cff3618" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ffcf5ebc-133b-48dd-9d6c-5b89e27464bd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ddd3e74-16bb-440e-9796-b8549cf92562" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ade12-901e-0077-19f4-12b537000000", - "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseac45c264971c9Wed, 15 Apr 2020 07:04:01 GMT\"0x8D7E10B2D2F745F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "ffcf5ebc-133b-48dd-9d6c-5b89e27464bd", + "x-ms-request-id" : "b4bf3334-d01e-0012-4b69-55ea52000000", + "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseac6ac40202966Wed, 08 Jul 2020 20:52:42 GMT\"0x8D82380DC1C4823\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:43 GMT", + "x-ms-client-request-id" : "5ddd3e74-16bb-440e-9796-b8549cf92562", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac45c264971c9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac6ac40202966?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "03c198f1-e882-4f31-8c86-23a41a10f220" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3d5e6d5-756d-402d-9f9f-08c2d58ff812" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ade1c-901e-0077-21f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "03c198f1-e882-4f31-8c86-23a41a10f220" + "x-ms-request-id" : "2914a17d-e01e-0026-4c69-55d99a000000", + "Date" : "Wed, 08 Jul 2020 20:52:44 GMT", + "x-ms-client-request-id" : "f3d5e6d5-756d-402d-9f9f-08c2d58ff812" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseac45c264971c9", "javablobbreakblobleaseac1leaseapitestbreakblobleaseac45c72523e" ] + "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseac6ac40202966", "javablobbreakblobleaseac1leaseapitestbreakblobleaseac6ac747174" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[3].json index 2828c706d2e4..a6039c158db4 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[3].json @@ -1,167 +1,188 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac620705475d7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1d01ad11-ed91-4c04-9fc1-1fda2cbef735" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "24bd152b-4b3b-4b02-b5ac-02ed491e73e5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D5E30CD", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "ETag" : "0x8D82380DD9A7D7D", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ade24-901e-0077-29f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", - "x-ms-client-request-id" : "1d01ad11-ed91-4c04-9fc1-1fda2cbef735" + "x-ms-request-id" : "9aa97130-a01e-009e-3669-55825c000000", + "Date" : "Wed, 08 Jul 2020 20:52:44 GMT", + "x-ms-client-request-id" : "24bd152b-4b3b-4b02-b5ac-02ed491e73e5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac620705475d7/javablobbreakblobleaseac1leaseapitestbreakblobleaseac62076410a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8/javablobbreakblobleaseac1leaseapitestbreakblobleaseaced5571934", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "be2018b2-995e-46ba-ba79-097ed8b5551c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f68f837d-e74a-46dc-9941-02290b59172d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "x-ms-version-id" : "2020-07-08T20:52:45.7046683Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:45 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:44 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2D66620F", + "ETag" : "0x8D82380DDCF129B", "Content-Length" : "0", - "x-ms-request-id" : "cc6ade37-901e-0077-38f4-12b537000000", - "x-ms-client-request-id" : "be2018b2-995e-46ba-ba79-097ed8b5551c" + "x-ms-request-id" : "49a9eac9-401e-0062-3669-5553a5000000", + "x-ms-client-request-id" : "f68f837d-e74a-46dc-9941-02290b59172d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8/javablobbreakblobleaseac1leaseapitestbreakblobleaseaced5571934?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16d54dad-c175-4be1-8326-f0924e7c452d", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "f8d4e319-f01e-0077-1a69-554416000000", + "Date" : "Wed, 08 Jul 2020 20:52:45 GMT", + "x-ms-client-request-id" : "16d54dad-c175-4be1-8326-f0924e7c452d" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac620705475d7/javablobbreakblobleaseac1leaseapitestbreakblobleaseac62076410a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8/javablobbreakblobleaseac1leaseapitestbreakblobleaseaced5571934", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b9fbdb6b-6348-42d9-a367-550a0a7b05de" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d61896b-00c5-4640-b887-08098e4be0d3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "x-ms-version-id" : "2020-07-08T20:52:45.7046683Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:45 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:04:00 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:46 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B2D66620F", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:04:01 GMT", + "ETag" : "0x8D82380DDCF129B", + "x-ms-creation-time" : "Wed, 08 Jul 2020 20:52:45 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ade48-901e-0077-46f4-12b537000000", - "x-ms-client-request-id" : "b9fbdb6b-6348-42d9-a367-550a0a7b05de", + "x-ms-request-id" : "eb16b81d-101e-008b-4269-5595ef000000", + "x-ms-client-request-id" : "2d61896b-00c5-4640-b887-08098e4be0d3", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac620705475d7/javablobbreakblobleaseac1leaseapitestbreakblobleaseac62076410a?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8/javablobbreakblobleaseac1leaseapitestbreakblobleaseaced5571934?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "525dc463-ed9d-4964-85f8-457c8f980d1b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c1a182a1-cc2d-425b-b04d-1f058fab0df1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D66620F", - "x-ms-lease-id" : "fabaeb46-fd36-431a-9b72-02f412e44f4b", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "ETag" : "0x8D82380DDCF129B", + "x-ms-lease-id" : "45397529-933d-424b-b11f-4cb9972c0a9e", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ade58-901e-0077-55f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "525dc463-ed9d-4964-85f8-457c8f980d1b" + "x-ms-request-id" : "4091ec9b-e01e-009f-6669-55dd80000000", + "Date" : "Wed, 08 Jul 2020 20:52:46 GMT", + "x-ms-client-request-id" : "c1a182a1-cc2d-425b-b04d-1f058fab0df1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac620705475d7/javablobbreakblobleaseac1leaseapitestbreakblobleaseac62076410a?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8/javablobbreakblobleaseac1leaseapitestbreakblobleaseaced5571934?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "003ac9f8-fdd7-43c6-94fd-23b58c6d6506" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c89c6d1-058d-4258-af15-b63b6494534c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D66620F", + "ETag" : "0x8D82380DDCF129B", "x-ms-lease-time" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:01 GMT", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ade65-901e-0077-60f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "003ac9f8-fdd7-43c6-94fd-23b58c6d6506" + "x-ms-request-id" : "0fd48822-a01e-0027-4269-558646000000", + "Date" : "Wed, 08 Jul 2020 20:52:46 GMT", + "x-ms-client-request-id" : "1c89c6d1-058d-4258-af15-b63b6494534c" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e72aba62-d791-4e5d-9b52-6214a5923d41" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "783c255d-9ead-4838-9c2b-faf5c42d5c30" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ade79-901e-0077-70f4-12b537000000", - "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseac620705475d7Wed, 15 Apr 2020 07:04:01 GMT\"0x8D7E10B2D5E30CD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "e72aba62-d791-4e5d-9b52-6214a5923d41", + "x-ms-request-id" : "a3e5da1f-901e-0013-7769-55b58e000000", + "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8Wed, 08 Jul 2020 20:52:45 GMT\"0x8D82380DD9A7D7D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:47 GMT", + "x-ms-client-request-id" : "783c255d-9ead-4838-9c2b-faf5c42d5c30", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac620705475d7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c0178512-ee6f-4915-8e20-e8e32a549852" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "159abf5f-0fe7-46cd-9e94-e0e9c18108ac" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ade88-901e-0077-7ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "c0178512-ee6f-4915-8e20-e8e32a549852" + "x-ms-request-id" : "088beac7-d01e-004f-3b69-55e0d6000000", + "Date" : "Wed, 08 Jul 2020 20:52:47 GMT", + "x-ms-client-request-id" : "159abf5f-0fe7-46cd-9e94-e0e9c18108ac" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseac620705475d7", "javablobbreakblobleaseac1leaseapitestbreakblobleaseac62076410a" ] + "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseaced522774ec8", "javablobbreakblobleaseac1leaseapitestbreakblobleaseaced5571934" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[4].json index 0e7251df99be..dfd018963a29 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[4].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac10958183f47?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc7712046f79?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "258c89c2-9d69-4abf-8249-94c4452f33ce" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd0faccf-9408-4f60-84bc-30f48825e1df" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D95C8FF", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:02 GMT", + "ETag" : "0x8D82380DF636925", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ade99-901e-0077-0cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "258c89c2-9d69-4abf-8249-94c4452f33ce" + "x-ms-request-id" : "8b0f4810-301e-0078-2169-55327a000000", + "Date" : "Wed, 08 Jul 2020 20:52:48 GMT", + "x-ms-client-request-id" : "bd0faccf-9408-4f60-84bc-30f48825e1df" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac10958183f47/javablobbreakblobleaseac1leaseapitestbreakblobleaseac10962564c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc7712046f79/javablobbreakblobleaseac1leaseapitestbreakblobleaseacc77751880", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5147bb20-edd1-4d7e-a249-6660cf0f98bf", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3963522d-6953-49a9-b09c-9a51d8a36613", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:02 GMT", + "x-ms-version-id" : "2020-07-08T20:52:48.7148250Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:48 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2D9D5DB9", + "ETag" : "0x8D82380DF9A62DA", "Content-Length" : "0", - "x-ms-request-id" : "cc6adea6-901e-0077-17f4-12b537000000", - "x-ms-client-request-id" : "5147bb20-edd1-4d7e-a249-6660cf0f98bf" + "x-ms-request-id" : "4bb5b6da-101e-0050-1c69-5553d2000000", + "x-ms-client-request-id" : "3963522d-6953-49a9-b09c-9a51d8a36613" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac10958183f47/javablobbreakblobleaseac1leaseapitestbreakblobleaseac10962564c?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc7712046f79/javablobbreakblobleaseac1leaseapitestbreakblobleaseacc77751880?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "51ca8efe-cd83-49b1-905f-d6fe7af7ce55" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e19ccf8d-2363-4dd8-91d9-bc904ba6601e", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D9D5DB9", - "x-ms-lease-id" : "aac5d2ff-b720-462e-b58c-aa2f1d838212", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:02 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "7e093815-201e-0064-5469-55601a000000", + "Date" : "Wed, 08 Jul 2020 20:52:48 GMT", + "x-ms-client-request-id" : "e19ccf8d-2363-4dd8-91d9-bc904ba6601e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc7712046f79/javablobbreakblobleaseac1leaseapitestbreakblobleaseacc77751880?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1e173a58-e0a6-4f76-a2d8-6c30b32b1e6e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380DF9A62DA", + "x-ms-lease-id" : "afa6cb4b-7003-4222-83a3-9f8e01b057fb", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adeb5-901e-0077-26f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "51ca8efe-cd83-49b1-905f-d6fe7af7ce55" + "x-ms-request-id" : "a5b9fe3b-401e-0000-7c69-559182000000", + "Date" : "Wed, 08 Jul 2020 20:52:48 GMT", + "x-ms-client-request-id" : "1e173a58-e0a6-4f76-a2d8-6c30b32b1e6e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac10958183f47/javablobbreakblobleaseac1leaseapitestbreakblobleaseac10962564c?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc7712046f79/javablobbreakblobleaseac1leaseapitestbreakblobleaseacc77751880?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "536e9cb5-0f60-42eb-a7a4-84084ac8e055" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "24d5cae0-df7e-4fad-8f4a-3697d3cc36a7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2D9D5DB9", + "ETag" : "0x8D82380DF9A62DA", "x-ms-lease-time" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:02 GMT", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6adebd-901e-0077-2df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "536e9cb5-0f60-42eb-a7a4-84084ac8e055" + "x-ms-request-id" : "5e96dab1-b01e-0014-7869-55d9ed000000", + "Date" : "Wed, 08 Jul 2020 20:52:49 GMT", + "x-ms-client-request-id" : "24d5cae0-df7e-4fad-8f4a-3697d3cc36a7" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6aaf42f2-37b3-47c6-a241-6a4524e08f87" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7e58d09-5fc8-455e-adc3-36f1a2bb04ed" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6adec6-901e-0077-35f4-12b537000000", - "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseac10958183f47Wed, 15 Apr 2020 07:04:02 GMT\"0x8D7E10B2D95C8FF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "6aaf42f2-37b3-47c6-a241-6a4524e08f87", + "x-ms-request-id" : "028ec411-601e-0028-6b69-55f02a000000", + "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseacc7712046f79Wed, 08 Jul 2020 20:52:48 GMT\"0x8D82380DF636925\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:49 GMT", + "x-ms-client-request-id" : "a7e58d09-5fc8-455e-adc3-36f1a2bb04ed", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseac10958183f47?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc7712046f79?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "18f45840-6dca-4ff7-b5a1-f913f212a3b1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb9c6bc2-d075-4130-b432-04d5cae52ae9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6aded8-901e-0077-41f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "18f45840-6dca-4ff7-b5a1-f913f212a3b1" + "x-ms-request-id" : "934369f3-901e-003c-3969-55b845000000", + "Date" : "Wed, 08 Jul 2020 20:52:50 GMT", + "x-ms-client-request-id" : "fb9c6bc2-d075-4130-b432-04d5cae52ae9" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseac10958183f47", "javablobbreakblobleaseac1leaseapitestbreakblobleaseac10962564c" ] + "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseacc7712046f79", "javablobbreakblobleaseac1leaseapitestbreakblobleaseacc77751880" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[5].json new file mode 100644 index 000000000000..5647a11a10b8 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseac[5].json @@ -0,0 +1,154 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc2819618903?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "999d9aae-b33d-4ac4-913d-f7c513812b37" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380E0E6859A", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:50 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5de7d125-d01e-003d-2a69-55e799000000", + "Date" : "Wed, 08 Jul 2020 20:52:49 GMT", + "x-ms-client-request-id" : "999d9aae-b33d-4ac4-913d-f7c513812b37" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc2819618903/javablobbreakblobleaseac1leaseapitestbreakblobleaseacc28683015", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37c61639-cb99-4b75-a885-56daf0500f42", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-08T20:52:51.2676523Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:51 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 08 Jul 2020 20:52:50 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82380E11FC391", + "Content-Length" : "0", + "x-ms-request-id" : "01372bd9-701e-0079-6669-556da6000000", + "x-ms-client-request-id" : "37c61639-cb99-4b75-a885-56daf0500f42" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc2819618903/javablobbreakblobleaseac1leaseapitestbreakblobleaseacc28683015?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "20ad0c26-0523-4660-b74d-fbca3b624ba9", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "04a96de7-001e-005c-4369-55c4da000000", + "Date" : "Wed, 08 Jul 2020 20:52:51 GMT", + "x-ms-client-request-id" : "20ad0c26-0523-4660-b74d-fbca3b624ba9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc2819618903/javablobbreakblobleaseac1leaseapitestbreakblobleaseacc28683015?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a7b69e4-e43e-48c0-8185-26069fb30111" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380E11FC391", + "x-ms-lease-id" : "6f282604-4c89-425d-b4af-0231c944e39b", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a7a465f8-f01e-0048-5269-558cb5000000", + "Date" : "Wed, 08 Jul 2020 20:52:51 GMT", + "x-ms-client-request-id" : "5a7b69e4-e43e-48c0-8185-26069fb30111" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc2819618903/javablobbreakblobleaseac1leaseapitestbreakblobleaseacc28683015?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "01b27299-6c6a-4464-86b8-b8c4a1761af0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380E11FC391", + "x-ms-lease-time" : "0", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a3b23ee7-d01e-0070-5d69-552875000000", + "Date" : "Wed, 08 Jul 2020 20:52:51 GMT", + "x-ms-client-request-id" : "01b27299-6c6a-4464-86b8-b8c4a1761af0" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1b342b08-77f7-407e-b26f-9a707a4c8af6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b44004aa-201e-0029-7869-55aff6000000", + "Body" : "jtcbreakblobleaseacjtcbreakblobleaseac0leaseapitestbreakblobleaseacc2819618903Wed, 08 Jul 2020 20:52:50 GMT\"0x8D82380E0E6859A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:52 GMT", + "x-ms-client-request-id" : "1b342b08-77f7-407e-b26f-9a707a4c8af6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseac0leaseapitestbreakblobleaseacc2819618903?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6c96fb6a-3dac-40b1-9edb-9709db90cc84" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "58dd938b-601e-0065-3769-553fc6000000", + "Date" : "Wed, 08 Jul 2020 20:52:52 GMT", + "x-ms-client-request-id" : "6c96fb6a-3dac-40b1-9edb-9709db90cc84" + }, + "Exception" : null + } ], + "variables" : [ "jtcbreakblobleaseac0leaseapitestbreakblobleaseacc2819618903", "javablobbreakblobleaseac1leaseapitestbreakblobleaseacc28683015" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[0].json index dd846ccf54bc..0d4290ac75de 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[0].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0404924a74c7fc97e14d96a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0462286e49e5063c77457eb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9958a3a1-7ccf-41f9-8fe8-54070ad9d301" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "796a42a3-5ec4-4538-aa18-b1edcca080ad" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2DECB08F", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:02 GMT", + "ETag" : "0x8D82380E9F6A652", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adf59-901e-0077-34f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "9958a3a1-7ccf-41f9-8fe8-54070ad9d301" + "x-ms-request-id" : "d0c42999-101e-0022-2d69-55549d000000", + "Date" : "Wed, 08 Jul 2020 20:53:05 GMT", + "x-ms-client-request-id" : "796a42a3-5ec4-4538-aa18-b1edcca080ad" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0404924a74c7fc97e14d96a/javablobbreakblobleaseacfail14623675038e72016544", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0462286e49e5063c77457eb/javablobbreakblobleaseacfail184389ee9070d57bf849", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fa0d9f0c-0253-41c3-9fdb-e7084b0131e9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab02fe78-6900-48ef-8cc5-2e3f38d33eb8", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:02 GMT", + "x-ms-version-id" : "2020-07-08T20:53:06.8748208Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:06 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:06 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2DF556C5", + "ETag" : "0x8D82380EA6D61B0", "Content-Length" : "0", - "x-ms-request-id" : "cc6adf6e-901e-0077-48f4-12b537000000", - "x-ms-client-request-id" : "fa0d9f0c-0253-41c3-9fdb-e7084b0131e9" + "x-ms-request-id" : "c90d1ef3-a01e-0018-7169-554ee5000000", + "x-ms-client-request-id" : "ab02fe78-6900-48ef-8cc5-2e3f38d33eb8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0404924a74c7fc97e14d96a/javablobbreakblobleaseacfail14623675038e72016544?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0462286e49e5063c77457eb/javablobbreakblobleaseacfail184389ee9070d57bf849?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "99569d54-3b17-4984-a6ca-1af2cb9a29fe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47d7249c-83a8-4dfc-8bf1-2155c41c4981" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2DF556C5", - "x-ms-lease-id" : "541eec27-4cf3-4998-b95c-db8070a70a4d", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:02 GMT", + "ETag" : "0x8D82380EA6D61B0", + "x-ms-lease-id" : "9ee55e82-4f1a-4577-a4b3-fce8841541a8", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adf83-901e-0077-5cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "99569d54-3b17-4984-a6ca-1af2cb9a29fe" + "x-ms-request-id" : "711a34be-e01e-0054-3269-55ded5000000", + "Date" : "Wed, 08 Jul 2020 20:53:06 GMT", + "x-ms-client-request-id" : "47d7249c-83a8-4dfc-8bf1-2155c41c4981" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0404924a74c7fc97e14d96a/javablobbreakblobleaseacfail14623675038e72016544?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0462286e49e5063c77457eb/javablobbreakblobleaseacfail184389ee9070d57bf849?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8373e4bf-ecff-4abb-a4c6-cfada1e764be" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3315841e-e35f-4862-9494-3758baccf76d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6adf98-901e-0077-6ff4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6adf98-901e-0077-6ff4-12b537000000\nTime:2020-04-15T07:04:02.9042165Z", - "Date" : "Wed, 15 Apr 2020 07:04:01 GMT", - "x-ms-client-request-id" : "8373e4bf-ecff-4abb-a4c6-cfada1e764be", + "x-ms-request-id" : "0a3e9ecc-301e-0068-0669-55f712000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:0a3e9ecc-301e-0068-0669-55f712000000\nTime:2020-07-08T20:53:07.8826914Z", + "Date" : "Wed, 08 Jul 2020 20:53:07 GMT", + "x-ms-client-request-id" : "3315841e-e35f-4862-9494-3758baccf76d", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "300a5b46-0cae-42c6-9f31-9c2ad9acb15c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7409f7a-594e-4c44-871a-5d1422253dc0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6adfa0-901e-0077-77f4-12b537000000", - "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail0404924a74c7fc97e14d96aWed, 15 Apr 2020 07:04:02 GMT\"0x8D7E10B2DECB08F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "300a5b46-0cae-42c6-9f31-9c2ad9acb15c", + "x-ms-request-id" : "ba478a32-201e-0090-1669-55abec000000", + "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail0462286e49e5063c77457ebWed, 08 Jul 2020 20:53:06 GMT\"0x8D82380E9F6A652\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:08 GMT", + "x-ms-client-request-id" : "f7409f7a-594e-4c44-871a-5d1422253dc0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0404924a74c7fc97e14d96a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0462286e49e5063c77457eb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f1f6f6f5-53c9-4cde-9aa4-420c99689fb8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "138d189c-705b-43f7-8bba-1554b12957a0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6adfa7-901e-0077-7df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "f1f6f6f5-53c9-4cde-9aa4-420c99689fb8" + "x-ms-request-id" : "fd613b37-b01e-0004-6769-551c85000000", + "Date" : "Wed, 08 Jul 2020 20:53:07 GMT", + "x-ms-client-request-id" : "138d189c-705b-43f7-8bba-1554b12957a0" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseacfail0404924a74c7fc97e14d96a", "javablobbreakblobleaseacfail14623675038e72016544" ] + "variables" : [ "jtcbreakblobleaseacfail0462286e49e5063c77457eb", "javablobbreakblobleaseacfail184389ee9070d57bf849" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[1].json index 59558ec25bef..c8610cc1c0de 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[1].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0564521b9d0c5002db46dc9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail005888b56d5112485b436c9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eca51b79-04e2-4e4b-ac21-a51ce670d519" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d961a16f-c448-458f-9c73-ad3d1a6f06c8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2E2EF9A4", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:03 GMT", + "ETag" : "0x8D82380EBD4B5A9", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adfd1-901e-0077-21f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "eca51b79-04e2-4e4b-ac21-a51ce670d519" + "x-ms-request-id" : "04c08e3f-101e-0040-2269-5596ba000000", + "Date" : "Wed, 08 Jul 2020 20:53:08 GMT", + "x-ms-client-request-id" : "d961a16f-c448-458f-9c73-ad3d1a6f06c8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0564521b9d0c5002db46dc9/javablobbreakblobleaseacfail1672666a33c82cb46b4d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail005888b56d5112485b436c9/javablobbreakblobleaseacfail1239796865a2e61a0440", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e4929362-d55a-42e2-a6be-69bd99c4ffb2", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d961a23-994f-4281-833c-2a0e8e92805f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:03 GMT", + "x-ms-version-id" : "2020-07-08T20:53:09.6658179Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2E38D87E", + "ETag" : "0x8D82380EC1719DC", "Content-Length" : "0", - "x-ms-request-id" : "cc6adfe7-901e-0077-33f4-12b537000000", - "x-ms-client-request-id" : "e4929362-d55a-42e2-a6be-69bd99c4ffb2" + "x-ms-request-id" : "2afe160b-c01e-007c-6469-55bf7d000000", + "x-ms-client-request-id" : "2d961a23-994f-4281-833c-2a0e8e92805f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0564521b9d0c5002db46dc9/javablobbreakblobleaseacfail1672666a33c82cb46b4d?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail005888b56d5112485b436c9/javablobbreakblobleaseacfail1239796865a2e61a0440?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83a61e35-6871-4365-8a40-e02552277f59" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b210b963-419c-42b1-99c8-5f9d42c44a5d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2E38D87E", - "x-ms-lease-id" : "7b468b1c-85ba-4499-b0e3-e1526ec7607a", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:03 GMT", + "ETag" : "0x8D82380EC1719DC", + "x-ms-lease-id" : "6c506e89-e763-410c-ab36-e5dd1c8a2e04", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adff3-901e-0077-3ff4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "83a61e35-6871-4365-8a40-e02552277f59" + "x-ms-request-id" : "c2977c2b-501e-0041-5269-55c966000000", + "Date" : "Wed, 08 Jul 2020 20:53:09 GMT", + "x-ms-client-request-id" : "b210b963-419c-42b1-99c8-5f9d42c44a5d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0564521b9d0c5002db46dc9/javablobbreakblobleaseacfail1672666a33c82cb46b4d?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail005888b56d5112485b436c9/javablobbreakblobleaseacfail1239796865a2e61a0440?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2990f44a-36d0-4d3c-8ba4-53f76ef21b58" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a259cb47-394e-4e41-8024-993406a089cc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ae002-901e-0077-4cf4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ae002-901e-0077-4cf4-12b537000000\nTime:2020-04-15T07:04:03.3556402Z", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "2990f44a-36d0-4d3c-8ba4-53f76ef21b58", + "x-ms-request-id" : "c472ca71-501e-0023-5469-550b41000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:c472ca71-501e-0023-5469-550b41000000\nTime:2020-07-08T20:53:10.4028638Z", + "Date" : "Wed, 08 Jul 2020 20:53:09 GMT", + "x-ms-client-request-id" : "a259cb47-394e-4e41-8024-993406a089cc", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d320f046-5536-4e19-b202-56410f1b6fc9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4014ad0-3611-4aea-8da6-c211323627a4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae00b-901e-0077-53f4-12b537000000", - "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail0564521b9d0c5002db46dc9Wed, 15 Apr 2020 07:04:03 GMT\"0x8D7E10B2E2EF9A4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "d320f046-5536-4e19-b202-56410f1b6fc9", + "x-ms-request-id" : "7767b371-801e-000f-4969-55e7ee000000", + "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail005888b56d5112485b436c9Wed, 08 Jul 2020 20:53:09 GMT\"0x8D82380EBD4B5A9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:10 GMT", + "x-ms-client-request-id" : "e4014ad0-3611-4aea-8da6-c211323627a4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0564521b9d0c5002db46dc9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail005888b56d5112485b436c9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2e84509e-4194-4615-8537-4fd6531fd61f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fbb91228-0de5-4acb-8ff8-6233c09d8018" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae018-901e-0077-5ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "2e84509e-4194-4615-8537-4fd6531fd61f" + "x-ms-request-id" : "995b530d-401e-00a9-5869-5550f0000000", + "Date" : "Wed, 08 Jul 2020 20:53:10 GMT", + "x-ms-client-request-id" : "fbb91228-0de5-4acb-8ff8-6233c09d8018" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseacfail0564521b9d0c5002db46dc9", "javablobbreakblobleaseacfail1672666a33c82cb46b4d" ] + "variables" : [ "jtcbreakblobleaseacfail005888b56d5112485b436c9", "javablobbreakblobleaseacfail1239796865a2e61a0440" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[2].json index 3bcd908b7f2d..ec8a0b4d656c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[2].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail024914739ebe548f9b452db?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail039230240ac5c6f7da4ff18?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c8768044-2f28-4d3a-9be0-16551e605b26" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bfa7ea88-09f9-47c0-8424-b532e7fdac5f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2E5DDD18", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:03 GMT", + "ETag" : "0x8D82380ED2F6436", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae022-901e-0077-67f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "c8768044-2f28-4d3a-9be0-16551e605b26" + "x-ms-request-id" : "78bc66d5-e01e-00a0-7169-551523000000", + "Date" : "Wed, 08 Jul 2020 20:53:11 GMT", + "x-ms-client-request-id" : "bfa7ea88-09f9-47c0-8424-b532e7fdac5f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail024914739ebe548f9b452db/javablobbreakblobleaseacfail150285682e90a7a5b545", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail039230240ac5c6f7da4ff18/javablobbreakblobleaseacfail152892a351a8e568b542", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aa3cf82c-42d7-4075-80e1-960b6ec63d4c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "631f477e-4575-4288-a788-723b5c492d1d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:03 GMT", + "x-ms-version-id" : "2020-07-08T20:53:11.8353693Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:11 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2E8A6758", + "ETag" : "0x8D82380ED624D1D", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae066-901e-0077-21f4-12b537000000", - "x-ms-client-request-id" : "aa3cf82c-42d7-4075-80e1-960b6ec63d4c" + "x-ms-request-id" : "d302126e-a01e-00a1-1369-554aff000000", + "x-ms-client-request-id" : "631f477e-4575-4288-a788-723b5c492d1d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail024914739ebe548f9b452db/javablobbreakblobleaseacfail150285682e90a7a5b545?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail039230240ac5c6f7da4ff18/javablobbreakblobleaseacfail152892a351a8e568b542?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6e8c243c-75af-43ef-b3c1-60f764f45bcd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ccf6302-0c70-4c40-a4df-8364d3f38b5f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2E8A6758", - "x-ms-lease-id" : "a8c85afe-8af0-4995-add5-e3c22b048555", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:03 GMT", + "ETag" : "0x8D82380ED624D1D", + "x-ms-lease-id" : "c16f7368-0a06-4c5e-844e-72ee569f4bbe", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae073-901e-0077-2ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "6e8c243c-75af-43ef-b3c1-60f764f45bcd" + "x-ms-request-id" : "0a91653b-701e-00a2-7a69-55ab9b000000", + "Date" : "Wed, 08 Jul 2020 20:53:11 GMT", + "x-ms-client-request-id" : "5ccf6302-0c70-4c40-a4df-8364d3f38b5f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail024914739ebe548f9b452db/javablobbreakblobleaseacfail150285682e90a7a5b545?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail039230240ac5c6f7da4ff18/javablobbreakblobleaseacfail152892a351a8e568b542?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "40ce1663-bc89-43b4-b039-47d7abbf0871" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "77300810-45ba-4583-b349-3918e3ec1122" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ae085-901e-0077-3ef4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ae085-901e-0077-3ef4-12b537000000\nTime:2020-04-15T07:04:03.9071590Z", - "Date" : "Wed, 15 Apr 2020 07:04:02 GMT", - "x-ms-client-request-id" : "40ce1663-bc89-43b4-b039-47d7abbf0871", + "x-ms-request-id" : "5a4fb4fe-301e-00a3-2669-55f447000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5a4fb4fe-301e-00a3-2669-55f447000000\nTime:2020-07-08T20:53:12.5156422Z", + "Date" : "Wed, 08 Jul 2020 20:53:12 GMT", + "x-ms-client-request-id" : "77300810-45ba-4583-b349-3918e3ec1122", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f9851807-54d0-48ad-8d44-97456f8319a0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "439d70f7-92a0-427f-a8b3-c65cce86babe" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae090-901e-0077-47f4-12b537000000", - "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail024914739ebe548f9b452dbWed, 15 Apr 2020 07:04:03 GMT\"0x8D7E10B2E5DDD18\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", - "x-ms-client-request-id" : "f9851807-54d0-48ad-8d44-97456f8319a0", + "x-ms-request-id" : "f850a4b7-101e-00a4-1f69-559824000000", + "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail039230240ac5c6f7da4ff18Wed, 08 Jul 2020 20:53:11 GMT\"0x8D82380ED2F6436\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:12 GMT", + "x-ms-client-request-id" : "439d70f7-92a0-427f-a8b3-c65cce86babe", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail024914739ebe548f9b452db?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail039230240ac5c6f7da4ff18?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4529fef8-b5d8-4fdf-b7b5-595330f353d5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a362218-ce47-4bc0-a433-bbce7e48e2ff" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae09d-901e-0077-53f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", - "x-ms-client-request-id" : "4529fef8-b5d8-4fdf-b7b5-595330f353d5" + "x-ms-request-id" : "bc531e7a-501e-00a5-4c69-55c7f8000000", + "Date" : "Wed, 08 Jul 2020 20:53:13 GMT", + "x-ms-client-request-id" : "7a362218-ce47-4bc0-a433-bbce7e48e2ff" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseacfail024914739ebe548f9b452db", "javablobbreakblobleaseacfail150285682e90a7a5b545" ] + "variables" : [ "jtcbreakblobleaseacfail039230240ac5c6f7da4ff18", "javablobbreakblobleaseacfail152892a351a8e568b542" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[3].json index 7a20e0e893a2..9555595e2b27 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[3].json @@ -1,123 +1,125 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0083609d0843e814db4547a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail06281724a317b6402446689?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "579005d5-c578-411a-b090-8b725a8994c4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a660ea4-41d6-4a64-b684-2cc5d995bfd4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2EB8E43C", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:04 GMT", + "ETag" : "0x8D82380EE634EFB", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae0b3-901e-0077-67f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", - "x-ms-client-request-id" : "579005d5-c578-411a-b090-8b725a8994c4" + "x-ms-request-id" : "17ca6755-801e-00a6-4269-55269c000000", + "Date" : "Wed, 08 Jul 2020 20:53:13 GMT", + "x-ms-client-request-id" : "0a660ea4-41d6-4a64-b684-2cc5d995bfd4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0083609d0843e814db4547a/javablobbreakblobleaseacfail11779260302e5a2bfd40", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail06281724a317b6402446689/javablobbreakblobleaseacfail125635358c8e76b31e48", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a1fafe08-9d73-4f80-9bed-47528738151b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f710238f-96ac-4aa3-8d99-25048c04529a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:04 GMT", + "x-ms-version-id" : "2020-07-08T20:53:13.8698255Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:13 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:13 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2EC13BEB", + "ETag" : "0x8D82380EE98BC0F", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae0cb-901e-0077-7af4-12b537000000", - "x-ms-client-request-id" : "a1fafe08-9d73-4f80-9bed-47528738151b" + "x-ms-request-id" : "08a63b7d-c01e-00a7-6269-557940000000", + "x-ms-client-request-id" : "f710238f-96ac-4aa3-8d99-25048c04529a" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0083609d0843e814db4547a/javablobbreakblobleaseacfail11779260302e5a2bfd40", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail06281724a317b6402446689/javablobbreakblobleaseacfail125635358c8e76b31e48", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6d781c40-36c1-4e14-be93-0affa76e1ca1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a72f77f-e9ac-481e-ba68-2482343f4581" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:04 GMT", + "x-ms-version-id" : "2020-07-08T20:53:13.8698255Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:13 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:13 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B2EC13BEB", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:04:04 GMT", + "ETag" : "0x8D82380EE98BC0F", + "x-ms-creation-time" : "Wed, 08 Jul 2020 20:53:13 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ae0d7-901e-0077-04f4-12b537000000", - "x-ms-client-request-id" : "6d781c40-36c1-4e14-be93-0affa76e1ca1", + "x-ms-request-id" : "255fd442-001e-00a8-2069-550f2c000000", + "x-ms-client-request-id" : "9a72f77f-e9ac-481e-ba68-2482343f4581", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0083609d0843e814db4547a/javablobbreakblobleaseacfail11779260302e5a2bfd40?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail06281724a317b6402446689/javablobbreakblobleaseacfail125635358c8e76b31e48?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4fccd613-5a97-486e-ad57-af7d8a9e0e0d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3cf2273d-24ed-48e7-b43f-6398c134c420" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2EC13BEB", - "x-ms-lease-id" : "3ae997e0-4847-46d7-8526-af21105573be", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:04 GMT", + "ETag" : "0x8D82380EE98BC0F", + "x-ms-lease-id" : "7bc80d7e-1ebb-441e-9c93-49551250cb11", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae0f1-901e-0077-14f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", - "x-ms-client-request-id" : "4fccd613-5a97-486e-ad57-af7d8a9e0e0d" + "x-ms-request-id" : "a59ad32a-301e-009c-3869-553ce4000000", + "Date" : "Wed, 08 Jul 2020 20:53:14 GMT", + "x-ms-client-request-id" : "3cf2273d-24ed-48e7-b43f-6398c134c420" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0083609d0843e814db4547a/javablobbreakblobleaseacfail11779260302e5a2bfd40?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail06281724a317b6402446689/javablobbreakblobleaseacfail125635358c8e76b31e48?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a09c99c9-92c0-4995-b70f-306d4db99534" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cb77afe9-9cb1-4281-806e-8e6122f821e4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ae103-901e-0077-22f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ae103-901e-0077-22f4-12b537000000\nTime:2020-04-15T07:04:04.2805095Z", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", - "x-ms-client-request-id" : "a09c99c9-92c0-4995-b70f-306d4db99534", + "x-ms-request-id" : "34c325b4-401e-0010-5769-5554ea000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:34c325b4-401e-0010-5769-5554ea000000\nTime:2020-07-08T20:53:15.1077967Z", + "Date" : "Wed, 08 Jul 2020 20:53:14 GMT", + "x-ms-client-request-id" : "cb77afe9-9cb1-4281-806e-8e6122f821e4", "Content-Type" : "application/xml" }, "Exception" : null @@ -125,43 +127,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6203a11f-9e6b-4de6-93c8-74bc32fcf92d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c726e7f4-5ed0-42e5-9e0d-b68b71c9e2d8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae10d-901e-0077-2cf4-12b537000000", - "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail0083609d0843e814db4547aWed, 15 Apr 2020 07:04:04 GMT\"0x8D7E10B2EB8E43C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", - "x-ms-client-request-id" : "6203a11f-9e6b-4de6-93c8-74bc32fcf92d", + "x-ms-request-id" : "81f7b710-201e-0074-1b69-55a572000000", + "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail06281724a317b6402446689Wed, 08 Jul 2020 20:53:13 GMT\"0x8D82380EE634EFB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:14 GMT", + "x-ms-client-request-id" : "c726e7f4-5ed0-42e5-9e0d-b68b71c9e2d8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail0083609d0843e814db4547a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail06281724a317b6402446689?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "39be7dc1-7a6e-4fb2-98f0-07a4d94bd33f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ad076f5-6f89-4a3f-bb3d-168bf345059a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae11a-901e-0077-37f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:03 GMT", - "x-ms-client-request-id" : "39be7dc1-7a6e-4fb2-98f0-07a4d94bd33f" + "x-ms-request-id" : "9a1ae5cc-e01e-006b-3669-551676000000", + "Date" : "Wed, 08 Jul 2020 20:53:14 GMT", + "x-ms-client-request-id" : "9ad076f5-6f89-4a3f-bb3d-168bf345059a" }, "Exception" : null } ], - "variables" : [ "jtcbreakblobleaseacfail0083609d0843e814db4547a", "javablobbreakblobleaseacfail11779260302e5a2bfd40" ] + "variables" : [ "jtcbreakblobleaseacfail06281724a317b6402446689", "javablobbreakblobleaseacfail125635358c8e76b31e48" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[4].json new file mode 100644 index 000000000000..5961f6144c2d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestbreakblobleaseacfail[4].json @@ -0,0 +1,135 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail09822328c546829aa5490fa?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e7cc295f-3082-4795-b21a-3c100b705b4c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380EFFBEFE6", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:16 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4072f2ae-301e-0057-6569-553fb1000000", + "Date" : "Wed, 08 Jul 2020 20:53:16 GMT", + "x-ms-client-request-id" : "e7cc295f-3082-4795-b21a-3c100b705b4c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail09822328c546829aa5490fa/javablobbreakblobleaseacfail183867947c2dd8282646", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6cf80233-aebd-41b7-8f9b-4c79b21300b1", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-08T20:53:16.5397381Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:16 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 08 Jul 2020 20:53:15 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82380F02FFA70", + "Content-Length" : "0", + "x-ms-request-id" : "03349ac5-c01e-0043-2a69-5577de000000", + "x-ms-client-request-id" : "6cf80233-aebd-41b7-8f9b-4c79b21300b1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail09822328c546829aa5490fa/javablobbreakblobleaseacfail183867947c2dd8282646?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "26c63ffc-6a55-443c-bac2-6c26efb758df" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380F02FFA70", + "x-ms-lease-id" : "5aab4cee-b50b-49ce-9292-9e24faa049d0", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:16 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6df8abe0-f01e-0093-4169-554a88000000", + "Date" : "Wed, 08 Jul 2020 20:53:16 GMT", + "x-ms-client-request-id" : "26c63ffc-6a55-443c-bac2-6c26efb758df" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail09822328c546829aa5490fa/javablobbreakblobleaseacfail183867947c2dd8282646?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0d6cf4d-a0bb-4972-a0ad-eae1e909608b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "d1e92111-601e-0007-7669-55fde1000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:d1e92111-601e-0007-7669-55fde1000000\nTime:2020-07-08T20:53:17.2921681Z", + "Date" : "Wed, 08 Jul 2020 20:53:16 GMT", + "x-ms-client-request-id" : "c0d6cf4d-a0bb-4972-a0ad-eae1e909608b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcbreakblobleaseacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1db82a2f-caf1-4f04-becb-87bd09cb882e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "137ab576-f01e-0058-4e69-5549dd000000", + "Body" : "jtcbreakblobleaseacfailjtcbreakblobleaseacfail09822328c546829aa5490faWed, 08 Jul 2020 20:53:16 GMT\"0x8D82380EFFBEFE6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:16 GMT", + "x-ms-client-request-id" : "1db82a2f-caf1-4f04-becb-87bd09cb882e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcbreakblobleaseacfail09822328c546829aa5490fa?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3da1433-9b46-4d8e-9f2d-9c1084f94593" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2610b59a-201e-0080-0b69-556e84000000", + "Date" : "Wed, 08 Jul 2020 20:53:17 GMT", + "x-ms-client-request-id" : "b3da1433-9b46-4d8e-9f2d-9c1084f94593" + }, + "Exception" : null + } ], + "variables" : [ "jtcbreakblobleaseacfail09822328c546829aa5490fa", "javablobbreakblobleaseacfail183867947c2dd8282646" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[0].json index a43a6e98adff..d75164434c6d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[0].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac7f00576545?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac06a43569bd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "09e9814d-88ae-4fe6-aa88-263c203bae4d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e2796370-e60c-4b90-a51f-e30006867662" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2F7CFFA8", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:05 GMT", + "ETag" : "0x8D82380FA3E8517", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae260-901e-0077-22f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:04 GMT", - "x-ms-client-request-id" : "09e9814d-88ae-4fe6-aa88-263c203bae4d" + "x-ms-request-id" : "409218c8-e01e-009f-5f69-55dd80000000", + "Date" : "Wed, 08 Jul 2020 20:53:32 GMT", + "x-ms-client-request-id" : "e2796370-e60c-4b90-a51f-e30006867662" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac7f00576545/javablobchangeblobleaseac18802211f02a3fe3b34791", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac06a43569bd/javablobchangeblobleaseac1499016ea92a778b4447b6", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b0d82ed5-8083-45c6-9cc9-ceda01292143", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "711e9a7e-577d-4a80-8160-b288a90f22ad", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:05 GMT", + "x-ms-version-id" : "2020-07-08T20:53:34.1603449Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:34 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:04 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:33 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2F857E22", + "ETag" : "0x8D82380FAB0D279", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae27a-901e-0077-31f4-12b537000000", - "x-ms-client-request-id" : "b0d82ed5-8083-45c6-9cc9-ceda01292143" + "x-ms-request-id" : "08cf9dc2-701e-0046-3769-55a505000000", + "x-ms-client-request-id" : "711e9a7e-577d-4a80-8160-b288a90f22ad" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac7f00576545/javablobchangeblobleaseac18802211f02a3fe3b34791?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac06a43569bd/javablobchangeblobleaseac1499016ea92a778b4447b6?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "abea6a3a-6ef7-4538-93c9-9f608e48d68f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc5f3f4c-c5c5-4e51-bad8-3d1fe5a1a218", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2F857E22", - "x-ms-lease-id" : "b402cce2-4003-457a-9ae2-f8cb0c5eb25e", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:05 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "10fb8437-501e-006e-2969-55c4ad000000", + "Date" : "Wed, 08 Jul 2020 20:53:34 GMT", + "x-ms-client-request-id" : "cc5f3f4c-c5c5-4e51-bad8-3d1fe5a1a218" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac06a43569bd/javablobchangeblobleaseac1499016ea92a778b4447b6?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d288e2e5-d9fe-48f2-833e-c843232933f5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380FAB0D279", + "x-ms-lease-id" : "08bc08fe-0f0f-48cf-8d9a-1ad82bff4ce2", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae289-901e-0077-3bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:04 GMT", - "x-ms-client-request-id" : "abea6a3a-6ef7-4538-93c9-9f608e48d68f" + "x-ms-request-id" : "a59af63b-301e-009c-7f69-553ce4000000", + "Date" : "Wed, 08 Jul 2020 20:53:34 GMT", + "x-ms-client-request-id" : "d288e2e5-d9fe-48f2-833e-c843232933f5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac7f00576545/javablobchangeblobleaseac18802211f02a3fe3b34791?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac06a43569bd/javablobchangeblobleaseac1499016ea92a778b4447b6?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "02d13c77-66cf-459a-b4e1-1c22a6baa41f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc03f9ab-8dd7-44a4-9cbb-559f6db0d860" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2F857E22", - "x-ms-lease-id" : "7b543342-c262-4350-b534-8f4a721a7480", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:05 GMT", + "ETag" : "0x8D82380FAB0D279", + "x-ms-lease-id" : "f2a15213-e2e6-46ca-abfd-be3c124fec18", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae298-901e-0077-45f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:04 GMT", - "x-ms-client-request-id" : "02d13c77-66cf-459a-b4e1-1c22a6baa41f" + "x-ms-request-id" : "7a59ebf7-101e-007f-2069-555e19000000", + "Date" : "Wed, 08 Jul 2020 20:53:34 GMT", + "x-ms-client-request-id" : "dc03f9ab-8dd7-44a4-9cbb-559f6db0d860" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "914fc811-3d13-41f4-b8a0-22cd630a7b86" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3349a2d5-456d-430c-a118-da0fb4e6b62a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae2a3-901e-0077-50f4-12b537000000", - "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseac7f00576545Wed, 15 Apr 2020 07:04:05 GMT\"0x8D7E10B2F7CFFA8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:04 GMT", - "x-ms-client-request-id" : "914fc811-3d13-41f4-b8a0-22cd630a7b86", + "x-ms-request-id" : "312ea26a-701e-0024-6a69-556722000000", + "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseac06a43569bdWed, 08 Jul 2020 20:53:33 GMT\"0x8D82380FA3E8517\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:35 GMT", + "x-ms-client-request-id" : "3349a2d5-456d-430c-a118-da0fb4e6b62a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac7f00576545?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac06a43569bd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a59a017c-7925-41c6-96df-f7508b7b37ae" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "05da33c5-c912-46e3-9e16-8aeebce779a6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae2a8-901e-0077-55f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:04 GMT", - "x-ms-client-request-id" : "a59a017c-7925-41c6-96df-f7508b7b37ae" + "x-ms-request-id" : "04954be3-001e-004c-1369-5501b2000000", + "Date" : "Wed, 08 Jul 2020 20:53:35 GMT", + "x-ms-client-request-id" : "05da33c5-c912-46e3-9e16-8aeebce779a6" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseac7f00576545", "javablobchangeblobleaseac18802211f02a3fe3b34791", "7b543342-c262-4350-b534-8f4a721a7480" ] + "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseac06a43569bd", "javablobchangeblobleaseac1499016ea92a778b4447b6", "f2a15213-e2e6-46ca-abfd-be3c124fec18" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[1].json index b9f826632f08..83830c5968f3 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[1].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca96625052f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacad637907a1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3c5f265d-e500-4631-a17d-47b09620c552" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "142070ab-66f2-45c6-8bb9-19a42324920b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2FA9BFB7", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:05 GMT", + "ETag" : "0x8D82380FC2BE32D", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae2b3-901e-0077-5ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:04 GMT", - "x-ms-client-request-id" : "3c5f265d-e500-4631-a17d-47b09620c552" + "x-ms-request-id" : "22f79d65-601e-0038-3a69-553542000000", + "Date" : "Wed, 08 Jul 2020 20:53:36 GMT", + "x-ms-client-request-id" : "142070ab-66f2-45c6-8bb9-19a42324920b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca96625052f/javablobchangeblobleaseac1354494d93fafa82c140e9", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacad637907a1/javablobchangeblobleaseac1260854c6148166a7e42de", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9d399468-02b0-4fb5-83b3-a8dd41cb818b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf432cf4-d309-451f-addc-43935e5a3768", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:05 GMT", + "x-ms-version-id" : "2020-07-08T20:53:37.0073863Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:36 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2FD4E9A7", + "ETag" : "0x8D82380FC633F07", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae2df-901e-0077-80f4-12b537000000", - "x-ms-client-request-id" : "9d399468-02b0-4fb5-83b3-a8dd41cb818b" + "x-ms-request-id" : "988b661a-d01e-0060-5969-55ed1d000000", + "x-ms-client-request-id" : "bf432cf4-d309-451f-addc-43935e5a3768" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca96625052f/javablobchangeblobleaseac1354494d93fafa82c140e9?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacad637907a1/javablobchangeblobleaseac1260854c6148166a7e42de?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aa12ad05-55bf-4cfa-99e6-5ccd911d47bc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "56ba3232-e69d-4abf-9948-165c8405c2f0", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2FD4E9A7", - "x-ms-lease-id" : "31a33962-6424-49f1-a6e2-975242064a69", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:05 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "59d42a34-901e-0061-7c69-55b2c1000000", + "Date" : "Wed, 08 Jul 2020 20:53:36 GMT", + "x-ms-client-request-id" : "56ba3232-e69d-4abf-9948-165c8405c2f0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacad637907a1/javablobchangeblobleaseac1260854c6148166a7e42de?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8d290c7b-82fa-49e3-bad2-149e3b945405" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380FC633F07", + "x-ms-lease-id" : "bb660a69-f0e0-4649-b7b8-ac4aafd963b0", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae2ea-901e-0077-09f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "aa12ad05-55bf-4cfa-99e6-5ccd911d47bc" + "x-ms-request-id" : "dcab08db-301e-0025-8069-5538fe000000", + "Date" : "Wed, 08 Jul 2020 20:53:37 GMT", + "x-ms-client-request-id" : "8d290c7b-82fa-49e3-bad2-149e3b945405" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca96625052f/javablobchangeblobleaseac1354494d93fafa82c140e9?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacad637907a1/javablobchangeblobleaseac1260854c6148166a7e42de?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fdacc6ab-e714-4fc6-ba4e-d17376f16e77" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d1f987a-bf4d-4965-a31b-e4b0c5100c86" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2FD4E9A7", - "x-ms-lease-id" : "cc5c4076-cea0-4e64-af12-4fa852056101", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:05 GMT", + "ETag" : "0x8D82380FC633F07", + "x-ms-lease-id" : "30813158-3fa9-48ff-947c-665c202d51ee", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae2fb-901e-0077-16f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "fdacc6ab-e714-4fc6-ba4e-d17376f16e77" + "x-ms-request-id" : "b279f952-201e-0039-1e69-556a9e000000", + "Date" : "Wed, 08 Jul 2020 20:53:38 GMT", + "x-ms-client-request-id" : "3d1f987a-bf4d-4965-a31b-e4b0c5100c86" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7c2796e0-4390-4277-b598-48078bf6a35f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4fe35c54-e93f-4135-be30-bd7881425715" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae31f-901e-0077-2bf4-12b537000000", - "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseaca96625052fWed, 15 Apr 2020 07:04:05 GMT\"0x8D7E10B2FA9BFB7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "7c2796e0-4390-4277-b598-48078bf6a35f", + "x-ms-request-id" : "86f4a968-401e-004d-0769-555e6e000000", + "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseacad637907a1Wed, 08 Jul 2020 20:53:36 GMT\"0x8D82380FC2BE32D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:37 GMT", + "x-ms-client-request-id" : "4fe35c54-e93f-4135-be30-bd7881425715", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca96625052f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacad637907a1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dde7f3c6-e9c8-4f5e-8fbe-b0701ced1aa9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eee6d7cf-28a8-44e8-8512-b9dbc9b4300a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae32f-901e-0077-38f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "dde7f3c6-e9c8-4f5e-8fbe-b0701ced1aa9" + "x-ms-request-id" : "9c0c4a8e-801e-0089-5f69-552b57000000", + "Date" : "Wed, 08 Jul 2020 20:53:37 GMT", + "x-ms-client-request-id" : "eee6d7cf-28a8-44e8-8512-b9dbc9b4300a" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseaca96625052f", "javablobchangeblobleaseac1354494d93fafa82c140e9", "cc5c4076-cea0-4e64-af12-4fa852056101" ] + "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseacad637907a1", "javablobchangeblobleaseac1260854c6148166a7e42de", "30813158-3fa9-48ff-947c-665c202d51ee" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[2].json index 6fce1aad6402..21f9239c2afa 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[2].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac12922970d0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacbfd86607a0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1b387597-0963-40ab-b92f-de0d42a4ac04" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "498d8565-628c-48d7-a3bc-95ca4bca9c6c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2FFD2412", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "ETag" : "0x8D82380FDB2C057", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae333-901e-0077-3cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "1b387597-0963-40ab-b92f-de0d42a4ac04" + "x-ms-request-id" : "d99fcd37-601e-0075-1869-55faae000000", + "Date" : "Wed, 08 Jul 2020 20:53:39 GMT", + "x-ms-client-request-id" : "498d8565-628c-48d7-a3bc-95ca4bca9c6c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac12922970d0/javablobchangeblobleaseac180236101cdfc80e204e13", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacbfd86607a0/javablobchangeblobleaseac1013558a70d2a586ee4e28", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c5ca8583-beb3-40e4-8b9b-dd361fe56b7f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2aaa67fa-7087-4f65-b9aa-28d456f2e73b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "x-ms-version-id" : "2020-07-08T20:53:39.5922351Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:39 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:39 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B3007504F", + "ETag" : "0x8D82380FDEDA9AF", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae340-901e-0077-47f4-12b537000000", - "x-ms-client-request-id" : "c5ca8583-beb3-40e4-8b9b-dd361fe56b7f" + "x-ms-request-id" : "aaefcd0e-701e-009d-6769-556338000000", + "x-ms-client-request-id" : "2aaa67fa-7087-4f65-b9aa-28d456f2e73b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac12922970d0/javablobchangeblobleaseac180236101cdfc80e204e13?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacbfd86607a0/javablobchangeblobleaseac1013558a70d2a586ee4e28?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fced705e-b481-4baa-98fa-aec02176a6cf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1b9f76c0-6343-4574-abda-5548bbf241bb", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B3007504F", - "x-ms-lease-id" : "f8de4abd-efdc-45e9-b6e4-3eab8f1d7bfb", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8b0df3f5-f01e-003a-7a69-558bfa000000", + "Date" : "Wed, 08 Jul 2020 20:53:39 GMT", + "x-ms-client-request-id" : "1b9f76c0-6343-4574-abda-5548bbf241bb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacbfd86607a0/javablobchangeblobleaseac1013558a70d2a586ee4e28?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ea6f3d4-68c7-4a6d-bab7-f6954cb3fcfd" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380FDEDA9AF", + "x-ms-lease-id" : "8116e2aa-f3eb-47bd-8632-1b83b2f93d0b", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae356-901e-0077-56f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "fced705e-b481-4baa-98fa-aec02176a6cf" + "x-ms-request-id" : "6bf319fa-901e-004e-5e69-55bf0a000000", + "Date" : "Wed, 08 Jul 2020 20:53:39 GMT", + "x-ms-client-request-id" : "9ea6f3d4-68c7-4a6d-bab7-f6954cb3fcfd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac12922970d0/javablobchangeblobleaseac180236101cdfc80e204e13?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacbfd86607a0/javablobchangeblobleaseac1013558a70d2a586ee4e28?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5656f5d9-7b2d-471a-8824-a3bf221674f2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7b3682d4-2020-40e6-9234-afd4c47aaaee" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B3007504F", - "x-ms-lease-id" : "04917628-1dd1-44fe-88fb-3dab2aaedbec", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "ETag" : "0x8D82380FDEDA9AF", + "x-ms-lease-id" : "8a2a05fc-d56f-4cc0-87a2-5c5e9b72842e", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae364-901e-0077-60f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "5656f5d9-7b2d-471a-8824-a3bf221674f2" + "x-ms-request-id" : "b4bf9059-d01e-0012-0669-55ea52000000", + "Date" : "Wed, 08 Jul 2020 20:53:40 GMT", + "x-ms-client-request-id" : "7b3682d4-2020-40e6-9234-afd4c47aaaee" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0ef71b76-a34d-4bff-8c5c-988a3197b079" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2defd3be-6d0b-4d69-bbb6-33d6c2ed02a4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae36d-901e-0077-67f4-12b537000000", - "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseac12922970d0Wed, 15 Apr 2020 07:04:06 GMT\"0x8D7E10B2FFD2412\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "0ef71b76-a34d-4bff-8c5c-988a3197b079", + "x-ms-request-id" : "2914fb09-e01e-0026-7869-55d99a000000", + "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseacbfd86607a0Wed, 08 Jul 2020 20:53:39 GMT\"0x8D82380FDB2C057\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:40 GMT", + "x-ms-client-request-id" : "2defd3be-6d0b-4d69-bbb6-33d6c2ed02a4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac12922970d0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacbfd86607a0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f33a017a-cc1d-4b33-8d37-8120267b7d33" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7beff5a6-65bf-4b4c-ab1a-3eea32cf4d7b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae376-901e-0077-70f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "f33a017a-cc1d-4b33-8d37-8120267b7d33" + "x-ms-request-id" : "1a488263-c01e-0031-0869-557091000000", + "Date" : "Wed, 08 Jul 2020 20:53:41 GMT", + "x-ms-client-request-id" : "7beff5a6-65bf-4b4c-ab1a-3eea32cf4d7b" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseac12922970d0", "javablobchangeblobleaseac180236101cdfc80e204e13", "04917628-1dd1-44fe-88fb-3dab2aaedbec" ] + "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseacbfd86607a0", "javablobchangeblobleaseac1013558a70d2a586ee4e28", "8a2a05fc-d56f-4cc0-87a2-5c5e9b72842e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[3].json index cf9c8bf5456e..033e7b5836b8 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[3].json @@ -1,167 +1,188 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacb5f74514da?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ac52596b-ccba-426e-9bd8-f09a9edf96c3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "95e20018-9ee9-468b-9934-a4ab73a283ae" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B302A809B", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "ETag" : "0x8D82380FF3956DE", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae381-901e-0077-7af4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "ac52596b-ccba-426e-9bd8-f09a9edf96c3" + "x-ms-request-id" : "303c5ac2-801e-006d-2d69-5525c9000000", + "Date" : "Wed, 08 Jul 2020 20:53:41 GMT", + "x-ms-client-request-id" : "95e20018-9ee9-468b-9934-a4ab73a283ae" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacb5f74514da/javablobchangeblobleaseac170231a415e250de1a465f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283/javablobchangeblobleaseac1792851ca4af91273e4be8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "55068f3a-1e30-4848-a2df-a51b84ae18a0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb3a1c53-4b08-4206-83d3-dcc9cf7abd1a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "x-ms-version-id" : "2020-07-08T20:53:42.1090364Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:42 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:41 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B3036D02A", + "ETag" : "0x8D82380FF6D8B1E", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae390-901e-0077-04f4-12b537000000", - "x-ms-client-request-id" : "55068f3a-1e30-4848-a2df-a51b84ae18a0" + "x-ms-request-id" : "6b2b82bb-b01e-0059-4c69-551601000000", + "x-ms-client-request-id" : "fb3a1c53-4b08-4206-83d3-dcc9cf7abd1a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283/javablobchangeblobleaseac1792851ca4af91273e4be8?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "77d7c4ad-d7e0-43f6-870f-e791dee189bb", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8ac4c87c-901e-0095-2c69-557937000000", + "Date" : "Wed, 08 Jul 2020 20:53:41 GMT", + "x-ms-client-request-id" : "77d7c4ad-d7e0-43f6-870f-e791dee189bb" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacb5f74514da/javablobchangeblobleaseac170231a415e250de1a465f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283/javablobchangeblobleaseac1792851ca4af91273e4be8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6100172c-d68e-49fc-b7bf-2ebf4ccae3d3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1063df1-2fed-4501-914b-c968ed9abf6f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "x-ms-version-id" : "2020-07-08T20:53:42.1090364Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:42 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:42 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B3036D02A", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:04:06 GMT", + "ETag" : "0x8D82380FF6D8B1E", + "x-ms-creation-time" : "Wed, 08 Jul 2020 20:53:42 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ae398-901e-0077-0bf4-12b537000000", - "x-ms-client-request-id" : "6100172c-d68e-49fc-b7bf-2ebf4ccae3d3", + "x-ms-request-id" : "8c5f019f-a01e-0045-4869-554461000000", + "x-ms-client-request-id" : "b1063df1-2fed-4501-914b-c968ed9abf6f", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacb5f74514da/javablobchangeblobleaseac170231a415e250de1a465f?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283/javablobchangeblobleaseac1792851ca4af91273e4be8?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "864e5aed-7ca5-4741-acf7-6f4b9f8cf740" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b69f60e-f53a-4b38-8897-6d139358d9a5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B3036D02A", - "x-ms-lease-id" : "5c8c613c-b507-43b9-a4dc-87f4b30052dc", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "ETag" : "0x8D82380FF6D8B1E", + "x-ms-lease-id" : "63ddab2c-d30a-4fd1-8023-262ee18680fc", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae3a0-901e-0077-13f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "864e5aed-7ca5-4741-acf7-6f4b9f8cf740" + "x-ms-request-id" : "eb172176-101e-008b-7a69-5595ef000000", + "Date" : "Wed, 08 Jul 2020 20:53:43 GMT", + "x-ms-client-request-id" : "6b69f60e-f53a-4b38-8897-6d139358d9a5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacb5f74514da/javablobchangeblobleaseac170231a415e250de1a465f?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283/javablobchangeblobleaseac1792851ca4af91273e4be8?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d3f2d61a-cab7-4306-96a9-7307f0bf29b3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0a3d893-865c-4ea9-b680-fc43640919eb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B3036D02A", - "x-ms-lease-id" : "e9335277-6a21-4fa2-97c2-6eeda3575996", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "ETag" : "0x8D82380FF6D8B1E", + "x-ms-lease-id" : "caa61ce5-c956-4328-bd44-b91ed43f14f3", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae3ab-901e-0077-1cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "d3f2d61a-cab7-4306-96a9-7307f0bf29b3" + "x-ms-request-id" : "409221dc-e01e-009f-1c69-55dd80000000", + "Date" : "Wed, 08 Jul 2020 20:53:43 GMT", + "x-ms-client-request-id" : "b0a3d893-865c-4ea9-b680-fc43640919eb" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5b5e1d3c-5a6b-4593-a78e-f737cc582082" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b2f89e9-1cea-4cb9-8fee-4b29d37b99f5" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae3b4-901e-0077-23f4-12b537000000", - "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseacb5f74514daWed, 15 Apr 2020 07:04:06 GMT\"0x8D7E10B302A809B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "5b5e1d3c-5a6b-4593-a78e-f737cc582082", + "x-ms-request-id" : "0fd4e955-a01e-0027-2569-558646000000", + "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283Wed, 08 Jul 2020 20:53:41 GMT\"0x8D82380FF3956DE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:43 GMT", + "x-ms-client-request-id" : "4b2f89e9-1cea-4cb9-8fee-4b29d37b99f5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacb5f74514da?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bec0ab0f-b84c-4091-872a-21b14ce49763" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "de3a8d96-44e3-4233-8c6c-0a9ac6989875" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae3bc-901e-0077-2bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "bec0ab0f-b84c-4091-872a-21b14ce49763" + "x-ms-request-id" : "a3e654ab-901e-0013-3c69-55b58e000000", + "Date" : "Wed, 08 Jul 2020 20:53:44 GMT", + "x-ms-client-request-id" : "de3a8d96-44e3-4233-8c6c-0a9ac6989875" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseacb5f74514da", "javablobchangeblobleaseac170231a415e250de1a465f", "e9335277-6a21-4fa2-97c2-6eeda3575996" ] + "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseaca083570283", "javablobchangeblobleaseac1792851ca4af91273e4be8", "caa61ce5-c956-4328-bd44-b91ed43f14f3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[4].json index 142a9cd04f7e..fd25d0a2bb43 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[4].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac736024705a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacc845422010?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0a7c871e-ffaa-4b79-84ba-8dc0a5a64eb1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2bd5ff75-6f47-472f-b839-4879697d6bb1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B30617C56", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "ETag" : "0x8D8238100F5FF29", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae3cc-901e-0077-39f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", - "x-ms-client-request-id" : "0a7c871e-ffaa-4b79-84ba-8dc0a5a64eb1" + "x-ms-request-id" : "088c50c7-d01e-004f-2c69-55e0d6000000", + "Date" : "Wed, 08 Jul 2020 20:53:44 GMT", + "x-ms-client-request-id" : "2bd5ff75-6f47-472f-b839-4879697d6bb1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac736024705a/javablobchangeblobleaseac1075172a98a07cd7bc444e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacc845422010/javablobchangeblobleaseac16439386a347d497194fc3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9649d447-9486-4b5c-a04b-226dca5d85fb", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "809fd8e5-6fa0-4ec5-9de6-fa3201e1cc5e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "x-ms-version-id" : "2020-07-08T20:53:45.0671505Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:45 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:05 GMT", + "Date" : "Wed, 08 Jul 2020 20:53:44 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B306AE4DC", + "ETag" : "0x8D8238101311191", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae3d9-901e-0077-41f4-12b537000000", - "x-ms-client-request-id" : "9649d447-9486-4b5c-a04b-226dca5d85fb" + "x-ms-request-id" : "8b0f9484-301e-0078-6a69-55327a000000", + "x-ms-client-request-id" : "809fd8e5-6fa0-4ec5-9de6-fa3201e1cc5e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac736024705a/javablobchangeblobleaseac1075172a98a07cd7bc444e?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacc845422010/javablobchangeblobleaseac16439386a347d497194fc3?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "29618997-bec7-4cf8-bc7c-c01884fda6c4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "14665fb6-7143-4bb6-a260-ea8e2d8b14d0", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B306AE4DC", - "x-ms-lease-id" : "6e604903-4dba-4c20-a1f6-5f6e2f7d88cb", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0347e0b4-001e-0097-6769-55c78f000000", + "Date" : "Wed, 08 Jul 2020 20:53:45 GMT", + "x-ms-client-request-id" : "14665fb6-7143-4bb6-a260-ea8e2d8b14d0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacc845422010/javablobchangeblobleaseac16439386a347d497194fc3?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bdcce156-f947-4187-af0d-4c25c7c40cbe" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8238101311191", + "x-ms-lease-id" : "990c2f0f-eb5a-4c7d-aa83-235eddb7cf5d", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae3e3-901e-0077-49f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "29618997-bec7-4cf8-bc7c-c01884fda6c4" + "x-ms-request-id" : "5de064a5-101e-006f-6369-559b71000000", + "Date" : "Wed, 08 Jul 2020 20:53:45 GMT", + "x-ms-client-request-id" : "bdcce156-f947-4187-af0d-4c25c7c40cbe" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac736024705a/javablobchangeblobleaseac1075172a98a07cd7bc444e?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacc845422010/javablobchangeblobleaseac16439386a347d497194fc3?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f3eb53e9-a745-4126-9e92-15dcaf3dd0a9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "81e747c4-3940-4d2f-be2f-8b03b594fffe" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B306AE4DC", - "x-ms-lease-id" : "beba45f4-c830-47f5-9bff-c49fdabb0ac1", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:06 GMT", + "ETag" : "0x8D8238101311191", + "x-ms-lease-id" : "825d9af0-3617-48dd-8528-0d6e3b939bea", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae3e9-901e-0077-4ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "f3eb53e9-a745-4126-9e92-15dcaf3dd0a9" + "x-ms-request-id" : "9c1603eb-201e-005b-2f69-55a8b9000000", + "Date" : "Wed, 08 Jul 2020 20:53:46 GMT", + "x-ms-client-request-id" : "81e747c4-3940-4d2f-be2f-8b03b594fffe" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "32543fa4-472f-4e0f-8919-4d4a7eb33c88" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9adf28a6-dfd7-49c3-aa4e-6816c5ce1b53" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae402-901e-0077-5ff4-12b537000000", - "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseac736024705aWed, 15 Apr 2020 07:04:06 GMT\"0x8D7E10B30617C56\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "32543fa4-472f-4e0f-8919-4d4a7eb33c88", + "x-ms-request-id" : "fce0501e-501e-0033-2a69-55ce29000000", + "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseacc845422010Wed, 08 Jul 2020 20:53:44 GMT\"0x8D8238100F5FF29\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:46 GMT", + "x-ms-client-request-id" : "9adf28a6-dfd7-49c3-aa4e-6816c5ce1b53", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac736024705a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseacc845422010?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "132bb021-aea5-4c2e-850b-5b3c093737c8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0797803d-7009-4bf3-a3ae-68b18a3c2281" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae40f-901e-0077-68f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "132bb021-aea5-4c2e-850b-5b3c093737c8" + "x-ms-request-id" : "2f27a44e-301e-0047-1269-55fad9000000", + "Date" : "Wed, 08 Jul 2020 20:53:46 GMT", + "x-ms-client-request-id" : "0797803d-7009-4bf3-a3ae-68b18a3c2281" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseac736024705a", "javablobchangeblobleaseac1075172a98a07cd7bc444e", "beba45f4-c830-47f5-9bff-c49fdabb0ac1" ] + "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseacc845422010", "javablobchangeblobleaseac16439386a347d497194fc3", "825d9af0-3617-48dd-8528-0d6e3b939bea" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[5].json new file mode 100644 index 000000000000..dfd8b33f5b3a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseac[5].json @@ -0,0 +1,154 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac4fd74059ea?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f282a0e3-c523-452f-a2af-5b94b8d4e361" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8238102794B77", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "21c146e5-801e-001f-6069-552286000000", + "Date" : "Wed, 08 Jul 2020 20:53:46 GMT", + "x-ms-client-request-id" : "f282a0e3-c523-452f-a2af-5b94b8d4e361" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac4fd74059ea/javablobchangeblobleaseac1842997998715a135c4e9b", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f5bf7be5-d852-4152-bc66-c92e79457267", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-08T20:53:47.5539319Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:47 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 08 Jul 2020 20:53:47 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D8238102AC8577", + "Content-Length" : "0", + "x-ms-request-id" : "0137ac97-701e-0079-0f69-556da6000000", + "x-ms-client-request-id" : "f5bf7be5-d852-4152-bc66-c92e79457267" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac4fd74059ea/javablobchangeblobleaseac1842997998715a135c4e9b?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba79e0c0-d4c9-4b40-804f-7687cd6df021", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a7a4a800-f01e-0048-4169-558cb5000000", + "Date" : "Wed, 08 Jul 2020 20:53:47 GMT", + "x-ms-client-request-id" : "ba79e0c0-d4c9-4b40-804f-7687cd6df021" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac4fd74059ea/javablobchangeblobleaseac1842997998715a135c4e9b?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5cc4bbb-e39e-4839-a205-74b215c84c0c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8238102AC8577", + "x-ms-lease-id" : "01ed44a0-8e16-4b2f-991e-7aecb3bd6fe7", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a3b28c6b-d01e-0070-1d69-552875000000", + "Date" : "Wed, 08 Jul 2020 20:53:47 GMT", + "x-ms-client-request-id" : "e5cc4bbb-e39e-4839-a205-74b215c84c0c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac4fd74059ea/javablobchangeblobleaseac1842997998715a135c4e9b?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5bb0d9e0-cb18-41f7-8f63-b8dace232158" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8238102AC8577", + "x-ms-lease-id" : "373ed9ef-dc77-4668-8996-84e6bf39fa60", + "Last-Modified" : "Wed, 08 Jul 2020 20:53:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "9e61f263-d01e-0084-3e69-55e383000000", + "Date" : "Wed, 08 Jul 2020 20:53:48 GMT", + "x-ms-client-request-id" : "5bb0d9e0-cb18-41f7-8f63-b8dace232158" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aa4a1671-62cf-44d8-a743-1a115470bd0b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "92123c0f-801e-0020-3369-55ea25000000", + "Body" : "jtcchangeblobleaseacjtcchangeblobleaseac0leaseapitestchangeblobleaseac4fd74059eaWed, 08 Jul 2020 20:53:47 GMT\"0x8D8238102794B77\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:53:48 GMT", + "x-ms-client-request-id" : "aa4a1671-62cf-44d8-a743-1a115470bd0b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseac0leaseapitestchangeblobleaseac4fd74059ea?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "688e5714-8602-47bc-8a10-9704ab69da30" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d666906a-c01e-0098-3f69-55b1e3000000", + "Date" : "Wed, 08 Jul 2020 20:53:48 GMT", + "x-ms-client-request-id" : "688e5714-8602-47bc-8a10-9704ab69da30" + }, + "Exception" : null + } ], + "variables" : [ "jtcchangeblobleaseac0leaseapitestchangeblobleaseac4fd74059ea", "javablobchangeblobleaseac1842997998715a135c4e9b", "373ed9ef-dc77-4668-8996-84e6bf39fa60" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[0].json index cdbfe451f4f9..ab5d934771ca 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[0].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail02145255c1ea87f88e4825?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail098841f7830f48d1e44e16?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "598c6af2-50dc-40ed-9209-4e467d47c5d5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1664a619-f4cc-43dc-91d0-3a1dd5b89927" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B308FEA85", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "ETag" : "0x8D823810C0D84E9", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae41d-901e-0077-72f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "598c6af2-50dc-40ed-9209-4e467d47c5d5" + "x-ms-request-id" : "0a3f20a4-301e-0068-5169-55f712000000", + "Date" : "Wed, 08 Jul 2020 20:54:02 GMT", + "x-ms-client-request-id" : "1664a619-f4cc-43dc-91d0-3a1dd5b89927" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail02145255c1ea87f88e4825/javablobchangeblobleaseacfail1061530918a03590ed49", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail098841f7830f48d1e44e16/javablobchangeblobleaseacfail18682069e0dbbb029146", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "673ddc3c-c120-4e4c-b530-01983fde2abc", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "951b2595-93d3-4bd9-8a7c-e0462752c03f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "x-ms-version-id" : "2020-07-08T20:54:03.9605879Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:03 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", + "Date" : "Wed, 08 Jul 2020 20:54:03 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B309A64A5", + "ETag" : "0x8D823810C73FA77", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae433-901e-0077-01f4-12b537000000", - "x-ms-client-request-id" : "673ddc3c-c120-4e4c-b530-01983fde2abc" + "x-ms-request-id" : "ba47ed6c-201e-0090-0469-55abec000000", + "x-ms-client-request-id" : "951b2595-93d3-4bd9-8a7c-e0462752c03f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail02145255c1ea87f88e4825/javablobchangeblobleaseacfail1061530918a03590ed49?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail098841f7830f48d1e44e16/javablobchangeblobleaseacfail18682069e0dbbb029146?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ecaa6694-a6e5-48c6-aaf2-889efdf654c9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9bdabc63-d6f0-43be-af7c-6d524a66d290" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B309A64A5", - "x-ms-lease-id" : "a7943795-fda8-44ab-9f5c-3b2ac9312f39", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "ETag" : "0x8D823810C73FA77", + "x-ms-lease-id" : "704ac003-2c4d-4b86-8b94-415de7b669ff", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae43c-901e-0077-0af4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "ecaa6694-a6e5-48c6-aaf2-889efdf654c9" + "x-ms-request-id" : "fd618be9-b01e-0004-0469-551c85000000", + "Date" : "Wed, 08 Jul 2020 20:54:04 GMT", + "x-ms-client-request-id" : "9bdabc63-d6f0-43be-af7c-6d524a66d290" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail02145255c1ea87f88e4825/javablobchangeblobleaseacfail1061530918a03590ed49?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail098841f7830f48d1e44e16/javablobchangeblobleaseacfail18682069e0dbbb029146?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6aa33c22-af26-4c86-ad47-c83c493e26e7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b306393-8bd8-43dd-8bd5-19ddb3704a32" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ae440-901e-0077-0ef4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ae440-901e-0077-0ef4-12b537000000\nTime:2020-04-15T07:04:07.3473968Z", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "6aa33c22-af26-4c86-ad47-c83c493e26e7", + "x-ms-request-id" : "04c0dd8e-101e-0040-1a69-5596ba000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:04c0dd8e-101e-0040-1a69-5596ba000000\nTime:2020-07-08T20:54:04.7820876Z", + "Date" : "Wed, 08 Jul 2020 20:54:04 GMT", + "x-ms-client-request-id" : "6b306393-8bd8-43dd-8bd5-19ddb3704a32", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f7b5050a-a844-433e-9966-e6c3f352abcf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7946af4-6db8-4c29-b49d-d6bbd5ec4ed3" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae442-901e-0077-10f4-12b537000000", - "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail02145255c1ea87f88e4825Wed, 15 Apr 2020 07:04:07 GMT\"0x8D7E10B308FEA85\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "f7b5050a-a844-433e-9966-e6c3f352abcf", + "x-ms-request-id" : "2afe3f37-c01e-007c-6e69-55bf7d000000", + "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail098841f7830f48d1e44e16Wed, 08 Jul 2020 20:54:03 GMT\"0x8D823810C0D84E9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:54:05 GMT", + "x-ms-client-request-id" : "f7946af4-6db8-4c29-b49d-d6bbd5ec4ed3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail02145255c1ea87f88e4825?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail098841f7830f48d1e44e16?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a4b81f21-e75a-4319-8f66-baacdfbf7f1c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b0c429e-5386-42cc-afc3-f163ea169dc4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae454-901e-0077-1bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "a4b81f21-e75a-4319-8f66-baacdfbf7f1c" + "x-ms-request-id" : "c297d554-501e-0041-2769-55c966000000", + "Date" : "Wed, 08 Jul 2020 20:54:05 GMT", + "x-ms-client-request-id" : "3b0c429e-5386-42cc-afc3-f163ea169dc4" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseacfail02145255c1ea87f88e4825", "javablobchangeblobleaseacfail1061530918a03590ed49", "97005e2b-d651-4f10-8240-5c80c013d60b" ] + "variables" : [ "jtcchangeblobleaseacfail098841f7830f48d1e44e16", "javablobchangeblobleaseacfail18682069e0dbbb029146", "c1d917b8-bb62-47cc-a9a6-e52f6f078dde" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[1].json index 1382071601ae..e573639a677f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[1].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail030111b80ddb83e1844fe4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail049725b5466755f7a44fc2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "37c9ebc6-7fd7-430c-aa17-c06d40f28d6a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fbd59a27-61a8-48df-94fb-990e57c8c99b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B30BFB88D", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "ETag" : "0x8D823810DD915E6", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae461-901e-0077-26f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "37c9ebc6-7fd7-430c-aa17-c06d40f28d6a" + "x-ms-request-id" : "f944bebc-701e-0069-6169-55a8ce000000", + "Date" : "Wed, 08 Jul 2020 20:54:06 GMT", + "x-ms-client-request-id" : "fbd59a27-61a8-48df-94fb-990e57c8c99b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail030111b80ddb83e1844fe4/javablobchangeblobleaseacfail111677e9c59f28f22743", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail049725b5466755f7a44fc2/javablobchangeblobleaseacfail175040b43807034ad944", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b9938d9d-cea4-46fe-915f-116247df5bad", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "63afeb17-5055-4542-8bf3-9d9bc67d47ac", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "x-ms-version-id" : "2020-07-08T20:54:06.6695015Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:06 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", + "Date" : "Wed, 08 Jul 2020 20:54:06 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B30C9963F", + "ETag" : "0x8D823810E115367", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae464-901e-0077-28f4-12b537000000", - "x-ms-client-request-id" : "b9938d9d-cea4-46fe-915f-116247df5bad" + "x-ms-request-id" : "bfe4811d-d01e-002d-5569-5522f1000000", + "x-ms-client-request-id" : "63afeb17-5055-4542-8bf3-9d9bc67d47ac" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail030111b80ddb83e1844fe4/javablobchangeblobleaseacfail111677e9c59f28f22743?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail049725b5466755f7a44fc2/javablobchangeblobleaseacfail175040b43807034ad944?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2d370a58-f15e-4a61-bc2e-00fc6492de5d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6bd761af-ec64-4d7d-9a79-8de8ed646fdb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B30C9963F", - "x-ms-lease-id" : "5a703d7f-64ef-468a-83f7-edef139a92c8", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "ETag" : "0x8D823810E115367", + "x-ms-lease-id" : "4c3541ca-1b32-4f54-99bf-ffa8796fa698", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae46e-901e-0077-2df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "2d370a58-f15e-4a61-bc2e-00fc6492de5d" + "x-ms-request-id" : "60ea14ce-a01e-0055-6469-558109000000", + "Date" : "Wed, 08 Jul 2020 20:54:06 GMT", + "x-ms-client-request-id" : "6bd761af-ec64-4d7d-9a79-8de8ed646fdb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail030111b80ddb83e1844fe4/javablobchangeblobleaseacfail111677e9c59f28f22743?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail049725b5466755f7a44fc2/javablobchangeblobleaseacfail175040b43807034ad944?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "43df3c27-8ca6-458b-90e3-f79632a3badd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7ead598-8d19-4905-9b63-c2363789fcef" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ae47c-901e-0077-36f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ae47c-901e-0077-36f4-12b537000000\nTime:2020-04-15T07:04:07.6576882Z", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "43df3c27-8ca6-458b-90e3-f79632a3badd", + "x-ms-request-id" : "ecf14ee6-601e-0091-0369-55f430000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:ecf14ee6-601e-0091-0369-55f430000000\nTime:2020-07-08T20:54:07.3635617Z", + "Date" : "Wed, 08 Jul 2020 20:54:07 GMT", + "x-ms-client-request-id" : "a7ead598-8d19-4905-9b63-c2363789fcef", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2a9a0e87-234d-4781-b86d-9d2617fc34ff" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff5b80d9-b4ea-4f96-bfeb-e9caebaa11a9" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae481-901e-0077-3af4-12b537000000", - "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail030111b80ddb83e1844fe4Wed, 15 Apr 2020 07:04:07 GMT\"0x8D7E10B30BFB88D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "2a9a0e87-234d-4781-b86d-9d2617fc34ff", + "x-ms-request-id" : "c9a78b09-801e-007d-2469-55e0a1000000", + "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail049725b5466755f7a44fc2Wed, 08 Jul 2020 20:54:06 GMT\"0x8D823810DD915E6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:54:06 GMT", + "x-ms-client-request-id" : "ff5b80d9-b4ea-4f96-bfeb-e9caebaa11a9", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail030111b80ddb83e1844fe4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail049725b5466755f7a44fc2?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a2ccdb16-3416-4a0c-aa17-c1bf632abd73" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e32ff21b-6316-4d29-ade2-5ca671b1c6a5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae487-901e-0077-3ff4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "a2ccdb16-3416-4a0c-aa17-c1bf632abd73" + "x-ms-request-id" : "0a91a58d-701e-00a2-3f69-55ab9b000000", + "Date" : "Wed, 08 Jul 2020 20:54:07 GMT", + "x-ms-client-request-id" : "e32ff21b-6316-4d29-ade2-5ca671b1c6a5" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseacfail030111b80ddb83e1844fe4", "javablobchangeblobleaseacfail111677e9c59f28f22743", "9cf8003d-875a-4ab4-862a-305988eb8452" ] + "variables" : [ "jtcchangeblobleaseacfail049725b5466755f7a44fc2", "javablobchangeblobleaseacfail175040b43807034ad944", "30ea5b6c-aeb7-4e9f-9f37-bab66de0ae43" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[2].json index 1d4c4d0e604f..d6ed72466aa5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[2].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail015587f99f9301f3594e93?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0244307db4e8dfa72b4aca?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "24ff0ab8-d74f-4392-8550-eab98f1d2b9a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d11b4a83-b8f0-48b6-bca4-535d1e55aabe" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B30EF5F83", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "ETag" : "0x8D823810F23C1E6", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae48d-901e-0077-44f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", - "x-ms-client-request-id" : "24ff0ab8-d74f-4392-8550-eab98f1d2b9a" + "x-ms-request-id" : "5a4fdb61-301e-00a3-4669-55f447000000", + "Date" : "Wed, 08 Jul 2020 20:54:08 GMT", + "x-ms-client-request-id" : "d11b4a83-b8f0-48b6-bca4-535d1e55aabe" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail015587f99f9301f3594e93/javablobchangeblobleaseacfail18517688542ee406304d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0244307db4e8dfa72b4aca/javablobchangeblobleaseacfail1841124f774d90e5c546", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "489f5d52-7079-4171-8e67-0bf6cc2f6a5a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1d718219-4dda-4093-b3a4-ba15f48c0018", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "x-ms-version-id" : "2020-07-08T20:54:08.8470485Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:08 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:06 GMT", + "Date" : "Wed, 08 Jul 2020 20:54:08 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B30FD83F2", + "ETag" : "0x8D823810F5D97D5", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae4a2-901e-0077-51f4-12b537000000", - "x-ms-client-request-id" : "489f5d52-7079-4171-8e67-0bf6cc2f6a5a" + "x-ms-request-id" : "f85121a5-101e-00a4-1469-559824000000", + "x-ms-client-request-id" : "1d718219-4dda-4093-b3a4-ba15f48c0018" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail015587f99f9301f3594e93/javablobchangeblobleaseacfail18517688542ee406304d?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0244307db4e8dfa72b4aca/javablobchangeblobleaseacfail1841124f774d90e5c546?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "97d4e49a-e5c0-40df-834d-a5937fa663e7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b5dc077-4cc5-4036-aef6-3a0b1cdf4fe7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B30FD83F2", - "x-ms-lease-id" : "d270e79e-31d8-40c9-8c75-f21ae68e2e10", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:07 GMT", + "ETag" : "0x8D823810F5D97D5", + "x-ms-lease-id" : "1b0603d9-8897-4399-8681-93fc50975053", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae4a9-901e-0077-57f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "97d4e49a-e5c0-40df-834d-a5937fa663e7" + "x-ms-request-id" : "bc5387a6-501e-00a5-4569-55c7f8000000", + "Date" : "Wed, 08 Jul 2020 20:54:09 GMT", + "x-ms-client-request-id" : "6b5dc077-4cc5-4036-aef6-3a0b1cdf4fe7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail015587f99f9301f3594e93/javablobchangeblobleaseacfail18517688542ee406304d?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0244307db4e8dfa72b4aca/javablobchangeblobleaseacfail1841124f774d90e5c546?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a21e8738-f45f-42fe-a495-3d893b85d574" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4429afd3-d236-4440-a238-0fe4ff023f8d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ae4b8-901e-0077-63f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ae4b8-901e-0077-63f4-12b537000000\nTime:2020-04-15T07:04:07.9950048Z", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "a21e8738-f45f-42fe-a495-3d893b85d574", + "x-ms-request-id" : "17ca9ef3-801e-00a6-3b69-55269c000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:17ca9ef3-801e-00a6-3b69-55269c000000\nTime:2020-07-08T20:54:09.5370010Z", + "Date" : "Wed, 08 Jul 2020 20:54:09 GMT", + "x-ms-client-request-id" : "4429afd3-d236-4440-a238-0fe4ff023f8d", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "252f1ecc-47b6-4f5a-bbd0-dc37b9aa1092" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0f6d75e-1002-426a-befa-2336914c30ca" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae4c2-901e-0077-6bf4-12b537000000", - "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail015587f99f9301f3594e93Wed, 15 Apr 2020 07:04:07 GMT\"0x8D7E10B30EF5F83\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "252f1ecc-47b6-4f5a-bbd0-dc37b9aa1092", + "x-ms-request-id" : "08a69290-c01e-00a7-0569-557940000000", + "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail0244307db4e8dfa72b4acaWed, 08 Jul 2020 20:54:08 GMT\"0x8D823810F23C1E6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:54:09 GMT", + "x-ms-client-request-id" : "a0f6d75e-1002-426a-befa-2336914c30ca", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail015587f99f9301f3594e93?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0244307db4e8dfa72b4aca?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2da3c12c-86f0-4f02-a1c5-c3e5871bd8e6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7e9951e-4931-4121-b31b-705504b3135e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae4df-901e-0077-02f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "2da3c12c-86f0-4f02-a1c5-c3e5871bd8e6" + "x-ms-request-id" : "7ddda053-001e-002e-7069-55c395000000", + "Date" : "Wed, 08 Jul 2020 20:54:09 GMT", + "x-ms-client-request-id" : "c7e9951e-4931-4121-b31b-705504b3135e" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseacfail015587f99f9301f3594e93", "javablobchangeblobleaseacfail18517688542ee406304d", "d1e64335-7846-4d59-8fe9-be59318a69e9" ] + "variables" : [ "jtcchangeblobleaseacfail0244307db4e8dfa72b4aca", "javablobchangeblobleaseacfail1841124f774d90e5c546", "33992ba2-dc7c-4613-a4b9-12407677f343" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[3].json index cd35cb4173d5..444351e6751b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[3].json @@ -1,123 +1,125 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0365808d5eeb1a3b4449c3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail067183bd1bb4e759e24d93?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d17a0920-f7da-4cfb-b0ec-05d1ec503ee7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37be12e1-4a51-4bc8-acd6-001ecdcd40c2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B3121ED62", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:08 GMT", + "ETag" : "0x8D823811070F863", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:10 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae4e9-901e-0077-0bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "d17a0920-f7da-4cfb-b0ec-05d1ec503ee7" + "x-ms-request-id" : "042fa710-a01e-006a-2e69-5549aa000000", + "Date" : "Wed, 08 Jul 2020 20:54:10 GMT", + "x-ms-client-request-id" : "37be12e1-4a51-4bc8-acd6-001ecdcd40c2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0365808d5eeb1a3b4449c3/javablobchangeblobleaseacfail179123b8ed1015936947", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail067183bd1bb4e759e24d93/javablobchangeblobleaseacfail1818069e0a20c0757d49", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b628b02c-b347-41e6-a861-6ca224619925", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "03ee99de-0bb3-47a3-9595-fc933fac0be5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:08 GMT", + "x-ms-version-id" : "2020-07-08T20:54:11.0055903Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", + "Date" : "Wed, 08 Jul 2020 20:54:10 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B3129F5B6", + "ETag" : "0x8D8238110A6F5DF", "Content-Length" : "0", - "x-ms-request-id" : "cc6ae4f3-901e-0077-13f4-12b537000000", - "x-ms-client-request-id" : "b628b02c-b347-41e6-a861-6ca224619925" + "x-ms-request-id" : "7a5a2c35-101e-007f-5769-555e19000000", + "x-ms-client-request-id" : "03ee99de-0bb3-47a3-9595-fc933fac0be5" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0365808d5eeb1a3b4449c3/javablobchangeblobleaseacfail179123b8ed1015936947", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail067183bd1bb4e759e24d93/javablobchangeblobleaseacfail1818069e0a20c0757d49", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4043ac3d-f47e-4f24-affa-02894ec38a72" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec32ff11-c6b8-444b-beb9-2a9bcbd9fcc9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:08 GMT", + "x-ms-version-id" : "2020-07-08T20:54:11.0055903Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:11 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", + "Date" : "Wed, 08 Jul 2020 20:54:11 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B3129F5B6", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:04:08 GMT", + "ETag" : "0x8D8238110A6F5DF", + "x-ms-creation-time" : "Wed, 08 Jul 2020 20:54:11 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ae4fa-901e-0077-19f4-12b537000000", - "x-ms-client-request-id" : "4043ac3d-f47e-4f24-affa-02894ec38a72", + "x-ms-request-id" : "5218bdd8-701e-001b-2d69-55af81000000", + "x-ms-client-request-id" : "ec32ff11-c6b8-444b-beb9-2a9bcbd9fcc9", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0365808d5eeb1a3b4449c3/javablobchangeblobleaseacfail179123b8ed1015936947?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail067183bd1bb4e759e24d93/javablobchangeblobleaseacfail1818069e0a20c0757d49?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f4945884-e8ae-4757-87a5-3775f4bed3e1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4fb8a9d-9f1f-40c1-9294-ac224375bb9b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B3129F5B6", - "x-ms-lease-id" : "25d82bce-a1e1-4bd4-afbf-768b0012ae9e", - "Last-Modified" : "Wed, 15 Apr 2020 07:04:08 GMT", + "ETag" : "0x8D8238110A6F5DF", + "x-ms-lease-id" : "21a40ffe-63d7-465b-9672-9d43b9891bf5", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ae502-901e-0077-1ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "f4945884-e8ae-4757-87a5-3775f4bed3e1" + "x-ms-request-id" : "9a1b3be2-e01e-006b-5e69-551676000000", + "Date" : "Wed, 08 Jul 2020 20:54:11 GMT", + "x-ms-client-request-id" : "e4fb8a9d-9f1f-40c1-9294-ac224375bb9b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0365808d5eeb1a3b4449c3/javablobchangeblobleaseacfail179123b8ed1015936947?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail067183bd1bb4e759e24d93/javablobchangeblobleaseacfail1818069e0a20c0757d49?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5292bd1e-936b-4959-9a56-3cf8c1f7a56a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "726513be-754f-4845-8ba8-d840c2c2636f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ae50e-901e-0077-27f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ae50e-901e-0077-27f4-12b537000000\nTime:2020-04-15T07:04:08.3123031Z", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "5292bd1e-936b-4959-9a56-3cf8c1f7a56a", + "x-ms-request-id" : "4073496a-301e-0057-2e69-553fb1000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:4073496a-301e-0057-2e69-553fb1000000\nTime:2020-07-08T20:54:12.1023425Z", + "Date" : "Wed, 08 Jul 2020 20:54:11 GMT", + "x-ms-client-request-id" : "726513be-754f-4845-8ba8-d840c2c2636f", "Content-Type" : "application/xml" }, "Exception" : null @@ -125,43 +127,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1507ac9d-69b3-4803-ac72-4dbd02ff8ed5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3ebe1be-9881-4ff3-87c9-8fef8012b90a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ae519-901e-0077-2ff4-12b537000000", - "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail0365808d5eeb1a3b4449c3Wed, 15 Apr 2020 07:04:08 GMT\"0x8D7E10B3121ED62\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "1507ac9d-69b3-4803-ac72-4dbd02ff8ed5", + "x-ms-request-id" : "6df92e74-f01e-0093-6e69-554a88000000", + "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail067183bd1bb4e759e24d93Wed, 08 Jul 2020 20:54:10 GMT\"0x8D823811070F863\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:54:12 GMT", + "x-ms-client-request-id" : "b3ebe1be-9881-4ff3-87c9-8fef8012b90a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0365808d5eeb1a3b4449c3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail067183bd1bb4e759e24d93?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "49ade645-cdd8-48bd-a0ed-e87f3fb4217f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82f1080a-6b50-4210-b57e-22fe66d46268" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ae525-901e-0077-39f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:04:07 GMT", - "x-ms-client-request-id" : "49ade645-cdd8-48bd-a0ed-e87f3fb4217f" + "x-ms-request-id" : "d1e98d8f-601e-0007-2469-55fde1000000", + "Date" : "Wed, 08 Jul 2020 20:54:12 GMT", + "x-ms-client-request-id" : "82f1080a-6b50-4210-b57e-22fe66d46268" }, "Exception" : null } ], - "variables" : [ "jtcchangeblobleaseacfail0365808d5eeb1a3b4449c3", "javablobchangeblobleaseacfail179123b8ed1015936947", "50a5e61c-e467-4547-8e8f-42af4b714fc9" ] + "variables" : [ "jtcchangeblobleaseacfail067183bd1bb4e759e24d93", "javablobchangeblobleaseacfail1818069e0a20c0757d49", "1f040eb2-509f-411f-b2f3-614be46c3db0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[4].json new file mode 100644 index 000000000000..79fd92c4e273 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestchangeblobleaseacfail[4].json @@ -0,0 +1,135 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0857631372dc56766744d4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eee2beb3-e3c9-4f9e-bd61-b3dcc6abc0f2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8238111F4C90D", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "137b307a-f01e-0058-4469-5549dd000000", + "Date" : "Wed, 08 Jul 2020 20:54:12 GMT", + "x-ms-client-request-id" : "eee2beb3-e3c9-4f9e-bd61-b3dcc6abc0f2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0857631372dc56766744d4/javablobchangeblobleaseacfail153153fe4ef97c3c644e", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4a8acd0-1447-460d-85f0-2bdf949c5769", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-08T20:54:13.5694268Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:13 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 08 Jul 2020 20:54:13 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82381122E2BBC", + "Content-Length" : "0", + "x-ms-request-id" : "2610fe43-201e-0080-6369-556e84000000", + "x-ms-client-request-id" : "b4a8acd0-1447-460d-85f0-2bdf949c5769" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0857631372dc56766744d4/javablobchangeblobleaseacfail153153fe4ef97c3c644e?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b16d52b0-809c-4446-9937-2beb34e9f08b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82381122E2BBC", + "x-ms-lease-id" : "0fa4c3ba-73df-42ca-b764-101a414e8c32", + "Last-Modified" : "Wed, 08 Jul 2020 20:54:13 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ab6740cd-a01e-0008-4b69-558b8d000000", + "Date" : "Wed, 08 Jul 2020 20:54:13 GMT", + "x-ms-client-request-id" : "b16d52b0-809c-4446-9937-2beb34e9f08b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0857631372dc56766744d4/javablobchangeblobleaseacfail153153fe4ef97c3c644e?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82273fe0-3e56-4aa2-bf93-a939bc662534" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "ae82323b-501e-001c-5a69-55c3e2000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:ae82323b-501e-001c-5a69-55c3e2000000\nTime:2020-07-08T20:54:14.2663456Z", + "Date" : "Wed, 08 Jul 2020 20:54:14 GMT", + "x-ms-client-request-id" : "82273fe0-3e56-4aa2-bf93-a939bc662534", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcchangeblobleaseacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e9ebc1a4-fa08-40ed-8dfa-a9e21cd40036" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "438de1c9-d01e-0094-2169-5526eb000000", + "Body" : "jtcchangeblobleaseacfailjtcchangeblobleaseacfail0857631372dc56766744d4Wed, 08 Jul 2020 20:54:13 GMT\"0x8D8238111F4C90D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:54:14 GMT", + "x-ms-client-request-id" : "e9ebc1a4-fa08-40ed-8dfa-a9e21cd40036", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcchangeblobleaseacfail0857631372dc56766744d4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8d0f768-8638-40dd-89fc-b7276f362410" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a19ee1a3-c01e-006c-4569-557a15000000", + "Date" : "Wed, 08 Jul 2020 20:54:14 GMT", + "x-ms-client-request-id" : "c8d0f768-8638-40dd-89fc-b7276f362410" + }, + "Exception" : null + } ], + "variables" : [ "jtcchangeblobleaseacfail0857631372dc56766744d4", "javablobchangeblobleaseacfail153153fe4ef97c3c644e", "4de6dfe0-589d-4db0-8b5f-803e1cbdeac4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[0].json index 57ebb495f15b..7052c08f3eed 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[0].json @@ -1,134 +1,153 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaca8979452c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac479997840?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eb3777f6-f7d1-44fb-800e-3744fbb9fe0a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0790b577-e70e-4d2e-b6ad-0d8c9fbf9fa8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B292FFFFC", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:54 GMT", + "ETag" : "0x8D82380B5A2C3BF", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad867-901e-0077-6bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:53 GMT", - "x-ms-client-request-id" : "eb3777f6-f7d1-44fb-800e-3744fbb9fe0a" + "x-ms-request-id" : "c90c50dd-a01e-0018-5d69-554ee5000000", + "Date" : "Wed, 08 Jul 2020 20:51:37 GMT", + "x-ms-client-request-id" : "0790b577-e70e-4d2e-b6ad-0d8c9fbf9fa8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaca8979452c/javablobreleaseblobleaseac1280989063c9091cf34ec", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac479997840/javablobreleaseblobleaseac158469d6508300861847a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b9248c5b-23cb-47c9-b735-acc563c725ab", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fcb04856-906a-427d-a93f-4fd3d64d3a44", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:54 GMT", + "x-ms-version-id" : "2020-07-08T20:51:39.1160163Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:39 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:53 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:38 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B29385A2C", + "ETag" : "0x8D82380B61E7363", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad875-901e-0077-76f4-12b537000000", - "x-ms-client-request-id" : "b9248c5b-23cb-47c9-b735-acc563c725ab" + "x-ms-request-id" : "711984cc-e01e-0054-4c69-55ded5000000", + "x-ms-client-request-id" : "fcb04856-906a-427d-a93f-4fd3d64d3a44" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaca8979452c/javablobreleaseblobleaseac1280989063c9091cf34ec?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac479997840/javablobreleaseblobleaseac158469d6508300861847a?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2d6cda7d-832e-4ff2-9935-044204b2ddbb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5f4a2d2-5c0c-420f-8ca7-5889ea790f40", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B29385A2C", - "x-ms-lease-id" : "c295057f-3395-4aef-9612-ff4b5bc2b9ae", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:54 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0a3dcf5e-301e-0068-7769-55f712000000", + "Date" : "Wed, 08 Jul 2020 20:51:39 GMT", + "x-ms-client-request-id" : "e5f4a2d2-5c0c-420f-8ca7-5889ea790f40" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac479997840/javablobreleaseblobleaseac158469d6508300861847a?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9081c8a4-de55-47ee-8794-fff99ac8101a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380B61E7363", + "x-ms-lease-id" : "4fe0a79b-e450-4d91-849d-098b61ae036a", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad87c-901e-0077-7df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:53 GMT", - "x-ms-client-request-id" : "2d6cda7d-832e-4ff2-9935-044204b2ddbb" + "x-ms-request-id" : "ba46ea03-201e-0090-1369-55abec000000", + "Date" : "Wed, 08 Jul 2020 20:51:39 GMT", + "x-ms-client-request-id" : "9081c8a4-de55-47ee-8794-fff99ac8101a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaca8979452c/javablobreleaseblobleaseac1280989063c9091cf34ec?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac479997840/javablobreleaseblobleaseac158469d6508300861847a?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3aed46d4-16ea-4425-8c75-aa75989a81ef" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b1a74c53-5820-4bef-a313-f20313102c23" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B29385A2C", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:54 GMT", + "ETag" : "0x8D82380B61E7363", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad88a-901e-0077-08f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "3aed46d4-16ea-4425-8c75-aa75989a81ef" + "x-ms-request-id" : "fd60c0b5-b01e-0004-5f69-551c85000000", + "Date" : "Wed, 08 Jul 2020 20:51:39 GMT", + "x-ms-client-request-id" : "b1a74c53-5820-4bef-a313-f20313102c23" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bc43c1c6-ab65-474c-9abd-817538b72063" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa07020c-850c-455b-8207-a51b23d1f6bd" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad8a1-901e-0077-1bf4-12b537000000", - "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseaca8979452cWed, 15 Apr 2020 07:03:54 GMT\"0x8D7E10B292FFFFC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "bc43c1c6-ab65-474c-9abd-817538b72063", + "x-ms-request-id" : "c108168f-a01e-0037-6669-55432e000000", + "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseac479997840Wed, 08 Jul 2020 20:51:38 GMT\"0x8D82380B5A2C3BF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:40 GMT", + "x-ms-client-request-id" : "fa07020c-850c-455b-8207-a51b23d1f6bd", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaca8979452c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac479997840?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "217c93cf-1fd8-4ec8-99d9-b3aa17b6c8fd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d72a0954-86ab-43a4-af26-db481e3dec84" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad8bc-901e-0077-31f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "217c93cf-1fd8-4ec8-99d9-b3aa17b6c8fd" + "x-ms-request-id" : "1dc206fb-101e-009b-1869-555087000000", + "Date" : "Wed, 08 Jul 2020 20:51:41 GMT", + "x-ms-client-request-id" : "d72a0954-86ab-43a4-af26-db481e3dec84" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaca8979452c", "javablobreleaseblobleaseac1280989063c9091cf34ec" ] + "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac479997840", "javablobreleaseblobleaseac158469d6508300861847a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[1].json index aea75e6f4ee8..627b35052d49 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[1].json @@ -1,134 +1,153 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac0c569995f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac81a757565?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f1949bce-43c9-469c-90d0-21ddf64e1157" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac0ef8e4-9391-45ee-ab97-407236ed3b1c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B297C5DBE", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:55 GMT", + "ETag" : "0x8D82380B7BD6B0C", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad8ef-901e-0077-5bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "f1949bce-43c9-469c-90d0-21ddf64e1157" + "x-ms-request-id" : "448b1749-001e-0073-6a69-55c911000000", + "Date" : "Wed, 08 Jul 2020 20:51:40 GMT", + "x-ms-client-request-id" : "ac0ef8e4-9391-45ee-ab97-407236ed3b1c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac0c569995f/javablobreleaseblobleaseac1292307c14850a83b1433", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac81a757565/javablobreleaseblobleaseac109056db1a5ff6f2504eb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e9798b4b-aebc-47fd-8f4b-a01e3903e2f5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "36b2c87e-63e2-4a43-b89c-0ad43ba3285b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:55 GMT", + "x-ms-version-id" : "2020-07-08T20:51:42.1742023Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:42 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:41 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B29857B29", + "ETag" : "0x8D82380B7F0F0B2", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad8f8-901e-0077-62f4-12b537000000", - "x-ms-client-request-id" : "e9798b4b-aebc-47fd-8f4b-a01e3903e2f5" + "x-ms-request-id" : "c4720d46-501e-0023-2d69-550b41000000", + "x-ms-client-request-id" : "36b2c87e-63e2-4a43-b89c-0ad43ba3285b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac0c569995f/javablobreleaseblobleaseac1292307c14850a83b1433?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac81a757565/javablobreleaseblobleaseac109056db1a5ff6f2504eb?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7009cc90-dc32-4d7b-b83d-33504ed0a72d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e61bba72-3b12-4740-8689-25b12b8eb2a7", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B29857B29", - "x-ms-lease-id" : "1140fc6b-5bdf-4f03-962f-ae4f0624f53b", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:55 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "77677ef8-801e-000f-2d69-55e7ee000000", + "Date" : "Wed, 08 Jul 2020 20:51:42 GMT", + "x-ms-client-request-id" : "e61bba72-3b12-4740-8689-25b12b8eb2a7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac81a757565/javablobreleaseblobleaseac109056db1a5ff6f2504eb?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "70574f2b-beee-4ee0-a8ce-8e4e15d2a647" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380B7F0F0B2", + "x-ms-lease-id" : "9969892d-f4a3-4881-b621-2854e0fa06d1", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad903-901e-0077-6cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "7009cc90-dc32-4d7b-b83d-33504ed0a72d" + "x-ms-request-id" : "995adddf-401e-00a9-3869-5550f0000000", + "Date" : "Wed, 08 Jul 2020 20:51:42 GMT", + "x-ms-client-request-id" : "70574f2b-beee-4ee0-a8ce-8e4e15d2a647" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac0c569995f/javablobreleaseblobleaseac1292307c14850a83b1433?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac81a757565/javablobreleaseblobleaseac109056db1a5ff6f2504eb?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2777f78d-34db-4f7b-b892-affe3499c5bc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd58f563-f513-48eb-820f-e77e18847ec6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B29857B29", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:55 GMT", + "ETag" : "0x8D82380B7F0F0B2", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad919-901e-0077-7ff4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "2777f78d-34db-4f7b-b892-affe3499c5bc" + "x-ms-request-id" : "78bbbc87-e01e-00a0-3e69-551523000000", + "Date" : "Wed, 08 Jul 2020 20:51:43 GMT", + "x-ms-client-request-id" : "bd58f563-f513-48eb-820f-e77e18847ec6" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "78250602-c7f1-4726-850e-2af197a5249c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29e30549-081d-4c80-a383-0f4d7ab0a335" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad926-901e-0077-09f4-12b537000000", - "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseac0c569995fWed, 15 Apr 2020 07:03:55 GMT\"0x8D7E10B297C5DBE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "78250602-c7f1-4726-850e-2af197a5249c", + "x-ms-request-id" : "d66588eb-c01e-0098-3569-55b1e3000000", + "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseac81a757565Wed, 08 Jul 2020 20:51:41 GMT\"0x8D82380B7BD6B0C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:43 GMT", + "x-ms-client-request-id" : "29e30549-081d-4c80-a383-0f4d7ab0a335", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac0c569995f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac81a757565?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "64b0720b-5d05-465a-b9b8-af92ca904684" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "72ac7ba6-c053-4b73-a70c-5b3cb525de5b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad92c-901e-0077-0ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "64b0720b-5d05-465a-b9b8-af92ca904684" + "x-ms-request-id" : "b37d3e26-701e-0034-1469-55a24a000000", + "Date" : "Wed, 08 Jul 2020 20:51:43 GMT", + "x-ms-client-request-id" : "72ac7ba6-c053-4b73-a70c-5b3cb525de5b" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac0c569995f", "javablobreleaseblobleaseac1292307c14850a83b1433" ] + "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac81a757565", "javablobreleaseblobleaseac109056db1a5ff6f2504eb" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[2].json index 5ba80e7f45d8..eb5fb74d9655 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[2].json @@ -1,134 +1,153 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac4ad38198a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseacfbe22722c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "986dfd0c-2089-43cf-8a58-7dc181c6a7b9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a49dd13-63cd-49be-8ffc-8a11109df243" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B29D31E2F", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:55 GMT", + "ETag" : "0x8D82380B9315285", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad94f-901e-0077-2cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:54 GMT", - "x-ms-client-request-id" : "986dfd0c-2089-43cf-8a58-7dc181c6a7b9" + "x-ms-request-id" : "da5e4b8e-501e-000c-7a69-55068a000000", + "Date" : "Wed, 08 Jul 2020 20:51:44 GMT", + "x-ms-client-request-id" : "6a49dd13-63cd-49be-8ffc-8a11109df243" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac4ad38198a/javablobreleaseblobleaseac1837443c69481c6e88451", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseacfbe22722c/javablobreleaseblobleaseac1886202c1d0d10119c49a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a42b376d-0bc9-4af1-a5d6-49030ba3c004", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8fd9753-02e9-4917-9ca6-e8b300b6897d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:55 GMT", + "x-ms-version-id" : "2020-07-08T20:51:44.6019403Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:44 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:44 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B29DBED3D", + "ETag" : "0x8D82380B963894B", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad956-901e-0077-31f4-12b537000000", - "x-ms-client-request-id" : "a42b376d-0bc9-4af1-a5d6-49030ba3c004" + "x-ms-request-id" : "215db44c-301e-0035-2469-55fd96000000", + "x-ms-client-request-id" : "c8fd9753-02e9-4917-9ca6-e8b300b6897d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac4ad38198a/javablobreleaseblobleaseac1837443c69481c6e88451?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseacfbe22722c/javablobreleaseblobleaseac1886202c1d0d10119c49a?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "921b6fb6-36c3-41a0-8827-68005394f443" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dcc23c6f-8479-44e0-84b2-6b10cc4c4d42", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B29DBED3D", - "x-ms-lease-id" : "f5cac652-142b-44b6-98fe-b069ca6ab8a2", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:55 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "42dd6e3a-b01e-0049-2269-55d369000000", + "Date" : "Wed, 08 Jul 2020 20:51:44 GMT", + "x-ms-client-request-id" : "dcc23c6f-8479-44e0-84b2-6b10cc4c4d42" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseacfbe22722c/javablobreleaseblobleaseac1886202c1d0d10119c49a?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2d5751d9-a1cd-482c-8bd2-8bd59d42c348" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380B963894B", + "x-ms-lease-id" : "a2056ba0-6d57-403c-9cd8-e7d47d5c1735", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad962-901e-0077-39f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "921b6fb6-36c3-41a0-8827-68005394f443" + "x-ms-request-id" : "1f520346-c01e-0021-4269-55b5f9000000", + "Date" : "Wed, 08 Jul 2020 20:51:45 GMT", + "x-ms-client-request-id" : "2d5751d9-a1cd-482c-8bd2-8bd59d42c348" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac4ad38198a/javablobreleaseblobleaseac1837443c69481c6e88451?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseacfbe22722c/javablobreleaseblobleaseac1886202c1d0d10119c49a?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e9ce19ac-5bef-4026-8833-027413683601" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65be9429-3ead-473f-81db-58b699d51ee4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B29DBED3D", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:55 GMT", + "ETag" : "0x8D82380B963894B", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad96a-901e-0077-3ff4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "e9ce19ac-5bef-4026-8833-027413683601" + "x-ms-request-id" : "23dbdead-801e-0099-7969-55ee3f000000", + "Date" : "Wed, 08 Jul 2020 20:51:45 GMT", + "x-ms-client-request-id" : "65be9429-3ead-473f-81db-58b699d51ee4" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aaa7b687-d752-4153-b5a6-321d529617af" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7cf530c1-e014-4692-9291-28c8bff90643" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad981-901e-0077-51f4-12b537000000", - "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseac4ad38198aWed, 15 Apr 2020 07:03:55 GMT\"0x8D7E10B29D31E2F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "aaa7b687-d752-4153-b5a6-321d529617af", + "x-ms-request-id" : "fcdb4bdb-901e-0085-0769-55bc5f000000", + "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseacfbe22722cWed, 08 Jul 2020 20:51:44 GMT\"0x8D82380B9315285\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:45 GMT", + "x-ms-client-request-id" : "7cf530c1-e014-4692-9291-28c8bff90643", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac4ad38198a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseacfbe22722c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "38706b37-9826-4284-82ec-77d2a68a68f6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c04b0a9c-759a-4b6b-8019-c1065f7a33c5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad98d-901e-0077-5bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "38706b37-9826-4284-82ec-77d2a68a68f6" + "x-ms-request-id" : "c727fe78-101e-000d-3669-555956000000", + "Date" : "Wed, 08 Jul 2020 20:51:46 GMT", + "x-ms-client-request-id" : "c04b0a9c-759a-4b6b-8019-c1065f7a33c5" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac4ad38198a", "javablobreleaseblobleaseac1837443c69481c6e88451" ] + "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseacfbe22722c", "javablobreleaseblobleaseac1886202c1d0d10119c49a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[3].json index e7aa38d0e452..172612b610bf 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[3].json @@ -1,166 +1,187 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac912266780?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "01cf3d92-6a86-4af2-8bff-e50ed7829525" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c18412e6-a927-4d2d-bf0c-8f833eddbf2f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A03D6CF", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "ETag" : "0x8D82380BAB25E7D", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad999-901e-0077-65f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "01cf3d92-6a86-4af2-8bff-e50ed7829525" + "x-ms-request-id" : "5c865418-901e-0071-6669-5577a9000000", + "Date" : "Wed, 08 Jul 2020 20:51:46 GMT", + "x-ms-client-request-id" : "c18412e6-a927-4d2d-bf0c-8f833eddbf2f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac912266780/javablobreleaseblobleaseac149566a81f8565033c410", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320/javablobreleaseblobleaseac159115be953b7ac7ad4c8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "90afba28-689d-42fb-8401-607014daaac9", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f6d2fee6-dd8c-4fd1-a878-a7f3723ccfc3", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "x-ms-version-id" : "2020-07-08T20:51:47.1357518Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:47 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:47 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2A0CA5D4", + "ETag" : "0x8D82380BAE62A4E", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad9a4-901e-0077-6bf4-12b537000000", - "x-ms-client-request-id" : "90afba28-689d-42fb-8401-607014daaac9" + "x-ms-request-id" : "17908357-401e-005d-0169-559b06000000", + "x-ms-client-request-id" : "f6d2fee6-dd8c-4fd1-a878-a7f3723ccfc3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320/javablobreleaseblobleaseac159115be953b7ac7ad4c8?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5878087c-abd0-47b8-b409-45d162307d47", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a80823c5-601e-004a-1569-55320d000000", + "Date" : "Wed, 08 Jul 2020 20:51:47 GMT", + "x-ms-client-request-id" : "5878087c-abd0-47b8-b409-45d162307d47" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac912266780/javablobreleaseblobleaseac149566a81f8565033c410", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320/javablobreleaseblobleaseac159115be953b7ac7ad4c8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6c402192-0a32-4033-b5f8-0207d8374fc8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e94f08a-1f86-40eb-91e6-cd730ef13201" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "x-ms-version-id" : "2020-07-08T20:51:47.1357518Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:47 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:47 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B2A0CA5D4", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:03:56 GMT", + "ETag" : "0x8D82380BAE62A4E", + "x-ms-creation-time" : "Wed, 08 Jul 2020 20:51:47 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ad9ae-901e-0077-75f4-12b537000000", - "x-ms-client-request-id" : "6c402192-0a32-4033-b5f8-0207d8374fc8", + "x-ms-request-id" : "5fb7baa1-501e-009a-5a69-550f5b000000", + "x-ms-client-request-id" : "2e94f08a-1f86-40eb-91e6-cd730ef13201", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac912266780/javablobreleaseblobleaseac149566a81f8565033c410?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320/javablobreleaseblobleaseac159115be953b7ac7ad4c8?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1a86b3bb-3a49-47e1-ab30-9bcc4508df17" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "055db84a-0acd-4e31-9412-22129389e88c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A0CA5D4", - "x-ms-lease-id" : "b6a143a0-5057-4b13-87b1-487fef562713", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "ETag" : "0x8D82380BAE62A4E", + "x-ms-lease-id" : "737e4bc5-3144-4065-baaa-14965fc3f178", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad9b3-901e-0077-7af4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "1a86b3bb-3a49-47e1-ab30-9bcc4508df17" + "x-ms-request-id" : "f4644a54-c01e-000e-4d69-55b832000000", + "Date" : "Wed, 08 Jul 2020 20:51:48 GMT", + "x-ms-client-request-id" : "055db84a-0acd-4e31-9412-22129389e88c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac912266780/javablobreleaseblobleaseac149566a81f8565033c410?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320/javablobreleaseblobleaseac159115be953b7ac7ad4c8?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e0a7ef7c-e808-45b7-8c54-686e9340b48e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2a1fb2e-df60-40fc-8e70-91820cf95f43" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A0CA5D4", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "ETag" : "0x8D82380BAE62A4E", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad9ba-901e-0077-7ff4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "e0a7ef7c-e808-45b7-8c54-686e9340b48e" + "x-ms-request-id" : "03c90524-e01e-0036-4069-551cf2000000", + "Date" : "Wed, 08 Jul 2020 20:51:47 GMT", + "x-ms-client-request-id" : "f2a1fb2e-df60-40fc-8e70-91820cf95f43" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1b4eb437-fc1d-4ec6-bf97-2253a0a34c55" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00b81d5f-85e0-43db-90ec-ff702c547b8b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad9c3-901e-0077-05f4-12b537000000", - "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseac912266780Wed, 15 Apr 2020 07:03:56 GMT\"0x8D7E10B2A03D6CF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "1b4eb437-fc1d-4ec6-bf97-2253a0a34c55", + "x-ms-request-id" : "d0c3a0b3-101e-0022-6d69-55549d000000", + "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320Wed, 08 Jul 2020 20:51:46 GMT\"0x8D82380BAB25E7D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:48 GMT", + "x-ms-client-request-id" : "00b81d5f-85e0-43db-90ec-ff702c547b8b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac912266780?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4644a83f-16c7-4289-93f8-05f5d8ddd5e8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c89c6eec-2899-4444-b86a-639ab86f2c3b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad9cc-901e-0077-0bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "4644a83f-16c7-4289-93f8-05f5d8ddd5e8" + "x-ms-request-id" : "c5abd018-401e-0086-4069-555d3b000000", + "Date" : "Wed, 08 Jul 2020 20:51:48 GMT", + "x-ms-client-request-id" : "c89c6eec-2899-4444-b86a-639ab86f2c3b" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac912266780", "javablobreleaseblobleaseac149566a81f8565033c410" ] + "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac38c036320", "javablobreleaseblobleaseac159115be953b7ac7ad4c8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[4].json index add99faff1ff..541dd709f0a1 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[4].json @@ -1,134 +1,153 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaccdb903945?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac88a554296?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "653e6a37-fffa-4937-809f-737648e68184" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c847ca43-cd39-4a1d-a7d8-217fc0cda090" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A3812C8", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "ETag" : "0x8D82380BC5F1DBE", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad9d5-901e-0077-14f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "653e6a37-fffa-4937-809f-737648e68184" + "x-ms-request-id" : "93449878-401e-0072-1e69-5596cd000000", + "Date" : "Wed, 08 Jul 2020 20:51:48 GMT", + "x-ms-client-request-id" : "c847ca43-cd39-4a1d-a7d8-217fc0cda090" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaccdb903945/javablobreleaseblobleaseac1650687cc04c78a3b84db", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac88a554296/javablobreleaseblobleaseac174586f98c9207ad90472", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "15e44f71-5b28-4111-9f9f-d345e0b4226a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e35fc3ec-f104-4261-957a-8d66c2f14711", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "x-ms-version-id" : "2020-07-08T20:51:49.9547735Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:49 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:49 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2A412FDF", + "ETag" : "0x8D82380BC945057", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad9df-901e-0077-1df4-12b537000000", - "x-ms-client-request-id" : "15e44f71-5b28-4111-9f9f-d345e0b4226a" + "x-ms-request-id" : "1564d35b-901e-005e-6a69-557a62000000", + "x-ms-client-request-id" : "e35fc3ec-f104-4261-957a-8d66c2f14711" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaccdb903945/javablobreleaseblobleaseac1650687cc04c78a3b84db?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac88a554296/javablobreleaseblobleaseac174586f98c9207ad90472?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "15ef68f5-b469-4dd4-9ef8-b8ebb75ccc48" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "62f4cf9a-3eb9-4635-ba22-6e38af662a01", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A412FDF", - "x-ms-lease-id" : "43158764-ea0e-46bc-a9f2-03d34e868c6d", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "ba46fda4-201e-0090-6269-55abec000000", + "Date" : "Wed, 08 Jul 2020 20:51:50 GMT", + "x-ms-client-request-id" : "62f4cf9a-3eb9-4635-ba22-6e38af662a01" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac88a554296/javablobreleaseblobleaseac174586f98c9207ad90472?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52a4f6f8-b567-4904-8a9e-046034202528" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380BC945057", + "x-ms-lease-id" : "c4bb2e62-aec9-414c-8117-5c3ade239da9", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad9e9-901e-0077-26f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "15ef68f5-b469-4dd4-9ef8-b8ebb75ccc48" + "x-ms-request-id" : "fd60d124-b01e-0004-1569-551c85000000", + "Date" : "Wed, 08 Jul 2020 20:51:49 GMT", + "x-ms-client-request-id" : "52a4f6f8-b567-4904-8a9e-046034202528" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaccdb903945/javablobreleaseblobleaseac1650687cc04c78a3b84db?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac88a554296/javablobreleaseblobleaseac174586f98c9207ad90472?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f66fb293-619e-4725-8011-9fe8ffcd74fe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "214cf0d7-894d-4ff1-83e5-50e39422af68" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A412FDF", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "ETag" : "0x8D82380BC945057", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad9ef-901e-0077-2cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "f66fb293-619e-4725-8011-9fe8ffcd74fe" + "x-ms-request-id" : "04c02240-101e-0040-3c69-5596ba000000", + "Date" : "Wed, 08 Jul 2020 20:51:50 GMT", + "x-ms-client-request-id" : "214cf0d7-894d-4ff1-83e5-50e39422af68" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f463735e-a1a0-42d5-a321-28a6a3922d56" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "99de8333-1e45-4be6-ac36-5206a1420d2f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad9f4-901e-0077-30f4-12b537000000", - "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseaccdb903945Wed, 15 Apr 2020 07:03:56 GMT\"0x8D7E10B2A3812C8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "f463735e-a1a0-42d5-a321-28a6a3922d56", + "x-ms-request-id" : "2afddd8c-c01e-007c-3d69-55bf7d000000", + "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseac88a554296Wed, 08 Jul 2020 20:51:49 GMT\"0x8D82380BC5F1DBE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:51 GMT", + "x-ms-client-request-id" : "99de8333-1e45-4be6-ac36-5206a1420d2f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaccdb903945?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac88a554296?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6b04f5a3-8c85-4cab-9720-f8540a6b74e5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a55607d-d4f0-4cdb-a459-7479018f8ec9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad9f7-901e-0077-33f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "6b04f5a3-8c85-4cab-9720-f8540a6b74e5" + "x-ms-request-id" : "448b270a-001e-0073-3269-55c911000000", + "Date" : "Wed, 08 Jul 2020 20:51:50 GMT", + "x-ms-client-request-id" : "7a55607d-d4f0-4cdb-a459-7479018f8ec9" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseaccdb903945", "javablobreleaseblobleaseac1650687cc04c78a3b84db" ] + "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac88a554296", "javablobreleaseblobleaseac174586f98c9207ad90472" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[5].json new file mode 100644 index 000000000000..618f83093ca0 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseac[5].json @@ -0,0 +1,153 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac93994504b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "121f5372-6efb-42ce-a447-69eca8ef5701" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380BDCBD584", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c47221a2-501e-0023-1269-550b41000000", + "Date" : "Wed, 08 Jul 2020 20:51:51 GMT", + "x-ms-client-request-id" : "121f5372-6efb-42ce-a447-69eca8ef5701" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac93994504b/javablobreleaseblobleaseac198033516ba37a11ea478", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed9769a3-df7d-4f9f-a638-32df0f8eb110", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-08T20:51:52.3574928Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:52 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 08 Jul 2020 20:51:52 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82380BE02F090", + "Content-Length" : "0", + "x-ms-request-id" : "776783d1-801e-000f-4969-55e7ee000000", + "x-ms-client-request-id" : "ed9769a3-df7d-4f9f-a638-32df0f8eb110" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac93994504b/javablobreleaseblobleaseac198033516ba37a11ea478?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "24f02822-c856-4e9d-a6b6-6b3a49e0ae07", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "995ae8da-401e-00a9-2e69-5550f0000000", + "Date" : "Wed, 08 Jul 2020 20:51:52 GMT", + "x-ms-client-request-id" : "24f02822-c856-4e9d-a6b6-6b3a49e0ae07" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac93994504b/javablobreleaseblobleaseac198033516ba37a11ea478?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc7f9c00-d4a6-4126-b5ef-4faba8e480b2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380BE02F090", + "x-ms-lease-id" : "1fd5b140-f2d5-45fc-a616-b523c9ef922d", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "78bbcf8a-e01e-00a0-5069-551523000000", + "Date" : "Wed, 08 Jul 2020 20:51:53 GMT", + "x-ms-client-request-id" : "bc7f9c00-d4a6-4126-b5ef-4faba8e480b2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac93994504b/javablobreleaseblobleaseac198033516ba37a11ea478?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b9e1d0e-c188-4fd6-985e-9c41b58e930a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380BE02F090", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "0a91044b-701e-00a2-4369-55ab9b000000", + "Date" : "Wed, 08 Jul 2020 20:51:53 GMT", + "x-ms-client-request-id" : "0b9e1d0e-c188-4fd6-985e-9c41b58e930a" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0b0d21f-0f00-4947-a317-933f2b4c91a3" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f84ffed3-101e-00a4-7569-559824000000", + "Body" : "jtcreleaseblobleaseacjtcreleaseblobleaseac0leaseapitestreleaseblobleaseac93994504bWed, 08 Jul 2020 20:51:51 GMT\"0x8D82380BDCBD584\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:53 GMT", + "x-ms-client-request-id" : "e0b0d21f-0f00-4947-a317-933f2b4c91a3", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac93994504b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "12669feb-8d83-4d7c-bf8d-a8ae96a7b7e6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "bc5282cb-501e-00a5-5a69-55c7f8000000", + "Date" : "Wed, 08 Jul 2020 20:51:53 GMT", + "x-ms-client-request-id" : "12669feb-8d83-4d7c-bf8d-a8ae96a7b7e6" + }, + "Exception" : null + } ], + "variables" : [ "jtcreleaseblobleaseac0leaseapitestreleaseblobleaseac93994504b", "javablobreleaseblobleaseac198033516ba37a11ea478" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[0].json index dd23fc7e48f0..8693ed15cbaa 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[0].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0130554a2a55000b7442c1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail036904ea66572d57b648a0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c9876b82-20a7-4feb-aa90-87ba290e84a3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d6421c6a-7bd1-47b4-9996-108ae28ee0d0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A66F640", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "ETag" : "0x8D82380C638E715", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ada05-901e-0077-3ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", - "x-ms-client-request-id" : "c9876b82-20a7-4feb-aa90-87ba290e84a3" + "x-ms-request-id" : "261060cd-201e-0080-1469-556e84000000", + "Date" : "Wed, 08 Jul 2020 20:52:05 GMT", + "x-ms-client-request-id" : "d6421c6a-7bd1-47b4-9996-108ae28ee0d0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0130554a2a55000b7442c1/javablobreleaseblobleaseacfail1906283ebdb7b759094", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail036904ea66572d57b648a0/javablobreleaseblobleaseacfail137793bbcac0e4b9584", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c4085787-bc3a-4aa8-991d-47919a661ec5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3de6aa68-0ef6-4c26-835e-eb7f8bc6c14e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "x-ms-version-id" : "2020-07-08T20:52:06.7768079Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:06 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:55 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:06 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2A6FC50F", + "ETag" : "0x8D82380C69B270F", "Content-Length" : "0", - "x-ms-request-id" : "cc6ada14-901e-0077-4af4-12b537000000", - "x-ms-client-request-id" : "c4085787-bc3a-4aa8-991d-47919a661ec5" + "x-ms-request-id" : "ab66cf1d-a01e-0008-7469-558b8d000000", + "x-ms-client-request-id" : "3de6aa68-0ef6-4c26-835e-eb7f8bc6c14e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0130554a2a55000b7442c1/javablobreleaseblobleaseacfail1906283ebdb7b759094?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail036904ea66572d57b648a0/javablobreleaseblobleaseacfail137793bbcac0e4b9584?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "566569ae-ed8a-4a8e-8850-4784358f5780" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba244622-c9fc-4c97-9ba2-dfb8017b96ee" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A6FC50F", - "x-ms-lease-id" : "da92ee21-1500-4376-977e-c8f42c7892dc", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:56 GMT", + "ETag" : "0x8D82380C69B270F", + "x-ms-lease-id" : "096671e1-ab04-4116-93fc-4499fca8e307", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ada1b-901e-0077-51f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "566569ae-ed8a-4a8e-8850-4784358f5780" + "x-ms-request-id" : "ae80da0d-501e-001c-2b69-55c3e2000000", + "Date" : "Wed, 08 Jul 2020 20:52:07 GMT", + "x-ms-client-request-id" : "ba244622-c9fc-4c97-9ba2-dfb8017b96ee" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0130554a2a55000b7442c1/javablobreleaseblobleaseacfail1906283ebdb7b759094?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail036904ea66572d57b648a0/javablobreleaseblobleaseacfail137793bbcac0e4b9584?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "35e96792-b9e2-46a4-8f38-7f87cd7b8b47" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "185dbe30-9ea6-4721-a040-7f1b2aa5a8dc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ada29-901e-0077-5cf4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ada29-901e-0077-5cf4-12b537000000\nTime:2020-04-15T07:03:56.9986558Z", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "35e96792-b9e2-46a4-8f38-7f87cd7b8b47", + "x-ms-request-id" : "438d9092-d01e-0094-3c69-5526eb000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:438d9092-d01e-0094-3c69-5526eb000000\nTime:2020-07-08T20:52:07.7124078Z", + "Date" : "Wed, 08 Jul 2020 20:52:07 GMT", + "x-ms-client-request-id" : "185dbe30-9ea6-4721-a040-7f1b2aa5a8dc", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cc88cd48-1372-4eb5-b5bb-13d43c884d99" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "566b8bdc-397f-4180-b57a-b12d4d6e7d2a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ada2f-901e-0077-60f4-12b537000000", - "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail0130554a2a55000b7442c1Wed, 15 Apr 2020 07:03:56 GMT\"0x8D7E10B2A66F640\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "cc88cd48-1372-4eb5-b5bb-13d43c884d99", + "x-ms-request-id" : "a19e0759-c01e-006c-0d69-557a15000000", + "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail036904ea66572d57b648a0Wed, 08 Jul 2020 20:52:06 GMT\"0x8D82380C638E715\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:08 GMT", + "x-ms-client-request-id" : "566b8bdc-397f-4180-b57a-b12d4d6e7d2a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0130554a2a55000b7442c1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail036904ea66572d57b648a0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4eee1c63-0b3e-4be1-8351-66311847fbc3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "774f98e5-2feb-4997-bbb2-9c170f15dc70" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ada3a-901e-0077-69f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "4eee1c63-0b3e-4be1-8351-66311847fbc3" + "x-ms-request-id" : "44483fbd-801e-0030-5669-552f4d000000", + "Date" : "Wed, 08 Jul 2020 20:52:07 GMT", + "x-ms-client-request-id" : "774f98e5-2feb-4997-bbb2-9c170f15dc70" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseacfail0130554a2a55000b7442c1", "javablobreleaseblobleaseacfail1906283ebdb7b759094" ] + "variables" : [ "jtcreleaseblobleaseacfail036904ea66572d57b648a0", "javablobreleaseblobleaseacfail137793bbcac0e4b9584" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[1].json index 3cf607977c0a..d2e4e9baf56e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[1].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail045721ab77e8da3f244c3b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail017830b343c7f4114f4d51?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "23598c09-5e81-40ae-962a-6e03fe16b9d5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "aada7be7-6bab-40e3-b206-aec6d6dad104" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2A99AB2D", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:57 GMT", + "ETag" : "0x8D82380C8039DF4", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ada5e-901e-0077-05f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "23598c09-5e81-40ae-962a-6e03fe16b9d5" + "x-ms-request-id" : "4856d5a5-101e-001d-3d69-559c3e000000", + "Date" : "Wed, 08 Jul 2020 20:52:08 GMT", + "x-ms-client-request-id" : "aada7be7-6bab-40e3-b206-aec6d6dad104" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail045721ab77e8da3f244c3b/javablobreleaseblobleaseacfail171542c5284739a5924", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail017830b343c7f4114f4d51/javablobreleaseblobleaseacfail1387871c934ccf77294", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c58ee0f1-8b30-4f52-a78f-07fae984220b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "53dba1a0-6356-48fc-aa89-0b5b2f7e7f2d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:57 GMT", + "x-ms-version-id" : "2020-07-08T20:52:09.5207730Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2AA11A0C", + "ETag" : "0x8D82380C83DD932", "Content-Length" : "0", - "x-ms-request-id" : "cc6ada66-901e-0077-0bf4-12b537000000", - "x-ms-client-request-id" : "c58ee0f1-8b30-4f52-a78f-07fae984220b" + "x-ms-request-id" : "4409b92d-601e-0081-5069-553158000000", + "x-ms-client-request-id" : "53dba1a0-6356-48fc-aa89-0b5b2f7e7f2d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail045721ab77e8da3f244c3b/javablobreleaseblobleaseacfail171542c5284739a5924?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail017830b343c7f4114f4d51/javablobreleaseblobleaseacfail1387871c934ccf77294?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "706a7b29-ea62-49b3-bc31-a71bc8ffd5f5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e64b1600-f5e2-4655-9a19-74750a1afc41" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2AA11A0C", - "x-ms-lease-id" : "0ec90bcb-6559-4d7c-a08e-f62567526e7c", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:57 GMT", + "ETag" : "0x8D82380C83DD932", + "x-ms-lease-id" : "f29af70f-0440-4263-83d1-bb384ec8a1a7", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ada75-901e-0077-1af4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "706a7b29-ea62-49b3-bc31-a71bc8ffd5f5" + "x-ms-request-id" : "db5a2a0b-e01e-0009-6969-55d451000000", + "Date" : "Wed, 08 Jul 2020 20:52:09 GMT", + "x-ms-client-request-id" : "e64b1600-f5e2-4655-9a19-74750a1afc41" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail045721ab77e8da3f244c3b/javablobreleaseblobleaseacfail171542c5284739a5924?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail017830b343c7f4114f4d51/javablobreleaseblobleaseacfail1387871c934ccf77294?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d58098fd-608e-42f2-82e1-fabc63821a07" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4d1b9033-9e1d-4b62-84bc-39d80b952dcd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ada88-901e-0077-29f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ada88-901e-0077-29f4-12b537000000\nTime:2020-04-15T07:03:57.3359733Z", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "d58098fd-608e-42f2-82e1-fabc63821a07", + "x-ms-request-id" : "1a47fd67-c01e-0031-4969-557091000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:1a47fd67-c01e-0031-4969-557091000000\nTime:2020-07-08T20:52:10.2724437Z", + "Date" : "Wed, 08 Jul 2020 20:52:10 GMT", + "x-ms-client-request-id" : "4d1b9033-9e1d-4b62-84bc-39d80b952dcd", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5d771ec8-ea7d-42c8-a654-51846207104d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "43a9ec38-0d9f-406c-9acb-c0b048cdbfff" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ada8f-901e-0077-2ff4-12b537000000", - "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail045721ab77e8da3f244c3bWed, 15 Apr 2020 07:03:57 GMT\"0x8D7E10B2A99AB2D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "5d771ec8-ea7d-42c8-a654-51846207104d", + "x-ms-request-id" : "303bc474-801e-006d-0369-5525c9000000", + "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail017830b343c7f4114f4d51Wed, 08 Jul 2020 20:52:09 GMT\"0x8D82380C8039DF4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:10 GMT", + "x-ms-client-request-id" : "43a9ec38-0d9f-406c-9acb-c0b048cdbfff", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail045721ab77e8da3f244c3b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail017830b343c7f4114f4d51?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1bc95e90-be12-49cf-9959-b47d08bdf858" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce98292b-b8d5-4b97-b4e5-9517f8472d49" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ada99-901e-0077-39f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "1bc95e90-be12-49cf-9959-b47d08bdf858" + "x-ms-request-id" : "6b2b1848-b01e-0059-2c69-551601000000", + "Date" : "Wed, 08 Jul 2020 20:52:10 GMT", + "x-ms-client-request-id" : "ce98292b-b8d5-4b97-b4e5-9517f8472d49" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseacfail045721ab77e8da3f244c3b", "javablobreleaseblobleaseacfail171542c5284739a5924" ] + "variables" : [ "jtcreleaseblobleaseacfail017830b343c7f4114f4d51", "javablobreleaseblobleaseacfail1387871c934ccf77294" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[2].json index 74e278ab9a26..11c79d9355f5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[2].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail027790af3e4e91fa41466e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail021435c4f05d26cef24f9c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "02f6e260-893f-4383-8723-9955fdb119a8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a23c7b5c-44f1-4d4f-a02a-eb28ec835a0c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2AEC4BDE", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:57 GMT", + "ETag" : "0x8D82380C9563FF9", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adac5-901e-0077-61f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "02f6e260-893f-4383-8723-9955fdb119a8" + "x-ms-request-id" : "8ac48273-901e-0095-4c69-557937000000", + "Date" : "Wed, 08 Jul 2020 20:52:10 GMT", + "x-ms-client-request-id" : "a23c7b5c-44f1-4d4f-a02a-eb28ec835a0c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail027790af3e4e91fa41466e/javablobreleaseblobleaseacfail17402184559488af754", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail021435c4f05d26cef24f9c/javablobreleaseblobleaseacfail14930492489e23ccfb4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "efd1a6d0-8d71-4f07-a49a-328951ef69ab", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "360dbe0a-9375-46dd-a91a-65bc5af8e14c", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:57 GMT", + "x-ms-version-id" : "2020-07-08T20:52:11.6833224Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:10 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2AF42FE4", + "ETag" : "0x8D82380C987D3C8", "Content-Length" : "0", - "x-ms-request-id" : "cc6adace-901e-0077-67f4-12b537000000", - "x-ms-client-request-id" : "efd1a6d0-8d71-4f07-a49a-328951ef69ab" + "x-ms-request-id" : "8c5e90e0-a01e-0045-4269-554461000000", + "x-ms-client-request-id" : "360dbe0a-9375-46dd-a91a-65bc5af8e14c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail027790af3e4e91fa41466e/javablobreleaseblobleaseacfail17402184559488af754?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail021435c4f05d26cef24f9c/javablobreleaseblobleaseacfail14930492489e23ccfb4?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "42326b0a-26f7-4b98-808b-9a50344abd5c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e2dad187-4f59-479b-8ca2-4e30655e5d46" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2AF42FE4", - "x-ms-lease-id" : "1376c38a-89c3-467d-b049-20a7daa9c291", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:57 GMT", + "ETag" : "0x8D82380C987D3C8", + "x-ms-lease-id" : "1cc024ef-44f2-48e6-b42f-1e3ed9489694", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adad3-901e-0077-6cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "42326b0a-26f7-4b98-808b-9a50344abd5c" + "x-ms-request-id" : "9d6c2088-b01e-0082-6269-55d03c000000", + "Date" : "Wed, 08 Jul 2020 20:52:11 GMT", + "x-ms-client-request-id" : "e2dad187-4f59-479b-8ca2-4e30655e5d46" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail027790af3e4e91fa41466e/javablobreleaseblobleaseacfail17402184559488af754?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail021435c4f05d26cef24f9c/javablobreleaseblobleaseacfail14930492489e23ccfb4?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cc7db72d-1b27-4c12-8455-909fabb08837" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f60bd4e3-003c-47f4-83d4-56a684e270cc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6adadb-901e-0077-74f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6adadb-901e-0077-74f4-12b537000000\nTime:2020-04-15T07:03:57.8634690Z", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "cc7db72d-1b27-4c12-8455-909fabb08837", + "x-ms-request-id" : "4091c010-e01e-009f-2c69-55dd80000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:4091c010-e01e-009f-2c69-55dd80000000\nTime:2020-07-08T20:52:12.3744050Z", + "Date" : "Wed, 08 Jul 2020 20:52:12 GMT", + "x-ms-client-request-id" : "f60bd4e3-003c-47f4-83d4-56a684e270cc", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0d6c4506-57fb-4a4d-af3b-1b66dc5ee448" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "90b8969c-4eae-4214-8440-d9c4db2bf08a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6adadf-901e-0077-78f4-12b537000000", - "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail027790af3e4e91fa41466eWed, 15 Apr 2020 07:03:57 GMT\"0x8D7E10B2AEC4BDE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:56 GMT", - "x-ms-client-request-id" : "0d6c4506-57fb-4a4d-af3b-1b66dc5ee448", + "x-ms-request-id" : "0fd45037-a01e-0027-4369-558646000000", + "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail021435c4f05d26cef24f9cWed, 08 Jul 2020 20:52:11 GMT\"0x8D82380C9563FF9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:12 GMT", + "x-ms-client-request-id" : "90b8969c-4eae-4214-8440-d9c4db2bf08a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail027790af3e4e91fa41466e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail021435c4f05d26cef24f9c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c95e1e5f-6037-4dba-a125-dd1251f9a74e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38385176-c6fe-4077-bf20-df9f00f54efe" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6adae4-901e-0077-7cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:57 GMT", - "x-ms-client-request-id" : "c95e1e5f-6037-4dba-a125-dd1251f9a74e" + "x-ms-request-id" : "a3e5914d-901e-0013-2769-55b58e000000", + "Date" : "Wed, 08 Jul 2020 20:52:13 GMT", + "x-ms-client-request-id" : "38385176-c6fe-4077-bf20-df9f00f54efe" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseacfail027790af3e4e91fa41466e", "javablobreleaseblobleaseacfail17402184559488af754" ] + "variables" : [ "jtcreleaseblobleaseacfail021435c4f05d26cef24f9c", "javablobreleaseblobleaseacfail14930492489e23ccfb4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[3].json index 77c1bc3a1e93..39910e4b7e52 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[3].json @@ -1,123 +1,125 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail080608941183d4491b4f70?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0232677980e0d956354595?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5cc74e53-fa05-442a-a699-a4900e29bee5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c66e771-1e41-44cc-a783-9b151f6af746" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2B3EEC8F", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:58 GMT", + "ETag" : "0x8D82380CA923CCA", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adb26-901e-0077-33f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:57 GMT", - "x-ms-client-request-id" : "5cc74e53-fa05-442a-a699-a4900e29bee5" + "x-ms-request-id" : "088bad16-d01e-004f-0369-55e0d6000000", + "Date" : "Wed, 08 Jul 2020 20:52:13 GMT", + "x-ms-client-request-id" : "8c66e771-1e41-44cc-a783-9b151f6af746" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail080608941183d4491b4f70/javablobreleaseblobleaseacfail1169881329107a734b4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0232677980e0d956354595/javablobreleaseblobleaseacfail176083a2e0fcdffa3c4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4313312f-9813-4bf1-97c0-81557a5944c4", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d401b84a-800c-4130-807b-acb0bc6a598b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:58 GMT", + "x-ms-version-id" : "2020-07-08T20:52:13.7668135Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:13 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:57 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:13 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2B476CD2", + "ETag" : "0x8D82380CAC5BE27", "Content-Length" : "0", - "x-ms-request-id" : "cc6adb2d-901e-0077-39f4-12b537000000", - "x-ms-client-request-id" : "4313312f-9813-4bf1-97c0-81557a5944c4" + "x-ms-request-id" : "8b0f1874-301e-0078-4369-55327a000000", + "x-ms-client-request-id" : "d401b84a-800c-4130-807b-acb0bc6a598b" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail080608941183d4491b4f70/javablobreleaseblobleaseacfail1169881329107a734b4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0232677980e0d956354595/javablobreleaseblobleaseacfail176083a2e0fcdffa3c4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "14615fe7-eb97-4d82-88ff-60ae42de0d5d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce15d025-b8e4-4e0a-8c51-b59d2f7f46d7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:58 GMT", + "x-ms-version-id" : "2020-07-08T20:52:13.7668135Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:13 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:03:57 GMT", + "Date" : "Wed, 08 Jul 2020 20:52:13 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B2B476CD2", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:03:58 GMT", + "ETag" : "0x8D82380CAC5BE27", + "x-ms-creation-time" : "Wed, 08 Jul 2020 20:52:13 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6adb41-901e-0077-46f4-12b537000000", - "x-ms-client-request-id" : "14615fe7-eb97-4d82-88ff-60ae42de0d5d", + "x-ms-request-id" : "4bb58b85-101e-0050-6469-5553d2000000", + "x-ms-client-request-id" : "ce15d025-b8e4-4e0a-8c51-b59d2f7f46d7", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail080608941183d4491b4f70/javablobreleaseblobleaseacfail1169881329107a734b4?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0232677980e0d956354595/javablobreleaseblobleaseacfail176083a2e0fcdffa3c4?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9ac42373-ead4-47c8-970a-a789f27e57be" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a1d7b191-719b-47a7-af38-7fc1fbb53e17" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2B476CD2", - "x-ms-lease-id" : "70cdc371-9148-44e3-a372-c3550bf64cc6", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:58 GMT", + "ETag" : "0x8D82380CAC5BE27", + "x-ms-lease-id" : "fb895072-6a43-45ab-a385-d02f98cee78e", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6adb52-901e-0077-53f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:57 GMT", - "x-ms-client-request-id" : "9ac42373-ead4-47c8-970a-a789f27e57be" + "x-ms-request-id" : "7e08d8e7-201e-0064-2069-55601a000000", + "Date" : "Wed, 08 Jul 2020 20:52:13 GMT", + "x-ms-client-request-id" : "a1d7b191-719b-47a7-af38-7fc1fbb53e17" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail080608941183d4491b4f70/javablobreleaseblobleaseacfail1169881329107a734b4?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0232677980e0d956354595/javablobreleaseblobleaseacfail176083a2e0fcdffa3c4?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c7ec44fd-ebb2-45a4-a6d5-66ad12b935ab" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e1a5cd5-cfa7-4551-9f0c-4a9e39fcf823" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6adb62-901e-0077-5ef4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6adb62-901e-0077-5ef4-12b537000000\nTime:2020-04-15T07:03:58.4550245Z", - "Date" : "Wed, 15 Apr 2020 07:03:57 GMT", - "x-ms-client-request-id" : "c7ec44fd-ebb2-45a4-a6d5-66ad12b935ab", + "x-ms-request-id" : "a5b9c766-401e-0000-7b69-559182000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:a5b9c766-401e-0000-7b69-559182000000\nTime:2020-07-08T20:52:14.9297402Z", + "Date" : "Wed, 08 Jul 2020 20:52:14 GMT", + "x-ms-client-request-id" : "6e1a5cd5-cfa7-4551-9f0c-4a9e39fcf823", "Content-Type" : "application/xml" }, "Exception" : null @@ -125,43 +127,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83df1783-5842-46ad-9188-e8703db02312" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "43fa9cb1-cdae-4b34-b6d3-84c930d6ee0f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6adb69-901e-0077-63f4-12b537000000", - "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail080608941183d4491b4f70Wed, 15 Apr 2020 07:03:58 GMT\"0x8D7E10B2B3EEC8F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:57 GMT", - "x-ms-client-request-id" : "83df1783-5842-46ad-9188-e8703db02312", + "x-ms-request-id" : "5e96abc7-b01e-0014-3269-55d9ed000000", + "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail0232677980e0d956354595Wed, 08 Jul 2020 20:52:13 GMT\"0x8D82380CA923CCA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:14 GMT", + "x-ms-client-request-id" : "43fa9cb1-cdae-4b34-b6d3-84c930d6ee0f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail080608941183d4491b4f70?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail0232677980e0d956354595?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ae6ff042-64d5-41bb-8e16-5a45dd0defbe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "91da7a9c-b0cc-4245-bc46-edd30279bf97" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6adb6f-901e-0077-69f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:57 GMT", - "x-ms-client-request-id" : "ae6ff042-64d5-41bb-8e16-5a45dd0defbe" + "x-ms-request-id" : "028e89f6-601e-0028-0169-55f02a000000", + "Date" : "Wed, 08 Jul 2020 20:52:15 GMT", + "x-ms-client-request-id" : "91da7a9c-b0cc-4245-bc46-edd30279bf97" }, "Exception" : null } ], - "variables" : [ "jtcreleaseblobleaseacfail080608941183d4491b4f70", "javablobreleaseblobleaseacfail1169881329107a734b4" ] + "variables" : [ "jtcreleaseblobleaseacfail0232677980e0d956354595", "javablobreleaseblobleaseacfail176083a2e0fcdffa3c4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[4].json new file mode 100644 index 000000000000..aaa6ad4d68e3 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestreleaseblobleaseacfail[4].json @@ -0,0 +1,135 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail006854558fb67efce44640?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eaf18596-c3cb-4014-a462-8a94809cc099" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380CC1C1FE2", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:16 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "93432b5c-901e-003c-2e69-55b845000000", + "Date" : "Wed, 08 Jul 2020 20:52:15 GMT", + "x-ms-client-request-id" : "eaf18596-c3cb-4014-a462-8a94809cc099" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail006854558fb67efce44640/javablobreleaseblobleaseacfail1768185a31c669660f4", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "496616b9-ce2e-4121-a2cd-a1d29a3429f8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-08T20:52:16.3376544Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:16 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 08 Jul 2020 20:52:15 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82380CC4E05A0", + "Content-Length" : "0", + "x-ms-request-id" : "5de782c0-d01e-003d-6869-55e799000000", + "x-ms-client-request-id" : "496616b9-ce2e-4121-a2cd-a1d29a3429f8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail006854558fb67efce44640/javablobreleaseblobleaseacfail1768185a31c669660f4?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29f630d6-976d-47a4-879e-2e7e14a8103d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380CC4E05A0", + "x-ms-lease-id" : "10be48b3-d6bf-40f3-bde6-c0e868c38ab8", + "Last-Modified" : "Wed, 08 Jul 2020 20:52:16 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0136def0-701e-0079-5869-556da6000000", + "Date" : "Wed, 08 Jul 2020 20:52:16 GMT", + "x-ms-client-request-id" : "29f630d6-976d-47a4-879e-2e7e14a8103d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail006854558fb67efce44640/javablobreleaseblobleaseacfail1768185a31c669660f4?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3dd5277-9f0b-4866-b10a-e7f7a59ecab4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "9b59230c-001e-0001-3d69-55ce5e000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:9b59230c-001e-0001-3d69-55ce5e000000\nTime:2020-07-08T20:52:17.0770690Z", + "Date" : "Wed, 08 Jul 2020 20:52:16 GMT", + "x-ms-client-request-id" : "e3dd5277-9f0b-4866-b10a-e7f7a59ecab4", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcreleaseblobleaseacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fccfb4bc-19f3-458d-b2f3-0cd01ca925f0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "9e9d0b71-701e-008d-7b69-55a650000000", + "Body" : "jtcreleaseblobleaseacfailjtcreleaseblobleaseacfail006854558fb67efce44640Wed, 08 Jul 2020 20:52:16 GMT\"0x8D82380CC1C1FE2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:52:16 GMT", + "x-ms-client-request-id" : "fccfb4bc-19f3-458d-b2f3-0cd01ca925f0", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcreleaseblobleaseacfail006854558fb67efce44640?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52747683-0d9b-424f-b9ad-e0be996e86ba" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "7e7c7e56-f01e-0015-7469-558631000000", + "Date" : "Wed, 08 Jul 2020 20:52:17 GMT", + "x-ms-client-request-id" : "52747683-0d9b-424f-b9ad-e0be996e86ba" + }, + "Exception" : null + } ], + "variables" : [ "jtcreleaseblobleaseacfail006854558fb67efce44640", "javablobreleaseblobleaseacfail1768185a31c669660f4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[0].json index cb5d752c4f63..f08d64335102 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[0].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacef829749687?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac1e949412f95?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a0c17ed7-4e58-4cce-acb1-7ba409ac1e12" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92de2e8f-4f26-4c6a-965b-ee51684976f1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B267DA732", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:50 GMT", + "ETag" : "0x8D8238092D4467F", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad3c5-901e-0077-3ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", - "x-ms-client-request-id" : "a0c17ed7-4e58-4cce-acb1-7ba409ac1e12" + "x-ms-request-id" : "f463e081-c01e-000e-2369-55b832000000", + "Date" : "Wed, 08 Jul 2020 20:50:39 GMT", + "x-ms-client-request-id" : "92de2e8f-4f26-4c6a-965b-ee51684976f1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacef829749687/javablobrenewblobleaseac1leaseapitestrenewblobleaseacef8519877", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac1e949412f95/javablobrenewblobleaseac1leaseapitestrenewblobleaseac1e9546843", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e0a9e813-70c3-4bb1-92ff-e1260bf429f5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c1c89d85-d76b-4583-9a64-2ebfae752a67", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:50 GMT", + "x-ms-version-id" : "2020-07-08T20:50:40.5821254Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:40 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", + "Date" : "Wed, 08 Jul 2020 20:50:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B26871457", + "ETag" : "0x8D82380933ABC23", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad3d9-901e-0077-4bf4-12b537000000", - "x-ms-client-request-id" : "e0a9e813-70c3-4bb1-92ff-e1260bf429f5" + "x-ms-request-id" : "a3b190f6-d01e-0070-4269-552875000000", + "x-ms-client-request-id" : "c1c89d85-d76b-4583-9a64-2ebfae752a67" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacef829749687/javablobrenewblobleaseac1leaseapitestrenewblobleaseacef8519877?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac1e949412f95/javablobrenewblobleaseac1leaseapitestrenewblobleaseac1e9546843?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c3274350-d45e-4464-9de0-5984a525a268" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5cfdd9e8-7aae-45ec-8455-33d620012a7a", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B26871457", - "x-ms-lease-id" : "4d35c916-77dd-48f5-b334-3b5068f37a4b", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:50 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "14364819-401e-0096-4c69-559853000000", + "Date" : "Wed, 08 Jul 2020 20:50:40 GMT", + "x-ms-client-request-id" : "5cfdd9e8-7aae-45ec-8455-33d620012a7a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac1e949412f95/javablobrenewblobleaseac1leaseapitestrenewblobleaseac1e9546843?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "101929ed-c8ea-4a1e-a833-6577988a4e0f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380933ABC23", + "x-ms-lease-id" : "1655917e-02c4-4f6f-9499-f0e67773bf27", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad3e8-901e-0077-57f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", - "x-ms-client-request-id" : "c3274350-d45e-4464-9de0-5984a525a268" + "x-ms-request-id" : "13795039-f01e-0058-0a69-5549dd000000", + "Date" : "Wed, 08 Jul 2020 20:50:41 GMT", + "x-ms-client-request-id" : "101929ed-c8ea-4a1e-a833-6577988a4e0f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacef829749687/javablobrenewblobleaseac1leaseapitestrenewblobleaseacef8519877?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac1e949412f95/javablobrenewblobleaseac1leaseapitestrenewblobleaseac1e9546843?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3b169419-85c9-494e-a5c3-abc0ca53da9e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e3a752c-3168-4191-b3e0-364e9436091c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B26871457", - "x-ms-lease-id" : "4d35c916-77dd-48f5-b334-3b5068f37a4b", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:50 GMT", + "ETag" : "0x8D82380933ABC23", + "x-ms-lease-id" : "1655917e-02c4-4f6f-9499-f0e67773bf27", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad3fe-901e-0077-69f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", - "x-ms-client-request-id" : "3b169419-85c9-494e-a5c3-abc0ca53da9e" + "x-ms-request-id" : "3d1b270c-e01e-0019-2069-551139000000", + "Date" : "Wed, 08 Jul 2020 20:50:40 GMT", + "x-ms-client-request-id" : "2e3a752c-3168-4191-b3e0-364e9436091c" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5593ddfd-3a65-4337-a77b-2ad9bc16fd39" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac832dd2-3eb2-4ffc-8f2a-ec94406e06ed" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad40b-901e-0077-73f4-12b537000000", - "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseacef829749687Wed, 15 Apr 2020 07:03:50 GMT\"0x8D7E10B267DA732\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", - "x-ms-client-request-id" : "5593ddfd-3a65-4337-a77b-2ad9bc16fd39", + "x-ms-request-id" : "64306459-601e-0017-7069-553889000000", + "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseac1e949412f95Wed, 08 Jul 2020 20:50:39 GMT\"0x8D8238092D4467F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:50:41 GMT", + "x-ms-client-request-id" : "ac832dd2-3eb2-4ffc-8f2a-ec94406e06ed", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacef829749687?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac1e949412f95?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "00ec5377-c527-4365-ad89-12b7f1d6bf74" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f946e2d-79ca-4f3e-8bab-13aa2fabe4f8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad41d-901e-0077-02f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", - "x-ms-client-request-id" : "00ec5377-c527-4365-ad89-12b7f1d6bf74" + "x-ms-request-id" : "79257ba4-501e-0051-3169-550c0e000000", + "Date" : "Wed, 08 Jul 2020 20:50:42 GMT", + "x-ms-client-request-id" : "5f946e2d-79ca-4f3e-8bab-13aa2fabe4f8" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseacef829749687", "javablobrenewblobleaseac1leaseapitestrenewblobleaseacef8519877" ] + "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseac1e949412f95", "javablobrenewblobleaseac1leaseapitestrenewblobleaseac1e9546843" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[1].json index e99829436abf..049b927519e7 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[1].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac69110990a2b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacec571212a5c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b49cafe9-31f1-4de8-bc0f-cde8178c6c64" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82367615-dcfc-45fe-9646-83c7628f2fb3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B26C4AC53", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:50 GMT", + "ETag" : "0x8D8238094D4469D", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad454-901e-0077-34f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", - "x-ms-client-request-id" : "b49cafe9-31f1-4de8-bc0f-cde8178c6c64" + "x-ms-request-id" : "0fd3b883-a01e-0027-7169-558646000000", + "Date" : "Wed, 08 Jul 2020 20:50:42 GMT", + "x-ms-client-request-id" : "82367615-dcfc-45fe-9646-83c7628f2fb3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac69110990a2b/javablobrenewblobleaseac1leaseapitestrenewblobleaseac691937572", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacec571212a5c/javablobrenewblobleaseac1leaseapitestrenewblobleaseacec5463961", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "21df12ab-9ddb-4761-8d9e-d7af26557b03", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad91e038-0118-48e8-98fd-f60bfa23705d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:50 GMT", + "x-ms-version-id" : "2020-07-08T20:50:43.6263004Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:43 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", + "Date" : "Wed, 08 Jul 2020 20:50:43 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B26CD07AF", + "ETag" : "0x8D82380950B645C", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad45f-901e-0077-3cf4-12b537000000", - "x-ms-client-request-id" : "21df12ab-9ddb-4761-8d9e-d7af26557b03" + "x-ms-request-id" : "86f4597b-401e-004d-2c69-555e6e000000", + "x-ms-client-request-id" : "ad91e038-0118-48e8-98fd-f60bfa23705d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac69110990a2b/javablobrenewblobleaseac1leaseapitestrenewblobleaseac691937572?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacec571212a5c/javablobrenewblobleaseac1leaseapitestrenewblobleaseacec5463961?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c8583f85-29b8-4e04-86ae-c31fd907ee4a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c574de7-e863-4110-b6c7-30b75e6fc52b", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B26CD07AF", - "x-ms-lease-id" : "e9cf891e-8a87-449d-abcd-39e891f2f14c", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:50 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5a4f49b6-301e-00a3-7e69-55f447000000", + "Date" : "Wed, 08 Jul 2020 20:50:43 GMT", + "x-ms-client-request-id" : "3c574de7-e863-4110-b6c7-30b75e6fc52b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacec571212a5c/javablobrenewblobleaseac1leaseapitestrenewblobleaseacec5463961?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00b9cae6-13ad-4997-8032-9e51e0e4923a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380950B645C", + "x-ms-lease-id" : "a54d451b-37f5-4a93-8491-f019bd192d75", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad46d-901e-0077-47f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", - "x-ms-client-request-id" : "c8583f85-29b8-4e04-86ae-c31fd907ee4a" + "x-ms-request-id" : "d0c33c04-101e-0022-1a69-55549d000000", + "Date" : "Wed, 08 Jul 2020 20:50:44 GMT", + "x-ms-client-request-id" : "00b9cae6-13ad-4997-8032-9e51e0e4923a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac69110990a2b/javablobrenewblobleaseac1leaseapitestrenewblobleaseac691937572?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacec571212a5c/javablobrenewblobleaseac1leaseapitestrenewblobleaseacec5463961?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4ca857e9-87c4-4a04-a5b4-33477b7f66e8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce98d84b-3661-4eed-a697-630f9ed1e2be" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B26CD07AF", - "x-ms-lease-id" : "e9cf891e-8a87-449d-abcd-39e891f2f14c", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:50 GMT", + "ETag" : "0x8D82380950B645C", + "x-ms-lease-id" : "a54d451b-37f5-4a93-8491-f019bd192d75", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad476-901e-0077-4ff4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:49 GMT", - "x-ms-client-request-id" : "4ca857e9-87c4-4a04-a5b4-33477b7f66e8" + "x-ms-request-id" : "028df5c4-601e-0028-6769-55f02a000000", + "Date" : "Wed, 08 Jul 2020 20:50:44 GMT", + "x-ms-client-request-id" : "ce98d84b-3661-4eed-a697-630f9ed1e2be" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9df4240f-21f0-4fa4-98b5-a23ac4296202" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8de7fa55-e384-4afa-9b13-242e533cebaa" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad486-901e-0077-5af4-12b537000000", - "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseac69110990a2bWed, 15 Apr 2020 07:03:50 GMT\"0x8D7E10B26C4AC53\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "9df4240f-21f0-4fa4-98b5-a23ac4296202", + "x-ms-request-id" : "312dd93f-701e-0024-2569-556722000000", + "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseacec571212a5cWed, 08 Jul 2020 20:50:43 GMT\"0x8D8238094D4469D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:50:44 GMT", + "x-ms-client-request-id" : "8de7fa55-e384-4afa-9b13-242e533cebaa", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac69110990a2b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacec571212a5c?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a7169114-aabf-4803-a395-49b7e214d0fd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "be7f06aa-036d-437a-8442-edfff2c64115" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad49b-901e-0077-6bf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "a7169114-aabf-4803-a395-49b7e214d0fd" + "x-ms-request-id" : "448ab85d-001e-0073-1169-55c911000000", + "Date" : "Wed, 08 Jul 2020 20:50:44 GMT", + "x-ms-client-request-id" : "be7f06aa-036d-437a-8442-edfff2c64115" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseac69110990a2b", "javablobrenewblobleaseac1leaseapitestrenewblobleaseac691937572" ] + "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseacec571212a5c", "javablobrenewblobleaseac1leaseapitestrenewblobleaseacec5463961" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[2].json index c3a5d338fccb..100590a4309f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[2].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac39196343d7a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac954199023aa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2234c1e4-71d4-40a9-9789-9d034ac53eee" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e15c0c01-69cc-4c9d-b2bc-0ad0081f899a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B26F38FCC", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "ETag" : "0x8D82380964EFA41", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad4b2-901e-0077-7df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "2234c1e4-71d4-40a9-9789-9d034ac53eee" + "x-ms-request-id" : "c727b729-101e-000d-1d69-555956000000", + "Date" : "Wed, 08 Jul 2020 20:50:45 GMT", + "x-ms-client-request-id" : "e15c0c01-69cc-4c9d-b2bc-0ad0081f899a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac39196343d7a/javablobrenewblobleaseac1leaseapitestrenewblobleaseac391585671", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac954199023aa/javablobrenewblobleaseac1leaseapitestrenewblobleaseac95467755e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7ad50dcb-8af5-41c1-aa8a-3a0400e5895a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "71d8b0ad-1fff-49a8-b00b-26c2e0ee6a33", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "x-ms-version-id" : "2020-07-08T20:50:46.1340951Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:46 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", + "Date" : "Wed, 08 Jul 2020 20:50:45 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B26FB9CE4", + "ETag" : "0x8D82380968A0D17", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad4c2-901e-0077-09f4-12b537000000", - "x-ms-client-request-id" : "7ad50dcb-8af5-41c1-aa8a-3a0400e5895a" + "x-ms-request-id" : "21c0a833-801e-001f-4c69-552286000000", + "x-ms-client-request-id" : "71d8b0ad-1fff-49a8-b00b-26c2e0ee6a33" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac39196343d7a/javablobrenewblobleaseac1leaseapitestrenewblobleaseac391585671?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac954199023aa/javablobrenewblobleaseac1leaseapitestrenewblobleaseac95467755e?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "31dbda4c-e817-4749-929b-9f3060d2f7a4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e085e6c6-51ac-4de0-9421-857cb12c6f34", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B26FB9CE4", - "x-ms-lease-id" : "b261d66b-9063-447d-bf91-b2b9ef4e9d21", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "303b328e-801e-006d-2269-5525c9000000", + "Date" : "Wed, 08 Jul 2020 20:50:45 GMT", + "x-ms-client-request-id" : "e085e6c6-51ac-4de0-9421-857cb12c6f34" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac954199023aa/javablobrenewblobleaseac1leaseapitestrenewblobleaseac95467755e?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9d1fed1-7062-4188-8a61-54f5c395f004" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380968A0D17", + "x-ms-lease-id" : "f4595a01-b41c-43c1-8d3a-2acc53f90120", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad4d1-901e-0077-14f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "31dbda4c-e817-4749-929b-9f3060d2f7a4" + "x-ms-request-id" : "9a19eeb8-e01e-006b-3469-551676000000", + "Date" : "Wed, 08 Jul 2020 20:50:45 GMT", + "x-ms-client-request-id" : "c9d1fed1-7062-4188-8a61-54f5c395f004" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac39196343d7a/javablobrenewblobleaseac1leaseapitestrenewblobleaseac391585671?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac954199023aa/javablobrenewblobleaseac1leaseapitestrenewblobleaseac95467755e?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d23c088b-80be-4250-a33b-1e0a3fa0003f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fc8f12c-f9e7-406d-8a43-f80a234f8a08" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B26FB9CE4", - "x-ms-lease-id" : "b261d66b-9063-447d-bf91-b2b9ef4e9d21", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "ETag" : "0x8D82380968A0D17", + "x-ms-lease-id" : "f4595a01-b41c-43c1-8d3a-2acc53f90120", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad4eb-901e-0077-26f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "d23c088b-80be-4250-a33b-1e0a3fa0003f" + "x-ms-request-id" : "f943d0a0-701e-0069-4869-55a8ce000000", + "Date" : "Wed, 08 Jul 2020 20:50:46 GMT", + "x-ms-client-request-id" : "0fc8f12c-f9e7-406d-8a43-f80a234f8a08" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0879d356-f320-499a-b87c-c165ec6e6b0e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1e74a87-9ae7-4f65-a509-bb225a5c0e74" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad4fb-901e-0077-33f4-12b537000000", - "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseac39196343d7aWed, 15 Apr 2020 07:03:51 GMT\"0x8D7E10B26F38FCC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "0879d356-f320-499a-b87c-c165ec6e6b0e", + "x-ms-request-id" : "8733d289-901e-0003-5569-5570e6000000", + "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseac954199023aaWed, 08 Jul 2020 20:50:45 GMT\"0x8D82380964EFA41\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:50:46 GMT", + "x-ms-client-request-id" : "f1e74a87-9ae7-4f65-a509-bb225a5c0e74", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac39196343d7a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac954199023aa?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4aac88e1-90ab-45d4-883c-b69a6bc3bfc0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8bafd3d4-5468-4e7a-9478-9f6efe433e60" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad507-901e-0077-3ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "4aac88e1-90ab-45d4-883c-b69a6bc3bfc0" + "x-ms-request-id" : "5de6b97a-d01e-003d-0f69-55e799000000", + "Date" : "Wed, 08 Jul 2020 20:50:47 GMT", + "x-ms-client-request-id" : "8bafd3d4-5468-4e7a-9478-9f6efe433e60" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseac39196343d7a", "javablobrenewblobleaseac1leaseapitestrenewblobleaseac391585671" ] + "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseac954199023aa", "javablobrenewblobleaseac1leaseapitestrenewblobleaseac95467755e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[3].json index 795b91f1f9b5..403d68fa8ce5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[3].json @@ -1,167 +1,188 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseaceeb281598ab?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ae5ab79b-0ce8-4a65-8e4c-60590ab13ca1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fede2b90-23f3-4611-aaba-e1e662da8169" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B27448263", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "ETag" : "0x8D8238097D89D03", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad541-901e-0077-6ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "ae5ab79b-0ce8-4a65-8e4c-60590ab13ca1" + "x-ms-request-id" : "49a8ca0e-401e-0062-6469-5553a5000000", + "Date" : "Wed, 08 Jul 2020 20:50:47 GMT", + "x-ms-client-request-id" : "fede2b90-23f3-4611-aaba-e1e662da8169" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseaceeb281598ab/javablobrenewblobleaseac1leaseapitestrenewblobleaseaceeb653927", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6/javablobrenewblobleaseac1leaseapitestrenewblobleaseacb22835434", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5f8060ae-6115-4fab-8e7c-689a6418bf1a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47a09f3c-0032-458b-ad3c-f6d673897c74", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "x-ms-version-id" : "2020-07-08T20:50:48.6599056Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:48 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", + "Date" : "Wed, 08 Jul 2020 20:50:48 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B274CB679", + "ETag" : "0x8D82380980B7590", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad555-901e-0077-7cf4-12b537000000", - "x-ms-client-request-id" : "5f8060ae-6115-4fab-8e7c-689a6418bf1a" + "x-ms-request-id" : "22f74fd3-601e-0038-7869-553542000000", + "x-ms-client-request-id" : "47a09f3c-0032-458b-ad3c-f6d673897c74" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6/javablobrenewblobleaseac1leaseapitestrenewblobleaseacb22835434?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b7247bdc-1d06-4f34-801d-85b5ef94ce23", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "776763c3-801e-000f-4269-55e7ee000000", + "Date" : "Wed, 08 Jul 2020 20:50:48 GMT", + "x-ms-client-request-id" : "b7247bdc-1d06-4f34-801d-85b5ef94ce23" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseaceeb281598ab/javablobrenewblobleaseac1leaseapitestrenewblobleaseaceeb653927", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6/javablobrenewblobleaseac1leaseapitestrenewblobleaseacb22835434", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6c88eb57-4091-4b35-a2ed-06974faa88fd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d08f9c3-2f71-40f7-81d2-c13781cccd7d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "x-ms-version-id" : "2020-07-08T20:50:48.6599056Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:48 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", + "Date" : "Wed, 08 Jul 2020 20:50:48 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B274CB679", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:03:51 GMT", + "ETag" : "0x8D82380980B7590", + "x-ms-creation-time" : "Wed, 08 Jul 2020 20:50:48 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ad55e-901e-0077-04f4-12b537000000", - "x-ms-client-request-id" : "6c88eb57-4091-4b35-a2ed-06974faa88fd", + "x-ms-request-id" : "17901feb-401e-005d-6e69-559b06000000", + "x-ms-client-request-id" : "5d08f9c3-2f71-40f7-81d2-c13781cccd7d", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseaceeb281598ab/javablobrenewblobleaseac1leaseapitestrenewblobleaseaceeb653927?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6/javablobrenewblobleaseac1leaseapitestrenewblobleaseacb22835434?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4958532f-e383-4f68-8123-d0b64ac30100" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d071eb68-ccdd-46ac-ab04-ab8e342f07a6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B274CB679", - "x-ms-lease-id" : "ca5b754f-fb7c-43e9-bf2c-9ab1faf3574c", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "ETag" : "0x8D82380980B7590", + "x-ms-lease-id" : "4008963c-d0a8-4a24-8462-50d76709f63e", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad564-901e-0077-09f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "4958532f-e383-4f68-8123-d0b64ac30100" + "x-ms-request-id" : "a6b22738-701e-000b-5769-556ae9000000", + "Date" : "Wed, 08 Jul 2020 20:50:49 GMT", + "x-ms-client-request-id" : "d071eb68-ccdd-46ac-ab04-ab8e342f07a6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseaceeb281598ab/javablobrenewblobleaseac1leaseapitestrenewblobleaseaceeb653927?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6/javablobrenewblobleaseac1leaseapitestrenewblobleaseacb22835434?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a97b3dda-82e3-41da-91ea-59be17b4aa44" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23d9cc53-5cd5-4c59-bb0d-ea059e270144" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B274CB679", - "x-ms-lease-id" : "ca5b754f-fb7c-43e9-bf2c-9ab1faf3574c", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "ETag" : "0x8D82380980B7590", + "x-ms-lease-id" : "4008963c-d0a8-4a24-8462-50d76709f63e", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad56b-901e-0077-0ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "a97b3dda-82e3-41da-91ea-59be17b4aa44" + "x-ms-request-id" : "8ac444b5-901e-0095-1069-557937000000", + "Date" : "Wed, 08 Jul 2020 20:50:49 GMT", + "x-ms-client-request-id" : "23d9cc53-5cd5-4c59-bb0d-ea059e270144" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "752ec88a-f74c-4115-933b-327a7a5f8ae6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3ac495a-4d02-4265-b3f3-cc533d4b4255" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad570-901e-0077-13f4-12b537000000", - "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseaceeb281598abWed, 15 Apr 2020 07:03:51 GMT\"0x8D7E10B27448263\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "752ec88a-f74c-4115-933b-327a7a5f8ae6", + "x-ms-request-id" : "08a532aa-c01e-00a7-7669-557940000000", + "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6Wed, 08 Jul 2020 20:50:48 GMT\"0x8D8238097D89D03\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:50:50 GMT", + "x-ms-client-request-id" : "c3ac495a-4d02-4265-b3f3-cc533d4b4255", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseaceeb281598ab?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e1313826-4994-41d9-b242-6ff9bd5ddb4e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d1f918a8-3beb-403e-b278-bdd15bc2be19" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad579-901e-0077-19f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:50 GMT", - "x-ms-client-request-id" : "e1313826-4994-41d9-b242-6ff9bd5ddb4e" + "x-ms-request-id" : "7f90ea29-201e-004b-2669-556dd1000000", + "Date" : "Wed, 08 Jul 2020 20:50:49 GMT", + "x-ms-client-request-id" : "d1f918a8-3beb-403e-b278-bdd15bc2be19" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseaceeb281598ab", "javablobrenewblobleaseac1leaseapitestrenewblobleaseaceeb653927" ] + "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseacb22086427c6", "javablobrenewblobleaseac1leaseapitestrenewblobleaseacb22835434" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[4].json index ce426f2a1306..15e9dd980001 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[4].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac785164582e9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac11e36942f17?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ffa567b5-b4d5-4bf4-824e-7f59c59acf3d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "62351b74-e22e-4e5f-9d3d-ea8fbdad082d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B27790C9A", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "ETag" : "0x8D82380998DA133", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad586-901e-0077-23f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "ffa567b5-b4d5-4bf4-824e-7f59c59acf3d" + "x-ms-request-id" : "215d58fb-301e-0035-2769-55fd96000000", + "Date" : "Wed, 08 Jul 2020 20:50:50 GMT", + "x-ms-client-request-id" : "62351b74-e22e-4e5f-9d3d-ea8fbdad082d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac785164582e9/javablobrenewblobleaseac1leaseapitestrenewblobleaseac785856444", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac11e36942f17/javablobrenewblobleaseac1leaseapitestrenewblobleaseac11e91179d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8ce219b8-55a4-4cff-a5c6-48f33b81c18a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32086d44-d654-4301-872d-27f812b57d87", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "x-ms-version-id" : "2020-07-08T20:50:51.5219536Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:51 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", + "Date" : "Wed, 08 Jul 2020 20:50:50 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B27814088", + "ETag" : "0x8D8238099C02C50", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad595-901e-0077-2cf4-12b537000000", - "x-ms-client-request-id" : "8ce219b8-55a4-4cff-a5c6-48f33b81c18a" + "x-ms-request-id" : "0346853d-001e-0097-6d69-55c78f000000", + "x-ms-client-request-id" : "32086d44-d654-4301-872d-27f812b57d87" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac785164582e9/javablobrenewblobleaseac1leaseapitestrenewblobleaseac785856444?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac11e36942f17/javablobrenewblobleaseac1leaseapitestrenewblobleaseac11e91179d?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4ac7c166-9163-48b2-b3be-081d09a3a29b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ea9f03f-c1cd-4f1c-b306-eaa09ba49581", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B27814088", - "x-ms-lease-id" : "cb6c76d3-fbca-402d-a792-176cd09816ea", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "44479e44-801e-0030-2169-552f4d000000", + "Date" : "Wed, 08 Jul 2020 20:50:50 GMT", + "x-ms-client-request-id" : "3ea9f03f-c1cd-4f1c-b306-eaa09ba49581" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac11e36942f17/javablobrenewblobleaseac1leaseapitestrenewblobleaseac11e91179d?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "11d187f2-81a7-43cb-80cf-4115b738fc13" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8238099C02C50", + "x-ms-lease-id" : "7870edbd-c135-484a-aa78-d352eb7d263c", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad59b-901e-0077-31f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "4ac7c166-9163-48b2-b3be-081d09a3a29b" + "x-ms-request-id" : "26c025fb-b01e-0092-5769-551554000000", + "Date" : "Wed, 08 Jul 2020 20:50:51 GMT", + "x-ms-client-request-id" : "11d187f2-81a7-43cb-80cf-4115b738fc13" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac785164582e9/javablobrenewblobleaseac1leaseapitestrenewblobleaseac785856444?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac11e36942f17/javablobrenewblobleaseac1leaseapitestrenewblobleaseac11e91179d?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bd95a370-cccb-4cb8-87c8-75cd8b30417b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "97516c76-3980-4823-b510-b46e91b7d77c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B27814088", - "x-ms-lease-id" : "cb6c76d3-fbca-402d-a792-176cd09816ea", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:51 GMT", + "ETag" : "0x8D8238099C02C50", + "x-ms-lease-id" : "7870edbd-c135-484a-aa78-d352eb7d263c", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad5ac-901e-0077-3df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "bd95a370-cccb-4cb8-87c8-75cd8b30417b" + "x-ms-request-id" : "ba46901c-201e-0090-1e69-55abec000000", + "Date" : "Wed, 08 Jul 2020 20:50:52 GMT", + "x-ms-client-request-id" : "97516c76-3980-4823-b510-b46e91b7d77c" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9b46d3fe-9579-40dd-abba-86322a236f35" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d901050d-7db3-4a0d-8516-c59d57cd9942" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad5b2-901e-0077-43f4-12b537000000", - "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseac785164582e9Wed, 15 Apr 2020 07:03:51 GMT\"0x8D7E10B27790C9A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "9b46d3fe-9579-40dd-abba-86322a236f35", + "x-ms-request-id" : "344bd981-a01e-007a-0669-558cc2000000", + "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseac11e36942f17Wed, 08 Jul 2020 20:50:51 GMT\"0x8D82380998DA133\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:50:52 GMT", + "x-ms-client-request-id" : "d901050d-7db3-4a0d-8516-c59d57cd9942", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac785164582e9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseac11e36942f17?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a99edb1c-357e-40b3-8c20-3ea45e38eb17" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f28b403-10bd-4ddd-9f3a-fcbeeb858752" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad5c2-901e-0077-4ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "a99edb1c-357e-40b3-8c20-3ea45e38eb17" + "x-ms-request-id" : "7e07f002-201e-0064-6769-55601a000000", + "Date" : "Wed, 08 Jul 2020 20:50:52 GMT", + "x-ms-client-request-id" : "9f28b403-10bd-4ddd-9f3a-fcbeeb858752" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseac785164582e9", "javablobrenewblobleaseac1leaseapitestrenewblobleaseac785856444" ] + "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseac11e36942f17", "javablobrenewblobleaseac1leaseapitestrenewblobleaseac11e91179d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[5].json new file mode 100644 index 000000000000..3361225a3afa --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseac[5].json @@ -0,0 +1,154 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacd4c13668568?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "68afa553-e905-4137-a87b-4f1dd35a89c1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D823809B07325D", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b4be8386-d01e-0012-2b69-55ea52000000", + "Date" : "Wed, 08 Jul 2020 20:50:53 GMT", + "x-ms-client-request-id" : "68afa553-e905-4137-a87b-4f1dd35a89c1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacd4c13668568/javablobrenewblobleaseac1leaseapitestrenewblobleaseacd4c949699", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d07f0eed-d1cb-4ace-b653-a70b3a28baa8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-08T20:50:54.0117346Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:54 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 08 Jul 2020 20:50:53 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D823809B3C1562", + "Content-Length" : "0", + "x-ms-request-id" : "a599d704-301e-009c-4b69-553ce4000000", + "x-ms-client-request-id" : "d07f0eed-d1cb-4ace-b653-a70b3a28baa8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacd4c13668568/javablobrenewblobleaseac1leaseapitestrenewblobleaseacd4c949699?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3907d166-b6fe-4380-87d8-104d76aa3359", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "5e53c60f-d01e-005f-0269-5525be000000", + "Date" : "Wed, 08 Jul 2020 20:50:53 GMT", + "x-ms-client-request-id" : "3907d166-b6fe-4380-87d8-104d76aa3359" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacd4c13668568/javablobrenewblobleaseac1leaseapitestrenewblobleaseacd4c949699?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9076705-bb65-4d08-bdf2-40129ecfbdbf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D823809B3C1562", + "x-ms-lease-id" : "1799a817-3fcc-414a-9383-27913dba438e", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:54 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "7e7c3bef-f01e-0015-0a69-558631000000", + "Date" : "Wed, 08 Jul 2020 20:50:53 GMT", + "x-ms-client-request-id" : "b9076705-bb65-4d08-bdf2-40129ecfbdbf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacd4c13668568/javablobrenewblobleaseac1leaseapitestrenewblobleaseacd4c949699?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c45c8327-3cb1-4795-b690-2739cf766825" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D823809B3C1562", + "x-ms-lease-id" : "1799a817-3fcc-414a-9383-27913dba438e", + "Last-Modified" : "Wed, 08 Jul 2020 20:50:54 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "409154bf-e01e-009f-2069-55dd80000000", + "Date" : "Wed, 08 Jul 2020 20:50:54 GMT", + "x-ms-client-request-id" : "c45c8327-3cb1-4795-b690-2739cf766825" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bbcd9e86-54ea-41c5-901f-17f00df79fbc" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b278a72a-201e-0039-5869-556a9e000000", + "Body" : "jtcrenewblobleaseacjtcrenewblobleaseac0leaseapitestrenewblobleaseacd4c13668568Wed, 08 Jul 2020 20:50:53 GMT\"0x8D823809B07325D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:50:54 GMT", + "x-ms-client-request-id" : "bbcd9e86-54ea-41c5-901f-17f00df79fbc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseac0leaseapitestrenewblobleaseacd4c13668568?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87f9068d-ecec-4160-9cc0-bd388619b19e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "0a90bc53-701e-00a2-5169-55ab9b000000", + "Date" : "Wed, 08 Jul 2020 20:50:55 GMT", + "x-ms-client-request-id" : "87f9068d-ecec-4160-9cc0-bd388619b19e" + }, + "Exception" : null + } ], + "variables" : [ "jtcrenewblobleaseac0leaseapitestrenewblobleaseacd4c13668568", "javablobrenewblobleaseac1leaseapitestrenewblobleaseacd4c949699" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[0].json index 241a9248dcdb..c7aafc7199c9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[0].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0592618803624041b548608?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail00477759bf59fe8ee74e7c9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fba7e5d5-1829-41dc-877a-5d3985ca9a32" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2a3a38cc-94da-4f0a-bfe6-496676ce5a59" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B27C67C0C", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:52 GMT", + "ETag" : "0x8D82380A3E4A931", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad5f5-901e-0077-79f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "fba7e5d5-1829-41dc-877a-5d3985ca9a32" + "x-ms-request-id" : "0a482452-501e-008a-1e69-55ca33000000", + "Date" : "Wed, 08 Jul 2020 20:51:08 GMT", + "x-ms-client-request-id" : "2a3a38cc-94da-4f0a-bfe6-496676ce5a59" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0592618803624041b548608/javablobrenewblobleaseacfail114292e2a3e0308f824c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail00477759bf59fe8ee74e7c9/javablobrenewblobleaseacfail12455789dfcf645e334d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cc513958-6a13-42e0-b52c-dad0092a1d30", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b60df1d-0b20-4576-b76c-c0917bc9680e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:52 GMT", + "x-ms-version-id" : "2020-07-08T20:51:09.2126135Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:08 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B27CFE883", + "ETag" : "0x8D82380A44B8DB7", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad60d-901e-0077-0bf4-12b537000000", - "x-ms-client-request-id" : "cc513958-6a13-42e0-b52c-dad0092a1d30" + "x-ms-request-id" : "04949d3e-001e-004c-7d69-5501b2000000", + "x-ms-client-request-id" : "9b60df1d-0b20-4576-b76c-c0917bc9680e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0592618803624041b548608/javablobrenewblobleaseacfail114292e2a3e0308f824c?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail00477759bf59fe8ee74e7c9/javablobrenewblobleaseacfail12455789dfcf645e334d?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "da97d6d4-cd8a-4b27-acea-eda010e13ed0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "81e6f350-9410-457a-868e-829408d5a5a4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B27CFE883", - "x-ms-lease-id" : "b28c30ed-c80f-4460-aada-6d06aa37d7e8", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:52 GMT", + "ETag" : "0x8D82380A44B8DB7", + "x-ms-lease-id" : "7e1d1c09-0c3b-4e20-b2c0-8784201051af", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad61c-901e-0077-18f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "da97d6d4-cd8a-4b27-acea-eda010e13ed0" + "x-ms-request-id" : "c471ca90-501e-0023-7469-550b41000000", + "Date" : "Wed, 08 Jul 2020 20:51:08 GMT", + "x-ms-client-request-id" : "81e6f350-9410-457a-868e-829408d5a5a4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0592618803624041b548608/javablobrenewblobleaseacfail114292e2a3e0308f824c?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail00477759bf59fe8ee74e7c9/javablobrenewblobleaseacfail12455789dfcf645e334d?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4c6683fa-6a08-4318-9e64-d5858a7c9d57" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fed21934-9463-423e-a1c7-5684c4639c58" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ad62c-901e-0077-27f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ad62c-901e-0077-27f4-12b537000000\nTime:2020-04-15T07:03:52.5905093Z", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "4c6683fa-6a08-4318-9e64-d5858a7c9d57", + "x-ms-request-id" : "5c8631f2-901e-0071-3569-5577a9000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:5c8631f2-901e-0071-3569-5577a9000000\nTime:2020-07-08T20:51:10.1564515Z", + "Date" : "Wed, 08 Jul 2020 20:51:10 GMT", + "x-ms-client-request-id" : "fed21934-9463-423e-a1c7-5684c4639c58", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8658e394-04e8-4076-bd44-b41c7a493474" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "202fe508-3685-49b0-8da4-a7d0a23c7705" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad63a-901e-0077-34f4-12b537000000", - "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail0592618803624041b548608Wed, 15 Apr 2020 07:03:52 GMT\"0x8D7E10B27C67C0C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "8658e394-04e8-4076-bd44-b41c7a493474", + "x-ms-request-id" : "8b0ebfd0-301e-0078-6f69-55327a000000", + "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail00477759bf59fe8ee74e7c9Wed, 08 Jul 2020 20:51:08 GMT\"0x8D82380A3E4A931\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:10 GMT", + "x-ms-client-request-id" : "202fe508-3685-49b0-8da4-a7d0a23c7705", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0592618803624041b548608?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail00477759bf59fe8ee74e7c9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bd6dd2dd-8345-43f1-9af3-e4170e9a83a3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "866a13e4-0346-498c-9c0a-ac0efe508aae" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad63f-901e-0077-39f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "bd6dd2dd-8345-43f1-9af3-e4170e9a83a3" + "x-ms-request-id" : "aaeef868-701e-009d-3b69-556338000000", + "Date" : "Wed, 08 Jul 2020 20:51:10 GMT", + "x-ms-client-request-id" : "866a13e4-0346-498c-9c0a-ac0efe508aae" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseacfail0592618803624041b548608", "javablobrenewblobleaseacfail114292e2a3e0308f824c" ] + "variables" : [ "jtcrenewblobleaseacfail00477759bf59fe8ee74e7c9", "javablobrenewblobleaseacfail12455789dfcf645e334d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[1].json index 1745e5cf2f98..89030a8ac00e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[1].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0302174295ce12775b4f058?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail08307734514a9ce5da440cb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "597c0000-c8ee-4f8e-b792-2c1204a8a613" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1bdffffa-9746-4edb-a78e-605fac9d6cb6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B27F2518B", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:52 GMT", + "ETag" : "0x8D82380A5AFFB0A", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad648-901e-0077-41f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "597c0000-c8ee-4f8e-b792-2c1204a8a613" + "x-ms-request-id" : "17c9e58b-801e-00a6-3c69-55269c000000", + "Date" : "Wed, 08 Jul 2020 20:51:11 GMT", + "x-ms-client-request-id" : "1bdffffa-9746-4edb-a78e-605fac9d6cb6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0302174295ce12775b4f058/javablobrenewblobleaseacfail173472fc610356479b4c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail08307734514a9ce5da440cb/javablobrenewblobleaseacfail171831539c6a43292c46", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27428415-fba1-408b-ad33-2563946a27ea", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ee41f77-87ff-41b5-a4ca-8df05c209461", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:52 GMT", + "x-ms-version-id" : "2020-07-08T20:51:11.8955318Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:11 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B27FA0FD7", + "ETag" : "0x8D82380A5E4EF36", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad656-901e-0077-4bf4-12b537000000", - "x-ms-client-request-id" : "27428415-fba1-408b-ad33-2563946a27ea" + "x-ms-request-id" : "156484eb-901e-005e-1969-557a62000000", + "x-ms-client-request-id" : "7ee41f77-87ff-41b5-a4ca-8df05c209461" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0302174295ce12775b4f058/javablobrenewblobleaseacfail173472fc610356479b4c?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail08307734514a9ce5da440cb/javablobrenewblobleaseacfail171831539c6a43292c46?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aaa9de65-3e8e-4d9a-96d9-903d02754a59" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ad6f950-3621-4f9c-baa6-ef6d155cb5fc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B27FA0FD7", - "x-ms-lease-id" : "aef6e422-6c58-441f-8ad8-05e8cd8839ca", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:52 GMT", + "ETag" : "0x8D82380A5E4EF36", + "x-ms-lease-id" : "c7480a4b-2c21-4e8b-b468-3079f19c2efb", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad66c-901e-0077-5df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "aaa9de65-3e8e-4d9a-96d9-903d02754a59" + "x-ms-request-id" : "da5e1320-501e-000c-0869-55068a000000", + "Date" : "Wed, 08 Jul 2020 20:51:12 GMT", + "x-ms-client-request-id" : "9ad6f950-3621-4f9c-baa6-ef6d155cb5fc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0302174295ce12775b4f058/javablobrenewblobleaseacfail173472fc610356479b4c?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail08307734514a9ce5da440cb/javablobrenewblobleaseacfail171831539c6a43292c46?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "be24792a-a903-4880-b759-7142bad6c362" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00e6be0c-0107-411d-ac34-d87be221e6af" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ad674-901e-0077-64f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ad674-901e-0077-64f4-12b537000000\nTime:2020-04-15T07:03:52.8607629Z", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "be24792a-a903-4880-b759-7142bad6c362", + "x-ms-request-id" : "8aac0ad6-c01e-001e-5b69-557d5a000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8aac0ad6-c01e-001e-5b69-557d5a000000\nTime:2020-07-08T20:51:12.6203899Z", + "Date" : "Wed, 08 Jul 2020 20:51:12 GMT", + "x-ms-client-request-id" : "00e6be0c-0107-411d-ac34-d87be221e6af", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eb3b47f4-b848-4a1f-a9eb-b238192a4ae7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed8997e3-134e-4f3a-adad-c345cec7dfc0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad679-901e-0077-69f4-12b537000000", - "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail0302174295ce12775b4f058Wed, 15 Apr 2020 07:03:52 GMT\"0x8D7E10B27F2518B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:51 GMT", - "x-ms-client-request-id" : "eb3b47f4-b848-4a1f-a9eb-b238192a4ae7", + "x-ms-request-id" : "a19dadf6-c01e-006c-5669-557a15000000", + "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail08307734514a9ce5da440cbWed, 08 Jul 2020 20:51:11 GMT\"0x8D82380A5AFFB0A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:12 GMT", + "x-ms-client-request-id" : "ed8997e3-134e-4f3a-adad-c345cec7dfc0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail0302174295ce12775b4f058?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail08307734514a9ce5da440cb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7bdf2b8e-c6e2-4c9d-8679-94b963453eb0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "22c13984-5785-473b-ab8d-211a33bc25d3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad67e-901e-0077-6df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "7bdf2b8e-c6e2-4c9d-8679-94b963453eb0" + "x-ms-request-id" : "e68ce412-701e-0056-2e69-55606d000000", + "Date" : "Wed, 08 Jul 2020 20:51:12 GMT", + "x-ms-client-request-id" : "22c13984-5785-473b-ab8d-211a33bc25d3" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseacfail0302174295ce12775b4f058", "javablobrenewblobleaseacfail173472fc610356479b4c" ] + "variables" : [ "jtcrenewblobleaseacfail08307734514a9ce5da440cb", "javablobrenewblobleaseacfail171831539c6a43292c46" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[2].json index a0c01c76a7fc..723eb1b49dbc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[2].json @@ -1,91 +1,92 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail03972427fa3b36b4b24f15b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail076217db6003f8212948d88?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "efa82a9e-b1f4-4c5b-b5e0-42bc5e867650" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8fcfabd-1cc2-4658-aeac-642b1614fb93" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B281CC72F", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:53 GMT", + "ETag" : "0x8D82380A6F48E79", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad694-901e-0077-7df4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "efa82a9e-b1f4-4c5b-b5e0-42bc5e867650" + "x-ms-request-id" : "0a3d91d5-301e-0068-2e69-55f712000000", + "Date" : "Wed, 08 Jul 2020 20:51:13 GMT", + "x-ms-client-request-id" : "f8fcfabd-1cc2-4658-aeac-642b1614fb93" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail03972427fa3b36b4b24f15b/javablobrenewblobleaseacfail113503f761285d0bdb41", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail076217db6003f8212948d88/javablobrenewblobleaseacfail1365634ba0aee3e66848", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f8f19413-1b09-48e9-a141-7dd29fbe7632", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b0991d8-6188-4940-93ba-bb3b443ac016", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:53 GMT", + "x-ms-version-id" : "2020-07-08T20:51:14.0280597Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:14 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:13 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B284582C0", + "ETag" : "0x8D82380A72A5515", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad6db-901e-0077-35f4-12b537000000", - "x-ms-client-request-id" : "f8f19413-1b09-48e9-a141-7dd29fbe7632" + "x-ms-request-id" : "67bab7b8-b01e-0066-2169-55dea2000000", + "x-ms-client-request-id" : "5b0991d8-6188-4940-93ba-bb3b443ac016" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail03972427fa3b36b4b24f15b/javablobrenewblobleaseacfail113503f761285d0bdb41?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail076217db6003f8212948d88/javablobrenewblobleaseacfail1365634ba0aee3e66848?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0c475925-29dd-40e5-8384-d6ddcb9d9736" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "26f8f1d0-4f32-445e-b4ff-315dab7c7420" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B284582C0", - "x-ms-lease-id" : "71ff4b2b-4126-409a-b23e-5fef2f77431a", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:53 GMT", + "ETag" : "0x8D82380A72A5515", + "x-ms-lease-id" : "c18c645e-a83e-4078-9547-f7f1be0039ba", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad6e6-901e-0077-3cf4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "0c475925-29dd-40e5-8384-d6ddcb9d9736" + "x-ms-request-id" : "4bb54431-101e-0050-4969-5553d2000000", + "Date" : "Wed, 08 Jul 2020 20:51:13 GMT", + "x-ms-client-request-id" : "26f8f1d0-4f32-445e-b4ff-315dab7c7420" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail03972427fa3b36b4b24f15b/javablobrenewblobleaseacfail113503f761285d0bdb41?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail076217db6003f8212948d88/javablobrenewblobleaseacfail1365634ba0aee3e66848?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "acd71dfe-aa41-4bd1-9a6b-d41603b51b7b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0f2db6f-70b0-4076-9238-de8fae9031c4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ad6f0-901e-0077-45f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ad6f0-901e-0077-45f4-12b537000000\nTime:2020-04-15T07:03:53.3692405Z", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "acd71dfe-aa41-4bd1-9a6b-d41603b51b7b", + "x-ms-request-id" : "6bf1d11d-901e-004e-2269-55bf0a000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6bf1d11d-901e-004e-2269-55bf0a000000\nTime:2020-07-08T20:51:14.7092580Z", + "Date" : "Wed, 08 Jul 2020 20:51:14 GMT", + "x-ms-client-request-id" : "b0f2db6f-70b0-4076-9238-de8fae9031c4", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +94,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "816a5394-c642-4c72-ab45-6881bef300d2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ab83927-08f7-4014-99fa-0a5045f4243b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad6fc-901e-0077-50f4-12b537000000", - "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail03972427fa3b36b4b24f15bWed, 15 Apr 2020 07:03:53 GMT\"0x8D7E10B281CC72F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "816a5394-c642-4c72-ab45-6881bef300d2", + "x-ms-request-id" : "255eff86-001e-00a8-6269-550f2c000000", + "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail076217db6003f8212948d88Wed, 08 Jul 2020 20:51:13 GMT\"0x8D82380A6F48E79\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:14 GMT", + "x-ms-client-request-id" : "7ab83927-08f7-4014-99fa-0a5045f4243b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail03972427fa3b36b4b24f15b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail076217db6003f8212948d88?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "06878732-adb4-4e19-9821-fef9db453db9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e030f82-e41d-4d61-961b-fc354b93c1a0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad70b-901e-0077-59f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "06878732-adb4-4e19-9821-fef9db453db9" + "x-ms-request-id" : "67884fa3-001e-0087-1e69-5502e7000000", + "Date" : "Wed, 08 Jul 2020 20:51:14 GMT", + "x-ms-client-request-id" : "3e030f82-e41d-4d61-961b-fc354b93c1a0" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseacfail03972427fa3b36b4b24f15b", "javablobrenewblobleaseacfail113503f761285d0bdb41" ] + "variables" : [ "jtcrenewblobleaseacfail076217db6003f8212948d88", "javablobrenewblobleaseacfail1365634ba0aee3e66848" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[3].json index 97f1980196fb..be25ee6ad04b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[3].json @@ -1,123 +1,125 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail06139251daa1b3f64543fe9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail020489dbe78ff43bea48dc8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "796d48e5-7ab8-4079-b2e0-f117211ab5c2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "02b57932-ceb1-48ae-bdf2-6e3a58957a2f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B286CF640", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:53 GMT", + "ETag" : "0x8D82380A82F7DF6", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:15 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad721-901e-0077-69f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "796d48e5-7ab8-4079-b2e0-f117211ab5c2" + "x-ms-request-id" : "42dd367b-b01e-0049-0f69-55d369000000", + "Date" : "Wed, 08 Jul 2020 20:51:15 GMT", + "x-ms-client-request-id" : "02b57932-ceb1-48ae-bdf2-6e3a58957a2f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail06139251daa1b3f64543fe9/javablobrenewblobleaseacfail103306fc7f025697ed4c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail020489dbe78ff43bea48dc8/javablobrenewblobleaseacfail1230085db5ce38c09a48", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "53bdb786-d7f6-4a6c-bb6c-d6e9ab5b8aca", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0c4a7b3d-09d7-4c69-90e7-a0b36b84d12d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:53 GMT", + "x-ms-version-id" : "2020-07-08T20:51:16.0885336Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:16 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:15 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E10B2875C609", + "ETag" : "0x8D82380A864BC58", "Content-Length" : "0", - "x-ms-request-id" : "cc6ad72b-901e-0077-71f4-12b537000000", - "x-ms-client-request-id" : "53bdb786-d7f6-4a6c-bb6c-d6e9ab5b8aca" + "x-ms-request-id" : "5ddfeec9-101e-006f-2169-559b71000000", + "x-ms-client-request-id" : "0c4a7b3d-09d7-4c69-90e7-a0b36b84d12d" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail06139251daa1b3f64543fe9/javablobrenewblobleaseacfail103306fc7f025697ed4c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail020489dbe78ff43bea48dc8/javablobrenewblobleaseacfail1230085db5ce38c09a48", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "71fd7bf6-df9b-4195-9ac4-da1828e43a3e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7433a30-4f1a-4052-838f-3568799e34f6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:53 GMT", + "x-ms-version-id" : "2020-07-08T20:51:16.0885336Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:16 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", + "Date" : "Wed, 08 Jul 2020 20:51:16 GMT", "x-ms-blob-type" : "BlockBlob", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", - "ETag" : "0x8D7E10B2875C609", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:03:53 GMT", + "ETag" : "0x8D82380A864BC58", + "x-ms-creation-time" : "Wed, 08 Jul 2020 20:51:16 GMT", "Content-Length" : "7", - "x-ms-request-id" : "cc6ad738-901e-0077-7cf4-12b537000000", - "x-ms-client-request-id" : "71fd7bf6-df9b-4195-9ac4-da1828e43a3e", + "x-ms-request-id" : "48566b50-101e-001d-1669-559c3e000000", + "x-ms-client-request-id" : "d7433a30-4f1a-4052-838f-3568799e34f6", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail06139251daa1b3f64543fe9/javablobrenewblobleaseacfail103306fc7f025697ed4c?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail020489dbe78ff43bea48dc8/javablobrenewblobleaseacfail1230085db5ce38c09a48?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8c253699-cd13-41a8-9e56-82469a0113ce" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47ef0ad1-1b57-403b-be13-e95d0ac15f07" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10B2875C609", - "x-ms-lease-id" : "7382a12c-3cda-4300-9670-c967fccdeae5", - "Last-Modified" : "Wed, 15 Apr 2020 07:03:53 GMT", + "ETag" : "0x8D82380A864BC58", + "x-ms-lease-id" : "ff4e8b8e-a1fa-44ce-804e-2e6ef4e896f7", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "cc6ad747-901e-0077-07f4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "8c253699-cd13-41a8-9e56-82469a0113ce" + "x-ms-request-id" : "7ddc2456-001e-002e-6b69-55c395000000", + "Date" : "Wed, 08 Jul 2020 20:51:16 GMT", + "x-ms-client-request-id" : "47ef0ad1-1b57-403b-be13-e95d0ac15f07" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail06139251daa1b3f64543fe9/javablobrenewblobleaseacfail103306fc7f025697ed4c?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail020489dbe78ff43bea48dc8/javablobrenewblobleaseacfail1230085db5ce38c09a48?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f50d00ed-7eb4-4ae3-b7a1-f1948b65f05d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e698491c-1e63-4975-9856-ce1f63cc634e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "cc6ad752-901e-0077-10f4-12b537000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:cc6ad752-901e-0077-10f4-12b537000000\nTime:2020-04-15T07:03:53.7345835Z", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "f50d00ed-7eb4-4ae3-b7a1-f1948b65f05d", + "x-ms-request-id" : "fd609f08-b01e-0004-1b69-551c85000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:fd609f08-b01e-0004-1b69-551c85000000\nTime:2020-07-08T20:51:17.2015886Z", + "Date" : "Wed, 08 Jul 2020 20:51:16 GMT", + "x-ms-client-request-id" : "e698491c-1e63-4975-9856-ce1f63cc634e", "Content-Type" : "application/xml" }, "Exception" : null @@ -125,43 +127,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "13590ec3-84c2-447f-b852-06ba5ac2d6ba" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c8299bb-7dd0-4b9d-b403-79a74a3416a8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "cc6ad75c-901e-0077-18f4-12b537000000", - "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail06139251daa1b3f64543fe9Wed, 15 Apr 2020 07:03:53 GMT\"0x8D7E10B286CF640\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "13590ec3-84c2-447f-b852-06ba5ac2d6ba", + "x-ms-request-id" : "d8107efe-d01e-0002-6769-552f3a000000", + "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail020489dbe78ff43bea48dc8Wed, 08 Jul 2020 20:51:15 GMT\"0x8D82380A82F7DF6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:17 GMT", + "x-ms-client-request-id" : "1c8299bb-7dd0-4b9d-b403-79a74a3416a8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail06139251daa1b3f64543fe9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail020489dbe78ff43bea48dc8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "400a846e-0eef-436e-af5b-c83caf95c3bf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4281038f-88a9-476c-a983-3a72a436b959" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "cc6ad777-901e-0077-2ef4-12b537000000", - "Date" : "Wed, 15 Apr 2020 07:03:52 GMT", - "x-ms-client-request-id" : "400a846e-0eef-436e-af5b-c83caf95c3bf" + "x-ms-request-id" : "a5b97311-401e-0000-1969-559182000000", + "Date" : "Wed, 08 Jul 2020 20:51:17 GMT", + "x-ms-client-request-id" : "4281038f-88a9-476c-a983-3a72a436b959" }, "Exception" : null } ], - "variables" : [ "jtcrenewblobleaseacfail06139251daa1b3f64543fe9", "javablobrenewblobleaseacfail103306fc7f025697ed4c" ] + "variables" : [ "jtcrenewblobleaseacfail020489dbe78ff43bea48dc8", "javablobrenewblobleaseacfail1230085db5ce38c09a48" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[4].json new file mode 100644 index 000000000000..99a5209e9dde --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/LeaseAPITestrenewblobleaseacfail[4].json @@ -0,0 +1,135 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail008391ef8aadac98ca4f96b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "886116d3-6b42-407b-a3a2-d22c0439f232" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380A9B85EB2", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:18 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "29141f4c-e01e-0026-6c69-55d99a000000", + "Date" : "Wed, 08 Jul 2020 20:51:17 GMT", + "x-ms-client-request-id" : "886116d3-6b42-407b-a3a2-d22c0439f232" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail008391ef8aadac98ca4f96b/javablobrenewblobleaseacfail127186e3b0779dbd1047", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc1b3c7c-38e4-445c-bc9e-540af7139e57", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-08T20:51:18.6934007Z", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:18 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 08 Jul 2020 20:51:18 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D82380A9F234F7", + "Content-Length" : "0", + "x-ms-request-id" : "34c28d25-401e-0010-4669-5554ea000000", + "x-ms-client-request-id" : "bc1b3c7c-38e4-445c-bc9e-540af7139e57" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail008391ef8aadac98ca4f96b/javablobrenewblobleaseacfail127186e3b0779dbd1047?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40c2e72e-6298-4089-b853-f5b1a004d0f0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82380A9F234F7", + "x-ms-lease-id" : "0eea45b7-86aa-4756-8b4d-5843388a5c7d", + "Last-Modified" : "Wed, 08 Jul 2020 20:51:18 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c107fbd7-a01e-0037-6869-55432e000000", + "Date" : "Wed, 08 Jul 2020 20:51:18 GMT", + "x-ms-client-request-id" : "40c2e72e-6298-4089-b853-f5b1a004d0f0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail008391ef8aadac98ca4f96b/javablobrenewblobleaseacfail127186e3b0779dbd1047?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32badd78-32af-4288-9d16-3f35e88a85e5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "23dbc11f-801e-0099-4e69-55ee3f000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:23dbc11f-801e-0099-4e69-55ee3f000000\nTime:2020-07-08T20:51:19.3729988Z", + "Date" : "Wed, 08 Jul 2020 20:51:18 GMT", + "x-ms-client-request-id" : "32badd78-32af-4288-9d16-3f35e88a85e5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcrenewblobleaseacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d57d5203-e828-441f-8a0b-5ccadce98da6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "0fd3f60d-a01e-0027-4c69-558646000000", + "Body" : "jtcrenewblobleaseacfailjtcrenewblobleaseacfail008391ef8aadac98ca4f96bWed, 08 Jul 2020 20:51:18 GMT\"0x8D82380A9B85EB2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 08 Jul 2020 20:51:19 GMT", + "x-ms-client-request-id" : "d57d5203-e828-441f-8a0b-5ccadce98da6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcrenewblobleaseacfail008391ef8aadac98ca4f96b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "56cc86a2-80ce-4391-9d34-48cd75206d85" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "86f46938-401e-004d-2369-555e6e000000", + "Date" : "Wed, 08 Jul 2020 20:51:19 GMT", + "x-ms-client-request-id" : "56cc86a2-80ce-4391-9d34-48cd75206d85" + }, + "Exception" : null + } ], + "variables" : [ "jtcrenewblobleaseacfail008391ef8aadac98ca4f96b", "javablobrenewblobleaseacfail127186e3b0779dbd1047" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[0].json index 45e50b7d45ce..6af8fb04e7de 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[0].json @@ -1,110 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0e541727883b7c9bc1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac580528499c5f94ced0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "33aeba06-5427-450d-a1aa-ac911dc42f43" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6545df06-32e0-4cda-bfe9-ca50421bc481" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC5B154F6", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:45 GMT", + "ETag" : "0x8D8274F4C8ADC83", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:01 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abb82-c01e-00ec-2cf7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "33aeba06-5427-450d-a1aa-ac911dc42f43" + "x-ms-request-id" : "efcf7323-401e-004d-4438-595e6e000000", + "Date" : "Mon, 13 Jul 2020 17:08:01 GMT", + "x-ms-client-request-id" : "6545df06-32e0-4cda-bfe9-ca50421bc481" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0e541727883b7c9bc1/javablobcreateac1pageblobapitestcreateac0e513041670c167", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac580528499c5f94ced0/javablobcreateac1pageblobapitestcreateac58011824da5028a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c54457b8-9031-42ee-87af-f046efee8051" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b46184f5-22ea-417b-9d2c-0735233d8927" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC5B84FDE", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:45 GMT", + "ETag" : "0x8D8274F4CEC93F5", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:01 GMT", + "x-ms-version-id" : "2020-07-13T17:08:01.9397621Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abb9a-c01e-00ec-3ff7-12380f000000", + "x-ms-request-id" : "e1ce2a3c-d01e-004f-0c38-59e0d6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "c54457b8-9031-42ee-87af-f046efee8051" + "Date" : "Mon, 13 Jul 2020 17:08:01 GMT", + "x-ms-client-request-id" : "b46184f5-22ea-417b-9d2c-0735233d8927" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0e541727883b7c9bc1/javablobcreateac1pageblobapitestcreateac0e513041670c167", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac580528499c5f94ced0/javablobcreateac1pageblobapitestcreateac58011824da5028a?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "626ab796-dd2f-4bc2-bfea-4bafc1662089" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "22416341-162e-4bfc-bb45-60867c9117bf", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC5BF2F54", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:45 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c1873c73-a01e-008e-1838-594734000000", + "Date" : "Mon, 13 Jul 2020 17:08:01 GMT", + "x-ms-client-request-id" : "22416341-162e-4bfc-bb45-60867c9117bf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac580528499c5f94ced0/javablobcreateac1pageblobapitestcreateac58011824da5028a", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0d806fe-56c8-475a-be30-44df0347ee64" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F4D769D7D", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:02 GMT", + "x-ms-version-id" : "2020-07-13T17:08:02.8454029Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abba2-c01e-00ec-45f7-12380f000000", + "x-ms-request-id" : "a830efdd-201e-0090-4c38-59abec000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "626ab796-dd2f-4bc2-bfea-4bafc1662089" + "Date" : "Mon, 13 Jul 2020 17:08:02 GMT", + "x-ms-client-request-id" : "b0d806fe-56c8-475a-be30-44df0347ee64" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e337fbb7-8112-42eb-9a3d-bf5cba209288" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16d96760-6672-4b26-8151-080d259f67c6" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abbab-c01e-00ec-4ef7-12380f000000", - "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac0e541727883b7c9bc1Wed, 15 Apr 2020 07:29:45 GMT\"0x8D7E10EC5B154F6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "e337fbb7-8112-42eb-9a3d-bf5cba209288", + "x-ms-request-id" : "8adabac3-001e-002e-1338-59c395000000", + "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac580528499c5f94ced0Mon, 13 Jul 2020 17:08:01 GMT\"0x8D8274F4C8ADC83\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:08:02 GMT", + "x-ms-client-request-id" : "16d96760-6672-4b26-8151-080d259f67c6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0e541727883b7c9bc1?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac580528499c5f94ced0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d3133fcb-6da5-4ceb-af5d-d1dd024245b1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7108ebf-ec22-4f70-9dcb-bfe84758b0f7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abbb9-c01e-00ec-5af7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "d3133fcb-6da5-4ceb-af5d-d1dd024245b1" + "x-ms-request-id" : "58d6a9a6-c01e-0031-1738-597091000000", + "Date" : "Mon, 13 Jul 2020 17:08:02 GMT", + "x-ms-client-request-id" : "f7108ebf-ec22-4f70-9dcb-bfe84758b0f7" }, "Exception" : null } ], - "variables" : [ "jtccreateac0pageblobapitestcreateac0e541727883b7c9bc1", "javablobcreateac1pageblobapitestcreateac0e513041670c167" ] + "variables" : [ "jtccreateac0pageblobapitestcreateac580528499c5f94ced0", "javablobcreateac1pageblobapitestcreateac58011824da5028a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[1].json index 51d20411529a..c2b0039aef7d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[1].json @@ -1,110 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac24890804829fc1fbda?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac44b35213bdbb420584?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "29a09912-bd42-40ea-9b75-1f8fb4d5b2db" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b051a536-cc0a-4176-88fa-35250c5630d8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC5D47600", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F4E475826", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:04 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abbcc-c01e-00ec-6cf7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "29a09912-bd42-40ea-9b75-1f8fb4d5b2db" + "x-ms-request-id" : "a41ec48c-801e-001f-6c38-592286000000", + "Date" : "Mon, 13 Jul 2020 17:08:04 GMT", + "x-ms-client-request-id" : "b051a536-cc0a-4176-88fa-35250c5630d8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac24890804829fc1fbda/javablobcreateac1pageblobapitestcreateac24828145e9e9db0", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac44b35213bdbb420584/javablobcreateac1pageblobapitestcreateac44b54409bbc3970", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f33e4d05-c065-405d-85cd-b643dd288e23" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2742e9ff-9c8b-490e-b350-c02187c0ba4a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC5DC5B40", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F4E7F3D09", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:04 GMT", + "x-ms-version-id" : "2020-07-13T17:08:04.5786377Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abbdc-c01e-00ec-7af7-12380f000000", + "x-ms-request-id" : "e1ef7711-601e-004a-0c38-59320d000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "f33e4d05-c065-405d-85cd-b643dd288e23" + "Date" : "Mon, 13 Jul 2020 17:08:04 GMT", + "x-ms-client-request-id" : "2742e9ff-9c8b-490e-b350-c02187c0ba4a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac24890804829fc1fbda/javablobcreateac1pageblobapitestcreateac24828145e9e9db0", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac44b35213bdbb420584/javablobcreateac1pageblobapitestcreateac44b54409bbc3970?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "98ab4e42-5a2b-4d80-bca6-cabacf08c0f3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8928d5c1-d6f2-4e09-a3cc-63cb01a66472", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC5E388EE", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2220c73b-a01e-00a1-4638-594aff000000", + "Date" : "Mon, 13 Jul 2020 17:08:03 GMT", + "x-ms-client-request-id" : "8928d5c1-d6f2-4e09-a3cc-63cb01a66472" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac44b35213bdbb420584/javablobcreateac1pageblobapitestcreateac44b54409bbc3970", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3dc5c9c4-e00c-44f9-ac06-238dba800e22" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F4EF23812", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:05 GMT", + "x-ms-version-id" : "2020-07-13T17:08:05.3341755Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abbeb-c01e-00ec-07f7-12380f000000", + "x-ms-request-id" : "7bd23471-601e-0075-7338-59faae000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "98ab4e42-5a2b-4d80-bca6-cabacf08c0f3" + "Date" : "Mon, 13 Jul 2020 17:08:04 GMT", + "x-ms-client-request-id" : "3dc5c9c4-e00c-44f9-ac06-238dba800e22" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c539c9c4-af8f-4d32-a7e2-b2b031c38efe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "008ba4fa-90db-43f4-a39c-1da5a6ffa351" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abbfa-c01e-00ec-14f7-12380f000000", - "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac24890804829fc1fbdaWed, 15 Apr 2020 07:29:46 GMT\"0x8D7E10EC5D47600\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "c539c9c4-af8f-4d32-a7e2-b2b031c38efe", + "x-ms-request-id" : "f234c42d-301e-008c-6238-59f98c000000", + "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac44b35213bdbb420584Mon, 13 Jul 2020 17:08:04 GMT\"0x8D8274F4E475826\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:08:05 GMT", + "x-ms-client-request-id" : "008ba4fa-90db-43f4-a39c-1da5a6ffa351", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac24890804829fc1fbda?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac44b35213bdbb420584?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "80d012a1-e4d3-4b0f-a896-6e5e3ea82550" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9ce2d724-0114-48f0-be87-84b6854dab2c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abc0e-c01e-00ec-25f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "80d012a1-e4d3-4b0f-a896-6e5e3ea82550" + "x-ms-request-id" : "c2d20ad1-a01e-007a-7638-598cc2000000", + "Date" : "Mon, 13 Jul 2020 17:08:05 GMT", + "x-ms-client-request-id" : "9ce2d724-0114-48f0-be87-84b6854dab2c" }, "Exception" : null } ], - "variables" : [ "jtccreateac0pageblobapitestcreateac24890804829fc1fbda", "javablobcreateac1pageblobapitestcreateac24828145e9e9db0" ] + "variables" : [ "jtccreateac0pageblobapitestcreateac44b35213bdbb420584", "javablobcreateac1pageblobapitestcreateac44b54409bbc3970" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[2].json index 58e516564f5d..0b387d4a4765 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[2].json @@ -1,110 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac943479220193c9d414?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac16f35256dc4db3a9ae?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b6576b85-f7a3-4787-baf4-ce501894ac26" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8df4a57d-92b2-4fa1-b183-32cf1a9b91e1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC5F9E182", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F4F91CE5D", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abc1d-c01e-00ec-31f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "b6576b85-f7a3-4787-baf4-ce501894ac26" + "x-ms-request-id" : "f832f745-101e-0040-1638-5996ba000000", + "Date" : "Mon, 13 Jul 2020 17:08:05 GMT", + "x-ms-client-request-id" : "8df4a57d-92b2-4fa1-b183-32cf1a9b91e1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac943479220193c9d414/javablobcreateac1pageblobapitestcreateac9435542656d34d8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac16f35256dc4db3a9ae/javablobcreateac1pageblobapitestcreateac16f16982a420505", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "78654627-f274-4a77-b983-4c0104b4c951" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f853452-1cd4-474c-83eb-c44a7777e604" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC6008DB5", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F4FCC1DFD", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:06 GMT", + "x-ms-version-id" : "2020-07-13T17:08:06.7611927Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abc31-c01e-00ec-40f7-12380f000000", + "x-ms-request-id" : "06cac209-101e-007f-3338-595e19000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "78654627-f274-4a77-b983-4c0104b4c951" + "Date" : "Mon, 13 Jul 2020 17:08:06 GMT", + "x-ms-client-request-id" : "2f853452-1cd4-474c-83eb-c44a7777e604" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac943479220193c9d414/javablobcreateac1pageblobapitestcreateac9435542656d34d8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac16f35256dc4db3a9ae/javablobcreateac1pageblobapitestcreateac16f16982a420505?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8732c97b-aaf5-47cb-9c96-edea44ee44cd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2ecdc191-d233-4a1f-a0e4-54965afbf9fc", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC60AA247", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "89cc74b0-b01e-0059-5138-591601000000", + "Date" : "Mon, 13 Jul 2020 17:08:07 GMT", + "x-ms-client-request-id" : "2ecdc191-d233-4a1f-a0e4-54965afbf9fc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac16f35256dc4db3a9ae/javablobcreateac1pageblobapitestcreateac16f16982a420505", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0588bef3-fec8-49f7-9dbb-70aa451bdcc6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F5050CF85", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:07 GMT", + "x-ms-version-id" : "2020-07-13T17:08:07.6308117Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abc44-c01e-00ec-53f7-12380f000000", + "x-ms-request-id" : "a68959f8-701e-000b-1438-596ae9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "8732c97b-aaf5-47cb-9c96-edea44ee44cd" + "Date" : "Mon, 13 Jul 2020 17:08:07 GMT", + "x-ms-client-request-id" : "0588bef3-fec8-49f7-9dbb-70aa451bdcc6" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "227fc552-251d-4b57-823d-a5f56067982e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "33c3e85a-ddf7-4f84-bce1-87ea88a6ad14" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abc4c-c01e-00ec-5bf7-12380f000000", - "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac943479220193c9d414Wed, 15 Apr 2020 07:29:46 GMT\"0x8D7E10EC5F9E182\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "227fc552-251d-4b57-823d-a5f56067982e", + "x-ms-request-id" : "be64ba72-c01e-000e-3738-59b832000000", + "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac16f35256dc4db3a9aeMon, 13 Jul 2020 17:08:06 GMT\"0x8D8274F4F91CE5D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:08:07 GMT", + "x-ms-client-request-id" : "33c3e85a-ddf7-4f84-bce1-87ea88a6ad14", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac943479220193c9d414?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac16f35256dc4db3a9ae?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "644c45e2-6226-4507-93ee-4ffcf82fb9d9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f410865-453c-4bc5-8ea1-a6caa638e839" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abc58-c01e-00ec-66f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "644c45e2-6226-4507-93ee-4ffcf82fb9d9" + "x-ms-request-id" : "8ee01f81-301e-00a3-3e38-59f447000000", + "Date" : "Mon, 13 Jul 2020 17:08:07 GMT", + "x-ms-client-request-id" : "6f410865-453c-4bc5-8ea1-a6caa638e839" }, "Exception" : null } ], - "variables" : [ "jtccreateac0pageblobapitestcreateac943479220193c9d414", "javablobcreateac1pageblobapitestcreateac9435542656d34d8" ] + "variables" : [ "jtccreateac0pageblobapitestcreateac16f35256dc4db3a9ae", "javablobcreateac1pageblobapitestcreateac16f16982a420505" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[3].json index b5daffb4e871..73d639065b9b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[3].json @@ -1,140 +1,162 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacba2350720791d30f7d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacacd7790178de4384dd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8e7c3a7e-9ab8-485f-b72c-5cde8ccaf144" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b419f94d-6001-45b9-a768-2b1631ca93b9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC61F4CFB", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F50F512E0", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abc66-c01e-00ec-71f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "8e7c3a7e-9ab8-485f-b72c-5cde8ccaf144" + "x-ms-request-id" : "f120f70d-f01e-003a-0738-598bfa000000", + "Date" : "Mon, 13 Jul 2020 17:08:08 GMT", + "x-ms-client-request-id" : "b419f94d-6001-45b9-a768-2b1631ca93b9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacba2350720791d30f7d/javablobcreateac1pageblobapitestcreateacba2100132017066", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacacd7790178de4384dd/javablobcreateac1pageblobapitestcreateacacd62757fd0bf83", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "010ff521-4224-45ee-8269-36ac9c4ed137" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52d3be83-01d0-46aa-afff-89643c4fe735" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC625F8F9", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F5139853B", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:09 GMT", + "x-ms-version-id" : "2020-07-13T17:08:09.1548987Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abc79-c01e-00ec-80f7-12380f000000", + "x-ms-request-id" : "56b2a27a-f01e-002a-5538-594e92000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "010ff521-4224-45ee-8269-36ac9c4ed137" + "Date" : "Mon, 13 Jul 2020 17:08:08 GMT", + "x-ms-client-request-id" : "52d3be83-01d0-46aa-afff-89643c4fe735" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacacd7790178de4384dd/javablobcreateac1pageblobapitestcreateacacd62757fd0bf83?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "051f0b41-7e4a-402b-8840-9735bea92df3", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a074647c-501e-0041-6338-59c966000000", + "Date" : "Mon, 13 Jul 2020 17:08:09 GMT", + "x-ms-client-request-id" : "051f0b41-7e4a-402b-8840-9735bea92df3" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacba2350720791d30f7d/javablobcreateac1pageblobapitestcreateacba2100132017066", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacacd7790178de4384dd/javablobcreateac1pageblobapitestcreateacacd62757fd0bf83", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2741af69-f5f5-47ae-b06f-2b038b4a89d3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a30e01b-b5ee-4b8c-8441-abb19a32ef45" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "x-ms-version-id" : "2020-07-13T17:08:09.1548987Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:09 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", + "Date" : "Mon, 13 Jul 2020 17:08:09 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10EC625F8F9", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F5139853B", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:08:09 GMT", "Content-Length" : "512", - "x-ms-request-id" : "8e3abc85-c01e-00ec-0bf7-12380f000000", - "x-ms-client-request-id" : "2741af69-f5f5-47ae-b06f-2b038b4a89d3", + "x-ms-request-id" : "3022ad05-301e-0057-0338-593fb1000000", + "x-ms-client-request-id" : "5a30e01b-b5ee-4b8c-8441-abb19a32ef45", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacba2350720791d30f7d/javablobcreateac1pageblobapitestcreateacba2100132017066", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacacd7790178de4384dd/javablobcreateac1pageblobapitestcreateacacd62757fd0bf83", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b51ae289-398e-4431-abec-259dc6f678cd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8be63ff-fc73-47ab-b1f6-85d8c6b6ddd7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC632A633", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F51E8A9DB", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:10 GMT", + "x-ms-version-id" : "2020-07-13T17:08:10.3047155Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abc95-c01e-00ec-16f7-12380f000000", + "x-ms-request-id" : "7df565bc-a01e-0045-4438-594461000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "b51ae289-398e-4431-abec-259dc6f678cd" + "Date" : "Mon, 13 Jul 2020 17:08:09 GMT", + "x-ms-client-request-id" : "f8be63ff-fc73-47ab-b1f6-85d8c6b6ddd7" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6c61dbb8-56b5-4bf5-94c0-63881d223773" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "680bc5bf-52c5-4760-ab21-58f1d9927479" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abc9f-c01e-00ec-20f7-12380f000000", - "Body" : "jtccreateacjtccreateac0pageblobapitestcreateacba2350720791d30f7dWed, 15 Apr 2020 07:29:46 GMT\"0x8D7E10EC61F4CFB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "6c61dbb8-56b5-4bf5-94c0-63881d223773", + "x-ms-request-id" : "ebd76356-f01e-0048-4838-598cb5000000", + "Body" : "jtccreateacjtccreateac0pageblobapitestcreateacacd7790178de4384ddMon, 13 Jul 2020 17:08:08 GMT\"0x8D8274F50F512E0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:08:09 GMT", + "x-ms-client-request-id" : "680bc5bf-52c5-4760-ab21-58f1d9927479", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacba2350720791d30f7d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacacd7790178de4384dd?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b0c0ee20-0843-40cf-9cb1-bf37df82adff" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e13fc859-c99c-46a5-b2ae-bbfbd61b0141" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abcac-c01e-00ec-2bf7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:45 GMT", - "x-ms-client-request-id" : "b0c0ee20-0843-40cf-9cb1-bf37df82adff" + "x-ms-request-id" : "d0b12688-101e-0022-2e38-59549d000000", + "Date" : "Mon, 13 Jul 2020 17:08:10 GMT", + "x-ms-client-request-id" : "e13fc859-c99c-46a5-b2ae-bbfbd61b0141" }, "Exception" : null } ], - "variables" : [ "jtccreateac0pageblobapitestcreateacba2350720791d30f7d", "javablobcreateac1pageblobapitestcreateacba2100132017066" ] + "variables" : [ "jtccreateac0pageblobapitestcreateacacd7790178de4384dd", "javablobcreateac1pageblobapitestcreateacacd62757fd0bf83" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[4].json index 5f8a8fee7795..4a15feb199f6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[4].json @@ -1,110 +1,130 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac2d1558579a789eaead?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacb0f308765e6cbe0ff3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1d68e2ca-eca3-47f9-8fc2-6547dda06e5f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a5929b84-1a60-414c-b110-d94574dfb457" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC6472A32", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F528F3797", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:11 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abcbd-c01e-00ec-3af7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "1d68e2ca-eca3-47f9-8fc2-6547dda06e5f" + "x-ms-request-id" : "5defb704-501e-00a5-1e38-59c7f8000000", + "Date" : "Mon, 13 Jul 2020 17:08:11 GMT", + "x-ms-client-request-id" : "a5929b84-1a60-414c-b110-d94574dfb457" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac2d1558579a789eaead/javablobcreateac1pageblobapitestcreateac2d13827055d567b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacb0f308765e6cbe0ff3/javablobcreateac1pageblobapitestcreateacb0f65638903064f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6efbf930-aa83-4a82-96cd-e0128fab2345" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "89550f88-51fb-466a-8bf9-fcd5017d8277" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC64E994F", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "ETag" : "0x8D8274F52C28FB1", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:11 GMT", + "x-ms-version-id" : "2020-07-13T17:08:11.7317322Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abcce-c01e-00ec-4af7-12380f000000", + "x-ms-request-id" : "089c3163-d01e-0012-4838-59ea52000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "6efbf930-aa83-4a82-96cd-e0128fab2345" + "Date" : "Mon, 13 Jul 2020 17:08:11 GMT", + "x-ms-client-request-id" : "89550f88-51fb-466a-8bf9-fcd5017d8277" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac2d1558579a789eaead/javablobcreateac1pageblobapitestcreateac2d13827055d567b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacb0f308765e6cbe0ff3/javablobcreateac1pageblobapitestcreateacb0f65638903064f?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9fab1c59-b5f5-4999-838a-bf48bf69f98d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "42aa5ed9-9436-4be2-9636-865ab5c7fb13", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC6566359", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:46 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "ab3ddaf8-b01e-0014-6838-59d9ed000000", + "Date" : "Mon, 13 Jul 2020 17:08:11 GMT", + "x-ms-client-request-id" : "42aa5ed9-9436-4be2-9636-865ab5c7fb13" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacb0f308765e6cbe0ff3/javablobcreateac1pageblobapitestcreateacb0f65638903064f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec3c9608-7b2c-4fed-910a-3c9046ce69a3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F532C131B", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:12 GMT", + "x-ms-version-id" : "2020-07-13T17:08:12.4242249Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abcde-c01e-00ec-57f7-12380f000000", + "x-ms-request-id" : "30e418a1-201e-0016-4838-596755000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "9fab1c59-b5f5-4999-838a-bf48bf69f98d" + "Date" : "Mon, 13 Jul 2020 17:08:11 GMT", + "x-ms-client-request-id" : "ec3c9608-7b2c-4fed-910a-3c9046ce69a3" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "be963533-5ddd-42e0-8bcf-2e672914060c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a3191b24-e49f-4f43-8a3e-b57392f1aec2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abcee-c01e-00ec-67f7-12380f000000", - "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac2d1558579a789eaeadWed, 15 Apr 2020 07:29:46 GMT\"0x8D7E10EC6472A32\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "be963533-5ddd-42e0-8bcf-2e672914060c", + "x-ms-request-id" : "e5422655-d01e-002d-6138-5922f1000000", + "Body" : "jtccreateacjtccreateac0pageblobapitestcreateacb0f308765e6cbe0ff3Mon, 13 Jul 2020 17:08:11 GMT\"0x8D8274F528F3797\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:08:12 GMT", + "x-ms-client-request-id" : "a3191b24-e49f-4f43-8a3e-b57392f1aec2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac2d1558579a789eaead?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateacb0f308765e6cbe0ff3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bda55e52-9313-4820-9c89-bf112bd76df8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "425c94c8-91a5-4a45-a1b6-4ae24853d840" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abd02-c01e-00ec-78f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "bda55e52-9313-4820-9c89-bf112bd76df8" + "x-ms-request-id" : "fd9314e1-f01e-0093-7c38-594a88000000", + "Date" : "Mon, 13 Jul 2020 17:08:12 GMT", + "x-ms-client-request-id" : "425c94c8-91a5-4a45-a1b6-4ae24853d840" }, "Exception" : null } ], - "variables" : [ "jtccreateac0pageblobapitestcreateac2d1558579a789eaead", "javablobcreateac1pageblobapitestcreateac2d13827055d567b" ] + "variables" : [ "jtccreateac0pageblobapitestcreateacb0f308765e6cbe0ff3", "javablobcreateac1pageblobapitestcreateacb0f65638903064f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[5].json index d2db6c10f500..ed7b5d361e1b 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[5].json @@ -1,132 +1,152 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateaca30714792d2c4fb37f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0de78432e1e7ce36d3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1b086528-b43b-41f4-8089-b5d30ad92d23" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "550ed599-e2e8-4147-bca9-f3da67b2d553" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC66D801F", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "ETag" : "0x8D8274F53DDB494", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abd2a-c01e-00ec-1cf7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "1b086528-b43b-41f4-8089-b5d30ad92d23" + "x-ms-request-id" : "2b5c7644-401e-005d-4d38-599b06000000", + "Date" : "Mon, 13 Jul 2020 17:08:13 GMT", + "x-ms-client-request-id" : "550ed599-e2e8-4147-bca9-f3da67b2d553" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateaca30714792d2c4fb37f/javablobcreateac1pageblobapitestcreateaca30147535465f80", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0de78432e1e7ce36d3/javablobcreateac1pageblobapitestcreateac0de081955ae9ddb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "537bc952-21a7-4ecd-8c3e-7546e7759f44" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7aa85158-4d80-4567-ac3f-31b5fca158ef" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC674C80F", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "ETag" : "0x8D8274F5412F3B7", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:13 GMT", + "x-ms-version-id" : "2020-07-13T17:08:13.9353015Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abd43-c01e-00ec-2ff7-12380f000000", + "x-ms-request-id" : "8dd88c30-e01e-00a0-7538-591523000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "537bc952-21a7-4ecd-8c3e-7546e7759f44" + "Date" : "Mon, 13 Jul 2020 17:08:13 GMT", + "x-ms-client-request-id" : "7aa85158-4d80-4567-ac3f-31b5fca158ef" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateaca30714792d2c4fb37f/javablobcreateac1pageblobapitestcreateaca30147535465f80?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0de78432e1e7ce36d3/javablobcreateac1pageblobapitestcreateac0de081955ae9ddb?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "390d37a1-2080-4c8c-89af-29814a1ab2eb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4b99fc80-5fb3-46bc-b5ba-7720ccbbd104", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC674C80F", - "x-ms-lease-id" : "2267883a-633e-4c5f-8656-7d70bbeae80d", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9abc1a39-801e-0089-3938-592b57000000", + "Date" : "Mon, 13 Jul 2020 17:08:13 GMT", + "x-ms-client-request-id" : "4b99fc80-5fb3-46bc-b5ba-7720ccbbd104" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0de78432e1e7ce36d3/javablobcreateac1pageblobapitestcreateac0de081955ae9ddb?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f604c367-3bf2-4b2d-b737-e761462d486b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F5412F3B7", + "x-ms-lease-id" : "2a5e188a-2dcf-46ea-967f-4dfe71ce7061", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abd5e-c01e-00ec-48f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "390d37a1-2080-4c8c-89af-29814a1ab2eb" + "x-ms-request-id" : "aa71ba9c-301e-0078-3438-59327a000000", + "Date" : "Mon, 13 Jul 2020 17:08:14 GMT", + "x-ms-client-request-id" : "f604c367-3bf2-4b2d-b737-e761462d486b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateaca30714792d2c4fb37f/javablobcreateac1pageblobapitestcreateaca30147535465f80", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0de78432e1e7ce36d3/javablobcreateac1pageblobapitestcreateac0de081955ae9ddb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d5638e7d-845b-4ff1-9ca8-5141338c0133" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "781b22e0-1f02-4730-a39c-c8da12451e68" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC682FC42", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "ETag" : "0x8D8274F54C4B0E3", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:15 GMT", + "x-ms-version-id" : "2020-07-13T17:08:15.1011315Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abd71-c01e-00ec-5af7-12380f000000", + "x-ms-request-id" : "156e712a-b01e-0066-1c38-59dea2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "d5638e7d-845b-4ff1-9ca8-5141338c0133" + "Date" : "Mon, 13 Jul 2020 17:08:14 GMT", + "x-ms-client-request-id" : "781b22e0-1f02-4730-a39c-c8da12451e68" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b41c48ef-ad49-4236-86c3-adeee2edeccc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "285f668b-4463-4355-8353-bcc1ba2d3a87" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abd82-c01e-00ec-68f7-12380f000000", - "Body" : "jtccreateacjtccreateac0pageblobapitestcreateaca30714792d2c4fb37fWed, 15 Apr 2020 07:29:47 GMT\"0x8D7E10EC66D801F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "b41c48ef-ad49-4236-86c3-adeee2edeccc", + "x-ms-request-id" : "6058cda3-b01e-0004-5b38-591c85000000", + "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac0de78432e1e7ce36d3Mon, 13 Jul 2020 17:08:13 GMT\"0x8D8274F53DDB494\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:08:15 GMT", + "x-ms-client-request-id" : "285f668b-4463-4355-8353-bcc1ba2d3a87", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateaca30714792d2c4fb37f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac0de78432e1e7ce36d3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0993da86-6bc5-4050-b368-e44fb9cb4869" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3693771-76e6-42de-a8ea-d4b2526e7247" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abd93-c01e-00ec-78f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "0993da86-6bc5-4050-b368-e44fb9cb4869" + "x-ms-request-id" : "94d043e1-a01e-006a-4238-5949aa000000", + "Date" : "Mon, 13 Jul 2020 17:08:15 GMT", + "x-ms-client-request-id" : "f3693771-76e6-42de-a8ea-d4b2526e7247" }, "Exception" : null } ], - "variables" : [ "jtccreateac0pageblobapitestcreateaca30714792d2c4fb37f", "javablobcreateac1pageblobapitestcreateaca30147535465f80" ] + "variables" : [ "jtccreateac0pageblobapitestcreateac0de78432e1e7ce36d3", "javablobcreateac1pageblobapitestcreateac0de081955ae9ddb" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[6].json new file mode 100644 index 000000000000..f5337dbfefc2 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateac[6].json @@ -0,0 +1,130 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac8cb69322a4a94cd766?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7d7712c-7ed4-400f-adb2-6e402a6aeb01" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F556E38FF", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:16 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "db69818e-801e-006d-5838-5925c9000000", + "Date" : "Mon, 13 Jul 2020 17:08:15 GMT", + "x-ms-client-request-id" : "d7d7712c-7ed4-400f-adb2-6e402a6aeb01" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac8cb69322a4a94cd766/javablobcreateac1pageblobapitestcreateac8cb040934957cc0", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "934b4654-8f20-4247-8058-db75fa585f14" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F55A6394A", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:16 GMT", + "x-ms-version-id" : "2020-07-13T17:08:16.5781834Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "35b7fa79-f01e-0083-2e38-598fe0000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:08:16 GMT", + "x-ms-client-request-id" : "934b4654-8f20-4247-8058-db75fa585f14" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac8cb69322a4a94cd766/javablobcreateac1pageblobapitestcreateac8cb040934957cc0?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "56dd7766-97c5-4267-97ca-17fe2d8d8d05", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "b0465aa1-501e-009a-0938-590f5b000000", + "Date" : "Mon, 13 Jul 2020 17:08:16 GMT", + "x-ms-client-request-id" : "56dd7766-97c5-4267-97ca-17fe2d8d8d05" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac8cb69322a4a94cd766/javablobcreateac1pageblobapitestcreateac8cb040934957cc0", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ea6d9ca-2914-43bb-bd87-b60a4ddb5240" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F561318B6", + "Last-Modified" : "Mon, 13 Jul 2020 17:08:17 GMT", + "x-ms-version-id" : "2020-07-13T17:08:17.2936927Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "b372dda5-701e-00a2-4738-59ab9b000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:08:16 GMT", + "x-ms-client-request-id" : "6ea6d9ca-2914-43bb-bd87-b60a4ddb5240" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "75d4d8b8-81b7-4a22-bc09-3e35007fddc7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "5d89659a-701e-009d-4c38-596338000000", + "Body" : "jtccreateacjtccreateac0pageblobapitestcreateac8cb69322a4a94cd766Mon, 13 Jul 2020 17:08:16 GMT\"0x8D8274F556E38FF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:08:16 GMT", + "x-ms-client-request-id" : "75d4d8b8-81b7-4a22-bc09-3e35007fddc7", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateac0pageblobapitestcreateac8cb69322a4a94cd766?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "706cc64b-caec-4ba5-b9e3-ebe8241edeb5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "e4e06e86-101e-0050-4c38-5953d2000000", + "Date" : "Mon, 13 Jul 2020 17:08:17 GMT", + "x-ms-client-request-id" : "706cc64b-caec-4ba5-b9e3-ebe8241edeb5" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateac0pageblobapitestcreateac8cb69322a4a94cd766", "javablobcreateac1pageblobapitestcreateac8cb040934957cc0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[0].json index ca59c30c0468..d1e097c9a4f3 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[0].json @@ -1,66 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail8cd37367e2e6e5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail33926034857be7?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bd90a156-d595-47cb-9dda-815f41721e92" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c5baa51c-53c9-4350-9743-3be88610c3b2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC6986B47", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "ETag" : "0x8D8274F3AFBA799", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abdae-c01e-00ec-0ff7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "bd90a156-d595-47cb-9dda-815f41721e92" + "x-ms-request-id" : "fd92efb8-f01e-0093-0a38-594a88000000", + "Date" : "Mon, 13 Jul 2020 17:07:31 GMT", + "x-ms-client-request-id" : "c5baa51c-53c9-4350-9743-3be88610c3b2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail8cd37367e2e6e5/javablobcreateacfail1pageblobapitestcreateacfail8cd46446b5d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail33926034857be7/javablobcreateacfail1pageblobapitestcreateacfail339105721bd", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8ad2f276-56c6-4a03-b9a4-2bcc9f435ec0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "879a6ab1-96b4-4b85-9504-c3abc57d23b1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC69FD9FB", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "ETag" : "0x8D8274F3B68CB9E", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:32 GMT", + "x-ms-version-id" : "2020-07-13T17:07:32.5558456Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abdcf-c01e-00ec-2ff7-12380f000000", + "x-ms-request-id" : "fe9c7f68-601e-0028-7138-59f02a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "8ad2f276-56c6-4a03-b9a4-2bcc9f435ec0" + "Date" : "Mon, 13 Jul 2020 17:07:31 GMT", + "x-ms-client-request-id" : "879a6ab1-96b4-4b85-9504-c3abc57d23b1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail8cd37367e2e6e5/javablobcreateacfail1pageblobapitestcreateacfail8cd46446b5d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail33926034857be7/javablobcreateacfail1pageblobapitestcreateacfail339105721bd", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a0ef1f05-f390-475b-bac7-f009a2730e19" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "10670b9f-3de3-4507-82d6-9bc64dc40b7c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "8e3abdf7-c01e-00ec-54f7-12380f000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8e3abdf7-c01e-00ec-54f7-12380f000000\nTime:2020-04-15T07:29:47.5235284Z", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "a0ef1f05-f390-475b-bac7-f009a2730e19", + "x-ms-request-id" : "9cb4cf45-901e-0003-3438-5970e6000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:9cb4cf45-901e-0003-3438-5970e6000000\nTime:2020-07-13T17:07:33.0235288Z", + "Date" : "Mon, 13 Jul 2020 17:07:32 GMT", + "x-ms-client-request-id" : "10670b9f-3de3-4507-82d6-9bc64dc40b7c", "Content-Type" : "application/xml" }, "Exception" : null @@ -68,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f46c272a-50ab-4f01-ba4f-4c7e3afe483a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6925916-cdf2-4aac-abe6-7cc733fdbec2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abe15-c01e-00ec-71f7-12380f000000", - "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail8cd37367e2e6e5Wed, 15 Apr 2020 07:29:47 GMT\"0x8D7E10EC6986B47\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "f46c272a-50ab-4f01-ba4f-4c7e3afe483a", + "x-ms-request-id" : "d395322c-a01e-0055-3d38-598109000000", + "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail33926034857be7Mon, 13 Jul 2020 17:07:31 GMT\"0x8D8274F3AFBA799\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:07:33 GMT", + "x-ms-client-request-id" : "c6925916-cdf2-4aac-abe6-7cc733fdbec2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail8cd37367e2e6e5?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail33926034857be7?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aa0dd940-4ed9-4fd2-a439-0170c78b31d5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0eedd423-2eab-47f5-ad67-4aa92853e11e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abe2d-c01e-00ec-09f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "aa0dd940-4ed9-4fd2-a439-0170c78b31d5" + "x-ms-request-id" : "f841e94d-601e-0007-7338-59fde1000000", + "Date" : "Mon, 13 Jul 2020 17:07:33 GMT", + "x-ms-client-request-id" : "0eedd423-2eab-47f5-ad67-4aa92853e11e" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail8cd37367e2e6e5", "javablobcreateacfail1pageblobapitestcreateacfail8cd46446b5d" ] + "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail33926034857be7", "javablobcreateacfail1pageblobapitestcreateacfail339105721bd" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[1].json index 42bf2f5a5b2a..3bd5fb0a0946 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[1].json @@ -1,66 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail97249322773227?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail343204581d0615?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "263b18a4-22a2-401a-8eaf-68aedae854b0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8e164457-7226-4d4e-9799-a8836ef9b3cd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC6C26BD1", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "ETag" : "0x8D8274F3C904234", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abe50-c01e-00ec-27f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "263b18a4-22a2-401a-8eaf-68aedae854b0" + "x-ms-request-id" : "34f227a5-401e-0096-5138-599853000000", + "Date" : "Mon, 13 Jul 2020 17:07:34 GMT", + "x-ms-client-request-id" : "8e164457-7226-4d4e-9799-a8836ef9b3cd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail97249322773227/javablobcreateacfail1pageblobapitestcreateacfail97244438540", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail343204581d0615/javablobcreateacfail1pageblobapitestcreateacfail3430183068b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c7d57d6f-1f4a-490d-af53-8e1f7f65e896" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9eec8357-c7f0-4b32-9abe-691b012768b2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC6CE481D", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "ETag" : "0x8D8274F3CC5DC22", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:34 GMT", + "x-ms-version-id" : "2020-07-13T17:07:34.8424738Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abe69-c01e-00ec-3df7-12380f000000", + "x-ms-request-id" : "08adba38-901e-005e-4238-597a62000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "c7d57d6f-1f4a-490d-af53-8e1f7f65e896" + "Date" : "Mon, 13 Jul 2020 17:07:34 GMT", + "x-ms-client-request-id" : "9eec8357-c7f0-4b32-9abe-691b012768b2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail97249322773227/javablobcreateacfail1pageblobapitestcreateacfail97244438540", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail343204581d0615/javablobcreateacfail1pageblobapitestcreateacfail3430183068b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fa7bebd5-a676-439f-805e-592376f7dd27" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "63475f33-08b5-41d7-92af-b16972f2aebf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "8e3abe75-c01e-00ec-48f7-12380f000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8e3abe75-c01e-00ec-48f7-12380f000000\nTime:2020-04-15T07:29:47.7917854Z", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "fa7bebd5-a676-439f-805e-592376f7dd27", + "x-ms-request-id" : "6edda79b-301e-009c-0e38-593ce4000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6edda79b-301e-009c-0e38-593ce4000000\nTime:2020-07-13T17:07:35.2911756Z", + "Date" : "Mon, 13 Jul 2020 17:07:34 GMT", + "x-ms-client-request-id" : "63475f33-08b5-41d7-92af-b16972f2aebf", "Content-Type" : "application/xml" }, "Exception" : null @@ -68,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "64a7d5fa-9bae-4487-8413-0629a151bfbe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e93b6f76-a4d8-496a-a7d6-95b79a64f66b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abe82-c01e-00ec-55f7-12380f000000", - "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail97249322773227Wed, 15 Apr 2020 07:29:47 GMT\"0x8D7E10EC6C26BD1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:46 GMT", - "x-ms-client-request-id" : "64a7d5fa-9bae-4487-8413-0629a151bfbe", + "x-ms-request-id" : "af25407b-b01e-0076-5d38-591bca000000", + "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail343204581d0615Mon, 13 Jul 2020 17:07:34 GMT\"0x8D8274F3C904234\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:07:34 GMT", + "x-ms-client-request-id" : "e93b6f76-a4d8-496a-a7d6-95b79a64f66b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail97249322773227?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail343204581d0615?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "81b51094-3850-424a-9628-228b896323fb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff8016b2-817b-4fd7-b672-9dce007c16ca" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abe8e-c01e-00ec-61f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "81b51094-3850-424a-9628-228b896323fb" + "x-ms-request-id" : "c5911c98-d01e-003d-2a38-59e799000000", + "Date" : "Mon, 13 Jul 2020 17:07:35 GMT", + "x-ms-client-request-id" : "ff8016b2-817b-4fd7-b672-9dce007c16ca" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail97249322773227", "javablobcreateacfail1pageblobapitestcreateacfail97244438540" ] + "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail343204581d0615", "javablobcreateacfail1pageblobapitestcreateacfail3430183068b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[2].json index 96807f8ae51c..2e2c9915e392 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[2].json @@ -1,66 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail9d734473287611?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1ff54071219a1a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "53ba884e-9e87-4b21-a1f0-1d04d8d6d157" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d269c4fb-d582-470c-b7b0-a85cb2271ae0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC6EA21DC", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:47 GMT", + "ETag" : "0x8D8274F3DB6D383", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abe9f-c01e-00ec-71f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "53ba884e-9e87-4b21-a1f0-1d04d8d6d157" + "x-ms-request-id" : "10575db1-201e-004b-2e38-596dd1000000", + "Date" : "Mon, 13 Jul 2020 17:07:35 GMT", + "x-ms-client-request-id" : "d269c4fb-d582-470c-b7b0-a85cb2271ae0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail9d734473287611/javablobcreateacfail1pageblobapitestcreateacfail9d7882661de", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1ff54071219a1a/javablobcreateacfail1pageblobapitestcreateacfail1ff150870be", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0ed8a74d-a799-4437-87cd-563bbc8faa67" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9cfe2366-5ae3-4f53-a828-413d8e0155b3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC706A396", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:48 GMT", + "ETag" : "0x8D8274F3DEEB3C0", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:36 GMT", + "x-ms-version-id" : "2020-07-13T17:07:36.7888597Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abee2-c01e-00ec-2cf7-12380f000000", + "x-ms-request-id" : "32478396-401e-0010-5a38-5954ea000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "0ed8a74d-a799-4437-87cd-563bbc8faa67" + "Date" : "Mon, 13 Jul 2020 17:07:35 GMT", + "x-ms-client-request-id" : "9cfe2366-5ae3-4f53-a828-413d8e0155b3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail9d734473287611/javablobcreateacfail1pageblobapitestcreateacfail9d7882661de", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1ff54071219a1a/javablobcreateacfail1pageblobapitestcreateacfail1ff150870be", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c6c3594d-46c0-4893-a9eb-964c44f99cbf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4d0f6ff9-d5a0-455d-9cbe-3f272603ee78" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "8e3abefc-c01e-00ec-43f7-12380f000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8e3abefc-c01e-00ec-43f7-12380f000000\nTime:2020-04-15T07:29:48.1541350Z", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "c6c3594d-46c0-4893-a9eb-964c44f99cbf", + "x-ms-request-id" : "a78ff68e-501e-008a-2a38-59ca33000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:a78ff68e-501e-008a-2a38-59ca33000000\nTime:2020-07-13T17:07:37.1725670Z", + "Date" : "Mon, 13 Jul 2020 17:07:36 GMT", + "x-ms-client-request-id" : "4d0f6ff9-d5a0-455d-9cbe-3f272603ee78", "Content-Type" : "application/xml" }, "Exception" : null @@ -68,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d800a010-0a6a-45c8-9878-6dcf21104c45" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0c1d3a57-8ffa-48d2-a23c-20733ff4c14a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abf0f-c01e-00ec-54f7-12380f000000", - "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail9d734473287611Wed, 15 Apr 2020 07:29:47 GMT\"0x8D7E10EC6EA21DC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "d800a010-0a6a-45c8-9878-6dcf21104c45", + "x-ms-request-id" : "2a1231df-701e-0079-4038-596da6000000", + "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail1ff54071219a1aMon, 13 Jul 2020 17:07:36 GMT\"0x8D8274F3DB6D383\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:07:37 GMT", + "x-ms-client-request-id" : "0c1d3a57-8ffa-48d2-a23c-20733ff4c14a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail9d734473287611?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1ff54071219a1a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "61cae06e-e369-4ac9-9b98-f9888e4a07c5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "27566d3c-fa76-4863-bb70-26509ffb8596" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abf29-c01e-00ec-6cf7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "61cae06e-e369-4ac9-9b98-f9888e4a07c5" + "x-ms-request-id" : "1abb44b3-401e-003f-7c38-595921000000", + "Date" : "Mon, 13 Jul 2020 17:07:36 GMT", + "x-ms-client-request-id" : "27566d3c-fa76-4863-bb70-26509ffb8596" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail9d734473287611", "javablobcreateacfail1pageblobapitestcreateacfail9d7882661de" ] + "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail1ff54071219a1a", "javablobcreateacfail1pageblobapitestcreateacfail1ff150870be" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[3].json index 7917557c1dde..90edf1ccd88c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[3].json @@ -1,96 +1,98 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail53748001707bae?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1a971050118183?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bf8a8bef-cca8-486f-b768-9b86ed883f43" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6941320f-67ad-477c-967f-37d4a81bd7eb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC720CFB9", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:48 GMT", + "ETag" : "0x8D8274F3ED1E5AD", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abf4a-c01e-00ec-08f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "bf8a8bef-cca8-486f-b768-9b86ed883f43" + "x-ms-request-id" : "2eb204ef-e01e-0019-0b38-591139000000", + "Date" : "Mon, 13 Jul 2020 17:07:38 GMT", + "x-ms-client-request-id" : "6941320f-67ad-477c-967f-37d4a81bd7eb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail53748001707bae/javablobcreateacfail1pageblobapitestcreateacfail537617242c2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1a971050118183/javablobcreateacfail1pageblobapitestcreateacfail1a92367608c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "940fef21-2f02-439f-b7ad-0652e0e19007" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c52d37a3-869b-4fa9-9781-a59cb12d5d19" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC72752CB", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:48 GMT", + "ETag" : "0x8D8274F3F084647", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:38 GMT", + "x-ms-version-id" : "2020-07-13T17:07:38.6331719Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abf65-c01e-00ec-21f7-12380f000000", + "x-ms-request-id" : "7a4d812e-a01e-0008-3c38-598b8d000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "940fef21-2f02-439f-b7ad-0652e0e19007" + "Date" : "Mon, 13 Jul 2020 17:07:38 GMT", + "x-ms-client-request-id" : "c52d37a3-869b-4fa9-9781-a59cb12d5d19" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail53748001707bae/javablobcreateacfail1pageblobapitestcreateacfail537617242c2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1a971050118183/javablobcreateacfail1pageblobapitestcreateacfail1a92367608c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "426a76a1-0e39-4aa0-baf5-1f68e731c5e8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "81bdb388-312b-4aba-87e8-b7db700c860b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:48 GMT", + "x-ms-version-id" : "2020-07-13T17:07:38.6331719Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:38 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", + "Date" : "Mon, 13 Jul 2020 17:07:38 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10EC72752CB", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:29:48 GMT", + "ETag" : "0x8D8274F3F084647", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:07:38 GMT", "Content-Length" : "512", - "x-ms-request-id" : "8e3abf80-c01e-00ec-38f7-12380f000000", - "x-ms-client-request-id" : "426a76a1-0e39-4aa0-baf5-1f68e731c5e8", + "x-ms-request-id" : "564db095-501e-006e-4d38-59c4ad000000", + "x-ms-client-request-id" : "81bdb388-312b-4aba-87e8-b7db700c860b", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail53748001707bae/javablobcreateacfail1pageblobapitestcreateacfail537617242c2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1a971050118183/javablobcreateacfail1pageblobapitestcreateacfail1a92367608c", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "eacf0eff-cae8-49d8-b146-cbd35b8f06cf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb504a99-2882-405b-af1e-545701f0c591" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "8e3abf98-c01e-00ec-4ef7-12380f000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8e3abf98-c01e-00ec-4ef7-12380f000000\nTime:2020-04-15T07:29:48.4253962Z", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "eacf0eff-cae8-49d8-b146-cbd35b8f06cf", + "x-ms-request-id" : "88297ac9-d01e-005f-0538-5925be000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:88297ac9-d01e-005f-0538-5925be000000\nTime:2020-07-13T17:07:39.3427787Z", + "Date" : "Mon, 13 Jul 2020 17:07:39 GMT", + "x-ms-client-request-id" : "bb504a99-2882-405b-af1e-545701f0c591", "Content-Type" : "application/xml" }, "Exception" : null @@ -98,43 +100,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "93f415a3-56dc-4206-a54d-522fdc340fa5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e37638e-2c6f-494b-930d-eaf9f1e507f2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3abfb0-c01e-00ec-63f7-12380f000000", - "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail53748001707baeWed, 15 Apr 2020 07:29:48 GMT\"0x8D7E10EC720CFB9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "93f415a3-56dc-4206-a54d-522fdc340fa5", + "x-ms-request-id" : "2260e5f6-b01e-003b-5138-59d426000000", + "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail1a971050118183Mon, 13 Jul 2020 17:07:38 GMT\"0x8D8274F3ED1E5AD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:07:39 GMT", + "x-ms-client-request-id" : "9e37638e-2c6f-494b-930d-eaf9f1e507f2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail53748001707bae?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail1a971050118183?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2074aee5-6984-4fdf-ae00-efddea1f9ffe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "93c5b02a-a1d8-4d30-9643-a8144ad32022" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3abfc9-c01e-00ec-7bf7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "2074aee5-6984-4fdf-ae00-efddea1f9ffe" + "x-ms-request-id" : "4bc4bb02-b01e-0049-7338-59d369000000", + "Date" : "Mon, 13 Jul 2020 17:07:39 GMT", + "x-ms-client-request-id" : "93c5b02a-a1d8-4d30-9643-a8144ad32022" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail53748001707bae", "javablobcreateacfail1pageblobapitestcreateacfail537617242c2" ] + "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail1a971050118183", "javablobcreateacfail1pageblobapitestcreateacfail1a92367608c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[4].json index 0bd179f4c668..2b68331bffe8 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[4].json @@ -1,66 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail426635120f2ed4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfailf0f79776048670?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "47eeb362-716c-4e92-b5af-96e6bbc07e1c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ac9d30d-5c37-4a96-84f9-075c3299bf6d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC74AF75F", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:48 GMT", + "ETag" : "0x8D8274F40174820", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abfdb-c01e-00ec-0cf7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "47eeb362-716c-4e92-b5af-96e6bbc07e1c" + "x-ms-request-id" : "a859cf56-a01e-0037-2638-59432e000000", + "Date" : "Mon, 13 Jul 2020 17:07:39 GMT", + "x-ms-client-request-id" : "3ac9d30d-5c37-4a96-84f9-075c3299bf6d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail426635120f2ed4/javablobcreateacfail1pageblobapitestcreateacfail4265817319f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfailf0f79776048670/javablobcreateacfail1pageblobapitestcreateacfailf0f443069d4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "18b43124-5e04-40f8-ab19-95e7a1453105" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92f63212-9451-4313-a11e-a399fbfe65a2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC7528BD7", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:48 GMT", + "ETag" : "0x8D8274F405107A1", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:40 GMT", + "x-ms-version-id" : "2020-07-13T17:07:40.7877025Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "8e3abfe6-c01e-00ec-15f7-12380f000000", + "x-ms-request-id" : "ad1be021-001e-004c-0c38-5901b2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "18b43124-5e04-40f8-ab19-95e7a1453105" + "Date" : "Mon, 13 Jul 2020 17:07:40 GMT", + "x-ms-client-request-id" : "92f63212-9451-4313-a11e-a399fbfe65a2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail426635120f2ed4/javablobcreateacfail1pageblobapitestcreateacfail4265817319f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfailf0f79776048670/javablobcreateacfail1pageblobapitestcreateacfailf0f443069d4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "514547ef-9038-4114-924a-f4e30ae2c318" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd91510b-03e8-469a-9fd8-c42145c7207c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseNotPresentWithBlobOperation", "retry-after" : "0", "Content-Length" : "241", "StatusCode" : "412", - "x-ms-request-id" : "8e3abff5-c01e-00ec-23f7-12380f000000", - "Body" : "LeaseNotPresentWithBlobOperationThere is currently no lease on the blob.\nRequestId:8e3abff5-c01e-00ec-23f7-12380f000000\nTime:2020-04-15T07:29:48.6556184Z", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "514547ef-9038-4114-924a-f4e30ae2c318", + "x-ms-request-id" : "262ba0a3-f01e-0077-7b38-594416000000", + "Body" : "LeaseNotPresentWithBlobOperationThere is currently no lease on the blob.\nRequestId:262ba0a3-f01e-0077-7b38-594416000000\nTime:2020-07-13T17:07:41.1079225Z", + "Date" : "Mon, 13 Jul 2020 17:07:40 GMT", + "x-ms-client-request-id" : "fd91510b-03e8-469a-9fd8-c42145c7207c", "Content-Type" : "application/xml" }, "Exception" : null @@ -68,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6fd0a329-0a63-4073-9de2-27b9d3a26381" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1b15ca0c-c78b-4429-99e6-2d48400fc2ea" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "8e3ac000-c01e-00ec-2df7-12380f000000", - "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail426635120f2ed4Wed, 15 Apr 2020 07:29:48 GMT\"0x8D7E10EC74AF75F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "6fd0a329-0a63-4073-9de2-27b9d3a26381", + "x-ms-request-id" : "3d8956dd-f01e-0015-1538-598631000000", + "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfailf0f79776048670Mon, 13 Jul 2020 17:07:40 GMT\"0x8D8274F40174820\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:07:41 GMT", + "x-ms-client-request-id" : "1b15ca0c-c78b-4429-99e6-2d48400fc2ea", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail426635120f2ed4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfailf0f79776048670?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9e3500b9-9fce-429e-a0bc-1fb43bdde3e3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "19061250-c089-4401-ab23-5d72016ea425" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "8e3ac009-c01e-00ec-36f7-12380f000000", - "Date" : "Wed, 15 Apr 2020 07:29:47 GMT", - "x-ms-client-request-id" : "9e3500b9-9fce-429e-a0bc-1fb43bdde3e3" + "x-ms-request-id" : "74cea3ed-c01e-0053-1e38-59b2b6000000", + "Date" : "Mon, 13 Jul 2020 17:07:41 GMT", + "x-ms-client-request-id" : "19061250-c089-4401-ab23-5d72016ea425" }, "Exception" : null } ], - "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail426635120f2ed4", "javablobcreateacfail1pageblobapitestcreateacfail4265817319f" ] + "variables" : [ "jtccreateacfail0pageblobapitestcreateacfailf0f79776048670", "javablobcreateacfail1pageblobapitestcreateacfailf0f443069d4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[5].json new file mode 100644 index 000000000000..624bd9a659a1 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestcreateacfail[5].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail69a985804174ad?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8d98ced-4912-4df7-9600-74b2f8d3cda4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F412CF7DF", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0d595ffc-501e-007e-7f38-5901c5000000", + "Date" : "Mon, 13 Jul 2020 17:07:42 GMT", + "x-ms-client-request-id" : "c8d98ced-4912-4df7-9600-74b2f8d3cda4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail69a985804174ad/javablobcreateacfail1pageblobapitestcreateacfail69a48446fb7", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb945d88-5dcd-4a8f-8768-0351691d266f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F4160863C", + "Last-Modified" : "Mon, 13 Jul 2020 17:07:42 GMT", + "x-ms-version-id" : "2020-07-13T17:07:42.5669692Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c20b829d-c01e-006c-0838-597a15000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:07:42 GMT", + "x-ms-client-request-id" : "eb945d88-5dcd-4a8f-8768-0351691d266f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail69a985804174ad/javablobcreateacfail1pageblobapitestcreateacfail69a48446fb7", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6cfc7597-e173-41f7-8b33-fbc01c8c83e6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "762f6985-001e-0097-5138-59c78f000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:762f6985-001e-0097-5138-59c78f000000\nTime:2020-07-13T17:07:42.8950139Z", + "Date" : "Mon, 13 Jul 2020 17:07:42 GMT", + "x-ms-client-request-id" : "6cfc7597-e173-41f7-8b33-fbc01c8c83e6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccreateacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cf372e78-4752-40c7-a59f-67800c633fb9" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4a88300c-801e-0099-4f38-59ee3f000000", + "Body" : "jtccreateacfailjtccreateacfail0pageblobapitestcreateacfail69a985804174adMon, 13 Jul 2020 17:07:42 GMT\"0x8D8274F412CF7DF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:07:42 GMT", + "x-ms-client-request-id" : "cf372e78-4752-40c7-a59f-67800c633fb9", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccreateacfail0pageblobapitestcreateacfail69a985804174ad?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7394de7-b032-4435-90b3-bb6545211eb6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "f40f62f5-001e-0073-4138-59c911000000", + "Date" : "Mon, 13 Jul 2020 17:07:42 GMT", + "x-ms-client-request-id" : "a7394de7-b032-4435-90b3-bb6545211eb6" + }, + "Exception" : null + } ], + "variables" : [ "jtccreateacfail0pageblobapitestcreateacfail69a985804174ad", "javablobcreateacfail1pageblobapitestcreateacfail69a48446fb7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[0].json index 71b056b18e23..8ffa4a4c340f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[0].json @@ -1,69 +1,88 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacf890137134c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac7bd122398a4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3999dba1-53fd-4efa-90d4-023e84d7b47c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1874ae04-2436-46c5-88c9-7ad4393a9957" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED9AF7DB2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:19 GMT", + "ETag" : "0x8D827500E2C78C1", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188796-301e-00f9-2cf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "x-ms-client-request-id" : "3999dba1-53fd-4efa-90d4-023e84d7b47c" + "x-ms-request-id" : "e7095e76-901e-003c-5338-59b845000000", + "Date" : "Mon, 13 Jul 2020 17:13:25 GMT", + "x-ms-client-request-id" : "1874ae04-2436-46c5-88c9-7ad4393a9957" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacf890137134c/javablobgetpagerangesac1pageblobapitestgetpagerangesacf8947467", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac7bd122398a4/javablobgetpagerangesac1pageblobapitestgetpagerangesac7bd00979", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "49243861-e2bf-492a-82dd-35c0fbed7ffe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a6027d6-8398-4f52-a4b6-1c67e0a6ed99" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED9B73AC0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:19 GMT", + "ETag" : "0x8D827500E9BC205", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:26 GMT", + "x-ms-version-id" : "2020-07-13T17:13:26.8880901Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18879f-301e-00f9-33f7-12fa96000000", + "x-ms-request-id" : "7e04a6e6-e01e-007b-7f38-59d31e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "x-ms-client-request-id" : "49243861-e2bf-492a-82dd-35c0fbed7ffe" + "Date" : "Mon, 13 Jul 2020 17:13:26 GMT", + "x-ms-client-request-id" : "1a6027d6-8398-4f52-a4b6-1c67e0a6ed99" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac7bd122398a4/javablobgetpagerangesac1pageblobapitestgetpagerangesac7bd00979?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5e2c0d8-3149-4f74-9bc6-159ff119cf7a", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "63b559ee-601e-0091-1b38-59f430000000", + "Date" : "Mon, 13 Jul 2020 17:13:27 GMT", + "x-ms-client-request-id" : "d5e2c0d8-3149-4f74-9bc6-159ff119cf7a" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacf890137134c/javablobgetpagerangesac1pageblobapitestgetpagerangesacf8947467?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac7bd122398a4/javablobgetpagerangesac1pageblobapitestgetpagerangesac7bd00979?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b337d6cc-301b-493f-94db-e948f0a79137" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1843ae1f-a647-408e-bd01-b6e805e4fb3e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:19 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:26 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "ETag" : "0x8D7E10ED9B73AC0", - "Vary" : "Origin", - "x-ms-request-id" : "6b1887a4-301e-00f9-38f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:13:26 GMT", + "ETag" : "0x8D827500E9BC205", + "x-ms-request-id" : "9188b265-f01e-0058-0638-5949dd000000", "Body" : "", - "x-ms-client-request-id" : "b337d6cc-301b-493f-94db-e948f0a79137", + "x-ms-client-request-id" : "1843ae1f-a647-408e-bd01-b6e805e4fb3e", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +90,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ced93e87-08b7-4bfa-a89a-efe9f169981a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd7c43fb-155a-4bc9-af03-8cdc7427cc5b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1887af-301e-00f9-40f7-12fa96000000", - "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesacf890137134cWed, 15 Apr 2020 07:30:19 GMT\"0x8D7E10ED9AF7DB2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "x-ms-client-request-id" : "ced93e87-08b7-4bfa-a89a-efe9f169981a", + "x-ms-request-id" : "1f03d787-801e-007d-1b38-59e0a1000000", + "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesac7bd122398a4Mon, 13 Jul 2020 17:13:26 GMT\"0x8D827500E2C78C1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:27 GMT", + "x-ms-client-request-id" : "cd7c43fb-155a-4bc9-af03-8cdc7427cc5b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacf890137134c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac7bd122398a4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "042a527d-6be0-41dd-a219-56c5b9a62357" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6db8dd7f-01ed-4d0e-9770-9fc0a2c760ac" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1887b5-301e-00f9-46f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "x-ms-client-request-id" : "042a527d-6be0-41dd-a219-56c5b9a62357" + "x-ms-request-id" : "47759c05-201e-0080-5c38-596e84000000", + "Date" : "Mon, 13 Jul 2020 17:13:28 GMT", + "x-ms-client-request-id" : "6db8dd7f-01ed-4d0e-9770-9fc0a2c760ac" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesacf890137134c", "javablobgetpagerangesac1pageblobapitestgetpagerangesacf8947467" ] + "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesac7bd122398a4", "javablobgetpagerangesac1pageblobapitestgetpagerangesac7bd00979" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[1].json index 5177ead6f84e..e0c33fbcd946 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[1].json @@ -1,69 +1,88 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2db56234971?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2bc35809ebf?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f3e2f979-1423-4023-babe-d57c4b106873" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "59156457-e019-4c34-aab8-64995e1b4c27" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED9D5D3DB", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:19 GMT", + "ETag" : "0x8D827500FD7F26C", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1887bf-301e-00f9-4ef7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "x-ms-client-request-id" : "f3e2f979-1423-4023-babe-d57c4b106873" + "x-ms-request-id" : "e0d5a392-701e-0046-7f38-59a505000000", + "Date" : "Mon, 13 Jul 2020 17:13:28 GMT", + "x-ms-client-request-id" : "59156457-e019-4c34-aab8-64995e1b4c27" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2db56234971/javablobgetpagerangesac1pageblobapitestgetpagerangesac2db78129", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2bc35809ebf/javablobgetpagerangesac1pageblobapitestgetpagerangesac2bc56500", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b9ecd29f-11de-443e-9708-e0998a1b6443" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "51e328b1-6137-4a08-aa80-3f2c46db95ac" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA01C311", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:19 GMT", + "ETag" : "0x8D82750100E0BDF", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:29 GMT", + "x-ms-version-id" : "2020-07-13T17:13:29.3148127Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1887ef-301e-00f9-75f7-12fa96000000", + "x-ms-request-id" : "4aebe5aa-701e-0034-4b38-59a24a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "x-ms-client-request-id" : "b9ecd29f-11de-443e-9708-e0998a1b6443" + "Date" : "Mon, 13 Jul 2020 17:13:28 GMT", + "x-ms-client-request-id" : "51e328b1-6137-4a08-aa80-3f2c46db95ac" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2bc35809ebf/javablobgetpagerangesac1pageblobapitestgetpagerangesac2bc56500?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6ddf77f-1bf8-47f7-840e-3e5f61419d5c", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "79cc23d2-001e-0087-7e38-5902e7000000", + "Date" : "Mon, 13 Jul 2020 17:13:28 GMT", + "x-ms-client-request-id" : "c6ddf77f-1bf8-47f7-840e-3e5f61419d5c" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2db56234971/javablobgetpagerangesac1pageblobapitestgetpagerangesac2db78129?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2bc35809ebf/javablobgetpagerangesac1pageblobapitestgetpagerangesac2bc56500?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f8081bff-7233-44c3-9aae-5ec7325c500f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7871ac57-eb42-43c2-9bd2-d06d46f6de60" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:19 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:29 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "ETag" : "0x8D7E10EDA01C311", - "Vary" : "Origin", - "x-ms-request-id" : "6b188800-301e-00f9-02f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:13:29 GMT", + "ETag" : "0x8D82750100E0BDF", + "x-ms-request-id" : "e6e03e65-201e-0074-4538-59a572000000", "Body" : "", - "x-ms-client-request-id" : "f8081bff-7233-44c3-9aae-5ec7325c500f", + "x-ms-client-request-id" : "7871ac57-eb42-43c2-9bd2-d06d46f6de60", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +90,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b59d2cf0-a902-401d-bee0-99ed35f6e8e0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5941a070-f53b-4e4d-bde3-61cc29706ea7" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b18880c-301e-00f9-0cf7-12fa96000000", - "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesac2db56234971Wed, 15 Apr 2020 07:30:19 GMT\"0x8D7E10ED9D5D3DB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:19 GMT", - "x-ms-client-request-id" : "b59d2cf0-a902-401d-bee0-99ed35f6e8e0", + "x-ms-request-id" : "cf6f8fa1-001e-0001-4938-59ce5e000000", + "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesac2bc35809ebfMon, 13 Jul 2020 17:13:28 GMT\"0x8D827500FD7F26C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:30 GMT", + "x-ms-client-request-id" : "5941a070-f53b-4e4d-bde3-61cc29706ea7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2db56234971?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac2bc35809ebf?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a0a8b5e5-e03c-4e3e-8661-6aa4a0e263c1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "67e238f8-40f0-45b6-bd7c-352b342c9883" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188822-301e-00f9-1ef7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "a0a8b5e5-e03c-4e3e-8661-6aa4a0e263c1" + "x-ms-request-id" : "a7bacaec-b01e-002b-2438-59114e000000", + "Date" : "Mon, 13 Jul 2020 17:13:30 GMT", + "x-ms-client-request-id" : "67e238f8-40f0-45b6-bd7c-352b342c9883" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesac2db56234971", "javablobgetpagerangesac1pageblobapitestgetpagerangesac2db78129" ] + "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesac2bc35809ebf", "javablobgetpagerangesac1pageblobapitestgetpagerangesac2bc56500" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[2].json index 8d1a41c34a7f..563e33e75d96 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[2].json @@ -1,69 +1,88 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7196506648?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac26d682485f3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "147fdf82-1f0d-4cc7-b32f-85bebe0536a1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc5cf590-2ac8-4af1-8022-ce3e573b9990" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA20AAFF", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D82750111D599B", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188845-301e-00f9-33f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "147fdf82-1f0d-4cc7-b32f-85bebe0536a1" + "x-ms-request-id" : "54c02bf6-f01e-0005-5738-594359000000", + "Date" : "Mon, 13 Jul 2020 17:13:30 GMT", + "x-ms-client-request-id" : "bc5cf590-2ac8-4af1-8022-ce3e573b9990" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7196506648/javablobgetpagerangesac1pageblobapitestgetpagerangesaca7112090", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac26d682485f3/javablobgetpagerangesac1pageblobapitestgetpagerangesac26d99129", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a0fd4679-728d-4bd9-a308-6104948cc712" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cb010277-cfed-4701-8a0e-71e228829eb4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA277C83", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D827501153E69F", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:31 GMT", + "x-ms-version-id" : "2020-07-13T17:13:31.4503327Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18885d-301e-00f9-45f7-12fa96000000", + "x-ms-request-id" : "fb6ff052-501e-001c-5d38-59c3e2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "a0fd4679-728d-4bd9-a308-6104948cc712" + "Date" : "Mon, 13 Jul 2020 17:13:30 GMT", + "x-ms-client-request-id" : "cb010277-cfed-4701-8a0e-71e228829eb4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac26d682485f3/javablobgetpagerangesac1pageblobapitestgetpagerangesac26d99129?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "23ce883a-fd9e-43dc-97cd-3b122b4aaa45", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0ee5caa4-301e-000a-5238-593535000000", + "Date" : "Mon, 13 Jul 2020 17:13:31 GMT", + "x-ms-client-request-id" : "23ce883a-fd9e-43dc-97cd-3b122b4aaa45" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7196506648/javablobgetpagerangesac1pageblobapitestgetpagerangesaca7112090?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac26d682485f3/javablobgetpagerangesac1pageblobapitestgetpagerangesac26d99129?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9cb873cd-1fd7-4a88-96e4-053b2fc216eb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "093ca900-8d37-41fa-a1df-2ee16936867a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:31 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "ETag" : "0x8D7E10EDA277C83", - "Vary" : "Origin", - "x-ms-request-id" : "6b188872-301e-00f9-58f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:13:31 GMT", + "ETag" : "0x8D827501153E69F", + "x-ms-request-id" : "4bc6a95b-b01e-0049-5a38-59d369000000", "Body" : "", - "x-ms-client-request-id" : "9cb873cd-1fd7-4a88-96e4-053b2fc216eb", + "x-ms-client-request-id" : "093ca900-8d37-41fa-a1df-2ee16936867a", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +90,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "314afe5e-5693-4e19-b44f-a9e8e90cb622" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e481bab8-a927-4aa3-92b7-d69755792ff3" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b18887d-301e-00f9-62f7-12fa96000000", - "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesaca7196506648Wed, 15 Apr 2020 07:30:20 GMT\"0x8D7E10EDA20AAFF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "314afe5e-5693-4e19-b44f-a9e8e90cb622", + "x-ms-request-id" : "a85d49da-a01e-0037-5338-59432e000000", + "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesac26d682485f3Mon, 13 Jul 2020 17:13:31 GMT\"0x8D82750111D599B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:31 GMT", + "x-ms-client-request-id" : "e481bab8-a927-4aa3-92b7-d69755792ff3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7196506648?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac26d682485f3?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d14cc71f-cbd7-4fbf-bc2e-537f2c270559" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7cba1fb-f86c-46b7-8556-851a42532419" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188890-301e-00f9-73f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "d14cc71f-cbd7-4fbf-bc2e-537f2c270559" + "x-ms-request-id" : "ad1ee4ff-001e-004c-4f38-5901b2000000", + "Date" : "Mon, 13 Jul 2020 17:13:32 GMT", + "x-ms-client-request-id" : "f7cba1fb-f86c-46b7-8556-851a42532419" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesaca7196506648", "javablobgetpagerangesac1pageblobapitestgetpagerangesaca7112090" ] + "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesac26d682485f3", "javablobgetpagerangesac1pageblobapitestgetpagerangesac26d99129" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[3].json index 970111b0780a..1fb4bdd2b9f5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[3].json @@ -1,99 +1,120 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac76777799d7d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac278512812a9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27cef5cf-4ae7-4699-a3d6-56a63e69260e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f12b043-4df7-4a1f-b9a1-2dc68d9dc253" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA43F32B", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D827501264F7E6", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18889e-301e-00f9-7ff7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "27cef5cf-4ae7-4699-a3d6-56a63e69260e" + "x-ms-request-id" : "262dd200-f01e-0077-7c38-594416000000", + "Date" : "Mon, 13 Jul 2020 17:13:32 GMT", + "x-ms-client-request-id" : "6f12b043-4df7-4a1f-b9a1-2dc68d9dc253" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac76777799d7d/javablobgetpagerangesac1pageblobapitestgetpagerangesac76751117", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac278512812a9/javablobgetpagerangesac1pageblobapitestgetpagerangesac27872137", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c9ea0af4-aefd-4a66-b33f-fa0c038142b3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7debc5ed-df9e-4bc8-84a5-9f36745dcebf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA4AEB7C", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D827501299C167", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:33 GMT", + "x-ms-version-id" : "2020-07-13T17:13:33.5858535Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1888a8-301e-00f9-05f7-12fa96000000", + "x-ms-request-id" : "3d8d1bc1-f01e-0015-2c38-598631000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "c9ea0af4-aefd-4a66-b33f-fa0c038142b3" + "Date" : "Mon, 13 Jul 2020 17:13:32 GMT", + "x-ms-client-request-id" : "7debc5ed-df9e-4bc8-84a5-9f36745dcebf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac278512812a9/javablobgetpagerangesac1pageblobapitestgetpagerangesac27872137?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13dfbef5-1140-4f7e-a0a8-ac6d3a3f0996", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0d5a69c5-501e-007e-1a38-5901c5000000", + "Date" : "Mon, 13 Jul 2020 17:13:33 GMT", + "x-ms-client-request-id" : "13dfbef5-1140-4f7e-a0a8-ac6d3a3f0996" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac76777799d7d/javablobgetpagerangesac1pageblobapitestgetpagerangesac76751117", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac278512812a9/javablobgetpagerangesac1pageblobapitestgetpagerangesac27872137", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a9214c7f-ee86-4ea9-9d19-50846e89c2a1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7f0874f-2737-4d6d-a287-5c462ff94081" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "x-ms-version-id" : "2020-07-13T17:13:33.5858535Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:33 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", + "Date" : "Mon, 13 Jul 2020 17:13:33 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10EDA4AEB7C", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D827501299C167", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:13:33 GMT", "Content-Length" : "512", - "x-ms-request-id" : "6b1888b2-301e-00f9-0df7-12fa96000000", - "x-ms-client-request-id" : "a9214c7f-ee86-4ea9-9d19-50846e89c2a1", + "x-ms-request-id" : "c20f86d1-c01e-006c-6f38-597a15000000", + "x-ms-client-request-id" : "c7f0874f-2737-4d6d-a287-5c462ff94081", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac76777799d7d/javablobgetpagerangesac1pageblobapitestgetpagerangesac76751117?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac278512812a9/javablobgetpagerangesac1pageblobapitestgetpagerangesac27872137?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "46f170e6-b69a-4aa1-a73a-94ea21faf526" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5222b2b0-5b04-415d-95df-b629fb4763b7" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:33 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "ETag" : "0x8D7E10EDA4AEB7C", - "Vary" : "Origin", - "x-ms-request-id" : "6b1888b9-301e-00f9-12f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:13:34 GMT", + "ETag" : "0x8D827501299C167", + "x-ms-request-id" : "763318e9-001e-0097-6a38-59c78f000000", "Body" : "", - "x-ms-client-request-id" : "46f170e6-b69a-4aa1-a73a-94ea21faf526", + "x-ms-client-request-id" : "5222b2b0-5b04-415d-95df-b629fb4763b7", "Content-Type" : "application/xml" }, "Exception" : null @@ -101,43 +122,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6ab32dbe-c139-4df2-bc11-d2f8204b94b8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "78f17198-cae1-4aa7-b1e0-9657eba857ce" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1888c3-301e-00f9-1cf7-12fa96000000", - "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesac76777799d7dWed, 15 Apr 2020 07:30:20 GMT\"0x8D7E10EDA43F32B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "6ab32dbe-c139-4df2-bc11-d2f8204b94b8", + "x-ms-request-id" : "4a89ade1-801e-0099-2738-59ee3f000000", + "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesac278512812a9Mon, 13 Jul 2020 17:13:33 GMT\"0x8D827501264F7E6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:34 GMT", + "x-ms-client-request-id" : "78f17198-cae1-4aa7-b1e0-9657eba857ce", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac76777799d7d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac278512812a9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d0b50aad-302f-46d6-beba-124f9bd22a8a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed473ffc-8b99-4744-aba0-9cf2d1dc28ac" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1888cc-301e-00f9-24f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "d0b50aad-302f-46d6-beba-124f9bd22a8a" + "x-ms-request-id" : "f4131048-001e-0073-3538-59c911000000", + "Date" : "Mon, 13 Jul 2020 17:13:34 GMT", + "x-ms-client-request-id" : "ed473ffc-8b99-4744-aba0-9cf2d1dc28ac" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesac76777799d7d", "javablobgetpagerangesac1pageblobapitestgetpagerangesac76751117" ] + "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesac278512812a9", "javablobgetpagerangesac1pageblobapitestgetpagerangesac27872137" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[4].json index 71fb36627c7d..1d71ad07bea9 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[4].json @@ -1,69 +1,88 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac99897157bea?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacd47399945c0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a5377344-4f30-49a6-a5bb-e08bf0b2b1b1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "12ebe64a-f12a-4bce-81bf-34fe16f63202" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA6BF776", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D8275013DEC596", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1888d4-301e-00f9-2bf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "a5377344-4f30-49a6-a5bb-e08bf0b2b1b1" + "x-ms-request-id" : "02549ff8-901e-0061-5038-59b2c1000000", + "Date" : "Mon, 13 Jul 2020 17:13:34 GMT", + "x-ms-client-request-id" : "12ebe64a-f12a-4bce-81bf-34fe16f63202" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac99897157bea/javablobgetpagerangesac1pageblobapitestgetpagerangesac99880949", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacd47399945c0/javablobgetpagerangesac1pageblobapitestgetpagerangesacd4786310", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4fdd4b86-ed2c-4626-bdab-58e3f29b63f1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd9b7a36-3a5f-486b-865e-09a8a90095ea" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA72A13E", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D827501413FC29", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:36 GMT", + "x-ms-version-id" : "2020-07-13T17:13:36.0646185Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1888e6-301e-00f9-36f7-12fa96000000", + "x-ms-request-id" : "7254b6de-e01e-009f-6e38-59dd80000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "4fdd4b86-ed2c-4626-bdab-58e3f29b63f1" + "Date" : "Mon, 13 Jul 2020 17:13:35 GMT", + "x-ms-client-request-id" : "fd9b7a36-3a5f-486b-865e-09a8a90095ea" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacd47399945c0/javablobgetpagerangesac1pageblobapitestgetpagerangesacd4786310?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bcf68b8a-3fad-4d34-960d-a58f1258035b", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "da5814d7-201e-0029-3f38-59aff6000000", + "Date" : "Mon, 13 Jul 2020 17:13:36 GMT", + "x-ms-client-request-id" : "bcf68b8a-3fad-4d34-960d-a58f1258035b" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac99897157bea/javablobgetpagerangesac1pageblobapitestgetpagerangesac99880949?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacd47399945c0/javablobgetpagerangesac1pageblobapitestgetpagerangesacd4786310?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d536bfa5-e8fe-449c-b020-ab033e5764c3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8f6c70a0-608e-4f67-8418-5edcbf82a50b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:36 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "ETag" : "0x8D7E10EDA72A13E", - "Vary" : "Origin", - "x-ms-request-id" : "6b1888f5-301e-00f9-43f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:13:36 GMT", + "ETag" : "0x8D827501413FC29", + "x-ms-request-id" : "891b3f59-a01e-0018-1938-594ee5000000", "Body" : "", - "x-ms-client-request-id" : "d536bfa5-e8fe-449c-b020-ab033e5764c3", + "x-ms-client-request-id" : "8f6c70a0-608e-4f67-8418-5edcbf82a50b", "Content-Type" : "application/xml" }, "Exception" : null @@ -71,43 +90,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e5c0616f-79ed-4bd3-a7ea-f85342b7d305" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3d49f94-0bd6-4367-8f0d-8f5a93148fa2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188904-301e-00f9-4ef7-12fa96000000", - "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesac99897157beaWed, 15 Apr 2020 07:30:20 GMT\"0x8D7E10EDA6BF776\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "e5c0616f-79ed-4bd3-a7ea-f85342b7d305", + "x-ms-request-id" : "f5958a4a-301e-001a-6438-59f05d000000", + "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesacd47399945c0Mon, 13 Jul 2020 17:13:35 GMT\"0x8D8275013DEC596\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:36 GMT", + "x-ms-client-request-id" : "e3d49f94-0bd6-4367-8f0d-8f5a93148fa2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac99897157bea?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacd47399945c0?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "418b98bc-82f3-47d9-af90-f62e40c5f4ea" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "276881a7-7e68-4e4f-b33f-3638214e93a6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188916-301e-00f9-5df7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "418b98bc-82f3-47d9-af90-f62e40c5f4ea" + "x-ms-request-id" : "36bf74c3-101e-001d-4438-599c3e000000", + "Date" : "Mon, 13 Jul 2020 17:13:37 GMT", + "x-ms-client-request-id" : "276881a7-7e68-4e4f-b33f-3638214e93a6" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesac99897157bea", "javablobgetpagerangesac1pageblobapitestgetpagerangesac99880949" ] + "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesacd47399945c0", "javablobgetpagerangesac1pageblobapitestgetpagerangesacd4786310" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[5].json index 99d68bd02a4d..27ee7c67bfe1 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[5].json @@ -1,91 +1,110 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac9dd1668230c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7f20049e41?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "78a67ac1-904b-4506-b1b0-fe7ff8b0878e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "891007e5-e984-4e85-a26f-f588cdcaba7e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA9114CC", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D82750151DA2D3", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188923-301e-00f9-68f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "78a67ac1-904b-4506-b1b0-fe7ff8b0878e" + "x-ms-request-id" : "196b2b2d-201e-005b-3838-59a8b9000000", + "Date" : "Mon, 13 Jul 2020 17:13:37 GMT", + "x-ms-client-request-id" : "891007e5-e984-4e85-a26f-f588cdcaba7e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac9dd1668230c/javablobgetpagerangesac1pageblobapitestgetpagerangesac9dd82849", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7f20049e41/javablobgetpagerangesac1pageblobapitestgetpagerangesaca7f16650", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c680383e-bd96-4be0-92ca-76cd5921fa0d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9dff8e1-0281-451e-9dea-19d0f5b73e06" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA9A08C5", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "ETag" : "0x8D827501550D49F", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:38 GMT", + "x-ms-version-id" : "2020-07-13T17:13:38.1410975Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18892d-301e-00f9-71f7-12fa96000000", + "x-ms-request-id" : "2e38ecc8-101e-000d-0f38-595956000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "c680383e-bd96-4be0-92ca-76cd5921fa0d" + "Date" : "Mon, 13 Jul 2020 17:13:38 GMT", + "x-ms-client-request-id" : "a9dff8e1-0281-451e-9dea-19d0f5b73e06" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac9dd1668230c/javablobgetpagerangesac1pageblobapitestgetpagerangesac9dd82849?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7f20049e41/javablobgetpagerangesac1pageblobapitestgetpagerangesaca7f16650?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4ece43b5-6867-4ef2-87a5-9950dd48ad64" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e91b7f4-b72e-45a3-8765-51b56eef12f9", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDA9A08C5", - "x-ms-lease-id" : "bc23fa39-4d0b-49b2-8d8a-c24a81ba5155", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "68367d4c-701e-0056-6738-59606d000000", + "Date" : "Mon, 13 Jul 2020 17:13:37 GMT", + "x-ms-client-request-id" : "2e91b7f4-b72e-45a3-8765-51b56eef12f9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7f20049e41/javablobgetpagerangesac1pageblobapitestgetpagerangesaca7f16650?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7b37a64e-ccf5-46f9-b9e5-dff98d35921e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D827501550D49F", + "x-ms-lease-id" : "3007ea0e-5273-40c7-a156-39596e2b8164", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18894a-301e-00f9-05f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "x-ms-client-request-id" : "4ece43b5-6867-4ef2-87a5-9950dd48ad64" + "x-ms-request-id" : "768f5368-601e-0081-6f38-593158000000", + "Date" : "Mon, 13 Jul 2020 17:13:38 GMT", + "x-ms-client-request-id" : "7b37a64e-ccf5-46f9-b9e5-dff98d35921e" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac9dd1668230c/javablobgetpagerangesac1pageblobapitestgetpagerangesac9dd82849?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7f20049e41/javablobgetpagerangesac1pageblobapitestgetpagerangesaca7f16650?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1f0c1ffa-0a77-4d9f-9c07-950d29d31c58" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "922ad5a9-2fd8-45da-913d-6614960021fd" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:20 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:38 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:20 GMT", - "ETag" : "0x8D7E10EDA9A08C5", - "Vary" : "Origin", - "x-ms-request-id" : "6b188951-301e-00f9-0cf7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:13:39 GMT", + "ETag" : "0x8D827501550D49F", + "x-ms-request-id" : "4b10d220-501e-0033-1d38-59ce29000000", "Body" : "", - "x-ms-client-request-id" : "1f0c1ffa-0a77-4d9f-9c07-950d29d31c58", + "x-ms-client-request-id" : "922ad5a9-2fd8-45da-913d-6614960021fd", "Content-Type" : "application/xml" }, "Exception" : null @@ -93,43 +112,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ce387666-80ea-4408-aaf9-37d3cf368519" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8956112b-f83c-4cc9-b276-c4e9ec96bd6b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188962-301e-00f9-16f7-12fa96000000", - "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesac9dd1668230cWed, 15 Apr 2020 07:30:20 GMT\"0x8D7E10EDA9114CC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "ce387666-80ea-4408-aaf9-37d3cf368519", + "x-ms-request-id" : "0b28e710-901e-0071-3738-5977a9000000", + "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesaca7f20049e41Mon, 13 Jul 2020 17:13:37 GMT\"0x8D82750151DA2D3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:38 GMT", + "x-ms-client-request-id" : "8956112b-f83c-4cc9-b276-c4e9ec96bd6b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesac9dd1668230c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesaca7f20049e41?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d4c5171c-e0e9-4a11-bd0e-08414b2e1cb8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5dd3cb5c-bde0-4340-8243-bd42401b183c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b18897a-301e-00f9-2af7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "d4c5171c-e0e9-4a11-bd0e-08414b2e1cb8" + "x-ms-request-id" : "b2a66b1f-401e-00a9-3e38-5950f0000000", + "Date" : "Mon, 13 Jul 2020 17:13:39 GMT", + "x-ms-client-request-id" : "5dd3cb5c-bde0-4340-8243-bd42401b183c" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesac9dd1668230c", "javablobgetpagerangesac1pageblobapitestgetpagerangesac9dd82849" ] + "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesaca7f20049e41", "javablobgetpagerangesac1pageblobapitestgetpagerangesaca7f16650" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[6].json new file mode 100644 index 000000000000..60e92dfc9dab --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesac[6].json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacbb201819eff?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3c377f1-f779-4ba2-ba6b-7c16691da757" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D827501698C3F2", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "efd17c7d-401e-004d-6e38-595e6e000000", + "Date" : "Mon, 13 Jul 2020 17:13:39 GMT", + "x-ms-client-request-id" : "b3c377f1-f779-4ba2-ba6b-7c16691da757" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacbb201819eff/javablobgetpagerangesac1pageblobapitestgetpagerangesacbb256891", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "57351fa1-bab5-4833-bd84-21b3f0c367c4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8275016CC9649", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:40 GMT", + "x-ms-version-id" : "2020-07-13T17:13:40.6298697Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e1cf88a4-d01e-004f-1438-59e0d6000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:13:39 GMT", + "x-ms-client-request-id" : "57351fa1-bab5-4833-bd84-21b3f0c367c4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacbb201819eff/javablobgetpagerangesac1pageblobapitestgetpagerangesacbb256891?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd838d47-36c2-47a6-b3e1-c1cdd2d04677", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c18997ae-a01e-008e-6338-594734000000", + "Date" : "Mon, 13 Jul 2020 17:13:39 GMT", + "x-ms-client-request-id" : "cd838d47-36c2-47a6-b3e1-c1cdd2d04677" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacbb201819eff/javablobgetpagerangesac1pageblobapitestgetpagerangesacbb256891?comp=pagelist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2da9d3ef-d680-441e-973a-c0ce4b1b214f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:40 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 17:13:40 GMT", + "ETag" : "0x8D8275016CC9649", + "x-ms-request-id" : "a832dc75-201e-0090-6438-59abec000000", + "Body" : "", + "x-ms-client-request-id" : "2da9d3ef-d680-441e-973a-c0ce4b1b214f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ffea81f-d89e-40e7-8312-bf5387e3f88b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8adbe1f0-001e-002e-4538-59c395000000", + "Body" : "jtcgetpagerangesacjtcgetpagerangesac0pageblobapitestgetpagerangesacbb201819effMon, 13 Jul 2020 17:13:40 GMT\"0x8D827501698C3F2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:41 GMT", + "x-ms-client-request-id" : "3ffea81f-d89e-40e7-8312-bf5387e3f88b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesac0pageblobapitestgetpagerangesacbb201819eff?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f96b7b68-98a6-4779-8510-b1b9872b66fb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "58d94a45-c01e-0031-3538-597091000000", + "Date" : "Mon, 13 Jul 2020 17:13:41 GMT", + "x-ms-client-request-id" : "f96b7b68-98a6-4779-8510-b1b9872b66fb" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetpagerangesac0pageblobapitestgetpagerangesacbb201819eff", "javablobgetpagerangesac1pageblobapitestgetpagerangesacbb256891" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[0].json index e670600153cd..2909653763f5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[0].json @@ -1,67 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0528589c1d7d8004de4e34a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail084797ab6ace89438446e68?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "90a7bc15-8463-4d7f-abf2-b604f79e2cc0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f966992-900c-4bc1-96a1-85481b5e420b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDAC43F4C", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFAD7DE6D", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:53 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188997-301e-00f9-40f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "90a7bc15-8463-4d7f-abf2-b604f79e2cc0" + "x-ms-request-id" : "5f6366e9-c01e-0021-4838-59b5f9000000", + "Date" : "Mon, 13 Jul 2020 17:12:52 GMT", + "x-ms-client-request-id" : "3f966992-900c-4bc1-96a1-85481b5e420b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0528589c1d7d8004de4e34a/javablobgetpagerangesacfail185794caea6077d3734a3", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail084797ab6ace89438446e68/javablobgetpagerangesacfail133266ceb227bee49145a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fde8386c-ecb9-443f-a675-181125517ab4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a1d95f1b-8fdd-4c99-b018-d6f5164e4628" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDACCBDAD", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFB59565C", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:54 GMT", + "x-ms-version-id" : "2020-07-13T17:12:54.5760860Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1889ac-301e-00f9-53f7-12fa96000000", + "x-ms-request-id" : "223824fe-101e-009b-1538-595087000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "fde8386c-ecb9-443f-a675-181125517ab4" + "Date" : "Mon, 13 Jul 2020 17:12:54 GMT", + "x-ms-client-request-id" : "a1d95f1b-8fdd-4c99-b018-d6f5164e4628" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0528589c1d7d8004de4e34a/javablobgetpagerangesacfail185794caea6077d3734a3?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail084797ab6ace89438446e68/javablobgetpagerangesacfail133266ceb227bee49145a?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9e77ae5e-588b-42ca-88c5-3e06c9314416" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5739ca9-9266-4c8e-a55a-8b63f5f65a4a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "304", - "x-ms-request-id" : "6b1889b8-301e-00f9-5ef7-12fa96000000", + "x-ms-request-id" : "cb8f6876-d01e-0060-1638-59ed1d000000", "Body" : "", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "9e77ae5e-588b-42ca-88c5-3e06c9314416", + "Date" : "Mon, 13 Jul 2020 17:12:54 GMT", + "x-ms-client-request-id" : "d5739ca9-9266-4c8e-a55a-8b63f5f65a4a", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1851d8f0-43e8-4c59-afaf-7b6e33fcb5ef" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4e8cdf7-e978-4a03-91e9-ea36e4fb8e29" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1889c0-301e-00f9-64f7-12fa96000000", - "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail0528589c1d7d8004de4e34aWed, 15 Apr 2020 07:30:21 GMT\"0x8D7E10EDAC43F4C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "1851d8f0-43e8-4c59-afaf-7b6e33fcb5ef", + "x-ms-request-id" : "09fbff0c-101e-008b-6738-5995ef000000", + "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail084797ab6ace89438446e68Mon, 13 Jul 2020 17:12:53 GMT\"0x8D8274FFAD7DE6D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:54 GMT", + "x-ms-client-request-id" : "d4e8cdf7-e978-4a03-91e9-ea36e4fb8e29", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0528589c1d7d8004de4e34a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail084797ab6ace89438446e68?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "98a71173-3d4b-4e72-a6d3-ea41a9c154ea" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "511b61a3-5749-4a7c-8001-2e14dfe035ca" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1889cc-301e-00f9-6ff7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "98a71173-3d4b-4e72-a6d3-ea41a9c154ea" + "x-ms-request-id" : "88c17762-901e-002c-7e38-597d2d000000", + "Date" : "Mon, 13 Jul 2020 17:12:55 GMT", + "x-ms-client-request-id" : "511b61a3-5749-4a7c-8001-2e14dfe035ca" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesacfail0528589c1d7d8004de4e34a", "javablobgetpagerangesacfail185794caea6077d3734a3" ] + "variables" : [ "jtcgetpagerangesacfail084797ab6ace89438446e68", "javablobgetpagerangesacfail133266ceb227bee49145a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[1].json index 5ef942429df0..3c4372e40a7c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[1].json @@ -1,67 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail00256497a86c2b99dc4afd9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0258533e12adda3f9f4f519?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "64274166-506c-45cf-b3c5-643d688abc99" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1947c3e5-244d-4697-ba89-999692890ba0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDAE87204", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFC5E6296", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:56 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1889d3-301e-00f9-76f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "64274166-506c-45cf-b3c5-643d688abc99" + "x-ms-request-id" : "b87d59a0-201e-0006-7538-59a23d000000", + "Date" : "Mon, 13 Jul 2020 17:12:55 GMT", + "x-ms-client-request-id" : "1947c3e5-244d-4697-ba89-999692890ba0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail00256497a86c2b99dc4afd9/javablobgetpagerangesacfail170636904ebfffe8454ad", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0258533e12adda3f9f4f519/javablobgetpagerangesacfail15307117d14dc9d2e4448", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1e17f336-2a0f-45ec-9bae-df562265cd21" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a8ace44-9408-421d-b265-e13559ffd4a5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDAEFB752", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFC9AEAAA", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:56 GMT", + "x-ms-version-id" : "2020-07-13T17:12:56.6835882Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1889e3-301e-00f9-80f7-12fa96000000", + "x-ms-request-id" : "7667623f-801e-0030-4a38-592f4d000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "1e17f336-2a0f-45ec-9bae-df562265cd21" + "Date" : "Mon, 13 Jul 2020 17:12:55 GMT", + "x-ms-client-request-id" : "0a8ace44-9408-421d-b265-e13559ffd4a5" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail00256497a86c2b99dc4afd9/javablobgetpagerangesacfail170636904ebfffe8454ad?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0258533e12adda3f9f4f519/javablobgetpagerangesacfail15307117d14dc9d2e4448?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e5a0ca51-d0d4-4843-adaa-0496b7988236" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "42af2de5-0e49-4d4a-84af-494202f2828b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6b1889e9-301e-00f9-06f7-12fa96000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b1889e9-301e-00f9-06f7-12fa96000000\nTime:2020-04-15T07:30:21.5743935Z", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "e5a0ca51-d0d4-4843-adaa-0496b7988236", + "x-ms-request-id" : "8118edaa-101e-006f-6338-599b71000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8118edaa-101e-006f-6338-599b71000000\nTime:2020-07-13T17:12:57.0737779Z", + "Date" : "Mon, 13 Jul 2020 17:12:56 GMT", + "x-ms-client-request-id" : "42af2de5-0e49-4d4a-84af-494202f2828b", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b40f215d-c377-4de6-92c1-c04c89233aea" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bfeeeec2-9de5-4a7f-9a84-8fb35a0fb95a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1889ef-301e-00f9-0bf7-12fa96000000", - "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail00256497a86c2b99dc4afd9Wed, 15 Apr 2020 07:30:21 GMT\"0x8D7E10EDAE87204\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "b40f215d-c377-4de6-92c1-c04c89233aea", + "x-ms-request-id" : "40941c0b-901e-0085-7838-59bc5f000000", + "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail0258533e12adda3f9f4f519Mon, 13 Jul 2020 17:12:56 GMT\"0x8D8274FFC5E6296\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:57 GMT", + "x-ms-client-request-id" : "bfeeeec2-9de5-4a7f-9a84-8fb35a0fb95a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail00256497a86c2b99dc4afd9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0258533e12adda3f9f4f519?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "06a2a256-f233-4eb0-872c-f302c5eabea6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16bd017d-cbfc-462d-9482-73022d458a9d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188a00-301e-00f9-19f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "06a2a256-f233-4eb0-872c-f302c5eabea6" + "x-ms-request-id" : "1a1b48f6-501e-0023-0938-590b41000000", + "Date" : "Mon, 13 Jul 2020 17:12:56 GMT", + "x-ms-client-request-id" : "16bd017d-cbfc-462d-9482-73022d458a9d" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesacfail00256497a86c2b99dc4afd9", "javablobgetpagerangesacfail170636904ebfffe8454ad" ] + "variables" : [ "jtcgetpagerangesacfail0258533e12adda3f9f4f519", "javablobgetpagerangesacfail15307117d14dc9d2e4448" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[2].json index c9c7aceeb936..465483c06c08 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[2].json @@ -1,67 +1,67 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02250802ab7b9fe59246a3b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail01735138b24241044841529?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f46e4db9-d41f-452d-b7d8-4cc6edb1859d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c63bbd2-71ad-4a48-8be2-e4a56afdca48" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDB0E52CE", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFD7A4A75", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:58 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188a0a-301e-00f9-23f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "f46e4db9-d41f-452d-b7d8-4cc6edb1859d" + "x-ms-request-id" : "005b6e14-301e-0025-6538-5938fe000000", + "Date" : "Mon, 13 Jul 2020 17:12:57 GMT", + "x-ms-client-request-id" : "1c63bbd2-71ad-4a48-8be2-e4a56afdca48" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02250802ab7b9fe59246a3b/javablobgetpagerangesacfail144258e19d229d6b274b8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail01735138b24241044841529/javablobgetpagerangesacfail11287877343424dcf9442", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "09e0a22a-4342-4e4f-8eb4-3aad549a719d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "671bbe91-9092-45e3-aa55-af7ac07d14a7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDB160D2F", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFDB00F8D", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:58 GMT", + "x-ms-version-id" : "2020-07-13T17:12:58.4998797Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188a18-301e-00f9-2ef7-12fa96000000", + "x-ms-request-id" : "cd26ec9b-601e-0065-6838-593fc6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "09e0a22a-4342-4e4f-8eb4-3aad549a719d" + "Date" : "Mon, 13 Jul 2020 17:12:57 GMT", + "x-ms-client-request-id" : "671bbe91-9092-45e3-aa55-af7ac07d14a7" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02250802ab7b9fe59246a3b/javablobgetpagerangesacfail144258e19d229d6b274b8?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail01735138b24241044841529/javablobgetpagerangesacfail11287877343424dcf9442?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d61fed93-cdbe-466c-a8a4-977f5ee0641b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "150848c2-0d02-4e70-8a8d-ad502eb48fe2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6b188a1f-301e-00f9-35f7-12fa96000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b188a1f-301e-00f9-35f7-12fa96000000\nTime:2020-04-15T07:30:21.8106197Z", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "d61fed93-cdbe-466c-a8a4-977f5ee0641b", + "x-ms-request-id" : "8f8386f4-e01e-0054-0b38-59ded5000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8f8386f4-e01e-0054-0b38-59ded5000000\nTime:2020-07-13T17:12:58.8406849Z", + "Date" : "Mon, 13 Jul 2020 17:12:58 GMT", + "x-ms-client-request-id" : "150848c2-0d02-4e70-8a8d-ad502eb48fe2", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +69,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b638ccac-6413-45f7-b4d3-8102f794ff6c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "064be91c-7be0-448f-a1fe-d3ef382b8b2b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188a30-301e-00f9-42f7-12fa96000000", - "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail02250802ab7b9fe59246a3bWed, 15 Apr 2020 07:30:21 GMT\"0x8D7E10EDB0E52CE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "b638ccac-6413-45f7-b4d3-8102f794ff6c", + "x-ms-request-id" : "68365c51-701e-0056-0838-59606d000000", + "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail01735138b24241044841529Mon, 13 Jul 2020 17:12:58 GMT\"0x8D8274FFD7A4A75\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:58 GMT", + "x-ms-client-request-id" : "064be91c-7be0-448f-a1fe-d3ef382b8b2b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02250802ab7b9fe59246a3b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail01735138b24241044841529?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9035584b-546a-4521-bb78-f0187521fcea" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e066d3c6-bba6-4f86-8532-ae46b965e271" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188a49-301e-00f9-52f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "9035584b-546a-4521-bb78-f0187521fcea" + "x-ms-request-id" : "768f196e-601e-0081-2f38-593158000000", + "Date" : "Mon, 13 Jul 2020 17:12:59 GMT", + "x-ms-client-request-id" : "e066d3c6-bba6-4f86-8532-ae46b965e271" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesacfail02250802ab7b9fe59246a3b", "javablobgetpagerangesacfail144258e19d229d6b274b8" ] + "variables" : [ "jtcgetpagerangesacfail01735138b24241044841529", "javablobgetpagerangesacfail11287877343424dcf9442" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[3].json index b2eea708f710..e0c19d1d386a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[3].json @@ -1,97 +1,98 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0065638baf59afef5348abb?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0418330607f956d922486b9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9bc84f62-d820-4c20-a94f-e7a4bf9913c7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c222073b-e27e-4128-93b0-4c17adc0fd62" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDB30FE9B", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFE8E2859", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:59 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188a56-301e-00f9-5df7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "9bc84f62-d820-4c20-a94f-e7a4bf9913c7" + "x-ms-request-id" : "4b109615-501e-0033-3838-59ce29000000", + "Date" : "Mon, 13 Jul 2020 17:12:59 GMT", + "x-ms-client-request-id" : "c222073b-e27e-4128-93b0-4c17adc0fd62" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0065638baf59afef5348abb/javablobgetpagerangesacfail18735147f9eedd0064416", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0418330607f956d922486b9/javablobgetpagerangesacfail174889040fac4af7ab480", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e40b5062-c71b-471e-a8c4-164655b6d3e5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "41a5a5ff-f50f-47bb-8364-d84b2cf53f1b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDB37F533", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFEC0C6E0", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:00 GMT", + "x-ms-version-id" : "2020-07-13T17:13:00.2881539Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188a6b-301e-00f9-6cf7-12fa96000000", + "x-ms-request-id" : "0b28c938-901e-0071-6238-5977a9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "e40b5062-c71b-471e-a8c4-164655b6d3e5" + "Date" : "Mon, 13 Jul 2020 17:12:59 GMT", + "x-ms-client-request-id" : "41a5a5ff-f50f-47bb-8364-d84b2cf53f1b" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0065638baf59afef5348abb/javablobgetpagerangesacfail18735147f9eedd0064416", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0418330607f956d922486b9/javablobgetpagerangesacfail174889040fac4af7ab480", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d591358d-7328-4cfa-8ab5-9fc3c65bc76e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "75afd178-6e9a-4085-8547-6ef26b3b8462" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:21 GMT", + "x-ms-version-id" : "2020-07-13T17:13:00.2881539Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", + "Date" : "Mon, 13 Jul 2020 17:12:59 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10EDB37F533", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:30:21 GMT", + "ETag" : "0x8D8274FFEC0C6E0", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:13:00 GMT", "Content-Length" : "512", - "x-ms-request-id" : "6b188a7d-301e-00f9-79f7-12fa96000000", - "x-ms-client-request-id" : "d591358d-7328-4cfa-8ab5-9fc3c65bc76e", + "x-ms-request-id" : "b2a6223e-401e-00a9-0138-5950f0000000", + "x-ms-client-request-id" : "75afd178-6e9a-4085-8547-6ef26b3b8462", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0065638baf59afef5348abb/javablobgetpagerangesacfail18735147f9eedd0064416?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0418330607f956d922486b9/javablobgetpagerangesacfail174889040fac4af7ab480?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0b50d617-6145-4e83-809a-14a645ae251f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ea929db6-9696-4251-87ec-2cee95db11f9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "304", - "x-ms-request-id" : "6b188a85-301e-00f9-80f7-12fa96000000", + "x-ms-request-id" : "efd13f4b-401e-004d-2f38-595e6e000000", "Body" : "", - "Date" : "Wed, 15 Apr 2020 07:30:21 GMT", - "x-ms-client-request-id" : "0b50d617-6145-4e83-809a-14a645ae251f", + "Date" : "Mon, 13 Jul 2020 17:13:00 GMT", + "x-ms-client-request-id" : "ea929db6-9696-4251-87ec-2cee95db11f9", "Content-Type" : "application/xml" }, "Exception" : null @@ -99,43 +100,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ce5c0f03-6af4-4f6b-8e95-d7a726085bb7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82b0d861-c081-47a7-b7e5-a1e18a1a8ed4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188a90-301e-00f9-0af7-12fa96000000", - "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail0065638baf59afef5348abbWed, 15 Apr 2020 07:30:21 GMT\"0x8D7E10EDB30FE9B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:22 GMT", - "x-ms-client-request-id" : "ce5c0f03-6af4-4f6b-8e95-d7a726085bb7", + "x-ms-request-id" : "c189508b-a01e-008e-3038-594734000000", + "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail0418330607f956d922486b9Mon, 13 Jul 2020 17:12:59 GMT\"0x8D8274FFE8E2859\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:00 GMT", + "x-ms-client-request-id" : "82b0d861-c081-47a7-b7e5-a1e18a1a8ed4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0065638baf59afef5348abb?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0418330607f956d922486b9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7704117a-39f7-49f6-b54c-71ccf809cffb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ce6ea42-fe64-4b44-9d7d-22d2144780f4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188a9d-301e-00f9-17f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:22 GMT", - "x-ms-client-request-id" : "7704117a-39f7-49f6-b54c-71ccf809cffb" + "x-ms-request-id" : "9abdefa1-801e-0089-5f38-592b57000000", + "Date" : "Mon, 13 Jul 2020 17:13:00 GMT", + "x-ms-client-request-id" : "8ce6ea42-fe64-4b44-9d7d-22d2144780f4" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesacfail0065638baf59afef5348abb", "javablobgetpagerangesacfail18735147f9eedd0064416" ] + "variables" : [ "jtcgetpagerangesacfail0418330607f956d922486b9", "javablobgetpagerangesacfail174889040fac4af7ab480" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[4].json index 29bafc458ad2..b446292435dc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[4].json @@ -1,89 +1,89 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02848934cff61d09c2424aa?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail099763b22e26c155644e339?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ef38003e-ac70-4cb0-a9fd-c45dc37daa4c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b5a01377-8488-4e3e-a9fa-a7dd7f974f7f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDB5A62C6", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:22 GMT", + "ETag" : "0x8D8274FFFD6EACF", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:02 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188ab2-301e-00f9-2af7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:22 GMT", - "x-ms-client-request-id" : "ef38003e-ac70-4cb0-a9fd-c45dc37daa4c" + "x-ms-request-id" : "aa727369-301e-0078-3c38-59327a000000", + "Date" : "Mon, 13 Jul 2020 17:13:01 GMT", + "x-ms-client-request-id" : "b5a01377-8488-4e3e-a9fa-a7dd7f974f7f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02848934cff61d09c2424aa/javablobgetpagerangesacfail16139571088acbe40d4e5", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail099763b22e26c155644e339/javablobgetpagerangesacfail1740352161d7634588418", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "892a93a1-2105-4047-8e55-ed9e43eb94ee" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa516bf1-424c-46a7-95ed-1cde6e14bd73" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDB60E3B7", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:22 GMT", + "ETag" : "0x8D82750000A4BE1", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:02 GMT", + "x-ms-version-id" : "2020-07-13T17:13:02.4466913Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188ac1-301e-00f9-36f7-12fa96000000", + "x-ms-request-id" : "15719b37-b01e-0066-4038-59dea2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:22 GMT", - "x-ms-client-request-id" : "892a93a1-2105-4047-8e55-ed9e43eb94ee" + "Date" : "Mon, 13 Jul 2020 17:13:02 GMT", + "x-ms-client-request-id" : "fa516bf1-424c-46a7-95ed-1cde6e14bd73" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02848934cff61d09c2424aa/javablobgetpagerangesacfail16139571088acbe40d4e5?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail099763b22e26c155644e339/javablobgetpagerangesacfail1740352161d7634588418?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0507be6d-d791-4194-94d5-36d3f939fb85" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f03b1e8-2ff6-4405-91d1-9a4b70e8ae1a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDB60E3B7", - "x-ms-lease-id" : "56ffb98c-457b-4ae1-9e5f-c8140e13be1f", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:22 GMT", + "ETag" : "0x8D82750000A4BE1", + "x-ms-lease-id" : "52ba560e-856d-41af-8cb5-e414ac16857d", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:02 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188aca-301e-00f9-3ef7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:22 GMT", - "x-ms-client-request-id" : "0507be6d-d791-4194-94d5-36d3f939fb85" + "x-ms-request-id" : "6059d059-b01e-0004-4c38-591c85000000", + "Date" : "Mon, 13 Jul 2020 17:13:02 GMT", + "x-ms-client-request-id" : "6f03b1e8-2ff6-4405-91d1-9a4b70e8ae1a" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02848934cff61d09c2424aa/javablobgetpagerangesacfail16139571088acbe40d4e5?comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail099763b22e26c155644e339/javablobgetpagerangesacfail1740352161d7634588418?comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "63b336cc-591a-4f25-ab4c-3b7946d9974e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bdd83523-a8f7-4b6c-bf27-b6e3a0a1d350" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "6b188ad5-301e-00f9-49f7-12fa96000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:6b188ad5-301e-00f9-49f7-12fa96000000\nTime:2020-04-15T07:30:22.3601505Z", - "Date" : "Wed, 15 Apr 2020 07:30:22 GMT", - "x-ms-client-request-id" : "63b336cc-591a-4f25-ab4c-3b7946d9974e", + "x-ms-request-id" : "94d1a52b-a01e-006a-7638-5949aa000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:94d1a52b-a01e-006a-7638-5949aa000000\nTime:2020-07-13T17:13:03.1381509Z", + "Date" : "Mon, 13 Jul 2020 17:13:02 GMT", + "x-ms-client-request-id" : "bdd83523-a8f7-4b6c-bf27-b6e3a0a1d350", "Content-Type" : "application/xml" }, "Exception" : null @@ -91,43 +91,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0e48266c-df51-42fb-b379-188749ee5f8e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9f1c98f-83f7-4062-aa12-5f3ba8cc90ed" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188ae5-301e-00f9-55f7-12fa96000000", - "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail02848934cff61d09c2424aaWed, 15 Apr 2020 07:30:22 GMT\"0x8D7E10EDB5A62C6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:22 GMT", - "x-ms-client-request-id" : "0e48266c-df51-42fb-b379-188749ee5f8e", + "x-ms-request-id" : "35bb27ea-f01e-0083-3e38-598fe0000000", + "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail099763b22e26c155644e339Mon, 13 Jul 2020 17:13:02 GMT\"0x8D8274FFFD6EACF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:02 GMT", + "x-ms-client-request-id" : "b9f1c98f-83f7-4062-aa12-5f3ba8cc90ed", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail02848934cff61d09c2424aa?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail099763b22e26c155644e339?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "819ae7c0-fed7-4e46-81d1-2c9d36141157" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0b7aad7f-da36-4379-907a-d95534580153" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188af2-301e-00f9-61f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:22 GMT", - "x-ms-client-request-id" : "819ae7c0-fed7-4e46-81d1-2c9d36141157" + "x-ms-request-id" : "b047d6df-501e-009a-2138-590f5b000000", + "Date" : "Mon, 13 Jul 2020 17:13:03 GMT", + "x-ms-client-request-id" : "0b7aad7f-da36-4379-907a-d95534580153" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesacfail02848934cff61d09c2424aa", "javablobgetpagerangesacfail16139571088acbe40d4e5" ] + "variables" : [ "jtcgetpagerangesacfail099763b22e26c155644e339", "javablobgetpagerangesacfail1740352161d7634588418" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[5].json new file mode 100644 index 000000000000..7c5938c1d617 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesacfail[5].json @@ -0,0 +1,110 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0030296ccec193e4e84973b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65f5c682-1f20-4a87-8661-678d48c97100" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82750011928E9", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:04 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5d8b4df7-701e-009d-0338-596338000000", + "Date" : "Mon, 13 Jul 2020 17:13:04 GMT", + "x-ms-client-request-id" : "65f5c682-1f20-4a87-8661-678d48c97100" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0030296ccec193e4e84973b/javablobgetpagerangesacfail1571182ee8161c4171427", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "53e36a2b-7a90-4ab1-a1bf-c43d8a11e258" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82750014B6AD5", + "Last-Modified" : "Mon, 13 Jul 2020 17:13:04 GMT", + "x-ms-version-id" : "2020-07-13T17:13:04.5511893Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "55b9ac86-d01e-0002-6938-592f3a000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:13:03 GMT", + "x-ms-client-request-id" : "53e36a2b-7a90-4ab1-a1bf-c43d8a11e258" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0030296ccec193e4e84973b/javablobgetpagerangesacfail1571182ee8161c4171427?comp=pagelist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "835b88e3-0ac0-4f27-b04c-359d38238e4a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "79c786f5-001e-005c-0138-59c4da000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:79c786f5-001e-005c-0138-59c4da000000\nTime:2020-07-13T17:13:04.9030238Z", + "Date" : "Mon, 13 Jul 2020 17:13:04 GMT", + "x-ms-client-request-id" : "835b88e3-0ac0-4f27-b04c-359d38238e4a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d1ca65c1-b224-48b6-84a8-2c4530ce5315" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "27214722-e01e-0036-5638-591cf2000000", + "Body" : "jtcgetpagerangesacfailjtcgetpagerangesacfail0030296ccec193e4e84973bMon, 13 Jul 2020 17:13:04 GMT\"0x8D82750011928E9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:13:04 GMT", + "x-ms-client-request-id" : "d1ca65c1-b224-48b6-84a8-2c4530ce5315", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesacfail0030296ccec193e4e84973b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "317c4436-1716-4589-8a42-11e6c9803d40" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "4f73f870-101e-00a4-3d38-599824000000", + "Date" : "Mon, 13 Jul 2020 17:13:05 GMT", + "x-ms-client-request-id" : "317c4436-1716-4589-8a42-11e6c9803d40" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetpagerangesacfail0030296ccec193e4e84973b", "javablobgetpagerangesacfail1571182ee8161c4171427" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[0].json index 7b2372a5807b..7c685e23683e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[0].json @@ -1,92 +1,112 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac02032595c6aa2434b64181b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac06998218a3597bbe4c41078?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b97d6653-5d6d-4b52-85db-eb59d1abee0e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca52aa79-d4bd-4b50-8d37-2ffd7f4ca76f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC320C51", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:23 GMT", + "ETag" : "0x8D827503FB012E4", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188c37-301e-00f9-71f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "x-ms-client-request-id" : "b97d6653-5d6d-4b52-85db-eb59d1abee0e" + "x-ms-request-id" : "565020de-501e-006e-8039-59c4ad000000", + "Date" : "Mon, 13 Jul 2020 17:14:49 GMT", + "x-ms-client-request-id" : "ca52aa79-d4bd-4b50-8d37-2ffd7f4ca76f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac02032595c6aa2434b64181b/javablobgetpagerangesdiffac1711720f92f31aae644ad", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac06998218a3597bbe4c41078/javablobgetpagerangesdiffac197190e954ee0f24ec4f8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "653797ac-ddfc-4536-83a7-a53969d981e9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0872197b-ab3f-48b8-b36d-ec4f86a61c57" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC3AD607", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:23 GMT", + "ETag" : "0x8D82750401BE522", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:49 GMT", + "x-ms-version-id" : "2020-07-13T17:14:49.9372087Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188c47-301e-00f9-7ef7-12fa96000000", + "x-ms-request-id" : "ab3f82cf-301e-0035-2d39-59fd96000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "x-ms-client-request-id" : "653797ac-ddfc-4536-83a7-a53969d981e9" + "Date" : "Mon, 13 Jul 2020 17:14:49 GMT", + "x-ms-client-request-id" : "0872197b-ab3f-48b8-b36d-ec4f86a61c57" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac02032595c6aa2434b64181b/javablobgetpagerangesdiffac1711720f92f31aae644ad?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac06998218a3597bbe4c41078/javablobgetpagerangesdiffac197190e954ee0f24ec4f8?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e86d62b2-6b54-4287-9d5d-6daa35bac137" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87b78307-559f-49a4-893c-2693a0dff73f", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:23.7370138Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC3AD607", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:23 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "882e4583-d01e-005f-1239-5925be000000", + "Date" : "Mon, 13 Jul 2020 17:14:49 GMT", + "x-ms-client-request-id" : "87b78307-559f-49a4-893c-2693a0dff73f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac06998218a3597bbe4c41078/javablobgetpagerangesdiffac197190e954ee0f24ec4f8?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfed8efa-644f-4992-a66f-502ce7ea60f4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:49 GMT", + "x-ms-version-id" : "2020-07-13T17:14:50.8178335Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188c4f-301e-00f9-05f7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "x-ms-client-request-id" : "e86d62b2-6b54-4287-9d5d-6daa35bac137" + "Date" : "Mon, 13 Jul 2020 17:14:50 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:50.8168335Z", + "ETag" : "0x8D82750401BE522", + "Content-Length" : "0", + "x-ms-request-id" : "76ea4627-701e-0024-7e39-596722000000", + "x-ms-client-request-id" : "dfed8efa-644f-4992-a66f-502ce7ea60f4" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac02032595c6aa2434b64181b/javablobgetpagerangesdiffac1711720f92f31aae644ad?prevsnapshot=2020-04-15T07%3a30%3a23.7370138Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac06998218a3597bbe4c41078/javablobgetpagerangesdiffac197190e954ee0f24ec4f8?prevsnapshot=2020-07-13T17%3A14%3A50.8168335Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "06abd335-ee37-42bd-8ec5-c173c8b42d22" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6f2529a-66e0-4906-a03a-2b8bf056a210" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:23 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:49 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "ETag" : "0x8D7E10EDC3AD607", - "Vary" : "Origin", - "x-ms-request-id" : "6b188c53-301e-00f9-09f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:14:50 GMT", + "ETag" : "0x8D82750401BE522", + "x-ms-request-id" : "2263f431-b01e-003b-1839-59d426000000", "Body" : "", - "x-ms-client-request-id" : "06abd335-ee37-42bd-8ec5-c173c8b42d22", + "x-ms-client-request-id" : "b6f2529a-66e0-4906-a03a-2b8bf056a210", "Content-Type" : "application/xml" }, "Exception" : null @@ -94,43 +114,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "afd6209b-db15-410b-820a-694975888abd" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b4eec81-f26c-461c-bcc1-1202b6ae1482" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188c56-301e-00f9-0cf7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac02032595c6aa2434b64181bWed, 15 Apr 2020 07:30:23 GMT\"0x8D7E10EDC320C51\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "x-ms-client-request-id" : "afd6209b-db15-410b-820a-694975888abd", + "x-ms-request-id" : "7330180e-801e-0042-4739-592802000000", + "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac06998218a3597bbe4c41078Mon, 13 Jul 2020 17:14:49 GMT\"0x8D827503FB012E4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:50 GMT", + "x-ms-client-request-id" : "8b4eec81-f26c-461c-bcc1-1202b6ae1482", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac02032595c6aa2434b64181b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac06998218a3597bbe4c41078?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2db3484e-ffd3-4f9f-9297-564ab164ad4f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4cd48bc6-2f9e-41da-a896-4e7517480f09" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188c61-301e-00f9-17f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "x-ms-client-request-id" : "2db3484e-ffd3-4f9f-9297-564ab164ad4f" + "x-ms-request-id" : "90233058-d01e-0094-2a39-5926eb000000", + "Date" : "Mon, 13 Jul 2020 17:14:51 GMT", + "x-ms-client-request-id" : "4cd48bc6-2f9e-41da-a896-4e7517480f09" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffac02032595c6aa2434b64181b", "javablobgetpagerangesdiffac1711720f92f31aae644ad" ] + "variables" : [ "jtcgetpagerangesdiffac06998218a3597bbe4c41078", "javablobgetpagerangesdiffac197190e954ee0f24ec4f8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[1].json index 19effc150699..0753333c4c7d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[1].json @@ -1,92 +1,112 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094134d905cf2197bc4633a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0649108b68c19f6cb1408f9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b620ccb3-fddd-4ac3-836d-66e370171d97" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e42b95e1-40a9-469f-ac5d-eb9531d6505a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC61B397", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:23 GMT", + "ETag" : "0x8D827504199C781", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:52 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188c74-301e-00f9-25f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "x-ms-client-request-id" : "b620ccb3-fddd-4ac3-836d-66e370171d97" + "x-ms-request-id" : "42cebfa4-c01e-001e-3939-597d5a000000", + "Date" : "Mon, 13 Jul 2020 17:14:52 GMT", + "x-ms-client-request-id" : "e42b95e1-40a9-469f-ac5d-eb9531d6505a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094134d905cf2197bc4633a/javablobgetpagerangesdiffac124018a6dd18b30939408", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0649108b68c19f6cb1408f9/javablobgetpagerangesdiffac1546287009c4661b984a3", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8444cbd5-e11b-4a5f-8c68-0e79495ce6af" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bee5a9b2-c2b8-4166-b1ad-455cdbecc2fb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC699245", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:23 GMT", + "ETag" : "0x8D8275041CFD80F", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:52 GMT", + "x-ms-version-id" : "2020-07-13T17:14:52.7932431Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188c86-301e-00f9-33f7-12fa96000000", + "x-ms-request-id" : "5f63ea56-c01e-0021-4d39-59b5f9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "x-ms-client-request-id" : "8444cbd5-e11b-4a5f-8c68-0e79495ce6af" + "Date" : "Mon, 13 Jul 2020 17:14:52 GMT", + "x-ms-client-request-id" : "bee5a9b2-c2b8-4166-b1ad-455cdbecc2fb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094134d905cf2197bc4633a/javablobgetpagerangesdiffac124018a6dd18b30939408?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0649108b68c19f6cb1408f9/javablobgetpagerangesdiffac1546287009c4661b984a3?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ededd036-cd8c-4d81-8aa0-0085da2d8f7f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f3e18db5-a4b0-4aee-b8b0-9f5a493d9602", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:24.0443014Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC699245", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:23 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "22393fe3-101e-009b-5f39-595087000000", + "Date" : "Mon, 13 Jul 2020 17:14:52 GMT", + "x-ms-client-request-id" : "f3e18db5-a4b0-4aee-b8b0-9f5a493d9602" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0649108b68c19f6cb1408f9/javablobgetpagerangesdiffac1546287009c4661b984a3?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a5053ee-d8cf-4838-875d-32e7c51f16f9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:52 GMT", + "x-ms-version-id" : "2020-07-13T17:14:53.4687211Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188c96-301e-00f9-40f7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:23 GMT", - "x-ms-client-request-id" : "ededd036-cd8c-4d81-8aa0-0085da2d8f7f" + "Date" : "Mon, 13 Jul 2020 17:14:52 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:53.4677211Z", + "ETag" : "0x8D8275041CFD80F", + "Content-Length" : "0", + "x-ms-request-id" : "cb9017d1-d01e-0060-2439-59ed1d000000", + "x-ms-client-request-id" : "6a5053ee-d8cf-4838-875d-32e7c51f16f9" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094134d905cf2197bc4633a/javablobgetpagerangesdiffac124018a6dd18b30939408?prevsnapshot=2020-04-15T07%3a30%3a24.0443014Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0649108b68c19f6cb1408f9/javablobgetpagerangesdiffac1546287009c4661b984a3?prevsnapshot=2020-07-13T17%3A14%3A53.4677211Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2b2d841c-6e53-4db3-92e8-fa91617a5f3b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9975aebb-925b-4cf0-a670-24d83633c537" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:23 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:52 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "ETag" : "0x8D7E10EDC699245", - "Vary" : "Origin", - "x-ms-request-id" : "6b188cb0-301e-00f9-55f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:14:53 GMT", + "ETag" : "0x8D8275041CFD80F", + "x-ms-request-id" : "09fca376-101e-008b-0d39-5995ef000000", "Body" : "", - "x-ms-client-request-id" : "2b2d841c-6e53-4db3-92e8-fa91617a5f3b", + "x-ms-client-request-id" : "9975aebb-925b-4cf0-a670-24d83633c537", "Content-Type" : "application/xml" }, "Exception" : null @@ -94,43 +114,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "23ec1c85-61ac-4b25-8b03-e7d3218af6b5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2edce2f-2b38-4a0a-979a-0203b734ddbe" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188cc7-301e-00f9-62f7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac094134d905cf2197bc4633aWed, 15 Apr 2020 07:30:23 GMT\"0x8D7E10EDC61B397\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "23ec1c85-61ac-4b25-8b03-e7d3218af6b5", + "x-ms-request-id" : "8e048d77-501e-0051-0f39-590c0e000000", + "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac0649108b68c19f6cb1408f9Mon, 13 Jul 2020 17:14:52 GMT\"0x8D827504199C781\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:54 GMT", + "x-ms-client-request-id" : "f2edce2f-2b38-4a0a-979a-0203b734ddbe", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094134d905cf2197bc4633a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0649108b68c19f6cb1408f9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a04c9777-cf0d-4f74-aab0-1fd5b4d3b3c2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "86393671-2aa3-4b85-8867-4f3317edbbab" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188ccc-301e-00f9-67f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "a04c9777-cf0d-4f74-aab0-1fd5b4d3b3c2" + "x-ms-request-id" : "88c1f01f-901e-002c-6e39-597d2d000000", + "Date" : "Mon, 13 Jul 2020 17:14:54 GMT", + "x-ms-client-request-id" : "86393671-2aa3-4b85-8867-4f3317edbbab" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffac094134d905cf2197bc4633a", "javablobgetpagerangesdiffac124018a6dd18b30939408" ] + "variables" : [ "jtcgetpagerangesdiffac0649108b68c19f6cb1408f9", "javablobgetpagerangesdiffac1546287009c4661b984a3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[2].json index 3a01b53dac8d..eabdadbc1759 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[2].json @@ -1,92 +1,112 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0695828c18f4405e184c41a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac01639582f47ec66a614303b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8ca50411-bb0b-4eaf-a51f-2acc6b5cc822" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7938c8e-5fad-4cd6-909b-e4fed81bbb28" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC8F376B", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "ETag" : "0x8D827504313CBAE", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:54 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188cd8-301e-00f9-72f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "8ca50411-bb0b-4eaf-a51f-2acc6b5cc822" + "x-ms-request-id" : "b87dc591-201e-0006-1a39-59a23d000000", + "Date" : "Mon, 13 Jul 2020 17:14:54 GMT", + "x-ms-client-request-id" : "f7938c8e-5fad-4cd6-909b-e4fed81bbb28" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0695828c18f4405e184c41a/javablobgetpagerangesdiffac10278321bf1521375e4a8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac01639582f47ec66a614303b/javablobgetpagerangesdiffac182698f1e7989a13e54f8", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "92b5ed51-c9ed-48e8-b11c-8286dd935df1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1b7e0435-2cd8-4167-aa29-44b082ef16dd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC98005E", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "ETag" : "0x8D82750434B246C", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:55 GMT", + "x-ms-version-id" : "2020-07-13T17:14:55.2790124Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188cef-301e-00f9-06f7-12fa96000000", + "x-ms-request-id" : "76688323-801e-0030-2439-592f4d000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "92b5ed51-c9ed-48e8-b11c-8286dd935df1" + "Date" : "Mon, 13 Jul 2020 17:14:55 GMT", + "x-ms-client-request-id" : "1b7e0435-2cd8-4167-aa29-44b082ef16dd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0695828c18f4405e184c41a/javablobgetpagerangesdiffac10278321bf1521375e4a8?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac01639582f47ec66a614303b/javablobgetpagerangesdiffac182698f1e7989a13e54f8?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "47a02d34-bc49-4719-aa8a-f338cce9fd5b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e924d2f-8ca7-4c86-b200-15fa39b5104b", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:24.3425795Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDC98005E", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8119aa41-101e-006f-2239-599b71000000", + "Date" : "Mon, 13 Jul 2020 17:14:54 GMT", + "x-ms-client-request-id" : "6e924d2f-8ca7-4c86-b200-15fa39b5104b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac01639582f47ec66a614303b/javablobgetpagerangesdiffac182698f1e7989a13e54f8?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed9389aa-9137-4af9-81a9-2785ae00365c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:55 GMT", + "x-ms-version-id" : "2020-07-13T17:14:55.9534908Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188cf8-301e-00f9-0ff7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "47a02d34-bc49-4719-aa8a-f338cce9fd5b" + "Date" : "Mon, 13 Jul 2020 17:14:55 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:55.9524908Z", + "ETag" : "0x8D82750434B246C", + "Content-Length" : "0", + "x-ms-request-id" : "4094bdbe-901e-0085-2839-59bc5f000000", + "x-ms-client-request-id" : "ed9389aa-9137-4af9-81a9-2785ae00365c" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0695828c18f4405e184c41a/javablobgetpagerangesdiffac10278321bf1521375e4a8?prevsnapshot=2020-04-15T07%3a30%3a24.3425795Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac01639582f47ec66a614303b/javablobgetpagerangesdiffac182698f1e7989a13e54f8?prevsnapshot=2020-07-13T17%3A14%3A55.9524908Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "52f2a6cc-ec12-4eb6-bde9-0fba8c3130fb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b44aa7fb-a2b4-4ae1-a971-dd2736f8e8e0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:55 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "ETag" : "0x8D7E10EDC98005E", - "Vary" : "Origin", - "x-ms-request-id" : "6b188d02-301e-00f9-18f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:14:56 GMT", + "ETag" : "0x8D82750434B246C", + "x-ms-request-id" : "1a1c66d8-501e-0023-1e39-590b41000000", "Body" : "", - "x-ms-client-request-id" : "52f2a6cc-ec12-4eb6-bde9-0fba8c3130fb", + "x-ms-client-request-id" : "b44aa7fb-a2b4-4ae1-a971-dd2736f8e8e0", "Content-Type" : "application/xml" }, "Exception" : null @@ -94,43 +114,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e87e506a-160d-4cfb-aeda-f5933bb2e360" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4da47b5c-aa55-41d1-9113-612ce12edc4f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188d0c-301e-00f9-20f7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac0695828c18f4405e184c41aWed, 15 Apr 2020 07:30:24 GMT\"0x8D7E10EDC8F376B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "e87e506a-160d-4cfb-aeda-f5933bb2e360", + "x-ms-request-id" : "005c3643-301e-0025-3e39-5938fe000000", + "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac01639582f47ec66a614303bMon, 13 Jul 2020 17:14:54 GMT\"0x8D827504313CBAE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:56 GMT", + "x-ms-client-request-id" : "4da47b5c-aa55-41d1-9113-612ce12edc4f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0695828c18f4405e184c41a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac01639582f47ec66a614303b?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dcb266a9-d60b-4407-b585-f68aa186d68e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cdd1abcc-1b0c-419d-bafe-df5ad6721332" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188d18-301e-00f9-28f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "dcb266a9-d60b-4407-b585-f68aa186d68e" + "x-ms-request-id" : "bfdf6d40-a01e-0027-1439-598646000000", + "Date" : "Mon, 13 Jul 2020 17:14:56 GMT", + "x-ms-client-request-id" : "cdd1abcc-1b0c-419d-bafe-df5ad6721332" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffac0695828c18f4405e184c41a", "javablobgetpagerangesdiffac10278321bf1521375e4a8" ] + "variables" : [ "jtcgetpagerangesdiffac01639582f47ec66a614303b", "javablobgetpagerangesdiffac182698f1e7989a13e54f8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[3].json index 5566d8dafd0f..2a11d8530129 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[3].json @@ -1,122 +1,144 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0193155d271f9b906344779?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0990094bcb28bdac8445808?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "de641dfd-af15-4c27-a931-2859db0c7d2d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "98650818-2787-4a8e-99c5-9fdb7eb392fd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDCBCBB43", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "ETag" : "0x8D82750448ED44B", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188d20-301e-00f9-30f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "de641dfd-af15-4c27-a931-2859db0c7d2d" + "x-ms-request-id" : "cd27d40f-601e-0065-2639-593fc6000000", + "Date" : "Mon, 13 Jul 2020 17:14:56 GMT", + "x-ms-client-request-id" : "98650818-2787-4a8e-99c5-9fdb7eb392fd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0193155d271f9b906344779/javablobgetpagerangesdiffac1790145f356daf2b3e448", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0990094bcb28bdac8445808/javablobgetpagerangesdiffac16265241e63999ad3c402", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "62add4a1-2884-46f3-9174-b95df8e8842d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "67beab7d-cbf0-468d-b933-8b2a177f6421" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDCC3FCE1", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "ETag" : "0x8D8275044C4267A", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:57 GMT", + "x-ms-version-id" : "2020-07-13T17:14:57.7507727Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188d2c-301e-00f9-3af7-12fa96000000", + "x-ms-request-id" : "8f840c50-e01e-0054-3839-59ded5000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "62add4a1-2884-46f3-9174-b95df8e8842d" + "Date" : "Mon, 13 Jul 2020 17:14:56 GMT", + "x-ms-client-request-id" : "67beab7d-cbf0-468d-b933-8b2a177f6421" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0193155d271f9b906344779/javablobgetpagerangesdiffac1790145f356daf2b3e448?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0990094bcb28bdac8445808/javablobgetpagerangesdiffac16265241e63999ad3c402?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "da0c7595-c2ef-4712-8c93-83add2051f89" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29db62d2-e5c1-4999-b169-b85e745c5c33", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:24.6318493Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDCC3FCE1", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "05971f5d-201e-0039-4a39-596a9e000000", + "Date" : "Mon, 13 Jul 2020 17:14:57 GMT", + "x-ms-client-request-id" : "29db62d2-e5c1-4999-b169-b85e745c5c33" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0990094bcb28bdac8445808/javablobgetpagerangesdiffac16265241e63999ad3c402?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0d6c05a-ac7a-4711-9bc2-dad6b7269762" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:57 GMT", + "x-ms-version-id" : "2020-07-13T17:14:58.4442663Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188d32-301e-00f9-40f7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "da0c7595-c2ef-4712-8c93-83add2051f89" + "Date" : "Mon, 13 Jul 2020 17:14:58 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:58.4432663Z", + "ETag" : "0x8D8275044C4267A", + "Content-Length" : "0", + "x-ms-request-id" : "9608d379-901e-0013-2239-59b58e000000", + "x-ms-client-request-id" : "e0d6c05a-ac7a-4711-9bc2-dad6b7269762" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0193155d271f9b906344779/javablobgetpagerangesdiffac1790145f356daf2b3e448", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0990094bcb28bdac8445808/javablobgetpagerangesdiffac16265241e63999ad3c402", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f0b4ffc4-e11d-42c3-868d-f110eb1685e5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "46fc1df0-5cb1-4e5b-9f9f-66926e5ce74e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "x-ms-version-id" : "2020-07-13T17:14:58.4442663Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", + "Date" : "Mon, 13 Jul 2020 17:14:57 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10EDCC3FCE1", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:30:24 GMT", + "ETag" : "0x8D8275044C4267A", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:14:57 GMT", "Content-Length" : "512", - "x-ms-request-id" : "6b188d3e-301e-00f9-4af7-12fa96000000", - "x-ms-client-request-id" : "f0b4ffc4-e11d-42c3-868d-f110eb1685e5", + "x-ms-request-id" : "8255d542-001e-003e-0639-5906fd000000", + "x-ms-client-request-id" : "46fc1df0-5cb1-4e5b-9f9f-66926e5ce74e", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0193155d271f9b906344779/javablobgetpagerangesdiffac1790145f356daf2b3e448?prevsnapshot=2020-04-15T07%3a30%3a24.6318493Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0990094bcb28bdac8445808/javablobgetpagerangesdiffac16265241e63999ad3c402?prevsnapshot=2020-07-13T17%3A14%3A58.4432663Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c41b9cc0-5755-42d7-b619-31649ae3fff5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4657cf2d-d2de-454b-ac41-7a8c6a665b7e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:57 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "ETag" : "0x8D7E10EDCC3FCE1", - "Vary" : "Origin", - "x-ms-request-id" : "6b188d42-301e-00f9-4ef7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:14:58 GMT", + "ETag" : "0x8D8275044C4267A", + "x-ms-request-id" : "f7fc4afb-301e-0068-5039-59f712000000", "Body" : "", - "x-ms-client-request-id" : "c41b9cc0-5755-42d7-b619-31649ae3fff5", + "x-ms-client-request-id" : "4657cf2d-d2de-454b-ac41-7a8c6a665b7e", "Content-Type" : "application/xml" }, "Exception" : null @@ -124,43 +146,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "362270d5-b336-4947-92ad-38baedec284b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "78787c7e-2e6e-4b3d-983e-50bf1fddbf36" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188d54-301e-00f9-5bf7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac0193155d271f9b906344779Wed, 15 Apr 2020 07:30:24 GMT\"0x8D7E10EDCBCBB43\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "362270d5-b336-4947-92ad-38baedec284b", + "x-ms-request-id" : "eb2f7539-b01e-0092-2d39-591554000000", + "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac0990094bcb28bdac8445808Mon, 13 Jul 2020 17:14:57 GMT\"0x8D82750448ED44B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:59 GMT", + "x-ms-client-request-id" : "78787c7e-2e6e-4b3d-983e-50bf1fddbf36", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0193155d271f9b906344779?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0990094bcb28bdac8445808?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3caa8428-8ed2-4e59-b5c4-477d6e329b0a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "886bfc2e-98f3-4e25-a235-4f3852efb54a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188d5c-301e-00f9-61f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "3caa8428-8ed2-4e59-b5c4-477d6e329b0a" + "x-ms-request-id" : "f89469e8-e01e-0009-3c39-59d451000000", + "Date" : "Mon, 13 Jul 2020 17:14:59 GMT", + "x-ms-client-request-id" : "886bfc2e-98f3-4e25-a235-4f3852efb54a" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffac0193155d271f9b906344779", "javablobgetpagerangesdiffac1790145f356daf2b3e448" ] + "variables" : [ "jtcgetpagerangesdiffac0990094bcb28bdac8445808", "javablobgetpagerangesdiffac16265241e63999ad3c402" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[4].json index 4f11b8250b5f..28be1129ddb8 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[4].json @@ -1,92 +1,112 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0722577d2473fd99314494b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0743778d729341261443599?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "10eb9965-b7c7-46d0-9050-bfdddc070f45" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8248279b-cae7-41b5-85c1-3195899d3616" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDCF16CBA", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "ETag" : "0x8D827504646D887", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:00 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188d75-301e-00f9-77f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "10eb9965-b7c7-46d0-9050-bfdddc070f45" + "x-ms-request-id" : "6412d901-301e-0047-3a39-59fad9000000", + "Date" : "Mon, 13 Jul 2020 17:14:59 GMT", + "x-ms-client-request-id" : "8248279b-cae7-41b5-85c1-3195899d3616" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0722577d2473fd99314494b/javablobgetpagerangesdiffac1567179551aacbe659438", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0743778d729341261443599/javablobgetpagerangesdiffac195223f892f4e4a44b470", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "596b0fd5-3be1-4913-ab66-a1e2a6720deb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4231f150-f586-42d1-a433-29f0d2a48415" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDCFA350A", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "ETag" : "0x8D8275046811BB9", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:00 GMT", + "x-ms-version-id" : "2020-07-13T17:15:00.6658489Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188d7f-301e-00f9-7ff7-12fa96000000", + "x-ms-request-id" : "2b5e93b2-401e-005d-2a39-599b06000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "596b0fd5-3be1-4913-ab66-a1e2a6720deb" + "Date" : "Mon, 13 Jul 2020 17:15:00 GMT", + "x-ms-client-request-id" : "4231f150-f586-42d1-a433-29f0d2a48415" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0722577d2473fd99314494b/javablobgetpagerangesdiffac1567179551aacbe659438?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0743778d729341261443599/javablobgetpagerangesdiffac195223f892f4e4a44b470?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aa6a85c2-08b5-48ed-abed-a3770bde3377" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "91ea1c35-06ea-48fe-bb85-5963a22c54db", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:24.9861816Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDCFA350A", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8ddaf990-e01e-00a0-3839-591523000000", + "Date" : "Mon, 13 Jul 2020 17:15:00 GMT", + "x-ms-client-request-id" : "91ea1c35-06ea-48fe-bb85-5963a22c54db" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0743778d729341261443599/javablobgetpagerangesdiffac195223f892f4e4a44b470?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f6bdc9a-7606-404f-a0d0-bd8470e4b990" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:00 GMT", + "x-ms-version-id" : "2020-07-13T17:15:01.4083715Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188d86-301e-00f9-05f7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "aa6a85c2-08b5-48ed-abed-a3770bde3377" + "Date" : "Mon, 13 Jul 2020 17:15:01 GMT", + "x-ms-snapshot" : "2020-07-13T17:15:01.4073715Z", + "ETag" : "0x8D8275046811BB9", + "Content-Length" : "0", + "x-ms-request-id" : "9abeb2e9-801e-0089-7739-592b57000000", + "x-ms-client-request-id" : "5f6bdc9a-7606-404f-a0d0-bd8470e4b990" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0722577d2473fd99314494b/javablobgetpagerangesdiffac1567179551aacbe659438?prevsnapshot=2020-04-15T07%3a30%3a24.9861816Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0743778d729341261443599/javablobgetpagerangesdiffac195223f892f4e4a44b470?prevsnapshot=2020-07-13T17%3A15%3A01.4073715Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4bef6f92-bac7-4f69-bef8-de42360d1add" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "01cf8971-3abd-4300-9e70-3c3d63b4505e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:24 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:00 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "ETag" : "0x8D7E10EDCFA350A", - "Vary" : "Origin", - "x-ms-request-id" : "6b188d8b-301e-00f9-09f7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:15:01 GMT", + "ETag" : "0x8D8275046811BB9", + "x-ms-request-id" : "aa72bd9f-301e-0078-7139-59327a000000", "Body" : "", - "x-ms-client-request-id" : "4bef6f92-bac7-4f69-bef8-de42360d1add", + "x-ms-client-request-id" : "01cf8971-3abd-4300-9e70-3c3d63b4505e", "Content-Type" : "application/xml" }, "Exception" : null @@ -94,43 +114,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6df313bc-89b9-43dc-ac17-fc07999ef1c5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "024ca95d-568e-4984-9b1f-81e63590073f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188dac-301e-00f9-21f7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac0722577d2473fd99314494bWed, 15 Apr 2020 07:30:24 GMT\"0x8D7E10EDCF16CBA\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:24 GMT", - "x-ms-client-request-id" : "6df313bc-89b9-43dc-ac17-fc07999ef1c5", + "x-ms-request-id" : "e1f17fea-601e-004a-7339-59320d000000", + "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac0743778d729341261443599Mon, 13 Jul 2020 17:15:00 GMT\"0x8D827504646D887\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:15:02 GMT", + "x-ms-client-request-id" : "024ca95d-568e-4984-9b1f-81e63590073f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0722577d2473fd99314494b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0743778d729341261443599?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9a54414c-7f40-4111-a22c-d49ec4120886" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f8363b44-a97b-4409-89fc-21f8fd56e080" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188dc1-301e-00f9-2ff7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "9a54414c-7f40-4111-a22c-d49ec4120886" + "x-ms-request-id" : "22241141-a01e-00a1-3d39-594aff000000", + "Date" : "Mon, 13 Jul 2020 17:15:02 GMT", + "x-ms-client-request-id" : "f8363b44-a97b-4409-89fc-21f8fd56e080" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffac0722577d2473fd99314494b", "javablobgetpagerangesdiffac1567179551aacbe659438" ] + "variables" : [ "jtcgetpagerangesdiffac0743778d729341261443599", "javablobgetpagerangesdiffac195223f892f4e4a44b470" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[5].json index 49c3cdf9192c..67ce57eea0db 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[5].json @@ -1,114 +1,134 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0786223d0885c982a640dfa?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac069228f7a56394a0fb4ffa8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f8cfb9ba-9b2b-4870-9c1a-8bae700d45cf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "76c145f3-8e91-4073-9022-734c099b71ed" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD1EF09C", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "ETag" : "0x8D8275047D58F3F", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:02 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188dd5-301e-00f9-40f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "f8cfb9ba-9b2b-4870-9c1a-8bae700d45cf" + "x-ms-request-id" : "7bd6ff20-601e-0075-6e39-59faae000000", + "Date" : "Mon, 13 Jul 2020 17:15:01 GMT", + "x-ms-client-request-id" : "76c145f3-8e91-4073-9022-734c099b71ed" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0786223d0885c982a640dfa/javablobgetpagerangesdiffac18335232f690ed953e4d8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac069228f7a56394a0fb4ffa8/javablobgetpagerangesdiffac117466657d9d351cf4498", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "35d219a4-69d1-4d77-a3ca-2ebc7c11b5eb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "709f6c3f-30ac-4220-b293-61ac75847e90" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD267FC0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "ETag" : "0x8D82750480D33D1", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:03 GMT", + "x-ms-version-id" : "2020-07-13T17:15:03.2616913Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188df0-301e-00f9-57f7-12fa96000000", + "x-ms-request-id" : "f2377076-301e-008c-1e39-59f98c000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "35d219a4-69d1-4d77-a3ca-2ebc7c11b5eb" + "Date" : "Mon, 13 Jul 2020 17:15:03 GMT", + "x-ms-client-request-id" : "709f6c3f-30ac-4220-b293-61ac75847e90" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0786223d0885c982a640dfa/javablobgetpagerangesdiffac18335232f690ed953e4d8?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac069228f7a56394a0fb4ffa8/javablobgetpagerangesdiffac117466657d9d351cf4498?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1a2baf5f-57e7-4b5d-8caa-f7df9eb7bcb6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8379e898-352d-41cc-81cf-f8530c1523cb", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:25.2784531Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD267FC0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", "retry-after" : "0", - "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c2d3fa6c-a01e-007a-7d39-598cc2000000", + "Date" : "Mon, 13 Jul 2020 17:15:02 GMT", + "x-ms-client-request-id" : "8379e898-352d-41cc-81cf-f8530c1523cb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac069228f7a56394a0fb4ffa8/javablobgetpagerangesdiffac117466657d9d351cf4498?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "35bf4e40-ae2f-4187-9b76-0dbbd5435fa3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:03 GMT", + "x-ms-version-id" : "2020-07-13T17:15:03.9201583Z", + "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188e02-301e-00f9-66f7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "1a2baf5f-57e7-4b5d-8caa-f7df9eb7bcb6" + "Date" : "Mon, 13 Jul 2020 17:15:03 GMT", + "x-ms-snapshot" : "2020-07-13T17:15:03.9191583Z", + "ETag" : "0x8D82750480D33D1", + "Content-Length" : "0", + "x-ms-request-id" : "f8354bdb-101e-0040-2939-5996ba000000", + "x-ms-client-request-id" : "35bf4e40-ae2f-4187-9b76-0dbbd5435fa3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0786223d0885c982a640dfa/javablobgetpagerangesdiffac18335232f690ed953e4d8?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac069228f7a56394a0fb4ffa8/javablobgetpagerangesdiffac117466657d9d351cf4498?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "11c49d9e-9fca-439c-82bb-1097e4371f56" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "098a5172-56e2-42de-9c54-9ebe4e62e727" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD267FC0", - "x-ms-lease-id" : "428bb465-c98c-49fd-95d9-3a1ef06c753a", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "ETag" : "0x8D82750480D33D1", + "x-ms-lease-id" : "3a9a222f-31d4-42b2-9081-83aaac0ffc60", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188e16-301e-00f9-7af7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "11c49d9e-9fca-439c-82bb-1097e4371f56" + "x-ms-request-id" : "06cf5666-101e-007f-4a39-595e19000000", + "Date" : "Mon, 13 Jul 2020 17:15:03 GMT", + "x-ms-client-request-id" : "098a5172-56e2-42de-9c54-9ebe4e62e727" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0786223d0885c982a640dfa/javablobgetpagerangesdiffac18335232f690ed953e4d8?prevsnapshot=2020-04-15T07%3a30%3a25.2784531Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac069228f7a56394a0fb4ffa8/javablobgetpagerangesdiffac117466657d9d351cf4498?prevsnapshot=2020-07-13T17%3A15%3A03.9191583Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0c553757-bd93-4947-bb00-ea8f08422564" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9f8f213-55b1-48af-a864-02ccf42e59dc" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-content-length" : "512", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:03 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "ETag" : "0x8D7E10EDD267FC0", - "Vary" : "Origin", - "x-ms-request-id" : "6b188e2b-301e-00f9-0af7-12fa96000000", + "Date" : "Mon, 13 Jul 2020 17:15:04 GMT", + "ETag" : "0x8D82750480D33D1", + "x-ms-request-id" : "89d0331f-b01e-0059-6839-591601000000", "Body" : "", - "x-ms-client-request-id" : "0c553757-bd93-4947-bb00-ea8f08422564", + "x-ms-client-request-id" : "b9f8f213-55b1-48af-a864-02ccf42e59dc", "Content-Type" : "application/xml" }, "Exception" : null @@ -116,43 +136,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "59dd4703-02b7-4d6e-9f4d-fd4e45eedd9c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb786b5d-0bae-4be1-a3bc-f493195142a0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188e34-301e-00f9-12f7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac0786223d0885c982a640dfaWed, 15 Apr 2020 07:30:25 GMT\"0x8D7E10EDD1EF09C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "59dd4703-02b7-4d6e-9f4d-fd4e45eedd9c", + "x-ms-request-id" : "a68c263a-701e-000b-3139-596ae9000000", + "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac069228f7a56394a0fb4ffa8Mon, 13 Jul 2020 17:15:02 GMT\"0x8D8275047D58F3F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:15:04 GMT", + "x-ms-client-request-id" : "fb786b5d-0bae-4be1-a3bc-f493195142a0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac0786223d0885c982a640dfa?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac069228f7a56394a0fb4ffa8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2e469313-0eef-46fd-9d1a-7a8a43dac5d8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e7234bc1-7bd7-4a64-8734-3d3e7f897d1a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188e4b-301e-00f9-27f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "2e469313-0eef-46fd-9d1a-7a8a43dac5d8" + "x-ms-request-id" : "be662122-c01e-000e-5c39-59b832000000", + "Date" : "Mon, 13 Jul 2020 17:15:04 GMT", + "x-ms-client-request-id" : "e7234bc1-7bd7-4a64-8734-3d3e7f897d1a" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffac0786223d0885c982a640dfa", "javablobgetpagerangesdiffac18335232f690ed953e4d8" ] + "variables" : [ "jtcgetpagerangesdiffac069228f7a56394a0fb4ffa8", "javablobgetpagerangesdiffac117466657d9d351cf4498" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[6].json new file mode 100644 index 000000000000..85efbadd2bed --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffac[6].json @@ -0,0 +1,155 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094494ec6434e353674a5b9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "615b8434-e506-4574-b2c1-b64e484e26eb" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82750496C3553", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:05 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8ee28ef3-301e-00a3-7f39-59f447000000", + "Date" : "Mon, 13 Jul 2020 17:15:05 GMT", + "x-ms-client-request-id" : "615b8434-e506-4574-b2c1-b64e484e26eb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094494ec6434e353674a5b9/javablobgetpagerangesdiffac1571450a19abe83a8945d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "94566c51-a560-4e13-8569-ea2e56f3cf7f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8275049A00421", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:05 GMT", + "x-ms-version-id" : "2020-07-13T17:15:05.9015713Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f1235e51-f01e-003a-6d39-598bfa000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:15:05 GMT", + "x-ms-client-request-id" : "94566c51-a560-4e13-8569-ea2e56f3cf7f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094494ec6434e353674a5b9/javablobgetpagerangesdiffac1571450a19abe83a8945d?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c03af294-695e-4ef3-b8f6-043e2ff1385e", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "77e2906e-201e-0064-3239-59601a000000", + "Date" : "Mon, 13 Jul 2020 17:15:05 GMT", + "x-ms-client-request-id" : "c03af294-695e-4ef3-b8f6-043e2ff1385e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094494ec6434e353674a5b9/javablobgetpagerangesdiffac1571450a19abe83a8945d?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d48f250a-4947-4c04-b87a-3e6caf33ddfd" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:05 GMT", + "x-ms-version-id" : "2020-07-13T17:15:06.5700454Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Mon, 13 Jul 2020 17:15:05 GMT", + "x-ms-snapshot" : "2020-07-13T17:15:06.5690454Z", + "ETag" : "0x8D8275049A00421", + "Content-Length" : "0", + "x-ms-request-id" : "56b5518c-f01e-002a-4239-594e92000000", + "x-ms-client-request-id" : "d48f250a-4947-4c04-b87a-3e6caf33ddfd" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094494ec6434e353674a5b9/javablobgetpagerangesdiffac1571450a19abe83a8945d?prevsnapshot=2020-07-13T17%3A15%3A06.5690454Z&comp=pagelist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3506be02-e28d-4467-a700-0de986db898a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-content-length" : "512", + "Last-Modified" : "Mon, 13 Jul 2020 17:15:05 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 13 Jul 2020 17:15:06 GMT", + "ETag" : "0x8D8275049A00421", + "x-ms-request-id" : "a0784192-501e-0041-1139-59c966000000", + "Body" : "", + "x-ms-client-request-id" : "3506be02-e28d-4467-a700-0de986db898a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b416c5d2-a820-412b-9a05-e4030579bef1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "30255ad2-301e-0057-4139-593fb1000000", + "Body" : "jtcgetpagerangesdiffacjtcgetpagerangesdiffac094494ec6434e353674a5b9Mon, 13 Jul 2020 17:15:05 GMT\"0x8D82750496C3553\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:15:06 GMT", + "x-ms-client-request-id" : "b416c5d2-a820-412b-9a05-e4030579bef1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffac094494ec6434e353674a5b9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f7057c8-8aa6-44c1-812d-188178d3450a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "7df7a553-a01e-0045-1439-594461000000", + "Date" : "Mon, 13 Jul 2020 17:15:06 GMT", + "x-ms-client-request-id" : "6f7057c8-8aa6-44c1-812d-188178d3450a" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetpagerangesdiffac094494ec6434e353674a5b9", "javablobgetpagerangesdiffac1571450a19abe83a8945d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[0].json index 0cadfa86478b..28c3fd7dc60c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[0].json @@ -1,90 +1,91 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail03949006f67e4a9ada4fc?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail02776847c64cdd7d2344a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c857140f-ff34-4e13-a3fe-11f752485af0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "225a02df-b89f-4c43-95f2-73401412af7a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD58AC84", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "ETag" : "0x8D827502D4510D5", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:18 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188e64-301e-00f9-3bf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "c857140f-ff34-4e13-a3fe-11f752485af0" + "x-ms-request-id" : "fa23162a-401e-0000-5539-599182000000", + "Date" : "Mon, 13 Jul 2020 17:14:18 GMT", + "x-ms-client-request-id" : "225a02df-b89f-4c43-95f2-73401412af7a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail03949006f67e4a9ada4fc/javablobgetpagerangesdiffacfail1566080761226a86df4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail02776847c64cdd7d2344a/javablobgetpagerangesdiffacfail19568189a97e1c3f544", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4eab4973-15c9-45bd-9592-a16f0333795f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a240a812-0c91-41e9-ac64-e6a88b0a2e30" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD601411", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "ETag" : "0x8D827502DA9727A", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:18 GMT", + "x-ms-version-id" : "2020-07-13T17:14:18.9871738Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188e77-301e-00f9-49f7-12fa96000000", + "x-ms-request-id" : "49355a71-801e-0052-0239-59ed6a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "4eab4973-15c9-45bd-9592-a16f0333795f" + "Date" : "Mon, 13 Jul 2020 17:14:18 GMT", + "x-ms-client-request-id" : "a240a812-0c91-41e9-ac64-e6a88b0a2e30" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail03949006f67e4a9ada4fc/javablobgetpagerangesdiffacfail1566080761226a86df4?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail02776847c64cdd7d2344a/javablobgetpagerangesdiffacfail19568189a97e1c3f544?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c31c4c78-8818-4de2-9387-9bd1bd85a897" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cbcd840e-b2b8-49eb-96dd-2e612b50caa6" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:25.6518024Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD601411", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:18 GMT", + "x-ms-version-id" : "2020-07-13T17:14:19.4955339Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188e7e-301e-00f9-50f7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "c31c4c78-8818-4de2-9387-9bd1bd85a897" + "Date" : "Mon, 13 Jul 2020 17:14:19 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:19.4945339Z", + "ETag" : "0x8D827502DA9727A", + "Content-Length" : "0", + "x-ms-request-id" : "768f8ace-601e-0081-1439-593158000000", + "x-ms-client-request-id" : "cbcd840e-b2b8-49eb-96dd-2e612b50caa6" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail03949006f67e4a9ada4fc/javablobgetpagerangesdiffacfail1566080761226a86df4?prevsnapshot=2020-04-15T07%3a30%3a25.6518024Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail02776847c64cdd7d2344a/javablobgetpagerangesdiffacfail19568189a97e1c3f544?prevsnapshot=2020-07-13T17%3A14%3A19.4945339Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "be84c2f9-b1b9-4d47-9a7e-c3f494c8d774" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "84e6dd9c-69ec-429f-a9f9-27bd481d015c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "304", - "x-ms-request-id" : "6b188e86-301e-00f9-58f7-12fa96000000", + "x-ms-request-id" : "4b1109f0-501e-0033-5239-59ce29000000", "Body" : "", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "be84c2f9-b1b9-4d47-9a7e-c3f494c8d774", + "Date" : "Mon, 13 Jul 2020 17:14:19 GMT", + "x-ms-client-request-id" : "84e6dd9c-69ec-429f-a9f9-27bd481d015c", "Content-Type" : "application/xml" }, "Exception" : null @@ -92,43 +93,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7fd26cfb-0003-4a09-83bd-bc67bc881fc7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3973f7bb-864a-4a34-abf6-63192a988ee2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188e93-301e-00f9-61f7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail03949006f67e4a9ada4fcWed, 15 Apr 2020 07:30:25 GMT\"0x8D7E10EDD58AC84\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "7fd26cfb-0003-4a09-83bd-bc67bc881fc7", + "x-ms-request-id" : "0b2906e6-901e-0071-3d39-5977a9000000", + "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail02776847c64cdd7d2344aMon, 13 Jul 2020 17:14:18 GMT\"0x8D827502D4510D5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:20 GMT", + "x-ms-client-request-id" : "3973f7bb-864a-4a34-abf6-63192a988ee2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail03949006f67e4a9ada4fc?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail02776847c64cdd7d2344a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b2f90c72-2846-4b53-9c06-4d03267cce59" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7dfc9e94-b656-4dfc-b14c-259cb0f65920" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188e9b-301e-00f9-69f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "b2f90c72-2846-4b53-9c06-4d03267cce59" + "x-ms-request-id" : "b2a6b5fa-401e-00a9-8039-5950f0000000", + "Date" : "Mon, 13 Jul 2020 17:14:20 GMT", + "x-ms-client-request-id" : "7dfc9e94-b656-4dfc-b14c-259cb0f65920" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffacfail03949006f67e4a9ada4fc", "javablobgetpagerangesdiffacfail1566080761226a86df4" ] + "variables" : [ "jtcgetpagerangesdiffacfail02776847c64cdd7d2344a", "javablobgetpagerangesdiffacfail19568189a97e1c3f544" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[1].json index de195065e296..64d476ff7096 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[1].json @@ -1,90 +1,91 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail026573510b1b71f61b40f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail067615a808f3e6930e423?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "75167967-daf3-4af0-9777-9d1e582e6a56" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9aaa1df0-d2f0-4558-907c-df6ed21fd87e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD86CCD2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "ETag" : "0x8D827502F1EB4E1", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:21 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188ea4-301e-00f9-71f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "75167967-daf3-4af0-9777-9d1e582e6a56" + "x-ms-request-id" : "efd1b956-401e-004d-6e39-595e6e000000", + "Date" : "Mon, 13 Jul 2020 17:14:20 GMT", + "x-ms-client-request-id" : "9aaa1df0-d2f0-4558-907c-df6ed21fd87e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail026573510b1b71f61b40f/javablobgetpagerangesdiffacfail1484097fb23ddbac294", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail067615a808f3e6930e423/javablobgetpagerangesdiffacfail135337dafd2252b0a84", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "286f551d-f68a-4a75-8dd7-655b18ad2899" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e46e3ec-152e-4359-8eb3-24d8520821df" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD8E33F3", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "ETag" : "0x8D827502F630BB8", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:21 GMT", + "x-ms-version-id" : "2020-07-13T17:14:21.8812344Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188eb1-301e-00f9-7af7-12fa96000000", + "x-ms-request-id" : "e1cfb172-d01e-004f-1739-59e0d6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "286f551d-f68a-4a75-8dd7-655b18ad2899" + "Date" : "Mon, 13 Jul 2020 17:14:20 GMT", + "x-ms-client-request-id" : "2e46e3ec-152e-4359-8eb3-24d8520821df" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail026573510b1b71f61b40f/javablobgetpagerangesdiffacfail1484097fb23ddbac294?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail067615a808f3e6930e423/javablobgetpagerangesdiffacfail135337dafd2252b0a84?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "95ab2afc-8b6c-48bb-9156-9e89562ca371" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4cdd092c-faec-4e9d-bb30-d0553b16a6ee" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:25.9560865Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDD8E33F3", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:25 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:21 GMT", + "x-ms-version-id" : "2020-07-13T17:14:22.2705099Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188eb7-301e-00f9-7ff7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "95ab2afc-8b6c-48bb-9156-9e89562ca371" + "Date" : "Mon, 13 Jul 2020 17:14:22 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:22.2695099Z", + "ETag" : "0x8D827502F630BB8", + "Content-Length" : "0", + "x-ms-request-id" : "c189e2b7-a01e-008e-5939-594734000000", + "x-ms-client-request-id" : "4cdd092c-faec-4e9d-bb30-d0553b16a6ee" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail026573510b1b71f61b40f/javablobgetpagerangesdiffacfail1484097fb23ddbac294?prevsnapshot=2020-04-15T07%3a30%3a25.9560865Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail067615a808f3e6930e423/javablobgetpagerangesdiffacfail135337dafd2252b0a84?prevsnapshot=2020-07-13T17%3A14%3A22.2695099Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "78463c88-5d02-466e-9f18-b790881f35cc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd7223a7-aea9-4356-a2a6-65e781dd5ce6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6b188ec1-301e-00f9-07f7-12fa96000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b188ec1-301e-00f9-07f7-12fa96000000\nTime:2020-04-15T07:30:26.0076685Z", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "78463c88-5d02-466e-9f18-b790881f35cc", + "x-ms-request-id" : "a83313cd-201e-0090-6d39-59abec000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:a83313cd-201e-0090-6d39-59abec000000\nTime:2020-07-13T17:14:22.6109390Z", + "Date" : "Mon, 13 Jul 2020 17:14:21 GMT", + "x-ms-client-request-id" : "fd7223a7-aea9-4356-a2a6-65e781dd5ce6", "Content-Type" : "application/xml" }, "Exception" : null @@ -92,43 +93,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7631a41f-fcc9-4c02-b702-3f3288cebaf6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad23612d-88ea-47d1-bc89-5e8bacd96417" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188ec6-301e-00f9-0cf7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail026573510b1b71f61b40fWed, 15 Apr 2020 07:30:25 GMT\"0x8D7E10EDD86CCD2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:25 GMT", - "x-ms-client-request-id" : "7631a41f-fcc9-4c02-b702-3f3288cebaf6", + "x-ms-request-id" : "8adc00ab-001e-002e-0639-59c395000000", + "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail067615a808f3e6930e423Mon, 13 Jul 2020 17:14:21 GMT\"0x8D827502F1EB4E1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:22 GMT", + "x-ms-client-request-id" : "ad23612d-88ea-47d1-bc89-5e8bacd96417", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail026573510b1b71f61b40f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail067615a808f3e6930e423?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b73d9e90-ea68-413e-8896-c7a66f482f02" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a13c4434-8ae0-42c1-9d1e-771be7cc95fb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188ed5-301e-00f9-18f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "b73d9e90-ea68-413e-8896-c7a66f482f02" + "x-ms-request-id" : "15727d54-b01e-0066-5739-59dea2000000", + "Date" : "Mon, 13 Jul 2020 17:14:22 GMT", + "x-ms-client-request-id" : "a13c4434-8ae0-42c1-9d1e-771be7cc95fb" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffacfail026573510b1b71f61b40f", "javablobgetpagerangesdiffacfail1484097fb23ddbac294" ] + "variables" : [ "jtcgetpagerangesdiffacfail067615a808f3e6930e423", "javablobgetpagerangesdiffacfail135337dafd2252b0a84" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[2].json index 3f7b50a845c2..a1254917968d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[2].json @@ -1,90 +1,91 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0325595074c0fe9548453?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0431255af73c6f1e964ca?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "515e9d7e-82c7-4cb9-8cf2-5e29cc7eef1b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3b07f00b-eeed-46b1-9307-8aa4fc7579e8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDDB5B09D", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "ETag" : "0x8D82750307FB635", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188ee8-301e-00f9-28f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "515e9d7e-82c7-4cb9-8cf2-5e29cc7eef1b" + "x-ms-request-id" : "605a2d71-b01e-0004-0839-591c85000000", + "Date" : "Mon, 13 Jul 2020 17:14:23 GMT", + "x-ms-client-request-id" : "3b07f00b-eeed-46b1-9307-8aa4fc7579e8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0325595074c0fe9548453/javablobgetpagerangesdiffacfail1792614a2946b7f20e4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0431255af73c6f1e964ca/javablobgetpagerangesdiffacfail1639744e76c78ef7f84", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9849e68f-8205-4e05-8052-614189d609f9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "de925cd5-606d-47a3-bb36-2fb292f21326" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDDBC53E8", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "ETag" : "0x8D8275030C610C8", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:24 GMT", + "x-ms-version-id" : "2020-07-13T17:14:24.2078920Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188efa-301e-00f9-36f7-12fa96000000", + "x-ms-request-id" : "94d211e8-a01e-006a-5739-5949aa000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "9849e68f-8205-4e05-8052-614189d609f9" + "Date" : "Mon, 13 Jul 2020 17:14:23 GMT", + "x-ms-client-request-id" : "de925cd5-606d-47a3-bb36-2fb292f21326" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0325595074c0fe9548453/javablobgetpagerangesdiffacfail1792614a2946b7f20e4?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0431255af73c6f1e964ca/javablobgetpagerangesdiffacfail1639744e76c78ef7f84?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b85be8fd-a64f-40b9-811e-c015b6c60a4d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9661745e-6e9c-4e12-9425-4993a6c7be35" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:26.2543646Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDDBC53E8", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:24 GMT", + "x-ms-version-id" : "2020-07-13T17:14:24.6091752Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188f06-301e-00f9-3ff7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "b85be8fd-a64f-40b9-811e-c015b6c60a4d" + "Date" : "Mon, 13 Jul 2020 17:14:23 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:24.6081752Z", + "ETag" : "0x8D8275030C610C8", + "Content-Length" : "0", + "x-ms-request-id" : "db6c07db-801e-006d-2039-5925c9000000", + "x-ms-client-request-id" : "9661745e-6e9c-4e12-9425-4993a6c7be35" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0325595074c0fe9548453/javablobgetpagerangesdiffacfail1792614a2946b7f20e4?prevsnapshot=2020-04-15T07%3a30%3a26.2543646Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0431255af73c6f1e964ca/javablobgetpagerangesdiffacfail1639744e76c78ef7f84?prevsnapshot=2020-07-13T17%3A14%3A24.6081752Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "42374ae5-484c-4d5b-8ddf-dad76cc3d4ed" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "392fd056-f754-4a36-a62e-6d86e75f4b52" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6b188f16-301e-00f9-4cf7-12fa96000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b188f16-301e-00f9-4cf7-12fa96000000\nTime:2020-04-15T07:30:26.3029541Z", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "42374ae5-484c-4d5b-8ddf-dad76cc3d4ed", + "x-ms-request-id" : "35bc0ee4-f01e-0083-7239-598fe0000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:35bc0ee4-f01e-0083-7239-598fe0000000\nTime:2020-07-13T17:14:24.9311251Z", + "Date" : "Mon, 13 Jul 2020 17:14:24 GMT", + "x-ms-client-request-id" : "392fd056-f754-4a36-a62e-6d86e75f4b52", "Content-Type" : "application/xml" }, "Exception" : null @@ -92,43 +93,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "dc7668c6-247b-46ce-b19b-3d527af90749" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4bfbadf1-5f94-40f2-b506-02fd51ca7364" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188f20-301e-00f9-55f7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail0325595074c0fe9548453Wed, 15 Apr 2020 07:30:26 GMT\"0x8D7E10EDDB5B09D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "dc7668c6-247b-46ce-b19b-3d527af90749", + "x-ms-request-id" : "b0484fcd-501e-009a-5f39-590f5b000000", + "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail0431255af73c6f1e964caMon, 13 Jul 2020 17:14:23 GMT\"0x8D82750307FB635\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:24 GMT", + "x-ms-client-request-id" : "4bfbadf1-5f94-40f2-b506-02fd51ca7364", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0325595074c0fe9548453?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0431255af73c6f1e964ca?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f79aad54-14ec-4992-a1fd-f9e010ad09b6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9fb1e99-c4e2-4fdf-8796-a684bd71f5c1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188f2d-301e-00f9-61f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "f79aad54-14ec-4992-a1fd-f9e010ad09b6" + "x-ms-request-id" : "b375d166-701e-00a2-5739-59ab9b000000", + "Date" : "Mon, 13 Jul 2020 17:14:25 GMT", + "x-ms-client-request-id" : "d9fb1e99-c4e2-4fdf-8796-a684bd71f5c1" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffacfail0325595074c0fe9548453", "javablobgetpagerangesdiffacfail1792614a2946b7f20e4" ] + "variables" : [ "jtcgetpagerangesdiffacfail0431255af73c6f1e964ca", "javablobgetpagerangesdiffacfail1639744e76c78ef7f84" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[3].json index 4c0d484ceb23..1c403eab241f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[3].json @@ -1,120 +1,122 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0053220f4255b1cbe941f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0705013c00d382f83d4b4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cfa2e500-6ecf-43d9-8d5c-eeea144b8520" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c214ac44-4b1c-47b4-beb1-022fd80b0540" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDDE0C2E5", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "ETag" : "0x8D8275031D6C426", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188f3e-301e-00f9-72f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "cfa2e500-6ecf-43d9-8d5c-eeea144b8520" + "x-ms-request-id" : "e4e22ad8-101e-0050-7b39-5953d2000000", + "Date" : "Mon, 13 Jul 2020 17:14:25 GMT", + "x-ms-client-request-id" : "c214ac44-4b1c-47b4-beb1-022fd80b0540" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0053220f4255b1cbe941f/javablobgetpagerangesdiffacfail143810117a7725064c4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0705013c00d382f83d4b4/javablobgetpagerangesdiffacfail125173671e8b0ab5a44", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2a3a96f6-9c9c-4b63-8529-6257061655e4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6725ccb8-89e7-4053-b6a6-91365a93abbc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDDE7DB14", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "ETag" : "0x8D82750320ED245", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:26 GMT", + "x-ms-version-id" : "2020-07-13T17:14:26.3624261Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188f48-301e-00f9-79f7-12fa96000000", + "x-ms-request-id" : "55ba5ff4-d01e-0002-4639-592f3a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "2a3a96f6-9c9c-4b63-8529-6257061655e4" + "Date" : "Mon, 13 Jul 2020 17:14:25 GMT", + "x-ms-client-request-id" : "6725ccb8-89e7-4053-b6a6-91365a93abbc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0053220f4255b1cbe941f/javablobgetpagerangesdiffacfail143810117a7725064c4?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0705013c00d382f83d4b4/javablobgetpagerangesdiffacfail125173671e8b0ab5a44?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7ada4850-a9f4-4e8b-a693-bf5a0727bbc4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6f880f9-36f4-40d6-8852-ba2efce048a8" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:26.5406319Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDDE7DB14", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:26 GMT", + "x-ms-version-id" : "2020-07-13T17:14:26.6996642Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188f52-301e-00f9-03f7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "7ada4850-a9f4-4e8b-a693-bf5a0727bbc4" + "Date" : "Mon, 13 Jul 2020 17:14:25 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:26.6986642Z", + "ETag" : "0x8D82750320ED245", + "Content-Length" : "0", + "x-ms-request-id" : "292a850a-c01e-007c-5939-59bf7d000000", + "x-ms-client-request-id" : "c6f880f9-36f4-40d6-8852-ba2efce048a8" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0053220f4255b1cbe941f/javablobgetpagerangesdiffacfail143810117a7725064c4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0705013c00d382f83d4b4/javablobgetpagerangesdiffacfail125173671e8b0ab5a44", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a3818139-aa52-4fc2-a5ae-f6bdd7885e8a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3b94b36-e3f2-4805-8962-d8c2e58a216e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "x-ms-version-id" : "2020-07-13T17:14:26.6996642Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:26 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", + "Date" : "Mon, 13 Jul 2020 17:14:26 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10EDDE7DB14", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:30:26 GMT", + "ETag" : "0x8D82750320ED245", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:14:26 GMT", "Content-Length" : "512", - "x-ms-request-id" : "6b188f59-301e-00f9-0af7-12fa96000000", - "x-ms-client-request-id" : "a3818139-aa52-4fc2-a5ae-f6bdd7885e8a", + "x-ms-request-id" : "9228ea81-e01e-006b-7a39-591676000000", + "x-ms-client-request-id" : "c3b94b36-e3f2-4805-8962-d8c2e58a216e", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0053220f4255b1cbe941f/javablobgetpagerangesdiffacfail143810117a7725064c4?prevsnapshot=2020-04-15T07%3a30%3a26.5406319Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0705013c00d382f83d4b4/javablobgetpagerangesdiffacfail125173671e8b0ab5a44?prevsnapshot=2020-07-13T17%3A14%3A26.6986642Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "40ea0289-0385-424f-bef2-726e053bbc53" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fe6d704-de13-43ea-b71e-8e56c2d54fe6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "304", - "x-ms-request-id" : "6b188f65-301e-00f9-14f7-12fa96000000", + "x-ms-request-id" : "ef3922bf-901e-0095-5d39-597937000000", "Body" : "", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "40ea0289-0385-424f-bef2-726e053bbc53", + "Date" : "Mon, 13 Jul 2020 17:14:27 GMT", + "x-ms-client-request-id" : "7fe6d704-de13-43ea-b71e-8e56c2d54fe6", "Content-Type" : "application/xml" }, "Exception" : null @@ -122,43 +124,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e2bfb314-c782-4dde-b5f0-f92d8b81ee81" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fd52e82-0939-48a8-9b28-ee29a814f0e9" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188f6e-301e-00f9-1bf7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail0053220f4255b1cbe941fWed, 15 Apr 2020 07:30:26 GMT\"0x8D7E10EDDE0C2E5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "e2bfb314-c782-4dde-b5f0-f92d8b81ee81", + "x-ms-request-id" : "79c803cb-001e-005c-5139-59c4da000000", + "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail0705013c00d382f83d4b4Mon, 13 Jul 2020 17:14:25 GMT\"0x8D8275031D6C426\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:27 GMT", + "x-ms-client-request-id" : "6fd52e82-0939-48a8-9b28-ee29a814f0e9", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0053220f4255b1cbe941f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0705013c00d382f83d4b4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d6a675f5-bf90-449b-a817-08e83e61e335" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b05642a9-7d90-4d4b-afa1-f07663b64408" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188f7c-301e-00f9-24f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "d6a675f5-bf90-449b-a817-08e83e61e335" + "x-ms-request-id" : "4f748721-101e-00a4-6f39-599824000000", + "Date" : "Mon, 13 Jul 2020 17:14:27 GMT", + "x-ms-client-request-id" : "b05642a9-7d90-4d4b-afa1-f07663b64408" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffacfail0053220f4255b1cbe941f", "javablobgetpagerangesdiffacfail143810117a7725064c4" ] + "variables" : [ "jtcgetpagerangesdiffacfail0705013c00d382f83d4b4", "javablobgetpagerangesdiffacfail125173671e8b0ab5a44" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[4].json index 3b49dcc0d8b2..fcfbf9829919 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[4].json @@ -1,112 +1,113 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail054099e3add480c4094c4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0504004876d1893bb2497?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "73bd38e2-da17-4007-a016-cc1168061f28" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e330f683-ac1b-4520-b5f9-f372f232450e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDE14FF2C", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "ETag" : "0x8D827503358ADB0", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188f90-301e-00f9-33f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "73bd38e2-da17-4007-a016-cc1168061f28" + "x-ms-request-id" : "81bd2ba2-901e-004e-5039-59bf0a000000", + "Date" : "Mon, 13 Jul 2020 17:14:28 GMT", + "x-ms-client-request-id" : "e330f683-ac1b-4520-b5f9-f372f232450e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail054099e3add480c4094c4/javablobgetpagerangesdiffacfail1659482a5ae83fd6014", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0504004876d1893bb2497/javablobgetpagerangesdiffacfail14983221c0c35c6c8b4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7617182d-f7b0-4e2d-a62a-4c25234dd104" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61b65be0-c37a-423c-908c-4c6355ab018a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDE1CDA6C", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "ETag" : "0x8D82750338FEC1B", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:28 GMT", + "x-ms-version-id" : "2020-07-13T17:14:28.8862235Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188f98-301e-00f9-3af7-12fa96000000", + "x-ms-request-id" : "fa23283a-401e-0000-6439-599182000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "7617182d-f7b0-4e2d-a62a-4c25234dd104" + "Date" : "Mon, 13 Jul 2020 17:14:28 GMT", + "x-ms-client-request-id" : "61b65be0-c37a-423c-908c-4c6355ab018a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail054099e3add480c4094c4/javablobgetpagerangesdiffacfail1659482a5ae83fd6014?comp=snapshot", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0504004876d1893bb2497/javablobgetpagerangesdiffacfail14983221c0c35c6c8b4?comp=snapshot", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c3cbd525-530c-48a8-9d1d-03e88d892e08" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5687e083-9c6e-4837-bfaa-c27e88336c40" }, "Response" : { - "x-ms-version" : "2019-10-10", - "x-ms-snapshot" : "2020-04-15T07:30:26.8889580Z", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDE1CDA6C", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:28 GMT", + "x-ms-version-id" : "2020-07-13T17:14:29.3265347Z", "retry-after" : "0", - "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188fa4-301e-00f9-46f7-12fa96000000", "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "c3cbd525-530c-48a8-9d1d-03e88d892e08" + "Date" : "Mon, 13 Jul 2020 17:14:28 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:29.3255347Z", + "ETag" : "0x8D82750338FEC1B", + "Content-Length" : "0", + "x-ms-request-id" : "49356e07-801e-0052-7e39-59ed6a000000", + "x-ms-client-request-id" : "5687e083-9c6e-4837-bfaa-c27e88336c40" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail054099e3add480c4094c4/javablobgetpagerangesdiffacfail1659482a5ae83fd6014?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0504004876d1893bb2497/javablobgetpagerangesdiffacfail14983221c0c35c6c8b4?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fdffd6b9-7478-46d3-b5cb-79c9045ed8a6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a77ac8a-1015-42ea-8bb1-51f436f71189" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EDE1CDA6C", - "x-ms-lease-id" : "cbe47a4e-149f-4965-b227-a92e2db83989", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:26 GMT", + "ETag" : "0x8D82750338FEC1B", + "x-ms-lease-id" : "18b734fc-d3bc-4254-a310-4f856f10926e", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b188fb2-301e-00f9-52f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "fdffd6b9-7478-46d3-b5cb-79c9045ed8a6" + "x-ms-request-id" : "a8fb3930-701e-0069-4739-59a8ce000000", + "Date" : "Mon, 13 Jul 2020 17:14:28 GMT", + "x-ms-client-request-id" : "0a77ac8a-1015-42ea-8bb1-51f436f71189" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail054099e3add480c4094c4/javablobgetpagerangesdiffacfail1659482a5ae83fd6014?prevsnapshot=2020-04-15T07%3a30%3a26.8889580Z&comp=pagelist", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0504004876d1893bb2497/javablobgetpagerangesdiffacfail14983221c0c35c6c8b4?prevsnapshot=2020-07-13T17%3A14%3A29.3255347Z&comp=pagelist", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0c30102b-4ee1-4fe3-a963-4b4bda92cba3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "686504a5-6af9-489c-a56d-60176c5e4de6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "6b188fb7-301e-00f9-57f7-12fa96000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:6b188fb7-301e-00f9-57f7-12fa96000000\nTime:2020-04-15T07:30:26.9846124Z", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "0c30102b-4ee1-4fe3-a963-4b4bda92cba3", + "x-ms-request-id" : "8413174e-c01e-0043-1a39-5977de000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:8413174e-c01e-0043-1a39-5977de000000\nTime:2020-07-13T17:14:30.1344283Z", + "Date" : "Mon, 13 Jul 2020 17:14:29 GMT", + "x-ms-client-request-id" : "686504a5-6af9-489c-a56d-60176c5e4de6", "Content-Type" : "application/xml" }, "Exception" : null @@ -114,43 +115,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3f6f5cb5-1f58-45d8-98b2-2f44f6ec80ac" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a25e7753-a2d8-45ce-bcf6-67d916418a6f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b188fbf-301e-00f9-5ef7-12fa96000000", - "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail054099e3add480c4094c4Wed, 15 Apr 2020 07:30:26 GMT\"0x8D7E10EDE14FF2C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "3f6f5cb5-1f58-45d8-98b2-2f44f6ec80ac", + "x-ms-request-id" : "88c7d1e0-101e-0032-0a39-5991f5000000", + "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail0504004876d1893bb2497Mon, 13 Jul 2020 17:14:28 GMT\"0x8D827503358ADB0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:30 GMT", + "x-ms-client-request-id" : "a25e7753-a2d8-45ce-bcf6-67d916418a6f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail054099e3add480c4094c4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0504004876d1893bb2497?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9658222b-9691-4f3b-9197-150a059aca3d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fa4bf6a2-a18a-454c-bd62-9d4e508d041b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b188fcb-301e-00f9-66f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:26 GMT", - "x-ms-client-request-id" : "9658222b-9691-4f3b-9197-150a059aca3d" + "x-ms-request-id" : "b02f78c9-d01e-0070-3639-592875000000", + "Date" : "Mon, 13 Jul 2020 17:14:30 GMT", + "x-ms-client-request-id" : "fa4bf6a2-a18a-454c-bd62-9d4e508d041b" }, "Exception" : null } ], - "variables" : [ "jtcgetpagerangesdiffacfail054099e3add480c4094c4", "javablobgetpagerangesdiffacfail1659482a5ae83fd6014" ] + "variables" : [ "jtcgetpagerangesdiffacfail0504004876d1893bb2497", "javablobgetpagerangesdiffacfail14983221c0c35c6c8b4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[5].json new file mode 100644 index 000000000000..e2e9e1528f70 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestgetpagerangesdiffacfail[5].json @@ -0,0 +1,134 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0207688d80ff23f9b74d6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3efc27a1-5c92-483d-85a2-52ad04c4e45a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8275034F48951", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0b810bf3-401e-0086-4d39-595d3b000000", + "Date" : "Mon, 13 Jul 2020 17:14:30 GMT", + "x-ms-client-request-id" : "3efc27a1-5c92-483d-85a2-52ad04c4e45a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0207688d80ff23f9b74d6/javablobgetpagerangesdiffacfail1693485ed76afc4d3d4", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d9c15ad-6e2b-48af-9eb3-3817c8dcbd86" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D82750352A8604", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:31 GMT", + "x-ms-version-id" : "2020-07-13T17:14:31.5771396Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f8bd9b54-c01e-00a7-3e39-597940000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:14:31 GMT", + "x-ms-client-request-id" : "3d9c15ad-6e2b-48af-9eb3-3817c8dcbd86" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0207688d80ff23f9b74d6/javablobgetpagerangesdiffacfail1693485ed76afc4d3d4?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66245b66-ea48-4382-9d69-e489f45af47c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 13 Jul 2020 17:14:31 GMT", + "x-ms-version-id" : "2020-07-13T17:14:31.9203833Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Mon, 13 Jul 2020 17:14:31 GMT", + "x-ms-snapshot" : "2020-07-13T17:14:31.9193833Z", + "ETag" : "0x8D82750352A8604", + "Content-Length" : "0", + "x-ms-request-id" : "40e46156-e01e-0026-4c39-59d99a000000", + "x-ms-client-request-id" : "66245b66-ea48-4382-9d69-e489f45af47c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0207688d80ff23f9b74d6/javablobgetpagerangesdiffacfail1693485ed76afc4d3d4?prevsnapshot=2020-07-13T17%3A14%3A31.9193833Z&comp=pagelist", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0851911-5396-4f1e-8f13-e20f6f55d01b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "fea0e8e1-601e-0028-6839-59f02a000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:fea0e8e1-601e-0028-6839-59f02a000000\nTime:2020-07-13T17:14:32.2582526Z", + "Date" : "Mon, 13 Jul 2020 17:14:32 GMT", + "x-ms-client-request-id" : "b0851911-5396-4f1e-8f13-e20f6f55d01b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcgetpagerangesdiffacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9bb8b64-5a41-44ba-ad28-c942f59efb6b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "9cb64be7-901e-0003-3839-5970e6000000", + "Body" : "jtcgetpagerangesdiffacfailjtcgetpagerangesdiffacfail0207688d80ff23f9b74d6Mon, 13 Jul 2020 17:14:31 GMT\"0x8D8275034F48951\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:14:32 GMT", + "x-ms-client-request-id" : "b9bb8b64-5a41-44ba-ad28-c942f59efb6b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcgetpagerangesdiffacfail0207688d80ff23f9b74d6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "51455825-c697-46e1-94ee-2bae81f0eff1" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d397baec-a01e-0055-5f39-598109000000", + "Date" : "Mon, 13 Jul 2020 17:14:32 GMT", + "x-ms-client-request-id" : "51455825-c697-46e1-94ee-2bae81f0eff1" + }, + "Exception" : null + } ], + "variables" : [ "jtcgetpagerangesdiffacfail0207688d80ff23f9b74d6", "javablobgetpagerangesdiffacfail1693485ed76afc4d3d4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[0].json index 5c90d020cb4d..0b6b4b3c9016 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[0].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac8d246428899bde?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacdd822851b86293?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "32214c47-bad1-4a3e-81c0-b560490609df" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b9d792d-9107-45d3-906c-676746551983" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC8DBEB39", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F92256E22", + "Last-Modified" : "Mon, 13 Jul 2020 17:09:58 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186b08-301e-00f9-5cf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "32214c47-bad1-4a3e-81c0-b560490609df" + "x-ms-request-id" : "34f338c4-401e-0096-2538-599853000000", + "Date" : "Mon, 13 Jul 2020 17:09:57 GMT", + "x-ms-client-request-id" : "9b9d792d-9107-45d3-906c-676746551983" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac8d246428899bde/javablobuploadpageac1pageblobapitestuploadpageac8d25475801d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacdd822851b86293/javablobuploadpageac1pageblobapitestuploadpageacdd89289492f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "10bf2d6e-e914-4302-8e29-ac7c44d2df16" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "11d09c4c-844a-4d85-aa9f-72e38a80e212" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC8E2B37A", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F9283622F", + "Last-Modified" : "Mon, 13 Jul 2020 17:09:58 GMT", + "x-ms-version-id" : "2020-07-13T17:09:58.6908719Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186b12-301e-00f9-62f7-12fa96000000", + "x-ms-request-id" : "6ede7693-301e-009c-1338-593ce4000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "10bf2d6e-e914-4302-8e29-ac7c44d2df16" + "Date" : "Mon, 13 Jul 2020 17:09:58 GMT", + "x-ms-client-request-id" : "11d09c4c-844a-4d85-aa9f-72e38a80e212" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac8d246428899bde/javablobuploadpageac1pageblobapitestuploadpageac8d25475801d?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacdd822851b86293/javablobuploadpageac1pageblobapitestuploadpageacdd89289492f?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "285c97c2-6548-4d25-93e1-f02b684fb175", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "76bc73e1-a23b-4f1b-8394-7e6d7c1d8847", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "af261211-b01e-0076-1f38-591bca000000", + "Date" : "Mon, 13 Jul 2020 17:09:59 GMT", + "x-ms-client-request-id" : "76bc73e1-a23b-4f1b-8394-7e6d7c1d8847" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacdd822851b86293/javablobuploadpageac1pageblobapitestuploadpageacdd89289492f?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2c9355d-e825-442d-8d15-a135dff84c1e", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "lspx/zQ6uXk=", + "x-ms-content-crc64" : "rWtkJ/I+Uuk=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:09:59 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "ETag" : "0x8D7E10EC8EBB654", + "Date" : "Mon, 13 Jul 2020 17:09:59 GMT", + "ETag" : "0x8D8274F93155C8C", "Content-Length" : "0", - "x-ms-request-id" : "6b186b2a-301e-00f9-71f7-12fa96000000", - "x-ms-client-request-id" : "285c97c2-6548-4d25-93e1-f02b684fb175" + "x-ms-request-id" : "c592a536-d01e-003d-3638-59e799000000", + "x-ms-client-request-id" : "d2c9355d-e825-442d-8d15-a135dff84c1e" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b95fde35-133b-44bf-ac9a-67716e0320e9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e02342d-ce20-494e-9319-eae1f3acb52c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186b39-301e-00f9-7df7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac8d246428899bdeWed, 15 Apr 2020 07:29:51 GMT\"0x8D7E10EC8DBEB39\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "b95fde35-133b-44bf-ac9a-67716e0320e9", + "x-ms-request-id" : "4b95adb8-f01e-0067-7d38-59817e000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageacdd822851b86293Mon, 13 Jul 2020 17:09:58 GMT\"0x8D8274F92256E22\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:09:59 GMT", + "x-ms-client-request-id" : "2e02342d-ce20-494e-9319-eae1f3acb52c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac8d246428899bde?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacdd822851b86293?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "874fb475-d70f-4c9a-887d-d6c1ab0e81e8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2299f09-6a70-4208-b9f2-71bbc401d475" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186b47-301e-00f9-09f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "874fb475-d70f-4c9a-887d-d6c1ab0e81e8" + "x-ms-request-id" : "1f01c0ca-801e-007d-4e38-59e0a1000000", + "Date" : "Mon, 13 Jul 2020 17:09:59 GMT", + "x-ms-client-request-id" : "d2299f09-6a70-4208-b9f2-71bbc401d475" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac8d246428899bde", "javablobuploadpageac1pageblobapitestuploadpageac8d25475801d", "4fd09196-b7de-42ac-8893-860b60e4e8f3" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageacdd822851b86293", "javablobuploadpageac1pageblobapitestuploadpageacdd89289492f", "ccde145c-3527-4ab4-898a-0d3786f91835" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[1].json index c7a696efe916..c7ed94fe1bb3 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[1].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac65c199558f4366?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4710052903aacf?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "738063d8-6b4f-4d6a-b8c8-50cb1a29c1c2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "77b4f872-a2b0-4059-8019-62373c72dad7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC9037A29", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F93F1669D", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:01 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186b55-301e-00f9-14f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "738063d8-6b4f-4d6a-b8c8-50cb1a29c1c2" + "x-ms-request-id" : "4773e9c4-201e-0080-7738-596e84000000", + "Date" : "Mon, 13 Jul 2020 17:10:01 GMT", + "x-ms-client-request-id" : "77b4f872-a2b0-4059-8019-62373c72dad7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac65c199558f4366/javablobuploadpageac1pageblobapitestuploadpageac65c27456e73", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4710052903aacf/javablobuploadpageac1pageblobapitestuploadpageac47176176e1e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1d46484d-787b-4557-97f8-6f1f930e0f4e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab08b98f-9d8f-4708-9911-ca4cb88e949f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC90A9053", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F94330E94", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:01 GMT", + "x-ms-version-id" : "2020-07-13T17:10:01.5198868Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186b61-301e-00f9-1ef7-12fa96000000", + "x-ms-request-id" : "e0d41055-701e-0046-2538-59a505000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "1d46484d-787b-4557-97f8-6f1f930e0f4e" + "Date" : "Mon, 13 Jul 2020 17:10:01 GMT", + "x-ms-client-request-id" : "ab08b98f-9d8f-4708-9911-ca4cb88e949f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac65c199558f4366/javablobuploadpageac1pageblobapitestuploadpageac65c27456e73?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4710052903aacf/javablobuploadpageac1pageblobapitestuploadpageac47176176e1e?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "53d9220d-5ac2-45ba-8b76-573aca05723b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "36716258-fda9-4a11-9ca1-d4bd4c349ca0", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4aeb086b-701e-0034-3538-59a24a000000", + "Date" : "Mon, 13 Jul 2020 17:10:01 GMT", + "x-ms-client-request-id" : "36716258-fda9-4a11-9ca1-d4bd4c349ca0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4710052903aacf/javablobuploadpageac1pageblobapitestuploadpageac47176176e1e?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dab7f44a-49ec-4e65-8ffd-7998c2b37f78", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "pYWlTA5LB5k=", + "x-ms-content-crc64" : "4qM/xgUO4dg=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:02 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "ETag" : "0x8D7E10EC9125A59", + "Date" : "Mon, 13 Jul 2020 17:10:01 GMT", + "ETag" : "0x8D8274F94A25F6D", "Content-Length" : "0", - "x-ms-request-id" : "6b186b6b-301e-00f9-28f7-12fa96000000", - "x-ms-client-request-id" : "53d9220d-5ac2-45ba-8b76-573aca05723b" + "x-ms-request-id" : "79cab895-001e-0087-1f38-5902e7000000", + "x-ms-client-request-id" : "dab7f44a-49ec-4e65-8ffd-7998c2b37f78" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "efc78803-3c20-4097-9689-96831b6315a2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d0f1d75-32d0-4a38-a3d9-270afe20da76" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186b7e-301e-00f9-36f7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac65c199558f4366Wed, 15 Apr 2020 07:29:51 GMT\"0x8D7E10EC9037A29\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "efc78803-3c20-4097-9689-96831b6315a2", + "x-ms-request-id" : "e6de9665-201e-0074-5438-59a572000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac4710052903aacfMon, 13 Jul 2020 17:10:01 GMT\"0x8D8274F93F1669D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:01 GMT", + "x-ms-client-request-id" : "6d0f1d75-32d0-4a38-a3d9-270afe20da76", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac65c199558f4366?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4710052903aacf?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9965742f-2990-4237-a25c-59dd32ddd214" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a123eb97-d530-47e4-bc4e-881f490f4826" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186b84-301e-00f9-3cf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "9965742f-2990-4237-a25c-59dd32ddd214" + "x-ms-request-id" : "7331ba28-401e-0062-7d38-5953a5000000", + "Date" : "Mon, 13 Jul 2020 17:10:02 GMT", + "x-ms-client-request-id" : "a123eb97-d530-47e4-bc4e-881f490f4826" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac65c199558f4366", "javablobuploadpageac1pageblobapitestuploadpageac65c27456e73", "98f4a042-19e6-40c6-bd1b-a30237fcdd94" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac4710052903aacf", "javablobuploadpageac1pageblobapitestuploadpageac47176176e1e", "4d8d9bdc-6a38-4bd8-8579-c2943113e94b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[2].json index 426d5086f3ff..a700ce852bf3 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[2].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4b004105e540ba?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac97206667c690c4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "87b619c5-ac19-45c6-a062-a91419726843" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e9e8ade-f4a7-43df-9b7f-d9ad537bd232" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC92AE1F3", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F954A16E5", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186b8c-301e-00f9-44f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "87b619c5-ac19-45c6-a062-a91419726843" + "x-ms-request-id" : "cf6ec32f-001e-0001-7d38-59ce5e000000", + "Date" : "Mon, 13 Jul 2020 17:10:02 GMT", + "x-ms-client-request-id" : "6e9e8ade-f4a7-43df-9b7f-d9ad537bd232" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4b004105e540ba/javablobuploadpageac1pageblobapitestuploadpageac4b061060888", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac97206667c690c4/javablobuploadpageac1pageblobapitestuploadpageac9728448383a", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "17940a58-952d-4a7f-9024-d6bd1e2cabb6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61587bfd-cc78-44a3-a2c3-d78fc8689547" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC933098E", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F957FA151", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:03 GMT", + "x-ms-version-id" : "2020-07-13T17:10:03.6994385Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186b9a-301e-00f9-4ff7-12fa96000000", + "x-ms-request-id" : "a7b9acfd-b01e-002b-7e38-59114e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "17940a58-952d-4a7f-9024-d6bd1e2cabb6" + "Date" : "Mon, 13 Jul 2020 17:10:02 GMT", + "x-ms-client-request-id" : "61587bfd-cc78-44a3-a2c3-d78fc8689547" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4b004105e540ba/javablobuploadpageac1pageblobapitestuploadpageac4b061060888?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac97206667c690c4/javablobuploadpageac1pageblobapitestuploadpageac9728448383a?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ceb8369e-0e83-4200-b4c0-8bef57b7aa24", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d71e3397-8475-4035-b164-b07af342b279", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "54bf5dde-f01e-0005-3438-594359000000", + "Date" : "Mon, 13 Jul 2020 17:10:03 GMT", + "x-ms-client-request-id" : "d71e3397-8475-4035-b164-b07af342b279" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac97206667c690c4/javablobuploadpageac1pageblobapitestuploadpageac9728448383a?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "694ba39f-b954-49a9-a2c6-cbbc22dfa77d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "dNEmaGVI3p8=", + "x-ms-content-crc64" : "dU53OX8gNvY=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:04 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "ETag" : "0x8D7E10EC93AFAB4", + "Date" : "Mon, 13 Jul 2020 17:10:03 GMT", + "ETag" : "0x8D8274F95E6DA63", "Content-Length" : "0", - "x-ms-request-id" : "6b186b9e-301e-00f9-53f7-12fa96000000", - "x-ms-client-request-id" : "ceb8369e-0e83-4200-b4c0-8bef57b7aa24" + "x-ms-request-id" : "fb6e8481-501e-001c-2d38-59c3e2000000", + "x-ms-client-request-id" : "694ba39f-b954-49a9-a2c6-cbbc22dfa77d" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "abd738f0-89e3-4fe6-bd43-a26ceccd482c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bfa37ba1-6c3e-4b90-a4df-cca0ca49ac92" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186bac-301e-00f9-5ef7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac4b004105e540baWed, 15 Apr 2020 07:29:51 GMT\"0x8D7E10EC92AE1F3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "abd738f0-89e3-4fe6-bd43-a26ceccd482c", + "x-ms-request-id" : "0ee4b45b-301e-000a-3038-593535000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac97206667c690c4Mon, 13 Jul 2020 17:10:03 GMT\"0x8D8274F954A16E5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:04 GMT", + "x-ms-client-request-id" : "bfa37ba1-6c3e-4b90-a4df-cca0ca49ac92", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac4b004105e540ba?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac97206667c690c4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cb95412f-bae2-476a-8173-b7ecfd8b6427" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d13a9b18-bff3-4d4f-bbe7-12ff1563f1bd" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186bb1-301e-00f9-63f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "cb95412f-bae2-476a-8173-b7ecfd8b6427" + "x-ms-request-id" : "4bc58f66-b01e-0049-1e38-59d369000000", + "Date" : "Mon, 13 Jul 2020 17:10:04 GMT", + "x-ms-client-request-id" : "d13a9b18-bff3-4d4f-bbe7-12ff1563f1bd" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac4b004105e540ba", "javablobuploadpageac1pageblobapitestuploadpageac4b061060888", "68b8598a-dee6-48e1-b175-0d7617fc8dbc" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac97206667c690c4", "javablobuploadpageac1pageblobapitestuploadpageac9728448383a", "c59876cb-b571-4d22-83f9-a624c4b97bf9" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[3].json index 8a057dcba6da..320375cdda72 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[3].json @@ -1,143 +1,164 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac405919429257ea?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac7ed0360770632f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a608bc0b-716a-4218-8e68-a3702de2038d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1e4f92e3-e86c-4e9c-adf0-06e1c2987cd7" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC9504D72", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F9683FB47", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:05 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186bb5-301e-00f9-67f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "a608bc0b-716a-4218-8e68-a3702de2038d" + "x-ms-request-id" : "a85b2691-a01e-0037-0c38-59432e000000", + "Date" : "Mon, 13 Jul 2020 17:10:04 GMT", + "x-ms-client-request-id" : "1e4f92e3-e86c-4e9c-adf0-06e1c2987cd7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac405919429257ea/javablobuploadpageac1pageblobapitestuploadpageac405502198fe", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac7ed0360770632f/javablobuploadpageac1pageblobapitestuploadpageac7ed973134a4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "382d6d11-5f23-42c8-8561-5a995653f9d6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0a44536-607d-414a-8831-aac6ae53a7c0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC957D868", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F96BD1624", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:05 GMT", + "x-ms-version-id" : "2020-07-13T17:10:05.7809209Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186bc2-301e-00f9-70f7-12fa96000000", + "x-ms-request-id" : "ad1d2a1d-001e-004c-4138-5901b2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:51 GMT", - "x-ms-client-request-id" : "382d6d11-5f23-42c8-8561-5a995653f9d6" + "Date" : "Mon, 13 Jul 2020 17:10:05 GMT", + "x-ms-client-request-id" : "a0a44536-607d-414a-8831-aac6ae53a7c0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac7ed0360770632f/javablobuploadpageac1pageblobapitestuploadpageac7ed973134a4?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb3516fc-5935-4a2c-87a1-2ee633a151b5", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "262c9599-f01e-0077-2938-594416000000", + "Date" : "Mon, 13 Jul 2020 17:10:05 GMT", + "x-ms-client-request-id" : "eb3516fc-5935-4a2c-87a1-2ee633a151b5" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac405919429257ea/javablobuploadpageac1pageblobapitestuploadpageac405502198fe", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac7ed0360770632f/javablobuploadpageac1pageblobapitestuploadpageac7ed973134a4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "59734c03-449b-4415-8a27-f1d832c2629f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e20c5e91-5815-4a3a-8f30-c0c937c01396" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:51 GMT", + "x-ms-version-id" : "2020-07-13T17:10:05.7809209Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:05 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", + "Date" : "Mon, 13 Jul 2020 17:10:06 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10EC957D868", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:29:51 GMT", + "ETag" : "0x8D8274F96BD1624", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:10:05 GMT", "Content-Length" : "512", - "x-ms-request-id" : "6b186bca-301e-00f9-78f7-12fa96000000", - "x-ms-client-request-id" : "59734c03-449b-4415-8a27-f1d832c2629f", + "x-ms-request-id" : "3d8ae57f-f01e-0015-4a38-598631000000", + "x-ms-client-request-id" : "e20c5e91-5815-4a3a-8f30-c0c937c01396", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac405919429257ea/javablobuploadpageac1pageblobapitestuploadpageac405502198fe?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac7ed0360770632f/javablobuploadpageac1pageblobapitestuploadpageac7ed973134a4?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "916c3c68-07f8-43ea-9885-3d4a3fb5f120", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e4d6036-2d15-4afa-b149-c2fd1ba56bb0", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "JjBY6aRHfhc=", + "x-ms-content-crc64" : "/MnECCm2FKQ=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:52 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:06 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "ETag" : "0x8D7E10EC9652207", + "Date" : "Mon, 13 Jul 2020 17:10:06 GMT", + "ETag" : "0x8D8274F9773B62F", "Content-Length" : "0", - "x-ms-request-id" : "6b186bd7-301e-00f9-80f7-12fa96000000", - "x-ms-client-request-id" : "916c3c68-07f8-43ea-9885-3d4a3fb5f120" + "x-ms-request-id" : "74cf7109-c01e-0053-3d38-59b2b6000000", + "x-ms-client-request-id" : "7e4d6036-2d15-4afa-b149-c2fd1ba56bb0" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "08366439-0297-454c-821e-e01014d20359" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0d926d3c-7829-4f7a-aa7a-c8e6ae6790d4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186be5-301e-00f9-0bf7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac405919429257eaWed, 15 Apr 2020 07:29:51 GMT\"0x8D7E10EC9504D72\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "08366439-0297-454c-821e-e01014d20359", + "x-ms-request-id" : "0d59e30b-501e-007e-1338-5901c5000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac7ed0360770632fMon, 13 Jul 2020 17:10:05 GMT\"0x8D8274F9683FB47\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:07 GMT", + "x-ms-client-request-id" : "0d926d3c-7829-4f7a-aa7a-c8e6ae6790d4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac405919429257ea?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac7ed0360770632f?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "45c0515f-b763-473e-b429-4f20bea6d177" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "74ff5168-90bb-42cb-8072-fc7d99e00055" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186bef-301e-00f9-14f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "45c0515f-b763-473e-b429-4f20bea6d177" + "x-ms-request-id" : "c20d2a6c-c01e-006c-5e38-597a15000000", + "Date" : "Mon, 13 Jul 2020 17:10:07 GMT", + "x-ms-client-request-id" : "74ff5168-90bb-42cb-8072-fc7d99e00055" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac405919429257ea", "javablobuploadpageac1pageblobapitestuploadpageac405502198fe", "3c43af18-d06e-42fc-bf29-4d0f8bb59588" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac7ed0360770632f", "javablobuploadpageac1pageblobapitestuploadpageac7ed973134a4", "7dbbaa36-9880-4260-8ca3-e051d1091f35" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[4].json index 85d10388ee5b..73df4aff7c42 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[4].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac3f4872961856b0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac93b95292272a00?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f5f8ee8f-92cc-4de5-ba86-7b3ef3d2e252" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb188aeb-3db3-4917-8bf2-f7dcc772f618" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC979B190", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:52 GMT", + "ETag" : "0x8D8274F9810D7A7", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186c00-301e-00f9-22f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "f5f8ee8f-92cc-4de5-ba86-7b3ef3d2e252" + "x-ms-request-id" : "7630e2ab-001e-0097-0e38-59c78f000000", + "Date" : "Mon, 13 Jul 2020 17:10:07 GMT", + "x-ms-client-request-id" : "eb188aeb-3db3-4917-8bf2-f7dcc772f618" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac3f4872961856b0/javablobuploadpageac1pageblobapitestuploadpageac3f455786a3b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac93b95292272a00/javablobuploadpageac1pageblobapitestuploadpageac93b15808bff", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e45d0d56-3722-40e1-8142-6c8eca88f5b1" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e941b215-b350-4351-a6da-692164cac7ff" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC980EE24", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:52 GMT", + "ETag" : "0x8D8274F9843610B", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:08 GMT", + "x-ms-version-id" : "2020-07-13T17:10:08.3377419Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186c0c-301e-00f9-2cf7-12fa96000000", + "x-ms-request-id" : "4a88c88a-801e-0099-5c38-59ee3f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "e45d0d56-3722-40e1-8142-6c8eca88f5b1" + "Date" : "Mon, 13 Jul 2020 17:10:07 GMT", + "x-ms-client-request-id" : "e941b215-b350-4351-a6da-692164cac7ff" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac3f4872961856b0/javablobuploadpageac1pageblobapitestuploadpageac3f455786a3b?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac93b95292272a00/javablobuploadpageac1pageblobapitestuploadpageac93b15808bff?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2303ecef-b74c-43e8-8ae1-40c9ed99fd6a", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16cbd5f1-c6ef-4dab-bc8a-0e3a6a1b5bfb", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "f410e563-001e-0073-0638-59c911000000", + "Date" : "Mon, 13 Jul 2020 17:10:07 GMT", + "x-ms-client-request-id" : "16cbd5f1-c6ef-4dab-bc8a-0e3a6a1b5bfb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac93b95292272a00/javablobuploadpageac1pageblobapitestuploadpageac93b15808bff?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "516908e5-d90f-474f-aebb-cccab701bdc9", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "+VlCYngcJzs=", + "x-ms-content-crc64" : "lopW8kEWiqg=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:52 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "ETag" : "0x8D7E10EC9895485", + "Date" : "Mon, 13 Jul 2020 17:10:08 GMT", + "ETag" : "0x8D8274F98AD59C2", "Content-Length" : "0", - "x-ms-request-id" : "6b186c17-301e-00f9-34f7-12fa96000000", - "x-ms-client-request-id" : "2303ecef-b74c-43e8-8ae1-40c9ed99fd6a" + "x-ms-request-id" : "02537e0d-901e-0061-4638-59b2c1000000", + "x-ms-client-request-id" : "516908e5-d90f-474f-aebb-cccab701bdc9" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "345b2c08-6b27-4000-9ef6-3bdbf3efe418" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "018d9962-971e-488d-8aaa-9ff693a07225" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186c21-301e-00f9-3cf7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac3f4872961856b0Wed, 15 Apr 2020 07:29:52 GMT\"0x8D7E10EC979B190\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "345b2c08-6b27-4000-9ef6-3bdbf3efe418", + "x-ms-request-id" : "7253a0ba-e01e-009f-1638-59dd80000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac93b95292272a00Mon, 13 Jul 2020 17:10:08 GMT\"0x8D8274F9810D7A7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:08 GMT", + "x-ms-client-request-id" : "018d9962-971e-488d-8aaa-9ff693a07225", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac3f4872961856b0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac93b95292272a00?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e95ec1ff-c9fb-41bd-9cc1-7deb561b8972" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6224a644-8c6a-41a7-a344-3f009c268e3f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186c2e-301e-00f9-45f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "e95ec1ff-c9fb-41bd-9cc1-7deb561b8972" + "x-ms-request-id" : "da56cc76-201e-0029-4138-59aff6000000", + "Date" : "Mon, 13 Jul 2020 17:10:09 GMT", + "x-ms-client-request-id" : "6224a644-8c6a-41a7-a344-3f009c268e3f" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac3f4872961856b0", "javablobuploadpageac1pageblobapitestuploadpageac3f455786a3b", "a017e718-68bf-4322-b3eb-9f273097b988" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac93b95292272a00", "javablobuploadpageac1pageblobapitestuploadpageac93b15808bff", "b5bff554-135d-4a68-8fe9-a6d7139920f6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[5].json index 25d48778f19e..6feabfe40589 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[5].json @@ -1,135 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2fb00549852f72?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2418505572a0a1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "09c1c3cd-61f7-4969-a232-3ad0bacc84ef" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e23d8a7a-1247-4a37-a7cf-5a5634d51952" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC9C15380", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:52 GMT", + "ETag" : "0x8D8274F994AAB9E", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:10 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186c67-301e-00f9-76f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "09c1c3cd-61f7-4969-a232-3ad0bacc84ef" + "x-ms-request-id" : "891a58fc-a01e-0018-4138-594ee5000000", + "Date" : "Mon, 13 Jul 2020 17:10:09 GMT", + "x-ms-client-request-id" : "e23d8a7a-1247-4a37-a7cf-5a5634d51952" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2fb00549852f72/javablobuploadpageac1pageblobapitestuploadpageac2fb100495b4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2418505572a0a1/javablobuploadpageac1pageblobapitestuploadpageac24165594035", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d1ea7969-2ec4-4838-ae31-be1cc3e9c906" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d324f03b-468e-47c0-b99b-384520e15e2a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC9C904C3", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:52 GMT", + "ETag" : "0x8D8274F9981994F", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:10 GMT", + "x-ms-version-id" : "2020-07-13T17:10:10.4232271Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186c75-301e-00f9-02f7-12fa96000000", + "x-ms-request-id" : "f5950804-301e-001a-0c38-59f05d000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "d1ea7969-2ec4-4838-ae31-be1cc3e9c906" + "Date" : "Mon, 13 Jul 2020 17:10:09 GMT", + "x-ms-client-request-id" : "d324f03b-468e-47c0-b99b-384520e15e2a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2fb00549852f72/javablobuploadpageac1pageblobapitestuploadpageac2fb100495b4?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2418505572a0a1/javablobuploadpageac1pageblobapitestuploadpageac24165594035?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e82078df-e5b5-41ff-965f-942433fbaac8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d526ae79-0c97-46b0-aab7-6f54e7848de2", + "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC9C904C3", - "x-ms-lease-id" : "29c056fc-5b04-4999-ae85-a12fc3955f30", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:52 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "36be3654-101e-001d-6b38-599c3e000000", + "Date" : "Mon, 13 Jul 2020 17:10:09 GMT", + "x-ms-client-request-id" : "d526ae79-0c97-46b0-aab7-6f54e7848de2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2418505572a0a1/javablobuploadpageac1pageblobapitestuploadpageac24165594035?comp=lease", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4c09ba3-f71c-44fa-a171-f256ee9ec759" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F9981994F", + "x-ms-lease-id" : "dc7188d7-0d5e-4c56-b010-4816754de7b8", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:10 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186c7a-301e-00f9-06f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "e82078df-e5b5-41ff-965f-942433fbaac8" + "x-ms-request-id" : "1969bdbb-201e-005b-4938-59a8b9000000", + "Date" : "Mon, 13 Jul 2020 17:10:11 GMT", + "x-ms-client-request-id" : "a4c09ba3-f71c-44fa-a171-f256ee9ec759" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2fb00549852f72/javablobuploadpageac1pageblobapitestuploadpageac2fb100495b4?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2418505572a0a1/javablobuploadpageac1pageblobapitestuploadpageac24165594035?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ecb80060-6938-4ac7-8066-92e4486d5bf5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6aaad579-4e42-406f-921e-98f829fe8636", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "7E0sq3HFA8w=", + "x-ms-content-crc64" : "fBib9ddvmUY=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:52 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "ETag" : "0x8D7E10EC9DBA6DC", + "Date" : "Mon, 13 Jul 2020 17:10:10 GMT", + "ETag" : "0x8D8274F9A212AB9", "Content-Length" : "0", - "x-ms-request-id" : "6b186c8b-301e-00f9-15f7-12fa96000000", - "x-ms-client-request-id" : "ecb80060-6938-4ac7-8066-92e4486d5bf5" + "x-ms-request-id" : "2e377a78-101e-000d-0e38-595956000000", + "x-ms-client-request-id" : "6aaad579-4e42-406f-921e-98f829fe8636" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3dfa53ac-5731-4fc6-9f74-35b98901bb27" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb28bc76-e16c-4d2e-9922-2d53874ae280" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186c98-301e-00f9-20f7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac2fb00549852f72Wed, 15 Apr 2020 07:29:52 GMT\"0x8D7E10EC9C15380\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "3dfa53ac-5731-4fc6-9f74-35b98901bb27", + "x-ms-request-id" : "a1b1bea0-801e-000f-7038-59e7ee000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac2418505572a0a1Mon, 13 Jul 2020 17:10:10 GMT\"0x8D8274F994AAB9E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:11 GMT", + "x-ms-client-request-id" : "eb28bc76-e16c-4d2e-9922-2d53874ae280", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2fb00549852f72?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac2418505572a0a1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e2a6e53e-735d-4ab4-aa2c-66e8a62aa282" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c80d120-6006-46b9-b998-c2999e2421c4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186caa-301e-00f9-2ef7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:52 GMT", - "x-ms-client-request-id" : "e2a6e53e-735d-4ab4-aa2c-66e8a62aa282" + "x-ms-request-id" : "059558be-201e-0039-3138-596a9e000000", + "Date" : "Mon, 13 Jul 2020 17:10:12 GMT", + "x-ms-client-request-id" : "2c80d120-6006-46b9-b998-c2999e2421c4" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac2fb00549852f72", "javablobuploadpageac1pageblobapitestuploadpageac2fb100495b4", "3f8b2cd6-a7e4-480e-b425-2bc215832e99" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac2418505572a0a1", "javablobuploadpageac1pageblobapitestuploadpageac24165594035", "62397b37-5ca9-4242-a2b0-b6d18c3b407f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[6].json index ba3305eb94d9..55472cb02f53 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[6].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac66241345e16e75?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac87022016b2eb37?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "402204d3-ae65-43dd-9ebe-48cde025c7b9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "faded112-40db-48e4-a41d-9129cbf8a995" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10EC9FE6B7A", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "ETag" : "0x8D8274F9AC5AA02", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:12 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186cb6-301e-00f9-38f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "402204d3-ae65-43dd-9ebe-48cde025c7b9" + "x-ms-request-id" : "96075254-901e-0013-5038-59b58e000000", + "Date" : "Mon, 13 Jul 2020 17:10:12 GMT", + "x-ms-client-request-id" : "faded112-40db-48e4-a41d-9129cbf8a995" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac66241345e16e75/javablobuploadpageac1pageblobapitestuploadpageac66274123ddd", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac87022016b2eb37/javablobuploadpageac1pageblobapitestuploadpageac87096507f3f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b78de785-eee7-4184-8800-e8b54cd1bbc2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "68c47a4b-4bd0-4706-88b1-75afa84e6595" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA057FF8", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "ETag" : "0x8D8274F9B08A7A8", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:12 GMT", + "x-ms-version-id" : "2020-07-13T17:10:12.9860520Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186cc6-301e-00f9-43f7-12fa96000000", + "x-ms-request-id" : "825321bb-001e-003e-1038-5906fd000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "b78de785-eee7-4184-8800-e8b54cd1bbc2" + "Date" : "Mon, 13 Jul 2020 17:10:12 GMT", + "x-ms-client-request-id" : "68c47a4b-4bd0-4706-88b1-75afa84e6595" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac66241345e16e75/javablobuploadpageac1pageblobapitestuploadpageac66274123ddd?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac87022016b2eb37/javablobuploadpageac1pageblobapitestuploadpageac87096507f3f?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "181bec77-0d8b-4145-a589-d73b5e4624df", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6cc23c2e-d3c3-419c-a262-2bada6c17fec", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "f7faca6a-301e-0068-5438-59f712000000", + "Date" : "Mon, 13 Jul 2020 17:10:13 GMT", + "x-ms-client-request-id" : "6cc23c2e-d3c3-419c-a262-2bada6c17fec" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac87022016b2eb37/javablobuploadpageac1pageblobapitestuploadpageac87096507f3f?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "84dd2332-c6bb-433d-a17c-398aee6eab13", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "XLqhp+75flI=", + "x-ms-content-crc64" : "R61HWTu3m/s=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:13 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "ETag" : "0x8D7E10ECA0ED105", + "Date" : "Mon, 13 Jul 2020 17:10:12 GMT", + "ETag" : "0x8D8274F9B707D24", "Content-Length" : "0", - "x-ms-request-id" : "6b186cd3-301e-00f9-50f7-12fa96000000", - "x-ms-client-request-id" : "181bec77-0d8b-4145-a589-d73b5e4624df" + "x-ms-request-id" : "eb2eb6f5-b01e-0092-5138-591554000000", + "x-ms-client-request-id" : "84dd2332-c6bb-433d-a17c-398aee6eab13" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "07465e80-113a-4597-ab36-01eb63939e77" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b432d172-a992-4d12-86dc-a93c5b2374b4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186cde-301e-00f9-5af7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac66241345e16e75Wed, 15 Apr 2020 07:29:53 GMT\"0x8D7E10EC9FE6B7A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "07465e80-113a-4597-ab36-01eb63939e77", + "x-ms-request-id" : "f8929a76-e01e-0009-2d38-59d451000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac87022016b2eb37Mon, 13 Jul 2020 17:10:12 GMT\"0x8D8274F9AC5AA02\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:14 GMT", + "x-ms-client-request-id" : "b432d172-a992-4d12-86dc-a93c5b2374b4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac66241345e16e75?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac87022016b2eb37?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "43e279fe-42b1-45c0-a78a-0a342bc3ed01" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fc22f7ff-1b1e-4562-9750-a8746d6bcf7b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186ce6-301e-00f9-61f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "43e279fe-42b1-45c0-a78a-0a342bc3ed01" + "x-ms-request-id" : "6410e895-301e-0047-3238-59fad9000000", + "Date" : "Mon, 13 Jul 2020 17:10:14 GMT", + "x-ms-client-request-id" : "fc22f7ff-1b1e-4562-9750-a8746d6bcf7b" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac66241345e16e75", "javablobuploadpageac1pageblobapitestuploadpageac66274123ddd", "d76bee62-7788-476f-bc32-cf9e5a49d206" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac87022016b2eb37", "javablobuploadpageac1pageblobapitestuploadpageac87096507f3f", "24463466-0d8f-4920-adc6-49e33cf7bf15" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[7].json index 618e8d7f5204..c01ce3bccf2e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[7].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[7].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac358589095b99c9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac67c44143f925d4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7d743e1a-3053-4496-b2e2-9df39a90e2ca" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d371d93d-6a77-40f5-82fa-9c77af1e5c1a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA25D344", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "ETag" : "0x8D8274F9C19F24A", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186cfb-301e-00f9-6ff7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "7d743e1a-3053-4496-b2e2-9df39a90e2ca" + "x-ms-request-id" : "2b5d13a6-401e-005d-1138-599b06000000", + "Date" : "Mon, 13 Jul 2020 17:10:14 GMT", + "x-ms-client-request-id" : "d371d93d-6a77-40f5-82fa-9c77af1e5c1a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac358589095b99c9/javablobuploadpageac1pageblobapitestuploadpageac35832512152", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac67c44143f925d4/javablobuploadpageac1pageblobapitestuploadpageac67c145365f5", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "69ac6224-f19f-4789-abde-98647d35168e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c075a32d-c769-45e5-9a45-4d3811285cce" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA2CE788", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "ETag" : "0x8D8274F9C57FA13", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:15 GMT", + "x-ms-version-id" : "2020-07-13T17:10:15.1836179Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186d0a-301e-00f9-79f7-12fa96000000", + "x-ms-request-id" : "8dd9352a-e01e-00a0-6038-591523000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "69ac6224-f19f-4789-abde-98647d35168e" + "Date" : "Mon, 13 Jul 2020 17:10:14 GMT", + "x-ms-client-request-id" : "c075a32d-c769-45e5-9a45-4d3811285cce" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac358589095b99c9/javablobuploadpageac1pageblobapitestuploadpageac35832512152?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac67c44143f925d4/javablobuploadpageac1pageblobapitestuploadpageac67c145365f5?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1e94e6a0-a4c3-45fd-a375-721a060e3c26", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd0d5507-5bf2-478d-b844-b8235b9d8520", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "9abcd817-801e-0089-5938-592b57000000", + "Date" : "Mon, 13 Jul 2020 17:10:14 GMT", + "x-ms-client-request-id" : "bd0d5507-5bf2-478d-b844-b8235b9d8520" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac67c44143f925d4/javablobuploadpageac1pageblobapitestuploadpageac67c145365f5?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3312b401-76a4-4c56-8ffe-b5781d427915", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "7GmGBB8bFxI=", + "x-ms-content-crc64" : "VirZ3VHWulA=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:15 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "ETag" : "0x8D7E10ECA34152D", + "Date" : "Mon, 13 Jul 2020 17:10:15 GMT", + "ETag" : "0x8D8274F9CCC06B7", "Content-Length" : "0", - "x-ms-request-id" : "6b186d14-301e-00f9-02f7-12fa96000000", - "x-ms-client-request-id" : "1e94e6a0-a4c3-45fd-a375-721a060e3c26" + "x-ms-request-id" : "aa71fd9f-301e-0078-5138-59327a000000", + "x-ms-client-request-id" : "3312b401-76a4-4c56-8ffe-b5781d427915" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b0fef6e0-f464-47c7-b64b-7d82ef5c9a40" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "14de5454-634a-439d-9a94-9a7233d7979b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186d27-301e-00f9-12f7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac358589095b99c9Wed, 15 Apr 2020 07:29:53 GMT\"0x8D7E10ECA25D344\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "b0fef6e0-f464-47c7-b64b-7d82ef5c9a40", + "x-ms-request-id" : "156fb5c3-b01e-0066-3d38-59dea2000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac67c44143f925d4Mon, 13 Jul 2020 17:10:14 GMT\"0x8D8274F9C19F24A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:16 GMT", + "x-ms-client-request-id" : "14de5454-634a-439d-9a94-9a7233d7979b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac358589095b99c9?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac67c44143f925d4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d726f199-7d41-4962-b417-35c8bdeb60d9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d7638601-e790-4227-9bf6-620cd5a1cf6e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186d3f-301e-00f9-23f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "d726f199-7d41-4962-b417-35c8bdeb60d9" + "x-ms-request-id" : "6059359a-b01e-0004-6d38-591c85000000", + "Date" : "Mon, 13 Jul 2020 17:10:16 GMT", + "x-ms-client-request-id" : "d7638601-e790-4227-9bf6-620cd5a1cf6e" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac358589095b99c9", "javablobuploadpageac1pageblobapitestuploadpageac35832512152", "7a1b185f-fa34-42cb-b4eb-01bbfd1a6021" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac67c44143f925d4", "javablobuploadpageac1pageblobapitestuploadpageac67c145365f5", "64ca300d-6880-4f4c-8cc2-bdf08d541c42" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[8].json index 69170c228c02..9cdc94bc577a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[8].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[8].json @@ -1,113 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac844642201827fc?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacb88305775b60eb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9e06a1ff-12d9-4b3e-8b2f-a5c5e32122ff" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f9bccb6-ba48-4f76-9092-81e8b1c6b652" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA4C2962", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "ETag" : "0x8D8274F9D7033E6", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:17 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186d47-301e-00f9-2af7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "9e06a1ff-12d9-4b3e-8b2f-a5c5e32122ff" + "x-ms-request-id" : "94d0d6ee-a01e-006a-1938-5949aa000000", + "Date" : "Mon, 13 Jul 2020 17:10:16 GMT", + "x-ms-client-request-id" : "9f9bccb6-ba48-4f76-9092-81e8b1c6b652" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac844642201827fc/javablobuploadpageac1pageblobapitestuploadpageac84484349dae", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacb88305775b60eb/javablobuploadpageac1pageblobapitestuploadpageacb8815952460", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e8468de5-178d-4a30-889e-fc18fbbd5880" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb358848-90a6-4938-9a17-ed2780c0557c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA53164D", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "ETag" : "0x8D8274F9DA5C589", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:17 GMT", + "x-ms-version-id" : "2020-07-13T17:10:17.3711753Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186d4e-301e-00f9-30f7-12fa96000000", + "x-ms-request-id" : "db6a5457-801e-006d-4638-5925c9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "e8468de5-178d-4a30-889e-fc18fbbd5880" + "Date" : "Mon, 13 Jul 2020 17:10:16 GMT", + "x-ms-client-request-id" : "fb358848-90a6-4938-9a17-ed2780c0557c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac844642201827fc/javablobuploadpageac1pageblobapitestuploadpageac84484349dae?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacb88305775b60eb/javablobuploadpageac1pageblobapitestuploadpageacb8815952460?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "02c17a22-6790-4f28-a8bd-218fd5f9746c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c916e66d-3104-4b7b-822b-ad75acb84690", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "35b9461e-f01e-0083-2738-598fe0000000", + "Date" : "Mon, 13 Jul 2020 17:10:17 GMT", + "x-ms-client-request-id" : "c916e66d-3104-4b7b-822b-ad75acb84690" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacb88305775b60eb/javablobuploadpageac1pageblobapitestuploadpageacb8815952460?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "582194d6-1fa9-412c-b9fe-bd6ec0e02750", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "VmfGrC+kFLk=", + "x-ms-content-crc64" : "nhrB/tMxuQE=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:18 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "ETag" : "0x8D7E10ECA5A6B05", + "Date" : "Mon, 13 Jul 2020 17:10:17 GMT", + "ETag" : "0x8D8274F9E10CFE4", "Content-Length" : "0", - "x-ms-request-id" : "6b186d56-301e-00f9-36f7-12fa96000000", - "x-ms-client-request-id" : "02c17a22-6790-4f28-a8bd-218fd5f9746c" + "x-ms-request-id" : "b046f27d-501e-009a-4a38-590f5b000000", + "x-ms-client-request-id" : "582194d6-1fa9-412c-b9fe-bd6ec0e02750" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bb0f01bc-5bc9-4114-b22c-e9139ad218f7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4dc7b0d-c135-4d95-b9cc-635dc7110845" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186d61-301e-00f9-3ef7-12fa96000000", - "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageac844642201827fcWed, 15 Apr 2020 07:29:53 GMT\"0x8D7E10ECA4C2962\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "bb0f01bc-5bc9-4114-b22c-e9139ad218f7", + "x-ms-request-id" : "b373d3d7-701e-00a2-3138-59ab9b000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageacb88305775b60ebMon, 13 Jul 2020 17:10:17 GMT\"0x8D8274F9D7033E6\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:18 GMT", + "x-ms-client-request-id" : "c4dc7b0d-c135-4d95-b9cc-635dc7110845", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageac844642201827fc?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageacb88305775b60eb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2d52fbab-9a51-4087-b6eb-68f4f22c518b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "839b5cc0-9f2b-4adf-a59c-b14930c17eff" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186d65-301e-00f9-42f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "2d52fbab-9a51-4087-b6eb-68f4f22c518b" + "x-ms-request-id" : "5d8a4937-701e-009d-6338-596338000000", + "Date" : "Mon, 13 Jul 2020 17:10:17 GMT", + "x-ms-client-request-id" : "839b5cc0-9f2b-4adf-a59c-b14930c17eff" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageac844642201827fc", "javablobuploadpageac1pageblobapitestuploadpageac84484349dae", "13f9d798-d91a-4158-b02b-eca3466009cd" ] + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageacb88305775b60eb", "javablobuploadpageac1pageblobapitestuploadpageacb8815952460", "72a5b0b8-a7a3-4665-a5fb-d4769279c673" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[9].json new file mode 100644 index 000000000000..70d30b93c1e5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageac[9].json @@ -0,0 +1,132 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageaca2b2961783149f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e54f47c3-6762-4727-aee1-7638249c3ac8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F9EAD7A92", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:19 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a68a4af5-701e-000b-1838-596ae9000000", + "Date" : "Mon, 13 Jul 2020 17:10:18 GMT", + "x-ms-client-request-id" : "e54f47c3-6762-4727-aee1-7638249c3ac8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageaca2b2961783149f/javablobuploadpageac1pageblobapitestuploadpageaca2b92786840", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5fb2fe9-249b-46ed-ad50-550a5d3a844b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274F9EE759C5", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:19 GMT", + "x-ms-version-id" : "2020-07-13T17:10:19.4786757Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "be651f49-c01e-000e-1638-59b832000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:10:19 GMT", + "x-ms-client-request-id" : "e5fb2fe9-249b-46ed-ad50-550a5d3a844b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageaca2b2961783149f/javablobuploadpageac1pageblobapitestuploadpageaca2b92786840?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "500b2739-2113-40b3-947d-5aadf6f606f8", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "8ee0f123-301e-00a3-7e38-59f447000000", + "Date" : "Mon, 13 Jul 2020 17:10:19 GMT", + "x-ms-client-request-id" : "500b2739-2113-40b3-947d-5aadf6f606f8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageaca2b2961783149f/javablobuploadpageac1pageblobapitestuploadpageaca2b92786840?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ee45680-c2f7-42da-ac59-b5f8622a5493", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "pcnlacDxGLw=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:20 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:10:19 GMT", + "ETag" : "0x8D8274F9F5A54CE", + "Content-Length" : "0", + "x-ms-request-id" : "f121c2c6-f01e-003a-1738-598bfa000000", + "x-ms-client-request-id" : "3ee45680-c2f7-42da-ac59-b5f8622a5493" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9f1660f3-d9a8-4f92-b836-6a7b3c365b1b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "77e1d7e5-201e-0064-6938-59601a000000", + "Body" : "jtcuploadpageacjtcuploadpageac0pageblobapitestuploadpageaca2b2961783149fMon, 13 Jul 2020 17:10:19 GMT\"0x8D8274F9EAD7A92\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:20 GMT", + "x-ms-client-request-id" : "9f1660f3-d9a8-4f92-b836-6a7b3c365b1b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageac0pageblobapitestuploadpageaca2b2961783149f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87428813-5f6b-483e-82ce-6441d6a154d3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "56b37573-f01e-002a-6f38-594e92000000", + "Date" : "Mon, 13 Jul 2020 17:10:20 GMT", + "x-ms-client-request-id" : "87428813-5f6b-483e-82ce-6441d6a154d3" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadpageac0pageblobapitestuploadpageaca2b2961783149f", "javablobuploadpageac1pageblobapitestuploadpageaca2b92786840", "bbd88de8-35f1-45a1-85de-6e927e755424" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[0].json index 7844430eddad..4f027ad1f823 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[0].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild7f7266624?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailab3327124d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2427c4d8-2858-456f-882f-948649e5afad" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ea24a6f-66ef-4f1d-b5d0-c8f3746c5c5e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA6EFC3E", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "ETag" : "0x8D8274FAE296B6B", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186d6b-301e-00f9-47f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "2427c4d8-2858-456f-882f-948649e5afad" + "x-ms-request-id" : "78292b0d-801e-0020-3d38-59ea25000000", + "Date" : "Mon, 13 Jul 2020 17:10:44 GMT", + "x-ms-client-request-id" : "8ea24a6f-66ef-4f1d-b5d0-c8f3746c5c5e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild7f7266624/javablobuploadpageacfail13237459ceb9e124da4d4f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailab3327124d/javablobuploadpageacfail123336cd27e07a38c045b5", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c1c55e83-1c8d-40a1-826c-676a93801e66" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "36ee7635-8892-4c84-aa38-e3551af19ae0" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA75E8E5", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:53 GMT", + "ETag" : "0x8D8274FAE86C775", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:45 GMT", + "x-ms-version-id" : "2020-07-13T17:10:45.6893301Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186d7a-301e-00f9-4ef7-12fa96000000", + "x-ms-request-id" : "08aef414-901e-005e-7e38-597a62000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "c1c55e83-1c8d-40a1-826c-676a93801e66" + "Date" : "Mon, 13 Jul 2020 17:10:45 GMT", + "x-ms-client-request-id" : "36ee7635-8892-4c84-aa38-e3551af19ae0" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild7f7266624/javablobuploadpageacfail13237459ceb9e124da4d4f?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailab3327124d/javablobuploadpageacfail123336cd27e07a38c045b5?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "462d435c-6310-4f47-9c6a-59a435ca6306", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "da242386-bec9-440a-8220-178fe3329345", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6b186d87-301e-00f9-5af7-12fa96000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b186d87-301e-00f9-5af7-12fa96000000\nTime:2020-04-15T07:29:53.9258361Z", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "462d435c-6310-4f47-9c6a-59a435ca6306", + "x-ms-request-id" : "6edec58f-301e-009c-0e38-593ce4000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6edec58f-301e-009c-0e38-593ce4000000\nTime:2020-07-13T17:10:46.2194405Z", + "Date" : "Mon, 13 Jul 2020 17:10:45 GMT", + "x-ms-client-request-id" : "da242386-bec9-440a-8220-178fe3329345", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5ae8fdb6-fc54-4e04-b779-eedfbe61b76c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "21d6e044-2bcc-4482-9f84-764fe58caac8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186d91-301e-00f9-63f7-12fa96000000", - "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfaild7f7266624Wed, 15 Apr 2020 07:29:53 GMT\"0x8D7E10ECA6EFC3E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "5ae8fdb6-fc54-4e04-b779-eedfbe61b76c", + "x-ms-request-id" : "af265560-b01e-0076-7938-591bca000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfailab3327124dMon, 13 Jul 2020 17:10:45 GMT\"0x8D8274FAE296B6B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:46 GMT", + "x-ms-client-request-id" : "21d6e044-2bcc-4482-9f84-764fe58caac8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild7f7266624?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailab3327124d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "74fd4ba1-82dd-4d11-bef9-8aa6ae3622c7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d0637bd5-214e-4208-88a8-cae70a6a7642" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186d9e-301e-00f9-6bf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:53 GMT", - "x-ms-client-request-id" : "74fd4ba1-82dd-4d11-bef9-8aa6ae3622c7" + "x-ms-request-id" : "c5932dfc-d01e-003d-2438-59e799000000", + "Date" : "Mon, 13 Jul 2020 17:10:46 GMT", + "x-ms-client-request-id" : "d0637bd5-214e-4208-88a8-cae70a6a7642" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfaild7f7266624", "javablobuploadpageacfail13237459ceb9e124da4d4f", "0ea58ff9-e7fa-4af8-aa81-508583bd893a" ] + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfailab3327124d", "javablobuploadpageacfail123336cd27e07a38c045b5", "b535645a-d5f5-453c-b89b-2660f5792689" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[1].json index 4ff73cc82087..a3ec19342766 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[1].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail85216669fb?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailcd262070a8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e1d5098d-e5ef-42aa-a524-e2be881a620f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0545a65e-03ef-4d91-bf52-ad0689056b83" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA935603", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:54 GMT", + "ETag" : "0x8D8274FAFAE9EF0", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186da9-301e-00f9-74f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "e1d5098d-e5ef-42aa-a524-e2be881a620f" + "x-ms-request-id" : "4b95fa60-f01e-0067-2938-59817e000000", + "Date" : "Mon, 13 Jul 2020 17:10:46 GMT", + "x-ms-client-request-id" : "0545a65e-03ef-4d91-bf52-ad0689056b83" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail85216669fb/javablobuploadpageacfail184911dd9359143ca448ef", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailcd262070a8/javablobuploadpageacfail19045924da04ee63694abb", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c08af629-4af6-4c85-99cd-f8be1450662d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2a61f639-0da8-44fc-992e-19e92aebb18a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECA9FC1FC", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:54 GMT", + "ETag" : "0x8D8274FAFEED679", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:48 GMT", + "x-ms-version-id" : "2020-07-13T17:10:48.0490105Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186dc8-301e-00f9-0df7-12fa96000000", + "x-ms-request-id" : "1f0233ea-801e-007d-5b38-59e0a1000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "c08af629-4af6-4c85-99cd-f8be1450662d" + "Date" : "Mon, 13 Jul 2020 17:10:47 GMT", + "x-ms-client-request-id" : "2a61f639-0da8-44fc-992e-19e92aebb18a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail85216669fb/javablobuploadpageacfail184911dd9359143ca448ef?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailcd262070a8/javablobuploadpageacfail19045924da04ee63694abb?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "492babf6-9f07-49a8-965b-af73b65a943b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87167184-6795-43d1-a401-31edef63c660", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6b186dd3-301e-00f9-18f7-12fa96000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b186dd3-301e-00f9-18f7-12fa96000000\nTime:2020-04-15T07:29:54.2031029Z", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "492babf6-9f07-49a8-965b-af73b65a943b", + "x-ms-request-id" : "477446c2-201e-0080-4a38-596e84000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:477446c2-201e-0080-4a38-596e84000000\nTime:2020-07-13T17:10:48.4829940Z", + "Date" : "Mon, 13 Jul 2020 17:10:48 GMT", + "x-ms-client-request-id" : "87167184-6795-43d1-a401-31edef63c660", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5dd36e9e-afdf-4dd7-814b-01b6e946bd6d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b02e223-763b-4f3f-ad60-6263f154a98c" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186de0-301e-00f9-23f7-12fa96000000", - "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail85216669fbWed, 15 Apr 2020 07:29:54 GMT\"0x8D7E10ECA935603\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "5dd36e9e-afdf-4dd7-814b-01b6e946bd6d", + "x-ms-request-id" : "e0d46857-701e-0046-5c38-59a505000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfailcd262070a8Mon, 13 Jul 2020 17:10:47 GMT\"0x8D8274FAFAE9EF0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:48 GMT", + "x-ms-client-request-id" : "9b02e223-763b-4f3f-ad60-6263f154a98c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail85216669fb?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailcd262070a8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "52ff1597-0017-4fb9-b6ab-e58a45d64883" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4aba7aa7-c378-4e42-85e3-a13fadcab182" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186ded-301e-00f9-30f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "52ff1597-0017-4fb9-b6ab-e58a45d64883" + "x-ms-request-id" : "4aeb3a42-701e-0034-5538-59a24a000000", + "Date" : "Mon, 13 Jul 2020 17:10:48 GMT", + "x-ms-client-request-id" : "4aba7aa7-c378-4e42-85e3-a13fadcab182" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail85216669fb", "javablobuploadpageacfail184911dd9359143ca448ef", "47c41b5a-d769-4c3d-869b-91f9cac920c8" ] + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfailcd262070a8", "javablobuploadpageacfail19045924da04ee63694abb", "e9a55a8e-0feb-4402-8387-7ac5f12ec4a6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[2].json index 90868cb9b7df..126630ac273e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[2].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail300342596e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7d52618051?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27014138-6be0-4265-bd92-45256ddd73b6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ac6093e-7bb7-49b2-9dcd-f72f4de1cfe6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECABD7DA3", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:54 GMT", + "ETag" : "0x8D8274FB0DF7100", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186e03-301e-00f9-43f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "27014138-6be0-4265-bd92-45256ddd73b6" + "x-ms-request-id" : "79cb0709-001e-0087-4238-5902e7000000", + "Date" : "Mon, 13 Jul 2020 17:10:49 GMT", + "x-ms-client-request-id" : "3ac6093e-7bb7-49b2-9dcd-f72f4de1cfe6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail300342596e/javablobuploadpageacfail198749ae7bf75164d6467a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7d52618051/javablobuploadpageacfail1857296a174aa26de742f4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a936bac5-55ce-4f5d-bff1-f33673a9a2c9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "98e280bf-062e-4aa7-a674-676cf3dde0a3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECAC469BB", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:54 GMT", + "ETag" : "0x8D8274FB11207B9", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:49 GMT", + "x-ms-version-id" : "2020-07-13T17:10:49.9573689Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186e0f-301e-00f9-4ef7-12fa96000000", + "x-ms-request-id" : "e6def8cd-201e-0074-6438-59a572000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "a936bac5-55ce-4f5d-bff1-f33673a9a2c9" + "Date" : "Mon, 13 Jul 2020 17:10:49 GMT", + "x-ms-client-request-id" : "98e280bf-062e-4aa7-a674-676cf3dde0a3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail300342596e/javablobuploadpageacfail198749ae7bf75164d6467a?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7d52618051/javablobuploadpageacfail1857296a174aa26de742f4?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "29466529-78fe-40e7-9806-a7cd9df08b30", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ac5fb38-e676-46ad-b507-d24f2a29047c", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6b186e18-301e-00f9-57f7-12fa96000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b186e18-301e-00f9-57f7-12fa96000000\nTime:2020-04-15T07:29:54.4333243Z", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "29466529-78fe-40e7-9806-a7cd9df08b30", + "x-ms-request-id" : "7331fdc2-401e-0062-4e38-5953a5000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:7331fdc2-401e-0062-4e38-5953a5000000\nTime:2020-07-13T17:10:50.2976855Z", + "Date" : "Mon, 13 Jul 2020 17:10:50 GMT", + "x-ms-client-request-id" : "5ac5fb38-e676-46ad-b507-d24f2a29047c", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1e2bfa3b-1338-4176-9f21-bb0f7eb18573" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "36a7bf27-ca66-4499-aa26-24f4091c6ee5" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186e25-301e-00f9-61f7-12fa96000000", - "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail300342596eWed, 15 Apr 2020 07:29:54 GMT\"0x8D7E10ECABD7DA3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "1e2bfa3b-1338-4176-9f21-bb0f7eb18573", + "x-ms-request-id" : "a075d30f-501e-0041-2e38-59c966000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail7d52618051Mon, 13 Jul 2020 17:10:49 GMT\"0x8D8274FB0DF7100\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:49 GMT", + "x-ms-client-request-id" : "36a7bf27-ca66-4499-aa26-24f4091c6ee5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail300342596e?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7d52618051?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1dd782f5-4875-4332-af21-27d9d949e920" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc25a3e3-839e-4cb1-a94c-7120b7ff584d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186e3b-301e-00f9-72f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "1dd782f5-4875-4332-af21-27d9d949e920" + "x-ms-request-id" : "7df63a90-a01e-0045-3b38-594461000000", + "Date" : "Mon, 13 Jul 2020 17:10:50 GMT", + "x-ms-client-request-id" : "bc25a3e3-839e-4cb1-a94c-7120b7ff584d" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail300342596e", "javablobuploadpageacfail198749ae7bf75164d6467a", "e036a281-1495-41b6-a299-8919fa096344" ] + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail7d52618051", "javablobuploadpageacfail1857296a174aa26de742f4", "85ef758d-14eb-43d3-af53-91b7d07b642e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[3].json index 9f0fe82b2cfe..dac26e6d3e85 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[3].json @@ -1,97 +1,99 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7ae985440c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail75876424f9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1ddbe8f3-879e-459f-b0a4-292f06c97389" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "44f7b68a-0714-4f1c-8484-10190f9a99bb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECAE4E56D", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:54 GMT", + "ETag" : "0x8D8274FB1F3D104", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:51 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186e52-301e-00f9-06f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "1ddbe8f3-879e-459f-b0a4-292f06c97389" + "x-ms-request-id" : "ebd843a6-f01e-0048-3b38-598cb5000000", + "Date" : "Mon, 13 Jul 2020 17:10:51 GMT", + "x-ms-client-request-id" : "44f7b68a-0714-4f1c-8484-10190f9a99bb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7ae985440c/javablobuploadpageacfail164003220d7cd0e06541cf", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail75876424f9/javablobuploadpageacfail155109b1b6fd0c9e4b4997", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "60d8c754-8280-499f-b090-a6ae097eaf49" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "252be842-876c-4834-a740-4573d4cfbee8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECAEBAA34", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:54 GMT", + "ETag" : "0x8D8274FB2299E29", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:51 GMT", + "x-ms-version-id" : "2020-07-13T17:10:51.7896745Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186e66-301e-00f9-16f7-12fa96000000", + "x-ms-request-id" : "d0b1ac5f-101e-0022-4638-59549d000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "60d8c754-8280-499f-b090-a6ae097eaf49" + "Date" : "Mon, 13 Jul 2020 17:10:51 GMT", + "x-ms-client-request-id" : "252be842-876c-4834-a740-4573d4cfbee8" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7ae985440c/javablobuploadpageacfail164003220d7cd0e06541cf", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail75876424f9/javablobuploadpageacfail155109b1b6fd0c9e4b4997", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "49c3a925-5ee0-4155-b78d-1a22da58ec64" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "979c0bf2-5706-4e17-9399-2fe6c50afc16" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:54 GMT", + "x-ms-version-id" : "2020-07-13T17:10:51.7896745Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:51 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", + "Date" : "Mon, 13 Jul 2020 17:10:52 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10ECAEBAA34", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:29:54 GMT", + "ETag" : "0x8D8274FB2299E29", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:10:51 GMT", "Content-Length" : "512", - "x-ms-request-id" : "6b186e76-301e-00f9-21f7-12fa96000000", - "x-ms-client-request-id" : "49c3a925-5ee0-4155-b78d-1a22da58ec64", + "x-ms-request-id" : "5df0dfe4-501e-00a5-1438-59c7f8000000", + "x-ms-client-request-id" : "979c0bf2-5706-4e17-9399-2fe6c50afc16", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7ae985440c/javablobuploadpageacfail164003220d7cd0e06541cf?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail75876424f9/javablobuploadpageacfail155109b1b6fd0c9e4b4997?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "93b6c676-4f36-4bcb-bd46-e6e01f755428", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8bf2ec36-cb15-4c8d-a243-79966d85b276", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "252", "StatusCode" : "412", - "x-ms-request-id" : "6b186ea3-301e-00f9-46f7-12fa96000000", - "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b186ea3-301e-00f9-46f7-12fa96000000\nTime:2020-04-15T07:29:54.8757485Z", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "93b6c676-4f36-4bcb-bd46-e6e01f755428", + "x-ms-request-id" : "089d1cb0-d01e-0012-7b38-59ea52000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:089d1cb0-d01e-0012-7b38-59ea52000000\nTime:2020-07-13T17:10:52.7776501Z", + "Date" : "Mon, 13 Jul 2020 17:10:52 GMT", + "x-ms-client-request-id" : "8bf2ec36-cb15-4c8d-a243-79966d85b276", "Content-Type" : "application/xml" }, "Exception" : null @@ -99,43 +101,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83c8e0d7-7791-4213-8c47-b21139a46666" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e39c57ea-cb75-4736-b36b-6799aa17f356" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186ebb-301e-00f9-57f7-12fa96000000", - "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail7ae985440cWed, 15 Apr 2020 07:29:54 GMT\"0x8D7E10ECAE4E56D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "83c8e0d7-7791-4213-8c47-b21139a46666", + "x-ms-request-id" : "ab3f2ccc-b01e-0014-7338-59d9ed000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail75876424f9Mon, 13 Jul 2020 17:10:51 GMT\"0x8D8274FB1F3D104\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:52 GMT", + "x-ms-client-request-id" : "e39c57ea-cb75-4736-b36b-6799aa17f356", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail7ae985440c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail75876424f9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2a7d0720-e42c-4550-972d-ae19c7960b4f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ffdd9408-e3c3-4fb4-b7b2-89cf861eb417" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186ecd-301e-00f9-65f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:54 GMT", - "x-ms-client-request-id" : "2a7d0720-e42c-4550-972d-ae19c7960b4f" + "x-ms-request-id" : "e542d0b7-d01e-002d-1438-5922f1000000", + "Date" : "Mon, 13 Jul 2020 17:10:53 GMT", + "x-ms-client-request-id" : "ffdd9408-e3c3-4fb4-b7b2-89cf861eb417" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail7ae985440c", "javablobuploadpageacfail164003220d7cd0e06541cf", "71e3706c-c085-4192-9be0-f358c9d4c50e" ] + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail75876424f9", "javablobuploadpageacfail155109b1b6fd0c9e4b4997", "86b6cc23-5899-4b38-b059-721261cd9b00" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[4].json index ed3bef380700..462114ab1372 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[4].json @@ -1,89 +1,90 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail98259615f3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild3392488a1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6d86b795-6b73-464f-a74b-bf5f678d23a0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "172657f5-d921-48cf-93e2-5191f9c500fc" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECB2580BB", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:55 GMT", + "ETag" : "0x8D8274FB36BD79E", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:53 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186ee2-301e-00f9-75f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "6d86b795-6b73-464f-a74b-bf5f678d23a0" + "x-ms-request-id" : "40e2bbd7-e01e-0026-1838-59d99a000000", + "Date" : "Mon, 13 Jul 2020 17:10:53 GMT", + "x-ms-client-request-id" : "172657f5-d921-48cf-93e2-5191f9c500fc" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail98259615f3/javablobuploadpageacfail193856642c3614d5f0476d", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild3392488a1/javablobuploadpageacfail1119649ffea7033fb444e5", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "44e021ca-dd41-4d2f-9711-9510ed4d4050" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "55442fef-8eb9-4e46-8999-8bbfa73604a5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECB516229", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:55 GMT", + "ETag" : "0x8D8274FB3AA1B99", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:54 GMT", + "x-ms-version-id" : "2020-07-13T17:10:54.3094681Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186f52-301e-00f9-4df7-12fa96000000", + "x-ms-request-id" : "fe9e8f17-601e-0028-1d38-59f02a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "44e021ca-dd41-4d2f-9711-9510ed4d4050" + "Date" : "Mon, 13 Jul 2020 17:10:53 GMT", + "x-ms-client-request-id" : "55442fef-8eb9-4e46-8999-8bbfa73604a5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail98259615f3/javablobuploadpageacfail193856642c3614d5f0476d?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild3392488a1/javablobuploadpageacfail1119649ffea7033fb444e5?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4defe838-63c8-4601-bd1b-9a916dd37efc" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ae9f6ed9-2234-4ad4-b995-02633501255b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECB516229", - "x-ms-lease-id" : "83cd5a3e-b738-4793-a5d3-4050182eec78", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:55 GMT", + "ETag" : "0x8D8274FB3AA1B99", + "x-ms-lease-id" : "c8550aea-272e-4b9d-9ea4-d6a9851ea20c", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:54 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186f63-301e-00f9-5df7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "4defe838-63c8-4601-bd1b-9a916dd37efc" + "x-ms-request-id" : "9cb57762-901e-0003-0838-5970e6000000", + "Date" : "Mon, 13 Jul 2020 17:10:53 GMT", + "x-ms-client-request-id" : "ae9f6ed9-2234-4ad4-b995-02633501255b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail98259615f3/javablobuploadpageacfail193856642c3614d5f0476d?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild3392488a1/javablobuploadpageacfail1119649ffea7033fb444e5?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7aa508b3-7945-4667-ae97-9862f19d7554", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a87f1bf8-5f21-4224-9dd3-d72e8daa2c2d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseIdMismatchWithBlobOperation", "retry-after" : "0", "Content-Length" : "264", "StatusCode" : "412", - "x-ms-request-id" : "6b186f7b-301e-00f9-6df7-12fa96000000", - "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:6b186f7b-301e-00f9-6df7-12fa96000000\nTime:2020-04-15T07:29:55.4222726Z", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "7aa508b3-7945-4667-ae97-9862f19d7554", + "x-ms-request-id" : "d39670f1-a01e-0055-4338-598109000000", + "Body" : "LeaseIdMismatchWithBlobOperationThe lease ID specified did not match the lease ID for the blob.\nRequestId:d39670f1-a01e-0055-4338-598109000000\nTime:2020-07-13T17:10:55.0251652Z", + "Date" : "Mon, 13 Jul 2020 17:10:54 GMT", + "x-ms-client-request-id" : "a87f1bf8-5f21-4224-9dd3-d72e8daa2c2d", "Content-Type" : "application/xml" }, "Exception" : null @@ -91,43 +92,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f64e8fe2-00a1-4e14-aea4-0ae540dc2c96" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9dd33a69-a9a2-4f7c-85f7-b41446adcb91" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186f89-301e-00f9-7af7-12fa96000000", - "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail98259615f3Wed, 15 Apr 2020 07:29:55 GMT\"0x8D7E10ECB2580BB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "f64e8fe2-00a1-4e14-aea4-0ae540dc2c96", + "x-ms-request-id" : "f843b8fd-601e-0007-5038-59fde1000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfaild3392488a1Mon, 13 Jul 2020 17:10:53 GMT\"0x8D8274FB36BD79E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:55 GMT", + "x-ms-client-request-id" : "9dd33a69-a9a2-4f7c-85f7-b41446adcb91", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail98259615f3?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaild3392488a1?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "58c177fe-9614-4475-a40a-6232cd9c3633" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bd92c8d9-ce87-4b04-9c9a-c4ac82898aac" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186f94-301e-00f9-05f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "58c177fe-9614-4475-a40a-6232cd9c3633" + "x-ms-request-id" : "34f3b037-401e-0096-4d38-599853000000", + "Date" : "Mon, 13 Jul 2020 17:10:55 GMT", + "x-ms-client-request-id" : "bd92c8d9-ce87-4b04-9c9a-c4ac82898aac" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail98259615f3", "javablobuploadpageacfail193856642c3614d5f0476d", "2fa1947d-02f1-43e6-8084-3a4848b1868e" ] + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfaild3392488a1", "javablobuploadpageacfail1119649ffea7033fb444e5", "cee1b426-8b37-483f-abb1-d6f5f8f37ee6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[5].json index d2e246730d6b..1a10f6fec859 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[5].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail29c416579f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailae664261ec?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e6a54fe2-8e88-4c6a-a602-6a84b23625f8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9420447d-6560-4090-add4-d41a89f8c77b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECB7B7E09", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:55 GMT", + "ETag" : "0x8D8274FB4BDA96A", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:56 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186fab-301e-00f9-18f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "e6a54fe2-8e88-4c6a-a602-6a84b23625f8" + "x-ms-request-id" : "78294294-801e-0020-2338-59ea25000000", + "Date" : "Mon, 13 Jul 2020 17:10:55 GMT", + "x-ms-client-request-id" : "9420447d-6560-4090-add4-d41a89f8c77b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail29c416579f/javablobuploadpageacfail154873affaaea9e7304b3e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailae664261ec/javablobuploadpageacfail1254531858ffdc17d04536", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f26beaf4-828d-44c2-a048-73c63560d385" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0f31637-10fe-40ca-b547-fdc00947a916" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECB8AA851", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:55 GMT", + "ETag" : "0x8D8274FB4EF32EF", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:56 GMT", + "x-ms-version-id" : "2020-07-13T17:10:56.4399855Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186fcb-301e-00f9-32f7-12fa96000000", + "x-ms-request-id" : "08af0561-901e-005e-1438-597a62000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "f26beaf4-828d-44c2-a048-73c63560d385" + "Date" : "Mon, 13 Jul 2020 17:10:55 GMT", + "x-ms-client-request-id" : "a0f31637-10fe-40ca-b547-fdc00947a916" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail29c416579f/javablobuploadpageacfail154873affaaea9e7304b3e?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailae664261ec/javablobuploadpageacfail1254531858ffdc17d04536?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cec0beca-93b6-4d65-8391-4be431efab6e", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "22f9ac7f-d5b5-4aca-aab0-8138a453de02", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "InvalidInput", "retry-after" : "0", "Content-Length" : "220", "StatusCode" : "400", - "x-ms-request-id" : "6b186fda-301e-00f9-40f7-12fa96000000", - "Body" : "InvalidInputOne of the request inputs is not valid.\nRequestId:6b186fda-301e-00f9-40f7-12fa96000000\nTime:2020-04-15T07:29:55.7696057Z", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "cec0beca-93b6-4d65-8391-4be431efab6e", + "x-ms-request-id" : "6eded69f-301e-009c-7738-593ce4000000", + "Body" : "InvalidInputOne of the request inputs is not valid.\nRequestId:6eded69f-301e-009c-7738-593ce4000000\nTime:2020-07-13T17:10:56.7919837Z", + "Date" : "Mon, 13 Jul 2020 17:10:56 GMT", + "x-ms-client-request-id" : "22f9ac7f-d5b5-4aca-aab0-8138a453de02", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "53c6cdf1-215d-48c3-ba97-90e090611e82" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "63c6d136-5b03-4bc0-95bd-6324a474f16f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b186fe9-301e-00f9-4df7-12fa96000000", - "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail29c416579fWed, 15 Apr 2020 07:29:55 GMT\"0x8D7E10ECB7B7E09\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "53c6cdf1-215d-48c3-ba97-90e090611e82", + "x-ms-request-id" : "af2662df-b01e-0076-3c38-591bca000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfailae664261ecMon, 13 Jul 2020 17:10:56 GMT\"0x8D8274FB4BDA96A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:56 GMT", + "x-ms-client-request-id" : "63c6d136-5b03-4bc0-95bd-6324a474f16f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail29c416579f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailae664261ec?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "97fdbcb4-3c22-4f1f-8f92-379c51cd99e6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37d3b737-8f45-4049-bcea-fcec71d8fcb2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b186ff2-301e-00f9-56f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "97fdbcb4-3c22-4f1f-8f92-379c51cd99e6" + "x-ms-request-id" : "c59349e3-d01e-003d-3938-59e799000000", + "Date" : "Mon, 13 Jul 2020 17:10:56 GMT", + "x-ms-client-request-id" : "37d3b737-8f45-4049-bcea-fcec71d8fcb2" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail29c416579f", "javablobuploadpageacfail154873affaaea9e7304b3e", "afef2d20-26ef-4855-89d1-b5a61e91927f" ] + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfailae664261ec", "javablobuploadpageacfail1254531858ffdc17d04536", "b7ffec94-0950-4f81-9d84-9ac6aa9fdd6b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[6].json index e31a5e8eaf90..cb08752aa657 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[6].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail4ae38407c4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailf540817070?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5726b9b7-add5-4e36-bb45-df6d8b8d5396" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4479c4cc-f1cd-44ba-b995-083fbeaa9c38" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECBAE0C27", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:55 GMT", + "ETag" : "0x8D8274FB5C271F7", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:57 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b186ffc-301e-00f9-60f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "5726b9b7-add5-4e36-bb45-df6d8b8d5396" + "x-ms-request-id" : "4b960b42-f01e-0067-5238-59817e000000", + "Date" : "Mon, 13 Jul 2020 17:10:56 GMT", + "x-ms-client-request-id" : "4479c4cc-f1cd-44ba-b995-083fbeaa9c38" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail4ae38407c4/javablobuploadpageacfail131615581ae9b113f64cdd", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailf540817070/javablobuploadpageacfail17036681861fa723a2499b", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "007c946e-0aa2-4015-87dc-c35926908ab9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0fe8845-dfac-4301-ac0e-ffe13aec28b3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECBB4CF96", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:55 GMT", + "ETag" : "0x8D8274FB5FCB564", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:58 GMT", + "x-ms-version-id" : "2020-07-13T17:10:58.2062436Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187009-301e-00f9-6bf7-12fa96000000", + "x-ms-request-id" : "1f024af8-801e-007d-7a38-59e0a1000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "007c946e-0aa2-4015-87dc-c35926908ab9" + "Date" : "Mon, 13 Jul 2020 17:10:57 GMT", + "x-ms-client-request-id" : "c0fe8845-dfac-4301-ac0e-ffe13aec28b3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail4ae38407c4/javablobuploadpageacfail131615581ae9b113f64cdd?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailf540817070/javablobuploadpageacfail17036681861fa723a2499b?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "91ff408b-6d74-4d58-8588-bdd1b05827d6", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "73e9073c-38be-4021-b913-dfffc81ff2be", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "InvalidInput", "retry-after" : "0", "Content-Length" : "220", "StatusCode" : "400", - "x-ms-request-id" : "6b18701a-301e-00f9-79f7-12fa96000000", - "Body" : "InvalidInputOne of the request inputs is not valid.\nRequestId:6b18701a-301e-00f9-79f7-12fa96000000\nTime:2020-04-15T07:29:56.0138406Z", - "Date" : "Wed, 15 Apr 2020 07:29:55 GMT", - "x-ms-client-request-id" : "91ff408b-6d74-4d58-8588-bdd1b05827d6", + "x-ms-request-id" : "4774599d-201e-0080-0e38-596e84000000", + "Body" : "InvalidInputOne of the request inputs is not valid.\nRequestId:4774599d-201e-0080-0e38-596e84000000\nTime:2020-07-13T17:10:58.5731030Z", + "Date" : "Mon, 13 Jul 2020 17:10:58 GMT", + "x-ms-client-request-id" : "73e9073c-38be-4021-b913-dfffc81ff2be", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e3287eba-22db-4536-8516-f56bde26392f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0b6e9e8-cbff-465f-b67e-e83395ace15e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187029-301e-00f9-07f7-12fa96000000", - "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail4ae38407c4Wed, 15 Apr 2020 07:29:55 GMT\"0x8D7E10ECBAE0C27\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:56 GMT", - "x-ms-client-request-id" : "e3287eba-22db-4536-8516-f56bde26392f", + "x-ms-request-id" : "e0d479d3-701e-0046-4838-59a505000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfailf540817070Mon, 13 Jul 2020 17:10:57 GMT\"0x8D8274FB5C271F7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:10:58 GMT", + "x-ms-client-request-id" : "e0b6e9e8-cbff-465f-b67e-e83395ace15e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail4ae38407c4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailf540817070?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1c23f40b-91fc-4a66-a079-3db99a89db0e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a17f26d2-e450-4ebd-ad01-712b9e28c0d9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187038-301e-00f9-14f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:56 GMT", - "x-ms-client-request-id" : "1c23f40b-91fc-4a66-a079-3db99a89db0e" + "x-ms-request-id" : "4aeb4404-701e-0034-0838-59a24a000000", + "Date" : "Mon, 13 Jul 2020 17:10:59 GMT", + "x-ms-client-request-id" : "a17f26d2-e450-4ebd-ad01-712b9e28c0d9" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail4ae38407c4", "javablobuploadpageacfail131615581ae9b113f64cdd", "2c8759f9-3916-43a2-9991-2f59755cef8e" ] + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfailf540817070", "javablobuploadpageacfail17036681861fa723a2499b", "3e5aa1ef-d4be-4ba7-b793-e1cb4b824ff0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[7].json index c80857004c67..b7c1a5990315 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[7].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[7].json @@ -1,67 +1,68 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail8aa9151479?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailcee7607543?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d8b12b8c-c52f-4b50-a9f5-5276ea8da210" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c634e79-ee61-4237-b008-c452c40320be" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECBD2DB3C", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:56 GMT", + "ETag" : "0x8D8274FB6FF54E5", + "Last-Modified" : "Mon, 13 Jul 2020 17:10:59 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187046-301e-00f9-21f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:56 GMT", - "x-ms-client-request-id" : "d8b12b8c-c52f-4b50-a9f5-5276ea8da210" + "x-ms-request-id" : "79cb179b-001e-0087-5638-5902e7000000", + "Date" : "Mon, 13 Jul 2020 17:10:59 GMT", + "x-ms-client-request-id" : "2c634e79-ee61-4237-b008-c452c40320be" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail8aa9151479/javablobuploadpageacfail176012b8616de8fdd142a1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailcee7607543/javablobuploadpageacfail103882a9de22508f0241cd", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0daef6a5-7973-483f-a9bc-4df6174dd36d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38422684-142a-4203-b107-5f982b4450b9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECBDA3AD6", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:56 GMT", + "ETag" : "0x8D8274FB73100C6", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:00 GMT", + "x-ms-version-id" : "2020-07-13T17:11:00.2266822Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187058-301e-00f9-31f7-12fa96000000", + "x-ms-request-id" : "e6df0bfd-201e-0074-0c38-59a572000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:56 GMT", - "x-ms-client-request-id" : "0daef6a5-7973-483f-a9bc-4df6174dd36d" + "Date" : "Mon, 13 Jul 2020 17:10:59 GMT", + "x-ms-client-request-id" : "38422684-142a-4203-b107-5f982b4450b9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail8aa9151479/javablobuploadpageacfail176012b8616de8fdd142a1?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailcee7607543/javablobuploadpageacfail103882a9de22508f0241cd?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a4fbb083-37aa-499e-8d95-69d76dfd35f8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ec54429-2326-42c5-a416-96a266f0c818", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "SequenceNumberConditionNotMet", "retry-after" : "0", "Content-Length" : "250", "StatusCode" : "412", - "x-ms-request-id" : "6b187069-301e-00f9-40f7-12fa96000000", - "Body" : "SequenceNumberConditionNotMetThe sequence number condition specified was not met.\nRequestId:6b187069-301e-00f9-40f7-12fa96000000\nTime:2020-04-15T07:29:56.2630800Z", - "Date" : "Wed, 15 Apr 2020 07:29:56 GMT", - "x-ms-client-request-id" : "a4fbb083-37aa-499e-8d95-69d76dfd35f8", + "x-ms-request-id" : "733209c0-401e-0062-2c38-5953a5000000", + "Body" : "SequenceNumberConditionNotMetThe sequence number condition specified was not met.\nRequestId:733209c0-401e-0062-2c38-5953a5000000\nTime:2020-07-13T17:11:00.5619221Z", + "Date" : "Mon, 13 Jul 2020 17:11:00 GMT", + "x-ms-client-request-id" : "3ec54429-2326-42c5-a416-96a266f0c818", "Content-Type" : "application/xml" }, "Exception" : null @@ -69,43 +70,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "90e0591e-e4a3-4a34-9c84-e1e32adb38cf" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13d375a9-ffee-4fb0-ae60-815a7b7b0c7b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187077-301e-00f9-4ef7-12fa96000000", - "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfail8aa9151479Wed, 15 Apr 2020 07:29:56 GMT\"0x8D7E10ECBD2DB3C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:29:56 GMT", - "x-ms-client-request-id" : "90e0591e-e4a3-4a34-9c84-e1e32adb38cf", + "x-ms-request-id" : "ab3db3ce-301e-0035-2e38-59fd96000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfailcee7607543Mon, 13 Jul 2020 17:10:59 GMT\"0x8D8274FB6FF54E5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:00 GMT", + "x-ms-client-request-id" : "13d375a9-ffee-4fb0-ae60-815a7b7b0c7b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfail8aa9151479?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfailcee7607543?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b55c643a-0290-4d91-91e9-035ef15d5c79" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ff1e899-a24b-4f50-8dee-d4ceb3c37f5c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187087-301e-00f9-5df7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:56 GMT", - "x-ms-client-request-id" : "b55c643a-0290-4d91-91e9-035ef15d5c79" + "x-ms-request-id" : "76e8ad91-701e-0024-7138-596722000000", + "Date" : "Mon, 13 Jul 2020 17:11:00 GMT", + "x-ms-client-request-id" : "8ff1e899-a24b-4f50-8dee-d4ceb3c37f5c" }, "Exception" : null } ], - "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfail8aa9151479", "javablobuploadpageacfail176012b8616de8fdd142a1", "7b37c680-09f0-4b36-9bf1-ed6f18a7ba9c" ] + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfailcee7607543", "javablobuploadpageacfail103882a9de22508f0241cd", "c3f97bbc-a655-49e9-a4dc-04c7dd1ff8de" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[8].json new file mode 100644 index 000000000000..60a9e23392cb --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpageacfail[8].json @@ -0,0 +1,111 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaila9a46333f4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "267b2eff-4ff8-47fe-93be-656821f07c4b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FB8005E27", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:01 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "22624555-b01e-003b-6438-59d426000000", + "Date" : "Mon, 13 Jul 2020 17:11:00 GMT", + "x-ms-client-request-id" : "267b2eff-4ff8-47fe-93be-656821f07c4b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaila9a46333f4/javablobuploadpageacfail1580223e7961046fad431d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a09a675-9460-4b1e-89d7-bd9816874912" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FB834BD73", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:01 GMT", + "x-ms-version-id" : "2020-07-13T17:11:01.9288947Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2658fff0-701e-008d-3238-59a650000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:11:01 GMT", + "x-ms-client-request-id" : "9a09a675-9460-4b1e-89d7-bd9816874912" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaila9a46333f4/javablobuploadpageacfail1580223e7961046fad431d?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b2e968f2-4611-4fbb-af36-c7c5b2018aca", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "252", + "StatusCode" : "412", + "x-ms-request-id" : "47e4569b-601e-0017-3638-593889000000", + "Body" : "ConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:47e4569b-601e-0017-3638-593889000000\nTime:2020-07-13T17:11:02.2680843Z", + "Date" : "Mon, 13 Jul 2020 17:11:01 GMT", + "x-ms-client-request-id" : "b2e968f2-4611-4fbb-af36-c7c5b2018aca", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpageacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cb777ead-8684-4722-98a6-0b9feb83477d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "732f6913-801e-0042-2838-592802000000", + "Body" : "jtcuploadpageacfailjtcuploadpageacfail0pageblobapitestuploadpageacfaila9a46333f4Mon, 13 Jul 2020 17:11:01 GMT\"0x8D8274FB8005E27\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:02 GMT", + "x-ms-client-request-id" : "cb777ead-8684-4722-98a6-0b9feb83477d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpageacfail0pageblobapitestuploadpageacfaila9a46333f4?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "625158dd-ff5f-4f4b-87d7-6eeea7bd5c05" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "90218f76-d01e-0094-4238-5926eb000000", + "Date" : "Mon, 13 Jul 2020 17:11:02 GMT", + "x-ms-client-request-id" : "625158dd-ff5f-4f4b-87d7-6eeea7bd5c05" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadpageacfail0pageblobapitestuploadpageacfaila9a46333f4", "javablobuploadpageacfail1580223e7961046fad431d", "202cd542-b30a-4836-8b13-52a7bbb577c1" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[0].json index 238edfc13827..b33f2bab8a76 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[0].json @@ -1,181 +1,201 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0877205ecf0a7daf1a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac010336f363636a19ac?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7aab6c8a-f66b-4d5a-8be2-eefc9dbb3928" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fae8f5ce-1f5b-44db-aeb3-439090b66268" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECDE37874", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:59 GMT", + "ETag" : "0x8D8274FDB93F5C2", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:01 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187447-301e-00f9-09f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:59 GMT", - "x-ms-client-request-id" : "7aab6c8a-f66b-4d5a-8be2-eefc9dbb3928" + "x-ms-request-id" : "fb6f4368-501e-001c-4a38-59c3e2000000", + "Date" : "Mon, 13 Jul 2020 17:12:00 GMT", + "x-ms-client-request-id" : "fae8f5ce-1f5b-44db-aeb3-439090b66268" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0877205ecf0a7daf1a/javablobuploadpagefromurldestinationac16783087633fb48", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac010336f363636a19ac/javablobuploadpagefromurldestinationac103719d67ab7b89", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "15f49998-03e0-4bd3-8743-de999957f6f3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a8a251fa-5193-4cb5-b22e-dbf6521287af" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE0F7C54", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:59 GMT", + "ETag" : "0x8D8274FDBF930E0", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:01 GMT", + "x-ms-version-id" : "2020-07-13T17:12:01.9366112Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18747c-301e-00f9-35f7-12fa96000000", + "x-ms-request-id" : "0ee543f0-301e-000a-2438-593535000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:59 GMT", - "x-ms-client-request-id" : "15f49998-03e0-4bd3-8743-de999957f6f3" + "Date" : "Mon, 13 Jul 2020 17:12:01 GMT", + "x-ms-client-request-id" : "a8a251fa-5193-4cb5-b22e-dbf6521287af" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0877205ecf0a7daf1a?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac010336f363636a19ac/javablobuploadpagefromurldestinationac103719d67ab7b89?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4b9d13b3-75b0-4ebb-be65-907643e891a6", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fdc0671e-7329-410d-87e6-376643ac597d", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE1A46A7", - "Last-Modified" : "Wed, 15 Apr 2020 07:29:59 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4bc62c40-b01e-0049-4638-59d369000000", + "Date" : "Mon, 13 Jul 2020 17:12:02 GMT", + "x-ms-client-request-id" : "fdc0671e-7329-410d-87e6-376643ac597d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac010336f363636a19ac?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f593ac35-532b-4183-b822-67e0a308c6cd", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FDCBA4524", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187487-301e-00f9-40f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:29:59 GMT", - "x-ms-client-request-id" : "4b9d13b3-75b0-4ebb-be65-907643e891a6" + "x-ms-request-id" : "a85c4998-a01e-0037-0338-59432e000000", + "Date" : "Mon, 13 Jul 2020 17:12:02 GMT", + "x-ms-client-request-id" : "f593ac35-532b-4183-b822-67e0a308c6cd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0877205ecf0a7daf1a/javablobuploadpagefromurldestinationac2435424887a8633", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac010336f363636a19ac/javablobuploadpagefromurldestinationac286498f4680b0c9", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3d31ff85-d56a-4112-97e8-ae3359e43002" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "630bf70b-b4c7-40fa-87a0-cada7a200da2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE21F748", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "ETag" : "0x8D8274FDCFC02FD", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:03 GMT", + "x-ms-version-id" : "2020-07-13T17:12:03.6328189Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18749b-301e-00f9-4ef7-12fa96000000", + "x-ms-request-id" : "ad1e24ef-001e-004c-2738-5901b2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:29:59 GMT", - "x-ms-client-request-id" : "3d31ff85-d56a-4112-97e8-ae3359e43002" + "Date" : "Mon, 13 Jul 2020 17:12:03 GMT", + "x-ms-client-request-id" : "630bf70b-b4c7-40fa-87a0-cada7a200da2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0877205ecf0a7daf1a/javablobuploadpagefromurldestinationac2435424887a8633?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac010336f363636a19ac/javablobuploadpagefromurldestinationac286498f4680b0c9?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5d84d576-c413-484c-988b-c02ae3fe72ea", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "679a56ee-8695-4930-afc2-7f23b27e173f", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "8/GOHMinXCI=", + "x-ms-content-crc64" : "wVzzi7SKm2o=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:04 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "ETag" : "0x8D7E10ECE2A0F8E", + "Date" : "Mon, 13 Jul 2020 17:12:03 GMT", + "ETag" : "0x8D8274FDD45EAAE", "Content-Length" : "0", - "x-ms-request-id" : "6b1874a9-301e-00f9-59f7-12fa96000000", - "x-ms-client-request-id" : "5d84d576-c413-484c-988b-c02ae3fe72ea" + "x-ms-request-id" : "262d48c3-f01e-0077-2b38-594416000000", + "x-ms-client-request-id" : "679a56ee-8695-4930-afc2-7f23b27e173f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0877205ecf0a7daf1a/javablobuploadpagefromurldestinationac16783087633fb48?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac010336f363636a19ac/javablobuploadpagefromurldestinationac103719d67ab7b89?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c0a91784-33c3-4fb6-a37f-63f1ea69cd2b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bfa8e9a-247c-4d17-8dd7-79580491aea9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:04 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "Content-MD5" : "JqAKX/yCiXk8MPMdspqPHQ==", - "ETag" : "0x8D7E10ECE336088", + "Date" : "Mon, 13 Jul 2020 17:12:04 GMT", + "Content-MD5" : "om3u1vcrLpO4yBX1rB01HA==", + "ETag" : "0x8D8274FDD8129BF", "Content-Length" : "0", - "x-ms-request-id" : "6b1874b9-301e-00f9-67f7-12fa96000000", - "x-ms-client-request-id" : "c0a91784-33c3-4fb6-a37f-63f1ea69cd2b" + "x-ms-request-id" : "3d8c206a-f01e-0015-4338-598631000000", + "x-ms-client-request-id" : "7bfa8e9a-247c-4d17-8dd7-79580491aea9" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d1e86b33-9e17-42c8-8a3c-bdc4748e92bb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb5cbc75-4a84-4ffa-b19c-2b45eb9cf4a8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1874cc-301e-00f9-77f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac0877205ecf0a7daf1aWed, 15 Apr 2020 07:29:59 GMT\"0x8D7E10ECE1A46A7\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "d1e86b33-9e17-42c8-8a3c-bdc4748e92bb", + "x-ms-request-id" : "74d0108a-c01e-0053-6038-59b2b6000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac010336f363636a19acMon, 13 Jul 2020 17:12:03 GMT\"0x8D8274FDCBA4524\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:04 GMT", + "x-ms-client-request-id" : "fb5cbc75-4a84-4ffa-b19c-2b45eb9cf4a8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0877205ecf0a7daf1a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac010336f363636a19ac?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "08cb49dc-c842-4dcf-a17e-0c05236cc685" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "286ea786-5bfe-4f98-8eaf-e29297d27497" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1874d9-301e-00f9-04f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "08cb49dc-c842-4dcf-a17e-0c05236cc685" + "x-ms-request-id" : "0d5a3058-501e-007e-5f38-5901c5000000", + "Date" : "Mon, 13 Jul 2020 17:12:05 GMT", + "x-ms-client-request-id" : "286ea786-5bfe-4f98-8eaf-e29297d27497" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac0877205ecf0a7daf1a", "javablobuploadpagefromurldestinationac16783087633fb48", "javablobuploadpagefromurldestinationac2435424887a8633", "d9b4d2ef-fdef-47ff-9a7b-9976d8024fad" ] + "variables" : [ "jtcuploadpagefromurldestinationac010336f363636a19ac", "javablobuploadpagefromurldestinationac103719d67ab7b89", "javablobuploadpagefromurldestinationac286498f4680b0c9", "535f5584-fc01-43f9-b0fc-5a80ba0dc8df" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[1].json index 16772c2d4287..18a2a44f57c3 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[1].json @@ -1,181 +1,201 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac08183206f9dcf7e80b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac006133aecd8ff597d6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "031e6ccb-615d-428a-8278-82c619e85ab6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7946006-09a4-4995-a300-b2ff6b3794e5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE4BC9CD", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "ETag" : "0x8D8274FDE4D999B", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:05 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1874ea-301e-00f9-14f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "031e6ccb-615d-428a-8278-82c619e85ab6" + "x-ms-request-id" : "c20e8610-c01e-006c-6438-597a15000000", + "Date" : "Mon, 13 Jul 2020 17:12:05 GMT", + "x-ms-client-request-id" : "c7946006-09a4-4995-a300-b2ff6b3794e5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac08183206f9dcf7e80b/javablobuploadpagefromurldestinationac1554958303c8aa2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac006133aecd8ff597d6/javablobuploadpagefromurldestinationac1892816a156c733", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cacc6f2e-d4f7-47e9-a920-adb067292403" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "613bec6e-2520-4995-8ce1-ad17c291f93f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE53C18A", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "ETag" : "0x8D8274FDE89A237", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:06 GMT", + "x-ms-version-id" : "2020-07-13T17:12:06.2386743Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1874f3-301e-00f9-1bf7-12fa96000000", + "x-ms-request-id" : "7632189c-001e-0097-3038-59c78f000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "cacc6f2e-d4f7-47e9-a920-adb067292403" + "Date" : "Mon, 13 Jul 2020 17:12:05 GMT", + "x-ms-client-request-id" : "613bec6e-2520-4995-8ce1-ad17c291f93f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac08183206f9dcf7e80b?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac006133aecd8ff597d6/javablobuploadpagefromurldestinationac1892816a156c733?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2798aee3-545a-476c-8d9c-2c1cb1bef8cb", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f00b3058-3dac-412d-8da9-a2ef05af4270", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE5B5730", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4a894de4-801e-0099-6e38-59ee3f000000", + "Date" : "Mon, 13 Jul 2020 17:12:05 GMT", + "x-ms-client-request-id" : "f00b3058-3dac-412d-8da9-a2ef05af4270" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac006133aecd8ff597d6?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "316e6340-c844-450f-b06c-a24336520b1e", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FDEF66CE3", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187505-301e-00f9-27f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "2798aee3-545a-476c-8d9c-2c1cb1bef8cb" + "x-ms-request-id" : "f4122084-001e-0073-7938-59c911000000", + "Date" : "Mon, 13 Jul 2020 17:12:06 GMT", + "x-ms-client-request-id" : "316e6340-c844-450f-b06c-a24336520b1e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac08183206f9dcf7e80b/javablobuploadpagefromurldestinationac265084ae87ad90f", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac006133aecd8ff597d6/javablobuploadpagefromurldestinationac282006e564841bc", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b65adcc0-e2a0-416e-b8a9-aea8e6ade18b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ea17985-0e48-4c6d-99b9-cf36e0ae6379" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE63F209", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "ETag" : "0x8D8274FDF30FD39", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:07 GMT", + "x-ms-version-id" : "2020-07-13T17:12:07.3354553Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18750e-301e-00f9-2ff7-12fa96000000", + "x-ms-request-id" : "025420f1-901e-0061-7438-59b2c1000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "b65adcc0-e2a0-416e-b8a9-aea8e6ade18b" + "Date" : "Mon, 13 Jul 2020 17:12:06 GMT", + "x-ms-client-request-id" : "3ea17985-0e48-4c6d-99b9-cf36e0ae6379" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac08183206f9dcf7e80b/javablobuploadpagefromurldestinationac265084ae87ad90f?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac006133aecd8ff597d6/javablobuploadpagefromurldestinationac282006e564841bc?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "04eacd2b-e8ee-446f-96d6-e4ebbdd338ca", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5e79518c-5bb3-4165-9bb0-77adc5c855aa", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "VlMH9Fom1cQ=", + "x-ms-content-crc64" : "FGOjV0T/QwU=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:07 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "ETag" : "0x8D7E10ECE6FDBBD", + "Date" : "Mon, 13 Jul 2020 17:12:06 GMT", + "ETag" : "0x8D8274FDF63FD6A", "Content-Length" : "0", - "x-ms-request-id" : "6b187525-301e-00f9-43f7-12fa96000000", - "x-ms-client-request-id" : "04eacd2b-e8ee-446f-96d6-e4ebbdd338ca" + "x-ms-request-id" : "72543d57-e01e-009f-1438-59dd80000000", + "x-ms-client-request-id" : "5e79518c-5bb3-4165-9bb0-77adc5c855aa" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac08183206f9dcf7e80b/javablobuploadpagefromurldestinationac1554958303c8aa2?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac006133aecd8ff597d6/javablobuploadpagefromurldestinationac1892816a156c733?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7540194a-1975-41fe-8957-5090abde8196" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6c714c7f-81d8-462e-a730-683e42ee0f88" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:08 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "Content-MD5" : "fIUwA+uQyjPOU9tFM8ZNtQ==", - "ETag" : "0x8D7E10ECE789064", + "Date" : "Mon, 13 Jul 2020 17:12:07 GMT", + "Content-MD5" : "jw+4daA/9IlCF4RwVnm0eQ==", + "ETag" : "0x8D8274FDFA4466C", "Content-Length" : "0", - "x-ms-request-id" : "6b187532-301e-00f9-4df7-12fa96000000", - "x-ms-client-request-id" : "7540194a-1975-41fe-8957-5090abde8196" + "x-ms-request-id" : "da57821e-201e-0029-3238-59aff6000000", + "x-ms-client-request-id" : "6c714c7f-81d8-462e-a730-683e42ee0f88" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "007c86fc-bc84-45f2-8923-e19f3ad3c77a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bd4990c-5d28-412a-aa7c-83a857f19c46" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187543-301e-00f9-5cf7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac08183206f9dcf7e80bWed, 15 Apr 2020 07:30:00 GMT\"0x8D7E10ECE5B5730\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "007c86fc-bc84-45f2-8923-e19f3ad3c77a", + "x-ms-request-id" : "891ad953-a01e-0018-5c38-594ee5000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac006133aecd8ff597d6Mon, 13 Jul 2020 17:12:06 GMT\"0x8D8274FDEF66CE3\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:08 GMT", + "x-ms-client-request-id" : "7bd4990c-5d28-412a-aa7c-83a857f19c46", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac08183206f9dcf7e80b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac006133aecd8ff597d6?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "803ac41a-19ab-450c-b735-5f486ba22d01" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "977346c5-5497-458b-b684-4afe1a270962" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b18754d-301e-00f9-63f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "803ac41a-19ab-450c-b735-5f486ba22d01" + "x-ms-request-id" : "f5954ab7-301e-001a-6b38-59f05d000000", + "Date" : "Mon, 13 Jul 2020 17:12:08 GMT", + "x-ms-client-request-id" : "977346c5-5497-458b-b684-4afe1a270962" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac08183206f9dcf7e80b", "javablobuploadpagefromurldestinationac1554958303c8aa2", "javablobuploadpagefromurldestinationac265084ae87ad90f", "29b44fb1-9536-49ba-8b51-e461a61cf58f" ] + "variables" : [ "jtcuploadpagefromurldestinationac006133aecd8ff597d6", "javablobuploadpagefromurldestinationac1892816a156c733", "javablobuploadpagefromurldestinationac282006e564841bc", "6bebf231-5683-45a8-9daa-82c26038900f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[2].json index 01d158c69654..6d897f8d42d7 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[2].json @@ -1,181 +1,201 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac01385911ab93f2156d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0579548ff2b89351cb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fb81c674-e7c1-4473-8cd7-658d2a6fe0ef" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "62235d7f-31ce-46a6-88e3-88dd7e91e359" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE8F9A2D", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "ETag" : "0x8D8274FE0454A3A", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187559-301e-00f9-6ef7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "fb81c674-e7c1-4473-8cd7-658d2a6fe0ef" + "x-ms-request-id" : "36bee833-101e-001d-5738-599c3e000000", + "Date" : "Mon, 13 Jul 2020 17:12:09 GMT", + "x-ms-client-request-id" : "62235d7f-31ce-46a6-88e3-88dd7e91e359" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac01385911ab93f2156d/javablobuploadpagefromurldestinationac13729678fe721bf", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0579548ff2b89351cb/javablobuploadpagefromurldestinationac1735343f9201a85", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bbf04c36-21f3-414b-9995-79fc30f62c00" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2fbad326-0699-4ef9-9ed2-86ba17a25018" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE976A64", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "ETag" : "0x8D8274FE07810BA", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:09 GMT", + "x-ms-version-id" : "2020-07-13T17:12:09.4789818Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187564-301e-00f9-78f7-12fa96000000", + "x-ms-request-id" : "196a7c28-201e-005b-0c38-59a8b9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "bbf04c36-21f3-414b-9995-79fc30f62c00" + "Date" : "Mon, 13 Jul 2020 17:12:09 GMT", + "x-ms-client-request-id" : "2fbad326-0699-4ef9-9ed2-86ba17a25018" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac01385911ab93f2156d?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0579548ff2b89351cb/javablobuploadpagefromurldestinationac1735343f9201a85?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "18a91b34-57fd-4332-90d5-93c83a1eb4ff", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f5b5387d-d217-426a-bad0-e525fff60f35", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECE9F75D0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2e3844cd-101e-000d-3b38-595956000000", + "Date" : "Mon, 13 Jul 2020 17:12:08 GMT", + "x-ms-client-request-id" : "f5b5387d-d217-426a-bad0-e525fff60f35" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0579548ff2b89351cb?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5a44ca6-3f41-40bc-8326-2fe526466921", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FE0E2B84E", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:10 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b18756f-301e-00f9-01f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "18a91b34-57fd-4332-90d5-93c83a1eb4ff" + "x-ms-request-id" : "a1b2cd1e-801e-000f-1138-59e7ee000000", + "Date" : "Mon, 13 Jul 2020 17:12:09 GMT", + "x-ms-client-request-id" : "e5a44ca6-3f41-40bc-8326-2fe526466921" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac01385911ab93f2156d/javablobuploadpagefromurldestinationac250996c48cd0c36", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0579548ff2b89351cb/javablobuploadpagefromurldestinationac2442335c8bad2fc", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0513c3be-5af1-4e58-91da-70825a7398ae" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "179670bb-957a-4d02-87fe-b5eba3fba734" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECEA6FE82", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "ETag" : "0x8D8274FE113F7F4", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:10 GMT", + "x-ms-version-id" : "2020-07-13T17:12:10.5007092Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18757f-301e-00f9-0ef7-12fa96000000", + "x-ms-request-id" : "059615cd-201e-0039-6038-596a9e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "x-ms-client-request-id" : "0513c3be-5af1-4e58-91da-70825a7398ae" + "Date" : "Mon, 13 Jul 2020 17:12:10 GMT", + "x-ms-client-request-id" : "179670bb-957a-4d02-87fe-b5eba3fba734" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac01385911ab93f2156d/javablobuploadpagefromurldestinationac250996c48cd0c36?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0579548ff2b89351cb/javablobuploadpagefromurldestinationac2442335c8bad2fc?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b264fa86-a061-4df3-a965-510e5fcab7c0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bc9d348c-2709-41cd-8f46-1716a0da6452", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "ZL/+KYQtZXg=", + "x-ms-content-crc64" : "Jlt4kYJpLQY=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:00 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:10 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "ETag" : "0x8D7E10ECEB09DB8", + "Date" : "Mon, 13 Jul 2020 17:12:10 GMT", + "ETag" : "0x8D8274FE14634AB", "Content-Length" : "0", - "x-ms-request-id" : "6b187594-301e-00f9-1cf7-12fa96000000", - "x-ms-client-request-id" : "b264fa86-a061-4df3-a965-510e5fcab7c0" + "x-ms-request-id" : "9607e99e-901e-0013-2638-59b58e000000", + "x-ms-client-request-id" : "bc9d348c-2709-41cd-8f46-1716a0da6452" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac01385911ab93f2156d/javablobuploadpagefromurldestinationac13729678fe721bf?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0579548ff2b89351cb/javablobuploadpagefromurldestinationac1735343f9201a85?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "972bec4a-0a63-427d-acc9-17539af1c460" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4dfae68a-6c7d-4cfb-a30d-5a169733499b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:00 GMT", - "Content-MD5" : "NxuW/OO6WZG72mcILjOvNA==", - "ETag" : "0x8D7E10ECEB9797F", + "Date" : "Mon, 13 Jul 2020 17:12:10 GMT", + "Content-MD5" : "sI//B3PXzzknoqJwFRqL+g==", + "ETag" : "0x8D8274FE186CBE4", "Content-Length" : "0", - "x-ms-request-id" : "6b1875a3-301e-00f9-28f7-12fa96000000", - "x-ms-client-request-id" : "972bec4a-0a63-427d-acc9-17539af1c460" + "x-ms-request-id" : "825441e2-001e-003e-0238-5906fd000000", + "x-ms-client-request-id" : "4dfae68a-6c7d-4cfb-a30d-5a169733499b" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "93ce23d9-9640-4dd1-971f-dd976b864578" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "12e4a99e-dc4d-4af4-a6fb-37c259fd3188" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1875bd-301e-00f9-3af7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac01385911ab93f2156dWed, 15 Apr 2020 07:30:00 GMT\"0x8D7E10ECE9F75D0\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "93ce23d9-9640-4dd1-971f-dd976b864578", + "x-ms-request-id" : "f7fb65e9-301e-0068-5e38-59f712000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac0579548ff2b89351cbMon, 13 Jul 2020 17:12:10 GMT\"0x8D8274FE0E2B84E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:11 GMT", + "x-ms-client-request-id" : "12e4a99e-dc4d-4af4-a6fb-37c259fd3188", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac01385911ab93f2156d?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0579548ff2b89351cb?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4514ec13-77bb-4993-8ff8-26b52a9b5b35" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4703cc65-2e78-48a0-b34f-b2fd0a089a8d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1875cb-301e-00f9-46f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "4514ec13-77bb-4993-8ff8-26b52a9b5b35" + "x-ms-request-id" : "eb2f0358-b01e-0092-7f38-591554000000", + "Date" : "Mon, 13 Jul 2020 17:12:11 GMT", + "x-ms-client-request-id" : "4703cc65-2e78-48a0-b34f-b2fd0a089a8d" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac01385911ab93f2156d", "javablobuploadpagefromurldestinationac13729678fe721bf", "javablobuploadpagefromurldestinationac250996c48cd0c36", "148a3a79-2eec-4c89-aa07-4e208e6aa89d" ] + "variables" : [ "jtcuploadpagefromurldestinationac0579548ff2b89351cb", "javablobuploadpagefromurldestinationac1735343f9201a85", "javablobuploadpagefromurldestinationac2442335c8bad2fc", "903b913b-1b67-4235-ab1a-ee7d665c6cc5" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[3].json index 1d59e9c3f27d..e3b0d32a597d 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[3].json @@ -1,211 +1,233 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac064251a5903b0fc164?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "58d7e90c-fa8f-4e8f-abcf-bd8fff2b3cab" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "100a5b52-0090-4817-8536-d361df57d9c9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECED231CA", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "ETag" : "0x8D8274FE2468357", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:12 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1875d9-301e-00f9-52f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "58d7e90c-fa8f-4e8f-abcf-bd8fff2b3cab" + "x-ms-request-id" : "f89362a8-e01e-0009-4a38-59d451000000", + "Date" : "Mon, 13 Jul 2020 17:12:12 GMT", + "x-ms-client-request-id" : "100a5b52-0090-4817-8536-d361df57d9c9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac064251a5903b0fc164/javablobuploadpagefromurldestinationac1783003483fb48c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441/javablobuploadpagefromurldestinationac199949d8d4d05da", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "28cdb4b0-3d3c-495a-b095-87f0c2098820" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ccaf131-5dc6-463f-aa28-2456e2fdbc35" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECED9B357", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "ETag" : "0x8D8274FE289EC2F", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:12 GMT", + "x-ms-version-id" : "2020-07-13T17:12:12.9514543Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1875e3-301e-00f9-5af7-12fa96000000", + "x-ms-request-id" : "6411b1b8-301e-0047-1a38-59fad9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "28cdb4b0-3d3c-495a-b095-87f0c2098820" + "Date" : "Mon, 13 Jul 2020 17:12:12 GMT", + "x-ms-client-request-id" : "5ccaf131-5dc6-463f-aa28-2456e2fdbc35" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac064251a5903b0fc164?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441/javablobuploadpagefromurldestinationac199949d8d4d05da?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9c601dd4-ceb7-49d9-b790-48d9c9cf9590", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "052d14a0-02ba-4a3f-8491-f26db2527c39", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECEE0382F", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "2b5dc4f1-401e-005d-7538-599b06000000", + "Date" : "Mon, 13 Jul 2020 17:12:12 GMT", + "x-ms-client-request-id" : "052d14a0-02ba-4a3f-8491-f26db2527c39" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f057ebd6-a196-4b91-a324-8698e7eec75a", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FE2F83E1E", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1875f0-301e-00f9-65f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "9c601dd4-ceb7-49d9-b790-48d9c9cf9590" + "x-ms-request-id" : "8dd9e01b-e01e-00a0-1f38-591523000000", + "Date" : "Mon, 13 Jul 2020 17:12:13 GMT", + "x-ms-client-request-id" : "f057ebd6-a196-4b91-a324-8698e7eec75a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac064251a5903b0fc164/javablobuploadpagefromurldestinationac24147930f860b88", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441/javablobuploadpagefromurldestinationac2708649137cfadc", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "47bda7e8-3eae-40bb-aca2-d6d4228a9100" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "625e715b-4f42-47d6-9799-4d355396af7a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECEE7E794", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "ETag" : "0x8D8274FE331E393", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:14 GMT", + "x-ms-version-id" : "2020-07-13T17:12:14.0522387Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1875f6-301e-00f9-6bf7-12fa96000000", + "x-ms-request-id" : "9abd9edb-801e-0089-7e38-592b57000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "47bda7e8-3eae-40bb-aca2-d6d4228a9100" + "Date" : "Mon, 13 Jul 2020 17:12:13 GMT", + "x-ms-client-request-id" : "625e715b-4f42-47d6-9799-4d355396af7a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac064251a5903b0fc164/javablobuploadpagefromurldestinationac24147930f860b88?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441/javablobuploadpagefromurldestinationac2708649137cfadc?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "14ddd1b1-0dd2-4625-b0f2-e6365429e7d1", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4bb8b5c8-bef9-47f4-9650-ed2811f8a69a", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "T9heNYKL6i4=", + "x-ms-content-crc64" : "kEeMP37W9jo=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:14 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "ETag" : "0x8D7E10ECEF04E03", + "Date" : "Mon, 13 Jul 2020 17:12:14 GMT", + "ETag" : "0x8D8274FE36691BB", "Content-Length" : "0", - "x-ms-request-id" : "6b1875fb-301e-00f9-70f7-12fa96000000", - "x-ms-client-request-id" : "14ddd1b1-0dd2-4625-b0f2-e6365429e7d1" + "x-ms-request-id" : "aa72536f-301e-0078-7638-59327a000000", + "x-ms-client-request-id" : "4bb8b5c8-bef9-47f4-9650-ed2811f8a69a" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac064251a5903b0fc164/javablobuploadpagefromurldestinationac1783003483fb48c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441/javablobuploadpagefromurldestinationac199949d8d4d05da", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3c0fbfbf-daa0-4185-870e-20d9e748a45d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c63945ba-e237-4820-bcd9-b2aa55f7f989" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-tag-count" : "1", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "x-ms-version-id" : "2020-07-13T17:12:12.9514543Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:12 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", + "Date" : "Mon, 13 Jul 2020 17:12:14 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10ECED9B357", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:30:01 GMT", + "ETag" : "0x8D8274FE289EC2F", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:12:12 GMT", "Content-Length" : "512", - "x-ms-request-id" : "6b18760a-301e-00f9-7bf7-12fa96000000", - "x-ms-client-request-id" : "3c0fbfbf-daa0-4185-870e-20d9e748a45d", + "x-ms-request-id" : "15710ed0-b01e-0066-6938-59dea2000000", + "x-ms-client-request-id" : "c63945ba-e237-4820-bcd9-b2aa55f7f989", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac064251a5903b0fc164/javablobuploadpagefromurldestinationac1783003483fb48c?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441/javablobuploadpagefromurldestinationac199949d8d4d05da?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "318eedec-7a21-4b09-b8aa-2e751306c063" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "41ec5ec7-a451-487b-bfc3-6e429084c534" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:15 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "Content-MD5" : "/jj38fbRvw4aKxxtq6ee/g==", - "ETag" : "0x8D7E10ECEFE823B", + "Date" : "Mon, 13 Jul 2020 17:12:14 GMT", + "Content-MD5" : "GckHjwnDKlDDAuMr3U54ug==", + "ETag" : "0x8D8274FE3DD0FDF", "Content-Length" : "0", - "x-ms-request-id" : "6b187613-301e-00f9-03f7-12fa96000000", - "x-ms-client-request-id" : "318eedec-7a21-4b09-b8aa-2e751306c063" + "x-ms-request-id" : "60599cc4-b01e-0004-1538-591c85000000", + "x-ms-client-request-id" : "41ec5ec7-a451-487b-bfc3-6e429084c534" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bde38d60-5f93-470c-ae69-d59993b515a2" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ee4bc71-a034-4a94-96d5-3bd0f801fbae" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187626-301e-00f9-14f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac064251a5903b0fc164Wed, 15 Apr 2020 07:30:01 GMT\"0x8D7E10ECEE0382F\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "bde38d60-5f93-470c-ae69-d59993b515a2", + "x-ms-request-id" : "94d16f71-a01e-006a-4438-5949aa000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac055225f0785de11441Mon, 13 Jul 2020 17:12:13 GMT\"0x8D8274FE2F83E1E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:14 GMT", + "x-ms-client-request-id" : "8ee4bc71-a034-4a94-96d5-3bd0f801fbae", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac064251a5903b0fc164?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac055225f0785de11441?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f6ac2ea6-7a24-4e1e-956a-2aec4b90dc2c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c295374e-cd9c-4486-a40d-2df370414e38" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187630-301e-00f9-1cf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "f6ac2ea6-7a24-4e1e-956a-2aec4b90dc2c" + "x-ms-request-id" : "db6b2365-801e-006d-2d38-5925c9000000", + "Date" : "Mon, 13 Jul 2020 17:12:15 GMT", + "x-ms-client-request-id" : "c295374e-cd9c-4486-a40d-2df370414e38" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac064251a5903b0fc164", "javablobuploadpagefromurldestinationac1783003483fb48c", "javablobuploadpagefromurldestinationac24147930f860b88", "f018af34-b967-424f-965b-3c43ca9dfa20" ] + "variables" : [ "jtcuploadpagefromurldestinationac055225f0785de11441", "javablobuploadpagefromurldestinationac199949d8d4d05da", "javablobuploadpagefromurldestinationac2708649137cfadc", "255dd7e6-3fd1-41c6-a162-72bb04ace146" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[4].json index fdadb267db45..c21c5929b95c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[4].json @@ -1,181 +1,201 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0603082d68b2091239?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac066320edd23c4c3857?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1d3f1240-2a2a-4f70-ae6b-3e96adac5f57" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "25a3770c-7b47-41fd-9f85-2f13e62cd0fb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF1B339E", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "ETag" : "0x8D8274FE478B114", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18764c-301e-00f9-36f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "1d3f1240-2a2a-4f70-ae6b-3e96adac5f57" + "x-ms-request-id" : "35ba99ac-f01e-0083-4e38-598fe0000000", + "Date" : "Mon, 13 Jul 2020 17:12:15 GMT", + "x-ms-client-request-id" : "25a3770c-7b47-41fd-9f85-2f13e62cd0fb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0603082d68b2091239/javablobuploadpagefromurldestinationac1677683eba2a6a2", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac066320edd23c4c3857/javablobuploadpagefromurldestinationac18983185093f9e4", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5a39e15d-53c8-4dfc-8a6f-157624a7ce68" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a305553-eb8a-404c-8104-bcd15968b0a1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF22DBC2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "ETag" : "0x8D8274FE4AC93A1", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:16 GMT", + "x-ms-version-id" : "2020-07-13T17:12:16.5340065Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187658-301e-00f9-41f7-12fa96000000", + "x-ms-request-id" : "b0478e1b-501e-009a-4338-590f5b000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "5a39e15d-53c8-4dfc-8a6f-157624a7ce68" + "Date" : "Mon, 13 Jul 2020 17:12:16 GMT", + "x-ms-client-request-id" : "9a305553-eb8a-404c-8104-bcd15968b0a1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0603082d68b2091239?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac066320edd23c4c3857/javablobuploadpagefromurldestinationac18983185093f9e4?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4822f1be-8855-4741-a91c-9faaba64f308", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "50651bde-bece-4775-bffb-008ad793fe35", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF2A4BB2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "b374bf3c-701e-00a2-6c38-59ab9b000000", + "Date" : "Mon, 13 Jul 2020 17:12:16 GMT", + "x-ms-client-request-id" : "50651bde-bece-4775-bffb-008ad793fe35" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac066320edd23c4c3857?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47c8b763-921f-4b7b-a900-86ddbe92316a", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FE510F8F0", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:17 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187660-301e-00f9-47f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "4822f1be-8855-4741-a91c-9faaba64f308" + "x-ms-request-id" : "5d8b0291-701e-009d-0138-596338000000", + "Date" : "Mon, 13 Jul 2020 17:12:17 GMT", + "x-ms-client-request-id" : "47c8b763-921f-4b7b-a900-86ddbe92316a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0603082d68b2091239/javablobuploadpagefromurldestinationac26437269b750fd8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac066320edd23c4c3857/javablobuploadpagefromurldestinationac295504830410b4e", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c00b8890-befe-49e8-ba9f-d2569c3342a4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4390e671-1dc2-42c2-9191-2d492dbcb7d1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF335A78", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "ETag" : "0x8D8274FE5440D3B", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:17 GMT", + "x-ms-version-id" : "2020-07-13T17:12:17.5267131Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187667-301e-00f9-4df7-12fa96000000", + "x-ms-request-id" : "e4e184f0-101e-0050-7038-5953d2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "x-ms-client-request-id" : "c00b8890-befe-49e8-ba9f-d2569c3342a4" + "Date" : "Mon, 13 Jul 2020 17:12:17 GMT", + "x-ms-client-request-id" : "4390e671-1dc2-42c2-9191-2d492dbcb7d1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0603082d68b2091239/javablobuploadpagefromurldestinationac26437269b750fd8?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac066320edd23c4c3857/javablobuploadpagefromurldestinationac295504830410b4e?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0673c4b3-d559-4cd2-a79a-77e890f9e1d8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1533f61a-3496-4274-85ec-c5c5916addc7", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "av/leT7oxD8=", + "x-ms-content-crc64" : "6CzLU4Shrrg=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:01 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:17 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:01 GMT", - "ETag" : "0x8D7E10ECF3AD64F", + "Date" : "Mon, 13 Jul 2020 17:12:17 GMT", + "ETag" : "0x8D8274FE57A423E", "Content-Length" : "0", - "x-ms-request-id" : "6b187674-301e-00f9-57f7-12fa96000000", - "x-ms-client-request-id" : "0673c4b3-d559-4cd2-a79a-77e890f9e1d8" + "x-ms-request-id" : "55b93fe3-d01e-0002-6738-592f3a000000", + "x-ms-client-request-id" : "1533f61a-3496-4274-85ec-c5c5916addc7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0603082d68b2091239/javablobuploadpagefromurldestinationac1677683eba2a6a2?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac066320edd23c4c3857/javablobuploadpagefromurldestinationac18983185093f9e4?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "96a37d82-adc9-4265-89ad-239ab2e99515" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "808e0e7c-691b-41c3-b24c-3500e7ef7ec9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:18 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "Content-MD5" : "qUKslvy/GyJFBpQm9MwwgA==", - "ETag" : "0x8D7E10ECF648859", + "Date" : "Mon, 13 Jul 2020 17:12:17 GMT", + "Content-MD5" : "0/9xoqLZbLYMP5Nqx1i6bQ==", + "ETag" : "0x8D8274FE5BA3D00", "Content-Length" : "0", - "x-ms-request-id" : "6b18767e-301e-00f9-5ff7-12fa96000000", - "x-ms-client-request-id" : "96a37d82-adc9-4265-89ad-239ab2e99515" + "x-ms-request-id" : "2929dcba-c01e-007c-7338-59bf7d000000", + "x-ms-client-request-id" : "808e0e7c-691b-41c3-b24c-3500e7ef7ec9" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b97ed449-6464-4e72-b4a2-04c5944f1a1b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3689bef5-9540-4037-9493-a769c9a2e45b" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1876c7-301e-00f9-1bf7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac0603082d68b2091239Wed, 15 Apr 2020 07:30:01 GMT\"0x8D7E10ECF2A4BB2\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "b97ed449-6464-4e72-b4a2-04c5944f1a1b", + "x-ms-request-id" : "92281e09-e01e-006b-0538-591676000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac066320edd23c4c3857Mon, 13 Jul 2020 17:12:17 GMT\"0x8D8274FE510F8F0\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:18 GMT", + "x-ms-client-request-id" : "3689bef5-9540-4037-9493-a769c9a2e45b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0603082d68b2091239?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac066320edd23c4c3857?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "44e293ab-f2b6-4755-9ae7-3440070816f4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82005714-7e86-4b8d-a511-cf03143e58c8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1876ce-301e-00f9-22f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "44e293ab-f2b6-4755-9ae7-3440070816f4" + "x-ms-request-id" : "ef3872f1-901e-0095-7f38-597937000000", + "Date" : "Mon, 13 Jul 2020 17:12:18 GMT", + "x-ms-client-request-id" : "82005714-7e86-4b8d-a511-cf03143e58c8" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac0603082d68b2091239", "javablobuploadpagefromurldestinationac1677683eba2a6a2", "javablobuploadpagefromurldestinationac26437269b750fd8", "68c7991b-388b-46d5-8c7d-c4e3135b81ac" ] + "variables" : [ "jtcuploadpagefromurldestinationac066320edd23c4c3857", "javablobuploadpagefromurldestinationac18983185093f9e4", "javablobuploadpagefromurldestinationac295504830410b4e", "2801db6a-2c57-435d-acd1-2f52266a9bc6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[5].json index 066853ad4c6a..7ae1dd5f6006 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[5].json @@ -1,203 +1,223 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0456445ef69138e244?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "96ceed16-6026-47ed-8789-5861fae0f44e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38b353dc-cad4-420d-9004-361e7132c748" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF7F3E21", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "ETag" : "0x8D8274FE66E49A3", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1876d6-301e-00f9-2af7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "96ceed16-6026-47ed-8789-5861fae0f44e" + "x-ms-request-id" : "79c7437e-001e-005c-1738-59c4da000000", + "Date" : "Mon, 13 Jul 2020 17:12:18 GMT", + "x-ms-client-request-id" : "38b353dc-cad4-420d-9004-361e7132c748" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0456445ef69138e244/javablobuploadpagefromurldestinationac13118355752d246", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc/javablobuploadpagefromurldestinationac1417912369dcaf0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "89e854a9-a716-4ac2-9ba8-bd6da56c6386" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4a673923-9250-49b3-bbd1-9c6f5c16d4b1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF85D3EF", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "ETag" : "0x8D8274FE6A2080A", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:19 GMT", + "x-ms-version-id" : "2020-07-13T17:12:19.8203402Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1876df-301e-00f9-32f7-12fa96000000", + "x-ms-request-id" : "27211d65-e01e-0036-1638-591cf2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "89e854a9-a716-4ac2-9ba8-bd6da56c6386" + "Date" : "Mon, 13 Jul 2020 17:12:19 GMT", + "x-ms-client-request-id" : "4a673923-9250-49b3-bbd1-9c6f5c16d4b1" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0456445ef69138e244?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc/javablobuploadpagefromurldestinationac1417912369dcaf0?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4300e79b-18f8-40cf-8e71-cfc769726583", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5cd09e15-9536-44a2-be32-bf78abbf1158", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF8CCF27", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4f73a45b-101e-00a4-5738-599824000000", + "Date" : "Mon, 13 Jul 2020 17:12:19 GMT", + "x-ms-client-request-id" : "5cd09e15-9536-44a2-be32-bf78abbf1158" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "127c6720-2dd4-49eb-91a4-99036868712e", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FE703D53F", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1876e3-301e-00f9-36f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "4300e79b-18f8-40cf-8e71-cfc769726583" + "x-ms-request-id" : "81bc7b1f-901e-004e-3138-59bf0a000000", + "Date" : "Mon, 13 Jul 2020 17:12:19 GMT", + "x-ms-client-request-id" : "127c6720-2dd4-49eb-91a4-99036868712e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0456445ef69138e244/javablobuploadpagefromurldestinationac258395b5e922593", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc/javablobuploadpagefromurldestinationac26141286c596f98", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "09454b68-0bc4-402b-a788-6a020dae458b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb965b7c-ba93-44d6-933c-4cac9679ff81" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF9540F1", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "ETag" : "0x8D8274FE73A6C3B", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:20 GMT", + "x-ms-version-id" : "2020-07-13T17:12:20.8200519Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1876eb-301e-00f9-3ef7-12fa96000000", + "x-ms-request-id" : "fa223248-401e-0000-2a38-599182000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "09454b68-0bc4-402b-a788-6a020dae458b" + "Date" : "Mon, 13 Jul 2020 17:12:19 GMT", + "x-ms-client-request-id" : "bb965b7c-ba93-44d6-933c-4cac9679ff81" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0456445ef69138e244/javablobuploadpagefromurldestinationac258395b5e922593?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc/javablobuploadpagefromurldestinationac26141286c596f98?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7970397a-2576-474c-9c2c-545daa357138", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9c9dcb0-2be0-4bbf-aa36-6b4a33ef08d2", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "EKr8ChpQFpk=", + "x-ms-content-crc64" : "BMrOjnmDkJI=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:21 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "ETag" : "0x8D7E10ECFB15B2D", + "Date" : "Mon, 13 Jul 2020 17:12:20 GMT", + "ETag" : "0x8D8274FE76BE57C", "Content-Length" : "0", - "x-ms-request-id" : "6b187713-301e-00f9-60f7-12fa96000000", - "x-ms-client-request-id" : "7970397a-2576-474c-9c2c-545daa357138" + "x-ms-request-id" : "4934656a-801e-0052-7a38-59ed6a000000", + "x-ms-client-request-id" : "b9c9dcb0-2be0-4bbf-aa36-6b4a33ef08d2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0456445ef69138e244/javablobuploadpagefromurldestinationac13118355752d246?comp=lease", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc/javablobuploadpagefromurldestinationac1417912369dcaf0?comp=lease", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7d2230ee-eb26-4648-a848-302f7437d5eb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5a8403d3-84cb-4c0c-9801-b50c8ed7e1a2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECF85D3EF", - "x-ms-lease-id" : "e6125bfe-4dc8-48b7-b953-66bcd3b5ba79", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "ETag" : "0x8D8274FE6A2080A", + "x-ms-lease-id" : "5edf0dd3-2e89-4c49-9a27-11c05a45bc7a", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18771b-301e-00f9-67f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "7d2230ee-eb26-4648-a848-302f7437d5eb" + "x-ms-request-id" : "a8f9d171-701e-0069-1438-59a8ce000000", + "Date" : "Mon, 13 Jul 2020 17:12:20 GMT", + "x-ms-client-request-id" : "5a8403d3-84cb-4c0c-9801-b50c8ed7e1a2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0456445ef69138e244/javablobuploadpagefromurldestinationac13118355752d246?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc/javablobuploadpagefromurldestinationac1417912369dcaf0?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b0367b2e-48c1-45c4-a0c4-9cb46db8422f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7f0dfda-0899-4fa0-98a5-b1ec883fb9ce" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:21 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "Content-MD5" : "rO8p92/iBGa2ct4wRJUiag==", - "ETag" : "0x8D7E10ECFC079F8", + "Date" : "Mon, 13 Jul 2020 17:12:21 GMT", + "Content-MD5" : "d2xhpj4atTDaaVbpP9vIJg==", + "ETag" : "0x8D8274FE7D6EFCD", "Content-Length" : "0", - "x-ms-request-id" : "6b18772a-301e-00f9-71f7-12fa96000000", - "x-ms-client-request-id" : "b0367b2e-48c1-45c4-a0c4-9cb46db8422f" + "x-ms-request-id" : "8411d4ba-c01e-0043-1e38-5977de000000", + "x-ms-client-request-id" : "a7f0dfda-0899-4fa0-98a5-b1ec883fb9ce" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1def9949-deee-4fee-aa2a-1208f827f05f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8b3f57ee-858b-452c-82fe-ca75eca018fc" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187730-301e-00f9-76f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac0456445ef69138e244Wed, 15 Apr 2020 07:30:02 GMT\"0x8D7E10ECF8CCF27\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "1def9949-deee-4fee-aa2a-1208f827f05f", + "x-ms-request-id" : "88c6d56a-101e-0032-2538-5991f5000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac0958604e6dbe27f7dcMon, 13 Jul 2020 17:12:20 GMT\"0x8D8274FE703D53F\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:21 GMT", + "x-ms-client-request-id" : "8b3f57ee-858b-452c-82fe-ca75eca018fc", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0456445ef69138e244?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0958604e6dbe27f7dc?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a3f51c0d-4bf6-45a3-a95c-d40e780d613a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "076fa939-9f8f-4e4f-9044-ef332fdb927d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b18773d-301e-00f9-80f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "a3f51c0d-4bf6-45a3-a95c-d40e780d613a" + "x-ms-request-id" : "b02e9ff6-d01e-0070-0738-592875000000", + "Date" : "Mon, 13 Jul 2020 17:12:22 GMT", + "x-ms-client-request-id" : "076fa939-9f8f-4e4f-9044-ef332fdb927d" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac0456445ef69138e244", "javablobuploadpagefromurldestinationac13118355752d246", "javablobuploadpagefromurldestinationac258395b5e922593", "bad461af-2fe8-4260-a25a-d9684778033d" ] + "variables" : [ "jtcuploadpagefromurldestinationac0958604e6dbe27f7dc", "javablobuploadpagefromurldestinationac1417912369dcaf0", "javablobuploadpagefromurldestinationac26141286c596f98", "f1fd1434-ef21-4369-a0e1-4f564b726223" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[6].json index 4f665106369f..11edec65d546 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[6].json @@ -1,181 +1,201 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac034857af9510566b52?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac065072e6bb8f134979?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a2e94ffb-bb35-4924-8501-cc942ded2c15" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "68d660e1-229f-43e2-9261-96b6ea43cbfb" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECFD4C62E", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "ETag" : "0x8D8274FE87907E4", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187745-301e-00f9-06f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "a2e94ffb-bb35-4924-8501-cc942ded2c15" + "x-ms-request-id" : "0b80366a-401e-0086-3f38-595d3b000000", + "Date" : "Mon, 13 Jul 2020 17:12:22 GMT", + "x-ms-client-request-id" : "68d660e1-229f-43e2-9261-96b6ea43cbfb" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac034857af9510566b52/javablobuploadpagefromurldestinationac197573fad0033fb", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac065072e6bb8f134979/javablobuploadpagefromurldestinationac198475d6d5ea89d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6564b41a-2c68-4721-b632-52cb54d23d2b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c5873885-31c0-4125-ae14-8bab377538c3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECFDCE263", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "ETag" : "0x8D8274FE8AAE131", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:23 GMT", + "x-ms-version-id" : "2020-07-13T17:12:23.2337713Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187750-301e-00f9-10f7-12fa96000000", + "x-ms-request-id" : "f8bc70c2-c01e-00a7-1438-597940000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "6564b41a-2c68-4721-b632-52cb54d23d2b" + "Date" : "Mon, 13 Jul 2020 17:12:22 GMT", + "x-ms-client-request-id" : "c5873885-31c0-4125-ae14-8bab377538c3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac034857af9510566b52?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac065072e6bb8f134979/javablobuploadpagefromurldestinationac198475d6d5ea89d?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ff321b5a-e0a4-4786-ada3-4b11e3d80ac5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9dc95b42-a494-49cf-a82b-56fc23967071", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECFE47A8E", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:02 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "40e3628a-e01e-0026-6238-59d99a000000", + "Date" : "Mon, 13 Jul 2020 17:12:23 GMT", + "x-ms-client-request-id" : "9dc95b42-a494-49cf-a82b-56fc23967071" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac065072e6bb8f134979?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8fb49d23-800e-440a-b333-08e9cc64fa15", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FE914C662", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b18775b-301e-00f9-1af7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "ff321b5a-e0a4-4786-ada3-4b11e3d80ac5" + "x-ms-request-id" : "9cb5d02b-901e-0003-5838-5970e6000000", + "Date" : "Mon, 13 Jul 2020 17:12:23 GMT", + "x-ms-client-request-id" : "8fb49d23-800e-440a-b333-08e9cc64fa15" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac034857af9510566b52/javablobuploadpagefromurldestinationac281533f485f481e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac065072e6bb8f134979/javablobuploadpagefromurldestinationac22614857e37ee00", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "13e2ad88-0567-4eb7-8307-26ec0510ca49" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6390641-59bd-499c-a8b1-8851d23b0676" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ECFEC0132", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "ETag" : "0x8D8274FE94568A2", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:24 GMT", + "x-ms-version-id" : "2020-07-13T17:12:24.2464930Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187764-301e-00f9-23f7-12fa96000000", + "x-ms-request-id" : "d396ef64-a01e-0055-0a38-598109000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:02 GMT", - "x-ms-client-request-id" : "13e2ad88-0567-4eb7-8307-26ec0510ca49" + "Date" : "Mon, 13 Jul 2020 17:12:23 GMT", + "x-ms-client-request-id" : "e6390641-59bd-499c-a8b1-8851d23b0676" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac034857af9510566b52/javablobuploadpagefromurldestinationac281533f485f481e?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac065072e6bb8f134979/javablobuploadpagefromurldestinationac22614857e37ee00?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "17289d05-2d39-4cb7-aaeb-2915ddc62130", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a29c0cc-b9d7-4438-91ec-9b2ce7ad88bf", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "pE+xeASBLps=", + "x-ms-content-crc64" : "meInURds15k=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:24 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "ETag" : "0x8D7E10ECFF615B6", + "Date" : "Mon, 13 Jul 2020 17:12:24 GMT", + "ETag" : "0x8D8274FE97868E0", "Content-Length" : "0", - "x-ms-request-id" : "6b187773-301e-00f9-2ff7-12fa96000000", - "x-ms-client-request-id" : "17289d05-2d39-4cb7-aaeb-2915ddc62130" + "x-ms-request-id" : "f8447f94-601e-0007-7338-59fde1000000", + "x-ms-client-request-id" : "3a29c0cc-b9d7-4438-91ec-9b2ce7ad88bf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac034857af9510566b52/javablobuploadpagefromurldestinationac197573fad0033fb?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac065072e6bb8f134979/javablobuploadpagefromurldestinationac198475d6d5ea89d?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a80ea409-dce4-4d52-bf98-0775cd04d8f9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cc8ba560-dc9a-4184-b6fe-6677d034010a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:24 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "Content-MD5" : "A+BZp9RCJeYffQL/VJi/CQ==", - "ETag" : "0x8D7E10ECFFEF175", + "Date" : "Mon, 13 Jul 2020 17:12:24 GMT", + "Content-MD5" : "M2qSJqjLlNjdWBGyJ9EaXg==", + "ETag" : "0x8D8274FE9B3A7D2", "Content-Length" : "0", - "x-ms-request-id" : "6b187783-301e-00f9-3cf7-12fa96000000", - "x-ms-client-request-id" : "a80ea409-dce4-4d52-bf98-0775cd04d8f9" + "x-ms-request-id" : "34f45d5c-401e-0096-1738-599853000000", + "x-ms-client-request-id" : "cc8ba560-dc9a-4184-b6fe-6677d034010a" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4748bac1-d43d-4b82-8134-2653480045b7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "06b57b99-12e6-4b00-adfe-12a2b0639dec" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187792-301e-00f9-4bf7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac034857af9510566b52Wed, 15 Apr 2020 07:30:02 GMT\"0x8D7E10ECFE47A8E\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "4748bac1-d43d-4b82-8134-2653480045b7", + "x-ms-request-id" : "782a071f-801e-0020-5538-59ea25000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac065072e6bb8f134979Mon, 13 Jul 2020 17:12:23 GMT\"0x8D8274FE914C662\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:24 GMT", + "x-ms-client-request-id" : "06b57b99-12e6-4b00-adfe-12a2b0639dec", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac034857af9510566b52?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac065072e6bb8f134979?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c4643830-2a60-4ead-8b62-90621a894f7f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c406d926-2f7e-41df-b0d8-f0784b9eafc6" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1877a1-301e-00f9-58f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "c4643830-2a60-4ead-8b62-90621a894f7f" + "x-ms-request-id" : "08afa229-901e-005e-3e38-597a62000000", + "Date" : "Mon, 13 Jul 2020 17:12:24 GMT", + "x-ms-client-request-id" : "c406d926-2f7e-41df-b0d8-f0784b9eafc6" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac034857af9510566b52", "javablobuploadpagefromurldestinationac197573fad0033fb", "javablobuploadpagefromurldestinationac281533f485f481e", "dbace549-f0f8-4161-b635-5350001c1e20" ] + "variables" : [ "jtcuploadpagefromurldestinationac065072e6bb8f134979", "javablobuploadpagefromurldestinationac198475d6d5ea89d", "javablobuploadpagefromurldestinationac22614857e37ee00", "ad374f74-9848-4edf-aaf8-9054795c642e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[7].json index f7b87f43eac3..f32f6d452c6c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[7].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[7].json @@ -1,181 +1,201 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac015506e4dabd03730a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac074291561bab7be047?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "42709533-b84d-4568-852b-07f586d05ebe" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "20395df9-8e86-4bc4-8da7-a215db6a0e0e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0156177", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "ETag" : "0x8D8274FEA51D52B", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1877b2-301e-00f9-65f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "42709533-b84d-4568-852b-07f586d05ebe" + "x-ms-request-id" : "6edf703b-301e-009c-0c38-593ce4000000", + "Date" : "Mon, 13 Jul 2020 17:12:25 GMT", + "x-ms-client-request-id" : "20395df9-8e86-4bc4-8da7-a215db6a0e0e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac015506e4dabd03730a/javablobuploadpagefromurldestinationac153796ce4832c89", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac074291561bab7be047/javablobuploadpagefromurldestinationac1069702b88f8f59", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3b12f7cb-2dea-47a4-980e-bd70e2e85737" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1624705c-7f2a-48e4-bf54-23174511469f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED01C4477", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "ETag" : "0x8D8274FEA85EB3E", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:26 GMT", + "x-ms-version-id" : "2020-07-13T17:12:26.3479887Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1877c0-301e-00f9-71f7-12fa96000000", + "x-ms-request-id" : "c5942bb9-d01e-003d-4538-59e799000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "3b12f7cb-2dea-47a4-980e-bd70e2e85737" + "Date" : "Mon, 13 Jul 2020 17:12:25 GMT", + "x-ms-client-request-id" : "1624705c-7f2a-48e4-bf54-23174511469f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac015506e4dabd03730a?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac074291561bab7be047/javablobuploadpagefromurldestinationac1069702b88f8f59?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fc179cde-eb3b-434e-b345-cdf4b2e5ffd0", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5d2c060d-0183-4408-89af-5dfd4e06b934", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED023B5F1", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "4b9695a8-f01e-0067-5b38-59817e000000", + "Date" : "Mon, 13 Jul 2020 17:12:25 GMT", + "x-ms-client-request-id" : "5d2c060d-0183-4408-89af-5dfd4e06b934" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac074291561bab7be047?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f246de1-d187-426d-947a-1b1a1d585546", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FEAF61343", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1877c7-301e-00f9-78f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "fc179cde-eb3b-434e-b345-cdf4b2e5ffd0" + "x-ms-request-id" : "1f032ff7-801e-007d-2d38-59e0a1000000", + "Date" : "Mon, 13 Jul 2020 17:12:26 GMT", + "x-ms-client-request-id" : "3f246de1-d187-426d-947a-1b1a1d585546" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac015506e4dabd03730a/javablobuploadpagefromurldestinationac274404baae3ae47", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac074291561bab7be047/javablobuploadpagefromurldestinationac27179941af8613d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a74dd6a6-c70d-428f-8fc0-fa4dbfc5a7ed" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "642814df-d793-4267-998f-eaf3357b8a56" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED02BB175", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "ETag" : "0x8D8274FEB2C0D8C", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:27 GMT", + "x-ms-version-id" : "2020-07-13T17:12:27.4357644Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1877d2-301e-00f9-02f7-12fa96000000", + "x-ms-request-id" : "47750970-201e-0080-5438-596e84000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "a74dd6a6-c70d-428f-8fc0-fa4dbfc5a7ed" + "Date" : "Mon, 13 Jul 2020 17:12:27 GMT", + "x-ms-client-request-id" : "642814df-d793-4267-998f-eaf3357b8a56" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac015506e4dabd03730a/javablobuploadpagefromurldestinationac274404baae3ae47?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac074291561bab7be047/javablobuploadpagefromurldestinationac27179941af8613d?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "29415c4a-11e0-472e-a7cb-64e7d8df2a79", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "406eb778-f6d5-4be7-bcb0-0c21785c7a31", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "SsocjzNf4DI=", + "x-ms-content-crc64" : "M77D0dM6NsQ=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:27 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "ETag" : "0x8D7E10ED03290EC", + "Date" : "Mon, 13 Jul 2020 17:12:27 GMT", + "ETag" : "0x8D8274FEB65777B", "Content-Length" : "0", - "x-ms-request-id" : "6b1877e9-301e-00f9-14f7-12fa96000000", - "x-ms-client-request-id" : "29415c4a-11e0-472e-a7cb-64e7d8df2a79" + "x-ms-request-id" : "1abc6583-401e-003f-3938-595921000000", + "x-ms-client-request-id" : "406eb778-f6d5-4be7-bcb0-0c21785c7a31" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac015506e4dabd03730a/javablobuploadpagefromurldestinationac153796ce4832c89?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac074291561bab7be047/javablobuploadpagefromurldestinationac1069702b88f8f59?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1a295ad7-fdf7-4805-8ea9-c2d0c3b5d7ba" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6b490994-576c-46e5-8962-b2a44b0fb04d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:28 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "Content-MD5" : "4w5qrWbU1pbl22gueXBjlA==", - "ETag" : "0x8D7E10ED03B458E", + "Date" : "Mon, 13 Jul 2020 17:12:27 GMT", + "Content-MD5" : "YgEJIhIbj2QGKCkHZxBWAw==", + "ETag" : "0x8D8274FEB9CBE2F", "Content-Length" : "0", - "x-ms-request-id" : "6b1877f1-301e-00f9-1bf7-12fa96000000", - "x-ms-client-request-id" : "1a295ad7-fdf7-4805-8ea9-c2d0c3b5d7ba" + "x-ms-request-id" : "73327636-401e-0062-4438-5953a5000000", + "x-ms-client-request-id" : "6b490994-576c-46e5-8962-b2a44b0fb04d" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "62e0c029-d60e-4463-89af-c01484cbb7d8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "916b17fc-894b-4728-bc5f-5d74dac2daf4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1877fd-301e-00f9-24f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac015506e4dabd03730aWed, 15 Apr 2020 07:30:03 GMT\"0x8D7E10ED023B5F1\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "62e0c029-d60e-4463-89af-c01484cbb7d8", + "x-ms-request-id" : "cf6f511b-001e-0001-5538-59ce5e000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac074291561bab7be047Mon, 13 Jul 2020 17:12:27 GMT\"0x8D8274FEAF61343\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:27 GMT", + "x-ms-client-request-id" : "916b17fc-894b-4728-bc5f-5d74dac2daf4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac015506e4dabd03730a?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac074291561bab7be047?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "77c4fe30-d4fa-44b7-9a94-3d2230a8b6e5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "192c12c0-bb62-47ad-935f-a6fc792547d3" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187803-301e-00f9-2af7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "77c4fe30-d4fa-44b7-9a94-3d2230a8b6e5" + "x-ms-request-id" : "a7ba711f-b01e-002b-7538-59114e000000", + "Date" : "Mon, 13 Jul 2020 17:12:28 GMT", + "x-ms-client-request-id" : "192c12c0-bb62-47ad-935f-a6fc792547d3" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac015506e4dabd03730a", "javablobuploadpagefromurldestinationac153796ce4832c89", "javablobuploadpagefromurldestinationac274404baae3ae47", "5745ae83-d03f-4651-91ee-1ecaae6bca28" ] + "variables" : [ "jtcuploadpagefromurldestinationac074291561bab7be047", "javablobuploadpagefromurldestinationac1069702b88f8f59", "javablobuploadpagefromurldestinationac27179941af8613d", "83bce712-075e-4b37-8832-d2dfb78fcf9f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[8].json index f38f7b667a7e..4ef96da962ee 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[8].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[8].json @@ -1,181 +1,201 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0725085a0626b25f31?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0048136dfa49fda4ff?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c2830ae0-5e44-4a5e-b856-a8563588d4a0" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb0027bf-bd37-4ff2-8671-624ac4d4d326" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0518EE0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "ETag" : "0x8D8274FEC3DB24A", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187812-301e-00f9-38f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "c2830ae0-5e44-4a5e-b856-a8563588d4a0" + "x-ms-request-id" : "54bfea3e-f01e-0005-0938-594359000000", + "Date" : "Mon, 13 Jul 2020 17:12:28 GMT", + "x-ms-client-request-id" : "fb0027bf-bd37-4ff2-8671-624ac4d4d326" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0725085a0626b25f31/javablobuploadpagefromurldestinationac162403a3ba6e9cd", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0048136dfa49fda4ff/javablobuploadpagefromurldestinationac13443679ca30bbd", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ba656c34-f22a-4f38-b6be-83afacc07d40" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "483f45cf-f032-46b9-8ab5-051fee3f2f42" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0589895", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "ETag" : "0x8D8274FEC720F65", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:29 GMT", + "x-ms-version-id" : "2020-07-13T17:12:29.5722853Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18781e-301e-00f9-42f7-12fa96000000", + "x-ms-request-id" : "fb6f729e-501e-001c-4538-59c3e2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "ba656c34-f22a-4f38-b6be-83afacc07d40" + "Date" : "Mon, 13 Jul 2020 17:12:28 GMT", + "x-ms-client-request-id" : "483f45cf-f032-46b9-8ab5-051fee3f2f42" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0725085a0626b25f31?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0048136dfa49fda4ff/javablobuploadpagefromurldestinationac13443679ca30bbd?comp=tags", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "17f895ad-bb4f-41a4-8009-cf11ed3fd621", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5192e4a-92a1-478b-b73f-c0912b484755", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED05F6E0A", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0ee56adb-301e-000a-0b38-593535000000", + "Date" : "Mon, 13 Jul 2020 17:12:29 GMT", + "x-ms-client-request-id" : "d5192e4a-92a1-478b-b73f-c0912b484755" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0048136dfa49fda4ff?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ecfad70-a99c-4b0d-86b5-656dcf2f12ab", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FECDC433B", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:30 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187828-301e-00f9-4bf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "17f895ad-bb4f-41a4-8009-cf11ed3fd621" + "x-ms-request-id" : "a85c964f-a01e-0037-5038-59432e000000", + "Date" : "Mon, 13 Jul 2020 17:12:29 GMT", + "x-ms-client-request-id" : "0ecfad70-a99c-4b0d-86b5-656dcf2f12ab" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0725085a0626b25f31/javablobuploadpagefromurldestinationac291076896a86904", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0048136dfa49fda4ff/javablobuploadpagefromurldestinationac29890573b668fd5", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8e99607f-577c-405c-916e-a4567a79ae66" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b6064cc1-fc52-4631-8aa9-8897f5c50414" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED066577A", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "ETag" : "0x8D8274FED1179B1", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:30 GMT", + "x-ms-version-id" : "2020-07-13T17:12:30.6170289Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18783d-301e-00f9-5bf7-12fa96000000", + "x-ms-request-id" : "ad1e60e2-001e-004c-0e38-5901b2000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "8e99607f-577c-405c-916e-a4567a79ae66" + "Date" : "Mon, 13 Jul 2020 17:12:29 GMT", + "x-ms-client-request-id" : "b6064cc1-fc52-4631-8aa9-8897f5c50414" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0725085a0626b25f31/javablobuploadpagefromurldestinationac291076896a86904?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0048136dfa49fda4ff/javablobuploadpagefromurldestinationac29890573b668fd5?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9f97bde5-b164-4fca-a1e7-28d71597715b", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "130a2c49-6b63-4779-8757-9545d9a470c9", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "rh7vQ2NDtUY=", + "x-ms-content-crc64" : "m6mSkvZu0Zg=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "ETag" : "0x8D7E10ED06D5E0C", + "Date" : "Mon, 13 Jul 2020 17:12:30 GMT", + "ETag" : "0x8D8274FED476092", "Content-Length" : "0", - "x-ms-request-id" : "6b187842-301e-00f9-60f7-12fa96000000", - "x-ms-client-request-id" : "9f97bde5-b164-4fca-a1e7-28d71597715b" + "x-ms-request-id" : "3d8c6a81-f01e-0015-0e38-598631000000", + "x-ms-client-request-id" : "130a2c49-6b63-4779-8757-9545d9a470c9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0725085a0626b25f31/javablobuploadpagefromurldestinationac162403a3ba6e9cd?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0048136dfa49fda4ff/javablobuploadpagefromurldestinationac13443679ca30bbd?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27fa4d69-3e96-4c00-9c52-d51ca2c833f3" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee5668b0-6b12-4b62-bafa-1611c30b217f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:03 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:31 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "Content-MD5" : "JVIq1ufn8N5W40QzN+nI8Q==", - "ETag" : "0x8D7E10ED0752816", + "Date" : "Mon, 13 Jul 2020 17:12:31 GMT", + "Content-MD5" : "mGGvTPKs8fQ8/9bD1jk6bg==", + "ETag" : "0x8D8274FED8BF024", "Content-Length" : "0", - "x-ms-request-id" : "6b18784a-301e-00f9-68f7-12fa96000000", - "x-ms-client-request-id" : "27fa4d69-3e96-4c00-9c52-d51ca2c833f3" + "x-ms-request-id" : "74d031bc-c01e-0053-4238-59b2b6000000", + "x-ms-client-request-id" : "ee5668b0-6b12-4b62-bafa-1611c30b217f" }, "Exception" : null }, { "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8e661e37-eb80-4001-87df-957c58eeb60c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "02460003-1447-403b-85ee-7ddc73c8a918" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187850-301e-00f9-6ef7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac0725085a0626b25f31Wed, 15 Apr 2020 07:30:03 GMT\"0x8D7E10ED05F6E0A\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "8e661e37-eb80-4001-87df-957c58eeb60c", + "x-ms-request-id" : "0d5a410a-501e-007e-2f38-5901c5000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac0048136dfa49fda4ffMon, 13 Jul 2020 17:12:30 GMT\"0x8D8274FECDC433B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:31 GMT", + "x-ms-client-request-id" : "02460003-1447-403b-85ee-7ddc73c8a918", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0725085a0626b25f31?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac0048136dfa49fda4ff?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9c0a9de5-5b2b-4607-a9ed-e94b4d3e7f02" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6dbd0fe3-ed2c-424f-8204-8c6df3ea9635" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187867-301e-00f9-01f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:03 GMT", - "x-ms-client-request-id" : "9c0a9de5-5b2b-4607-a9ed-e94b4d3e7f02" + "x-ms-request-id" : "c20ed433-c01e-006c-0b38-597a15000000", + "Date" : "Mon, 13 Jul 2020 17:12:31 GMT", + "x-ms-client-request-id" : "6dbd0fe3-ed2c-424f-8204-8c6df3ea9635" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationac0725085a0626b25f31", "javablobuploadpagefromurldestinationac162403a3ba6e9cd", "javablobuploadpagefromurldestinationac291076896a86904", "6a55af92-dafe-4f3c-a715-59efbe9a629e" ] + "variables" : [ "jtcuploadpagefromurldestinationac0048136dfa49fda4ff", "javablobuploadpagefromurldestinationac13443679ca30bbd", "javablobuploadpagefromurldestinationac29890573b668fd5", "6136a8da-0d75-4d73-bd07-27e506af40aa" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[9].json new file mode 100644 index 000000000000..f9471f882008 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationac[9].json @@ -0,0 +1,201 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac097099285b70366808?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66371fc0-3351-4462-a194-24d7b3ab9e67" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FEE2A5378", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "76326551-001e-0097-7d38-59c78f000000", + "Date" : "Mon, 13 Jul 2020 17:12:32 GMT", + "x-ms-client-request-id" : "66371fc0-3351-4462-a194-24d7b3ab9e67" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac097099285b70366808/javablobuploadpagefromurldestinationac1069470332235c9", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed3d710a-f6d0-4399-9cc2-6837ee42acaf" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FEE62C83D", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:32 GMT", + "x-ms-version-id" : "2020-07-13T17:12:32.8276029Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "4a896a57-801e-0099-7538-59ee3f000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:12:32 GMT", + "x-ms-client-request-id" : "ed3d710a-f6d0-4399-9cc2-6837ee42acaf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac097099285b70366808/javablobuploadpagefromurldestinationac1069470332235c9?comp=tags", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d50da4a8-ac24-4c9d-9a7e-b37b5ae47900", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "b87d4263-201e-0006-3d38-59a23d000000", + "Date" : "Mon, 13 Jul 2020 17:12:32 GMT", + "x-ms-client-request-id" : "d50da4a8-ac24-4c9d-9a7e-b37b5ae47900" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac097099285b70366808?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "622b799f-e766-4b3d-a2be-ae9a1a7cd79d", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FEED20645", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "72545d3e-e01e-009f-4f38-59dd80000000", + "Date" : "Mon, 13 Jul 2020 17:12:32 GMT", + "x-ms-client-request-id" : "622b799f-e766-4b3d-a2be-ae9a1a7cd79d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac097099285b70366808/javablobuploadpagefromurldestinationac245604fcf83a891", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "78a8e7e3-b996-442f-81d1-4fc09e0ee45c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FEF05DCBD", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:33 GMT", + "x-ms-version-id" : "2020-07-13T17:12:33.8963645Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "da57acd1-201e-0029-1238-59aff6000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:12:33 GMT", + "x-ms-client-request-id" : "78a8e7e3-b996-442f-81d1-4fc09e0ee45c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac097099285b70366808/javablobuploadpagefromurldestinationac245604fcf83a891?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5f452c39-349c-4f74-b63f-333fd53abddd", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "kspBuYWyqEs=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:34 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:12:34 GMT", + "ETag" : "0x8D8274FEF3B7570", + "Content-Length" : "0", + "x-ms-request-id" : "891af734-a01e-0018-2a38-594ee5000000", + "x-ms-client-request-id" : "5f452c39-349c-4f74-b63f-333fd53abddd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac097099285b70366808/javablobuploadpagefromurldestinationac1069470332235c9?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2228db93-5f03-4393-bce9-12945e49a820" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Mon, 13 Jul 2020 17:12:34 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:12:34 GMT", + "Content-MD5" : "4559fm+o4Mf9pWTkl0FV7Q==", + "ETag" : "0x8D8274FEF7E5706", + "Content-Length" : "0", + "x-ms-request-id" : "f5955d35-301e-001a-5338-59f05d000000", + "x-ms-client-request-id" : "2228db93-5f03-4393-bce9-12945e49a820" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationac&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a089fbd7-e94f-493c-aa38-6fb7d0ec6351" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "36bf111a-101e-001d-3e38-599c3e000000", + "Body" : "jtcuploadpagefromurldestinationacjtcuploadpagefromurldestinationac097099285b70366808Mon, 13 Jul 2020 17:12:33 GMT\"0x8D8274FEED20645\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:12:34 GMT", + "x-ms-client-request-id" : "a089fbd7-e94f-493c-aa38-6fb7d0ec6351", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationac097099285b70366808?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca753559-b0c0-4f2f-b9d3-7f267a94fd3e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "196ab2d1-201e-005b-5b38-59a8b9000000", + "Date" : "Mon, 13 Jul 2020 17:12:35 GMT", + "x-ms-client-request-id" : "ca753559-b0c0-4f2f-b9d3-7f267a94fd3e" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadpagefromurldestinationac097099285b70366808", "javablobuploadpagefromurldestinationac1069470332235c9", "javablobuploadpagefromurldestinationac245604fcf83a891", "c815ed58-dbaf-4d27-aaf1-29e67873574f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[0].json index 0ea13595b880..f8ecc0a99bbc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[0].json @@ -1,135 +1,137 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail055894327ba4a973?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail002748f3fd5e885a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5b529087-a6ee-4584-917d-3446d9e6662b" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "27c53752-61dd-40c5-81e9-a03a77cd065f" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED08BBFFA", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC286CA83", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187880-301e-00f9-16f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "5b529087-a6ee-4584-917d-3446d9e6662b" + "x-ms-request-id" : "f5953092-301e-001a-5838-59f05d000000", + "Date" : "Mon, 13 Jul 2020 17:11:18 GMT", + "x-ms-client-request-id" : "27c53752-61dd-40c5-81e9-a03a77cd065f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail055894327ba4a973/javablobuploadpagefromurldestinationacfail16951876aa0a1", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail002748f3fd5e885a/javablobuploadpagefromurldestinationacfail1943505b24553", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ad879117-9789-4dbf-96b2-25ab8dc28b8c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d702272-b7c3-46b6-91eb-ab549ae1eaff" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0927B27", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC300653A", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:20 GMT", + "x-ms-version-id" : "2020-07-13T17:11:20.0407866Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b18788c-301e-00f9-20f7-12fa96000000", + "x-ms-request-id" : "36be9b91-101e-001d-6d38-599c3e000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "ad879117-9789-4dbf-96b2-25ab8dc28b8c" + "Date" : "Mon, 13 Jul 2020 17:11:19 GMT", + "x-ms-client-request-id" : "6d702272-b7c3-46b6-91eb-ab549ae1eaff" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail055894327ba4a973?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail002748f3fd5e885a?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1158edcd-91d7-495a-9ff2-dd3ab611a678", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "55a3e867-67ee-4fbc-b124-38ff28008fe6", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED09950E7", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC34CCD6B", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1878a2-301e-00f9-32f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "1158edcd-91d7-495a-9ff2-dd3ab611a678" + "x-ms-request-id" : "196a2b06-201e-005b-6338-59a8b9000000", + "Date" : "Mon, 13 Jul 2020 17:11:20 GMT", + "x-ms-client-request-id" : "55a3e867-67ee-4fbc-b124-38ff28008fe6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail055894327ba4a973/javablobuploadpagefromurldestinationacfail23024589587a6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail002748f3fd5e885a/javablobuploadpagefromurldestinationacfail2414821dd7f5f", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "86292ad3-9dca-49a2-8004-36507b4a6c18" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c4edbbe8-0e04-48d2-8697-da73b389b9ab" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0A0FD88", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC38C6B1D", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:20 GMT", + "x-ms-version-id" : "2020-07-13T17:11:20.9584413Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1878ac-301e-00f9-3cf7-12fa96000000", + "x-ms-request-id" : "2e37f06e-101e-000d-7638-595956000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "86292ad3-9dca-49a2-8004-36507b4a6c18" + "Date" : "Mon, 13 Jul 2020 17:11:20 GMT", + "x-ms-client-request-id" : "c4edbbe8-0e04-48d2-8697-da73b389b9ab" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail055894327ba4a973/javablobuploadpagefromurldestinationacfail23024589587a6?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail002748f3fd5e885a/javablobuploadpagefromurldestinationacfail2414821dd7f5f?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "179f9723-0a98-49b5-bd11-d15d6712219e", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "339d392b-f853-4f2b-b480-7718581bc6d5", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Xo9AQLZG9fs=", + "x-ms-content-crc64" : "eNTrOzpNUs8=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:21 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "ETag" : "0x8D7E10ED0A7B5DE", + "Date" : "Mon, 13 Jul 2020 17:11:21 GMT", + "ETag" : "0x8D8274FC3CCB41A", "Content-Length" : "0", - "x-ms-request-id" : "6b1878b9-301e-00f9-45f7-12fa96000000", - "x-ms-client-request-id" : "179f9723-0a98-49b5-bd11-d15d6712219e" + "x-ms-request-id" : "a1b25a74-801e-000f-3a38-59e7ee000000", + "x-ms-client-request-id" : "339d392b-f853-4f2b-b480-7718581bc6d5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail055894327ba4a973/javablobuploadpagefromurldestinationacfail16951876aa0a1?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail002748f3fd5e885a/javablobuploadpagefromurldestinationacfail1943505b24553?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6d3e0078-f668-4d1b-81de-8e3a19dfe12f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b25cb2c3-256b-4469-ab01-e92c9299d65c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "253", "StatusCode" : "412", - "x-ms-request-id" : "6b1878c0-301e-00f9-4cf7-12fa96000000", - "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b1878c0-301e-00f9-4cf7-12fa96000000\nTime:2020-04-15T07:30:04.3208132Z", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "6d3e0078-f668-4d1b-81de-8e3a19dfe12f", + "x-ms-request-id" : "0595ca63-201e-0039-5c38-596a9e000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:0595ca63-201e-0039-5c38-596a9e000000\nTime:2020-07-13T17:11:21.8631641Z", + "Date" : "Mon, 13 Jul 2020 17:11:21 GMT", + "x-ms-client-request-id" : "b25cb2c3-256b-4469-ab01-e92c9299d65c", "Content-Type" : "application/xml" }, "Exception" : null @@ -137,43 +139,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "20dcb83e-3dc3-4612-bbb0-9db3820445b6" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a432647f-abe6-4b09-8141-d560cb28f377" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1878d5-301e-00f9-5df7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail055894327ba4a973Wed, 15 Apr 2020 07:30:04 GMT\"0x8D7E10ED09950E7\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "20dcb83e-3dc3-4612-bbb0-9db3820445b6", + "x-ms-request-id" : "9607a9a0-901e-0013-7838-59b58e000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail002748f3fd5e885aMon, 13 Jul 2020 17:11:20 GMT\"0x8D8274FC34CCD6B\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:22 GMT", + "x-ms-client-request-id" : "a432647f-abe6-4b09-8141-d560cb28f377", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail055894327ba4a973?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail002748f3fd5e885a?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6a3aa5ed-9265-462b-8a61-e40ddbb58cc7" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c21f2d3e-1e14-48c8-8b98-cdd8cdd7821a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1878df-301e-00f9-66f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "6a3aa5ed-9265-462b-8a61-e40ddbb58cc7" + "x-ms-request-id" : "8253c82a-001e-003e-5038-5906fd000000", + "Date" : "Mon, 13 Jul 2020 17:11:22 GMT", + "x-ms-client-request-id" : "c21f2d3e-1e14-48c8-8b98-cdd8cdd7821a" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationacfail055894327ba4a973", "javablobuploadpagefromurldestinationacfail16951876aa0a1", "javablobuploadpagefromurldestinationacfail23024589587a6", "95114de6-229d-43f1-8e0b-30d184d7c4c4" ] + "variables" : [ "jtcuploadpagefromurldestinationacfail002748f3fd5e885a", "javablobuploadpagefromurldestinationacfail1943505b24553", "javablobuploadpagefromurldestinationacfail2414821dd7f5f", "21a02e42-ba87-473a-967b-eff5bc4a73c0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[1].json index 57c95cebe02b..ae94016e3323 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[1].json @@ -1,135 +1,137 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail042519d7177bd925?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036843336efaafa4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "10f06623-7d54-45b8-9e42-203f8eb46929" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15755818-7b44-45c9-b79b-a0f626971523" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0CC3435", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC4D845E7", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1878ec-301e-00f9-73f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "10f06623-7d54-45b8-9e42-203f8eb46929" + "x-ms-request-id" : "f7fb2626-301e-0068-3138-59f712000000", + "Date" : "Mon, 13 Jul 2020 17:11:22 GMT", + "x-ms-client-request-id" : "15755818-7b44-45c9-b79b-a0f626971523" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail042519d7177bd925/javablobuploadpagefromurldestinationacfail1073974f793c6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036843336efaafa4/javablobuploadpagefromurldestinationacfail16335919c2606", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "90d7fc23-a583-486b-8684-f4fa09a3a084" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "21c7b2ea-6de5-4fd1-b9b1-7851f1a34590" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0D4EB31", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC50AC549", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:23 GMT", + "x-ms-version-id" : "2020-07-13T17:11:23.4642249Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b1878fc-301e-00f9-7ff7-12fa96000000", + "x-ms-request-id" : "eb2ee545-b01e-0092-3d38-591554000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "90d7fc23-a583-486b-8684-f4fa09a3a084" + "Date" : "Mon, 13 Jul 2020 17:11:22 GMT", + "x-ms-client-request-id" : "21c7b2ea-6de5-4fd1-b9b1-7851f1a34590" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail042519d7177bd925?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036843336efaafa4?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "47efd2d1-2679-49ee-8704-bb759a5112ac", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a84417d4-b79c-45ac-8dcd-8fc051e700e8", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0DD6F82", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC53CEA19", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187907-301e-00f9-09f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "47efd2d1-2679-49ee-8704-bb759a5112ac" + "x-ms-request-id" : "f8930ccf-e01e-0009-6238-59d451000000", + "Date" : "Mon, 13 Jul 2020 17:11:23 GMT", + "x-ms-client-request-id" : "a84417d4-b79c-45ac-8dcd-8fc051e700e8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail042519d7177bd925/javablobuploadpagefromurldestinationacfail247436c51664a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036843336efaafa4/javablobuploadpagefromurldestinationacfail20738324a8246", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ab274949-2695-4b3d-b336-fd2510097e4c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c3c5a3d-d10f-46cf-a545-8e8ec3094a4e" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED0E51BA7", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC56EF08C", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:24 GMT", + "x-ms-version-id" : "2020-07-13T17:11:24.1206924Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187913-301e-00f9-15f7-12fa96000000", + "x-ms-request-id" : "6411623c-301e-0047-5d38-59fad9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "ab274949-2695-4b3d-b336-fd2510097e4c" + "Date" : "Mon, 13 Jul 2020 17:11:23 GMT", + "x-ms-client-request-id" : "7c3c5a3d-d10f-46cf-a545-8e8ec3094a4e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail042519d7177bd925/javablobuploadpagefromurldestinationacfail247436c51664a?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036843336efaafa4/javablobuploadpagefromurldestinationacfail20738324a8246?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6dfb0bf1-f929-4903-9688-d5ae36e8c8e5", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8232eb39-af28-4c85-a4cc-025d6a556c9b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "wa+xrfGkANw=", + "x-ms-content-crc64" : "uxjK7QpU0C0=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:24 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "ETag" : "0x8D7E10ED0EC4950", + "Date" : "Mon, 13 Jul 2020 17:11:23 GMT", + "ETag" : "0x8D8274FC5A7BE30", "Content-Length" : "0", - "x-ms-request-id" : "6b187924-301e-00f9-24f7-12fa96000000", - "x-ms-client-request-id" : "6dfb0bf1-f929-4903-9688-d5ae36e8c8e5" + "x-ms-request-id" : "2b5d778b-401e-005d-4338-599b06000000", + "x-ms-client-request-id" : "8232eb39-af28-4c85-a4cc-025d6a556c9b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail042519d7177bd925/javablobuploadpagefromurldestinationacfail1073974f793c6?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036843336efaafa4/javablobuploadpagefromurldestinationacfail16335919c2606?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e7bf3eaa-f0ed-4481-a995-d853eefa4582" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca2751aa-434c-4481-ad28-e9251de6a7e8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "253", "StatusCode" : "412", - "x-ms-request-id" : "6b187931-301e-00f9-2ef7-12fa96000000", - "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b187931-301e-00f9-2ef7-12fa96000000\nTime:2020-04-15T07:30:04.7692440Z", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "e7bf3eaa-f0ed-4481-a995-d853eefa4582", + "x-ms-request-id" : "8dd9979a-e01e-00a0-4738-591523000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:8dd9979a-e01e-00a0-4738-591523000000\nTime:2020-07-13T17:11:24.9811383Z", + "Date" : "Mon, 13 Jul 2020 17:11:24 GMT", + "x-ms-client-request-id" : "ca2751aa-434c-4481-ad28-e9251de6a7e8", "Content-Type" : "application/xml" }, "Exception" : null @@ -137,43 +139,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "aac7b7bc-0237-4187-b8c2-e1965cd3e66e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3b2c35d-ac1c-4613-bec7-8a5e07332db2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b18793e-301e-00f9-39f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail042519d7177bd925Wed, 15 Apr 2020 07:30:04 GMT\"0x8D7E10ED0DD6F82\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "aac7b7bc-0237-4187-b8c2-e1965cd3e66e", + "x-ms-request-id" : "9abd503d-801e-0089-4838-592b57000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail036843336efaafa4Mon, 13 Jul 2020 17:11:23 GMT\"0x8D8274FC53CEA19\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:24 GMT", + "x-ms-client-request-id" : "e3b2c35d-ac1c-4613-bec7-8a5e07332db2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail042519d7177bd925?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036843336efaafa4?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "505527c6-cfd0-4a31-9d79-6ad06f4d21ed" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "78e4ae24-9f77-4280-ba53-09ecfd609321" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187959-301e-00f9-53f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "505527c6-cfd0-4a31-9d79-6ad06f4d21ed" + "x-ms-request-id" : "aa722b00-301e-0078-0838-59327a000000", + "Date" : "Mon, 13 Jul 2020 17:11:25 GMT", + "x-ms-client-request-id" : "78e4ae24-9f77-4280-ba53-09ecfd609321" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationacfail042519d7177bd925", "javablobuploadpagefromurldestinationacfail1073974f793c6", "javablobuploadpagefromurldestinationacfail247436c51664a", "25dd097b-edf6-4a2c-876d-0168b6c2724c" ] + "variables" : [ "jtcuploadpagefromurldestinationacfail036843336efaafa4", "javablobuploadpagefromurldestinationacfail16335919c2606", "javablobuploadpagefromurldestinationacfail20738324a8246", "6796cba7-ed2a-4148-a9a1-6bb8f43d5e22" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[2].json index a04263a3cc6b..cb45b4131884 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[2].json @@ -1,135 +1,137 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0342611143f17774?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail09176931791ebe31?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8da47149-107d-4c5f-b9f7-5509853aa17e" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5ddfff20-4eed-4590-b9d2-837dcfb96ca4" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED11079E9", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC69ADEB4", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187965-301e-00f9-5ef7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "8da47149-107d-4c5f-b9f7-5509853aa17e" + "x-ms-request-id" : "157074f8-b01e-0066-0538-59dea2000000", + "Date" : "Mon, 13 Jul 2020 17:11:25 GMT", + "x-ms-client-request-id" : "5ddfff20-4eed-4590-b9d2-837dcfb96ca4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0342611143f17774/javablobuploadpagefromurldestinationacfail152145e299bee", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail09176931791ebe31/javablobuploadpagefromurldestinationacfail171143a27032d", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8bcf974a-7521-410a-9c9f-49f5a3b1429a" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab0b0706-6652-4b28-97b5-9c1ba8c9a837" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED1173420", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:04 GMT", + "ETag" : "0x8D8274FC6CE999A", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:26 GMT", + "x-ms-version-id" : "2020-07-13T17:11:26.4263343Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187971-301e-00f9-68f7-12fa96000000", + "x-ms-request-id" : "60596cf4-b01e-0004-7738-591c85000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "8bcf974a-7521-410a-9c9f-49f5a3b1429a" + "Date" : "Mon, 13 Jul 2020 17:11:25 GMT", + "x-ms-client-request-id" : "ab0b0706-6652-4b28-97b5-9c1ba8c9a837" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0342611143f17774?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail09176931791ebe31?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b08cb340-61c1-47ac-8a2e-1a564a1a1411", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "58427e0b-f4c6-41c0-a039-d2d5330ada5a", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED11E5902", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "ETag" : "0x8D8274FC70AD285", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b18797a-301e-00f9-6ff7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:04 GMT", - "x-ms-client-request-id" : "b08cb340-61c1-47ac-8a2e-1a564a1a1411" + "x-ms-request-id" : "94d12c21-a01e-006a-1038-5949aa000000", + "Date" : "Mon, 13 Jul 2020 17:11:26 GMT", + "x-ms-client-request-id" : "58427e0b-f4c6-41c0-a039-d2d5330ada5a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0342611143f17774/javablobuploadpagefromurldestinationacfail222238face7b0", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail09176931791ebe31/javablobuploadpagefromurldestinationacfail227438e439aaf", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bc75c13d-ca88-4c73-b2ce-32a44724476f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "83e1deb3-a97d-42b5-9581-8a90e317e341" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED124CBF2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "ETag" : "0x8D8274FC7405BE5", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:27 GMT", + "x-ms-version-id" : "2020-07-13T17:11:27.1708645Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187989-301e-00f9-79f7-12fa96000000", + "x-ms-request-id" : "db6acc4f-801e-006d-2938-5925c9000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "bc75c13d-ca88-4c73-b2ce-32a44724476f" + "Date" : "Mon, 13 Jul 2020 17:11:26 GMT", + "x-ms-client-request-id" : "83e1deb3-a97d-42b5-9581-8a90e317e341" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0342611143f17774/javablobuploadpagefromurldestinationacfail222238face7b0?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail09176931791ebe31/javablobuploadpagefromurldestinationacfail227438e439aaf?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f6b8429c-a9b0-44dd-ad44-9c45d9931058", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "951d641b-7b91-424b-8c9b-f747d754bef7", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "pVghF1egKlA=", + "x-ms-content-crc64" : "s/Umy/rprqA=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:27 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "ETag" : "0x8D7E10ED12CBD18", + "Date" : "Mon, 13 Jul 2020 17:11:26 GMT", + "ETag" : "0x8D8274FC7783EF6", "Content-Length" : "0", - "x-ms-request-id" : "6b18799d-301e-00f9-06f7-12fa96000000", - "x-ms-client-request-id" : "f6b8429c-a9b0-44dd-ad44-9c45d9931058" + "x-ms-request-id" : "35ba0fe9-f01e-0083-6638-598fe0000000", + "x-ms-client-request-id" : "951d641b-7b91-424b-8c9b-f747d754bef7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0342611143f17774/javablobuploadpagefromurldestinationacfail152145e299bee?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail09176931791ebe31/javablobuploadpagefromurldestinationacfail171143a27032d?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7ea9979d-b7c3-47b4-9118-ef9a63b875d5" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f96afc8-cc90-4f8e-b9e8-eb5afd511632" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "TargetConditionNotMet", "retry-after" : "0", "Content-Length" : "266", "StatusCode" : "412", - "x-ms-request-id" : "6b1879a9-301e-00f9-12f7-12fa96000000", - "Body" : "\nTargetConditionNotMetThe target condition specified using HTTP conditional header(s) is not met.\nRequestId:6b1879a9-301e-00f9-12f7-12fa96000000\nTime:2020-04-15T07:30:05.3978464Z", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "7ea9979d-b7c3-47b4-9118-ef9a63b875d5", + "x-ms-request-id" : "b0474d49-501e-009a-6338-590f5b000000", + "Body" : "\nTargetConditionNotMetThe target condition specified using HTTP conditional header(s) is not met.\nRequestId:b0474d49-501e-009a-6338-590f5b000000\nTime:2020-07-13T17:11:27.9031852Z", + "Date" : "Mon, 13 Jul 2020 17:11:27 GMT", + "x-ms-client-request-id" : "2f96afc8-cc90-4f8e-b9e8-eb5afd511632", "Content-Type" : "application/xml" }, "Exception" : null @@ -137,43 +139,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6003c668-7496-4e79-9a03-92c090712ad4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb66d355-9d5f-42c5-8f4f-24ca23bab715" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b1879ea-301e-00f9-47f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail0342611143f17774Wed, 15 Apr 2020 07:30:05 GMT\"0x8D7E10ED11E5902\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "6003c668-7496-4e79-9a03-92c090712ad4", + "x-ms-request-id" : "b3745c59-701e-00a2-2138-59ab9b000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail09176931791ebe31Mon, 13 Jul 2020 17:11:26 GMT\"0x8D8274FC70AD285\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:28 GMT", + "x-ms-client-request-id" : "eb66d355-9d5f-42c5-8f4f-24ca23bab715", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0342611143f17774?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail09176931791ebe31?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0ff4f91f-2666-4c50-a9d6-003319fd1d81" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc5d81e6-4b16-45b9-b1a5-ccc4b6a70798" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b1879fa-301e-00f9-54f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "0ff4f91f-2666-4c50-a9d6-003319fd1d81" + "x-ms-request-id" : "5d8ab070-701e-009d-0a38-596338000000", + "Date" : "Mon, 13 Jul 2020 17:11:27 GMT", + "x-ms-client-request-id" : "dc5d81e6-4b16-45b9-b1a5-ccc4b6a70798" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationacfail0342611143f17774", "javablobuploadpagefromurldestinationacfail152145e299bee", "javablobuploadpagefromurldestinationacfail222238face7b0", "9a51ed72-fcc6-49c5-b0e8-065897cdc811" ] + "variables" : [ "jtcuploadpagefromurldestinationacfail09176931791ebe31", "javablobuploadpagefromurldestinationacfail171143a27032d", "javablobuploadpagefromurldestinationacfail227438e439aaf", "2371eccc-f21e-4a4e-98a9-82edf0246176" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[3].json index b5800854a9a7..a04e5f110e04 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[3].json @@ -1,165 +1,168 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail04107496632dba41?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0317539da4b062e9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27427896-4e4c-4755-8880-154e0f8c1123" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "887033fe-e8fc-43cf-a84f-365f5c794aee" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED171EBBA", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "ETag" : "0x8D8274FC84B4719", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187a08-301e-00f9-60f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "27427896-4e4c-4755-8880-154e0f8c1123" + "x-ms-request-id" : "e4e1455f-101e-0050-2e38-5953d2000000", + "Date" : "Mon, 13 Jul 2020 17:11:28 GMT", + "x-ms-client-request-id" : "887033fe-e8fc-43cf-a84f-365f5c794aee" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail04107496632dba41/javablobuploadpagefromurldestinationacfail165007e1d620a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0317539da4b062e9/javablobuploadpagefromurldestinationacfail1728014feed87", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0aa48571-adee-4d61-a3e8-cbe168313feb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "670a9e67-1d4a-4428-b2d1-b243e560cc82" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED17D132C", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "ETag" : "0x8D8274FC88301CF", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:29 GMT", + "x-ms-version-id" : "2020-07-13T17:11:29.2853711Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187a19-301e-00f9-6bf7-12fa96000000", + "x-ms-request-id" : "55b8c98c-d01e-0002-2e38-592f3a000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "0aa48571-adee-4d61-a3e8-cbe168313feb" + "Date" : "Mon, 13 Jul 2020 17:11:28 GMT", + "x-ms-client-request-id" : "670a9e67-1d4a-4428-b2d1-b243e560cc82" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail04107496632dba41?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0317539da4b062e9?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "07344327-5c7d-4a2e-b4c3-8f9498ceca82", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38580a27-a34d-477d-a945-ff556bf75360", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED18486E1", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "ETag" : "0x8D8274FC8B9E2B7", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187a21-301e-00f9-73f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "07344327-5c7d-4a2e-b4c3-8f9498ceca82" + "x-ms-request-id" : "292998fe-c01e-007c-6338-59bf7d000000", + "Date" : "Mon, 13 Jul 2020 17:11:29 GMT", + "x-ms-client-request-id" : "38580a27-a34d-477d-a945-ff556bf75360" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail04107496632dba41/javablobuploadpagefromurldestinationacfail235365806cfc9", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0317539da4b062e9/javablobuploadpagefromurldestinationacfail251046ebc5673", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "afd62258-51e8-4a0c-8232-1cbb7cf1260d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b65e5379-88f5-4c5b-a556-91e131d6806b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED18B6E76", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "ETag" : "0x8D8274FC8F0F2D5", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:30 GMT", + "x-ms-version-id" : "2020-07-13T17:11:30.0058837Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187a28-301e-00f9-7af7-12fa96000000", + "x-ms-request-id" : "9227d751-e01e-006b-6238-591676000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "afd62258-51e8-4a0c-8232-1cbb7cf1260d" + "Date" : "Mon, 13 Jul 2020 17:11:29 GMT", + "x-ms-client-request-id" : "b65e5379-88f5-4c5b-a556-91e131d6806b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail04107496632dba41/javablobuploadpagefromurldestinationacfail235365806cfc9?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0317539da4b062e9/javablobuploadpagefromurldestinationacfail251046ebc5673?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0277d563-4526-4946-b3b1-b28a5a6fbda8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9b3c0e4-a5d0-4e3a-b067-180dea718879", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "zBZrOoDqe+s=", + "x-ms-content-crc64" : "7llZrWeCSeI=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "ETag" : "0x8D7E10ED194231D", + "Date" : "Mon, 13 Jul 2020 17:11:29 GMT", + "ETag" : "0x8D8274FC925A0FE", "Content-Length" : "0", - "x-ms-request-id" : "6b187a30-301e-00f9-7ff7-12fa96000000", - "x-ms-client-request-id" : "0277d563-4526-4946-b3b1-b28a5a6fbda8" + "x-ms-request-id" : "79c6f01f-001e-005c-3538-59c4da000000", + "x-ms-client-request-id" : "a9b3c0e4-a5d0-4e3a-b067-180dea718879" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail04107496632dba41/javablobuploadpagefromurldestinationacfail165007e1d620a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0317539da4b062e9/javablobuploadpagefromurldestinationacfail1728014feed87", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7e43f682-bb48-4cc9-a74a-d81fa056b023" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7a990f69-a3d1-4a1d-ade6-ff0cd7010e7b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:05 GMT", + "x-ms-version-id" : "2020-07-13T17:11:29.2853711Z", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:29 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", + "Date" : "Mon, 13 Jul 2020 17:11:30 GMT", "x-ms-blob-type" : "PageBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D7E10ED17D132C", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 15 Apr 2020 07:30:05 GMT", + "ETag" : "0x8D8274FC88301CF", + "x-ms-creation-time" : "Mon, 13 Jul 2020 17:11:29 GMT", "Content-Length" : "512", - "x-ms-request-id" : "6b187a3a-301e-00f9-06f7-12fa96000000", - "x-ms-client-request-id" : "7e43f682-bb48-4cc9-a74a-d81fa056b023", + "x-ms-request-id" : "2720ed29-e01e-0036-4f38-591cf2000000", + "x-ms-client-request-id" : "7a990f69-a3d1-4a1d-ade6-ff0cd7010e7b", "Content-Type" : "application/octet-stream" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail04107496632dba41/javablobuploadpagefromurldestinationacfail165007e1d620a?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0317539da4b062e9/javablobuploadpagefromurldestinationacfail1728014feed87?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ff5a71eb-aecf-43bf-bfbc-79d8f601ef67" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cf7eb4da-dede-417c-ad90-64dfec638b2c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ConditionNotMet", "retry-after" : "0", "Content-Length" : "253", "StatusCode" : "412", - "x-ms-request-id" : "6b187a4a-301e-00f9-11f7-12fa96000000", - "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:6b187a4a-301e-00f9-11f7-12fa96000000\nTime:2020-04-15T07:30:05.9203488Z", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "ff5a71eb-aecf-43bf-bfbc-79d8f601ef67", + "x-ms-request-id" : "4f7348eb-101e-00a4-0638-599824000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:4f7348eb-101e-00a4-0638-599824000000\nTime:2020-07-13T17:11:31.1486206Z", + "Date" : "Mon, 13 Jul 2020 17:11:30 GMT", + "x-ms-client-request-id" : "cf7eb4da-dede-417c-ad90-64dfec638b2c", "Content-Type" : "application/xml" }, "Exception" : null @@ -167,43 +170,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "42be0e10-3201-4dea-86b1-1cbdda4a0f68" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "95b40626-18e0-42c0-a55d-3b9a99e7dc18" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187a60-301e-00f9-24f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail04107496632dba41Wed, 15 Apr 2020 07:30:05 GMT\"0x8D7E10ED18486E1\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:05 GMT", - "x-ms-client-request-id" : "42be0e10-3201-4dea-86b1-1cbdda4a0f68", + "x-ms-request-id" : "81bc35a2-901e-004e-2c38-59bf0a000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail0317539da4b062e9Mon, 13 Jul 2020 17:11:29 GMT\"0x8D8274FC8B9E2B7\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:30 GMT", + "x-ms-client-request-id" : "95b40626-18e0-42c0-a55d-3b9a99e7dc18", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail04107496632dba41?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0317539da4b062e9?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f6b0953b-ba98-4da4-8cf1-b99a7bca2971" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "850adf2b-e2c0-4992-a64f-392014c95195" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187a6f-301e-00f9-2ff7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "f6b0953b-ba98-4da4-8cf1-b99a7bca2971" + "x-ms-request-id" : "fa21d6c0-401e-0000-7238-599182000000", + "Date" : "Mon, 13 Jul 2020 17:11:31 GMT", + "x-ms-client-request-id" : "850adf2b-e2c0-4992-a64f-392014c95195" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationacfail04107496632dba41", "javablobuploadpagefromurldestinationacfail165007e1d620a", "javablobuploadpagefromurldestinationacfail235365806cfc9", "a9df5bf5-a77e-49f1-bfec-cdb7498d1515" ] + "variables" : [ "jtcuploadpagefromurldestinationacfail0317539da4b062e9", "javablobuploadpagefromurldestinationacfail1728014feed87", "javablobuploadpagefromurldestinationacfail251046ebc5673", "30b9ba23-2b4b-4146-9b72-1c436665e5c9" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[4].json index 1721380f113c..2b6ed4e6901a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[4].json @@ -1,135 +1,137 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail08120152d71c37a2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail025478a8acf684f8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "83fb4575-ba20-4d4f-909a-52481b3ef246" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6485a096-b842-426d-a0a3-d280bdfe5777" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED1C465B9", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCA3FF46C", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187a7f-301e-00f9-3df7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "83fb4575-ba20-4d4f-909a-52481b3ef246" + "x-ms-request-id" : "4934093a-801e-0052-5738-59ed6a000000", + "Date" : "Mon, 13 Jul 2020 17:11:31 GMT", + "x-ms-client-request-id" : "6485a096-b842-426d-a0a3-d280bdfe5777" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail08120152d71c37a2/javablobuploadpagefromurldestinationacfail157794e28709e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail025478a8acf684f8/javablobuploadpagefromurldestinationacfail1069793204776", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a6889aef-cf4e-4411-9e52-5423b82721f4" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c1dbbdd9-8ba5-4421-ad11-1ad431f7d8a9" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED1CB1EC2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCA754151", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:32 GMT", + "x-ms-version-id" : "2020-07-13T17:11:32.5506897Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187a8c-301e-00f9-47f7-12fa96000000", + "x-ms-request-id" : "a8f94986-701e-0069-1238-59a8ce000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "a6889aef-cf4e-4411-9e52-5423b82721f4" + "Date" : "Mon, 13 Jul 2020 17:11:31 GMT", + "x-ms-client-request-id" : "c1dbbdd9-8ba5-4421-ad11-1ad431f7d8a9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail08120152d71c37a2?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail025478a8acf684f8?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "18e05636-fae6-4c2c-95a5-9eeb6923a910", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b167f8ea-2c9a-440d-8b83-f02ad36e2670", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED1D244C2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCAA6CA95", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187a9b-301e-00f9-53f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "18e05636-fae6-4c2c-95a5-9eeb6923a910" + "x-ms-request-id" : "84115c85-c01e-0043-2e38-5977de000000", + "Date" : "Mon, 13 Jul 2020 17:11:32 GMT", + "x-ms-client-request-id" : "b167f8ea-2c9a-440d-8b83-f02ad36e2670" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail08120152d71c37a2/javablobuploadpagefromurldestinationacfail23561653c0df4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail025478a8acf684f8/javablobuploadpagefromurldestinationacfail2159126bc9456", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "216c0a84-3311-475b-8b19-b29a93e57099" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab086bcd-1db4-4c1b-a08e-088bec4c3b8b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED1D9EF5F", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCADD8C05", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:33 GMT", + "x-ms-version-id" : "2020-07-13T17:11:33.2341765Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187aad-301e-00f9-61f7-12fa96000000", + "x-ms-request-id" : "88c67982-101e-0032-5038-5991f5000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "216c0a84-3311-475b-8b19-b29a93e57099" + "Date" : "Mon, 13 Jul 2020 17:11:33 GMT", + "x-ms-client-request-id" : "ab086bcd-1db4-4c1b-a08e-088bec4c3b8b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail08120152d71c37a2/javablobuploadpagefromurldestinationacfail23561653c0df4?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail025478a8acf684f8/javablobuploadpagefromurldestinationacfail2159126bc9456?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7610bafd-e887-4928-917a-6cb39d4fe01c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a5fc23d8-fbc2-4e48-b9ad-b341cf2ae36b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "3HQU3BDKZAo=", + "x-ms-content-crc64" : "nkfUyW1GqXg=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:33 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "ETag" : "0x8D7E10ED1E0A7B5", + "Date" : "Mon, 13 Jul 2020 17:11:33 GMT", + "ETag" : "0x8D8274FCB0FEFD1", "Content-Length" : "0", - "x-ms-request-id" : "6b187abd-301e-00f9-6ef7-12fa96000000", - "x-ms-client-request-id" : "7610bafd-e887-4928-917a-6cb39d4fe01c" + "x-ms-request-id" : "b02e429e-d01e-0070-1838-592875000000", + "x-ms-client-request-id" : "a5fc23d8-fbc2-4e48-b9ad-b341cf2ae36b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail08120152d71c37a2/javablobuploadpagefromurldestinationacfail157794e28709e?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail025478a8acf684f8/javablobuploadpagefromurldestinationacfail1069793204776?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "27958b96-4251-4ca4-bdc0-b3310609d2ab" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f6913c7-8b89-47b1-9450-a42c7b9fe718" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "LeaseNotPresentWithBlobOperation", "retry-after" : "0", "Content-Length" : "242", "StatusCode" : "412", - "x-ms-request-id" : "6b187aca-301e-00f9-7af7-12fa96000000", - "Body" : "\nLeaseNotPresentWithBlobOperationThere is currently no lease on the blob.\nRequestId:6b187aca-301e-00f9-7af7-12fa96000000\nTime:2020-04-15T07:30:06.3787888Z", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "27958b96-4251-4ca4-bdc0-b3310609d2ab", + "x-ms-request-id" : "0b7feb72-401e-0086-1b38-595d3b000000", + "Body" : "\nLeaseNotPresentWithBlobOperationThere is currently no lease on the blob.\nRequestId:0b7feb72-401e-0086-1b38-595d3b000000\nTime:2020-07-13T17:11:33.9432629Z", + "Date" : "Mon, 13 Jul 2020 17:11:33 GMT", + "x-ms-client-request-id" : "7f6913c7-8b89-47b1-9450-a42c7b9fe718", "Content-Type" : "application/xml" }, "Exception" : null @@ -137,43 +139,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b1f17ac6-cfcb-4acf-ad55-0136ba4840e8" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d5406018-029d-48a3-aafa-34c3b38b431a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187ae0-301e-00f9-0bf7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail08120152d71c37a2Wed, 15 Apr 2020 07:30:06 GMT\"0x8D7E10ED1D244C2\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "b1f17ac6-cfcb-4acf-ad55-0136ba4840e8", + "x-ms-request-id" : "f8bbf71d-c01e-00a7-1038-597940000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail025478a8acf684f8Mon, 13 Jul 2020 17:11:32 GMT\"0x8D8274FCAA6CA95\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:34 GMT", + "x-ms-client-request-id" : "d5406018-029d-48a3-aafa-34c3b38b431a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail08120152d71c37a2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail025478a8acf684f8?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "66e529c0-4b52-41f5-808e-a99ea5a98273" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "64fd8d37-f178-419f-80a1-330408336e05" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187aea-301e-00f9-14f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "66e529c0-4b52-41f5-808e-a99ea5a98273" + "x-ms-request-id" : "40e3051e-e01e-0026-6d38-59d99a000000", + "Date" : "Mon, 13 Jul 2020 17:11:34 GMT", + "x-ms-client-request-id" : "64fd8d37-f178-419f-80a1-330408336e05" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationacfail08120152d71c37a2", "javablobuploadpagefromurldestinationacfail157794e28709e", "javablobuploadpagefromurldestinationacfail23561653c0df4", "6dd613d9-6774-4f71-8ec2-2d69ee644bcc" ] + "variables" : [ "jtcuploadpagefromurldestinationacfail025478a8acf684f8", "javablobuploadpagefromurldestinationacfail1069793204776", "javablobuploadpagefromurldestinationacfail2159126bc9456", "93f1bda9-1313-43b7-b82b-7f075b00061a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[5].json index ac877f5a8063..b95a45910f37 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[5].json @@ -1,135 +1,137 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail021191ec024aca5b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail073931692ab1fc7e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a056e59c-ab3b-4960-a52a-a913ba337812" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6ccd30ff-39b3-4ac3-a6d8-a897817f082a" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED2001DD8", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCBE2BF43", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187b05-301e-00f9-2af7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "a056e59c-ab3b-4960-a52a-a913ba337812" + "x-ms-request-id" : "fe9efaf2-601e-0028-3c38-59f02a000000", + "Date" : "Mon, 13 Jul 2020 17:11:34 GMT", + "x-ms-client-request-id" : "6ccd30ff-39b3-4ac3-a6d8-a897817f082a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail021191ec024aca5b/javablobuploadpagefromurldestinationacfail128724c70bed4", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail073931692ab1fc7e/javablobuploadpagefromurldestinationacfail131556ceceaac", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a65934b4-9807-4212-b5e4-cf2c9c679a57" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b871d67f-1a3d-4f9c-acf6-c44214e29adf" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED20AA7F2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCC18DD8F", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:35 GMT", + "x-ms-version-id" : "2020-07-13T17:11:35.3006479Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187b13-301e-00f9-33f7-12fa96000000", + "x-ms-request-id" : "9cb5a267-901e-0003-5d38-5970e6000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "a65934b4-9807-4212-b5e4-cf2c9c679a57" + "Date" : "Mon, 13 Jul 2020 17:11:34 GMT", + "x-ms-client-request-id" : "b871d67f-1a3d-4f9c-acf6-c44214e29adf" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail021191ec024aca5b?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail073931692ab1fc7e?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1eb9cdb6-0529-40c1-997e-5c9be5829cd3", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "98d5a7bb-8b1f-4366-9ee5-c232e239ba10", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED211A758", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCC4EFBA2", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187b1d-301e-00f9-3bf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "1eb9cdb6-0529-40c1-997e-5c9be5829cd3" + "x-ms-request-id" : "d396a70a-a01e-0055-6c38-598109000000", + "Date" : "Mon, 13 Jul 2020 17:11:35 GMT", + "x-ms-client-request-id" : "98d5a7bb-8b1f-4366-9ee5-c232e239ba10" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail021191ec024aca5b/javablobuploadpagefromurldestinationacfail255105990310e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail073931692ab1fc7e/javablobuploadpagefromurldestinationacfail2069083d38fd6", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0b65939b-00aa-4b7c-8eda-2a8d00343e17" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1899f7c7-9de7-4831-9dd0-25173f4b3008" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED2188DFB", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCC840EFA", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:36 GMT", + "x-ms-version-id" : "2020-07-13T17:11:36.0031482Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187b2d-301e-00f9-48f7-12fa96000000", + "x-ms-request-id" : "f8441075-601e-0007-1038-59fde1000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "0b65939b-00aa-4b7c-8eda-2a8d00343e17" + "Date" : "Mon, 13 Jul 2020 17:11:35 GMT", + "x-ms-client-request-id" : "1899f7c7-9de7-4831-9dd0-25173f4b3008" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail021191ec024aca5b/javablobuploadpagefromurldestinationacfail255105990310e?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail073931692ab1fc7e/javablobuploadpagefromurldestinationacfail2069083d38fd6?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cf4feecb-1e9e-463b-9915-952e8a7daafd", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c5318206-d6b0-4723-82e3-21c990ba56c9", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "QKysqiddVUU=", + "x-ms-content-crc64" : "g4bBP9HsVZ4=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:36 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "ETag" : "0x8D7E10ED21FBBA5", + "Date" : "Mon, 13 Jul 2020 17:11:35 GMT", + "ETag" : "0x8D8274FCCB4C4C9", "Content-Length" : "0", - "x-ms-request-id" : "6b187b34-301e-00f9-4ef7-12fa96000000", - "x-ms-client-request-id" : "cf4feecb-1e9e-463b-9915-952e8a7daafd" + "x-ms-request-id" : "34f3fc04-401e-0096-3a38-599853000000", + "x-ms-client-request-id" : "c5318206-d6b0-4723-82e3-21c990ba56c9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail021191ec024aca5b/javablobuploadpagefromurldestinationacfail128724c70bed4?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail073931692ab1fc7e/javablobuploadpagefromurldestinationacfail131556ceceaac?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fc04f434-eaf7-443d-85dc-6ded032c5a2c" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a21de50-c55f-4c2c-a4ff-07fca4fa9993" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "InvalidHeaderValue", "retry-after" : "0", "Content-Length" : "335", "StatusCode" : "400", - "x-ms-request-id" : "6b187b40-301e-00f9-58f7-12fa96000000", - "Body" : "\nInvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:6b187b40-301e-00f9-58f7-12fa96000000\nTime:2020-04-15T07:30:06.7771716Zx-ms-if-sequence-number-lt-1", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "fc04f434-eaf7-443d-85dc-6ded032c5a2c", + "x-ms-request-id" : "78299cc9-801e-0020-7138-59ea25000000", + "Body" : "\nInvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:78299cc9-801e-0020-7138-59ea25000000\nTime:2020-07-13T17:11:36.6661521Zx-ms-if-sequence-number-lt-1", + "Date" : "Mon, 13 Jul 2020 17:11:35 GMT", + "x-ms-client-request-id" : "1a21de50-c55f-4c2c-a4ff-07fca4fa9993", "Content-Type" : "application/xml" }, "Exception" : null @@ -137,43 +139,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a9296246-d7f8-4323-94f3-0aa14f8ae8b9" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6dfb1be8-f66f-473e-9978-4d30e86a8aa0" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187b48-301e-00f9-60f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail021191ec024aca5bWed, 15 Apr 2020 07:30:06 GMT\"0x8D7E10ED211A758\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "a9296246-d7f8-4323-94f3-0aa14f8ae8b9", + "x-ms-request-id" : "08af4f2f-901e-005e-3938-597a62000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail073931692ab1fc7eMon, 13 Jul 2020 17:11:35 GMT\"0x8D8274FCC4EFBA2\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:36 GMT", + "x-ms-client-request-id" : "6dfb1be8-f66f-473e-9978-4d30e86a8aa0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail021191ec024aca5b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail073931692ab1fc7e?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "91a700b6-65e8-4d07-8787-af04a5f3cfca" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d96246a5-9abe-4f98-8da8-57fe434c8494" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187b4f-301e-00f9-66f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "91a700b6-65e8-4d07-8787-af04a5f3cfca" + "x-ms-request-id" : "6edf18e2-301e-009c-0538-593ce4000000", + "Date" : "Mon, 13 Jul 2020 17:11:36 GMT", + "x-ms-client-request-id" : "d96246a5-9abe-4f98-8da8-57fe434c8494" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationacfail021191ec024aca5b", "javablobuploadpagefromurldestinationacfail128724c70bed4", "javablobuploadpagefromurldestinationacfail255105990310e", "2d5c57b7-07e6-41e8-9707-95d5c4d5b60e" ] + "variables" : [ "jtcuploadpagefromurldestinationacfail073931692ab1fc7e", "javablobuploadpagefromurldestinationacfail131556ceceaac", "javablobuploadpagefromurldestinationacfail2069083d38fd6", "2519c38c-f172-4de7-80db-f68f86e2541d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[6].json index 348961aed12e..41cedacdda47 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[6].json @@ -1,135 +1,137 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036274b6886966ee?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0301517065b4fc3d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a5eed775-88a9-46be-b253-5db8da30c225" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d3c2d548-3fb4-4a44-af60-9e34f36fb2c5" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED243A017", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:06 GMT", + "ETag" : "0x8D8274FCD860509", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187b63-301e-00f9-76f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "a5eed775-88a9-46be-b253-5db8da30c225" + "x-ms-request-id" : "af269d0b-b01e-0076-1f38-591bca000000", + "Date" : "Mon, 13 Jul 2020 17:11:37 GMT", + "x-ms-client-request-id" : "d3c2d548-3fb4-4a44-af60-9e34f36fb2c5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036274b6886966ee/javablobuploadpagefromurldestinationacfail1878374bab658", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0301517065b4fc3d/javablobuploadpagefromurldestinationacfail113456c2df4da", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7bda04ef-0a13-4ae9-8ca3-7fe921dc3108" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a128b5be-29ce-4eac-84df-90d5fb62b32d" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED24B69F1", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "ETag" : "0x8D8274FCDBA7DA0", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:38 GMT", + "x-ms-version-id" : "2020-07-13T17:11:38.0375968Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187b6d-301e-00f9-7df7-12fa96000000", + "x-ms-request-id" : "2fc24d06-c01e-0098-0538-59b1e3000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:06 GMT", - "x-ms-client-request-id" : "7bda04ef-0a13-4ae9-8ca3-7fe921dc3108" + "Date" : "Mon, 13 Jul 2020 17:11:37 GMT", + "x-ms-client-request-id" : "a128b5be-29ce-4eac-84df-90d5fb62b32d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036274b6886966ee?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0301517065b4fc3d?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2071fcb7-a06e-4719-87ec-5b88cc306af8", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ce853ede-2e7f-4e56-9292-d184372ed46c", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED2530639", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "ETag" : "0x8D8274FCDED18C0", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187b73-301e-00f9-02f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "2071fcb7-a06e-4719-87ec-5b88cc306af8" + "x-ms-request-id" : "10596e50-201e-004b-7b38-596dd1000000", + "Date" : "Mon, 13 Jul 2020 17:11:37 GMT", + "x-ms-client-request-id" : "ce853ede-2e7f-4e56-9292-d184372ed46c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036274b6886966ee/javablobuploadpagefromurldestinationacfail2746634adcf0b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0301517065b4fc3d/javablobuploadpagefromurldestinationacfail2124853b96e77", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5ebc0b01-ec5f-47a5-83d5-3c58b53a61ab" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2622b57c-ce25-4d15-9b38-2a746595fa6c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED259EC5C", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "ETag" : "0x8D8274FCE207DF9", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:38 GMT", + "x-ms-version-id" : "2020-07-13T17:11:38.7060729Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187b87-301e-00f9-10f7-12fa96000000", + "x-ms-request-id" : "32493f4b-401e-0010-5938-5954ea000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "5ebc0b01-ec5f-47a5-83d5-3c58b53a61ab" + "Date" : "Mon, 13 Jul 2020 17:11:38 GMT", + "x-ms-client-request-id" : "2622b57c-ce25-4d15-9b38-2a746595fa6c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036274b6886966ee/javablobuploadpagefromurldestinationacfail2746634adcf0b?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0301517065b4fc3d/javablobuploadpagefromurldestinationacfail2124853b96e77?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9a607aff-3415-44f1-aee7-c2929cec1c0f", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "85bb3a41-429d-4c94-b772-c7076af2669d", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "i2GQN5aLuWo=", + "x-ms-content-crc64" : "kGO2pOf76Wk=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:39 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "ETag" : "0x8D7E10ED261683C", + "Date" : "Mon, 13 Jul 2020 17:11:38 GMT", + "ETag" : "0x8D8274FCE579D9C", "Content-Length" : "0", - "x-ms-request-id" : "6b187b91-301e-00f9-18f7-12fa96000000", - "x-ms-client-request-id" : "9a607aff-3415-44f1-aee7-c2929cec1c0f" + "x-ms-request-id" : "a790cd0f-501e-008a-6d38-59ca33000000", + "x-ms-client-request-id" : "85bb3a41-429d-4c94-b772-c7076af2669d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036274b6886966ee/javablobuploadpagefromurldestinationacfail1878374bab658?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0301517065b4fc3d/javablobuploadpagefromurldestinationacfail113456c2df4da?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bca2e8f4-73e1-44d9-9897-68486a1ab89f" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52952b72-ad21-47a7-b275-58e3141154a2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "InvalidHeaderValue", "retry-after" : "0", "Content-Length" : "335", "StatusCode" : "400", - "x-ms-request-id" : "6b187b9a-301e-00f9-1ff7-12fa96000000", - "Body" : "\nInvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:6b187b9a-301e-00f9-1ff7-12fa96000000\nTime:2020-04-15T07:30:07.2015785Zx-ms-if-sequence-number-le-1", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "bca2e8f4-73e1-44d9-9897-68486a1ab89f", + "x-ms-request-id" : "2a141c42-701e-0079-3238-596da6000000", + "Body" : "\nInvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:2a141c42-701e-0079-3238-596da6000000\nTime:2020-07-13T17:11:39.3976282Zx-ms-if-sequence-number-le-1", + "Date" : "Mon, 13 Jul 2020 17:11:38 GMT", + "x-ms-client-request-id" : "52952b72-ad21-47a7-b275-58e3141154a2", "Content-Type" : "application/xml" }, "Exception" : null @@ -137,43 +139,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e85bc7c7-a430-4a93-99ab-c7c3c0b39d07" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7f0dfc4-63bc-451e-8088-781e82477f23" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187ba2-301e-00f9-27f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail036274b6886966eeWed, 15 Apr 2020 07:30:07 GMT\"0x8D7E10ED2530639\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "e85bc7c7-a430-4a93-99ab-c7c3c0b39d07", + "x-ms-request-id" : "1abc3409-401e-003f-7f38-595921000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail0301517065b4fc3dMon, 13 Jul 2020 17:11:38 GMT\"0x8D8274FCDED18C0\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:39 GMT", + "x-ms-client-request-id" : "c7f0dfc4-63bc-451e-8088-781e82477f23", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail036274b6886966ee?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0301517065b4fc3d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2934c110-a3d7-4ad4-b982-66db78967b12" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "598173f7-aec2-4908-8c3f-5e20d34be49c" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187bab-301e-00f9-2ff7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "2934c110-a3d7-4ad4-b982-66db78967b12" + "x-ms-request-id" : "2eb429cd-e01e-0019-6538-591139000000", + "Date" : "Mon, 13 Jul 2020 17:11:39 GMT", + "x-ms-client-request-id" : "598173f7-aec2-4908-8c3f-5e20d34be49c" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationacfail036274b6886966ee", "javablobuploadpagefromurldestinationacfail1878374bab658", "javablobuploadpagefromurldestinationacfail2746634adcf0b", "6b5118f2-a035-4d52-8625-1e301b9a6fa3" ] + "variables" : [ "jtcuploadpagefromurldestinationacfail0301517065b4fc3d", "javablobuploadpagefromurldestinationacfail113456c2df4da", "javablobuploadpagefromurldestinationacfail2124853b96e77", "563466e5-9d06-4f32-b2d9-749acdb6ea60" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[7].json index 850137a94317..e4f68df6b733 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[7].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[7].json @@ -1,135 +1,137 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0784400bf3654ad7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0455884c5ae7a60d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "49650ff1-1e5a-47e0-8b83-74cde83be716" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a119b22-f2a9-4a71-8ca5-750d6a5a89a2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED28042C2", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "ETag" : "0x8D8274FCF2E5FF6", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187bbf-301e-00f9-41f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "49650ff1-1e5a-47e0-8b83-74cde83be716" + "x-ms-request-id" : "7a5002c4-a01e-0008-7338-598b8d000000", + "Date" : "Mon, 13 Jul 2020 17:11:39 GMT", + "x-ms-client-request-id" : "3a119b22-f2a9-4a71-8ca5-750d6a5a89a2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0784400bf3654ad7/javablobuploadpagefromurldestinationacfail181522de67055", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0455884c5ae7a60d/javablobuploadpagefromurldestinationacfail18465298bfdb7", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "75144194-5ecd-46dd-b2a5-2e5310d63031" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "abdf195d-4f2e-4d73-bfb7-4ab16ca2786b" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED28721A5", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "ETag" : "0x8D8274FCF6658C1", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:40 GMT", + "x-ms-version-id" : "2020-07-13T17:11:40.8415937Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187bcd-301e-00f9-4cf7-12fa96000000", + "x-ms-request-id" : "564ef74d-501e-006e-1638-59c4ad000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "75144194-5ecd-46dd-b2a5-2e5310d63031" + "Date" : "Mon, 13 Jul 2020 17:11:40 GMT", + "x-ms-client-request-id" : "abdf195d-4f2e-4d73-bfb7-4ab16ca2786b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0784400bf3654ad7?restype=container&comp=acl", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0455884c5ae7a60d?restype=container&comp=acl", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fb6d8c97-841c-4e89-ad93-2b2cb2dd5b3c", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5dbcf258-b4c9-4f29-8f95-09f454cd4876", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED28EE578", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "ETag" : "0x8D8274FCF98F413", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187be0-301e-00f9-5bf7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "fb6d8c97-841c-4e89-ad93-2b2cb2dd5b3c" + "x-ms-request-id" : "ab3e00ac-301e-0035-1f38-59fd96000000", + "Date" : "Mon, 13 Jul 2020 17:11:40 GMT", + "x-ms-client-request-id" : "5dbcf258-b4c9-4f29-8f95-09f454cd4876" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0784400bf3654ad7/javablobuploadpagefromurldestinationacfail213154d3317ba", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0455884c5ae7a60d/javablobuploadpagefromurldestinationacfail219648ff8f1c0", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a5a73eba-14b5-4b2d-8f0c-cd3ba732c179" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13870ee8-e1fb-4de9-85d0-1721060208d2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E10ED2968EA3", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "ETag" : "0x8D8274FCFCB6E93", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:41 GMT", + "x-ms-version-id" : "2020-07-13T17:11:41.5040659Z", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "6b187bea-301e-00f9-63f7-12fa96000000", + "x-ms-request-id" : "882c24c8-d01e-005f-5438-5925be000000", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "a5a73eba-14b5-4b2d-8f0c-cd3ba732c179" + "Date" : "Mon, 13 Jul 2020 17:11:41 GMT", + "x-ms-client-request-id" : "13870ee8-e1fb-4de9-85d0-1721060208d2" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0784400bf3654ad7/javablobuploadpagefromurldestinationacfail213154d3317ba?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0455884c5ae7a60d/javablobuploadpagefromurldestinationacfail219648ff8f1c0?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c22cba8a-8735-4d0e-930a-e279698236ad", + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3ecb7f66-1e22-40a5-8096-69aeee0a2d0b", "Content-Type" : "application/octet-stream" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "p6lqXM5k9yo=", + "x-ms-content-crc64" : "0+R+da2MvE8=", "x-ms-blob-sequence-number" : "0", - "Last-Modified" : "Wed, 15 Apr 2020 07:30:07 GMT", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "ETag" : "0x8D7E10ED2A51116", + "Date" : "Mon, 13 Jul 2020 17:11:41 GMT", + "ETag" : "0x8D8274FD0012E5B", "Content-Length" : "0", - "x-ms-request-id" : "6b187c06-301e-00f9-77f7-12fa96000000", - "x-ms-client-request-id" : "c22cba8a-8735-4d0e-930a-e279698236ad" + "x-ms-request-id" : "22628cca-b01e-003b-5238-59d426000000", + "x-ms-client-request-id" : "3ecb7f66-1e22-40a5-8096-69aeee0a2d0b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0784400bf3654ad7/javablobuploadpagefromurldestinationacfail181522de67055?comp=page", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0455884c5ae7a60d/javablobuploadpagefromurldestinationacfail18465298bfdb7?comp=page", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "587aa11d-757d-4137-a64b-de9aa1149972" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b4569bf1-e0a6-4e1b-b3a0-099247016bc1" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "SequenceNumberConditionNotMet", "retry-after" : "0", "Content-Length" : "251", "StatusCode" : "412", - "x-ms-request-id" : "6b187c14-301e-00f9-03f7-12fa96000000", - "Body" : "\nSequenceNumberConditionNotMetThe sequence number condition specified was not met.\nRequestId:6b187c14-301e-00f9-03f7-12fa96000000\nTime:2020-04-15T07:30:07.6670255Z", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "587aa11d-757d-4137-a64b-de9aa1149972", + "x-ms-request-id" : "26593405-701e-008d-3938-59a650000000", + "Body" : "\nSequenceNumberConditionNotMetThe sequence number condition specified was not met.\nRequestId:26593405-701e-008d-3938-59a650000000\nTime:2020-07-13T17:11:42.2411425Z", + "Date" : "Mon, 13 Jul 2020 17:11:41 GMT", + "x-ms-client-request-id" : "b4569bf1-e0a6-4e1b-b3a0-099247016bc1", "Content-Type" : "application/xml" }, "Exception" : null @@ -137,43 +139,42 @@ "Method" : "GET", "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b526d2be-3f5a-4ca1-98e6-4a83e3c2467d" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1198d1a2-c3a5-4064-b1f9-9d6b11a97a86" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "6b187c1c-301e-00f9-09f7-12fa96000000", - "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail0784400bf3654ad7Wed, 15 Apr 2020 07:30:07 GMT\"0x8D7E10ED28EE578\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "b526d2be-3f5a-4ca1-98e6-4a83e3c2467d", + "x-ms-request-id" : "47e48541-601e-0017-5438-593889000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail0455884c5ae7a60dMon, 13 Jul 2020 17:11:41 GMT\"0x8D8274FCF98F413\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:42 GMT", + "x-ms-client-request-id" : "1198d1a2-c3a5-4064-b1f9-9d6b11a97a86", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0784400bf3654ad7?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail0455884c5ae7a60d?restype=container", "Headers" : { - "x-ms-version" : "2019-10-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "58467938-7baf-4287-91c1-cb89899006cb" + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "09d22152-6825-4b0b-b8a4-3dc16b014be2" }, "Response" : { - "x-ms-version" : "2019-10-10", + "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "6b187c24-301e-00f9-10f7-12fa96000000", - "Date" : "Wed, 15 Apr 2020 07:30:07 GMT", - "x-ms-client-request-id" : "58467938-7baf-4287-91c1-cb89899006cb" + "x-ms-request-id" : "9021d7d6-d01e-0094-6838-5926eb000000", + "Date" : "Mon, 13 Jul 2020 17:11:42 GMT", + "x-ms-client-request-id" : "09d22152-6825-4b0b-b8a4-3dc16b014be2" }, "Exception" : null } ], - "variables" : [ "jtcuploadpagefromurldestinationacfail0784400bf3654ad7", "javablobuploadpagefromurldestinationacfail181522de67055", "javablobuploadpagefromurldestinationacfail213154d3317ba", "374e74e6-af75-4c6f-b972-4f72bedf4c14" ] + "variables" : [ "jtcuploadpagefromurldestinationacfail0455884c5ae7a60d", "javablobuploadpagefromurldestinationacfail18465298bfdb7", "javablobuploadpagefromurldestinationacfail219648ff8f1c0", "9a30140a-32ea-46f5-b375-9dd79cc846f0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[8].json new file mode 100644 index 000000000000..0974ad02202b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/PageBlobAPITestuploadpagefromurldestinationacfail[8].json @@ -0,0 +1,180 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail077854b7e359b9c8?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d062873b-c5c3-4b3e-b1dd-b30f392dbd92" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FD0FAE6BA", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "42cd9404-c01e-001e-8038-597d5a000000", + "Date" : "Mon, 13 Jul 2020 17:11:42 GMT", + "x-ms-client-request-id" : "d062873b-c5c3-4b3e-b1dd-b30f392dbd92" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail077854b7e359b9c8/javablobuploadpagefromurldestinationacfail141006833b8b3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "57f3d6be-6c88-4716-a769-6e867ed05bba" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FD1379D06", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:43 GMT", + "x-ms-version-id" : "2020-07-13T17:11:43.8907654Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "74cff22f-c01e-0053-7b38-59b2b6000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:11:43 GMT", + "x-ms-client-request-id" : "57f3d6be-6c88-4716-a769-6e867ed05bba" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail077854b7e359b9c8?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f6579f23-49d7-419a-a27d-2c0a1ede4d32", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FD172778D", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "0d5a25a2-501e-007e-6638-5901c5000000", + "Date" : "Mon, 13 Jul 2020 17:11:43 GMT", + "x-ms-client-request-id" : "f6579f23-49d7-419a-a27d-2c0a1ede4d32" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail077854b7e359b9c8/javablobuploadpagefromurldestinationacfail26270399fe950", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7cb4c815-134b-4c38-8849-3a8c6ab29a33" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D8274FD1A8269D", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:44 GMT", + "x-ms-version-id" : "2020-07-13T17:11:44.6282909Z", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c20e49f6-c01e-006c-5d38-597a15000000", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:11:44 GMT", + "x-ms-client-request-id" : "7cb4c815-134b-4c38-8849-3a8c6ab29a33" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail077854b7e359b9c8/javablobuploadpagefromurldestinationacfail26270399fe950?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fb2661e-fb2f-4680-9642-b538d742af65", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "czY2n4+Afvw=", + "x-ms-blob-sequence-number" : "0", + "Last-Modified" : "Mon, 13 Jul 2020 17:11:44 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 13 Jul 2020 17:11:44 GMT", + "ETag" : "0x8D8274FD1DF946A", + "Content-Length" : "0", + "x-ms-request-id" : "7631e332-001e-0097-4c38-59c78f000000", + "x-ms-client-request-id" : "7fb2661e-fb2f-4680-9642-b538d742af65" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail077854b7e359b9c8/javablobuploadpagefromurldestinationacfail141006833b8b3?comp=page", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00c79fab-769d-48a9-88f7-274b9062de98" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "ConditionNotMet", + "retry-after" : "0", + "Content-Length" : "253", + "StatusCode" : "412", + "x-ms-request-id" : "4a8933f4-801e-0099-5138-59ee3f000000", + "Body" : "\nConditionNotMetThe condition specified using HTTP conditional header(s) is not met.\nRequestId:4a8933f4-801e-0099-5138-59ee3f000000\nTime:2020-07-13T17:11:45.3529459Z", + "Date" : "Mon, 13 Jul 2020 17:11:44 GMT", + "x-ms-client-request-id" : "00c79fab-769d-48a9-88f7-274b9062de98", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcuploadpagefromurldestinationacfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0fd70478-d64f-48c2-ad1e-881ece81011d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f411e5b3-001e-0073-3438-59c911000000", + "Body" : "jtcuploadpagefromurldestinationacfailjtcuploadpagefromurldestinationacfail077854b7e359b9c8Mon, 13 Jul 2020 17:11:44 GMT\"0x8D8274FD172778D\"unlockedavailablecontainer$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 13 Jul 2020 17:11:44 GMT", + "x-ms-client-request-id" : "0fd70478-d64f-48c2-ad1e-881ece81011d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcuploadpagefromurldestinationacfail077854b7e359b9c8?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b0886a8b-ca33-4cd9-b86b-4896d48721ff" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "02540043-901e-0061-1b38-59b2c1000000", + "Date" : "Mon, 13 Jul 2020 17:11:45 GMT", + "x-ms-client-request-id" : "b0886a8b-ca33-4cd9-b86b-4896d48721ff" + }, + "Exception" : null + } ], + "variables" : [ "jtcuploadpagefromurldestinationacfail077854b7e359b9c8", "javablobuploadpagefromurldestinationacfail141006833b8b3", "javablobuploadpagefromurldestinationacfail26270399fe950", "e9710773-8092-4bb4-8a6e-c18a1ba64619" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json deleted file mode 100644 index 0764be83dd44..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint06120599a323?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2063c81a-332b-4fe4-a07b-a978dd5ce324" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080999CFDDBC", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:00 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628787-701e-0051-62f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "2063c81a-332b-4fe4-a07b-a978dd5ce324" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint19578588e29a?restype=container&sv=2019-12-12&se=2020-06-04T22%3A01%3A00Z&sp=rc&sig=REDACTED&ss=b&srt=sco", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4a475701-536c-46c9-9fc5-022e882674e7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080999DD4E7E", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:00 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46287b7-701e-0051-04f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "4a475701-536c-46c9-9fc5-022e882674e7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint19578588e29a?restype=container&sv=2019-12-12&se=2020-06-04T22%3A01%3A00Z&sp=rc&sig=REDACTED&ss=b&srt=sco", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e21fc182-0768-45ae-9d40-b69c784b1a73" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-deny-encryption-scope-override" : "false", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:00 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-has-legal-hold" : "false", - "x-ms-default-encryption-scope" : "$account-encryption-key", - "ETag" : "0x8D8080999DD4E7E", - "x-ms-has-immutability-policy" : "false", - "Vary" : "Origin", - "Content-Length" : "0", - "x-ms-request-id" : "f46287d9-701e-0051-1cf2-396bad000000", - "x-ms-client-request-id" : "e21fc182-0768-45ae-9d40-b69c784b1a73" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint19578588e29a/javablobaccountsasnetworkaccountsastokenonendpoint2281415c9", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5578b047-fd76-44a3-bff3-acc2414a275b", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "FdXazF2c200=", - "x-ms-version-id" : "2020-06-03T22:01:00.5360740Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:00 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "Content-MD5" : "vRcaYsi/MeRNmBaIWvc7Sw==", - "ETag" : "0x8D808099A0F8264", - "Content-Length" : "0", - "x-ms-request-id" : "f462884f-701e-0051-7af2-396bad000000", - "x-ms-client-request-id" : "5578b047-fd76-44a3-bff3-acc2414a275b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworkaccountsastokenonendpoint&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c5f3ea60-e510-4f75-8efc-5721677d8b81" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462886d-701e-0051-11f2-396bad000000", - "Body" : "jtcaccountsasnetworkaccountsastokenonendpointjtcaccountsasnetworkaccountsastokenonendpoint06120599a323Wed, 03 Jun 2020 22:01:00 GMT\"0x8D8080999CFDDBC\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcaccountsasnetworkaccountsastokenonendpoint19578588e29aWed, 03 Jun 2020 22:01:00 GMT\"0x8D8080999DD4E7E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "c5f3ea60-e510-4f75-8efc-5721677d8b81", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint06120599a323?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4444063b-9613-447d-9eee-1ec31fd5c663" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628887-701e-0051-23f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "4444063b-9613-447d-9eee-1ec31fd5c663" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint19578588e29a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "afdc265b-663e-40a9-9c38-92891fd2d723" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628899-701e-0051-31f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "afdc265b-663e-40a9-9c38-92891fd2d723" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworkaccountsastokenonendpoint06120599a323", "2020-06-03T22:01:00.210260400Z", "jtcaccountsasnetworkaccountsastokenonendpoint19578588e29a", "javablobaccountsasnetworkaccountsastokenonendpoint2281415c9", "b7d69642-342f-4107-b075-d09fb4e798a0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkcreatecontainerfails.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkcreatecontainerfails.json deleted file mode 100644 index fab9483057b7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkcreatecontainerfails.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails098055bd55ceed?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f67e8e7a-e0ef-4076-a62c-17827b0eb4e6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809995BA2D9", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:59 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462868b-701e-0051-1ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "f67e8e7a-e0ef-4076-a62c-17827b0eb4e6" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails1967582ba971dc?restype=container&sv=2019-12-12&ss=b&srt=sco&se=2020-06-04T22%3A00%3A59Z&sp=r&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a15c3c25-6fd6-4ce4-b02c-0020162a1fcb" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthorizationPermissionMismatch", - "retry-after" : "0", - "Content-Length" : "279", - "StatusCode" : "403", - "x-ms-request-id" : "f46286a8-701e-0051-36f2-396bad000000", - "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:f46286a8-701e-0051-36f2-396bad000000\nTime:2020-06-03T22:00:59.4413370Z", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "a15c3c25-6fd6-4ce4-b02c-0020162a1fcb", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworkcreatecontainerfails&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "62c23e91-cb84-49b1-9154-1e80b4a80397" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46286bb-701e-0051-44f2-396bad000000", - "Body" : "jtcaccountsasnetworkcreatecontainerfailsjtcaccountsasnetworkcreatecontainerfails098055bd55ceedWed, 03 Jun 2020 22:00:59 GMT\"0x8D80809995BA2D9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "62c23e91-cb84-49b1-9154-1e80b4a80397", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails098055bd55ceed?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "06cee713-20fd-493f-86f5-96024ffb2eb2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46286cb-701e-0051-52f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "06cee713-20fd-493f-86f5-96024ffb2eb2" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworkcreatecontainerfails098055bd55ceed", "2020-06-03T22:00:59.449820700Z", "jtcaccountsasnetworkcreatecontainerfails1967582ba971dc" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkcreatecontainersucceeds.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkcreatecontainersucceeds.json deleted file mode 100644 index 02d6129a0f8e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkcreatecontainersucceeds.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds0460881e50801?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "00aed9d4-2f2c-43fa-98a3-99be6771c5d8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809998E57FE", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:59 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46286e5-701e-0051-66f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "00aed9d4-2f2c-43fa-98a3-99be6771c5d8" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds166413466005b?restype=container&sv=2019-12-12&ss=b&srt=sco&se=2020-06-04T22%3A00%3A59Z&sp=rc&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "946d42b9-db54-42f4-acf5-7bd159270020" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809999ADE28", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:59 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46286fb-701e-0051-76f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "946d42b9-db54-42f4-acf5-7bd159270020" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworkcreatecontainersucceeds&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "49eb6a8d-5aac-450c-9dab-8b0b4cc100e1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628712-701e-0051-05f2-396bad000000", - "Body" : "jtcaccountsasnetworkcreatecontainersucceedsjtcaccountsasnetworkcreatecontainersucceeds0460881e50801Wed, 03 Jun 2020 22:00:59 GMT\"0x8D80809998E57FE\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcaccountsasnetworkcreatecontainersucceeds166413466005bWed, 03 Jun 2020 22:00:59 GMT\"0x8D80809999ADE28\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "49eb6a8d-5aac-450c-9dab-8b0b4cc100e1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds0460881e50801?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d8318df2-aed2-4c79-bd90-75cd8735ab24" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462872b-701e-0051-18f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "d8318df2-aed2-4c79-bd90-75cd8735ab24" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds166413466005b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2a611fe4-8070-4a71-9fb4-6d2ad96ed7f0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628756-701e-0051-3af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:59 GMT", - "x-ms-client-request-id" : "2a611fe4-8070-4a71-9fb4-6d2ad96ed7f0" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworkcreatecontainersucceeds0460881e50801", "2020-06-03T22:00:59.780809500Z", "jtcaccountsasnetworkcreatecontainersucceeds166413466005b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworktestblobdeletefails.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworktestblobdeletefails.json deleted file mode 100644 index 0432188ee3bb..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworktestblobdeletefails.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefails0488996beee130e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "88ec7f61-d512-45c3-9cc8-86faf5ab86d2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809991820BE", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:58 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46285e0-701e-0051-14f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "88ec7f61-d512-45c3-9cc8-86faf5ab86d2" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefails0488996beee130e/javablobaccountsasnetworktestblobdeletefails1307380df2d1", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a835d6dd-661b-4133-869b-fd373d81ab83", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:00:59.0016130Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:59 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D808099925376D", - "Content-Length" : "0", - "x-ms-request-id" : "f46285f5-701e-0051-24f2-396bad000000", - "x-ms-client-request-id" : "a835d6dd-661b-4133-869b-fd373d81ab83" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefails0488996beee130e/javablobaccountsasnetworktestblobdeletefails1307380df2d1?sv=2019-12-12&ss=b&srt=sco&se=2020-06-04T22%3A00%3A59Z&sp=r&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b0a75978-5571-45e7-98ee-47abd887407e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthorizationPermissionMismatch", - "retry-after" : "0", - "Content-Length" : "279", - "StatusCode" : "403", - "x-ms-request-id" : "f462861b-701e-0051-42f2-396bad000000", - "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:f462861b-701e-0051-42f2-396bad000000\nTime:2020-06-03T22:00:59.0839967Z", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "b0a75978-5571-45e7-98ee-47abd887407e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworktestblobdeletefails&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "50ebeafc-1d4d-472f-9944-3f05542e63ce" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462865c-701e-0051-7bf2-396bad000000", - "Body" : "jtcaccountsasnetworktestblobdeletefailsjtcaccountsasnetworktestblobdeletefails0488996beee130eWed, 03 Jun 2020 22:00:58 GMT\"0x8D80809991820BE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "50ebeafc-1d4d-472f-9944-3f05542e63ce", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefails0488996beee130e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "42c2688f-9f89-4396-80f1-105ad4651961" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628678-701e-0051-11f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "42c2688f-9f89-4396-80f1-105ad4651961" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworktestblobdeletefails0488996beee130e", "javablobaccountsasnetworktestblobdeletefails1307380df2d1", "2020-06-03T22:00:59.088837100Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworktestblobread.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworktestblobread.json deleted file mode 100644 index 861eff7b5d2a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworktestblobread.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobread077455b2f6b34f7f8e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4b40e55d-0cc0-479c-bb75-e3c5afb1b789" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080998D5623F", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:58 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628575-701e-0051-3cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "4b40e55d-0cc0-479c-bb75-e3c5afb1b789" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobread077455b2f6b34f7f8e/javablobaccountsasnetworktestblobread130922e14fab68a7", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6c858d9b-4a92-488a-bd95-992d0648fee7", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:00:58.5652001Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D8080998E2C721", - "Content-Length" : "0", - "x-ms-request-id" : "f4628596-701e-0051-53f2-396bad000000", - "x-ms-client-request-id" : "6c858d9b-4a92-488a-bd95-992d0648fee7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobread077455b2f6b34f7f8e/javablobaccountsasnetworktestblobread130922e14fab68a7?sv=2019-12-12&ss=b&srt=sco&se=2020-06-04T22%3A00%3A58Z&sp=r&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "40cf987f-5ad4-4983-a636-838cacfc9f67" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-version" : "2019-12-12", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:00:58.5652001Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:58 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "ETag" : "0x8D8080998E2C721", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:58 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f46285ae-701e-0051-67f2-396bad000000", - "Body" : "[116, 101, 115, 116]", - "x-ms-client-request-id" : "40cf987f-5ad4-4983-a636-838cacfc9f67", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworktestblobread&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ed61b088-c3bf-42b5-b554-7096dd1052f2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46285bb-701e-0051-72f2-396bad000000", - "Body" : "jtcaccountsasnetworktestblobreadjtcaccountsasnetworktestblobread077455b2f6b34f7f8eWed, 03 Jun 2020 22:00:58 GMT\"0x8D8080998D5623F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "ed61b088-c3bf-42b5-b554-7096dd1052f2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobread077455b2f6b34f7f8e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ae331d74-f66e-47ac-a799-0e524396b7cf" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46285d1-701e-0051-06f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:58 GMT", - "x-ms-client-request-id" : "ae331d74-f66e-47ac-a799-0e524396b7cf" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworktestblobread077455b2f6b34f7f8e", "javablobaccountsasnetworktestblobread130922e14fab68a7", "2020-06-03T22:00:58.664884600Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[0].json deleted file mode 100644 index ca54c4213c30..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0045675731fe9c3af242?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "855673d8-cd6c-4f9a-b14d-da41a996dba0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A823983D", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:24 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b08d-701e-0051-10f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "855673d8-cd6c-4f9a-b14d-da41a996dba0" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cec6af02-23fc-4678-83eb-12275346db09" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b0c4-701e-0051-3ff2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse0045675731fe9c3af242Wed, 03 Jun 2020 22:01:24 GMT\"0x8D80809A823983D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "cec6af02-23fc-4678-83eb-12275346db09", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0045675731fe9c3af242?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6e1bfe01-cf4f-450d-aff3-998387ed56e5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b101-701e-0051-6ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "6e1bfe01-cf4f-450d-aff3-998387ed56e5" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse0045675731fe9c3af242" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[10].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[10].json deleted file mode 100644 index 95bd3374a8a1..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[10].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse09329490ac618b75b543?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f619fb24-b009-4540-b1e0-6de5aa85416b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A9ACE1F2", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:26 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b542-701e-0051-49f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "f619fb24-b009-4540-b1e0-6de5aa85416b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e4a1de2b-750e-461f-beb3-00ef94d859ee" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b55d-701e-0051-5ef2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse09329490ac618b75b543Wed, 03 Jun 2020 22:01:26 GMT\"0x8D80809A9ACE1F2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "e4a1de2b-750e-461f-beb3-00ef94d859ee", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse09329490ac618b75b543?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5d846db5-229e-4433-b7bf-52dbff8cd35e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b581-701e-0051-75f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "5d846db5-229e-4433-b7bf-52dbff8cd35e" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse09329490ac618b75b543" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[1].json deleted file mode 100644 index a6d6740dc2d9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse049223939bbdffabf845?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "44ca9b70-7389-4c4b-a365-62b6fb3cc048" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A84BEA90", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:24 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b132-701e-0051-14f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "44ca9b70-7389-4c4b-a365-62b6fb3cc048" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2e8e5828-f7ae-4a48-82d7-4a9533e2aecc" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b145-701e-0051-25f2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse049223939bbdffabf845Wed, 03 Jun 2020 22:01:24 GMT\"0x8D80809A84BEA90\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "2e8e5828-f7ae-4a48-82d7-4a9533e2aecc", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse049223939bbdffabf845?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0d38e608-b0c9-4c98-8f19-9c4bd081fc60" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b178-701e-0051-4df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "0d38e608-b0c9-4c98-8f19-9c4bd081fc60" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse049223939bbdffabf845" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[2].json deleted file mode 100644 index fb3e912a9005..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse066917d87a72b0c9444d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3aa4d98e-07ab-4c07-952a-226f100da880" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A877E74D", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:24 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b198-701e-0051-66f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "3aa4d98e-07ab-4c07-952a-226f100da880" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e7711ef9-1566-4241-aa01-010f547c3465" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b1c0-701e-0051-06f2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse066917d87a72b0c9444dWed, 03 Jun 2020 22:01:24 GMT\"0x8D80809A877E74D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "e7711ef9-1566-4241-aa01-010f547c3465", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse066917d87a72b0c9444d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "06c387f9-ac52-4872-83c6-2ad4a8329b40" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b1db-701e-0051-1bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "06c387f9-ac52-4872-83c6-2ad4a8329b40" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse066917d87a72b0c9444d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[3].json deleted file mode 100644 index ef1f2c00aa26..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse044432cdbf953398684e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ce32125f-9224-45ae-8265-4e31c2696f1e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A89CB659", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:24 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b212-701e-0051-46f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "ce32125f-9224-45ae-8265-4e31c2696f1e" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7a1540df-7a2c-4360-9996-5c6505af3dd1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b23c-701e-0051-67f2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse044432cdbf953398684eWed, 03 Jun 2020 22:01:24 GMT\"0x8D80809A89CB659\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "7a1540df-7a2c-4360-9996-5c6505af3dd1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse044432cdbf953398684e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2519fece-49ec-403f-9eea-a95555b7e539" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b27a-701e-0051-18f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "2519fece-49ec-403f-9eea-a95555b7e539" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse044432cdbf953398684e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[4].json deleted file mode 100644 index 1a8b6e7bb073..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[4].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0223355d8ed96107844b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6cafdd5f-fff9-44e1-992e-725771a13474" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A8C248D5", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:25 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b29a-701e-0051-2ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "6cafdd5f-fff9-44e1-992e-725771a13474" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ef31ea46-9e37-4330-8e0d-b34b6b3c60fc" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b2b0-701e-0051-41f2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse0223355d8ed96107844bWed, 03 Jun 2020 22:01:25 GMT\"0x8D80809A8C248D5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "ef31ea46-9e37-4330-8e0d-b34b6b3c60fc", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0223355d8ed96107844b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "335a03c7-d364-42bb-b71e-43ae4a070b9c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b2df-701e-0051-65f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "335a03c7-d364-42bb-b71e-43ae4a070b9c" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse0223355d8ed96107844b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[5].json deleted file mode 100644 index c765c3232c03..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[5].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0994947d3ec9223b4d43?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "00518722-457e-4f4f-83f8-61aa5f093151" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A8E850A2", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:25 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b310-701e-0051-0bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "00518722-457e-4f4f-83f8-61aa5f093151" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e78d7784-f30e-443d-9bf1-244bc02152fb" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b338-701e-0051-28f2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse0994947d3ec9223b4d43Wed, 03 Jun 2020 22:01:25 GMT\"0x8D80809A8E850A2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:24 GMT", - "x-ms-client-request-id" : "e78d7784-f30e-443d-9bf1-244bc02152fb", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0994947d3ec9223b4d43?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "54e1fa94-2959-459e-bd42-700e1c550b20" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b353-701e-0051-3df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "54e1fa94-2959-459e-bd42-700e1c550b20" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse0994947d3ec9223b4d43" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[6].json deleted file mode 100644 index 52c77cd0d636..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[6].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0981295b11ea15863743?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a15cf6b5-4735-4902-97f2-9422b260dff3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A910C9FE", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:25 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b376-701e-0051-59f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "a15cf6b5-4735-4902-97f2-9422b260dff3" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4a07ced5-2b30-4b31-bef5-58da9d9f21cb" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b3a5-701e-0051-01f2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse0981295b11ea15863743Wed, 03 Jun 2020 22:01:25 GMT\"0x8D80809A910C9FE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "4a07ced5-2b30-4b31-bef5-58da9d9f21cb", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0981295b11ea15863743?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "db1210ae-4e2d-44c7-bb8f-3f2b2bf7f281" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b3c6-701e-0051-1df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "db1210ae-4e2d-44c7-bb8f-3f2b2bf7f281" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse0981295b11ea15863743" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[7].json deleted file mode 100644 index 1adf2c7665d6..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[7].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse064529e083e42d7bfe4a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5c77bf8e-49d6-4480-8327-864f787d38b0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A9360E48", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:25 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b3f7-701e-0051-44f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "5c77bf8e-49d6-4480-8327-864f787d38b0" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e5a1d0ea-0bb3-4681-bc15-49e80eca6157" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b418-701e-0051-5ef2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse064529e083e42d7bfe4aWed, 03 Jun 2020 22:01:25 GMT\"0x8D80809A9360E48\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "e5a1d0ea-0bb3-4681-bc15-49e80eca6157", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse064529e083e42d7bfe4a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1d0180c2-2958-4cae-973d-052a44b51c9a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b447-701e-0051-02f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "1d0180c2-2958-4cae-973d-052a44b51c9a" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse064529e083e42d7bfe4a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[8].json deleted file mode 100644 index fc94242369a2..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[8].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0616185951636e32814c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1d01d561-3b4b-44fc-abb9-1e087069ceab" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A95CD9A4", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:26 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b47a-701e-0051-2bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "1d01d561-3b4b-44fc-abb9-1e087069ceab" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ee490376-8ce8-46af-83e0-93b0fc07268b" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b49f-701e-0051-4af2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse0616185951636e32814cWed, 03 Jun 2020 22:01:26 GMT\"0x8D80809A95CD9A4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "ee490376-8ce8-46af-83e0-93b0fc07268b", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse0616185951636e32814c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d5583342-027b-4759-ba5f-3ed069d87370" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b4d4-701e-0051-76f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "d5583342-027b-4759-ba5f-3ed069d87370" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse0616185951636e32814c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[9].json deleted file mode 100644 index c82ec0beab46..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparse[9].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse072543cd61a9e7119e4b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2458322f-05da-4c60-ac2d-508672bfebc0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A984687C", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:26 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b4f5-701e-0051-11f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:25 GMT", - "x-ms-client-request-id" : "2458322f-05da-4c60-ac2d-508672bfebc0" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "af0c39e9-ab40-4fcf-a389-6210e7490a68" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b507-701e-0051-1cf2-396bad000000", - "Body" : "jtcaccountsaspermissionsparsejtcaccountsaspermissionsparse072543cd61a9e7119e4bWed, 03 Jun 2020 22:01:26 GMT\"0x8D80809A984687C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "af0c39e9-ab40-4fcf-a389-6210e7490a68", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparse072543cd61a9e7119e4b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8337d80f-5f13-40d8-ad48-4a0c89ffb295" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b523-701e-0051-33f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "8337d80f-5f13-40d8-ad48-4a0c89ffb295" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparse072543cd61a9e7119e4b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparseia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparseia.json deleted file mode 100644 index 0d4305684ec3..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionsparseia.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparseia004191b1804a81fe354?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d3bdd422-4dde-44de-8f41-1a571b6bed05" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A9D449A5", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:26 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b59e-701e-0051-0bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "d3bdd422-4dde-44de-8f41-1a571b6bed05" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionsparseia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "533f8394-8fdb-46b8-bf17-6fb66e26a397" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b5b0-701e-0051-19f2-396bad000000", - "Body" : "jtcaccountsaspermissionsparseiajtcaccountsaspermissionsparseia004191b1804a81fe354Wed, 03 Jun 2020 22:01:26 GMT\"0x8D80809A9D449A5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "533f8394-8fdb-46b8-bf17-6fb66e26a397", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionsparseia004191b1804a81fe354?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "391f4028-6218-4582-8970-8a83cae2a98e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b5d8-701e-0051-38f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "391f4028-6218-4582-8970-8a83cae2a98e" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionsparseia004191b1804a81fe354" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[0].json deleted file mode 100644 index 8269b8b491e1..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring0407848b1e70841444?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "77659095-5ee4-4900-b733-578145c7a736" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A6951D67", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:21 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462ac82-701e-0051-55f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "77659095-5ee4-4900-b733-578145c7a736" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "15b0bf25-071e-465c-83fb-98778d7bc068" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462ac8d-701e-0051-5cf2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring0407848b1e70841444Wed, 03 Jun 2020 22:01:21 GMT\"0x8D80809A6951D67\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "15b0bf25-071e-465c-83fb-98778d7bc068", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring0407848b1e70841444?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2989e335-b9a4-45ae-95cc-ebb1166160bc" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462aca6-701e-0051-71f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "2989e335-b9a4-45ae-95cc-ebb1166160bc" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring0407848b1e70841444" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[1].json deleted file mode 100644 index 56bc12a5504d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring075159d0c7f629a119?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0609eb66-b4c3-4d07-9fcd-60c69d8dba23" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A6BA3AA6", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:21 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462acc1-701e-0051-06f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "0609eb66-b4c3-4d07-9fcd-60c69d8dba23" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "85cb224c-d9e2-425b-ac7a-99dd17fe1b47" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462acd2-701e-0051-13f2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring075159d0c7f629a119Wed, 03 Jun 2020 22:01:21 GMT\"0x8D80809A6BA3AA6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "85cb224c-d9e2-425b-ac7a-99dd17fe1b47", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring075159d0c7f629a119?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "97c6a851-d2ee-44df-8865-f256ff53493f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462acee-701e-0051-2cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "97c6a851-d2ee-44df-8865-f256ff53493f" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring075159d0c7f629a119" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[2].json deleted file mode 100644 index b929a49ff702..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring01434607443512494d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "30db8a9a-90e0-4c24-a605-0d3d5d9c6661" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A6DF57DC", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:22 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462ad14-701e-0051-4cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "30db8a9a-90e0-4c24-a605-0d3d5d9c6661" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "06a4cd7b-b6c5-485f-aa73-01d4d4027476" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462ad49-701e-0051-75f2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring01434607443512494dWed, 03 Jun 2020 22:01:22 GMT\"0x8D80809A6DF57DC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "06a4cd7b-b6c5-485f-aa73-01d4d4027476", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring01434607443512494d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a453af0e-062c-4bb4-a557-bf8cd950e329" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462ad6b-701e-0051-0ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "a453af0e-062c-4bb4-a557-bf8cd950e329" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring01434607443512494d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[3].json deleted file mode 100644 index 8bce113b7c87..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring002633d60913ed0410?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0f91c45c-0800-4003-8b09-ce01fa56b5ce" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A7044DF2", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:22 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462ad93-701e-0051-30f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "0f91c45c-0800-4003-8b09-ce01fa56b5ce" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e6459a29-44e0-41ba-b594-3091341fde16" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462ada8-701e-0051-3ff2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring002633d60913ed0410Wed, 03 Jun 2020 22:01:22 GMT\"0x8D80809A7044DF2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "e6459a29-44e0-41ba-b594-3091341fde16", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring002633d60913ed0410?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9b7ea29d-d1be-4f34-8285-0a8c5701a96c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462adc0-701e-0051-52f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "9b7ea29d-d1be-4f34-8285-0a8c5701a96c" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring002633d60913ed0410" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[4].json deleted file mode 100644 index aa88509db4d9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[4].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring084611abb935285deb?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9a1c5d8d-5068-4827-8b6b-2606ceb595ab" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A7294409", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:22 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462adce-701e-0051-5ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:21 GMT", - "x-ms-client-request-id" : "9a1c5d8d-5068-4827-8b6b-2606ceb595ab" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2ec18b25-2a88-4ee5-9b37-ded3c9cc01b9" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462adf9-701e-0051-80f2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring084611abb935285debWed, 03 Jun 2020 22:01:22 GMT\"0x8D80809A7294409\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "2ec18b25-2a88-4ee5-9b37-ded3c9cc01b9", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring084611abb935285deb?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "df230456-73b2-4920-9e16-cc9613931ba8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462ae27-701e-0051-22f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "df230456-73b2-4920-9e16-cc9613931ba8" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring084611abb935285deb" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[5].json deleted file mode 100644 index 02939a0dce37..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[5].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring070592bf8a671333a9?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "82bb1d80-d291-49fd-9bf1-c2e2e7b49e06" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A758279B", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:22 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462ae42-701e-0051-3af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "82bb1d80-d291-49fd-9bf1-c2e2e7b49e06" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f8d1eb74-28e6-4201-a9dd-067b2c96a6aa" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462ae5a-701e-0051-48f2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring070592bf8a671333a9Wed, 03 Jun 2020 22:01:22 GMT\"0x8D80809A758279B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "f8d1eb74-28e6-4201-a9dd-067b2c96a6aa", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring070592bf8a671333a9?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3ab7cf12-8970-44aa-b7e5-9e3183df8bbe" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462ae88-701e-0051-6ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "3ab7cf12-8970-44aa-b7e5-9e3183df8bbe" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring070592bf8a671333a9" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[6].json deleted file mode 100644 index 52f6c0502fda..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[6].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring0450087b4b3d09771b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "465bce53-6168-400d-b481-e70acdfde9b6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A77E2F60", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:23 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462aeac-701e-0051-0af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "465bce53-6168-400d-b481-e70acdfde9b6" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d7d0541d-ded9-4ac5-83a3-fc69a6e4cac0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462aee2-701e-0051-37f2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring0450087b4b3d09771bWed, 03 Jun 2020 22:01:23 GMT\"0x8D80809A77E2F60\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "d7d0541d-ded9-4ac5-83a3-fc69a6e4cac0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring0450087b4b3d09771b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2c99fd34-70bd-4b02-b4eb-f7944f42ce27" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462af0e-701e-0051-5df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "2c99fd34-70bd-4b02-b4eb-f7944f42ce27" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring0450087b4b3d09771b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[7].json deleted file mode 100644 index efcb34acc289..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[7].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring09985392b5663a47f7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5b12ccf4-e22b-4da7-830b-2f4dffa6e3f3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A7A6CFDE", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:23 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462af2c-701e-0051-79f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "5b12ccf4-e22b-4da7-830b-2f4dffa6e3f3" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2ee4ebcc-31bd-47fb-bfef-bf76d1cf3d87" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462af48-701e-0051-0ff2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring09985392b5663a47f7Wed, 03 Jun 2020 22:01:23 GMT\"0x8D80809A7A6CFDE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "2ee4ebcc-31bd-47fb-bfef-bf76d1cf3d87", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring09985392b5663a47f7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "820790bf-79e7-4dd0-ae26-b5b8e427eab5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462af5a-701e-0051-1ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:22 GMT", - "x-ms-client-request-id" : "820790bf-79e7-4dd0-ae26-b5b8e427eab5" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring09985392b5663a47f7" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[8].json deleted file mode 100644 index f72db2632305..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[8].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring0737135e13fea55a0e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "267ef551-438e-4b15-8f53-dc645640c06b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A7D00CBD", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:23 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462af7a-701e-0051-35f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "267ef551-438e-4b15-8f53-dc645640c06b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9f5cbc29-f88b-4ea3-96fd-50d3f5a3c55e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462af9b-701e-0051-52f2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring0737135e13fea55a0eWed, 03 Jun 2020 22:01:23 GMT\"0x8D80809A7D00CBD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "9f5cbc29-f88b-4ea3-96fd-50d3f5a3c55e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring0737135e13fea55a0e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8dae4606-95dc-4fe7-9358-123c0a45e9fd" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462afca-701e-0051-7bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "8dae4606-95dc-4fe7-9358-123c0a45e9fd" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring0737135e13fea55a0e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[9].json deleted file mode 100644 index 9c3aca871457..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsaspermissionstostring[9].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring029193036ab044ce2a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "eadeb67d-7eaa-407a-8acb-7a1960c419ca" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A7FAA982", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:23 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462affe-701e-0051-23f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "eadeb67d-7eaa-407a-8acb-7a1960c419ca" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "25bdc1b3-8176-4120-a722-90140ec0fff1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b011-701e-0051-30f2-396bad000000", - "Body" : "jtcaccountsaspermissionstostringjtcaccountsaspermissionstostring029193036ab044ce2aWed, 03 Jun 2020 22:01:23 GMT\"0x8D80809A7FAA982\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "25bdc1b3-8176-4120-a722-90140ec0fff1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsaspermissionstostring029193036ab044ce2a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f2b12bc3-e945-4b5a-98e6-8e276bf1df73" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b054-701e-0051-62f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:23 GMT", - "x-ms-client-request-id" : "f2b12bc3-e945-4b5a-98e6-8e276bf1df73" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsaspermissionstostring029193036ab044ce2a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeia.json deleted file mode 100644 index 5e2bc9de3f7d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeia.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeia060717b9185efa4411484?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4139c1aa-3542-4ef2-9c29-42f0f92cb82e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809AB347D46", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:29 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b8f3-701e-0051-29f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "4139c1aa-3542-4ef2-9c29-42f0f92cb82e" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypeia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b1a764b0-2228-4468-adaf-4eaf4300d24a" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b911-701e-0051-40f2-396bad000000", - "Body" : "jtcaccountsasresourcetypeiajtcaccountsasresourcetypeia060717b9185efa4411484Wed, 03 Jun 2020 22:01:29 GMT\"0x8D80809AB347D46\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "b1a764b0-2228-4468-adaf-4eaf4300d24a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeia060717b9185efa4411484?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5acf8e7d-ba95-43a4-a813-e6362aea574b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b92c-701e-0051-55f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "5acf8e7d-ba95-43a4-a813-e6362aea574b" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeia060717b9185efa4411484" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[0].json deleted file mode 100644 index 7164190d22cf..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeparse01654245994449f76a4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9a8447b6-c3eb-4f1e-95b7-fae0490dd0e2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809AA930CF6", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:28 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b790-701e-0051-13f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "9a8447b6-c3eb-4f1e-95b7-fae0490dd0e2" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "139b7da0-2df9-4879-82ec-bfe1311e23ca" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b7b4-701e-0051-31f2-396bad000000", - "Body" : "jtcaccountsasresourcetypeparsejtcaccountsasresourcetypeparse01654245994449f76a4Wed, 03 Jun 2020 22:01:28 GMT\"0x8D80809AA930CF6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "139b7da0-2df9-4879-82ec-bfe1311e23ca", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeparse01654245994449f76a4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8bfe9fcf-0d9d-4f12-a324-7c678217edb6" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b7d1-701e-0051-4af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "8bfe9fcf-0d9d-4f12-a324-7c678217edb6" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeparse01654245994449f76a4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[1].json deleted file mode 100644 index e4244355b7c9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeparse023841d46188d1021b4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "18ebc1dc-96ad-4d7b-9eff-433299f9016f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809AABA74A4", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:28 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b7ec-701e-0051-5ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "18ebc1dc-96ad-4d7b-9eff-433299f9016f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b1428019-904c-4cd9-a263-e9590714c9d7" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b7fe-701e-0051-69f2-396bad000000", - "Body" : "jtcaccountsasresourcetypeparsejtcaccountsasresourcetypeparse023841d46188d1021b4Wed, 03 Jun 2020 22:01:28 GMT\"0x8D80809AABA74A4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "b1428019-904c-4cd9-a263-e9590714c9d7", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeparse023841d46188d1021b4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ef673663-d43d-4c59-944b-adb92ad3b50f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b808-701e-0051-71f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "ef673663-d43d-4c59-944b-adb92ad3b50f" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeparse023841d46188d1021b4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[2].json deleted file mode 100644 index c69d38ecdce8..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeparse000048b3139c6e54274?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7ea1ff31-da61-40fe-85cd-d3db76ef4abc" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809AAE4EA50", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:28 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b81c-701e-0051-80f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "7ea1ff31-da61-40fe-85cd-d3db76ef4abc" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ac629e8d-87c0-4429-b7fe-213c191e2e3c" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b854-701e-0051-2cf2-396bad000000", - "Body" : "jtcaccountsasresourcetypeparsejtcaccountsasresourcetypeparse000048b3139c6e54274Wed, 03 Jun 2020 22:01:28 GMT\"0x8D80809AAE4EA50\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "ac629e8d-87c0-4429-b7fe-213c191e2e3c", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeparse000048b3139c6e54274?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3035fe97-f36c-49bb-8210-26fbd5c03554" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b87a-701e-0051-49f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "3035fe97-f36c-49bb-8210-26fbd5c03554" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeparse000048b3139c6e54274" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[3].json deleted file mode 100644 index 64920958bc4e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypeparse[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeparse096921b93eb51875cf4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d2e53978-f7ef-450e-bc69-da774b27459d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809AB0D3CA1", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:29 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b894-701e-0051-5ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "d2e53978-f7ef-450e-bc69-da774b27459d" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "74217a7a-1194-4ae8-8038-59d8682bf0c0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b8af-701e-0051-74f2-396bad000000", - "Body" : "jtcaccountsasresourcetypeparsejtcaccountsasresourcetypeparse096921b93eb51875cf4Wed, 03 Jun 2020 22:01:29 GMT\"0x8D80809AB0D3CA1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "74217a7a-1194-4ae8-8038-59d8682bf0c0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypeparse096921b93eb51875cf4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "97146fc2-11a6-4c87-91f9-84a0a4b81d76" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b8cd-701e-0051-0cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:28 GMT", - "x-ms-client-request-id" : "97146fc2-11a6-4c87-91f9-84a0a4b81d76" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypeparse096921b93eb51875cf4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[0].json deleted file mode 100644 index a4cdc177f110..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypetostring09498289630778ea7d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ee5809a0-271e-4102-8025-5e4bbd1e8012" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A9F918A2", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:27 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b5f3-701e-0051-50f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "ee5809a0-271e-4102-8025-5e4bbd1e8012" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8c5b78ef-08b7-4419-9560-4925da397e4f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b60e-701e-0051-67f2-396bad000000", - "Body" : "jtcaccountsasresourcetypetostringjtcaccountsasresourcetypetostring09498289630778ea7dWed, 03 Jun 2020 22:01:27 GMT\"0x8D80809A9F918A2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "8c5b78ef-08b7-4419-9560-4925da397e4f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypetostring09498289630778ea7d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "940a2fc9-5ded-4a8f-9ce3-00077719f012" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b63c-701e-0051-0cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "940a2fc9-5ded-4a8f-9ce3-00077719f012" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypetostring09498289630778ea7d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[1].json deleted file mode 100644 index ff5d0e8545bf..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypetostring007528644f0a021d2d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a6a907ad-d439-41b2-a9a0-a2ed9d6cbd03" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809AA1EAB1E", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:27 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b65d-701e-0051-26f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:26 GMT", - "x-ms-client-request-id" : "a6a907ad-d439-41b2-a9a0-a2ed9d6cbd03" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f06180e7-c54b-4431-8700-e9afeb9c5d6a" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b683-701e-0051-44f2-396bad000000", - "Body" : "jtcaccountsasresourcetypetostringjtcaccountsasresourcetypetostring007528644f0a021d2dWed, 03 Jun 2020 22:01:27 GMT\"0x8D80809AA1EAB1E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "f06180e7-c54b-4431-8700-e9afeb9c5d6a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypetostring007528644f0a021d2d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e2d8a641-332f-49a1-9379-5bfbb286a2fb" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b69c-701e-0051-5bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "e2d8a641-332f-49a1-9379-5bfbb286a2fb" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypetostring007528644f0a021d2d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[2].json deleted file mode 100644 index 44694469593e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypetostring0387510b8940405c54?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e2e0164c-6cf6-4215-b922-5d8e48154c53" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809AA4920CE", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:27 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b6b5-701e-0051-6ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "e2e0164c-6cf6-4215-b922-5d8e48154c53" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "37e5f16d-de61-4172-98f4-b66d3b3957ef" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b6cf-701e-0051-02f2-396bad000000", - "Body" : "jtcaccountsasresourcetypetostringjtcaccountsasresourcetypetostring0387510b8940405c54Wed, 03 Jun 2020 22:01:27 GMT\"0x8D80809AA4920CE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "37e5f16d-de61-4172-98f4-b66d3b3957ef", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypetostring0387510b8940405c54?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0d732a4d-16b8-4f67-afc2-0f1ece49afcf" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b6ea-701e-0051-17f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "0d732a4d-16b8-4f67-afc2-0f1ece49afcf" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypetostring0387510b8940405c54" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[3].json deleted file mode 100644 index a9d8bd4e68a7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasresourcetypetostring[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypetostring030295118ebcf6b4a8?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "27c5b72e-cf9c-45ac-8c3e-9b1405d271fa" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809AA6E3DF9", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:28 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462b712-701e-0051-34f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "27c5b72e-cf9c-45ac-8c3e-9b1405d271fa" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasresourcetypetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9d533922-2133-4671-8a77-6f1e38efcc9f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462b73a-701e-0051-53f2-396bad000000", - "Body" : "jtcaccountsasresourcetypetostringjtcaccountsasresourcetypetostring030295118ebcf6b4a8Wed, 03 Jun 2020 22:01:28 GMT\"0x8D80809AA6E3DF9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "9d533922-2133-4671-8a77-6f1e38efcc9f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasresourcetypetostring030295118ebcf6b4a8?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "59f328ba-7570-4c17-aa59-fda141359d4d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462b760-701e-0051-6ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:27 GMT", - "x-ms-client-request-id" : "59f328ba-7570-4c17-aa59-fda141359d4d" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasresourcetypetostring030295118ebcf6b4a8" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[0].json deleted file mode 100644 index 98580eb29448..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturesstringtosign072763c59f8a5beae?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ebf88bd8-9d50-4a1e-8f97-c1b3edbcbf0b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A52A117C", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:19 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a916-701e-0051-1ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "ebf88bd8-9d50-4a1e-8f97-c1b3edbcbf0b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b1718085-acb0-4a62-a3c5-41ed05ec1f49" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a934-701e-0051-37f2-396bad000000", - "Body" : "jtcaccountsassignaturesstringtosignjtcaccountsassignaturesstringtosign072763c59f8a5beaeWed, 03 Jun 2020 22:01:19 GMT\"0x8D80809A52A117C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "b1718085-acb0-4a62-a3c5-41ed05ec1f49", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturesstringtosign072763c59f8a5beae?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8132a9a6-ad41-4169-b530-0ce2ca074dca" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a95f-701e-0051-5af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "8132a9a6-ad41-4169-b530-0ce2ca074dca" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturesstringtosign072763c59f8a5beae" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[1].json deleted file mode 100644 index 66b650700db6..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturesstringtosign012981ac7c720e672?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9d5863c8-fc67-4ca1-9fa6-470466ddc2b1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A5508E9D", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:19 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a977-701e-0051-6bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "9d5863c8-fc67-4ca1-9fa6-470466ddc2b1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a50a89d4-507f-4f6e-bacb-0d8a1a725cba" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a991-701e-0051-7ff2-396bad000000", - "Body" : "jtcaccountsassignaturesstringtosignjtcaccountsassignaturesstringtosign012981ac7c720e672Wed, 03 Jun 2020 22:01:19 GMT\"0x8D80809A5508E9D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "a50a89d4-507f-4f6e-bacb-0d8a1a725cba", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturesstringtosign012981ac7c720e672?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2bdb371f-7cd8-4a89-931d-b5e001f4627c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a9b1-701e-0051-18f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "2bdb371f-7cd8-4a89-931d-b5e001f4627c" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturesstringtosign012981ac7c720e672" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[2].json deleted file mode 100644 index 25791823b748..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturesstringtosign[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturesstringtosign006680ff92333c970?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f49f9943-b673-48e9-b7a6-459ac629544e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A5764843", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:19 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a9d1-701e-0051-33f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "f49f9943-b673-48e9-b7a6-459ac629544e" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2e44653b-1616-448b-9efe-0113737d9c4d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a9f2-701e-0051-4af2-396bad000000", - "Body" : "jtcaccountsassignaturesstringtosignjtcaccountsassignaturesstringtosign006680ff92333c970Wed, 03 Jun 2020 22:01:19 GMT\"0x8D80809A5764843\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "2e44653b-1616-448b-9efe-0113737d9c4d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturesstringtosign006680ff92333c970?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3076ad81-07eb-4d2a-8969-0b75cbf6493a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462aa0d-701e-0051-5ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "3076ad81-07eb-4d2a-8969-0b75cbf6493a" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturesstringtosign006680ff92333c970" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[0].json deleted file mode 100644 index f03c63d5a03e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesia0551982e9ba0e5135b4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c1a9a246-4064-42c6-b23d-ac335ec7f023" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A59CC564", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:19 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462aa3b-701e-0051-02f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "c1a9a246-4064-42c6-b23d-ac335ec7f023" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "281ba485-1f15-4198-a23f-d2eeafd6614c" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462aa56-701e-0051-18f2-396bad000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia0551982e9ba0e5135b4Wed, 03 Jun 2020 22:01:19 GMT\"0x8D80809A59CC564\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "281ba485-1f15-4198-a23f-d2eeafd6614c", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesia0551982e9ba0e5135b4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ccd2cf61-5262-4d22-8e2a-dd1be46f045f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462aa7d-701e-0051-38f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "ccd2cf61-5262-4d22-8e2a-dd1be46f045f" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia0551982e9ba0e5135b4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[1].json deleted file mode 100644 index 9e1b8fc384d9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesia0935957c1a0f7d276d4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "92157bca-4a26-42c8-a72c-f5413731191f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A5D45DA4", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:20 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462aadf-701e-0051-07f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "92157bca-4a26-42c8-a72c-f5413731191f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1178fd69-9016-4692-aae6-0cb658f33fb6" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462aaf7-701e-0051-1bf2-396bad000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia0935957c1a0f7d276d4Wed, 03 Jun 2020 22:01:20 GMT\"0x8D80809A5D45DA4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "1178fd69-9016-4692-aae6-0cb658f33fb6", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesia0935957c1a0f7d276d4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d3d22389-3bd5-44aa-97a4-53b3632bb664" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462ab12-701e-0051-2ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:19 GMT", - "x-ms-client-request-id" : "d3d22389-3bd5-44aa-97a4-53b3632bb664" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia0935957c1a0f7d276d4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[2].json deleted file mode 100644 index bb57dd749a5a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesia0727215aa159413b534?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e08f62a1-2bea-4b76-a0bb-6ee31d6c125b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A5FD2533", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:20 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462ab40-701e-0051-53f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "e08f62a1-2bea-4b76-a0bb-6ee31d6c125b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "97969195-7a61-40c2-a1d2-05daf1e0d0ff" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462ab67-701e-0051-70f2-396bad000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia0727215aa159413b534Wed, 03 Jun 2020 22:01:20 GMT\"0x8D80809A5FD2533\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "97969195-7a61-40c2-a1d2-05daf1e0d0ff", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesia0727215aa159413b534?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "766e6cd7-6c53-49e2-80a2-6541f3448b73" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462ab79-701e-0051-7ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "766e6cd7-6c53-49e2-80a2-6541f3448b73" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia0727215aa159413b534" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[3].json deleted file mode 100644 index 2c7a123dd0c3..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesia[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesia0391012db79ae6edee4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "38116ee7-99cd-43d2-8a89-f7eeabaa8103" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A6224263", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:20 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462ab99-701e-0051-18f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "38116ee7-99cd-43d2-8a89-f7eeabaa8103" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ef571d32-7709-4c5f-b748-e2d9d69d97b2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462abab-701e-0051-25f2-396bad000000", - "Body" : "jtcaccountsassignaturevaluesiajtcaccountsassignaturevaluesia0391012db79ae6edee4Wed, 03 Jun 2020 22:01:20 GMT\"0x8D80809A6224263\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "ef571d32-7709-4c5f-b748-e2d9d69d97b2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesia0391012db79ae6edee4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "60d44ac5-3d84-46b2-b07d-99516429112d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462abba-701e-0051-30f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "60d44ac5-3d84-46b2-b07d-99516429112d" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesia0391012db79ae6edee4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnull.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnull.json deleted file mode 100644 index a7563bb447eb..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnull.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesnull0843985013730f98d0?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "89543b23-adba-4ec3-a718-0f83e684f571" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A649F84F", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:21 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462abd5-701e-0051-46f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "89543b23-adba-4ec3-a718-0f83e684f571" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesnull&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "940b7ee5-c050-4306-a802-7447cec0b188" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462abf7-701e-0051-62f2-396bad000000", - "Body" : "jtcaccountsassignaturevaluesnulljtcaccountsassignaturevaluesnull0843985013730f98d0Wed, 03 Jun 2020 22:01:21 GMT\"0x8D80809A649F84F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "940b7ee5-c050-4306-a802-7447cec0b188", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesnull0843985013730f98d0?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d86e0901-95cf-4933-a1bd-cc544a86b8af" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462ac0d-701e-0051-75f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "d86e0901-95cf-4933-a1bd-cc544a86b8af" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesnull0843985013730f98d0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnullpermission.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnullpermission.json deleted file mode 100644 index 0c6746a02534..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsassignaturevaluesnullpermission.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesnullpermission028393a7a3bf7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a4880d0f-318e-491f-b22f-122ea4090014" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A6700028", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:21 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462ac35-701e-0051-1af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "a4880d0f-318e-491f-b22f-122ea4090014" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsassignaturevaluesnullpermission&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d328a57c-9f12-4f9e-a827-0379ebc80c43" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462ac4e-701e-0051-2df2-396bad000000", - "Body" : "jtcaccountsassignaturevaluesnullpermissionjtcaccountsassignaturevaluesnullpermission028393a7a3bf7Wed, 03 Jun 2020 22:01:21 GMT\"0x8D80809A6700028\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "d328a57c-9f12-4f9e-a827-0379ebc80c43", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsassignaturevaluesnullpermission028393a7a3bf7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "859a1e01-01a4-4f0e-8f6c-7a4c49194202" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462ac68-701e-0051-41f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:20 GMT", - "x-ms-client-request-id" : "859a1e01-01a4-4f0e-8f6c-7a4c49194202" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsassignaturevaluesnullpermission028393a7a3bf7" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobclientgetsnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobclientgetsnapshot.json deleted file mode 100644 index 3a7893e1f798..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobclientgetsnapshot.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientgetsnapshot0sastestblobclientgetsnapshotd6644411f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6ea8be3e-7103-4a6c-adcf-17bda3706d4c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099416DA07", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46276a9-701e-0051-7bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "x-ms-client-request-id" : "6ea8be3e-7103-4a6c-adcf-17bda3706d4c" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientgetsnapshot0sastestblobclientgetsnapshotd6644411f/javablobblobclientgetsnapshot1475069d11cf1457c743", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dcc28bd8-1e0c-4745-946b-307f2d5e171b", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:00:50.6927252Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D8080994318894", - "Content-Length" : "0", - "x-ms-request-id" : "f46276de-701e-0051-23f2-396bad000000", - "x-ms-client-request-id" : "dcc28bd8-1e0c-4745-946b-307f2d5e171b" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientgetsnapshot0sastestblobclientgetsnapshotd6644411f/javablobblobclientgetsnapshot1475069d11cf1457c743?comp=snapshot", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "63bbf528-ee58-450a-8ff3-50e2c5ca6926" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:50 GMT", - "x-ms-version-id" : "2020-06-03T22:00:50.8288510Z", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "x-ms-snapshot" : "2020-06-03T22:00:50.8278510Z", - "ETag" : "0x8D8080994318894", - "Content-Length" : "0", - "x-ms-request-id" : "f462770f-701e-0051-47f2-396bad000000", - "x-ms-client-request-id" : "63bbf528-ee58-450a-8ff3-50e2c5ca6926" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobclientgetsnapshot&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c040ac1b-33bc-4e7c-8bff-415b660e1423" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627734-701e-0051-64f2-396bad000000", - "Body" : "jtcblobclientgetsnapshotjtcblobclientgetsnapshot0sastestblobclientgetsnapshotd6644411fWed, 03 Jun 2020 22:00:50 GMT\"0x8D808099416DA07\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "x-ms-client-request-id" : "c040ac1b-33bc-4e7c-8bff-415b660e1423", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientgetsnapshot0sastestblobclientgetsnapshotd6644411f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "530cfc75-42fe-4ec1-b5c9-908cb41c36a4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462775b-701e-0051-05f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "x-ms-client-request-id" : "530cfc75-42fe-4ec1-b5c9-908cb41c36a4" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobclientgetsnapshot0sastestblobclientgetsnapshotd6644411f", "javablobblobclientgetsnapshot1475069d11cf1457c743" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobclientissnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobclientissnapshot.json deleted file mode 100644 index 0cba5daa4c70..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobclientissnapshot.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientissnapshot0sastestblobclientissnapshotba2958509c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f0cda87c-9640-4d58-9ca9-3de695789dc5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809947404BA", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:51 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462778f-701e-0051-30f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "x-ms-client-request-id" : "f0cda87c-9640-4d58-9ca9-3de695789dc5" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientissnapshot0sastestblobclientissnapshotba2958509c/javablobblobclientissnapshot124634aa3838c15c9f4e", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ba6c0457-12db-488b-891a-981d92665b39", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:00:51.2202260Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:51 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D8080994820614", - "Content-Length" : "0", - "x-ms-request-id" : "f46277b7-701e-0051-4df2-396bad000000", - "x-ms-client-request-id" : "ba6c0457-12db-488b-891a-981d92665b39" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientissnapshot0sastestblobclientissnapshotba2958509c/javablobblobclientissnapshot124634aa3838c15c9f4e?comp=snapshot", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d90f48ad-0538-4a44-b47c-2b2675b2c3d8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:51 GMT", - "x-ms-version-id" : "2020-06-03T22:00:51.3083070Z", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "x-ms-snapshot" : "2020-06-03T22:00:51.3073070Z", - "ETag" : "0x8D8080994820614", - "Content-Length" : "0", - "x-ms-request-id" : "f46277eb-701e-0051-7cf2-396bad000000", - "x-ms-client-request-id" : "d90f48ad-0538-4a44-b47c-2b2675b2c3d8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobclientissnapshot&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "86ff0a0b-d115-4b12-9a57-b16c0f780462" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627817-701e-0051-1bf2-396bad000000", - "Body" : "jtcblobclientissnapshotjtcblobclientissnapshot0sastestblobclientissnapshotba2958509cWed, 03 Jun 2020 22:00:51 GMT\"0x8D80809947404BA\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:50 GMT", - "x-ms-client-request-id" : "86ff0a0b-d115-4b12-9a57-b16c0f780462", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobclientissnapshot0sastestblobclientissnapshotba2958509c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4eb977ea-0e53-4d60-92e9-bac920fd7184" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4627834-701e-0051-35f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "x-ms-client-request-id" : "4eb977ea-0e53-4d60-92e9-bac920fd7184" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobclientissnapshot0sastestblobclientissnapshotba2958509c", "javablobblobclientissnapshot124634aa3838c15c9f4e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[0].json deleted file mode 100644 index f3367a72db01..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0sastestblobrange38924393f6de6f2079904?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6705545b-d08f-48e3-b64d-01f2211c06a1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099308356C", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:48 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4627373-701e-0051-6af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:48 GMT", - "x-ms-client-request-id" : "6705545b-d08f-48e3-b64d-01f2211c06a1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrange&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2fc0d599-d4ac-4b42-8c33-d0908abc94c9" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46273cf-701e-0051-35f2-396bad000000", - "Body" : "jtcblobrangejtcblobrange0sastestblobrange38924393f6de6f2079904Wed, 03 Jun 2020 22:00:48 GMT\"0x8D808099308356C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:48 GMT", - "x-ms-client-request-id" : "2fc0d599-d4ac-4b42-8c33-d0908abc94c9", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0sastestblobrange38924393f6de6f2079904?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8fc4a9bb-cc74-4602-a871-29f9e54eeba0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462745e-701e-0051-27f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:48 GMT", - "x-ms-client-request-id" : "8fc4a9bb-cc74-4602-a871-29f9e54eeba0" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobrange0sastestblobrange38924393f6de6f2079904" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[1].json deleted file mode 100644 index f8618307ed22..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0sastestblobrange6f639173b1469fb0a0b74?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5a049872-b2cc-4577-9a08-b3ec6db8374a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809936C3FB9", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:49 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46274aa-701e-0051-65f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:48 GMT", - "x-ms-client-request-id" : "5a049872-b2cc-4577-9a08-b3ec6db8374a" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrange&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "057df80a-a5a9-41b0-b8d4-ed53ad1f2370" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46274ed-701e-0051-18f2-396bad000000", - "Body" : "jtcblobrangejtcblobrange0sastestblobrange6f639173b1469fb0a0b74Wed, 03 Jun 2020 22:00:49 GMT\"0x8D80809936C3FB9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "057df80a-a5a9-41b0-b8d4-ed53ad1f2370", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0sastestblobrange6f639173b1469fb0a0b74?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3b8e351b-b2da-4e9b-96b5-0cc4e9adbae8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4627506-701e-0051-2ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "3b8e351b-b2da-4e9b-96b5-0cc4e9adbae8" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobrange0sastestblobrange6f639173b1469fb0a0b74" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[2].json deleted file mode 100644 index 575d239f46a4..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrange[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0sastestblobrangebc3940942be3f59e5c984?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b3eb7acd-bef2-46fa-919e-5c5564163bc4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099396DC90", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:49 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4627537-701e-0051-56f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "b3eb7acd-bef2-46fa-919e-5c5564163bc4" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrange&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "46a4c953-f44e-4a3e-a550-72274eca0fd2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627564-701e-0051-7af2-396bad000000", - "Body" : "jtcblobrangejtcblobrange0sastestblobrangebc3940942be3f59e5c984Wed, 03 Jun 2020 22:00:49 GMT\"0x8D808099396DC90\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "46a4c953-f44e-4a3e-a550-72274eca0fd2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrange0sastestblobrangebc3940942be3f59e5c984?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3545881a-cc0c-413e-9c43-b81883da4072" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462758a-701e-0051-18f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "3545881a-cc0c-413e-9c43-b81883da4072" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobrange0sastestblobrangebc3940942be3f59e5c984" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrangeia[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrangeia[0].json deleted file mode 100644 index bbc90f307fcb..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrangeia[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrangeia0sastestblobrangeiafa140008417abecff0a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "51edf03f-064e-4a8c-b090-888054933031" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080993C067AD", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:49 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46275a2-701e-0051-2af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "51edf03f-064e-4a8c-b090-888054933031" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrangeia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "60eb9513-1c7a-4a39-8b96-15e631e70694" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46275ba-701e-0051-3bf2-396bad000000", - "Body" : "jtcblobrangeiajtcblobrangeia0sastestblobrangeiafa140008417abecff0aWed, 03 Jun 2020 22:00:49 GMT\"0x8D8080993C067AD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "60eb9513-1c7a-4a39-8b96-15e631e70694", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrangeia0sastestblobrangeiafa140008417abecff0a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "29d2ffd2-2621-42eb-82fc-aaee7c5826b3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46275f5-701e-0051-6cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "29d2ffd2-2621-42eb-82fc-aaee7c5826b3" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobrangeia0sastestblobrangeiafa140008417abecff0a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrangeia[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrangeia[1].json deleted file mode 100644 index e19013a53bf7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobrangeia[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrangeia0sastestblobrangeia4600149564d55671754?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1c344505-6a42-4229-928d-6227ff192330" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080993EB52A5", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4627642-701e-0051-2af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "1c344505-6a42-4229-928d-6227ff192330" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobrangeia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "26b19cc0-a572-46ad-84f3-c77cdf2b586f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462765f-701e-0051-42f2-396bad000000", - "Body" : "jtcblobrangeiajtcblobrangeia0sastestblobrangeia4600149564d55671754Wed, 03 Jun 2020 22:00:50 GMT\"0x8D8080993EB52A5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "26b19cc0-a572-46ad-84f3-c77cdf2b586f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobrangeia0sastestblobrangeia4600149564d55671754?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "05dbae89-879c-4f1e-a63a-db6e6a5fa39e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4627683-701e-0051-5df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:49 GMT", - "x-ms-client-request-id" : "05dbae89-879c-4f1e-a63a-db6e6a5fa39e" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobrangeia0sastestblobrangeia4600149564d55671754" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[0].json deleted file mode 100644 index 36c7ebcf66ca..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse06765284c9cdc44acb4c8?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e3921dd0-bfc8-4660-9654-012a090b0538" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099F545713", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:09 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629831-701e-0051-53f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "e3921dd0-bfc8-4660-9654-012a090b0538" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "86f895f8-232d-457d-a486-520095976b88" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629862-701e-0051-78f2-396bad000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse06765284c9cdc44acb4c8Wed, 03 Jun 2020 22:01:09 GMT\"0x8D808099F545713\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "86f895f8-232d-457d-a486-520095976b88", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse06765284c9cdc44acb4c8?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e5e18ea2-91b5-4a15-86ff-f713ec771ee2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629888-701e-0051-15f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "e5e18ea2-91b5-4a15-86ff-f713ec771ee2" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse06765284c9cdc44acb4c8" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[1].json deleted file mode 100644 index 064c26a44a1d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse0933762351278dd87f4ca?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "09f60bbe-e6be-47dd-8ad2-46f15211fc0a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099F7A8605", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:09 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46298ba-701e-0051-39f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "09f60bbe-e6be-47dd-8ad2-46f15211fc0a" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "99b8f291-e8f7-4c74-9150-f6dea636f6f0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46298f1-701e-0051-60f2-396bad000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse0933762351278dd87f4caWed, 03 Jun 2020 22:01:09 GMT\"0x8D808099F7A8605\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "99b8f291-e8f7-4c74-9150-f6dea636f6f0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse0933762351278dd87f4ca?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f4f29d98-2294-4d85-a0b7-151017f776af" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462991e-701e-0051-80f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "f4f29d98-2294-4d85-a0b7-151017f776af" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse0933762351278dd87f4ca" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[2].json deleted file mode 100644 index 1579f20bc25f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse0001678ef83cce8314470?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ecfbe14c-6bfc-4e3b-a165-154b1053fc34" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099F9FA349", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:09 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629955-701e-0051-28f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "ecfbe14c-6bfc-4e3b-a165-154b1053fc34" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c7ec1a70-673f-4967-a028-04634c52fd67" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629974-701e-0051-42f2-396bad000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse0001678ef83cce8314470Wed, 03 Jun 2020 22:01:09 GMT\"0x8D808099F9FA349\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "c7ec1a70-673f-4967-a028-04634c52fd67", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse0001678ef83cce8314470?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "60c85481-7020-4c39-b656-c7bbf94d2e32" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462999a-701e-0051-62f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "60c85481-7020-4c39-b656-c7bbf94d2e32" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse0001678ef83cce8314470" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[3].json deleted file mode 100644 index 660ba9a1cf8a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse04800055206cb38784473?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bf10cc91-8e04-4c1d-a1c6-7161fc8053ff" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099FC4724A", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:10 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46299c4-701e-0051-04f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "bf10cc91-8e04-4c1d-a1c6-7161fc8053ff" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8b3635eb-02b9-4d6c-b419-9b30ff25ecfc" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46299e5-701e-0051-1ff2-396bad000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse04800055206cb38784473Wed, 03 Jun 2020 22:01:10 GMT\"0x8D808099FC4724A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "8b3635eb-02b9-4d6c-b419-9b30ff25ecfc", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse04800055206cb38784473?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "24131c3f-3073-4452-ac4b-280655aca12b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629a00-701e-0051-37f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "24131c3f-3073-4452-ac4b-280655aca12b" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse04800055206cb38784473" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[4].json deleted file mode 100644 index 1433644246bb..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[4].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse025896077db25d0416431?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c3a5eb80-eb58-4a03-8c2e-186d1b70e564" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099FE9685C", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:10 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629a1f-701e-0051-4df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "c3a5eb80-eb58-4a03-8c2e-186d1b70e564" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6eb6d967-bdd8-4640-8225-9619db628790" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629a42-701e-0051-6bf2-396bad000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse025896077db25d0416431Wed, 03 Jun 2020 22:01:10 GMT\"0x8D808099FE9685C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:09 GMT", - "x-ms-client-request-id" : "6eb6d967-bdd8-4640-8225-9619db628790", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse025896077db25d0416431?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "eef8e254-e841-4c37-8904-51df55b05bfa" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629a66-701e-0051-05f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "eef8e254-e841-4c37-8904-51df55b05bfa" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse025896077db25d0416431" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[5].json deleted file mode 100644 index 4b98dcbd3edf..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[5].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse0501378837ff53e72f4b3?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5511497b-1cf6-4c1a-9ea3-f0199c7c4367" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A00FE575", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:10 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629a8f-701e-0051-22f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "5511497b-1cf6-4c1a-9ea3-f0199c7c4367" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9fad9e95-3c72-45a2-885f-7f99bbc4abe1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629aa6-701e-0051-34f2-396bad000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse0501378837ff53e72f4b3Wed, 03 Jun 2020 22:01:10 GMT\"0x8D80809A00FE575\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "9fad9e95-3c72-45a2-885f-7f99bbc4abe1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse0501378837ff53e72f4b3?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c5a6b629-09ca-46ea-8fe0-2cd8e469f665" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629ab8-701e-0051-43f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "c5a6b629-09ca-46ea-8fe0-2cd8e469f665" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse0501378837ff53e72f4b3" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[6].json deleted file mode 100644 index 7e12c86eafdd..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[6].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse079789c44894d078c742f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cc5394f3-2cf9-4ae3-804d-321d3b5451e9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A03502A0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:10 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629ad2-701e-0051-57f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "cc5394f3-2cf9-4ae3-804d-321d3b5451e9" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b6f34601-2c52-432f-9b38-d0fa585645a8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629af3-701e-0051-70f2-396bad000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse079789c44894d078c742fWed, 03 Jun 2020 22:01:10 GMT\"0x8D80809A03502A0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "b6f34601-2c52-432f-9b38-d0fa585645a8", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse079789c44894d078c742f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e6df22e4-cace-471c-abb2-40341c45efac" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629b0f-701e-0051-09f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "e6df22e4-cace-471c-abb2-40341c45efac" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse079789c44894d078c742f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[7].json deleted file mode 100644 index 9cbc08290c82..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparse[7].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse0754595073ee1ef691481?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "12f3026c-0a2b-410c-988f-8499dc9aca03" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A059D1AB", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629b39-701e-0051-2cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "12f3026c-0a2b-410c-988f-8499dc9aca03" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3193c519-7d05-4df7-b931-cfdeacea83fb" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629b75-701e-0051-5ef2-396bad000000", - "Body" : "jtcblobsaspermissionsparsejtcblobsaspermissionsparse0754595073ee1ef691481Wed, 03 Jun 2020 22:01:11 GMT\"0x8D80809A059D1AB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "3193c519-7d05-4df7-b931-cfdeacea83fb", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparse0754595073ee1ef691481?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5f1084a2-6d82-43ee-a6a3-c513b70ccd69" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629b98-701e-0051-7bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "5f1084a2-6d82-43ee-a6a3-c513b70ccd69" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparse0754595073ee1ef691481" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparseia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparseia.json deleted file mode 100644 index 70aa0a30bbe5..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionsparseia.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparseia014176e3963a80f6504b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6212f801-b4c6-4004-b7eb-3d748d6a5b37" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A0835CD0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629bcb-701e-0051-22f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "6212f801-b4c6-4004-b7eb-3d748d6a5b37" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionsparseia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "264d1358-3913-44c0-a47e-8fa68ebb6dc2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629bf6-701e-0051-47f2-396bad000000", - "Body" : "jtcblobsaspermissionsparseiajtcblobsaspermissionsparseia014176e3963a80f6504bWed, 03 Jun 2020 22:01:11 GMT\"0x8D80809A0835CD0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:10 GMT", - "x-ms-client-request-id" : "264d1358-3913-44c0-a47e-8fa68ebb6dc2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionsparseia014176e3963a80f6504b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "28054b0c-444c-423b-9fca-2b877584baaa" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629c5d-701e-0051-19f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "28054b0c-444c-423b-9fca-2b877584baaa" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionsparseia014176e3963a80f6504b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[0].json deleted file mode 100644 index e8e01dde0494..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring00890678ccb257d7664a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3e6b5251-961b-46cd-bf31-9ddc2d268314" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099E4CE037", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:07 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462954e-701e-0051-0ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "3e6b5251-961b-46cd-bf31-9ddc2d268314" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "339b5c72-7a5e-4617-a3b0-7fa115722dcf" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629569-701e-0051-22f2-396bad000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring00890678ccb257d7664aWed, 03 Jun 2020 22:01:07 GMT\"0x8D808099E4CE037\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "339b5c72-7a5e-4617-a3b0-7fa115722dcf", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring00890678ccb257d7664a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8923060e-568a-4bdc-8686-cb8a67116d38" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462958c-701e-0051-3df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "8923060e-568a-4bdc-8686-cb8a67116d38" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring00890678ccb257d7664a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[1].json deleted file mode 100644 index 90d92acf9cb5..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring031039a5f45eafc7a646?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d9d7e0c4-71b2-430a-87d6-dcd167181075" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099E72248C", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:07 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46295be-701e-0051-64f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "d9d7e0c4-71b2-430a-87d6-dcd167181075" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f3784b81-34c1-4c5f-b212-302477f33b49" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46295d6-701e-0051-76f2-396bad000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring031039a5f45eafc7a646Wed, 03 Jun 2020 22:01:07 GMT\"0x8D808099E72248C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "f3784b81-34c1-4c5f-b212-302477f33b49", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring031039a5f45eafc7a646?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fa499b2e-2e1c-4b1f-938a-7ebc8fa41837" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46295eb-701e-0051-06f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "fa499b2e-2e1c-4b1f-938a-7ebc8fa41837" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring031039a5f45eafc7a646" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[2].json deleted file mode 100644 index 50639fc552aa..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring023061b8ca8d388c3c4a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c8a17145-8b9d-4367-9e28-87d50a92556d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099E982C5B", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:08 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629620-701e-0051-31f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "c8a17145-8b9d-4367-9e28-87d50a92556d" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5967c9f6-41ec-4df8-ad0e-0b50dd51fddf" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629646-701e-0051-4ef2-396bad000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring023061b8ca8d388c3c4aWed, 03 Jun 2020 22:01:08 GMT\"0x8D808099E982C5B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "5967c9f6-41ec-4df8-ad0e-0b50dd51fddf", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring023061b8ca8d388c3c4a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "62de7050-010d-4172-bb0a-aaaaf98d8056" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629667-701e-0051-66f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "62de7050-010d-4172-bb0a-aaaaf98d8056" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring023061b8ca8d388c3c4a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[3].json deleted file mode 100644 index 5f9512ed1663..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring0858773359e6f6e11a44?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1c248100-d5b2-49fe-8851-46cb69e78d4c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099EBD97C2", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:08 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629692-701e-0051-05f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "1c248100-d5b2-49fe-8851-46cb69e78d4c" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ea647468-d3db-46fd-af8a-536db9295795" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46296bb-701e-0051-25f2-396bad000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring0858773359e6f6e11a44Wed, 03 Jun 2020 22:01:08 GMT\"0x8D808099EBD97C2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "ea647468-d3db-46fd-af8a-536db9295795", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring0858773359e6f6e11a44?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4d6464fb-c0ca-46be-9d5e-44dd5e159e51" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46296dd-701e-0051-40f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "4d6464fb-c0ca-46be-9d5e-44dd5e159e51" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring0858773359e6f6e11a44" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[4].json deleted file mode 100644 index 7e0721c40ece..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[4].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring00829224340bdf007347?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9b5b2aec-428f-4d78-b78e-ef55d58fc04f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099EE2DC03", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:08 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629703-701e-0051-60f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "9b5b2aec-428f-4d78-b78e-ef55d58fc04f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7731da30-e456-45ff-ab3a-5c0c0f381644" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462972b-701e-0051-7bf2-396bad000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring00829224340bdf007347Wed, 03 Jun 2020 22:01:08 GMT\"0x8D808099EE2DC03\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "7731da30-e456-45ff-ab3a-5c0c0f381644", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring00829224340bdf007347?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4d53e844-f0fb-4844-beb3-60396077db28" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462974c-701e-0051-17f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "4d53e844-f0fb-4844-beb3-60396077db28" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring00829224340bdf007347" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[5].json deleted file mode 100644 index c998efe1fc03..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[5].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring033503b09fcfb514dd41?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7cefc6bb-153e-4041-971b-5f13c83236be" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099F082050", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:08 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629781-701e-0051-42f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "7cefc6bb-153e-4041-971b-5f13c83236be" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "60c54262-63e6-4733-8be2-98fc80ee3a51" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462979d-701e-0051-57f2-396bad000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring033503b09fcfb514dd41Wed, 03 Jun 2020 22:01:08 GMT\"0x8D808099F082050\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "60c54262-63e6-4733-8be2-98fc80ee3a51", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring033503b09fcfb514dd41?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "118484dc-6170-4241-a951-534fc31ca3fd" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46297ab-701e-0051-62f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "118484dc-6170-4241-a951-534fc31ca3fd" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring033503b09fcfb514dd41" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[6].json deleted file mode 100644 index 141ac13b7e88..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobsaspermissionstostring[6].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring0173526a3c3ffdc37048?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "62073ccd-fb38-49b7-ae9f-5a22a1af58f4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099F2E4F3F", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:09 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46297d7-701e-0051-07f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "62073ccd-fb38-49b7-ae9f-5a22a1af58f4" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9bbd2148-b807-4c0c-b4c5-28ec3454c5c4" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629804-701e-0051-2ff2-396bad000000", - "Body" : "jtcblobsaspermissionstostringjtcblobsaspermissionstostring0173526a3c3ffdc37048Wed, 03 Jun 2020 22:01:09 GMT\"0x8D808099F2E4F3F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "9bbd2148-b807-4c0c-b4c5-28ec3454c5c4", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsaspermissionstostring0173526a3c3ffdc37048?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ec3dcfa1-f899-4b9b-ac60-84daf1bb31c3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462981c-701e-0051-45f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:08 GMT", - "x-ms-client-request-id" : "ec3dcfa1-f899-4b9b-ac60-84daf1bb31c3" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobsaspermissionstostring0173526a3c3ffdc37048" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobservicesasnetworktestblobsnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobservicesasnetworktestblobsnapshot.json deleted file mode 100644 index b8ce549f9d83..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestblobservicesasnetworktestblobsnapshot.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot04740688723cb3?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "75e5d5fa-d219-4212-aba3-9ffca68d87b0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099714F5C5", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:55 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4627fec-701e-0051-47f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-client-request-id" : "75e5d5fa-d219-4212-aba3-9ffca68d87b0" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot1251952b1a7de5?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "be925a21-5429-48a9-a4d5-3f740dfb8b52" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080997221854", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:55 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628010-701e-0051-63f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-client-request-id" : "be925a21-5429-48a9-a4d5-3f740dfb8b52" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot1251952b1a7de5/javablobblobservicesasnetworktestblobsnapshot232141a297d5", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "74917a72-9070-4a92-9666-71e7fe570761", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:00:55.7205031Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:55 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D808099730B627", - "Content-Length" : "0", - "x-ms-request-id" : "f462804e-701e-0051-13f2-396bad000000", - "x-ms-client-request-id" : "74917a72-9070-4a92-9666-71e7fe570761" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot1251952b1a7de5/javablobblobservicesasnetworktestblobsnapshot232141a297d5?comp=snapshot", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c24e157f-534c-4ab0-8503-a67b0b9d0f90" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-version-id" : "2020-06-03T22:00:55.8165917Z", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-snapshot" : "2020-06-03T22:00:55.8155917Z", - "ETag" : "0x8D808099730B627", - "Content-Length" : "0", - "x-ms-request-id" : "f4628080-701e-0051-3af2-396bad000000", - "x-ms-client-request-id" : "c24e157f-534c-4ab0-8503-a67b0b9d0f90" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot1251952b1a7de5/javablobblobservicesasnetworktestblobsnapshot232141a297d5?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A55Z&se=2020-06-04T22%3A00%3A55Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d4e4f24f-d578-4ea2-bbb4-c713a271b32f" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "447", - "StatusCode" : "403", - "x-ms-request-id" : "f46280c7-701e-0051-75f2-396bad000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:f46280c7-701e-0051-75f2-396bad000000\nTime:2020-06-03T22:00:55.9119845ZThe specified signed resource is not allowed for the this resource level", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot1251952b1a7de5/javablobblobservicesasnetworktestblobsnapshot232141a297d5?snapshot=2020-06-03T22%3A00%3A55.8155917Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A55Z&se=2020-06-04T22%3A00%3A55Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3919d6df-60df-4414-92ad-98e9fec5342a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:55 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D808099730B627", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:55 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "f46280f6-701e-0051-1cf2-396bad000000", - "Body" : "default", - "x-ms-client-request-id" : "3919d6df-60df-4414-92ad-98e9fec5342a", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot1251952b1a7de5/javablobblobservicesasnetworktestblobsnapshot232141a297d5?snapshot=2020-06-03T22%3A00%3A55.8155917Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A55Z&se=2020-06-04T22%3A00%3A55Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "65dbe8a4-c279-454f-9699-ecf12e730812" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:55 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Cache-Control" : "cache", - "ETag" : "0x8D808099730B627", - "Content-Disposition" : "disposition", - "Content-Encoding" : "encoding", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:55 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "f4628113-701e-0051-33f2-396bad000000", - "x-ms-client-request-id" : "65dbe8a4-c279-454f-9699-ecf12e730812", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobservicesasnetworktestblobsnapshot&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c65375cf-f74b-4190-9753-64629774bdcc" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462814a-701e-0051-63f2-396bad000000", - "Body" : "jtcblobservicesasnetworktestblobsnapshotjtcblobservicesasnetworktestblobsnapshot04740688723cb3Wed, 03 Jun 2020 22:00:55 GMT\"0x8D808099714F5C5\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcblobservicesasnetworktestblobsnapshot1251952b1a7de5Wed, 03 Jun 2020 22:00:55 GMT\"0x8D8080997221854\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-client-request-id" : "c65375cf-f74b-4190-9753-64629774bdcc", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot04740688723cb3?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "61ccd5e1-b9b0-4557-a9cb-d03ad02d8e82" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628169-701e-0051-7ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-client-request-id" : "61ccd5e1-b9b0-4557-a9cb-d03ad02d8e82" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot1251952b1a7de5?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "679478cc-0117-44a3-bba8-54c0ed626854" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628187-701e-0051-17f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-client-request-id" : "679478cc-0117-44a3-bba8-54c0ed626854" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobservicesasnetworktestblobsnapshot04740688723cb3", "jtcblobservicesasnetworktestblobsnapshot1251952b1a7de5", "javablobblobservicesasnetworktestblobsnapshot232141a297d5", "2020-06-03T22:00:55.905888700Z", "2020-06-03T22:00:55.905888700Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[0].json deleted file mode 100644 index 46f4b8f424e7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse06574978cc6cfe451a4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b1442a41-71f4-4896-bda7-4f4f58be2530" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A20FB44C", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:13 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a137-701e-0051-6bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "b1442a41-71f4-4896-bda7-4f4f58be2530" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f49e47c2-75f9-4e2c-8284-722f80f7bcb3" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a165-701e-0051-0ff2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse06574978cc6cfe451a4Wed, 03 Jun 2020 22:01:13 GMT\"0x8D80809A20FB44C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "f49e47c2-75f9-4e2c-8284-722f80f7bcb3", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse06574978cc6cfe451a4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "03f7909d-a4f7-49b3-80e6-74e5deb89bfb" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a183-701e-0051-25f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "03f7909d-a4f7-49b3-80e6-74e5deb89bfb" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse06574978cc6cfe451a4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[1].json deleted file mode 100644 index 34c5073609ef..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse061511217289b8e3da4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0d0aed47-3af1-4749-8668-d209adb20ff4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A23546C7", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:14 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a195-701e-0051-35f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "0d0aed47-3af1-4749-8668-d209adb20ff4" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0e9c5dfa-1a6b-429a-84e9-15b99a5c9880" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a1b5-701e-0051-4df2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse061511217289b8e3da4Wed, 03 Jun 2020 22:01:14 GMT\"0x8D80809A23546C7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "0e9c5dfa-1a6b-429a-84e9-15b99a5c9880", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse061511217289b8e3da4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3382094c-5c4e-43ff-8101-de2d71b47272" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a1c3-701e-0051-59f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "3382094c-5c4e-43ff-8101-de2d71b47272" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse061511217289b8e3da4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[2].json deleted file mode 100644 index 634174a45c36..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse03707689e18b8738474?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cb1b0fec-ad84-4561-9d22-31990fbc2677" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A25AB23E", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:14 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a1d4-701e-0051-66f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "cb1b0fec-ad84-4561-9d22-31990fbc2677" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "80cf1e35-4d53-4473-a787-d83ee2b74599" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a1eb-701e-0051-78f2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse03707689e18b8738474Wed, 03 Jun 2020 22:01:14 GMT\"0x8D80809A25AB23E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "80cf1e35-4d53-4473-a787-d83ee2b74599", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse03707689e18b8738474?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d3c5a546-9582-4a01-b7ba-d792d5b321a4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a201-701e-0051-07f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "d3c5a546-9582-4a01-b7ba-d792d5b321a4" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse03707689e18b8738474" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[3].json deleted file mode 100644 index 615a9f089be5..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse05531411ad270cce4f4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1f14967a-e3b4-4196-8ae9-29fddd0c73f5" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A28352C4", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:14 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a240-701e-0051-37f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "1f14967a-e3b4-4196-8ae9-29fddd0c73f5" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "005dafcb-3473-4f5a-a45f-f456ec3766da" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a271-701e-0051-58f2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse05531411ad270cce4f4Wed, 03 Jun 2020 22:01:14 GMT\"0x8D80809A28352C4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "005dafcb-3473-4f5a-a45f-f456ec3766da", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse05531411ad270cce4f4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ad92281e-7b32-4ffd-8a85-76d073f27be9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a280-701e-0051-62f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "ad92281e-7b32-4ffd-8a85-76d073f27be9" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse05531411ad270cce4f4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[4].json deleted file mode 100644 index d2049eb0670c..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[4].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse00997927596930d5114?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f6258ad9-0502-4227-a82d-dabb7f87795c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A2A9A8CE", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:14 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a293-701e-0051-70f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "f6258ad9-0502-4227-a82d-dabb7f87795c" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9e2eb610-070a-4475-b075-75ea7971591f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a2b0-701e-0051-08f2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse00997927596930d5114Wed, 03 Jun 2020 22:01:14 GMT\"0x8D80809A2A9A8CE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "9e2eb610-070a-4475-b075-75ea7971591f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse00997927596930d5114?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4044eff8-42c5-4f8e-979c-f8f10df0df9c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a2da-701e-0051-2ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "4044eff8-42c5-4f8e-979c-f8f10df0df9c" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse00997927596930d5114" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[5].json deleted file mode 100644 index 4ea9790ef232..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[5].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse083610133e4e551b9c4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4429ea4b-3d6d-443a-a9af-85b4f6f93a5a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A2D0E967", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:15 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a2fb-701e-0051-4ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "4429ea4b-3d6d-443a-a9af-85b4f6f93a5a" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5262f10f-7762-45bc-a16f-1e7c3867855a" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a31f-701e-0051-6af2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse083610133e4e551b9c4Wed, 03 Jun 2020 22:01:15 GMT\"0x8D80809A2D0E967\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "5262f10f-7762-45bc-a16f-1e7c3867855a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse083610133e4e551b9c4?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5a037b59-9673-4534-8162-d6d0af9d7d2c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a33f-701e-0051-03f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "5a037b59-9673-4534-8162-d6d0af9d7d2c" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse083610133e4e551b9c4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[6].json deleted file mode 100644 index 5bb1d7215178..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[6].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse071567d52137ef99414?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0e8db63c-71df-43df-afa2-2eec9abe9771" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A2F8ED76", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:15 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a363-701e-0051-1ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:14 GMT", - "x-ms-client-request-id" : "0e8db63c-71df-43df-afa2-2eec9abe9771" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0e5553c1-b865-4c64-baed-46253cd72052" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a38a-701e-0051-3cf2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse071567d52137ef99414Wed, 03 Jun 2020 22:01:15 GMT\"0x8D80809A2F8ED76\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "0e5553c1-b865-4c64-baed-46253cd72052", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse071567d52137ef99414?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3289a117-3c8b-4038-8f79-78d5abd17ff8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a3ab-701e-0051-54f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "3289a117-3c8b-4038-8f79-78d5abd17ff8" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse071567d52137ef99414" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[7].json deleted file mode 100644 index 688881a40ad7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[7].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse0167070df70a28bc364?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d4e6b4bb-66a7-41a6-b52a-f6617110db9c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A3205524", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:15 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a3cc-701e-0051-6bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "d4e6b4bb-66a7-41a6-b52a-f6617110db9c" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dcef8b77-c0d8-43f4-8d59-fdf6af098efa" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a3e1-701e-0051-7af2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse0167070df70a28bc364Wed, 03 Jun 2020 22:01:15 GMT\"0x8D80809A3205524\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "dcef8b77-c0d8-43f4-8d59-fdf6af098efa", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse0167070df70a28bc364?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fc009b14-6e46-49b9-981d-355956c66ca1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a420-701e-0051-2ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "fc009b14-6e46-49b9-981d-355956c66ca1" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse0167070df70a28bc364" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[8].json deleted file mode 100644 index 4690df13618d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparse[8].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse06377402d93c6253984?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e0771066-d83b-4068-945b-593861422f45" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A34C51D9", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:16 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a45b-701e-0051-60f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "e0771066-d83b-4068-945b-593861422f45" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0bd6b01d-623d-4403-ad12-9677fe9359ce" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a492-701e-0051-0bf2-396bad000000", - "Body" : "jtccontainersaspermissionsparsejtccontainersaspermissionsparse06377402d93c6253984Wed, 03 Jun 2020 22:01:16 GMT\"0x8D80809A34C51D9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "0bd6b01d-623d-4403-ad12-9677fe9359ce", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparse06377402d93c6253984?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "692218e2-e5e9-4ef7-a9ca-49812cd3b4ec" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a4b9-701e-0051-2cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "692218e2-e5e9-4ef7-a9ca-49812cd3b4ec" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparse06377402d93c6253984" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparseia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparseia.json deleted file mode 100644 index 4623a2ff7d2a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionsparseia.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparseia0165951478cab2ad8b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "15279c65-4775-476c-8f55-2e5ee40fb1a8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A373E0AD", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:16 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a4ed-701e-0051-54f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "15279c65-4775-476c-8f55-2e5ee40fb1a8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionsparseia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "154fd7bb-6f8f-4a89-9d36-94e98d368c36" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a505-701e-0051-68f2-396bad000000", - "Body" : "jtccontainersaspermissionsparseiajtccontainersaspermissionsparseia0165951478cab2ad8bWed, 03 Jun 2020 22:01:16 GMT\"0x8D80809A373E0AD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "154fd7bb-6f8f-4a89-9d36-94e98d368c36", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionsparseia0165951478cab2ad8b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8fc3ad21-b94f-4617-b921-7a7412e1375d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a526-701e-0051-80f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:15 GMT", - "x-ms-client-request-id" : "8fc3ad21-b94f-4617-b921-7a7412e1375d" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionsparseia0165951478cab2ad8b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[0].json deleted file mode 100644 index b4dc77afc6d3..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring086424d4b9f2fcaca?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c9f7521c-5921-4803-8b24-60b6d60fc0b7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A0BB1C3B", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629c97-701e-0051-44f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "c9f7521c-5921-4803-8b24-60b6d60fc0b7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f7a19a74-c4df-4801-a89f-c08a7f477230" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629cc0-701e-0051-63f2-396bad000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring086424d4b9f2fcacaWed, 03 Jun 2020 22:01:11 GMT\"0x8D80809A0BB1C3B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "f7a19a74-c4df-4801-a89f-c08a7f477230", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring086424d4b9f2fcaca?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "019f133b-1c23-45ee-92d7-affe4e688ec8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629ce0-701e-0051-79f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "019f133b-1c23-45ee-92d7-affe4e688ec8" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring086424d4b9f2fcaca" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[1].json deleted file mode 100644 index fdcbdaaa6eb1..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring06828663807e2ef5e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c2ca1578-4284-42ee-9579-c412b9464fef" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A0E32058", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:11 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629d24-701e-0051-2ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "c2ca1578-4284-42ee-9579-c412b9464fef" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a62e59a1-8300-40a6-a888-355b4d424206" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629d47-701e-0051-4df2-396bad000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring06828663807e2ef5eWed, 03 Jun 2020 22:01:11 GMT\"0x8D80809A0E32058\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "a62e59a1-8300-40a6-a888-355b4d424206", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring06828663807e2ef5e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "67aaf37d-42a5-4b03-8229-60e4a78ab532" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629d72-701e-0051-71f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "67aaf37d-42a5-4b03-8229-60e4a78ab532" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring06828663807e2ef5e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[2].json deleted file mode 100644 index 6c0d758ac7c7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring05333000df9645b57?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f91801d7-3ff1-4afd-8f05-28578e1a3043" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A108D9EE", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:12 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629d9f-701e-0051-1bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "f91801d7-3ff1-4afd-8f05-28578e1a3043" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "100d856c-e404-4c02-a92d-db3af343e9d2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629dae-701e-0051-25f2-396bad000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring05333000df9645b57Wed, 03 Jun 2020 22:01:12 GMT\"0x8D80809A108D9EE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "100d856c-e404-4c02-a92d-db3af343e9d2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring05333000df9645b57?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6adbe16b-38ef-48a6-869f-22a26070aae2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629dd1-701e-0051-3cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "6adbe16b-38ef-48a6-869f-22a26070aae2" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring05333000df9645b57" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[3].json deleted file mode 100644 index 290d50f0b2ed..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring07454537596c22228?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c4a5bc86-2337-4a22-b6ed-8e6fd2ff6434" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A131C89F", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:12 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629e0c-701e-0051-6ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:11 GMT", - "x-ms-client-request-id" : "c4a5bc86-2337-4a22-b6ed-8e6fd2ff6434" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e362dfd2-59fe-4196-babb-767bf7ed1a2e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629e48-701e-0051-20f2-396bad000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring07454537596c22228Wed, 03 Jun 2020 22:01:12 GMT\"0x8D80809A131C89F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "e362dfd2-59fe-4196-babb-767bf7ed1a2e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring07454537596c22228?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "00d8aa0f-3a11-4178-b7ee-aeb4d7c98405" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629e78-701e-0051-47f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "00d8aa0f-3a11-4178-b7ee-aeb4d7c98405" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring07454537596c22228" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[4].json deleted file mode 100644 index 0d42d94368ee..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[4].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring0861471776a1d5541?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e05ce85e-322e-4eaa-b17a-a7eccd4ff3dc" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A15BA1E5", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:12 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629eb0-701e-0051-74f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "e05ce85e-322e-4eaa-b17a-a7eccd4ff3dc" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d1675fd0-cd47-4d5a-a104-1be4c5f552c0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629ee2-701e-0051-1bf2-396bad000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring0861471776a1d5541Wed, 03 Jun 2020 22:01:12 GMT\"0x8D80809A15BA1E5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "d1675fd0-cd47-4d5a-a104-1be4c5f552c0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring0861471776a1d5541?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b04595c9-124e-4399-a92c-bb0db59d8d41" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629f0e-701e-0051-3ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "b04595c9-124e-4399-a92c-bb0db59d8d41" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring0861471776a1d5541" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[5].json deleted file mode 100644 index a37125299c4a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[5].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring0101689402d32ed49?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c4400298-dbfb-44de-88db-89753a52bf4b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A181345C", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:13 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629f3a-701e-0051-5cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "c4400298-dbfb-44de-88db-89753a52bf4b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8758dbdd-bdbf-4582-80bf-664aced8b64d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629f82-701e-0051-15f2-396bad000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring0101689402d32ed49Wed, 03 Jun 2020 22:01:13 GMT\"0x8D80809A181345C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "8758dbdd-bdbf-4582-80bf-664aced8b64d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring0101689402d32ed49?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "11881d82-f487-4c72-9ed0-93197759f737" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629faa-701e-0051-34f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "11881d82-f487-4c72-9ed0-93197759f737" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring0101689402d32ed49" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[6].json deleted file mode 100644 index b9059fcaebff..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[6].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring038112944d926b36f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0a89f598-4eb2-4b26-8f0c-3921ce4a09ae" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A1A62A73", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:13 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629fee-701e-0051-6ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "0a89f598-4eb2-4b26-8f0c-3921ce4a09ae" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1879f30c-f96d-46ee-935c-d4a70c7564f5" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a01d-701e-0051-14f2-396bad000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring038112944d926b36fWed, 03 Jun 2020 22:01:13 GMT\"0x8D80809A1A62A73\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "1879f30c-f96d-46ee-935c-d4a70c7564f5", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring038112944d926b36f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "36eecaaf-87b2-4e85-aadf-33e644113b99" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a04a-701e-0051-38f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:12 GMT", - "x-ms-client-request-id" : "36eecaaf-87b2-4e85-aadf-33e644113b99" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring038112944d926b36f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[7].json deleted file mode 100644 index 9731ad8d1b76..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestcontainersaspermissionstostring[7].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring070762a40383da899?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e815f06f-68dd-4d91-93c5-ec1d679a91ee" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A1CBE40D", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:13 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a068-701e-0051-50f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "e815f06f-68dd-4d91-93c5-ec1d679a91ee" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersaspermissionstostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d202bb81-1cb2-4f7e-9fa2-a01d1c2aef78" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a08c-701e-0051-67f2-396bad000000", - "Body" : "jtccontainersaspermissionstostringjtccontainersaspermissionstostring070762a40383da899Wed, 03 Jun 2020 22:01:13 GMT\"0x8D80809A1CBE40D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "d202bb81-1cb2-4f7e-9fa2-a01d1c2aef78", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersaspermissionstostring070762a40383da899?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a4f87bab-e393-4dc4-809a-540c3b733759" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a0ab-701e-0051-01f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:13 GMT", - "x-ms-client-request-id" : "a4f87bab-e393-4dc4-809a-540c3b733759" - }, - "Exception" : null - } ], - "variables" : [ "jtccontainersaspermissionstostring070762a40383da899" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[0].json deleted file mode 100644 index 095e562585d0..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangeparse0sastestiprangeparse49473187373e7ef84d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0f274d75-6148-4461-b5c1-b8526ec0a554" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A4159F3E", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:17 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a616-701e-0051-3df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "0f274d75-6148-4461-b5c1-b8526ec0a554" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtciprangeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "349eab80-6c7b-4c33-a4b9-3fcf93cb5615" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a62f-701e-0051-4df2-396bad000000", - "Body" : "jtciprangeparsejtciprangeparse0sastestiprangeparse49473187373e7ef84dWed, 03 Jun 2020 22:01:17 GMT\"0x8D80809A4159F3E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "349eab80-6c7b-4c33-a4b9-3fcf93cb5615", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangeparse0sastestiprangeparse49473187373e7ef84d?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d90c3544-b5ad-4317-a600-c577368bf175" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a64d-701e-0051-65f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "d90c3544-b5ad-4317-a600-c577368bf175" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangeparse0sastestiprangeparse49473187373e7ef84d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[1].json deleted file mode 100644 index 71950a6d0a09..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangeparse0sastestiprangeparse66b560915665bc686e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d51404c5-8c91-4e0c-b8e9-27e43e044348" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A43B0AA5", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:17 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a670-701e-0051-80f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "d51404c5-8c91-4e0c-b8e9-27e43e044348" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtciprangeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dbd7d2cc-0472-4b61-8d86-146b624e6f7b" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a695-701e-0051-1bf2-396bad000000", - "Body" : "jtciprangeparsejtciprangeparse0sastestiprangeparse66b560915665bc686eWed, 03 Jun 2020 22:01:17 GMT\"0x8D80809A43B0AA5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "dbd7d2cc-0472-4b61-8d86-146b624e6f7b", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangeparse0sastestiprangeparse66b560915665bc686e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8c9eabae-40f7-42ed-8fb2-898fcf1120e2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a6ae-701e-0051-30f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "8c9eabae-40f7-42ed-8fb2-898fcf1120e2" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangeparse0sastestiprangeparse66b560915665bc686e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[2].json deleted file mode 100644 index f864a9620f16..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangeparse[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangeparse0sastestiprangeparse5e059214391482a3d6?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "830a4a2b-f8d9-4e56-9ce9-3664520ab531" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A46000BB", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:17 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a6d3-701e-0051-4cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "830a4a2b-f8d9-4e56-9ce9-3664520ab531" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtciprangeparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c92e3361-303c-4c0d-b5ee-3d03fdca94d4" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a6f9-701e-0051-68f2-396bad000000", - "Body" : "jtciprangeparsejtciprangeparse0sastestiprangeparse5e059214391482a3d6Wed, 03 Jun 2020 22:01:17 GMT\"0x8D80809A46000BB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "c92e3361-303c-4c0d-b5ee-3d03fdca94d4", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangeparse0sastestiprangeparse5e059214391482a3d6?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a39d2da2-13f3-4e79-9a42-66ca52fe9191" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a718-701e-0051-04f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "a39d2da2-13f3-4e79-9a42-66ca52fe9191" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangeparse0sastestiprangeparse5e059214391482a3d6" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[0].json deleted file mode 100644 index 51f1cc822ca9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangetostring0sastestiprangetostringe004880701ffe04?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b1baeafa-e002-4f5f-a856-f8fcb73785e9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A39A0F9F", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:16 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a544-701e-0051-17f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "b1baeafa-e002-4f5f-a856-f8fcb73785e9" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtciprangetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4f9d97b8-948d-41e5-ba3b-b8e12fa84229" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a55b-701e-0051-27f2-396bad000000", - "Body" : "jtciprangetostringjtciprangetostring0sastestiprangetostringe004880701ffe04Wed, 03 Jun 2020 22:01:16 GMT\"0x8D80809A39A0F9F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "4f9d97b8-948d-41e5-ba3b-b8e12fa84229", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangetostring0sastestiprangetostringe004880701ffe04?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b2f2f0ab-87cc-4233-87a0-63caa597e029" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a56d-701e-0051-33f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "b2f2f0ab-87cc-4233-87a0-63caa597e029" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangetostring0sastestiprangetostringe004880701ffe04" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[1].json deleted file mode 100644 index 04aaa98f2d95..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangetostring0sastestiprangetostring57929012f621fc0?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e28e7ae7-e643-4921-8ade-83c361b7deb3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A3C71E17", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:16 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a581-701e-0051-44f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "e28e7ae7-e643-4921-8ade-83c361b7deb3" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtciprangetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ddb5351d-6df9-4ebd-bfcd-f8bb62db564c" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a58f-701e-0051-4df2-396bad000000", - "Body" : "jtciprangetostringjtciprangetostring0sastestiprangetostring57929012f621fc0Wed, 03 Jun 2020 22:01:16 GMT\"0x8D80809A3C71E17\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "ddb5351d-6df9-4ebd-bfcd-f8bb62db564c", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangetostring0sastestiprangetostring57929012f621fc0?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6a6eeb44-e6fc-4a90-9d41-107ae040378f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a5ab-701e-0051-67f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "6a6eeb44-e6fc-4a90-9d41-107ae040378f" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangetostring0sastestiprangetostring57929012f621fc0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[2].json deleted file mode 100644 index 01f589e36a9a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestiprangetostring[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangetostring0sastestiprangetostring28078165d590527?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "808bdd27-1d06-4431-a726-9c1a53b1587f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A3ED9B2E", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:17 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a5be-701e-0051-78f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "808bdd27-1d06-4431-a726-9c1a53b1587f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtciprangetostring&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "412cf034-0151-474a-bd8c-da018faaa2e9" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a5cc-701e-0051-03f2-396bad000000", - "Body" : "jtciprangetostringjtciprangetostring0sastestiprangetostring28078165d590527Wed, 03 Jun 2020 22:01:17 GMT\"0x8D80809A3ED9B2E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "412cf034-0151-474a-bd8c-da018faaa2e9", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtciprangetostring0sastestiprangetostring28078165d590527?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0c63fb9f-5227-49d7-a161-d48f71b9abfb" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a5ed-701e-0051-1ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:16 GMT", - "x-ms-client-request-id" : "0c63fb9f-5227-49d7-a161-d48f71b9abfb" - }, - "Exception" : null - } ], - "variables" : [ "jtciprangetostring0sastestiprangetostring28078165d590527" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestsasprotocolparse[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestsasprotocolparse[0].json deleted file mode 100644 index 2e30cbbf1366..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestsasprotocolparse[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsasprotocolparse0sastestsasprotocolparse6a089756689d77?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "98afcf84-47e2-407c-be31-33e34b2831cd" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A484F6D1", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:18 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a734-701e-0051-1af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "98afcf84-47e2-407c-be31-33e34b2831cd" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsasprotocolparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c5f37192-0dd6-4b76-b16f-acb0926cd8c7" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a76d-701e-0051-46f2-396bad000000", - "Body" : "jtcsasprotocolparsejtcsasprotocolparse0sastestsasprotocolparse6a089756689d77Wed, 03 Jun 2020 22:01:18 GMT\"0x8D80809A484F6D1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "c5f37192-0dd6-4b76-b16f-acb0926cd8c7", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsasprotocolparse0sastestsasprotocolparse6a089756689d77?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a87b9e52-491c-4cfc-9d05-a3686b943f4b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a798-701e-0051-6df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "a87b9e52-491c-4cfc-9d05-a3686b943f4b" - }, - "Exception" : null - } ], - "variables" : [ "jtcsasprotocolparse0sastestsasprotocolparse6a089756689d77" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestsasprotocolparse[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestsasprotocolparse[1].json deleted file mode 100644 index 227e2be78e71..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestsasprotocolparse[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsasprotocolparse0sastestsasprotocolparse04c42326bbc4ab?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6d5011f8-8e03-4055-8afd-9a2e3f999c3b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A4AF6C7D", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:18 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a7c3-701e-0051-11f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "6d5011f8-8e03-4055-8afd-9a2e3f999c3b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsasprotocolparse&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "192eb493-386e-46ac-ba83-3c32461b0b26" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a7f1-701e-0051-37f2-396bad000000", - "Body" : "jtcsasprotocolparsejtcsasprotocolparse0sastestsasprotocolparse04c42326bbc4abWed, 03 Jun 2020 22:01:18 GMT\"0x8D80809A4AF6C7D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:17 GMT", - "x-ms-client-request-id" : "192eb493-386e-46ac-ba83-3c32461b0b26", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcsasprotocolparse0sastestsasprotocolparse04c42326bbc4ab?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c1d5ba5b-c3e4-4ed0-a2f8-64e45f27ee65" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a80d-701e-0051-4bf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "c1d5ba5b-c3e4-4ed0-a2f8-64e45f27ee65" - }, - "Exception" : null - } ], - "variables" : [ "jtcsasprotocolparse0sastestsasprotocolparse04c42326bbc4ab" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[0].json deleted file mode 100644 index df937b504cdb..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign0008784d58d021781?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e515de6a-6bc5-43cd-a06d-a46a4b80580f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099A437C14", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:00 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46288c3-701e-0051-51f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "e515de6a-6bc5-43cd-a06d-a46a4b80580f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fd8156e3-bfb6-496c-85c9-bba36ff0834d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628904-701e-0051-01f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign0008784d58d021781Wed, 03 Jun 2020 22:01:00 GMT\"0x8D808099A437C14\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "fd8156e3-bfb6-496c-85c9-bba36ff0834d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign0008784d58d021781?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "22cb1489-6ba7-4836-ae04-4183232d200f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628936-701e-0051-2cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "22cb1489-6ba7-4836-ae04-4183232d200f" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign0008784d58d021781" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[1].json deleted file mode 100644 index 420eccea79f1..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign08477003492bb6776?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9620ae92-b3de-488b-bc52-240094ed4b87" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099A6983E5", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:01 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628959-701e-0051-47f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "9620ae92-b3de-488b-bc52-240094ed4b87" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2988a572-b524-4c6f-a9da-b8a94cd13ecb" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462896f-701e-0051-57f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign08477003492bb6776Wed, 03 Jun 2020 22:01:01 GMT\"0x8D808099A6983E5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "2988a572-b524-4c6f-a9da-b8a94cd13ecb", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign08477003492bb6776?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9e15df94-ae3b-4f64-863e-54713e515a9a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462898d-701e-0051-6ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "9e15df94-ae3b-4f64-863e-54713e515a9a" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign08477003492bb6776" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[2].json deleted file mode 100644 index a34678914245..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign0238143f8ad04f70b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "aceed0ae-3372-4978-b099-fe1c31af9300" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099A8EEF44", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:01 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462899c-701e-0051-79f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "aceed0ae-3372-4978-b099-fe1c31af9300" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "91b10cfd-3f94-4211-aa56-a4c061c7dc4e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46289ae-701e-0051-06f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign0238143f8ad04f70bWed, 03 Jun 2020 22:01:01 GMT\"0x8D808099A8EEF44\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:00 GMT", - "x-ms-client-request-id" : "91b10cfd-3f94-4211-aa56-a4c061c7dc4e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign0238143f8ad04f70b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "40fe69a9-99af-4c3e-85d4-3f0d87c6483e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46289c5-701e-0051-18f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "40fe69a9-99af-4c3e-85d4-3f0d87c6483e" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign0238143f8ad04f70b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[3].json deleted file mode 100644 index 4632e5135404..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign0604468cfbd1f4981?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2f205c29-76ec-4626-b142-2d94e8e610ed" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099AB608BB", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:01 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46289e1-701e-0051-2ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "2f205c29-76ec-4626-b142-2d94e8e610ed" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "efe71e25-e878-4f43-9c66-62893810cf73" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628a08-701e-0051-4df2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign0604468cfbd1f4981Wed, 03 Jun 2020 22:01:01 GMT\"0x8D808099AB608BB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "efe71e25-e878-4f43-9c66-62893810cf73", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign0604468cfbd1f4981?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "53299594-2b7e-44d9-98dc-ba7e3b7b3d8e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628a26-701e-0051-66f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "53299594-2b7e-44d9-98dc-ba7e3b7b3d8e" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign0604468cfbd1f4981" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[4].json deleted file mode 100644 index 8218132fbb3e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[4].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign076127c5169eac6b0?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cd105894-0098-49d2-a6dd-c59630c4581b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099ADC5EB6", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:01 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628a5b-701e-0051-0ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "cd105894-0098-49d2-a6dd-c59630c4581b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1e8f20a3-de3d-432b-b9de-6e4b84d3fce6" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628a8d-701e-0051-2ff2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign076127c5169eac6b0Wed, 03 Jun 2020 22:01:01 GMT\"0x8D808099ADC5EB6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "1e8f20a3-de3d-432b-b9de-6e4b84d3fce6", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign076127c5169eac6b0?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "79e3fe20-7f99-4e98-9180-3eeb84353709" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628ab0-701e-0051-4af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "79e3fe20-7f99-4e98-9180-3eeb84353709" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign076127c5169eac6b0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[5].json deleted file mode 100644 index a6bb5d5e0a66..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[5].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign047840addc72aa824?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9c191ad0-b41b-4a9c-a1d8-33ceabb2886f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099B01F13F", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:02 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628ae6-701e-0051-73f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "9c191ad0-b41b-4a9c-a1d8-33ceabb2886f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "26343082-328d-4076-8e7f-f0c16d8b897e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628b0d-701e-0051-17f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign047840addc72aa824Wed, 03 Jun 2020 22:01:02 GMT\"0x8D808099B01F13F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "26343082-328d-4076-8e7f-f0c16d8b897e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign047840addc72aa824?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4dc950cc-a779-4dae-bcd8-d9c0bf543da0" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628b33-701e-0051-31f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "4dc950cc-a779-4dae-bcd8-d9c0bf543da0" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign047840addc72aa824" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[6].json deleted file mode 100644 index cacc2984c668..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[6].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign0951961cbfae8ed50?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "760ac4f2-0e34-44d3-b637-a18ed252d93b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099B2931E4", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:02 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628b53-701e-0051-4af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "760ac4f2-0e34-44d3-b637-a18ed252d93b" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2fbb320f-d943-489a-9722-87c5023074b7" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628b66-701e-0051-59f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign0951961cbfae8ed50Wed, 03 Jun 2020 22:01:02 GMT\"0x8D808099B2931E4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:01 GMT", - "x-ms-client-request-id" : "2fbb320f-d943-489a-9722-87c5023074b7", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign0951961cbfae8ed50?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "de148a65-e5a9-4101-97bd-5174801e1676" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628b89-701e-0051-72f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "de148a65-e5a9-4101-97bd-5174801e1676" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign0951961cbfae8ed50" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[7].json deleted file mode 100644 index 187fc80ceb34..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[7].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign010148b3e851f08fd?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1e389cda-d971-4b73-83c5-3524a630e999" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099B5099A7", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:02 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628bb1-701e-0051-14f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "1e389cda-d971-4b73-83c5-3524a630e999" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3e8715c5-b8d6-40f8-a87c-054bee6f32b3" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628bd2-701e-0051-2df2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign010148b3e851f08fdWed, 03 Jun 2020 22:01:02 GMT\"0x8D808099B5099A7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "3e8715c5-b8d6-40f8-a87c-054bee6f32b3", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign010148b3e851f08fd?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8f426244-5bbb-43a7-b6be-bec38179df1b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628bfa-701e-0051-4af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "8f426244-5bbb-43a7-b6be-bec38179df1b" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign010148b3e851f08fd" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[8].json deleted file mode 100644 index bffc050a8a17..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[8].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign029825bca8f334512?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c2ac23f9-2cf4-42f2-bb90-afe6fc391496" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099B7716C8", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:02 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628c1a-701e-0051-64f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "c2ac23f9-2cf4-42f2-bb90-afe6fc391496" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "89fa4c56-5f5e-4cef-9168-8834cc4bc37d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628c4d-701e-0051-09f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign029825bca8f334512Wed, 03 Jun 2020 22:01:02 GMT\"0x8D808099B7716C8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "89fa4c56-5f5e-4cef-9168-8834cc4bc37d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign029825bca8f334512?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "088f371b-a7da-43ed-953f-b4e813537c4c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628c6e-701e-0051-25f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "088f371b-a7da-43ed-953f-b4e813537c4c" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign029825bca8f334512" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[9].json deleted file mode 100644 index bd364ca3111b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[9].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign02787825128d805ad?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6ae64c4f-953b-4136-b0c4-11f7835e9436" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099BA5FA5D", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:03 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628cdb-701e-0051-7df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "6ae64c4f-953b-4136-b0c4-11f7835e9436" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosign&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "163d02de-fa86-4cfc-b1a3-ad7c79c1b024" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628d0c-701e-0051-25f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignjtcservicesassignaturesstringtosign02787825128d805adWed, 03 Jun 2020 22:01:03 GMT\"0x8D808099BA5FA5D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "163d02de-fa86-4cfc-b1a3-ad7c79c1b024", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosign02787825128d805ad?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c89b6b7f-b6ef-4629-9ee3-c1d21364109b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628d45-701e-0051-51f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:02 GMT", - "x-ms-client-request-id" : "c89b6b7f-b6ef-4629-9ee3-c1d21364109b" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosign02787825128d805ad" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[0].json deleted file mode 100644 index 8589d218ff52..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey032126ef?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0855773e-77a6-4c50-879b-bbdb91fd51d1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099BD10C6E", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:03 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628d7c-701e-0051-7af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "0855773e-77a6-4c50-879b-bbdb91fd51d1" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d46cfc42-6da3-4a2c-83ed-c5ae5adf7c9f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628db3-701e-0051-26f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey032126efWed, 03 Jun 2020 22:01:03 GMT\"0x8D808099BD10C6E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "d46cfc42-6da3-4a2c-83ed-c5ae5adf7c9f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey032126ef?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "19607a75-ad21-479e-bb73-60a970f92e21" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628ddb-701e-0051-42f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "19607a75-ad21-479e-bb73-60a970f92e21" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey032126ef" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[10].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[10].json deleted file mode 100644 index e040e0dc169c..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[10].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey072715ff?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3b15acd3-fab8-435c-a533-db5b676fa2f8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099D67EDD6", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:06 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462924f-701e-0051-4cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "3b15acd3-fab8-435c-a533-db5b676fa2f8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a8862547-f04c-4add-a88f-8e1f810e091e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629281-701e-0051-73f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey072715ffWed, 03 Jun 2020 22:01:06 GMT\"0x8D808099D67EDD6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "a8862547-f04c-4add-a88f-8e1f810e091e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey072715ff?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fd8b5a3b-9735-4566-8172-5efbf3873bb2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46292a9-701e-0051-11f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "fd8b5a3b-9735-4566-8172-5efbf3873bb2" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey072715ff" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[11].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[11].json deleted file mode 100644 index e9b8ab94da1f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[11].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey04364706?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4585d71c-687f-4978-87de-33cc42ca8a51" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099D8D5939", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:06 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46292d5-701e-0051-32f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "4585d71c-687f-4978-87de-33cc42ca8a51" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "31adf123-a3e2-4960-8349-2f3e21175944" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46292f5-701e-0051-4bf2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey04364706Wed, 03 Jun 2020 22:01:06 GMT\"0x8D808099D8D5939\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "31adf123-a3e2-4960-8349-2f3e21175944", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey04364706?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ea7cfb7c-d7e6-443f-b5fe-dcbf88292f24" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629320-701e-0051-6cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "ea7cfb7c-d7e6-443f-b5fe-dcbf88292f24" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey04364706" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[12].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[12].json deleted file mode 100644 index 14567354cab0..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[12].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0699633c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1e1bf745-64a6-41f7-9a0e-d9efcc02562d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099DB38817", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:06 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462934c-701e-0051-0ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "1e1bf745-64a6-41f7-9a0e-d9efcc02562d" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2e1cf727-1b34-466d-b101-a6d78a8295d0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462936e-701e-0051-26f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0699633cWed, 03 Jun 2020 22:01:06 GMT\"0x8D808099DB38817\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "2e1cf727-1b34-466d-b101-a6d78a8295d0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0699633c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "76e0a020-b763-416f-b73c-991d15b2d666" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629389-701e-0051-3af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "76e0a020-b763-416f-b73c-991d15b2d666" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0699633c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[13].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[13].json deleted file mode 100644 index 2b5e1208e20e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[13].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0732312b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "578444ea-9fea-4687-9316-ed5f5253b9ce" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099DD98FDF", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:06 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46293ae-701e-0051-56f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "578444ea-9fea-4687-9316-ed5f5253b9ce" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "acacfb71-cb08-4335-9692-2ded87d58d44" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46293d4-701e-0051-71f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0732312bWed, 03 Jun 2020 22:01:06 GMT\"0x8D808099DD98FDF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "acacfb71-cb08-4335-9692-2ded87d58d44", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0732312b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "78f97305-05be-40be-8989-96a3207680c1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46293f7-701e-0051-0cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "78f97305-05be-40be-8989-96a3207680c1" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0732312b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[14].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[14].json deleted file mode 100644 index fa1e8921fa45..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[14].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0587068e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "64b8661c-97f1-4595-9987-99038ebb6383" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099E000D06", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:07 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629441-701e-0051-42f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "64b8661c-97f1-4595-9987-99038ebb6383" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2ebeace8-8ef3-4b1c-bfeb-22272868e645" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629473-701e-0051-66f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0587068eWed, 03 Jun 2020 22:01:07 GMT\"0x8D808099E000D06\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "2ebeace8-8ef3-4b1c-bfeb-22272868e645", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0587068e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d3530060-41ca-4269-a617-388966e70438" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462949c-701e-0051-03f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "d3530060-41ca-4269-a617-388966e70438" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0587068e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[1].json deleted file mode 100644 index c66e47614373..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey03698090?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5f71063b-203a-48d3-9920-6b818089cb49" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099BF89B31", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:03 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628dff-701e-0051-5ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "5f71063b-203a-48d3-9920-6b818089cb49" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f02bbaa1-da6c-467e-8336-c3736a8b25f2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628e32-701e-0051-06f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey03698090Wed, 03 Jun 2020 22:01:03 GMT\"0x8D808099BF89B31\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "f02bbaa1-da6c-467e-8336-c3736a8b25f2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey03698090?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2107fbfe-9e3c-4915-8929-37caf40e966c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628e67-701e-0051-32f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "2107fbfe-9e3c-4915-8929-37caf40e966c" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey03698090" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[2].json deleted file mode 100644 index 251a52745b5d..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[2].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0102558a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "01e8b19a-9d27-46ef-a2f7-73377e634539" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099C25F7CC", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628ea2-701e-0051-63f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "01e8b19a-9d27-46ef-a2f7-73377e634539" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5d9c4bac-c060-4fed-a6c1-8538607e255c" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628ed7-701e-0051-0cf2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0102558aWed, 03 Jun 2020 22:01:04 GMT\"0x8D808099C25F7CC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "5d9c4bac-c060-4fed-a6c1-8538607e255c", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0102558a?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dbe13bbf-adb7-49bc-bc2d-073853d486ef" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628ef9-701e-0051-26f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "dbe13bbf-adb7-49bc-bc2d-073853d486ef" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0102558a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[3].json deleted file mode 100644 index 2dc8e4052e40..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[3].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey06532734?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c2d8edb4-0d31-4adb-97d3-3a6292d9636c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099C4FD124", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628f29-701e-0051-4af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "c2d8edb4-0d31-4adb-97d3-3a6292d9636c" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "86acded9-946c-4a5e-8188-703204aebee3" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628f56-701e-0051-6cf2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey06532734Wed, 03 Jun 2020 22:01:04 GMT\"0x8D808099C4FD124\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "86acded9-946c-4a5e-8188-703204aebee3", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey06532734?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "70bf5607-6475-4eba-b4e8-65a3c5bcc2dc" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628f70-701e-0051-01f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:03 GMT", - "x-ms-client-request-id" : "70bf5607-6475-4eba-b4e8-65a3c5bcc2dc" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey06532734" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[4].json deleted file mode 100644 index edee82bf55ec..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[4].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey009564ce?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "aec49905-6238-4b22-925c-f3e45f9d137a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099C79352E", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628f93-701e-0051-1af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "aec49905-6238-4b22-925c-f3e45f9d137a" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d6503b42-1475-4c70-9aee-6a892726a7db" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628fba-701e-0051-38f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey009564ceWed, 03 Jun 2020 22:01:04 GMT\"0x8D808099C79352E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "d6503b42-1475-4c70-9aee-6a892726a7db", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey009564ce?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b5a136d1-57cb-426a-845e-ecb0aa9f36f7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628fc8-701e-0051-42f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "b5a136d1-57cb-426a-845e-ecb0aa9f36f7" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey009564ce" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[5].json deleted file mode 100644 index db51ddf9cd46..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[5].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey08027192?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5cdc57a5-3bcf-479c-a086-61f9c82d891c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099CA2C04E", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:04 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4628fe4-701e-0051-56f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "5cdc57a5-3bcf-479c-a086-61f9c82d891c" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7a5361fd-1687-4524-b37c-58025d295bea" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628ff5-701e-0051-64f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey08027192Wed, 03 Jun 2020 22:01:04 GMT\"0x8D808099CA2C04E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "7a5361fd-1687-4524-b37c-58025d295bea", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey08027192?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "920b45fc-1c76-4284-b054-6532608f49e8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629011-701e-0051-7cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "920b45fc-1c76-4284-b054-6532608f49e8" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey08027192" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[6].json deleted file mode 100644 index 36f1f3145e1f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[6].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0083439f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "58c62361-a75f-4ee4-af87-3c45ceba6901" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099CCC999C", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:05 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629038-701e-0051-1df2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "58c62361-a75f-4ee4-af87-3c45ceba6901" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a65d6ab8-1f45-4c6c-926d-0c60762c5d2b" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629062-701e-0051-42f2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey0083439fWed, 03 Jun 2020 22:01:05 GMT\"0x8D808099CCC999C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "a65d6ab8-1f45-4c6c-926d-0c60762c5d2b", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey0083439f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a06c8f5c-3f8d-4cd7-9d17-425ac303559e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46290b5-701e-0051-08f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "a06c8f5c-3f8d-4cd7-9d17-425ac303559e" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey0083439f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[7].json deleted file mode 100644 index e027df9b3dbf..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[7].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey08941718?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ddca5cef-53e2-4f71-adbf-6f5f0f836541" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099CF49DAC", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:05 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46290e6-701e-0051-2cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "ddca5cef-53e2-4f71-adbf-6f5f0f836541" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1c3354a4-dc92-46a2-b604-cc53ce5c02aa" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462910b-701e-0051-4bf2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey08941718Wed, 03 Jun 2020 22:01:05 GMT\"0x8D808099CF49DAC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:04 GMT", - "x-ms-client-request-id" : "1c3354a4-dc92-46a2-b604-cc53ce5c02aa", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey08941718?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "35dd4633-a03e-4569-ab64-5d058e25d596" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629126-701e-0051-63f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "35dd4633-a03e-4569-ab64-5d058e25d596" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey08941718" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[8].json deleted file mode 100644 index 2a2fa755cb7a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[8].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey00228306?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "50580410-3e3b-4bb6-babe-115cf241dd15" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099D1A5742", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:05 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4629155-701e-0051-04f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "50580410-3e3b-4bb6-babe-115cf241dd15" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "89335607-cc65-4bcf-8d99-fa7f0be8e5ae" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629188-701e-0051-2af2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey00228306Wed, 03 Jun 2020 22:01:05 GMT\"0x8D808099D1A5742\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "89335607-cc65-4bcf-8d99-fa7f0be8e5ae", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey00228306?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "263b9189-7e12-4982-9785-3c5c36124782" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f46291a5-701e-0051-3ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "263b9189-7e12-4982-9785-3c5c36124782" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey00228306" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[9].json deleted file mode 100644 index 5df8b0c0341c..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[9].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey009182e2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bd7af799-5d0a-44b5-8784-ebf64d62adef" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099D4149A3", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:05 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46291c8-701e-0051-5cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "bd7af799-5d0a-44b5-8784-ebf64d62adef" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturesstringtosignuserdelegationkey&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "099ba5d9-1320-43ea-9370-9e0b670506eb" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46291f1-701e-0051-7ef2-396bad000000", - "Body" : "jtcservicesassignaturesstringtosignuserdelegationkeyjtcservicesassignaturesstringtosignuserdelegationkey009182e2Wed, 03 Jun 2020 22:01:05 GMT\"0x8D808099D4149A3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "099ba5d9-1320-43ea-9370-9e0b670506eb", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturesstringtosignuserdelegationkey009182e2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3d9b1e6d-5bcf-4d1a-a1ac-17bcbca85a18" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462920d-701e-0051-13f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:05 GMT", - "x-ms-client-request-id" : "3d9b1e6d-5bcf-4d1a-a1ac-17bcbca85a18" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturesstringtosignuserdelegationkey009182e2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[0].json deleted file mode 100644 index 1c14f7d10fc8..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[0].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok096259a71198?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "37f96ff3-26e0-4e1a-b15f-ef35a00dd0e4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A4D945C3", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:18 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a83b-701e-0051-6cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "37f96ff3-26e0-4e1a-b15f-ef35a00dd0e4" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesassertgenerateok&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f770ba92-925d-48f5-8448-b51d08468f82" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a858-701e-0051-04f2-396bad000000", - "Body" : "jtcservicesassignaturevaluesassertgenerateokjtcservicesassignaturevaluesassertgenerateok096259a71198Wed, 03 Jun 2020 22:01:18 GMT\"0x8D80809A4D945C3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "f770ba92-925d-48f5-8448-b51d08468f82", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok096259a71198?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3fe9b563-eeb1-434d-8aa0-819be2e7fc67" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a87e-701e-0051-24f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "3fe9b563-eeb1-434d-8aa0-819be2e7fc67" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesassertgenerateok096259a71198" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[1].json deleted file mode 100644 index aa6f2fe42b42..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesassertgenerateok[1].json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok063529c42293?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "29785e6f-a53b-40c6-beaf-a6ac742ed2ab" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809A4FF74A0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:18 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462a89b-701e-0051-39f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "29785e6f-a53b-40c6-beaf-a6ac742ed2ab" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesassertgenerateok&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ab712c14-7a6b-4df5-8a2c-88ddd8667a89" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462a8ca-701e-0051-5ef2-396bad000000", - "Body" : "jtcservicesassignaturevaluesassertgenerateokjtcservicesassignaturevaluesassertgenerateok063529c42293Wed, 03 Jun 2020 22:01:18 GMT\"0x8D80809A4FF74A0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "ab712c14-7a6b-4df5-8a2c-88ddd8667a89", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesassertgenerateok063529c42293?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d971dfb2-0562-402d-bb2b-19e3d309292b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462a8ec-701e-0051-78f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:18 GMT", - "x-ms-client-request-id" : "d971dfb2-0562-402d-bb2b-19e3d309292b" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesassertgenerateok063529c42293" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia.json deleted file mode 100644 index f418c571492e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesia.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesia0796426af24ea7af814?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "662b42b7-8be7-4000-a7c4-729f866b702e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D808099E257879", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:07 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46294cd-701e-0051-26f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "662b42b7-8be7-4000-a7c4-729f866b702e" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesia&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fa086427-7611-4ef1-b827-955692798ccc" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4629512-701e-0051-5ff2-396bad000000", - "Body" : "jtcservicesassignaturevaluesiajtcservicesassignaturevaluesia0796426af24ea7af814Wed, 03 Jun 2020 22:01:07 GMT\"0x8D808099E257879\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:06 GMT", - "x-ms-client-request-id" : "fa086427-7611-4ef1-b827-955692798ccc", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesia0796426af24ea7af814?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e964fcdd-ac82-42da-9064-808e48bf8e76" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4629537-701e-0051-7cf2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:07 GMT", - "x-ms-client-request-id" : "e964fcdd-ac82-42da-9064-808e48bf8e76" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesia0796426af24ea7af814" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblob.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblob.json deleted file mode 100644 index aa092fdf4fb6..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblob.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblob0052811beda9b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ffa38182-8d80-40ee-a4a7-0fcc0896fe89" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080994B87155", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:51 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4627854-701e-0051-4ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "x-ms-client-request-id" : "ffa38182-8d80-40ee-a4a7-0fcc0896fe89" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblob0052811beda9b/javablobservicesassignaturevaluesnetworktestblob111958e05f", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bc3200ba-9e54-460d-9e0d-3375c196521a", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:00:51.7056881Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:51 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D8080994CC1971", - "Content-Length" : "0", - "x-ms-request-id" : "f462787f-701e-0051-6ff2-396bad000000", - "x-ms-client-request-id" : "bc3200ba-9e54-460d-9e0d-3375c196521a" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblob0052811beda9b/javablobservicesassignaturevaluesnetworktestblob111958e05f?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A51Z&se=2020-06-04T22%3A00%3A51Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a3434619-7620-4c94-8e7b-47438c655993" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:00:51.7056881Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:51 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-blob-type" : "BlockBlob", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:51 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f46278c6-701e-0051-28f2-396bad000000", - "Body" : "test", - "Content-Type" : "type", - "x-ms-version" : "2019-12-12", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D8080994CC1971", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-client-request-id" : "a3434619-7620-4c94-8e7b-47438c655993", - "Content-Language" : "language" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblob0052811beda9b/javablobservicesassignaturevaluesnetworktestblob111958e05f?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A51Z&se=2020-06-04T22%3A00%3A51Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "17e93df9-4044-40ea-ac29-09838a647836" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:00:51.7056881Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:51 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-blob-type" : "BlockBlob", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Content-Encoding" : "encoding", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:51 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f46278f4-701e-0051-4ff2-396bad000000", - "Content-Type" : "type", - "x-ms-version" : "2019-12-12", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D8080994CC1971", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "Content-Language" : "language", - "x-ms-client-request-id" : "17e93df9-4044-40ea-ac29-09838a647836" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestblob&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "daced154-c67a-4d85-b83e-f24e2b7ad088" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627922-701e-0051-71f2-396bad000000", - "Body" : "jtcservicesassignaturevaluesnetworktestblobjtcservicesassignaturevaluesnetworktestblob0052811beda9bWed, 03 Jun 2020 22:00:51 GMT\"0x8D8080994B87155\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "x-ms-client-request-id" : "daced154-c67a-4d85-b83e-f24e2b7ad088", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblob0052811beda9b?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7acc86d6-1ecb-48c3-b03f-b567d88a29b1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4627968-701e-0051-26f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "x-ms-client-request-id" : "7acc86d6-1ecb-48c3-b03f-b567d88a29b1" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestblob0052811beda9b", "javablobservicesassignaturevaluesnetworktestblob111958e05f", "2020-06-03T22:00:51.808014400Z", "2020-06-03T22:00:51.808014400Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshot.json deleted file mode 100644 index f0ed241059e7..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshot.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshot020028501?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2c93522c-3ba8-419d-bba4-66b3a0e7142f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809951E029B", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462799e-701e-0051-51f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "x-ms-client-request-id" : "2c93522c-3ba8-419d-bba4-66b3a0e7142f" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshot020028501/javablobservicesassignaturevaluesnetworktestblobsnapshot198142", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c10b6516-8c37-44fa-b69a-45956107c1aa", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:00:52.3623127Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:52 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D8080995304AD7", - "Content-Length" : "0", - "x-ms-request-id" : "f46279e5-701e-0051-0df2-396bad000000", - "x-ms-client-request-id" : "c10b6516-8c37-44fa-b69a-45956107c1aa" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshot020028501/javablobservicesassignaturevaluesnetworktestblobsnapshot198142?comp=snapshot", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d662f8c0-d76f-45f5-b320-307b0bfdeb99" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-version-id" : "2020-06-03T22:00:52.4543979Z", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 03 Jun 2020 22:00:51 GMT", - "x-ms-snapshot" : "2020-06-03T22:00:52.4533979Z", - "ETag" : "0x8D8080995304AD7", - "Content-Length" : "0", - "x-ms-request-id" : "f4627a0c-701e-0051-2bf2-396bad000000", - "x-ms-client-request-id" : "d662f8c0-d76f-45f5-b320-307b0bfdeb99" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshot020028501/javablobservicesassignaturevaluesnetworktestblobsnapshot198142?snapshot=2020-06-03T22%3A00%3A52.4533979Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A52Z&se=2020-06-04T22%3A00%3A52Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b4b3099f-87e1-4dfa-8b2f-b7c2a8d508c2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:52 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D8080995304AD7", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:52 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f4627a40-701e-0051-54f2-396bad000000", - "Body" : "test", - "x-ms-client-request-id" : "b4b3099f-87e1-4dfa-8b2f-b7c2a8d508c2", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshot020028501/javablobservicesassignaturevaluesnetworktestblobsnapshot198142?snapshot=2020-06-03T22%3A00%3A52.4533979Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A52Z&se=2020-06-04T22%3A00%3A52Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bb7daa28-d48e-4ba4-bc8a-272c201f52d1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:52 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Cache-Control" : "cache", - "ETag" : "0x8D8080995304AD7", - "Content-Disposition" : "disposition", - "Content-Encoding" : "encoding", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:52 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f4627a66-701e-0051-72f2-396bad000000", - "x-ms-client-request-id" : "bb7daa28-d48e-4ba4-bc8a-272c201f52d1", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestblobsnapshot&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e64acb5d-3676-492f-908c-0f02187664ed" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627a7f-701e-0051-06f2-396bad000000", - "Body" : "jtcservicesassignaturevaluesnetworktestblobsnapshotjtcservicesassignaturevaluesnetworktestblobsnapshot020028501Wed, 03 Jun 2020 22:00:52 GMT\"0x8D80809951E029B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-client-request-id" : "e64acb5d-3676-492f-908c-0f02187664ed", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshot020028501?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f89f36d5-7168-4dff-8a19-0b794dee3440" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4627ab9-701e-0051-36f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-client-request-id" : "f89f36d5-7168-4dff-8a19-0b794dee3440" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestblobsnapshot020028501", "javablobservicesassignaturevaluesnetworktestblobsnapshot198142", "2020-06-03T22:00:52.544996700Z", "2020-06-03T22:00:52.546047100Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshotuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshotuserdelegation.json deleted file mode 100644 index 4603381e2497..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobsnapshotuserdelegation.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus051643be?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b9b15d00-2b6d-4fc6-9a75-d7757b0305b3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809979F2ED9", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:56 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46281b6-701e-0051-3af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:55 GMT", - "x-ms-client-request-id" : "b9b15d00-2b6d-4fc6-9a75-d7757b0305b3" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus051643be/6d45e23af9474497813a35b8610ac04ba54f6adb23384e7586c76a42ea3262cc", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ed2590c6-421c-48d4-ad5d-d9ef442bbd2f", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:00:56.5352746Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:56 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D8080997ACE210", - "Content-Length" : "0", - "x-ms-request-id" : "f46281d9-701e-0051-57f2-396bad000000", - "x-ms-client-request-id" : "ed2590c6-421c-48d4-ad5d-d9ef442bbd2f" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus051643be/6d45e23af9474497813a35b8610ac04ba54f6adb23384e7586c76a42ea3262cc?comp=snapshot", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "83fd55d6-0355-4d2e-a911-8ba55492803f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:56 GMT", - "x-ms-version-id" : "2020-06-03T22:00:56.6263578Z", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 03 Jun 2020 22:00:56 GMT", - "x-ms-snapshot" : "2020-06-03T22:00:56.6253578Z", - "ETag" : "0x8D8080997ACE210", - "Content-Length" : "0", - "x-ms-request-id" : "f46281fe-701e-0051-75f2-396bad000000", - "x-ms-client-request-id" : "83fd55d6-0355-4d2e-a911-8ba55492803f" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8d053869-d783-444d-b48b-7651ec275cab", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46282bf-701e-0051-15f2-396bad000000", - "Body" : "8bddba2f-053f-45bb-8626-c96a3223f3ce8f46533c-48fa-4f30-b9bc-58a59ddb57142020-06-02T22:00:56Z2020-06-04T22:00:56Zb2019-12-12UkVEQUNURUQ=", - "Date" : "Wed, 03 Jun 2020 22:00:56 GMT", - "x-ms-client-request-id" : "8d053869-d783-444d-b48b-7651ec275cab", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus051643be/6d45e23af9474497813a35b8610ac04ba54f6adb23384e7586c76a42ea3262cc?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A56Z&se=2020-06-04T22%3A00%3A56Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A00%3A56Z&ske=2020-06-04T22%3A00%3A56Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "87914624-bb22-4316-b587-db09ba9d38f5" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "447", - "StatusCode" : "403", - "x-ms-request-id" : "f46282fe-701e-0051-4bf2-396bad000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:f46282fe-701e-0051-4bf2-396bad000000\nTime:2020-06-03T22:00:57.1301396ZThe specified signed resource is not allowed for the this resource level", - "Date" : "Wed, 03 Jun 2020 22:00:56 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus051643be/6d45e23af9474497813a35b8610ac04ba54f6adb23384e7586c76a42ea3262cc?snapshot=2020-06-03T22%3A00%3A56.6253578Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A56Z&se=2020-06-04T22%3A00%3A56Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A00%3A56Z&ske=2020-06-04T22%3A00%3A56Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2015ce3f-ff06-4bb3-93d0-b37340754b6e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:56 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:00:56 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D8080997ACE210", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:56 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f462831d-701e-0051-66f2-396bad000000", - "Body" : "test", - "x-ms-client-request-id" : "2015ce3f-ff06-4bb3-93d0-b37340754b6e", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus051643be/6d45e23af9474497813a35b8610ac04ba54f6adb23384e7586c76a42ea3262cc?snapshot=2020-06-03T22%3A00%3A56.6253578Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A56Z&se=2020-06-04T22%3A00%3A56Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A00%3A56Z&ske=2020-06-04T22%3A00%3A56Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c22fba78-68e8-48e2-bb3f-f756809b68b4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:56 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:00:56 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Cache-Control" : "cache", - "ETag" : "0x8D8080997ACE210", - "Content-Disposition" : "disposition", - "Content-Encoding" : "encoding", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:56 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f462832d-701e-0051-75f2-396bad000000", - "x-ms-client-request-id" : "c22fba78-68e8-48e2-bb3f-f756809b68b4", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestblobsnapshotus&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ea2d9033-aec8-4a0b-9041-f7a58cfcac38" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628364-701e-0051-1ff2-396bad000000", - "Body" : "jtcservicesassignaturevaluesnetworktestblobsnapshotusjtcservicesassignaturevaluesnetworktestblobsnapshotus051643beWed, 03 Jun 2020 22:00:56 GMT\"0x8D80809979F2ED9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:56 GMT", - "x-ms-client-request-id" : "ea2d9033-aec8-4a0b-9041-f7a58cfcac38", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobsnapshotus051643be?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6acabb02-1a98-4e2f-8ce8-7e5126054fff" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4628390-701e-0051-41f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:57 GMT", - "x-ms-client-request-id" : "6acabb02-1a98-4e2f-8ce8-7e5126054fff" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestblobsnapshotus051643be", "6d45e23af9474497813a35b8610ac04ba54f6adb23384e7586c76a42ea3262cc", "2020-06-03T22:00:56.718380100Z", "2020-06-03T22:00:56.718380100Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobuserdelegation.json deleted file mode 100644 index fc2b4c041f9f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestblobuserdelegation.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega089986fa?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "64fa8e9b-e043-401d-8fa1-b98174ca45be" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080995D91BAF", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:53 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4627bef-701e-0051-21f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:53 GMT", - "x-ms-client-request-id" : "64fa8e9b-e043-401d-8fa1-b98174ca45be" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega089986fa/03425041a7524f8eba9a1f86de62bff9752ee467be644de0bd7a70991cc63090", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4cafc9a3-f945-4dd3-ac02-2fb970a1a363", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:00:53.5564455Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:53 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:00:53 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D8080995E680A7", - "Content-Length" : "0", - "x-ms-request-id" : "f4627c1e-701e-0051-44f2-396bad000000", - "x-ms-client-request-id" : "4cafc9a3-f945-4dd3-ac02-2fb970a1a363" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f5aab87a-ece2-47f0-9a2c-65bc1f81f726", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627ebf-701e-0051-48f2-396bad000000", - "Body" : "d1e5af98-c0be-4154-aa20-1eff30ce470364248cca-9994-4287-b854-97a7308966402020-06-03T22:00:54Z2020-06-04T22:00:53Zb2019-12-12UkVEQUNURUQ=", - "Date" : "Wed, 03 Jun 2020 22:00:54 GMT", - "x-ms-client-request-id" : "f5aab87a-ece2-47f0-9a2c-65bc1f81f726", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega089986fa/03425041a7524f8eba9a1f86de62bff9752ee467be644de0bd7a70991cc63090?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A53Z&se=2020-06-04T22%3A00%3A53Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-03T22%3A00%3A54Z&ske=2020-06-04T22%3A00%3A53Z&sks=b&skv=2019-12-12&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f1d0f25e-af85-495e-b2d4-0b950f508749" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:00:53.5564455Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:53 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-blob-type" : "BlockBlob", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:53 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f4627f32-701e-0051-2bf2-396bad000000", - "Body" : "test", - "Content-Type" : "type", - "x-ms-version" : "2019-12-12", - "Date" : "Wed, 03 Jun 2020 22:00:54 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D8080995E680A7", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-client-request-id" : "f1d0f25e-af85-495e-b2d4-0b950f508749", - "Content-Language" : "language" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega089986fa/03425041a7524f8eba9a1f86de62bff9752ee467be644de0bd7a70991cc63090?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A00%3A53Z&se=2020-06-04T22%3A00%3A53Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-03T22%3A00%3A54Z&ske=2020-06-04T22%3A00%3A53Z&sks=b&skv=2019-12-12&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e6cdd9d5-82bc-410d-ac35-0514bbc34ae6" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:00:53.5564455Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:53 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-blob-type" : "BlockBlob", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Content-Encoding" : "encoding", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:00:53 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "f4627f8d-701e-0051-7af2-396bad000000", - "Content-Type" : "type", - "x-ms-version" : "2019-12-12", - "Date" : "Wed, 03 Jun 2020 22:00:54 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D8080995E680A7", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "Content-Language" : "language", - "x-ms-client-request-id" : "e6cdd9d5-82bc-410d-ac35-0514bbc34ae6" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestblobuserdelega&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2877d89a-736e-47fd-a15e-6937313da0a4" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627fb5-701e-0051-1cf2-396bad000000", - "Body" : "jtcservicesassignaturevaluesnetworktestblobuserdelegajtcservicesassignaturevaluesnetworktestblobuserdelega089986faWed, 03 Jun 2020 22:00:53 GMT\"0x8D8080995D91BAF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:54 GMT", - "x-ms-client-request-id" : "2877d89a-736e-47fd-a15e-6937313da0a4", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestblobuserdelega089986fa?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5a50f906-248c-4670-aa83-bd74700bb17d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4627fc4-701e-0051-29f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:54 GMT", - "x-ms-client-request-id" : "5a50f906-248c-4670-aa83-bd74700bb17d" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestblobuserdelega089986fa", "03425041a7524f8eba9a1f86de62bff9752ee467be644de0bd7a70991cc63090", "2020-06-03T22:00:53.645955900Z", "2020-06-03T22:00:53.645955900Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontainer.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontainer.json deleted file mode 100644 index efaec9ad2aed..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontainer.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer06645211d2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "15f347e7-b723-40f6-bf41-a1ef9f63f409" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809957E89A7", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f4627ad7-701e-0051-4af2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-client-request-id" : "15f347e7-b723-40f6-bf41-a1ef9f63f409" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer06645211d2?restype=container&comp=acl", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "debd54c9-a757-471f-8ca1-3ccdddc53c57", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D8080995908B1A", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627af7-701e-0051-63f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-client-request-id" : "debd54c9-a757-471f-8ca1-3ccdddc53c57" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer06645211d2?restype=container&comp=list&sv=2019-12-12&si=0000&sr=c&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e01920ec-7c1d-4ab7-a467-ae86346766cc" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627b19-701e-0051-80f2-396bad000000", - "Body" : "", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-client-request-id" : "e01920ec-7c1d-4ab7-a467-ae86346766cc", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer06645211d2?restype=container&comp=list&sv=2019-12-12&se=2020-06-04T22%3A00%3A53Z&sr=c&sp=racwdl&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "33fc3652-19ac-4387-8041-5ab518aab452" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627b43-701e-0051-23f2-396bad000000", - "Body" : "", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-client-request-id" : "33fc3652-19ac-4387-8041-5ab518aab452", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestcontainer&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dc12f06d-2ce2-4854-b891-acf26e5d17d1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4627b7e-701e-0051-49f2-396bad000000", - "Body" : "jtcservicesassignaturevaluesnetworktestcontainerjtcservicesassignaturevaluesnetworktestcontainer06645211d2Wed, 03 Jun 2020 22:00:52 GMT\"0x8D8080995908B1A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-client-request-id" : "dc12f06d-2ce2-4854-b891-acf26e5d17d1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer06645211d2?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4ae87fdf-7f62-4220-860d-508972a17e08" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f4627bc2-701e-0051-7ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:52 GMT", - "x-ms-client-request-id" : "4ae87fdf-7f62-4220-860d-508972a17e08" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestcontainer06645211d2", "2020-06-03T22:00:52.972974Z", "2020-06-03T22:00:53.087969400Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontaineruserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontaineruserdelegation.json deleted file mode 100644 index 7cf57b288375..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestcontaineruserdelegation.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd031468bc?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6d55c70a-8387-4562-b83b-b55dbac354c3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809984A3E80", - "Last-Modified" : "Wed, 03 Jun 2020 22:00:57 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f46283bf-701e-0051-63f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:57 GMT", - "x-ms-client-request-id" : "6d55c70a-8387-4562-b83b-b55dbac354c3" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ee1f79d6-ee0e-4c23-b465-7782ae10ed38", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f46284d5-701e-0051-43f2-396bad000000", - "Body" : "2dacfd94-43db-4053-b373-c53f373ca19aaa44cb4e-0914-4e29-a0e3-12c4ee0052842020-06-03T22:00:58Z2020-06-04T22:00:57Zb2019-12-12UkVEQUNURUQ=", - "Date" : "Wed, 03 Jun 2020 22:00:57 GMT", - "x-ms-client-request-id" : "ee1f79d6-ee0e-4c23-b465-7782ae10ed38", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd031468bc?restype=container&comp=list&sv=2019-02-02&se=2020-06-04T22%3A00%3A57Z&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-03T22%3A00%3A58Z&ske=2020-06-04T22%3A00%3A57Z&sks=b&skv=2019-12-12&sr=c&sp=racwdl&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "171eae52-2b60-4aa3-8fad-8791a8bc9438" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f4628507-701e-0051-6af2-396bad000000", - "Body" : "", - "Date" : "Wed, 03 Jun 2020 22:00:57 GMT", - "x-ms-client-request-id" : "171eae52-2b60-4aa3-8fad-8791a8bc9438", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestcontaineruserd&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7da9468c-1206-48fc-9add-441d0454ac01" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462852b-701e-0051-03f2-396bad000000", - "Body" : "jtcservicesassignaturevaluesnetworktestcontaineruserdjtcservicesassignaturevaluesnetworktestcontaineruserd031468bcWed, 03 Jun 2020 22:00:57 GMT\"0x8D80809984A3E80\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:00:57 GMT", - "x-ms-client-request-id" : "7da9468c-1206-48fc-9add-441d0454ac01", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontaineruserd031468bc?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f8041870-d355-48e9-8e94-e816f2187fb4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462854e-701e-0051-1ef2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:00:57 GMT", - "x-ms-client-request-id" : "f8041870-d355-48e9-8e94-e816f2187fb4" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestcontaineruserd031468bc", "2020-06-03T22:00:57.660910800Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparser.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparser.json deleted file mode 100644 index df58abca1f6a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTesturlparser.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcurlparser0sastesturlparserf0374784189adbda63804?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f13ce1e2-6941-4de2-bdc6-6bf5ceb581ca" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809ABF73957", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:30 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f462bb20-701e-0051-58f2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:30 GMT", - "x-ms-client-request-id" : "f13ce1e2-6941-4de2-bdc6-6bf5ceb581ca" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcurlparser&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f13acb21-0d94-4c9a-87ce-627a0ed37c23" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "f462bb38-701e-0051-6bf2-396bad000000", - "Body" : "jtcurlparserjtcurlparser0sastesturlparserf0374784189adbda63804Wed, 03 Jun 2020 22:01:30 GMT\"0x8D80809ABF73957\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:30 GMT", - "x-ms-client-request-id" : "f13acb21-0d94-4c9a-87ce-627a0ed37c23", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcurlparser0sastesturlparserf0374784189adbda63804?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4b540eeb-9dc6-4085-a02c-b13482cdeb83" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f462bb53-701e-0051-7ff2-396bad000000", - "Date" : "Wed, 03 Jun 2020 22:01:30 GMT", - "x-ms-client-request-id" : "4b540eeb-9dc6-4085-a02c-b13482cdeb83" - }, - "Exception" : null - } ], - "variables" : [ "jtcurlparser0sastesturlparserf0374784189adbda63804" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasblobdeletefails.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasblobdeletefails.json new file mode 100644 index 000000000000..41131c0b8b18 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasblobdeletefails.json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasblobdeletefails0696699f66c36e901a41?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0581daca-66f6-4422-89c1-af55e8e73d2e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFE04C0F1B", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:55 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "41a1e1a8-701e-0056-68a8-5b606d000000", + "Date" : "Thu, 16 Jul 2020 19:38:54 GMT", + "x-ms-client-request-id" : "0581daca-66f6-4422-89c1-af55e8e73d2e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasblobdeletefails0696699f66c36e901a41/javablobaccountsasblobdeletefails1103927b1470201522", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5bfec32a-b149-4f5b-9e44-2b0d46c0a271", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:55.5082059Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:55 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:54 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFE082BD4B", + "Content-Length" : "0", + "x-ms-request-id" : "4b4848f3-d01e-004f-55a8-5be0d6000000", + "x-ms-client-request-id" : "5bfec32a-b149-4f5b-9e44-2b0d46c0a271" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasblobdeletefails0696699f66c36e901a41/javablobaccountsasblobdeletefails1103927b1470201522?sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A53Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f13e1d3e-d543-49db-95a7-7d8190c4b7ac" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "279", + "StatusCode" : "403", + "x-ms-request-id" : "285f8b15-901e-0071-26a8-5b77a9000000", + "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:285f8b15-901e-0071-26a8-5b77a9000000\nTime:2020-07-16T19:38:55.8334574Z", + "Date" : "Thu, 16 Jul 2020 19:38:55 GMT", + "x-ms-client-request-id" : "f13e1d3e-d543-49db-95a7-7d8190c4b7ac", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasblobdeletefails&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e6b1d864-8a70-4cf0-8455-823ffe19ee17" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7821de9c-901e-0003-01a8-5b70e6000000", + "Body" : "jtcaccountsasblobdeletefailsjtcaccountsasblobdeletefails0696699f66c36e901a41Thu, 16 Jul 2020 19:38:55 GMT\"0x8D829BFE04C0F1B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:55 GMT", + "x-ms-client-request-id" : "e6b1d864-8a70-4cf0-8455-823ffe19ee17", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasblobdeletefails0696699f66c36e901a41?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2f58c1ae-316b-4bb9-96c3-57e8ec1b4b86" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2408afb4-001e-00a8-41a8-5b0f2c000000", + "Date" : "Thu, 16 Jul 2020 19:38:56 GMT", + "x-ms-client-request-id" : "2f58c1ae-316b-4bb9-96c3-57e8ec1b4b86" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasblobdeletefails0696699f66c36e901a41", "javablobaccountsasblobdeletefails1103927b1470201522", "2020-07-16T19:38:53.725389500Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasblobread.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasblobread.json new file mode 100644 index 000000000000..d795d4e3cbca --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasblobread.json @@ -0,0 +1,123 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasblobread0sasclienttestsaccountsasblobread3cb23655?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "81be1905-1460-48dc-bf7c-878a77191888" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFDF37C600", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:53 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "94ad1ba9-701e-0024-58a8-5b6722000000", + "Date" : "Thu, 16 Jul 2020 19:38:53 GMT", + "x-ms-client-request-id" : "81be1905-1460-48dc-bf7c-878a77191888" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasblobread0sasclienttestsaccountsasblobread3cb23655/javablobaccountsasblobread1351215beb5f8beef44b9", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38457cc3-15ef-4b67-b8e4-8c874d606a4d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:53.6969156Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:53 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:53 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFDF6E5BC4", + "Content-Length" : "0", + "x-ms-request-id" : "393d14db-601e-005a-50a8-5bf765000000", + "x-ms-client-request-id" : "38457cc3-15ef-4b67-b8e4-8c874d606a4d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasblobread0sasclienttestsaccountsasblobread3cb23655/javablobaccountsasblobread1351215beb5f8beef44b9?sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A51Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fce047e6-2f88-441e-a582-1ad6f35fba10" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-16T19:38:53.6969156Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:53 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 16 Jul 2020 19:38:53 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D829BFDF6E5BC4", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:53 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "c09a3275-401e-003f-32a8-5b5921000000", + "Body" : "[100, 101, 102, 97, 117, 108, 116]", + "x-ms-client-request-id" : "fce047e6-2f88-441e-a582-1ad6f35fba10", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasblobread&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3082e715-7b44-48a8-ad60-c939ff03306c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "123f0575-601e-004a-52a8-5b320d000000", + "Body" : "jtcaccountsasblobreadjtcaccountsasblobread0sasclienttestsaccountsasblobread3cb23655Thu, 16 Jul 2020 19:38:53 GMT\"0x8D829BFDF37C600\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:54 GMT", + "x-ms-client-request-id" : "3082e715-7b44-48a8-ad60-c939ff03306c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasblobread0sasclienttestsaccountsasblobread3cb23655?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "00919cb2-3337-41d3-980d-84328fed3906" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "921a6138-b01e-0092-50a8-5b1554000000", + "Date" : "Thu, 16 Jul 2020 19:38:54 GMT", + "x-ms-client-request-id" : "00919cb2-3337-41d3-980d-84328fed3906" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasblobread0sasclienttestsaccountsasblobread3cb23655", "javablobaccountsasblobread1351215beb5f8beef44b9", "2020-07-16T19:38:51.924459200Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsascreatecontainerfails.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsascreatecontainerfails.json new file mode 100644 index 000000000000..cde0446c46d0 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsascreatecontainerfails.json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainerfails05486134d7e73b749c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1171c4f4-5b6a-498a-be2b-5d361e3b4b85" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFE15BA586", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:56 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "cd78f38e-a01e-0045-7aa8-5b4461000000", + "Date" : "Thu, 16 Jul 2020 19:38:56 GMT", + "x-ms-client-request-id" : "1171c4f4-5b6a-498a-be2b-5d361e3b4b85" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainerfails05486134d7e73b749c/javablobaccountsascreatecontainerfails159310d3f87409b", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "623ad057-e88a-4e83-8a0e-151d7bf4a89d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:57.2784668Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:57 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:56 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFE190DC1C", + "Content-Length" : "0", + "x-ms-request-id" : "1939b9d6-201e-0016-2ba8-5b6755000000", + "x-ms-client-request-id" : "623ad057-e88a-4e83-8a0e-151d7bf4a89d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainerfails206026aac449434926?restype=container&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A55Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "49f1c8cf-183c-498e-8a82-6944e0b11e3b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "279", + "StatusCode" : "403", + "x-ms-request-id" : "383c9e78-c01e-00a7-15a8-5b7940000000", + "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:383c9e78-c01e-00a7-15a8-5b7940000000\nTime:2020-07-16T19:38:57.6439119Z", + "Date" : "Thu, 16 Jul 2020 19:38:56 GMT", + "x-ms-client-request-id" : "49f1c8cf-183c-498e-8a82-6944e0b11e3b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsascreatecontainerfails&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d00c087f-b2b6-42df-9fe1-d876b3135b17" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c86247a3-901e-0095-2ea8-5b7937000000", + "Body" : "jtcaccountsascreatecontainerfailsjtcaccountsascreatecontainerfails05486134d7e73b749cThu, 16 Jul 2020 19:38:56 GMT\"0x8D829BFE15BA586\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:57 GMT", + "x-ms-client-request-id" : "d00c087f-b2b6-42df-9fe1-d876b3135b17", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainerfails05486134d7e73b749c?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7093ca0a-5673-4bb5-b5b7-2e1f48238d1d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "04e80e66-801e-0052-05a8-5bed6a000000", + "Date" : "Thu, 16 Jul 2020 19:38:58 GMT", + "x-ms-client-request-id" : "7093ca0a-5673-4bb5-b5b7-2e1f48238d1d" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsascreatecontainerfails05486134d7e73b749c", "javablobaccountsascreatecontainerfails159310d3f87409b", "2020-07-16T19:38:55.507412100Z", "jtcaccountsascreatecontainerfails206026aac449434926" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsascreatecontainersucceeds.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsascreatecontainersucceeds.json new file mode 100644 index 000000000000..b404317c4342 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsascreatecontainersucceeds.json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainersucceeds0452007d957b6d56?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c187c4d-85aa-4eea-b6f6-724fa37146fe" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFE274159C", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:58 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f4ee66d6-501e-00a5-70a8-5bc7f8000000", + "Date" : "Thu, 16 Jul 2020 19:38:58 GMT", + "x-ms-client-request-id" : "1c187c4d-85aa-4eea-b6f6-724fa37146fe" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainersucceeds0452007d957b6d56/javablobaccountsascreatecontainersucceeds164252b15c1e3c", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "42620ab7-300c-4288-a1dd-759d33f1217f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:59.1407929Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:59 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:58 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFE2AD0739", + "Content-Length" : "0", + "x-ms-request-id" : "d4bf25bc-b01e-0059-44a8-5b1601000000", + "x-ms-client-request-id" : "42620ab7-300c-4288-a1dd-759d33f1217f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainersucceeds2714941c15aa8a15?restype=container&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A57Z&sp=rc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c26594a-b9ac-46fe-95de-c68cbb57734d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFE2E606F2", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:59 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "fcc604a9-f01e-002a-5ba8-5b4e92000000", + "Date" : "Thu, 16 Jul 2020 19:38:59 GMT", + "x-ms-client-request-id" : "3c26594a-b9ac-46fe-95de-c68cbb57734d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsascreatecontainersucceeds&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "60d83458-20bf-442c-9b96-e5dd6b761615" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "55f0fa52-101e-00a4-7ea8-5b9824000000", + "Body" : "jtcaccountsascreatecontainersucceedsjtcaccountsascreatecontainersucceeds0452007d957b6d56Thu, 16 Jul 2020 19:38:58 GMT\"0x8D829BFE274159C\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcaccountsascreatecontainersucceeds2714941c15aa8a15Thu, 16 Jul 2020 19:38:59 GMT\"0x8D829BFE2E606F2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:59 GMT", + "x-ms-client-request-id" : "60d83458-20bf-442c-9b96-e5dd6b761615", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainersucceeds0452007d957b6d56?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "29f39ae2-2ad6-4683-b542-e65915350187" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "597b73f7-801e-006d-69a8-5b25c9000000", + "Date" : "Thu, 16 Jul 2020 19:39:00 GMT", + "x-ms-client-request-id" : "29f39ae2-2ad6-4683-b542-e65915350187" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsascreatecontainersucceeds2714941c15aa8a15?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "50016801-5937-45fd-b37c-351451510075" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "f3dd11ee-d01e-0002-74a8-5b2f3a000000", + "Date" : "Thu, 16 Jul 2020 19:38:59 GMT", + "x-ms-client-request-id" : "50016801-5937-45fd-b37c-351451510075" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsascreatecontainersucceeds0452007d957b6d56", "javablobaccountsascreatecontainersucceeds164252b15c1e3c", "2020-07-16T19:38:57.369458200Z", "jtcaccountsascreatecontainersucceeds2714941c15aa8a15" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasfiltertagsfail.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasfiltertagsfail.json new file mode 100644 index 000000000000..dd1fcb8d4ff4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasfiltertagsfail.json @@ -0,0 +1,113 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasfiltertagsfail058379e72816443e03453?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "57945bff-50e1-41f3-90a0-e407fd680c63" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFDE2A5AEA", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "aa37aac5-401e-0000-1da8-5b9182000000", + "Date" : "Thu, 16 Jul 2020 19:38:50 GMT", + "x-ms-client-request-id" : "57945bff-50e1-41f3-90a0-e407fd680c63" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasfiltertagsfail058379e72816443e03453/javablobaccountsasfiltertagsfail123873c92454df8e56", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "10f05984-7382-4710-80c9-5f2fec6a968f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:51.9286565Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:51 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:51 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFDE608B25", + "Content-Length" : "0", + "x-ms-request-id" : "34c511a4-e01e-0036-42a8-5b1cf2000000", + "x-ms-client-request-id" : "10f05984-7382-4710-80c9-5f2fec6a968f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?where=%22foo%22%3D%27bar%27&comp=blobs&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A50Z&sp=rwdxlacup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dfa63f96-e4fc-4187-af66-70335c21b211" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "280", + "StatusCode" : "403", + "x-ms-request-id" : "da30d3cc-101e-007f-32a8-5b5e19000000", + "Body" : "\nAuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:da30d3cc-101e-007f-32a8-5b5e19000000\nTime:2020-07-16T19:38:52.2959241Z", + "Date" : "Thu, 16 Jul 2020 19:38:51 GMT", + "x-ms-client-request-id" : "dfa63f96-e4fc-4187-af66-70335c21b211", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasfiltertagsfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f7d8f4c9-5704-4d8a-b35f-189be2149ff6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "b3f4303b-201e-0064-0ca8-5b601a000000", + "Body" : "jtcaccountsasfiltertagsfailjtcaccountsasfiltertagsfail058379e72816443e03453Thu, 16 Jul 2020 19:38:51 GMT\"0x8D829BFDE2A5AEA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:52 GMT", + "x-ms-client-request-id" : "f7d8f4c9-5704-4d8a-b35f-189be2149ff6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasfiltertagsfail058379e72816443e03453?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "104757db-a01b-42c2-9fe6-d7143869ff5f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "6f43c5d5-c01e-000e-60a8-5bb832000000", + "Date" : "Thu, 16 Jul 2020 19:38:52 GMT", + "x-ms-client-request-id" : "104757db-a01b-42c2-9fe6-d7143869ff5f" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasfiltertagsfail058379e72816443e03453", "javablobaccountsasfiltertagsfail123873c92454df8e56", "2020-07-16T19:38:50.156404900Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[0].json new file mode 100644 index 000000000000..213032238e0d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[0].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign07582665db93b0853f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9a3da8b-c0f3-4b50-8896-2beecb640ac8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFFE8B8F32", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2431a8b6-001e-005c-65a8-5bc4da000000", + "Date" : "Thu, 16 Jul 2020 19:39:45 GMT", + "x-ms-client-request-id" : "d9a3da8b-c0f3-4b50-8896-2beecb640ac8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign07582665db93b0853f/javablobaccountsasimplutilstringtosign110808f9afa9ccc", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "49420ef2-8cb1-4bd3-bff1-cc379911bcb7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:39:46.2333310Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:46 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:39:45 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFFEBEC77E", + "Content-Length" : "0", + "x-ms-request-id" : "1cd18c07-e01e-006b-02a8-5b1676000000", + "x-ms-client-request-id" : "49420ef2-8cb1-4bd3-bff1-cc379911bcb7" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d57fac50-5ab7-4f44-941b-f16fba05db7c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "04e85d50-801e-0052-20a8-5bed6a000000", + "Body" : "jtcaccountsasimplutilstringtosignjtcaccountsasimplutilstringtosign07582665db93b0853fThu, 16 Jul 2020 19:39:45 GMT\"0x8D829BFFE8B8F32\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:46 GMT", + "x-ms-client-request-id" : "d57fac50-5ab7-4f44-941b-f16fba05db7c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign07582665db93b0853f?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2a2c4d5d-a2e6-4938-bcec-de88341973b8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2c82b71e-d01e-0012-30a8-5bea52000000", + "Date" : "Thu, 16 Jul 2020 19:39:45 GMT", + "x-ms-client-request-id" : "2a2c4d5d-a2e6-4938-bcec-de88341973b8" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasimplutilstringtosign07582665db93b0853f", "javablobaccountsasimplutilstringtosign110808f9afa9ccc" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[1].json new file mode 100644 index 000000000000..cd2a1f528296 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[1].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign073217dd30fd121f5d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ee162c8-93a5-4070-a402-048314cb49e5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFFF59E5B7", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "14b7cfd9-101e-0022-1aa8-5b549d000000", + "Date" : "Thu, 16 Jul 2020 19:39:46 GMT", + "x-ms-client-request-id" : "0ee162c8-93a5-4070-a402-048314cb49e5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign073217dd30fd121f5d/javablobaccountsasimplutilstringtosign169967a7774a442", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a92ae25b-0dbd-4a84-b728-6ac9c4392d71", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:39:47.5842922Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:47 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:39:47 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFFF8CC451", + "Content-Length" : "0", + "x-ms-request-id" : "c8627a7c-901e-0095-4da8-5b7937000000", + "x-ms-client-request-id" : "a92ae25b-0dbd-4a84-b728-6ac9c4392d71" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15f4b106-a045-4110-8c1b-b44f845d4431" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "27fe8128-701e-0069-25a8-5ba8ce000000", + "Body" : "jtcaccountsasimplutilstringtosignjtcaccountsasimplutilstringtosign073217dd30fd121f5dThu, 16 Jul 2020 19:39:47 GMT\"0x8D829BFFF59E5B7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:47 GMT", + "x-ms-client-request-id" : "15f4b106-a045-4110-8c1b-b44f845d4431", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign073217dd30fd121f5d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fd590ea3-704b-481f-b126-7a7990ec3137" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "c6794ab3-e01e-0026-46a8-5bd99a000000", + "Date" : "Thu, 16 Jul 2020 19:39:48 GMT", + "x-ms-client-request-id" : "fd590ea3-704b-481f-b126-7a7990ec3137" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasimplutilstringtosign073217dd30fd121f5d", "javablobaccountsasimplutilstringtosign169967a7774a442" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[2].json new file mode 100644 index 000000000000..7800692c514a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasimplutilstringtosign[2].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign099653372192296fb6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "25b400ed-57e4-4975-8729-49e061a3a850" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829C000388BC9", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:48 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "91e8b3e2-401e-0072-7ea8-5b96cd000000", + "Date" : "Thu, 16 Jul 2020 19:39:47 GMT", + "x-ms-client-request-id" : "25b400ed-57e4-4975-8729-49e061a3a850" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign099653372192296fb6/javablobaccountsasimplutilstringtosign10956619bb71af0", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ce837b2-8b29-472b-bc68-0a6c7f03b425", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:39:49.0713517Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:49 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:39:48 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829C0006FD3AD", + "Content-Length" : "0", + "x-ms-request-id" : "cd79655a-a01e-0045-38a8-5b4461000000", + "x-ms-client-request-id" : "0ce837b2-8b29-472b-bc68-0a6c7f03b425" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a20d3b7e-3201-4984-b7f2-90e0d663497b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a6c9cb48-d01e-002d-37a8-5b22f1000000", + "Body" : "jtcaccountsasimplutilstringtosignjtcaccountsasimplutilstringtosign099653372192296fb6Thu, 16 Jul 2020 19:39:48 GMT\"0x8D829C000388BC9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:48 GMT", + "x-ms-client-request-id" : "a20d3b7e-3201-4984-b7f2-90e0d663497b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasimplutilstringtosign099653372192296fb6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8dd1c85c-c188-4ee1-b58f-efc198a5e1ae" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "35150b66-901e-003c-09a8-5bb845000000", + "Date" : "Thu, 16 Jul 2020 19:39:48 GMT", + "x-ms-client-request-id" : "8dd1c85c-c188-4ee1-b58f-efc198a5e1ae" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasimplutilstringtosign099653372192296fb6", "javablobaccountsasimplutilstringtosign10956619bb71af0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainerfails.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainerfails.json deleted file mode 100644 index 8cc1f2c1b00a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainerfails.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails05061730ec7e2c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "848374ae-6bcc-4976-a789-dde9a5d1cde2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BB5DB0F2", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:56 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "fd65c57c-c01e-007b-2ff2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "848374ae-6bcc-4976-a789-dde9a5d1cde2" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails05061730ec7e2c/javablobaccountsasnetworkcreatecontainerfails11498786bd2b", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bef2a8f8-ee23-48da-bc56-a0edaec202de", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:56.4982062Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BB6AA72E", - "Content-Length" : "0", - "x-ms-request-id" : "27923fe0-f01e-005f-0df2-39421d000000", - "x-ms-client-request-id" : "bef2a8f8-ee23-48da-bc56-a0edaec202de" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails229795ab3bf67c?restype=container&sv=2019-12-12&ss=b&srt=sco&se=2020-06-04T22%3A01%3A56Z&sp=r&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "449389d9-855d-48c4-bb10-2b39e444a939" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthorizationPermissionMismatch", - "retry-after" : "0", - "Content-Length" : "279", - "StatusCode" : "403", - "x-ms-request-id" : "fd65c5ac-c01e-007b-53f2-39b4bd000000", - "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:fd65c5ac-c01e-007b-53f2-39b4bd000000\nTime:2020-06-03T22:01:56.5954324Z", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "449389d9-855d-48c4-bb10-2b39e444a939", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworkcreatecontainerfails&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c7bbb4d5-d89e-411c-86fa-0861da12310d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "27924052-f01e-005f-63f2-39421d000000", - "Body" : "jtcaccountsasnetworkcreatecontainerfailsjtcaccountsasnetworkcreatecontainerfails05061730ec7e2cWed, 03 Jun 2020 22:01:56 GMT\"0x8D80809BB5DB0F2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-client-request-id" : "c7bbb4d5-d89e-411c-86fa-0861da12310d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails05061730ec7e2c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a00c5431-4089-40f1-a07b-352914beaa1d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c5d2-c01e-007b-73f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "a00c5431-4089-40f1-a07b-352914beaa1d" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworkcreatecontainerfails05061730ec7e2c", "javablobaccountsasnetworkcreatecontainerfails11498786bd2b", "2020-06-03T22:01:56.589340700Z", "jtcaccountsasnetworkcreatecontainerfails229795ab3bf67c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainersucceeds.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainersucceeds.json deleted file mode 100644 index c44ca17b318b..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainersucceeds.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds01805294d0cb8?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3a09317c-260f-49ec-bf4d-a31683ff60de" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BBA40A4F", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:56 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "279240dc-f01e-005f-42f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "3a09317c-260f-49ec-bf4d-a31683ff60de" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds01805294d0cb8/javablobaccountsasnetworkcreatecontainersucceeds1943159d10", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cbdb5964-25e8-4e9e-8a7c-a1eacef0af8c", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:56.9586439Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BBB0E907", - "Content-Length" : "0", - "x-ms-request-id" : "fd65c603-c01e-007b-19f2-39b4bd000000", - "x-ms-client-request-id" : "cbdb5964-25e8-4e9e-8a7c-a1eacef0af8c" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds236840e3080ab?restype=container&sv=2019-12-12&ss=b&srt=sco&se=2020-06-04T22%3A01%3A57Z&sp=rc&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6cc70152-b1bd-4018-a69c-74b16d6051d3" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BBBD8BFC", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:57 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "27924144-f01e-005f-17f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "6cc70152-b1bd-4018-a69c-74b16d6051d3" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworkcreatecontainersucceeds&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b55e613a-fa89-42ee-ba97-4348363f8c86" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "fd65c63e-c01e-007b-48f2-39b4bd000000", - "Body" : "jtcaccountsasnetworkcreatecontainersucceedsjtcaccountsasnetworkcreatecontainersucceeds01805294d0cb8Wed, 03 Jun 2020 22:01:56 GMT\"0x8D80809BBA40A4F\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcaccountsasnetworkcreatecontainersucceeds236840e3080abWed, 03 Jun 2020 22:01:57 GMT\"0x8D80809BBBD8BFC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "b55e613a-fa89-42ee-ba97-4348363f8c86", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds01805294d0cb8?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "69f17f67-22a0-4255-80a1-16022141b8d7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "27924199-f01e-005f-5df2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "69f17f67-22a0-4255-80a1-16022141b8d7" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds236840e3080ab?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "da3f2e3b-9eff-4759-9fe6-b35a37d4aca2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c665-c01e-007b-69f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "da3f2e3b-9eff-4759-9fe6-b35a37d4aca2" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworkcreatecontainersucceeds01805294d0cb8", "javablobaccountsasnetworkcreatecontainersucceeds1943159d10", "2020-06-03T22:01:57.045352900Z", "jtcaccountsasnetworkcreatecontainersucceeds236840e3080ab" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobdeletefailsnewapi.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobdeletefailsnewapi.json deleted file mode 100644 index eeeffb7027b3..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobdeletefailsnewapi.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefailsnewapi0337360c2a82?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7cce3d8a-97bd-41ab-a943-2c952879d163" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BB16C306", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:55 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "27923eb2-f01e-005f-12f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-client-request-id" : "7cce3d8a-97bd-41ab-a943-2c952879d163" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefailsnewapi0337360c2a82/javablobaccountsasnetworktestblobdeletefailsnewapi134704091", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4942a2a4-4b74-4b76-b48d-dca3e30c1569", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:56.0567860Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BB274C34", - "Content-Length" : "0", - "x-ms-request-id" : "fd65c4f2-c01e-007b-41f2-39b4bd000000", - "x-ms-client-request-id" : "4942a2a4-4b74-4b76-b48d-dca3e30c1569" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefailsnewapi0337360c2a82/javablobaccountsasnetworktestblobdeletefailsnewapi134704091?sv=2019-12-12&ss=b&srt=sco&se=2020-06-04T22%3A01%3A56Z&sp=r&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "36dab552-7e4b-4b06-9ff8-b4313857a1da" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "AuthorizationPermissionMismatch", - "retry-after" : "0", - "Content-Length" : "279", - "StatusCode" : "403", - "x-ms-request-id" : "27923f32-f01e-005f-7bf2-39421d000000", - "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:27923f32-f01e-005f-7bf2-39421d000000\nTime:2020-06-03T22:01:56.1526112Z", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-client-request-id" : "36dab552-7e4b-4b06-9ff8-b4313857a1da", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworktestblobdeletefailsnewapi&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b89eb696-d25f-4c6d-9b11-3d16c8915d42" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "fd65c53c-c01e-007b-78f2-39b4bd000000", - "Body" : "jtcaccountsasnetworktestblobdeletefailsnewapijtcaccountsasnetworktestblobdeletefailsnewapi0337360c2a82Wed, 03 Jun 2020 22:01:55 GMT\"0x8D80809BB16C306\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "b89eb696-d25f-4c6d-9b11-3d16c8915d42", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefailsnewapi0337360c2a82?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8d17a0d4-dc85-4126-b4dc-59fd638111d9" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "27923f98-f01e-005f-56f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-client-request-id" : "8d17a0d4-dc85-4126-b4dc-59fd638111d9" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworktestblobdeletefailsnewapi0337360c2a82", "javablobaccountsasnetworktestblobdeletefailsnewapi134704091", "2020-06-03T22:01:56.143347800Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobread.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobread.json deleted file mode 100644 index b6c650b148fe..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobread.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobread091489f9d7db315689?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e4f0d557-b06f-48d0-bb6f-6caa2765e2ef" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BAC25CB4", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:55 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "fd65c405-c01e-007b-0df2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-client-request-id" : "e4f0d557-b06f-48d0-bb6f-6caa2765e2ef" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobread091489f9d7db315689/javablobaccountsasnetworktestblobread14677175d12700f7", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "44f5cfdc-912f-4979-bf04-1c6ff2afd924", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:55.4802402Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:55 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:54 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BACF2BC9", - "Content-Length" : "0", - "x-ms-request-id" : "27923d75-f01e-005f-1cf2-39421d000000", - "x-ms-client-request-id" : "44f5cfdc-912f-4979-bf04-1c6ff2afd924" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobread091489f9d7db315689/javablobaccountsasnetworktestblobread14677175d12700f7?sv=2019-12-12&ss=b&srt=sco&se=2020-06-04T22%3A01%3A55Z&sp=r&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c5363ec1-7d7e-4c19-bae1-69228e1e236d" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-version" : "2019-12-12", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:01:55.4802402Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:55 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "ETag" : "0x8D80809BACF2BC9", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:55 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "fd65c47f-c01e-007b-65f2-39b4bd000000", - "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "c5363ec1-7d7e-4c19-bae1-69228e1e236d", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasnetworktestblobread&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "887e5330-331c-4134-be86-812b816a8fad" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "27923e5a-f01e-005f-48f2-39421d000000", - "Body" : "jtcaccountsasnetworktestblobreadjtcaccountsasnetworktestblobread091489f9d7db315689Wed, 03 Jun 2020 22:01:55 GMT\"0x8D80809BAC25CB4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-client-request-id" : "887e5330-331c-4134-be86-812b816a8fad", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasnetworktestblobread091489f9d7db315689?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4e29f90c-dfeb-43be-a925-79041e35671c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c4c3-c01e-007b-1cf2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-client-request-id" : "4e29f90c-dfeb-43be-a925-79041e35671c" - }, - "Exception" : null - } ], - "variables" : [ "jtcaccountsasnetworktestblobread091489f9d7db315689", "javablobaccountsasnetworktestblobread14677175d12700f7", "2020-06-03T22:01:55.628399700Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasonendpoint.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasonendpoint.json new file mode 100644 index 000000000000..1a08914f20f4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasonendpoint.json @@ -0,0 +1,184 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasonendpoint014069dc9082ef6ccc4cccb?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "91728df4-c725-4e0c-958d-70a10e0d28e0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFE3B24D1E", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:00 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9d2a764a-301e-00a3-12a8-5bf447000000", + "Date" : "Thu, 16 Jul 2020 19:39:00 GMT", + "x-ms-client-request-id" : "91728df4-c725-4e0c-958d-70a10e0d28e0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasonendpoint014069dc9082ef6ccc4cccb/javablobaccountsasonendpoint122316d791b7cd4dbb4f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d1056a74-2bfd-4147-943b-91394a024c5a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:39:01.2002591Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:01 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:39:00 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFE3E7200E", + "Content-Length" : "0", + "x-ms-request-id" : "d166f57b-c01e-0031-01a8-5b7091000000", + "x-ms-client-request-id" : "d1056a74-2bfd-4147-943b-91394a024c5a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasonendpoint259619499f1437d4b347928?restype=container&sv=2019-12-12&se=2020-07-17T19%3A38%3A59Z&sp=rc&sig=REDACTED&ss=b&srt=sco", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9eca7f1-0d01-425f-8d38-8b8aa39f924e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFE41E5C61", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:01 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f77d65ad-a01e-007a-11a8-5b8cc2000000", + "Date" : "Thu, 16 Jul 2020 19:39:01 GMT", + "x-ms-client-request-id" : "a9eca7f1-0d01-425f-8d38-8b8aa39f924e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasonendpoint014069dc9082ef6ccc4cccb?restype=container&sv=2019-12-12&se=2020-07-17T19%3A38%3A59Z&sp=rc&sig=REDACTED&ss=b&srt=sco", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "80d0fae0-d06b-4534-8572-5e8f7e5f9a59" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-deny-encryption-scope-override" : "false", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:00 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 16 Jul 2020 19:39:01 GMT", + "x-ms-has-legal-hold" : "false", + "x-ms-default-encryption-scope" : "$account-encryption-key", + "ETag" : "0x8D829BFE3B24D1E", + "x-ms-has-immutability-policy" : "false", + "Content-Length" : "0", + "x-ms-request-id" : "4b328cb2-701e-00a2-7ea8-5bab9b000000", + "x-ms-client-request-id" : "80d0fae0-d06b-4534-8572-5e8f7e5f9a59" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasonendpoint014069dc9082ef6ccc4cccb/javablobaccountsasonendpoint122316d791b7cd4dbb4f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d38e83c4-05a9-4122-adcc-7d09ba8ebcf3", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "K29jWdCGgzI=", + "x-ms-version-id" : "2020-07-16T19:39:02.3450739Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:02 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:39:01 GMT", + "Content-MD5" : "fOGtCkvgPaI1S6/IJ13y4g==", + "ETag" : "0x8D829BFE495A849", + "Content-Length" : "0", + "x-ms-request-id" : "1654b648-e01e-0009-5aa8-5bd451000000", + "x-ms-client-request-id" : "d38e83c4-05a9-4122-adcc-7d09ba8ebcf3" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsasonendpoint&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ad5724df-e411-4397-b1e2-5f5ffb71e2ac" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3ef54065-b01e-0066-1ca8-5bdea2000000", + "Body" : "jtcaccountsasonendpointjtcaccountsasonendpoint014069dc9082ef6ccc4cccbThu, 16 Jul 2020 19:39:00 GMT\"0x8D829BFE3B24D1E\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcaccountsasonendpoint259619499f1437d4b347928Thu, 16 Jul 2020 19:39:01 GMT\"0x8D829BFE41E5C61\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:02 GMT", + "x-ms-client-request-id" : "ad5724df-e411-4397-b1e2-5f5ffb71e2ac", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasonendpoint014069dc9082ef6ccc4cccb?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b9a0a9d-72e3-4415-bfa1-1f70cd785037" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "03851f2d-a01e-00a1-06a8-5b4aff000000", + "Date" : "Thu, 16 Jul 2020 19:39:02 GMT", + "x-ms-client-request-id" : "5b9a0a9d-72e3-4415-bfa1-1f70cd785037" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsasonendpoint259619499f1437d4b347928?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bb038059-1ce6-4b8b-9b74-565434df628f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "34650376-601e-0081-05a8-5b3158000000", + "Date" : "Thu, 16 Jul 2020 19:39:02 GMT", + "x-ms-client-request-id" : "bb038059-1ce6-4b8b-9b74-565434df628f" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasonendpoint014069dc9082ef6ccc4cccb", "javablobaccountsasonendpoint122316d791b7cd4dbb4f", "2020-07-16T19:38:59.420409Z", "jtcaccountsasonendpoint259619499f1437d4b347928", "72669147-228c-456e-9ce2-4987e40fd7de" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsandfiltertags.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsandfiltertags.json new file mode 100644 index 000000000000..8d3aa48ff195 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsandfiltertags.json @@ -0,0 +1,152 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsandfiltertags0664438f7e25c6bfa14?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a509a11-f6be-4091-9ecb-138970f2470f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFDBA22445", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d70056cd-301e-0068-14a8-5bf712000000", + "Date" : "Thu, 16 Jul 2020 19:38:46 GMT", + "x-ms-client-request-id" : "3a509a11-f6be-4091-9ecb-138970f2470f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsandfiltertags0664438f7e25c6bfa14/javablobaccountsastagsandfiltertags1162842b923f6472e", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3d975d61-8f0e-4060-8617-effb75824564", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:47.6706369Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:47 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:47 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFDBD6D241", + "Content-Length" : "0", + "x-ms-request-id" : "476ca9e1-401e-004d-37a8-5b5e6e000000", + "x-ms-client-request-id" : "3d975d61-8f0e-4060-8617-effb75824564" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsandfiltertags0664438f7e25c6bfa14/javablobaccountsastagsandfiltertags1162842b923f6472e?comp=tags&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A45Z&sp=rwdxlacuptf&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9761f516-cd93-4b15-91b1-80a4ae15aafa", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "bbe2e0dc-501e-0033-0ca8-5bce29000000", + "Date" : "Thu, 16 Jul 2020 19:38:47 GMT", + "x-ms-client-request-id" : "9761f516-cd93-4b15-91b1-80a4ae15aafa" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsandfiltertags0664438f7e25c6bfa14/javablobaccountsastagsandfiltertags1162842b923f6472e?comp=tags&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A45Z&sp=rwdxlacuptf&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e301b60d-0de7-4194-9cfc-dd844fc1ccd5" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "115", + "StatusCode" : "200", + "x-ms-request-id" : "3514c467-901e-003c-0aa8-5bb845000000", + "Body" : "\nfoobar", + "Date" : "Thu, 16 Jul 2020 19:38:47 GMT", + "x-ms-client-request-id" : "e301b60d-0de7-4194-9cfc-dd844fc1ccd5", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?where=%22foo%22%3D%27bar%27&comp=blobs&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A45Z&sp=rwdxlacuptf&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ca88ac27-badf-48eb-a364-012194af1207" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "3f0ac22d-901e-005e-28a8-5b7a62000000", + "Body" : "\n"foo"='bar'javablobblobsastags1sasclienttestsblobsastags1ef19675f401bjtcblobsastags0sasclienttestsblobsastags1ef593344e69a9dbarjavablobblobsastags1sasclienttestsblobsastags70e11988abfd2jtcblobsastags0sasclienttestsblobsastags70e56833edf2ef0barjavablobblobsastags1sasclienttestsblobsastagse8e90717362b3jtcblobsastags0sasclienttestsblobsastagse8e651980254ccebarjavablobblobsastags1sasclienttestsblobsastagsf02771557bdbdjtcblobsastags0sasclienttestsblobsastagsf02980775d75801barjavablobcontainersastags10764719af29be268840dejtccontainersastags0sasclienttestscontainersastags87b172982dbarjavablobsettagsmin1blobapitestsettagsmin2c313129f24be84jtcsettagsmin0blobapitestsettagsmin2c36519443eeef9404barjavablobsettagsmin1blobapitestsettagsmin87470634e0fb862jtcsettagsmin0blobapitestsettagsmin87402170e74755464bbarjavablobsettagsmin1blobapitestsettagsminbec8245083f11c1jtcsettagsmin0blobapitestsettagsminbec9974136ad9b0b63bar", + "Date" : "Thu, 16 Jul 2020 19:38:47 GMT", + "x-ms-client-request-id" : "ca88ac27-badf-48eb-a364-012194af1207", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsastagsandfiltertags&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b9bdc013-af0c-4fcd-ab68-a0015553e864" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4cfb6e32-c01e-0043-0ba8-5b77de000000", + "Body" : "jtcaccountsastagsandfiltertagsjtcaccountsastagsandfiltertags0664438f7e25c6bfa14Thu, 16 Jul 2020 19:38:47 GMT\"0x8D829BFDBA22445\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:48 GMT", + "x-ms-client-request-id" : "b9bdc013-af0c-4fcd-ab68-a0015553e864", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsandfiltertags0664438f7e25c6bfa14?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "366fdd0c-b414-4178-8454-11eae11abee4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "6369d895-601e-0028-4da8-5bf02a000000", + "Date" : "Thu, 16 Jul 2020 19:38:49 GMT", + "x-ms-client-request-id" : "366fdd0c-b414-4178-8454-11eae11abee4" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsastagsandfiltertags0664438f7e25c6bfa14", "javablobaccountsastagsandfiltertags1162842b923f6472e", "2020-07-16T19:38:45.943021500Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsfail.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsfail.json new file mode 100644 index 000000000000..e39d268df809 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsfail.json @@ -0,0 +1,114 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfail0sasclienttestsaccountsastagsfail5dd53599?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "abc92dbd-28e6-47bf-b18f-3d42020dd10e" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFDD1D6650", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "91e84112-401e-0072-70a8-5b96cd000000", + "Date" : "Thu, 16 Jul 2020 19:38:49 GMT", + "x-ms-client-request-id" : "abc92dbd-28e6-47bf-b18f-3d42020dd10e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfail0sasclienttestsaccountsastagsfail5dd53599/javablobaccountsastagsfail1176352900f01905474d6", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eeeccfb5-4fc4-4973-8475-914fb56fd543", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:50.1624039Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:50 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:49 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFDD5308E7", + "Content-Length" : "0", + "x-ms-request-id" : "7ef0b12a-301e-0057-60a8-5b3fb1000000", + "x-ms-client-request-id" : "eeeccfb5-4fc4-4973-8475-914fb56fd543" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfail0sasclienttestsaccountsastagsfail5dd53599/javablobaccountsastagsfail1176352900f01905474d6?comp=tags&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T19%3A38%3A48Z&sp=rwdxlacupf&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "879c6fac-afb7-44dc-abcb-62cadb1d174e", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "280", + "StatusCode" : "403", + "x-ms-request-id" : "cb8e2c6c-b01e-0014-50a8-5bd9ed000000", + "Body" : "\nAuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:cb8e2c6c-b01e-0014-50a8-5bd9ed000000\nTime:2020-07-16T19:38:50.5196036Z", + "Date" : "Thu, 16 Jul 2020 19:38:50 GMT", + "x-ms-client-request-id" : "879c6fac-afb7-44dc-abcb-62cadb1d174e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsastagsfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9e9b752-a2eb-4e35-8c29-51694a75347b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "14b7807f-101e-0022-16a8-5b549d000000", + "Body" : "jtcaccountsastagsfailjtcaccountsastagsfail0sasclienttestsaccountsastagsfail5dd53599Thu, 16 Jul 2020 19:38:49 GMT\"0x8D829BFDD1D6650\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:50 GMT", + "x-ms-client-request-id" : "d9e9b752-a2eb-4e35-8c29-51694a75347b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfail0sasclienttestsaccountsastagsfail5dd53599?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c17a0886-228d-45d4-b6c0-c214ebb573b8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "1cd138ec-e01e-006b-67a8-5b1676000000", + "Date" : "Thu, 16 Jul 2020 19:38:50 GMT", + "x-ms-client-request-id" : "c17a0886-228d-45d4-b6c0-c214ebb573b8" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsastagsfail0sasclienttestsaccountsastagsfail5dd53599", "javablobaccountsastagsfail1176352900f01905474d6", "2020-07-16T19:38:48.383310600Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsfiltertags.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsfiltertags.json new file mode 100644 index 000000000000..8289d15bbbf0 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsastagsfiltertags.json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfiltertags0501679983144c199a4af?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "925b285f-dc48-4799-b1a5-a51d8d0c9756" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829A4E09B40D1", + "Last-Modified" : "Thu, 16 Jul 2020 16:25:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "049980a9-801e-0052-218d-5bed6a000000", + "Date" : "Thu, 16 Jul 2020 16:25:38 GMT", + "x-ms-client-request-id" : "925b285f-dc48-4799-b1a5-a51d8d0c9756" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfiltertags0501679983144c199a4af/javablobaccountsastagsfiltertags120435c44b199d9c96", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e92a8fd-4961-4fb6-8737-dcf110b8aa9c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T16:25:40.1217454Z", + "Last-Modified" : "Thu, 16 Jul 2020 16:25:40 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 16:25:39 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829A4E11F2DAE", + "Content-Length" : "0", + "x-ms-request-id" : "55a9a6ad-101e-00a4-438d-5b9824000000", + "x-ms-client-request-id" : "6e92a8fd-4961-4fb6-8737-dcf110b8aa9c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfiltertags0501679983144c199a4af/javablobaccountsastagsfiltertags120435c44b199d9c96?comp=tags&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T16%3A25%3A40Z&sp=rwdxlacuptf&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5eca120b-8dfa-4a40-8896-41d5492ae204", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "fc658a19-f01e-002a-088d-5b4e92000000", + "Date" : "Thu, 16 Jul 2020 16:25:40 GMT", + "x-ms-client-request-id" : "5eca120b-8dfa-4a40-8896-41d5492ae204" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfiltertags0501679983144c199a4af/javablobaccountsastagsfiltertags120435c44b199d9c96?comp=tags&sv=2019-12-12&ss=b&srt=sco&se=2020-07-17T16%3A25%3A40Z&sp=rwdxlacuptf&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a196801-edb8-4b92-97b0-81bdda1f32fc" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "115", + "StatusCode" : "200", + "x-ms-request-id" : "9cd18d93-301e-00a3-448d-5bf447000000", + "Body" : "\nfooUkVEQUNURUQ=", + "Date" : "Thu, 16 Jul 2020 16:25:40 GMT", + "x-ms-client-request-id" : "0a196801-edb8-4b92-97b0-81bdda1f32fc", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcaccountsastagsfiltertags&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe0b64ac-1ad6-4b8e-9051-a954a88f843d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d469e83d-b01e-0059-158d-5b1601000000", + "Body" : "jtcaccountsastagsfiltertagsjtcaccountsastagsfiltertags0501679983144c199a4afThu, 16 Jul 2020 16:25:39 GMT\"0x8D829A4E09B40D1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 16:25:41 GMT", + "x-ms-client-request-id" : "fe0b64ac-1ad6-4b8e-9051-a954a88f843d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcaccountsastagsfiltertags0501679983144c199a4af?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "083cf5f0-141c-4091-aa62-307db1d27522" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "f37f5dc0-d01e-0002-098d-5b2f3a000000", + "Date" : "Thu, 16 Jul 2020 16:25:41 GMT", + "x-ms-client-request-id" : "083cf5f0-141c-4091-aa62-307db1d27522" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsastagsfiltertags0501679983144c199a4af", "javablobaccountsastagsfiltertags120435c44b199d9c96", "2020-07-16T16:25:40.025599500Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[0].json new file mode 100644 index 000000000000..c795558b9437 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[0].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource00822474285e5cc?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1ce2a313-d047-449f-a702-3d71a9aaf541" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFFC15A237", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "e53fd237-b01e-0004-4aa8-5b1c85000000", + "Date" : "Thu, 16 Jul 2020 19:39:41 GMT", + "x-ms-client-request-id" : "1ce2a313-d047-449f-a702-3d71a9aaf541" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource00822474285e5cc/javablobblobsasimplutilcanonicalizedresource1152600633c2", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "088d2f7e-cbbd-4ef8-9644-8318cfbe5643", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:39:42.1174001Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:42 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:39:41 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFFC4ABCF1", + "Content-Length" : "0", + "x-ms-request-id" : "88c8db51-101e-0050-65a8-5b53d2000000", + "x-ms-client-request-id" : "088d2f7e-cbbd-4ef8-9644-8318cfbe5643" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilcanonicalizedresource&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87b5840a-fb89-4403-b913-6593f71f1d88" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "4b330800-701e-00a2-72a8-5bab9b000000", + "Body" : "jtcblobsasimplutilcanonicalizedresourcejtcblobsasimplutilcanonicalizedresource00822474285e5ccThu, 16 Jul 2020 19:39:41 GMT\"0x8D829BFFC15A237\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:41 GMT", + "x-ms-client-request-id" : "87b5840a-fb89-4403-b913-6593f71f1d88", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource00822474285e5cc?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "482b80bb-11fd-43a3-8cb2-39ae9a6323b9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "32ddb457-f01e-0083-6ca8-5b8fe0000000", + "Date" : "Thu, 16 Jul 2020 19:39:42 GMT", + "x-ms-client-request-id" : "482b80bb-11fd-43a3-8cb2-39ae9a6323b9" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilcanonicalizedresource00822474285e5cc", "javablobblobsasimplutilcanonicalizedresource1152600633c2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[1].json new file mode 100644 index 000000000000..e3b507f0051f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[1].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource077602211425373?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "42f0c6ec-5174-4701-b614-6dc246d49435" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFFCE7AE0A", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c3122ea3-a01e-006a-6da8-5b49aa000000", + "Date" : "Thu, 16 Jul 2020 19:39:42 GMT", + "x-ms-client-request-id" : "42f0c6ec-5174-4701-b614-6dc246d49435" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource077602211425373/javablobblobsasimplutilcanonicalizedresource186754b67dd9", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8a159cdd-74db-40aa-acc3-c8077993396f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:39:43.4993831Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:43 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:39:42 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFFD1D9CA7", + "Content-Length" : "0", + "x-ms-request-id" : "f3dd76b0-d01e-0002-52a8-5b2f3a000000", + "x-ms-client-request-id" : "8a159cdd-74db-40aa-acc3-c8077993396f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilcanonicalizedresource&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32a02341-cb58-47bc-895e-876d0e154b8f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f6ebb7c2-701e-009d-55a8-5b6338000000", + "Body" : "jtcblobsasimplutilcanonicalizedresourcejtcblobsasimplutilcanonicalizedresource077602211425373Thu, 16 Jul 2020 19:39:43 GMT\"0x8D829BFFCE7AE0A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:43 GMT", + "x-ms-client-request-id" : "32a02341-cb58-47bc-895e-876d0e154b8f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource077602211425373?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5349061d-79d5-4103-a638-291809f07371" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "6f440100-c01e-000e-6ba8-5bb832000000", + "Date" : "Thu, 16 Jul 2020 19:39:43 GMT", + "x-ms-client-request-id" : "5349061d-79d5-4103-a638-291809f07371" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilcanonicalizedresource077602211425373", "javablobblobsasimplutilcanonicalizedresource186754b67dd9" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[2].json new file mode 100644 index 000000000000..c35c57bfac52 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilcanonicalizedresource[2].json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource0102954d3ebe375?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7778dae3-1faf-4a32-bf1a-b4321962d6cd" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFFDBDCEC7", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "597be539-801e-006d-5ba8-5b25c9000000", + "Date" : "Thu, 16 Jul 2020 19:39:44 GMT", + "x-ms-client-request-id" : "7778dae3-1faf-4a32-bf1a-b4321962d6cd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource0102954d3ebe375/javablobblobsasimplutilcanonicalizedresource1204582376e7", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a5d13d3a-1ba7-4493-aa54-484b1af05588", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:39:44.8903737Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:44 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:39:44 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFFDF1DC39", + "Content-Length" : "0", + "x-ms-request-id" : "6f50802c-c01e-007c-3ca8-5bbf7d000000", + "x-ms-client-request-id" : "a5d13d3a-1ba7-4493-aa54-484b1af05588" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilcanonicalizedresource&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "167e0062-0b5d-4ecc-b08a-3b1fae2eb890" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "aa380b1b-401e-0000-07a8-5b9182000000", + "Body" : "jtcblobsasimplutilcanonicalizedresourcejtcblobsasimplutilcanonicalizedresource0102954d3ebe375Thu, 16 Jul 2020 19:39:44 GMT\"0x8D829BFFDBDCEC7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:44 GMT", + "x-ms-client-request-id" : "167e0062-0b5d-4ecc-b08a-3b1fae2eb890", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilcanonicalizedresource0102954d3ebe375?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1152bc12-4a35-4b1c-beb9-0bc63a9d2a28" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "55f14e2a-101e-00a4-21a8-5b9824000000", + "Date" : "Thu, 16 Jul 2020 19:39:45 GMT", + "x-ms-client-request-id" : "1152bc12-4a35-4b1c-beb9-0bc63a9d2a28" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilcanonicalizedresource0102954d3ebe375", "javablobblobsasimplutilcanonicalizedresource1204582376e7" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[0].json index 9d797981dfa7..23d2ad7d3047 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[0].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign043642b25faf12935b4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0084732ddbab0bba854?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "34403bbf-6e69-4913-af9b-90f750a7cb97" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "19992ba7-1595-41fe-8c9e-051a7e40f18a" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BD437970", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:59 GMT", + "ETag" : "0x8D829BFE570384A", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:03 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "2792471c-f01e-005f-39f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "x-ms-client-request-id" : "34403bbf-6e69-4913-af9b-90f750a7cb97" + "x-ms-request-id" : "208e7fc9-a01e-008e-6ba8-5b4734000000", + "Date" : "Thu, 16 Jul 2020 19:39:02 GMT", + "x-ms-client-request-id" : "19992ba7-1595-41fe-8c9e-051a7e40f18a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign043642b25faf12935b4/javablobblobsasimplutilstringtosign165133e98dd887f9e", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0084732ddbab0bba854/javablobblobsasimplutilstringtosign185298c645ac57404", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "77cf9610-d2b4-4a82-9983-32b3de5a612a", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e3d7bd9-9d62-41b6-b4e3-1a5f812489df", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:59.6902380Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:59 GMT", + "x-ms-version-id" : "2020-07-16T19:39:04.1373519Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:04 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:03 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BD51B7EC", + "ETag" : "0x8D829BFE5A74A3A", "Content-Length" : "0", - "x-ms-request-id" : "fd65c9bf-c01e-007b-16f2-39b4bd000000", - "x-ms-client-request-id" : "77cf9610-d2b4-4a82-9983-32b3de5a612a" + "x-ms-request-id" : "24fe8085-e01e-00a0-66a8-5b1523000000", + "x-ms-client-request-id" : "9e3d7bd9-9d62-41b6-b4e3-1a5f812489df" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "03fe344e-6ecd-4032-9a6a-7eb3abd9a938" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e5c042cf-b181-4c08-9c3e-b3d97d986d15" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "2792477d-f01e-005f-0bf2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign043642b25faf12935b4Wed, 03 Jun 2020 22:01:59 GMT\"0x8D80809BD437970\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", - "x-ms-client-request-id" : "03fe344e-6ecd-4032-9a6a-7eb3abd9a938", + "x-ms-request-id" : "cb89ce33-101e-001d-4aa8-5b9c3e000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0084732ddbab0bba854Thu, 16 Jul 2020 19:39:03 GMT\"0x8D829BFE570384A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:03 GMT", + "x-ms-client-request-id" : "e5c042cf-b181-4c08-9c3e-b3d97d986d15", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign043642b25faf12935b4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0084732ddbab0bba854?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "499f81fa-7500-4ced-94d5-428e22e21128" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ebf0d671-263e-46ee-a5c9-f0029a9f8f9c" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65ca0f-c01e-007b-50f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", - "x-ms-client-request-id" : "499f81fa-7500-4ced-94d5-428e22e21128" + "x-ms-request-id" : "c0a38922-001e-003e-13a8-5b06fd000000", + "Date" : "Thu, 16 Jul 2020 19:39:04 GMT", + "x-ms-client-request-id" : "ebf0d671-263e-46ee-a5c9-f0029a9f8f9c" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign043642b25faf12935b4", "javablobblobsasimplutilstringtosign165133e98dd887f9e" ] + "variables" : [ "jtcblobsasimplutilstringtosign0084732ddbab0bba854", "javablobblobsasimplutilstringtosign185298c645ac57404" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[10].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[10].json index ac59d3536a1a..d368b9a42ea6 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[10].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[10].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign067288e31375e649b84?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0191361c75936ff1ae4?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "cea4678d-65d2-4950-a2c6-cbc0d99d79bc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65c4e378-e19d-462a-97c3-266e8124c965" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BF707E49", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:03 GMT", + "ETag" : "0x8D829BFEDC5ECBA", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:17 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "2792508b-f01e-005f-06f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", - "x-ms-client-request-id" : "cea4678d-65d2-4950-a2c6-cbc0d99d79bc" + "x-ms-request-id" : "da3108e7-101e-007f-72a8-5b5e19000000", + "Date" : "Thu, 16 Jul 2020 19:39:17 GMT", + "x-ms-client-request-id" : "65c4e378-e19d-462a-97c3-266e8124c965" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign067288e31375e649b84/javablobblobsasimplutilstringtosign1519162727da5efdc", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0191361c75936ff1ae4/javablobblobsasimplutilstringtosign146770585cc7f4234", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8c84fd0c-c371-4e01-b2a7-bc86fcf022dc", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7af44109-de24-4991-ab03-283a6e1c7693", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:03.3387019Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:03 GMT", + "x-ms-version-id" : "2020-07-16T19:39:18.0962925Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:18 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:17 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BF7E6E0B", + "ETag" : "0x8D829BFEDF9686D", "Content-Length" : "0", - "x-ms-request-id" : "fd65cf5f-c01e-007b-0cf2-39b4bd000000", - "x-ms-client-request-id" : "8c84fd0c-c371-4e01-b2a7-bc86fcf022dc" + "x-ms-request-id" : "b3f44f10-201e-0064-4fa8-5b601a000000", + "x-ms-client-request-id" : "7af44109-de24-4991-ab03-283a6e1c7693" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4d07a2b9-b371-4791-834d-ad9c36c46523" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "52475d32-70a4-492b-b50c-e7697c5d434b" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925116-f01e-005f-6df2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign067288e31375e649b84Wed, 03 Jun 2020 22:02:03 GMT\"0x8D80809BF707E49\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", - "x-ms-client-request-id" : "4d07a2b9-b371-4791-834d-ad9c36c46523", + "x-ms-request-id" : "6f43e52b-c01e-000e-17a8-5bb832000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0191361c75936ff1ae4Thu, 16 Jul 2020 19:39:17 GMT\"0x8D829BFEDC5ECBA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:17 GMT", + "x-ms-client-request-id" : "52475d32-70a4-492b-b50c-e7697c5d434b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign067288e31375e649b84?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0191361c75936ff1ae4?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3fce8d8a-786c-4d75-84be-b18415a0db0e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "35881763-afa8-4783-bdb6-c1e26f9a1eca" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65cfab-c01e-007b-4af2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "3fce8d8a-786c-4d75-84be-b18415a0db0e" + "x-ms-request-id" : "c3121745-a01e-006a-2fa8-5b49aa000000", + "Date" : "Thu, 16 Jul 2020 19:39:18 GMT", + "x-ms-client-request-id" : "35881763-afa8-4783-bdb6-c1e26f9a1eca" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign067288e31375e649b84", "javablobblobsasimplutilstringtosign1519162727da5efdc" ] + "variables" : [ "jtcblobsasimplutilstringtosign0191361c75936ff1ae4", "javablobblobsasimplutilstringtosign146770585cc7f4234" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[1].json index 5fd4b34e4160..c1b91262aaaf 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[1].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign09403792d3e518d51b4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0204841788b85c34e94?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "961db65c-ab70-4bf5-b328-2a411b9e4572" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c7b6dbeb-6c60-4e5c-8d15-e5e9fa57874b" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BD7D0E09", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:59 GMT", + "ETag" : "0x8D829BFE64821A8", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:05 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "279247e6-f01e-005f-5ff2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", - "x-ms-client-request-id" : "961db65c-ab70-4bf5-b328-2a411b9e4572" + "x-ms-request-id" : "cecbd3dd-401e-00a9-6da8-5b50f0000000", + "Date" : "Thu, 16 Jul 2020 19:39:04 GMT", + "x-ms-client-request-id" : "c7b6dbeb-6c60-4e5c-8d15-e5e9fa57874b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign09403792d3e518d51b4/javablobblobsasimplutilstringtosign13566143cbb3bf502", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0204841788b85c34e94/javablobblobsasimplutilstringtosign193176c0bd2f4e58e", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "47ac634b-6d8f-4b01-b892-2e83a4ed14fe", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c9917bc-d2e6-4a69-a5e3-eec4d812a1a4", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:00.0575870Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:00 GMT", + "x-ms-version-id" : "2020-07-16T19:39:05.5583679Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:05 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:05 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BD89C57E", + "ETag" : "0x8D829BFE68045BF", "Content-Length" : "0", - "x-ms-request-id" : "fd65ca3e-c01e-007b-74f2-39b4bd000000", - "x-ms-client-request-id" : "47ac634b-6d8f-4b01-b892-2e83a4ed14fe" + "x-ms-request-id" : "19ee85a4-801e-0030-72a8-5b2f4d000000", + "x-ms-client-request-id" : "2c9917bc-d2e6-4a69-a5e3-eec4d812a1a4" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1da5d772-239e-45ac-8eda-a2e083e45cc3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "92c77745-95ea-4efc-be59-39d44dbc36ca" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924860-f01e-005f-42f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign09403792d3e518d51b4Wed, 03 Jun 2020 22:01:59 GMT\"0x8D80809BD7D0E09\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", - "x-ms-client-request-id" : "1da5d772-239e-45ac-8eda-a2e083e45cc3", + "x-ms-request-id" : "41278158-601e-0065-16a8-5b3fc6000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0204841788b85c34e94Thu, 16 Jul 2020 19:39:05 GMT\"0x8D829BFE64821A8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:05 GMT", + "x-ms-client-request-id" : "92c77745-95ea-4efc-be59-39d44dbc36ca", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign09403792d3e518d51b4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0204841788b85c34e94?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "79292414-632c-4dea-813f-a81e1afe7639" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2c36458c-f060-4b17-9a03-b7eb5e41a99d" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65ca84-c01e-007b-25f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "79292414-632c-4dea-813f-a81e1afe7639" + "x-ms-request-id" : "c593581a-801e-000f-03a8-5be7ee000000", + "Date" : "Thu, 16 Jul 2020 19:39:05 GMT", + "x-ms-client-request-id" : "2c36458c-f060-4b17-9a03-b7eb5e41a99d" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign09403792d3e518d51b4", "javablobblobsasimplutilstringtosign13566143cbb3bf502" ] + "variables" : [ "jtcblobsasimplutilstringtosign0204841788b85c34e94", "javablobblobsasimplutilstringtosign193176c0bd2f4e58e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[2].json index 5a3973ef10f2..8cd8f20a40f5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[2].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0603239624b30ae5294?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign049754003c20dc13a34?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "60916e10-7b1d-4932-9b47-20e41653cb81" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f020eca5-525a-4898-b929-06ee9a7b91fa" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BDB5B815", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:00 GMT", + "ETag" : "0x8D829BFE71F2A40", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:06 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "279248d6-f01e-005f-1af2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", - "x-ms-client-request-id" : "60916e10-7b1d-4932-9b47-20e41653cb81" + "x-ms-request-id" : "9453ee3c-c01e-006c-0da8-5b7a15000000", + "Date" : "Thu, 16 Jul 2020 19:39:06 GMT", + "x-ms-client-request-id" : "f020eca5-525a-4898-b929-06ee9a7b91fa" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0603239624b30ae5294/javablobblobsasimplutilstringtosign19002853f9597dfba", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign049754003c20dc13a34/javablobblobsasimplutilstringtosign17799271077bdc9ee", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1ba77aec-d230-46e1-b240-392b74f38688", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0120ac94-f2f4-418f-bc52-8fa7eed16155", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:00.4369457Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:00 GMT", + "x-ms-version-id" : "2020-07-16T19:39:06.9493611Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:06 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:06 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BDC3A831", + "ETag" : "0x8D829BFE754856B", "Content-Length" : "0", - "x-ms-request-id" : "fd65cac3-c01e-007b-58f2-39b4bd000000", - "x-ms-client-request-id" : "1ba77aec-d230-46e1-b240-392b74f38688" + "x-ms-request-id" : "619d2406-201e-0029-18a8-5baff6000000", + "x-ms-client-request-id" : "0120ac94-f2f4-418f-bc52-8fa7eed16155" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "89c1534d-5b74-4d3f-823e-38a3289e9786" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "16d61fbd-a16e-4a18-a2f6-0252bcbb15d1" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924943-f01e-005f-71f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0603239624b30ae5294Wed, 03 Jun 2020 22:02:00 GMT\"0x8D80809BDB5B815\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", - "x-ms-client-request-id" : "89c1534d-5b74-4d3f-823e-38a3289e9786", + "x-ms-request-id" : "ebd900a2-501e-0023-39a8-5b0b41000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign049754003c20dc13a34Thu, 16 Jul 2020 19:39:06 GMT\"0x8D829BFE71F2A40\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:07 GMT", + "x-ms-client-request-id" : "16d61fbd-a16e-4a18-a2f6-0252bcbb15d1", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0603239624b30ae5294?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign049754003c20dc13a34?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2a08e642-4dd2-4949-b272-1bd3d3e05f45" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f563a38c-1e25-436c-87cd-08085dd26758" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65cb08-c01e-007b-15f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "2a08e642-4dd2-4949-b272-1bd3d3e05f45" + "x-ms-request-id" : "9036ce09-d01e-0094-5aa8-5b26eb000000", + "Date" : "Thu, 16 Jul 2020 19:39:07 GMT", + "x-ms-client-request-id" : "f563a38c-1e25-436c-87cd-08085dd26758" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign0603239624b30ae5294", "javablobblobsasimplutilstringtosign19002853f9597dfba" ] + "variables" : [ "jtcblobsasimplutilstringtosign049754003c20dc13a34", "javablobblobsasimplutilstringtosign17799271077bdc9ee" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[3].json index 0980be03daf2..2bd1ca57ed7c 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[3].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign056600d1a4c2b48e084?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign040486d9c657a0e5624?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7bebe4ac-a3b0-4706-a05c-3ac73ad33c16" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ba23eec0-52df-4d30-bccf-83ddea8d5648" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BDEE3AFA", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:00 GMT", + "ETag" : "0x8D829BFE7F87406", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:08 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "279249c4-f01e-005f-53f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "7bebe4ac-a3b0-4706-a05c-3ac73ad33c16" + "x-ms-request-id" : "b0000942-501e-0051-54a8-5b0c0e000000", + "Date" : "Thu, 16 Jul 2020 19:39:08 GMT", + "x-ms-client-request-id" : "ba23eec0-52df-4d30-bccf-83ddea8d5648" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign056600d1a4c2b48e084/javablobblobsasimplutilstringtosign159046c4c1d1eeec6", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign040486d9c657a0e5624/javablobblobsasimplutilstringtosign1873091ff4b66332f", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4585af32-f582-4cd0-b5f3-270bb0580d71", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82cdf46c-aa7c-4980-b4ba-48254dde105b", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:00.8002892Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:00 GMT", + "x-ms-version-id" : "2020-07-16T19:39:08.3443550Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:08 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:07 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BDFB194C", + "ETag" : "0x8D829BFE829615E", "Content-Length" : "0", - "x-ms-request-id" : "fd65cb3c-c01e-007b-42f2-39b4bd000000", - "x-ms-client-request-id" : "4585af32-f582-4cd0-b5f3-270bb0580d71" + "x-ms-request-id" : "24315ec2-001e-005c-62a8-5bc4da000000", + "x-ms-client-request-id" : "82cdf46c-aa7c-4980-b4ba-48254dde105b" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "38eba1ae-22f6-43fc-954d-36981941acdb" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "519471e8-91dd-4eca-af32-8d4898e643ea" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924a50-f01e-005f-3cf2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign056600d1a4c2b48e084Wed, 03 Jun 2020 22:02:00 GMT\"0x8D80809BDEE3AFA\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "38eba1ae-22f6-43fc-954d-36981941acdb", + "x-ms-request-id" : "6f504b8b-c01e-007c-80a8-5bbf7d000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign040486d9c657a0e5624Thu, 16 Jul 2020 19:39:08 GMT\"0x8D829BFE7F87406\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:08 GMT", + "x-ms-client-request-id" : "519471e8-91dd-4eca-af32-8d4898e643ea", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign056600d1a4c2b48e084?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign040486d9c657a0e5624?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "03a2f13e-b67f-4060-962d-b144c8c2ba4a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "668c411b-578f-4e98-b72b-56b0f6950e50" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65cb5e-c01e-007b-60f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "03a2f13e-b67f-4060-962d-b144c8c2ba4a" + "x-ms-request-id" : "b2d9d61c-f01e-003a-34a8-5b8bfa000000", + "Date" : "Thu, 16 Jul 2020 19:39:08 GMT", + "x-ms-client-request-id" : "668c411b-578f-4e98-b72b-56b0f6950e50" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign056600d1a4c2b48e084", "javablobblobsasimplutilstringtosign159046c4c1d1eeec6" ] + "variables" : [ "jtcblobsasimplutilstringtosign040486d9c657a0e5624", "javablobblobsasimplutilstringtosign1873091ff4b66332f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[4].json index 224b1fbdaf74..4200d345c0c7 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[4].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign056629b19206b5b1a64?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0149720e34455e43154?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2df048a2-6b14-4aa3-8879-8fb7228a1d59" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "352b74e1-f782-4f02-9b7f-6f1483ffd4d3" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BE227715", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:01 GMT", + "ETag" : "0x8D829BFE8CB61B5", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:09 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27924ab6-f01e-005f-03f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "2df048a2-6b14-4aa3-8879-8fb7228a1d59" + "x-ms-request-id" : "ecb3a267-701e-000b-0ea8-5b6ae9000000", + "Date" : "Thu, 16 Jul 2020 19:39:09 GMT", + "x-ms-client-request-id" : "352b74e1-f782-4f02-9b7f-6f1483ffd4d3" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign056629b19206b5b1a64/javablobblobsasimplutilstringtosign1991155f753d6d2f5", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0149720e34455e43154/javablobblobsasimplutilstringtosign12758678189a95334", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "39ee02c8-f760-45a4-9733-8be719246dd8", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9af2be6-55ee-4df9-af6c-9b0e445a9b2d", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:01.1856546Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:01 GMT", + "x-ms-version-id" : "2020-07-16T19:39:09.7663675Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:09 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:09 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BE35BF88", + "ETag" : "0x8D829BFE9025CBB", "Content-Length" : "0", - "x-ms-request-id" : "fd65cb94-c01e-007b-0df2-39b4bd000000", - "x-ms-client-request-id" : "39ee02c8-f760-45a4-9733-8be719246dd8" + "x-ms-request-id" : "8a7b2e15-101e-0040-46a8-5b96ba000000", + "x-ms-client-request-id" : "c9af2be6-55ee-4df9-af6c-9b0e445a9b2d" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6a543be3-042a-4dc5-8763-b9cefcbe2d5c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "645b8eba-8e8d-475a-82f7-ae564e2a7316" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924b52-f01e-005f-7af2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign056629b19206b5b1a64Wed, 03 Jun 2020 22:02:01 GMT\"0x8D80809BE227715\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "6a543be3-042a-4dc5-8763-b9cefcbe2d5c", + "x-ms-request-id" : "f6eb8b38-701e-009d-4ca8-5b6338000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0149720e34455e43154Thu, 16 Jul 2020 19:39:09 GMT\"0x8D829BFE8CB61B5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:10 GMT", + "x-ms-client-request-id" : "645b8eba-8e8d-475a-82f7-ae564e2a7316", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign056629b19206b5b1a64?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0149720e34455e43154?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "76a264a3-88d9-4290-b75a-9647c7cc2617" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d64e03ec-0628-453b-8893-2eb9a4d8e062" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65cbf0-c01e-007b-58f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", - "x-ms-client-request-id" : "76a264a3-88d9-4290-b75a-9647c7cc2617" + "x-ms-request-id" : "32dd5f45-f01e-0083-7aa8-5b8fe0000000", + "Date" : "Thu, 16 Jul 2020 19:39:10 GMT", + "x-ms-client-request-id" : "d64e03ec-0628-453b-8893-2eb9a4d8e062" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign056629b19206b5b1a64", "javablobblobsasimplutilstringtosign1991155f753d6d2f5" ] + "variables" : [ "jtcblobsasimplutilstringtosign0149720e34455e43154", "javablobblobsasimplutilstringtosign12758678189a95334" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[5].json index dd36c8e1370e..802c442d62be 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[5].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0959883618a4ddca194?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign048571fbc0abf4c0794?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "798abe93-0000-4417-afb2-bcfadc55ed2d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ee31d0bd-5db7-4bc3-9bc1-316f1992e41b" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BE5F40CE", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:01 GMT", + "ETag" : "0x8D829BFE99F87B1", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:10 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27924bd1-f01e-005f-5af2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "798abe93-0000-4417-afb2-bcfadc55ed2d" + "x-ms-request-id" : "e53faf2a-b01e-0004-23a8-5b1c85000000", + "Date" : "Thu, 16 Jul 2020 19:39:10 GMT", + "x-ms-client-request-id" : "ee31d0bd-5db7-4bc3-9bc1-316f1992e41b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0959883618a4ddca194/javablobblobsasimplutilstringtosign1638103eac0276091", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign048571fbc0abf4c0794/javablobblobsasimplutilstringtosign161856192c453dba1", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "32c51ecc-5499-4f67-bac6-9d5f0a32207e", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "949f7a01-3fcc-430c-a2bd-7539b656922b", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:01.5389909Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:01 GMT", + "x-ms-version-id" : "2020-07-16T19:39:11.1213311Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:11 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:11 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BE6BD0D5", + "ETag" : "0x8D829BFE9D11CFF", "Content-Length" : "0", - "x-ms-request-id" : "fd65cc51-c01e-007b-20f2-39b4bd000000", - "x-ms-client-request-id" : "32c51ecc-5499-4f67-bac6-9d5f0a32207e" + "x-ms-request-id" : "8ff92202-601e-0075-13a8-5bfaae000000", + "x-ms-client-request-id" : "949f7a01-3fcc-430c-a2bd-7539b656922b" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "99db718d-e5cb-4477-ad6c-05acd8c689f2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7ee70667-7e0a-409f-960e-f0e029348ed6" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924c2f-f01e-005f-20f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0959883618a4ddca194Wed, 03 Jun 2020 22:02:01 GMT\"0x8D80809BE5F40CE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:00 GMT", - "x-ms-client-request-id" : "99db718d-e5cb-4477-ad6c-05acd8c689f2", + "x-ms-request-id" : "afeebbbe-801e-001f-1fa8-5b2286000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign048571fbc0abf4c0794Thu, 16 Jul 2020 19:39:10 GMT\"0x8D829BFE99F87B1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:10 GMT", + "x-ms-client-request-id" : "7ee70667-7e0a-409f-960e-f0e029348ed6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0959883618a4ddca194?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign048571fbc0abf4c0794?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9105af03-c269-4313-9426-e8b7b750ebbc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6f57f6b5-e921-4f89-bee8-5e5aa7d701b4" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65ccac-c01e-007b-65f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", - "x-ms-client-request-id" : "9105af03-c269-4313-9426-e8b7b750ebbc" + "x-ms-request-id" : "e772accb-201e-0090-69a8-5babec000000", + "Date" : "Thu, 16 Jul 2020 19:39:10 GMT", + "x-ms-client-request-id" : "6f57f6b5-e921-4f89-bee8-5e5aa7d701b4" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign0959883618a4ddca194", "javablobblobsasimplutilstringtosign1638103eac0276091" ] + "variables" : [ "jtcblobsasimplutilstringtosign048571fbc0abf4c0794", "javablobblobsasimplutilstringtosign161856192c453dba1" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[6].json index 47015f83b89e..9c4062ada37a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[6].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign057230a2df05bc90aa4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0032149922ae1732314?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "96ce2671-5c8f-45f2-9c73-1a487ad81a37" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c432aa31-94a5-4170-96d6-086936922021" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BE97EAD1", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:01 GMT", + "ETag" : "0x8D829BFEA71B64F", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:12 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27924cb2-f01e-005f-07f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", - "x-ms-client-request-id" : "96ce2671-5c8f-45f2-9c73-1a487ad81a37" + "x-ms-request-id" : "a9c54e1e-801e-0089-01a8-5b2b57000000", + "Date" : "Thu, 16 Jul 2020 19:39:11 GMT", + "x-ms-client-request-id" : "c432aa31-94a5-4170-96d6-086936922021" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign057230a2df05bc90aa4/javablobblobsasimplutilstringtosign139565be28880a684", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0032149922ae1732314/javablobblobsasimplutilstringtosign17094884352a6030c", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "69636fe8-3b05-4196-bf3f-acc6fdf6ac01", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8e49cab3-6d85-4eb9-aba5-f87b46326707", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:01.9243581Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:01 GMT", + "x-ms-version-id" : "2020-07-16T19:39:12.5343374Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:12 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:11 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BEA67728", + "ETag" : "0x8D829BFEAA89182", "Content-Length" : "0", - "x-ms-request-id" : "fd65cce2-c01e-007b-12f2-39b4bd000000", - "x-ms-client-request-id" : "69636fe8-3b05-4196-bf3f-acc6fdf6ac01" + "x-ms-request-id" : "09ffcc36-301e-0047-1aa8-5bfad9000000", + "x-ms-client-request-id" : "8e49cab3-6d85-4eb9-aba5-f87b46326707" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a3343439-3821-4adb-bac6-15b994fbdfac" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bec68e88-dc40-41a9-901a-41586d999766" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924d31-f01e-005f-67f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign057230a2df05bc90aa4Wed, 03 Jun 2020 22:02:01 GMT\"0x8D80809BE97EAD1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", - "x-ms-client-request-id" : "a3343439-3821-4adb-bac6-15b994fbdfac", + "x-ms-request-id" : "d7008595-301e-0068-45a8-5bf712000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0032149922ae1732314Thu, 16 Jul 2020 19:39:12 GMT\"0x8D829BFEA71B64F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:12 GMT", + "x-ms-client-request-id" : "bec68e88-dc40-41a9-901a-41586d999766", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign057230a2df05bc90aa4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0032149922ae1732314?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "47ee4686-79c6-4f95-a9a5-d5b20527d67b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7375b1b5-c1b5-4faf-ba2d-a80366e32f0b" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65cd36-c01e-007b-52f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", - "x-ms-client-request-id" : "47ee4686-79c6-4f95-a9a5-d5b20527d67b" + "x-ms-request-id" : "476cce1c-401e-004d-4ea8-5b5e6e000000", + "Date" : "Thu, 16 Jul 2020 19:39:12 GMT", + "x-ms-client-request-id" : "7375b1b5-c1b5-4faf-ba2d-a80366e32f0b" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign057230a2df05bc90aa4", "javablobblobsasimplutilstringtosign139565be28880a684" ] + "variables" : [ "jtcblobsasimplutilstringtosign0032149922ae1732314", "javablobblobsasimplutilstringtosign17094884352a6030c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[7].json index 460ba4a6de27..cb51fc2ce881 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[7].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[7].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign07262923c4460e04f24?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0670738fb70d6325c94?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d1870aee-f0a4-42d3-bdb9-79bc62bf477c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d91d044-fce9-46fb-a927-e6a1a274ff3c" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BED06DB7", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:02 GMT", + "ETag" : "0x8D829BFEB477AB2", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:13 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27924dbb-f01e-005f-51f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", - "x-ms-client-request-id" : "d1870aee-f0a4-42d3-bdb9-79bc62bf477c" + "x-ms-request-id" : "823cad6a-f01e-0093-54a8-5b4a88000000", + "Date" : "Thu, 16 Jul 2020 19:39:13 GMT", + "x-ms-client-request-id" : "6d91d044-fce9-46fb-a927-e6a1a274ff3c" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign07262923c4460e04f24/javablobblobsasimplutilstringtosign197525e120776ab6b", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0670738fb70d6325c94/javablobblobsasimplutilstringtosign192213ef6d607b7dd", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "31d70f40-548a-43cc-acd4-47c7c7f5f8d3", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "528b4cd7-c810-4956-bbe2-8eaacd746eeb", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:02.2796964Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:02 GMT", + "x-ms-version-id" : "2020-07-16T19:39:13.9383362Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:13 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:13 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BEDCD6A4", + "ETag" : "0x8D829BFEB7EF442", "Content-Length" : "0", - "x-ms-request-id" : "fd65cd7e-c01e-007b-07f2-39b4bd000000", - "x-ms-client-request-id" : "31d70f40-548a-43cc-acd4-47c7c7f5f8d3" + "x-ms-request-id" : "3514e379-901e-003c-5ca8-5bb845000000", + "x-ms-client-request-id" : "528b4cd7-c810-4956-bbe2-8eaacd746eeb" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "40618c3b-bf1a-4f73-af71-ea555103ae08" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "228c7945-23fd-48f8-ac07-99a39d677058" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924e2a-f01e-005f-28f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign07262923c4460e04f24Wed, 03 Jun 2020 22:02:02 GMT\"0x8D80809BED06DB7\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", - "x-ms-client-request-id" : "40618c3b-bf1a-4f73-af71-ea555103ae08", + "x-ms-request-id" : "3f0aefd3-901e-005e-4fa8-5b7a62000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0670738fb70d6325c94Thu, 16 Jul 2020 19:39:13 GMT\"0x8D829BFEB477AB2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:14 GMT", + "x-ms-client-request-id" : "228c7945-23fd-48f8-ac07-99a39d677058", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign07262923c4460e04f24?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0670738fb70d6325c94?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f2f8d97b-f0f4-4fdf-b6c4-1f1278bace27" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "43fa5c9d-5e2e-4bfb-81ad-a5c9d70abcf7" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65cdb9-c01e-007b-37f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", - "x-ms-client-request-id" : "f2f8d97b-f0f4-4fdf-b6c4-1f1278bace27" + "x-ms-request-id" : "4cfbb40c-c01e-0043-27a8-5b77de000000", + "Date" : "Thu, 16 Jul 2020 19:39:13 GMT", + "x-ms-client-request-id" : "43fa5c9d-5e2e-4bfb-81ad-a5c9d70abcf7" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign07262923c4460e04f24", "javablobblobsasimplutilstringtosign197525e120776ab6b" ] + "variables" : [ "jtcblobsasimplutilstringtosign0670738fb70d6325c94", "javablobblobsasimplutilstringtosign192213ef6d607b7dd" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[8].json index 9f4e593e9c83..68914e58ecc1 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[8].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[8].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0468291e44d783580b4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0835409dc783bae2384?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "af796178-d2c2-404e-97b9-bbc4240e06f5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e58f23d-3411-4be6-b8f3-78c59534cdd5" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BF0349F4", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:02 GMT", + "ETag" : "0x8D829BFEC1C6247", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:14 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27924e96-f01e-005f-7af2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:01 GMT", - "x-ms-client-request-id" : "af796178-d2c2-404e-97b9-bbc4240e06f5" + "x-ms-request-id" : "636a07a0-601e-0028-39a8-5bf02a000000", + "Date" : "Thu, 16 Jul 2020 19:39:14 GMT", + "x-ms-client-request-id" : "2e58f23d-3411-4be6-b8f3-78c59534cdd5" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0468291e44d783580b4/javablobblobsasimplutilstringtosign11590492f820346aa", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0835409dc783bae2384/javablobblobsasimplutilstringtosign1490891727f4534e8", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dc856468-2f76-4076-8dfb-3e6bae80245b", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f9d6679-2b4f-4a42-858d-5a025aa1c242", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:02.6220222Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:02 GMT", + "x-ms-version-id" : "2020-07-16T19:39:15.3223175Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:15 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:14 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BF1112BE", + "ETag" : "0x8D829BFEC522207", "Content-Length" : "0", - "x-ms-request-id" : "fd65ce17-c01e-007b-07f2-39b4bd000000", - "x-ms-client-request-id" : "dc856468-2f76-4076-8dfb-3e6bae80245b" + "x-ms-request-id" : "91e870d6-401e-0072-6fa8-5b96cd000000", + "x-ms-client-request-id" : "4f9d6679-2b4f-4a42-858d-5a025aa1c242" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a262e69d-294b-4b78-935a-3d7884230afa" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5072ea0f-d407-4d1c-b8b7-e98957ea4f77" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924efa-f01e-005f-49f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0468291e44d783580b4Wed, 03 Jun 2020 22:02:02 GMT\"0x8D80809BF0349F4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", - "x-ms-client-request-id" : "a262e69d-294b-4b78-935a-3d7884230afa", + "x-ms-request-id" : "7ef0d171-301e-0057-6ea8-5b3fb1000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0835409dc783bae2384Thu, 16 Jul 2020 19:39:14 GMT\"0x8D829BFEC1C6247\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:15 GMT", + "x-ms-client-request-id" : "5072ea0f-d407-4d1c-b8b7-e98957ea4f77", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0468291e44d783580b4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0835409dc783bae2384?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b53f9de0-432d-426d-b70e-58eca3c98757" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "33cab943-35cd-40e3-a2a4-cfe0569e219b" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65ce68-c01e-007b-48f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", - "x-ms-client-request-id" : "b53f9de0-432d-426d-b70e-58eca3c98757" + "x-ms-request-id" : "cb8e5396-b01e-0014-11a8-5bd9ed000000", + "Date" : "Thu, 16 Jul 2020 19:39:15 GMT", + "x-ms-client-request-id" : "33cab943-35cd-40e3-a2a4-cfe0569e219b" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign0468291e44d783580b4", "javablobblobsasimplutilstringtosign11590492f820346aa" ] + "variables" : [ "jtcblobsasimplutilstringtosign0835409dc783bae2384", "javablobblobsasimplutilstringtosign1490891727f4534e8" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[9].json index 9e12382aeec0..bae0828939c5 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[9].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[9].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0932370e8416cf3b254?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign058143f10744644c3d4?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "038e69e0-4873-4646-96ae-9a680e82703c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9849e9e-4aff-49cb-993c-b069e9f8c58b" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BF39D08E", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:02 GMT", + "ETag" : "0x8D829BFECF1D7A2", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:16 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27924f7d-f01e-005f-34f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", - "x-ms-client-request-id" : "038e69e0-4873-4646-96ae-9a680e82703c" + "x-ms-request-id" : "14b7a4bd-101e-0022-53a8-5b549d000000", + "Date" : "Thu, 16 Jul 2020 19:39:15 GMT", + "x-ms-client-request-id" : "a9849e9e-4aff-49cb-993c-b069e9f8c58b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0932370e8416cf3b254/javablobblobsasimplutilstringtosign16925411017502cea", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign058143f10744644c3d4/javablobblobsasimplutilstringtosign168852dae3af26be7", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6b421d11-a957-41f9-8a8c-3e247612c98a", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "db8381f1-a86b-4671-abf3-7fc1638d7e98", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:02.9743579Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:02 GMT", + "x-ms-version-id" : "2020-07-16T19:39:16.6922929Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:16 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:15 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BF46D5DB", + "ETag" : "0x8D829BFED232CB1", "Content-Length" : "0", - "x-ms-request-id" : "fd65cebc-c01e-007b-0bf2-39b4bd000000", - "x-ms-client-request-id" : "6b421d11-a957-41f9-8a8c-3e247612c98a" + "x-ms-request-id" : "1cd16050-e01e-006b-38a8-5b1676000000", + "x-ms-client-request-id" : "db8381f1-a86b-4671-abf3-7fc1638d7e98" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8ce19bf1-ca10-4fc1-b5dd-08187efe7176" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "77688b0d-66d5-4e3c-ae29-a19e6c3a2a5c" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27924ffd-f01e-005f-1cf2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0932370e8416cf3b254Wed, 03 Jun 2020 22:02:02 GMT\"0x8D80809BF39D08E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", - "x-ms-client-request-id" : "8ce19bf1-ca10-4fc1-b5dd-08187efe7176", + "x-ms-request-id" : "aa37d982-401e-0000-1fa8-5b9182000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign058143f10744644c3d4Thu, 16 Jul 2020 19:39:16 GMT\"0x8D829BFECF1D7A2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:16 GMT", + "x-ms-client-request-id" : "77688b0d-66d5-4e3c-ae29-a19e6c3a2a5c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign0932370e8416cf3b254?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosign058143f10744644c3d4?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7a4e8ab5-e097-438c-beff-e07d4b0657b4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9893e4d-c2f4-4dff-aace-f0e3af153416" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65cf01-c01e-007b-40f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "7a4e8ab5-e097-438c-beff-e07d4b0657b4" + "x-ms-request-id" : "34c53701-e01e-0036-7fa8-5b1cf2000000", + "Date" : "Thu, 16 Jul 2020 19:39:16 GMT", + "x-ms-client-request-id" : "f9893e4d-c2f4-4dff-aace-f0e3af153416" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosign0932370e8416cf3b254", "javablobblobsasimplutilstringtosign16925411017502cea" ] + "variables" : [ "jtcblobsasimplutilstringtosign058143f10744644c3d4", "javablobblobsasimplutilstringtosign168852dae3af26be7" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[0].json index f517c9908d4a..b7c5ff7e62dd 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[0].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[0].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0384989fcee?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0979476c054?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0f191001-6bd2-483c-b4af-9d57a418ab7f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7db90b6b-ccb4-44bb-bc9c-8547884ba8b7" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BFA83DAF", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:03 GMT", + "ETag" : "0x8D829BFEE9D58EC", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "279251c8-f01e-005f-77f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:02 GMT", - "x-ms-client-request-id" : "0f191001-6bd2-483c-b4af-9d57a418ab7f" + "x-ms-request-id" : "88c8c14b-101e-0050-09a8-5b53d2000000", + "Date" : "Thu, 16 Jul 2020 19:39:18 GMT", + "x-ms-client-request-id" : "7db90b6b-ccb4-44bb-bc9c-8547884ba8b7" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0384989fcee/javablobblobsasimplutilstringtosignuserdelegationkey134001d9", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0979476c054/javablobblobsasimplutilstringtosignuserdelegationkey1484023a", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3aa240bf-6d0d-4337-add0-e29c5944b7e3", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "551d51be-484e-4910-a62e-4722f3eb232e", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:03.6950388Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:03 GMT", + "x-ms-version-id" : "2020-07-16T19:39:19.5243106Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:19 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:19 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BFB4CD74", + "ETag" : "0x8D829BFEED34E62", "Content-Length" : "0", - "x-ms-request-id" : "fd65cfe0-c01e-007b-77f2-39b4bd000000", - "x-ms-client-request-id" : "3aa240bf-6d0d-4337-add0-e29c5944b7e3" + "x-ms-request-id" : "86f9a6e2-501e-009a-65a8-5b0f5b000000", + "x-ms-client-request-id" : "551d51be-484e-4910-a62e-4722f3eb232e" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "70c6ec92-198d-4bc1-b88d-bae1f581be9b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d0c0c44-044a-4178-89f7-fbd8f4ba9e56" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "2792524b-f01e-005f-61f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0384989fceeWed, 03 Jun 2020 22:02:03 GMT\"0x8D80809BFA83DAF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "70c6ec92-198d-4bc1-b88d-bae1f581be9b", + "x-ms-request-id" : "6d97de93-001e-002e-2ca8-5bc395000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0979476c054Thu, 16 Jul 2020 19:39:19 GMT\"0x8D829BFEE9D58EC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:19 GMT", + "x-ms-client-request-id" : "6d0c0c44-044a-4178-89f7-fbd8f4ba9e56", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0384989fcee?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0979476c054?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "75229154-4ed6-4565-a1f2-7ead49f94640" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0354cf5a-70a7-4739-8984-58199c638923" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d036-c01e-007b-40f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "75229154-4ed6-4565-a1f2-7ead49f94640" + "x-ms-request-id" : "71fc2991-301e-008c-57a8-5bf98c000000", + "Date" : "Thu, 16 Jul 2020 19:39:20 GMT", + "x-ms-client-request-id" : "0354cf5a-70a7-4739-8984-58199c638923" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0384989fcee", "javablobblobsasimplutilstringtosignuserdelegationkey134001d9" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0979476c054", "javablobblobsasimplutilstringtosignuserdelegationkey1484023a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[10].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[10].json index a75cbdb49b9e..d787f35c705a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[10].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[10].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02600211c3f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0534912f16f?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5956e9ac-2452-48ea-97b1-faef11c2e50b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "55ba33e9-afd2-4fd7-a2a9-eb286bfb8334" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C1BCF970", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:07 GMT", + "ETag" : "0x8D829BFF719905C", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925be1-f01e-005f-3af2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "5956e9ac-2452-48ea-97b1-faef11c2e50b" + "x-ms-request-id" : "466be718-001e-0073-19a8-5bc911000000", + "Date" : "Thu, 16 Jul 2020 19:39:33 GMT", + "x-ms-client-request-id" : "55ba33e9-afd2-4fd7-a2a9-eb286bfb8334" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02600211c3f/javablobblobsasimplutilstringtosignuserdelegationkey140375a8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0534912f16f/javablobblobsasimplutilstringtosignuserdelegationkey1002206b", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "224193d1-e8fd-440d-9683-e115b7de883b", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d1e9e43-c270-4da2-9e2b-3295e8e2a600", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:07.1873548Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:07 GMT", + "x-ms-version-id" : "2020-07-16T19:39:33.7654518Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:33 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:33 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C1C9B00C", + "ETag" : "0x8D829BFF75054F6", "Content-Length" : "0", - "x-ms-request-id" : "fd65d42e-c01e-007b-7ff2-39b4bd000000", - "x-ms-client-request-id" : "224193d1-e8fd-440d-9683-e115b7de883b" + "x-ms-request-id" : "c3711a9b-301e-000a-7ca8-5b3535000000", + "x-ms-client-request-id" : "6d1e9e43-c270-4da2-9e2b-3295e8e2a600" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "54c780db-40c7-4989-9517-29c857b0b9ef" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c24c792a-6c74-41be-ba02-3d4dfc6e25a5" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925c51-f01e-005f-10f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey02600211c3fWed, 03 Jun 2020 22:02:07 GMT\"0x8D80809C1BCF970\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "54c780db-40c7-4989-9517-29c857b0b9ef", + "x-ms-request-id" : "17d6e1f6-501e-007e-48a8-5b01c5000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0534912f16fThu, 16 Jul 2020 19:39:33 GMT\"0x8D829BFF719905C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:33 GMT", + "x-ms-client-request-id" : "c24c792a-6c74-41be-ba02-3d4dfc6e25a5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02600211c3f?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0534912f16f?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "853d64c7-f586-417f-ba65-49ab12440e14" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1e5dd08-c837-450a-8a11-49ab8c6be98b" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d481-c01e-007b-43f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", - "x-ms-client-request-id" : "853d64c7-f586-417f-ba65-49ab12440e14" + "x-ms-request-id" : "619d3a3b-201e-0029-67a8-5baff6000000", + "Date" : "Thu, 16 Jul 2020 19:39:34 GMT", + "x-ms-client-request-id" : "f1e5dd08-c837-450a-8a11-49ab8c6be98b" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey02600211c3f", "javablobblobsasimplutilstringtosignuserdelegationkey140375a8" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0534912f16f", "javablobblobsasimplutilstringtosignuserdelegationkey1002206b" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[11].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[11].json index 18c11ffb97cd..71c079cbce54 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[11].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[11].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey036294c175c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey052411bb582?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4c692433-7c77-41f5-a657-f4d8fe5b7d45" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed089f10-6853-4eee-9ba9-8a82eb6962a8" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C1F26E5F", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:07 GMT", + "ETag" : "0x8D829BFF7F44227", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925ce0-f01e-005f-72f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "4c692433-7c77-41f5-a657-f4d8fe5b7d45" + "x-ms-request-id" : "a8637ef7-901e-0061-73a8-5bb2c1000000", + "Date" : "Thu, 16 Jul 2020 19:39:34 GMT", + "x-ms-client-request-id" : "ed089f10-6853-4eee-9ba9-8a82eb6962a8" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey036294c175c/javablobblobsasimplutilstringtosignuserdelegationkey14294711", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey052411bb582/javablobblobsasimplutilstringtosignuserdelegationkey152385dc", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "94e8f354-1e37-4b69-8b59-ce139977349c", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "794f1cdf-f49d-4cf8-a9cb-3e4eab0ddd4b", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:07.5426931Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:07 GMT", + "x-ms-version-id" : "2020-07-16T19:39:35.1944690Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:35 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:35 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C1FFE873", + "ETag" : "0x8D829BFF82A61F2", "Content-Length" : "0", - "x-ms-request-id" : "fd65d4d7-c01e-007b-06f2-39b4bd000000", - "x-ms-client-request-id" : "94e8f354-1e37-4b69-8b59-ce139977349c" + "x-ms-request-id" : "a8cb9f45-801e-0099-0da8-5bee3f000000", + "x-ms-client-request-id" : "794f1cdf-f49d-4cf8-a9cb-3e4eab0ddd4b" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "503efbbb-5446-4bab-b6ea-9f0de7f68eea" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ba7dc2e-d7f2-4e43-9a8a-413b84b1ef33" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925d31-f01e-005f-2ff2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey036294c175cWed, 03 Jun 2020 22:02:07 GMT\"0x8D80809C1F26E5F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "503efbbb-5446-4bab-b6ea-9f0de7f68eea", + "x-ms-request-id" : "94542fc5-c01e-006c-35a8-5b7a15000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey052411bb582Thu, 16 Jul 2020 19:39:34 GMT\"0x8D829BFF7F44227\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:35 GMT", + "x-ms-client-request-id" : "4ba7dc2e-d7f2-4e43-9a8a-413b84b1ef33", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey036294c175c?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey052411bb582?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "089d3fe3-e83a-447c-b348-6bd81eda6e7d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "525da884-e3aa-4436-bb86-160ea43ead48" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d510-c01e-007b-36f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", - "x-ms-client-request-id" : "089d3fe3-e83a-447c-b348-6bd81eda6e7d" + "x-ms-request-id" : "e24dbd1c-a01e-0018-24a8-5b4ee5000000", + "Date" : "Thu, 16 Jul 2020 19:39:35 GMT", + "x-ms-client-request-id" : "525da884-e3aa-4436-bb86-160ea43ead48" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey036294c175c", "javablobblobsasimplutilstringtosignuserdelegationkey14294711" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey052411bb582", "javablobblobsasimplutilstringtosignuserdelegationkey152385dc" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[12].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[12].json index 4d0732bb0bfa..a99ad0325351 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[12].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[12].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey001911e4242?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08266172cd9?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8fa037a8-953c-408c-a034-86752d8a9bf9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d151b143-b01e-4a98-ade9-3ba1f0159180" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C2276DF5", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:07 GMT", + "ETag" : "0x8D829BFF8C57D59", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925d9c-f01e-005f-80f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", - "x-ms-client-request-id" : "8fa037a8-953c-408c-a034-86752d8a9bf9" + "x-ms-request-id" : "703c7f71-901e-0013-54a8-5bb58e000000", + "Date" : "Thu, 16 Jul 2020 19:39:36 GMT", + "x-ms-client-request-id" : "d151b143-b01e-4a98-ade9-3ba1f0159180" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey001911e4242/javablobblobsasimplutilstringtosignuserdelegationkey19812894", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08266172cd9/javablobblobsasimplutilstringtosignuserdelegationkey128963cc", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b1a11d7f-2a41-4643-86de-74e647d817d7", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3c5335c0-1012-411e-b652-25f924e41a7e", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:07.8840180Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:07 GMT", + "x-ms-version-id" : "2020-07-16T19:39:36.5624434Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:36 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:35 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C233FD74", + "ETag" : "0x8D829BFF8FB1E72", "Content-Length" : "0", - "x-ms-request-id" : "fd65d545-c01e-007b-61f2-39b4bd000000", - "x-ms-client-request-id" : "b1a11d7f-2a41-4643-86de-74e647d817d7" + "x-ms-request-id" : "c593a866-801e-000f-3aa8-5be7ee000000", + "x-ms-client-request-id" : "3c5335c0-1012-411e-b652-25f924e41a7e" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4777deac-793b-4e3e-b17c-394d464bcf94" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a65ea4e3-d54c-4f15-8fc7-f71b4da7dfc5" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925df7-f01e-005f-46f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey001911e4242Wed, 03 Jun 2020 22:02:07 GMT\"0x8D80809C2276DF5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", - "x-ms-client-request-id" : "4777deac-793b-4e3e-b17c-394d464bcf94", + "x-ms-request-id" : "19eed382-801e-0030-57a8-5b2f4d000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey08266172cd9Thu, 16 Jul 2020 19:39:36 GMT\"0x8D829BFF8C57D59\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:36 GMT", + "x-ms-client-request-id" : "a65ea4e3-d54c-4f15-8fc7-f71b4da7dfc5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey001911e4242?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08266172cd9?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "61d42c5b-55c5-4f39-ad88-525e91742966" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "846ff4db-7d6b-4aaa-bd2c-abddf1903fe6" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d586-c01e-007b-11f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", - "x-ms-client-request-id" : "61d42c5b-55c5-4f39-ad88-525e91742966" + "x-ms-request-id" : "cf950363-e01e-0054-79a8-5bded5000000", + "Date" : "Thu, 16 Jul 2020 19:39:37 GMT", + "x-ms-client-request-id" : "846ff4db-7d6b-4aaa-bd2c-abddf1903fe6" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey001911e4242", "javablobblobsasimplutilstringtosignuserdelegationkey19812894" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey08266172cd9", "javablobblobsasimplutilstringtosignuserdelegationkey128963cc" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[13].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[13].json index 310a3ba58882..f44f0e7c412a 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[13].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[13].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0186192e070?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0491689d085?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ba098dd9-c7c5-46d5-bcac-60d9f84c40d0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2def1960-4774-49c6-9561-8d4e46b71b3f" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C25C1F60", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:08 GMT", + "ETag" : "0x8D829BFF9966EB8", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925e4c-f01e-005f-0af2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", - "x-ms-client-request-id" : "ba098dd9-c7c5-46d5-bcac-60d9f84c40d0" + "x-ms-request-id" : "4b489096-d01e-004f-28a8-5be0d6000000", + "Date" : "Thu, 16 Jul 2020 19:39:36 GMT", + "x-ms-client-request-id" : "2def1960-4774-49c6-9561-8d4e46b71b3f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0186192e070/javablobblobsasimplutilstringtosignuserdelegationkey16954168", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0491689d085/javablobblobsasimplutilstringtosignuserdelegationkey16532855", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "723706d7-f070-4419-992c-374da72f641e", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3fd7c220-b6e0-473d-b1ff-a592749b18b2", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:08.2323473Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:08 GMT", + "x-ms-version-id" : "2020-07-16T19:39:37.9324188Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:37 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:08 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:37 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C2692411", + "ETag" : "0x8D829BFF9CC291C", "Content-Length" : "0", - "x-ms-request-id" : "fd65d5f0-c01e-007b-63f2-39b4bd000000", - "x-ms-client-request-id" : "723706d7-f070-4419-992c-374da72f641e" + "x-ms-request-id" : "cecc1c4d-401e-00a9-5ca8-5b50f0000000", + "x-ms-client-request-id" : "3fd7c220-b6e0-473d-b1ff-a592749b18b2" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a1dd618d-cb35-4eba-8746-ae74b744708d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "633c7ea1-2492-4181-a206-40cd6875cf27" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925ef9-f01e-005f-0df2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0186192e070Wed, 03 Jun 2020 22:02:08 GMT\"0x8D80809C25C1F60\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", - "x-ms-client-request-id" : "a1dd618d-cb35-4eba-8746-ae74b744708d", + "x-ms-request-id" : "bbe35b82-501e-0033-56a8-5bce29000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0491689d085Thu, 16 Jul 2020 19:39:37 GMT\"0x8D829BFF9966EB8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:37 GMT", + "x-ms-client-request-id" : "633c7ea1-2492-4181-a206-40cd6875cf27", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0186192e070?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0491689d085?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8850312c-4922-43c6-ba16-9665090a91a9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7bd6205c-8c44-445a-8e1a-ebc972a24be9" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d652-c01e-007b-2bf2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:08 GMT", - "x-ms-client-request-id" : "8850312c-4922-43c6-ba16-9665090a91a9" + "x-ms-request-id" : "41a204d4-701e-0056-33a8-5b606d000000", + "Date" : "Thu, 16 Jul 2020 19:39:37 GMT", + "x-ms-client-request-id" : "7bd6205c-8c44-445a-8e1a-ebc972a24be9" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0186192e070", "javablobblobsasimplutilstringtosignuserdelegationkey16954168" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0491689d085", "javablobblobsasimplutilstringtosignuserdelegationkey16532855" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[14].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[14].json index 98282759fc80..b55225420e5f 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[14].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[14].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey023451606d4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey025901361b1?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f5b96996-3c4a-4759-9cc1-4901d8d84b45" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2a24978-bf3d-4784-9ca6-ebfea57a161e" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C29B3399", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:08 GMT", + "ETag" : "0x8D829BFFA697E50", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925f8b-f01e-005f-02f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:07 GMT", - "x-ms-client-request-id" : "f5b96996-3c4a-4759-9cc1-4901d8d84b45" + "x-ms-request-id" : "208ec875-a01e-008e-02a8-5b4734000000", + "Date" : "Thu, 16 Jul 2020 19:39:38 GMT", + "x-ms-client-request-id" : "f2a24978-bf3d-4784-9ca6-ebfea57a161e" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey023451606d4/javablobblobsasimplutilstringtosignuserdelegationkey1469222c", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey025901361b1/javablobblobsasimplutilstringtosignuserdelegationkey17964492", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "10c2c8a3-1d06-4c67-b03c-ccaa983b610d", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f270e859-118e-4a19-87af-07e8af5bccd2", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:08.6477405Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:08 GMT", + "x-ms-version-id" : "2020-07-16T19:39:39.3104000Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:39 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:08 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:38 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C2A8865D", + "ETag" : "0x8D829BFFA9E6C80", "Content-Length" : "0", - "x-ms-request-id" : "fd65d6bc-c01e-007b-7bf2-39b4bd000000", - "x-ms-client-request-id" : "10c2c8a3-1d06-4c67-b03c-ccaa983b610d" + "x-ms-request-id" : "476cf1c1-401e-004d-2fa8-5b5e6e000000", + "x-ms-client-request-id" : "f270e859-118e-4a19-87af-07e8af5bccd2" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5356a234-2d2b-41de-8b52-2dc22fc7a1b1" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "90cf9aba-55e6-4e40-8b72-fe1300cb3f50" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27926004-f01e-005f-5ff2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey023451606d4Wed, 03 Jun 2020 22:02:08 GMT\"0x8D80809C29B3399\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:08 GMT", - "x-ms-client-request-id" : "5356a234-2d2b-41de-8b52-2dc22fc7a1b1", + "x-ms-request-id" : "0a000504-301e-0047-37a8-5bfad9000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey025901361b1Thu, 16 Jul 2020 19:39:38 GMT\"0x8D829BFFA697E50\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:39 GMT", + "x-ms-client-request-id" : "90cf9aba-55e6-4e40-8b72-fe1300cb3f50", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey023451606d4?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey025901361b1?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "55082b37-edec-427c-bba3-68fe63376c2f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "80149c77-5ea7-4a6a-a424-5fc6c3ea6b26" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d6fa-c01e-007b-2ff2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:08 GMT", - "x-ms-client-request-id" : "55082b37-edec-427c-bba3-68fe63376c2f" + "x-ms-request-id" : "921a8316-b01e-0092-48a8-5b1554000000", + "Date" : "Thu, 16 Jul 2020 19:39:39 GMT", + "x-ms-client-request-id" : "80149c77-5ea7-4a6a-a424-5fc6c3ea6b26" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey023451606d4", "javablobblobsasimplutilstringtosignuserdelegationkey1469222c" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey025901361b1", "javablobblobsasimplutilstringtosignuserdelegationkey17964492" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[15].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[15].json index f8449cf5b201..096ef576b3d4 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[15].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[15].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0996070fa01?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0375297a12e?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2cb824e5-b43a-4ece-bbe6-ec321a03c77c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c0f80d44-f6c1-4096-ba31-04ef6cbbe63a" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C2D16BFF", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:08 GMT", + "ETag" : "0x8D829BFFB3F9E19", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27926075-f01e-005f-3cf2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:08 GMT", - "x-ms-client-request-id" : "2cb824e5-b43a-4ece-bbe6-ec321a03c77c" + "x-ms-request-id" : "3ef56a35-b01e-0066-01a8-5bdea2000000", + "Date" : "Thu, 16 Jul 2020 19:39:39 GMT", + "x-ms-client-request-id" : "c0f80d44-f6c1-4096-ba31-04ef6cbbe63a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0996070fa01/javablobblobsasimplutilstringtosignuserdelegationkey127827b7", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0375297a12e/javablobblobsasimplutilstringtosignuserdelegationkey123008b3", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2baa6e5e-80d6-49df-87e4-e7e689915d42", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8329b67c-14e4-4edb-85c2-87b7b8a05fd9", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:08.9990729Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:08 GMT", + "x-ms-version-id" : "2020-07-16T19:39:40.6993905Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:40 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:08 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:40 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C2DE2249", + "ETag" : "0x8D829BFFB725DF1", "Content-Length" : "0", - "x-ms-request-id" : "fd65d742-c01e-007b-6bf2-39b4bd000000", - "x-ms-client-request-id" : "2baa6e5e-80d6-49df-87e4-e7e689915d42" + "x-ms-request-id" : "a9c58f5f-801e-0089-48a8-5b2b57000000", + "x-ms-client-request-id" : "8329b67c-14e4-4edb-85c2-87b7b8a05fd9" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dd08480d-2925-4be6-b730-fe47121c8d93" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d52564a7-fbe2-410d-8834-d82afe5e064b" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "279260fb-f01e-005f-22f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0996070fa01Wed, 03 Jun 2020 22:02:08 GMT\"0x8D80809C2D16BFF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:08 GMT", - "x-ms-client-request-id" : "dd08480d-2925-4be6-b730-fe47121c8d93", + "x-ms-request-id" : "123f1937-601e-004a-72a8-5b320d000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0375297a12eThu, 16 Jul 2020 19:39:40 GMT\"0x8D829BFFB3F9E19\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:40 GMT", + "x-ms-client-request-id" : "d52564a7-fbe2-410d-8834-d82afe5e064b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0996070fa01?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0375297a12e?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4ee4790f-4a7e-439e-a4f2-fa807c8e5035" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "053b8a33-7f8a-46c3-956a-bc1f1328769d" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d79f-c01e-007b-39f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:09 GMT", - "x-ms-client-request-id" : "4ee4790f-4a7e-439e-a4f2-fa807c8e5035" + "x-ms-request-id" : "1654df8b-e01e-0009-80a8-5bd451000000", + "Date" : "Thu, 16 Jul 2020 19:39:40 GMT", + "x-ms-client-request-id" : "053b8a33-7f8a-46c3-956a-bc1f1328769d" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0996070fa01", "javablobblobsasimplutilstringtosignuserdelegationkey127827b7" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0375297a12e", "javablobblobsasimplutilstringtosignuserdelegationkey123008b3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[1].json index 063fec191baf..1344704b07df 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[1].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[1].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey056104dbd16?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey040831be0d5?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f5c01422-7fb9-4c7d-9aa6-df4e91339dbd" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0359fa46-dfd1-466b-9f62-6382828ca79f" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BFDF60B8", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:03 GMT", + "ETag" : "0x8D829BFEF87C475", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "279252fc-f01e-005f-74f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "f5c01422-7fb9-4c7d-9aa6-df4e91339dbd" + "x-ms-request-id" : "123f0fec-601e-004a-33a8-5b320d000000", + "Date" : "Thu, 16 Jul 2020 19:39:20 GMT", + "x-ms-client-request-id" : "0359fa46-dfd1-466b-9f62-6382828ca79f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey056104dbd16/javablobblobsasimplutilstringtosignuserdelegationkey126860c7", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey040831be0d5/javablobblobsasimplutilstringtosignuserdelegationkey17120863", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2dacd4da-e661-4c98-833e-58494c34a691", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2f61849-5007-450e-bfed-bac2467a54fc", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:04.0573816Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:04 GMT", + "x-ms-version-id" : "2020-07-16T19:39:21.0543987Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:21 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:20 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BFEC1778", + "ETag" : "0x8D829BFEFBCC773", "Content-Length" : "0", - "x-ms-request-id" : "fd65d076-c01e-007b-79f2-39b4bd000000", - "x-ms-client-request-id" : "2dacd4da-e661-4c98-833e-58494c34a691" + "x-ms-request-id" : "921a753e-b01e-0092-34a8-5b1554000000", + "x-ms-client-request-id" : "f2f61849-5007-450e-bfed-bac2467a54fc" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6fa4e22b-046e-4b9e-94e4-4ad0cd82d05f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7f56db8e-6f43-4eb7-962c-f4f607c39190" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925395-f01e-005f-65f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey056104dbd16Wed, 03 Jun 2020 22:02:03 GMT\"0x8D80809BFDF60B8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "6fa4e22b-046e-4b9e-94e4-4ad0cd82d05f", + "x-ms-request-id" : "179e31f3-401e-0010-0ba8-5b54ea000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey040831be0d5Thu, 16 Jul 2020 19:39:20 GMT\"0x8D829BFEF87C475\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:20 GMT", + "x-ms-client-request-id" : "7f56db8e-6f43-4eb7-962c-f4f607c39190", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey056104dbd16?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey040831be0d5?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8e2ea27f-316d-4341-a761-7946d1ae838c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cda5006e-9133-41fc-a0a6-44f505f36fa9" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d0cc-c01e-007b-3df2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "8e2ea27f-316d-4341-a761-7946d1ae838c" + "x-ms-request-id" : "3d11df62-b01e-0082-0aa8-5bd03c000000", + "Date" : "Thu, 16 Jul 2020 19:39:21 GMT", + "x-ms-client-request-id" : "cda5006e-9133-41fc-a0a6-44f505f36fa9" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey056104dbd16", "javablobblobsasimplutilstringtosignuserdelegationkey126860c7" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey040831be0d5", "javablobblobsasimplutilstringtosignuserdelegationkey17120863" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[2].json index 4ae5b33b6198..b3c13becd477 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[2].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[2].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey07051283f93?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey026796ddf68?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a6d87b62-401b-4384-a7d6-a1de325cf0f9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "82430749-a4e0-43ac-9b2b-4fe0bbba4f76" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C014AE89", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:04 GMT", + "ETag" : "0x8D829BFF05F404D", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925407-f01e-005f-3ff2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "a6d87b62-401b-4384-a7d6-a1de325cf0f9" + "x-ms-request-id" : "a2f86b61-e01e-007b-0aa8-5bd31e000000", + "Date" : "Thu, 16 Jul 2020 19:39:21 GMT", + "x-ms-client-request-id" : "82430749-a4e0-43ac-9b2b-4fe0bbba4f76" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey07051283f93/javablobblobsasimplutilstringtosignuserdelegationkey1305687a", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey026796ddf68/javablobblobsasimplutilstringtosignuserdelegationkey1445182f", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "261da87f-aa72-41ca-b38b-77bef2ff7a48", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f76a2af5-292b-484e-9ad0-19bd174aa441", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:04.4077155Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:04 GMT", + "x-ms-version-id" : "2020-07-16T19:39:22.4403864Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:22 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:21 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C0218C63", + "ETag" : "0x8D829BFF0904398", "Content-Length" : "0", - "x-ms-request-id" : "fd65d104-c01e-007b-68f2-39b4bd000000", - "x-ms-client-request-id" : "261da87f-aa72-41ca-b38b-77bef2ff7a48" + "x-ms-request-id" : "dd340f08-301e-009c-4fa8-5b3ce4000000", + "x-ms-client-request-id" : "f76a2af5-292b-484e-9ad0-19bd174aa441" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4f5a321a-a2cf-4736-90e8-e4d16b276b51" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c1f5414-91f6-46a4-aaef-dc65e4ec6dc5" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "279254a0-f01e-005f-31f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey07051283f93Wed, 03 Jun 2020 22:02:04 GMT\"0x8D80809C014AE89\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "4f5a321a-a2cf-4736-90e8-e4d16b276b51", + "x-ms-request-id" : "27208282-101e-0032-2ca8-5b91f5000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey026796ddf68Thu, 16 Jul 2020 19:39:22 GMT\"0x8D829BFF05F404D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:22 GMT", + "x-ms-client-request-id" : "4c1f5414-91f6-46a4-aaef-dc65e4ec6dc5", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey07051283f93?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey026796ddf68?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "54c5c57d-8cf3-4932-8339-1067f4d3e7ad" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9086551a-eefe-413b-a796-d8fe8428265d" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d12d-c01e-007b-09f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "54c5c57d-8cf3-4932-8339-1067f4d3e7ad" + "x-ms-request-id" : "a9c566b3-801e-0089-14a8-5b2b57000000", + "Date" : "Thu, 16 Jul 2020 19:39:22 GMT", + "x-ms-client-request-id" : "9086551a-eefe-413b-a796-d8fe8428265d" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey07051283f93", "javablobblobsasimplutilstringtosignuserdelegationkey1305687a" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey026796ddf68", "javablobblobsasimplutilstringtosignuserdelegationkey1445182f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[3].json index 42ac53c85184..15b99c5a5872 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[3].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[3].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey004269bb3ac?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0835589ea1c?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "27168297-bc01-4ffd-9c34-25b6a1d4e084" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8c25130a-dd61-4ac9-8761-ba7c0dbbaa65" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C04938DB", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:04 GMT", + "ETag" : "0x8D829BFF134888E", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925541-f01e-005f-2cf2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:03 GMT", - "x-ms-client-request-id" : "27168297-bc01-4ffd-9c34-25b6a1d4e084" + "x-ms-request-id" : "78220bfa-901e-0003-69a8-5b70e6000000", + "Date" : "Thu, 16 Jul 2020 19:39:23 GMT", + "x-ms-client-request-id" : "8c25130a-dd61-4ac9-8761-ba7c0dbbaa65" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey004269bb3ac/javablobblobsasimplutilstringtosignuserdelegationkey134245ec", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0835589ea1c/javablobblobsasimplutilstringtosignuserdelegationkey14503783", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a2123172-c7ab-4003-9724-c0bd4fa04dc9", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13ca5cc9-3356-4b4e-9eb5-91cf713a4346", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:04.7500409Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:04 GMT", + "x-ms-version-id" : "2020-07-16T19:39:23.8804117Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:23 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:23 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C055C879", + "ETag" : "0x8D829BFF16BFE95", "Content-Length" : "0", - "x-ms-request-id" : "fd65d15e-c01e-007b-2ef2-39b4bd000000", - "x-ms-client-request-id" : "a2123172-c7ab-4003-9724-c0bd4fa04dc9" + "x-ms-request-id" : "98789d07-a01e-009e-25a8-5b825c000000", + "x-ms-client-request-id" : "13ca5cc9-3356-4b4e-9eb5-91cf713a4346" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "51e71293-6665-46ff-ae5f-0bcddbe2b97c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cf28c679-986c-49d8-93b1-621496406df8" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "279255cc-f01e-005f-14f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey004269bb3acWed, 03 Jun 2020 22:02:04 GMT\"0x8D80809C04938DB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "51e71293-6665-46ff-ae5f-0bcddbe2b97c", + "x-ms-request-id" : "3f0aff39-901e-005e-4fa8-5b7a62000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0835589ea1cThu, 16 Jul 2020 19:39:23 GMT\"0x8D829BFF134888E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:24 GMT", + "x-ms-client-request-id" : "cf28c679-986c-49d8-93b1-621496406df8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey004269bb3ac?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0835589ea1c?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "59d8ef83-4c2a-4a15-ad7f-0d712675784b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb4a13fd-62dc-410c-8ef5-d66dedc893f3" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d184-c01e-007b-51f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "59d8ef83-4c2a-4a15-ad7f-0d712675784b" + "x-ms-request-id" : "2720852c-101e-0032-7ea8-5b91f5000000", + "Date" : "Thu, 16 Jul 2020 19:39:24 GMT", + "x-ms-client-request-id" : "eb4a13fd-62dc-410c-8ef5-d66dedc893f3" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey004269bb3ac", "javablobblobsasimplutilstringtosignuserdelegationkey134245ec" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0835589ea1c", "javablobblobsasimplutilstringtosignuserdelegationkey14503783" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[4].json index 5b2173d1d433..b0b4897266cc 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[4].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[4].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0652940d0d2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey081209c2b71?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f8b20844-78f4-40f2-8b1a-ed5da88c27b9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6962a7c6-4956-437a-a5ed-0adf4e89e11a" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C07FBF74", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:05 GMT", + "ETag" : "0x8D829BFF206593B", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:24 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "2792565b-f01e-005f-7ff2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "f8b20844-78f4-40f2-8b1a-ed5da88c27b9" + "x-ms-request-id" : "4e226887-a01e-0055-4da8-5b8109000000", + "Date" : "Thu, 16 Jul 2020 19:39:24 GMT", + "x-ms-client-request-id" : "6962a7c6-4956-437a-a5ed-0adf4e89e11a" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0652940d0d2/javablobblobsasimplutilstringtosignuserdelegationkey181320cb", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey081209c2b71/javablobblobsasimplutilstringtosignuserdelegationkey1378024c", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e988c7d7-566d-4064-9bb4-6d3b5ad83976", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "def3d7e2-b60a-4a44-a9ee-919badecba8a", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:05.1093824Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:05 GMT", + "x-ms-version-id" : "2020-07-16T19:39:25.2243686Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:24 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C08C9D40", + "ETag" : "0x8D829BFF23910E6", "Content-Length" : "0", - "x-ms-request-id" : "fd65d1c1-c01e-007b-07f2-39b4bd000000", - "x-ms-client-request-id" : "e988c7d7-566d-4064-9bb4-6d3b5ad83976" + "x-ms-request-id" : "6d1bd1b9-d01e-003d-64a8-5be799000000", + "x-ms-client-request-id" : "def3d7e2-b60a-4a44-a9ee-919badecba8a" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "584578df-2f53-43dd-8f31-21b006468cfe" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "47d82b7a-a0a2-45d0-b589-96df51bfe03f" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "279256ec-f01e-005f-73f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0652940d0d2Wed, 03 Jun 2020 22:02:05 GMT\"0x8D80809C07FBF74\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "584578df-2f53-43dd-8f31-21b006468cfe", + "x-ms-request-id" : "dd3417e1-301e-009c-19a8-5b3ce4000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey081209c2b71Thu, 16 Jul 2020 19:39:24 GMT\"0x8D829BFF206593B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:25 GMT", + "x-ms-client-request-id" : "47d82b7a-a0a2-45d0-b589-96df51bfe03f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0652940d0d2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey081209c2b71?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "af74f419-1c16-4fcd-baf5-2bdf1684356d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2a99db5c-fdf1-4878-8647-4878d62fa122" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d1de-c01e-007b-1df2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", - "x-ms-client-request-id" : "af74f419-1c16-4fcd-baf5-2bdf1684356d" + "x-ms-request-id" : "95c8a2bd-801e-0020-61a8-5bea25000000", + "Date" : "Thu, 16 Jul 2020 19:39:25 GMT", + "x-ms-client-request-id" : "2a99db5c-fdf1-4878-8647-4878d62fa122" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0652940d0d2", "javablobblobsasimplutilstringtosignuserdelegationkey181320cb" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey081209c2b71", "javablobblobsasimplutilstringtosignuserdelegationkey1378024c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[5].json index 568c228f5188..7e0b31fda3de 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[5].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[5].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey097375b1841?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey073797faba5?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0e326d03-59f6-43d9-88d4-01d592a0dbff" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4f195b58-aaa4-45ba-8f03-1b46027349f6" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C0B33812", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:05 GMT", + "ETag" : "0x8D829BFF2E309BB", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "2792573d-f01e-005f-2ff2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "0e326d03-59f6-43d9-88d4-01d592a0dbff" + "x-ms-request-id" : "0107084d-601e-0007-5aa8-5bfde1000000", + "Date" : "Thu, 16 Jul 2020 19:39:25 GMT", + "x-ms-client-request-id" : "4f195b58-aaa4-45ba-8f03-1b46027349f6" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey097375b1841/javablobblobsasimplutilstringtosignuserdelegationkey17656339", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey073797faba5/javablobblobsasimplutilstringtosignuserdelegationkey1971973f", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "06caa7db-d8d9-4510-9762-d789bc4eb0c0", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e393a399-1948-4ecd-a278-a6a0c135090a", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:05.4446994Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:05 GMT", + "x-ms-version-id" : "2020-07-16T19:39:26.6623929Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:26 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:26 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C0BFC792", + "ETag" : "0x8D829BFF3147DB9", "Content-Length" : "0", - "x-ms-request-id" : "fd65d209-c01e-007b-44f2-39b4bd000000", - "x-ms-client-request-id" : "06caa7db-d8d9-4510-9762-d789bc4eb0c0" + "x-ms-request-id" : "84696083-f01e-0067-4da8-5b817e000000", + "x-ms-client-request-id" : "e393a399-1948-4ecd-a278-a6a0c135090a" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b3d7b09c-6757-419a-95cd-8a4174a76f2c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "88e53e1f-6d1d-41b4-a155-87ee7b93bcfb" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925797-f01e-005f-74f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey097375b1841Wed, 03 Jun 2020 22:02:05 GMT\"0x8D80809C0B33812\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "b3d7b09c-6757-419a-95cd-8a4174a76f2c", + "x-ms-request-id" : "bb341738-501e-008a-6fa8-5bca33000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey073797faba5Thu, 16 Jul 2020 19:39:26 GMT\"0x8D829BFF2E309BB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:26 GMT", + "x-ms-client-request-id" : "88e53e1f-6d1d-41b4-a155-87ee7b93bcfb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey097375b1841?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey073797faba5?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "de213cb5-984d-404e-bda9-7b724ff13c3a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1a50f9e8-0ea9-4128-9297-2d9102862467" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d223-c01e-007b-5af2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", - "x-ms-client-request-id" : "de213cb5-984d-404e-bda9-7b724ff13c3a" + "x-ms-request-id" : "dba949f8-001e-0087-78a8-5b02e7000000", + "Date" : "Thu, 16 Jul 2020 19:39:27 GMT", + "x-ms-client-request-id" : "1a50f9e8-0ea9-4128-9297-2d9102862467" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey097375b1841", "javablobblobsasimplutilstringtosignuserdelegationkey17656339" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey073797faba5", "javablobblobsasimplutilstringtosignuserdelegationkey1971973f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[6].json index 56492e579bdd..7d68390fb250 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[6].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[6].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey037770238a0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey078688fb05f?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6d458d5d-d25e-4e1b-b2b0-ae5c74517d1b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "72d5746a-e6af-482f-8166-bae6c4c9184d" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C0E7C24A", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:05 GMT", + "ETag" : "0x8D829BFF3BB2029", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925817-f01e-005f-50f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:04 GMT", - "x-ms-client-request-id" : "6d458d5d-d25e-4e1b-b2b0-ae5c74517d1b" + "x-ms-request-id" : "be5dcefa-401e-0096-29a8-5b9853000000", + "Date" : "Thu, 16 Jul 2020 19:39:26 GMT", + "x-ms-client-request-id" : "72d5746a-e6af-482f-8166-bae6c4c9184d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey037770238a0/javablobblobsasimplutilstringtosignuserdelegationkey18025196", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey078688fb05f/javablobblobsasimplutilstringtosignuserdelegationkey151640c0", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a305de9c-ac5b-43b0-b982-089c94577be4", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e14d37f-1605-47b3-9dc0-f96f938a995a", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:05.7900259Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:05 GMT", + "x-ms-version-id" : "2020-07-16T19:39:28.0884082Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:28 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:27 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C0F478E3", + "ETag" : "0x8D829BFF3EE1572", "Content-Length" : "0", - "x-ms-request-id" : "fd65d255-c01e-007b-01f2-39b4bd000000", - "x-ms-client-request-id" : "a305de9c-ac5b-43b0-b982-089c94577be4" + "x-ms-request-id" : "c09a67f6-401e-003f-11a8-5b5921000000", + "x-ms-client-request-id" : "7e14d37f-1605-47b3-9dc0-f96f938a995a" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ec125730-5a38-491b-a2b5-3c1ddce2e95f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "26e0e25e-1281-478f-aef7-05ab162058a6" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925877-f01e-005f-19f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey037770238a0Wed, 03 Jun 2020 22:02:05 GMT\"0x8D80809C0E7C24A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", - "x-ms-client-request-id" : "ec125730-5a38-491b-a2b5-3c1ddce2e95f", + "x-ms-request-id" : "a45733a7-401e-0062-05a8-5b53a5000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey078688fb05fThu, 16 Jul 2020 19:39:27 GMT\"0x8D829BFF3BB2029\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:28 GMT", + "x-ms-client-request-id" : "26e0e25e-1281-478f-aef7-05ab162058a6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey037770238a0?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey078688fb05f?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c07f8670-4d46-4a6c-ad9b-3712fa0ae557" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "61ce193e-ecdb-4c71-87cd-569947811a22" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d26f-c01e-007b-16f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", - "x-ms-client-request-id" : "c07f8670-4d46-4a6c-ad9b-3712fa0ae557" + "x-ms-request-id" : "a0eeb20e-d01e-005f-1ca8-5b25be000000", + "Date" : "Thu, 16 Jul 2020 19:39:27 GMT", + "x-ms-client-request-id" : "61ce193e-ecdb-4c71-87cd-569947811a22" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey037770238a0", "javablobblobsasimplutilstringtosignuserdelegationkey18025196" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey078688fb05f", "javablobblobsasimplutilstringtosignuserdelegationkey151640c0" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[7].json index 55e3f0aa91db..4eea7943caa2 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[7].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[7].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey052656482a2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0143712f5eb?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "626b5b2b-bf4d-4ce9-a288-61c06df6021a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "57686e5e-d2e8-48c4-80b4-2b2b3df02cfd" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C11E21BC", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:06 GMT", + "ETag" : "0x8D829BFF4903C45", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925903-f01e-005f-0cf2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", - "x-ms-client-request-id" : "626b5b2b-bf4d-4ce9-a288-61c06df6021a" + "x-ms-request-id" : "393d5b62-601e-005a-3fa8-5bf765000000", + "Date" : "Thu, 16 Jul 2020 19:39:28 GMT", + "x-ms-client-request-id" : "57686e5e-d2e8-48c4-80b4-2b2b3df02cfd" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey052656482a2/javablobblobsasimplutilstringtosignuserdelegationkey156089ec", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0143712f5eb/javablobblobsasimplutilstringtosignuserdelegationkey11755067", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b5f066bf-b61f-4d16-8db1-ef60f5ca0abf", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b17b5514-e58c-4e4c-95e9-b5c8335cca2c", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:06.1483659Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:06 GMT", + "x-ms-version-id" : "2020-07-16T19:39:29.4954102Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:29 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:29 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C12B268B", + "ETag" : "0x8D829BFF4C4C676", "Content-Length" : "0", - "x-ms-request-id" : "fd65d2ba-c01e-007b-50f2-39b4bd000000", - "x-ms-client-request-id" : "b5f066bf-b61f-4d16-8db1-ef60f5ca0abf" + "x-ms-request-id" : "73b9b3a8-e01e-0019-23a8-5b1139000000", + "x-ms-client-request-id" : "b17b5514-e58c-4e4c-95e9-b5c8335cca2c" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "504d8326-3388-4c7c-9d66-5210c4751d3f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6025e88c-0dc1-474f-96f9-c6891c8010c1" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925986-f01e-005f-72f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey052656482a2Wed, 03 Jun 2020 22:02:06 GMT\"0x8D80809C11E21BC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", - "x-ms-client-request-id" : "504d8326-3388-4c7c-9d66-5210c4751d3f", + "x-ms-request-id" : "158a7592-b01e-003b-02a8-5bd426000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0143712f5ebThu, 16 Jul 2020 19:39:29 GMT\"0x8D829BFF4903C45\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:29 GMT", + "x-ms-client-request-id" : "6025e88c-0dc1-474f-96f9-c6891c8010c1", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey052656482a2?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0143712f5eb?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ade4e436-c9d7-4f48-9914-4fafe16739d5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ea974154-7f0a-4425-97fb-5018dd763c82" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d2fb-c01e-007b-04f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "ade4e436-c9d7-4f48-9914-4fafe16739d5" + "x-ms-request-id" : "ee9b1849-a01e-0037-5aa8-5b432e000000", + "Date" : "Thu, 16 Jul 2020 19:39:29 GMT", + "x-ms-client-request-id" : "ea974154-7f0a-4425-97fb-5018dd763c82" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey052656482a2", "javablobblobsasimplutilstringtosignuserdelegationkey156089ec" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0143712f5eb", "javablobblobsasimplutilstringtosignuserdelegationkey11755067" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[8].json index 1fc5d559e119..f8c3b237ed5e 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[8].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[8].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey038206dd90b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey080141bdb11?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "88b7c634-8093-48a5-8d0d-e14865b1ac9f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cba05644-ff8b-4429-9c68-63963b2d20c4" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C156F2CB", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:06 GMT", + "ETag" : "0x8D829BFF566E3B9", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:30 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925a26-f01e-005f-68f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", - "x-ms-client-request-id" : "88b7c634-8093-48a5-8d0d-e14865b1ac9f" + "x-ms-request-id" : "cad80db2-701e-0046-72a8-5ba505000000", + "Date" : "Thu, 16 Jul 2020 19:39:29 GMT", + "x-ms-client-request-id" : "cba05644-ff8b-4429-9c68-63963b2d20c4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey038206dd90b/javablobblobsasimplutilstringtosignuserdelegationkey135205f8", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey080141bdb11/javablobblobsasimplutilstringtosignuserdelegationkey1287068c", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3f986aad-12ff-404e-a4ee-86dcd950aacc", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6646972a-5eb6-42ec-b863-4210b7cb406e", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:06.5197194Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:06 GMT", + "x-ms-version-id" : "2020-07-16T19:39:30.9144207Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:30 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:30 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C163D08A", + "ETag" : "0x8D829BFF59D4C8F", "Content-Length" : "0", - "x-ms-request-id" : "fd65d32f-c01e-007b-2df2-39b4bd000000", - "x-ms-client-request-id" : "3f986aad-12ff-404e-a4ee-86dcd950aacc" + "x-ms-request-id" : "14c3a7a6-f01e-0005-51a8-5b4359000000", + "x-ms-client-request-id" : "6646972a-5eb6-42ec-b863-4210b7cb406e" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bf023791-a7a9-4633-b86a-c684a5e88fb5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f39e6669-24a4-4bf0-83e7-d355d920492b" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925a9d-f01e-005f-46f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey038206dd90bWed, 03 Jun 2020 22:02:06 GMT\"0x8D80809C156F2CB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:05 GMT", - "x-ms-client-request-id" : "bf023791-a7a9-4633-b86a-c684a5e88fb5", + "x-ms-request-id" : "28bc617b-f01e-0015-7fa8-5b8631000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey080141bdb11Thu, 16 Jul 2020 19:39:30 GMT\"0x8D829BFF566E3B9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:30 GMT", + "x-ms-client-request-id" : "f39e6669-24a4-4bf0-83e7-d355d920492b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey038206dd90b?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey080141bdb11?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "dd4d6359-c19b-4a59-9f5f-084b681ea6c8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3f4e019-ad5d-4a98-bb75-877d42ddad56" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d380-c01e-007b-72f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "dd4d6359-c19b-4a59-9f5f-084b681ea6c8" + "x-ms-request-id" : "9d695ea9-001e-004c-16a8-5b01b2000000", + "Date" : "Thu, 16 Jul 2020 19:39:30 GMT", + "x-ms-client-request-id" : "e3f4e019-ad5d-4a98-bb75-877d42ddad56" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey038206dd90b", "javablobblobsasimplutilstringtosignuserdelegationkey135205f8" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey080141bdb11", "javablobblobsasimplutilstringtosignuserdelegationkey1287068c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[9].json index a7d6393f9c50..55647b6b27da 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[9].json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[9].json @@ -1,49 +1,49 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey021607b4045?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey001617479b0?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1ab587a1-2bb4-4856-8cc8-6a279a61ab40" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "595d61c6-dd7d-4b91-b107-a06d9165dc34" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809C18B07D0", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:06 GMT", + "ETag" : "0x8D829BFF63DE407", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "27925b15-f01e-005f-22f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "1ab587a1-2bb4-4856-8cc8-6a279a61ab40" + "x-ms-request-id" : "a5dcc40c-b01e-0049-76a8-5bd369000000", + "Date" : "Thu, 16 Jul 2020 19:39:31 GMT", + "x-ms-client-request-id" : "595d61c6-dd7d-4b91-b107-a06d9165dc34" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey021607b4045/javablobblobsasimplutilstringtosignuserdelegationkey171542d9", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey001617479b0/javablobblobsasimplutilstringtosignuserdelegationkey13305562", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "363aa2d7-0248-4d4e-975b-3b938bd54e40", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8e373f8-fde9-4f30-87ac-b74e88a8a465", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:02:06.8590423Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:02:06 GMT", + "x-ms-version-id" : "2020-07-16T19:39:32.2944037Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:39:32 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", + "Date" : "Thu, 16 Jul 2020 19:39:31 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809C1979757", + "ETag" : "0x8D829BFF66FDE25", "Content-Length" : "0", - "x-ms-request-id" : "fd65d3be-c01e-007b-25f2-39b4bd000000", - "x-ms-client-request-id" : "363aa2d7-0248-4d4e-975b-3b938bd54e40" + "x-ms-request-id" : "d8306997-501e-001c-80a8-5bc3e2000000", + "x-ms-client-request-id" : "c8e373f8-fde9-4f30-87ac-b74e88a8a465" }, "Exception" : null }, { @@ -51,30 +51,29 @@ "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ee40928b-8af6-4b2e-9ec8-0fc0b6607a35" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f62d5689-c3f9-4e95-ba36-c7fbca1c1557" }, "Response" : { "Transfer-Encoding" : "chunked", "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "27925b84-f01e-005f-77f2-39421d000000", - "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey021607b4045Wed, 03 Jun 2020 22:02:06 GMT\"0x8D80809C18B07D0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "ee40928b-8af6-4b2e-9ec8-0fc0b6607a35", + "x-ms-request-id" : "7fae8437-c01e-0053-74a8-5bb2b6000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey001617479b0Thu, 16 Jul 2020 19:39:31 GMT\"0x8D829BFF63DE407\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:39:31 GMT", + "x-ms-client-request-id" : "f62d5689-c3f9-4e95-ba36-c7fbca1c1557", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey021607b4045?restype=container", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey001617479b0?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d4c04f76-8c13-4d4f-8dc6-c78942b4c84e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c3f67268-4ae1-4f9c-b8b2-128509ff68f7" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -82,11 +81,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "fd65d3ed-c01e-007b-4bf2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:02:06 GMT", - "x-ms-client-request-id" : "d4c04f76-8c13-4d4f-8dc6-c78942b4c84e" + "x-ms-request-id" : "cc8c0ecf-e01e-009f-65a8-5bdd80000000", + "Date" : "Thu, 16 Jul 2020 19:39:32 GMT", + "x-ms-client-request-id" : "c3f67268-4ae1-4f9c-b8b2-128509ff68f7" }, "Exception" : null } ], - "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey021607b4045", "javablobblobsasimplutilstringtosignuserdelegationkey171542d9" ] + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey001617479b0", "javablobblobsasimplutilstringtosignuserdelegationkey13305562" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasreadpermissions.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasreadpermissions.json new file mode 100644 index 000000000000..14809910b93c --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasreadpermissions.json @@ -0,0 +1,163 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasreadpermissions091219211f71022ac845ab?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1c1df161-9aa1-4467-9aa6-1edb926ae0ed" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFCB73B84A", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d4beda6d-b01e-0059-15a8-5b1601000000", + "Date" : "Thu, 16 Jul 2020 19:38:19 GMT", + "x-ms-client-request-id" : "1c1df161-9aa1-4467-9aa6-1edb926ae0ed" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasreadpermissions091219211f71022ac845ab/javablobblobsasreadpermissions17689390569adfdfd14", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13a6c913-b081-463a-aba6-9305c66e08ac", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:20.8445329Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:20 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:20 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFCBD97B91", + "Content-Length" : "0", + "x-ms-request-id" : "fcc5ae5f-f01e-002a-55a8-5b4e92000000", + "x-ms-client-request-id" : "13a6c913-b081-463a-aba6-9305c66e08ac" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasreadpermissions091219211f71022ac845ab/javablobblobsasreadpermissions17689390569adfdfd14?sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A19Z&se=2020-07-17T19%3A38%3A19Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bf9573ee-48ad-4066-9dbc-4048475e34ae" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-16T19:38:20.8445329Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:20 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 16 Jul 2020 19:38:21 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D829BFCBD97B91", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:20 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "55f0bbac-101e-00a4-38a8-5b9824000000", + "Body" : "default", + "x-ms-client-request-id" : "bf9573ee-48ad-4066-9dbc-4048475e34ae", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasreadpermissions091219211f71022ac845ab/javablobblobsasreadpermissions17689390569adfdfd14?sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A19Z&se=2020-07-17T19%3A38%3A19Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "721a9a8b-e595-41b8-9c2b-fa78e9e96da7" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-16T19:38:20.8445329Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:20 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:20 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "597b0b84-801e-006d-6ca8-5b25c9000000", + "Content-Type" : "type", + "x-ms-version" : "2019-12-12", + "Date" : "Thu, 16 Jul 2020 19:38:21 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D829BFCBD97B91", + "Content-Disposition" : "disposition", + "Content-Language" : "language", + "x-ms-client-request-id" : "721a9a8b-e595-41b8-9c2b-fa78e9e96da7" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasreadpermissions&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "59ba4e1c-c786-4bfc-8ecb-40be33847f33" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f3dcbdd4-d01e-0002-0ca8-5b2f3a000000", + "Body" : "jtcblobsasreadpermissionsjtcblobsasreadpermissions091219211f71022ac845abThu, 16 Jul 2020 19:38:20 GMT\"0x8D829BFCB73B84A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:21 GMT", + "x-ms-client-request-id" : "59ba4e1c-c786-4bfc-8ecb-40be33847f33", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasreadpermissions091219211f71022ac845ab?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "59de8205-269a-41a1-9b52-e1fa2ae19f24" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "9d2a1921-301e-00a3-6ca8-5bf447000000", + "Date" : "Thu, 16 Jul 2020 19:38:22 GMT", + "x-ms-client-request-id" : "59de8205-269a-41a1-9b52-e1fa2ae19f24" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasreadpermissions091219211f71022ac845ab", "javablobblobsasreadpermissions17689390569adfdfd14", "2020-07-16T19:38:19.107309200Z", "2020-07-16T19:38:19.112307Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsassnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsassnapshot.json new file mode 100644 index 000000000000..ee0ab59c1987 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsassnapshot.json @@ -0,0 +1,199 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "871a39f3-45ef-4819-affc-d37892cc3fa8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFD207AAAC", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "619d0c48-201e-0029-3fa8-5baff6000000", + "Date" : "Thu, 16 Jul 2020 19:38:31 GMT", + "x-ms-client-request-id" : "871a39f3-45ef-4819-affc-d37892cc3fa8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983/javablobblobsassnapshot1sasclienttestsblobsassnapshotd1f034440", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b82c7f49-fbab-40c2-a2af-26c2709ca8f3", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:31.5841811Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:31 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:31 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFD24011FA", + "Content-Length" : "0", + "x-ms-request-id" : "ebd87d96-501e-0023-5ba8-5b0b41000000", + "x-ms-client-request-id" : "b82c7f49-fbab-40c2-a2af-26c2709ca8f3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983/javablobblobsassnapshot1sasclienttestsblobsassnapshotd1f034440?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "219d5eab-b947-4228-a796-533573b75eb3" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:31 GMT", + "x-ms-version-id" : "2020-07-16T19:38:31.9684524Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Thu, 16 Jul 2020 19:38:31 GMT", + "x-ms-snapshot" : "2020-07-16T19:38:31.9674524Z", + "ETag" : "0x8D829BFD24011FA", + "Content-Length" : "0", + "x-ms-request-id" : "90367d25-d01e-0094-52a8-5b26eb000000", + "x-ms-client-request-id" : "219d5eab-b947-4228-a796-533573b75eb3" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983/javablobblobsassnapshot1sasclienttestsblobsassnapshotd1f034440?sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A30Z&se=2020-07-17T19%3A38%3A30Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7c55add2-9607-4422-9e41-7d73f3e4d961" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthenticationFailed", + "retry-after" : "0", + "Content-Length" : "447", + "StatusCode" : "403", + "x-ms-request-id" : "466bb2c6-001e-0073-59a8-5bc911000000", + "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:466bb2c6-001e-0073-59a8-5bc911000000\nTime:2020-07-16T19:38:32.3294499ZThe specified signed resource is not allowed for the this resource level", + "Date" : "Thu, 16 Jul 2020 19:38:31 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983/javablobblobsassnapshot1sasclienttestsblobsassnapshotd1f034440?snapshot=2020-07-16T19%3A38%3A31.9674524Z&sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A30Z&se=2020-07-17T19%3A38%3A30Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9d19e152-a259-4d84-88c3-9c74dad6e6cd" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 16 Jul 2020 19:38:32 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D829BFD24011FA", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:31 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "d82fec4e-501e-001c-02a8-5bc3e2000000", + "Body" : "default", + "x-ms-client-request-id" : "9d19e152-a259-4d84-88c3-9c74dad6e6cd", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983/javablobblobsassnapshot1sasclienttestsblobsassnapshotd1f034440?snapshot=2020-07-16T19%3A38%3A31.9674524Z&sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A30Z&se=2020-07-17T19%3A38%3A30Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5b0bf9d3-b30e-4dc5-aea1-79ac309c438b" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 16 Jul 2020 19:38:32 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Cache-Control" : "cache", + "ETag" : "0x8D829BFD24011FA", + "Content-Disposition" : "disposition", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:31 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "28bbe5b9-f01e-0015-50a8-5b8631000000", + "x-ms-client-request-id" : "5b0bf9d3-b30e-4dc5-aea1-79ac309c438b", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsassnapshot&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "731879d7-b250-4861-9dc9-806779cb0cf7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7a25d250-101e-009b-0fa8-5b5087000000", + "Body" : "jtcblobsassnapshotjtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983Thu, 16 Jul 2020 19:38:31 GMT\"0x8D829BFD207AAAC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:33 GMT", + "x-ms-client-request-id" : "731879d7-b250-4861-9dc9-806779cb0cf7", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4bd2b0cf-8db6-4bd8-98e1-f00bf8d10e63" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "0b881b4e-a01e-0008-3da8-5b8b8d000000", + "Date" : "Thu, 16 Jul 2020 19:38:33 GMT", + "x-ms-client-request-id" : "4bd2b0cf-8db6-4bd8-98e1-f00bf8d10e63" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsassnapshot0sasclienttestsblobsassnapshotd1f92704983", "javablobblobsassnapshot1sasclienttestsblobsassnapshotd1f034440", "2020-07-16T19:38:30.202509600Z", "2020-07-16T19:38:30.202509600Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsassnapshotuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsassnapshotuserdelegation.json new file mode 100644 index 000000000000..ff80b8dc9130 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsassnapshotuserdelegation.json @@ -0,0 +1,221 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshotuserdelegation052331122b6036d3b6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "56994fcf-ae38-4f59-8b0a-093164fb4841" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFD3CABDBB", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "366d0d1c-701e-008d-48a8-5ba650000000", + "Date" : "Thu, 16 Jul 2020 19:38:33 GMT", + "x-ms-client-request-id" : "56994fcf-ae38-4f59-8b0a-093164fb4841" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshotuserdelegation052331122b6036d3b6/javablobblobsassnapshotuserdelegation185401f589978523", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a8bbb22e-757c-4854-b67c-dcff66b460ef", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:34.5052616Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:34 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:33 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFD3FDF1C8", + "Content-Length" : "0", + "x-ms-request-id" : "ee9ab8ff-a01e-0037-54a8-5b432e000000", + "x-ms-client-request-id" : "a8bbb22e-757c-4854-b67c-dcff66b460ef" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshotuserdelegation052331122b6036d3b6/javablobblobsassnapshotuserdelegation185401f589978523?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "10a88f58-2e96-4a97-9ca1-1678bab3afa6" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:34 GMT", + "x-ms-version-id" : "2020-07-16T19:38:34.8725201Z", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "false", + "Date" : "Thu, 16 Jul 2020 19:38:34 GMT", + "x-ms-snapshot" : "2020-07-16T19:38:34.8715201Z", + "ETag" : "0x8D829BFD3FDF1C8", + "Content-Length" : "0", + "x-ms-request-id" : "ff017f45-201e-0080-52a8-5b6e84000000", + "x-ms-client-request-id" : "10a88f58-2e96-4a97-9ca1-1678bab3afa6" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "381db165-b6c8-40d9-851f-4409417f7a3d", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8ff909ac-601e-0075-3aa8-5bfaae000000", + "Body" : "1f8da64d-c514-4519-8620-ba602afaa82cbb8040d4-296b-4635-95df-e8bfa1ce38542020-07-15T19:38:33Z2020-07-17T19:38:33Zb2019-12-12UkVEQUNURUQ=", + "Date" : "Thu, 16 Jul 2020 19:38:35 GMT", + "x-ms-client-request-id" : "381db165-b6c8-40d9-851f-4409417f7a3d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshotuserdelegation052331122b6036d3b6/javablobblobsassnapshotuserdelegation185401f589978523?sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A33Z&se=2020-07-17T19%3A38%3A33Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-07-15T19%3A38%3A33Z&ske=2020-07-17T19%3A38%3A33Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "225a7c68-dbc5-4acb-b8d8-72072442032a" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthenticationFailed", + "retry-after" : "0", + "Content-Length" : "447", + "StatusCode" : "403", + "x-ms-request-id" : "afee9d37-801e-001f-1fa8-5b2286000000", + "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:afee9d37-801e-001f-1fa8-5b2286000000\nTime:2020-07-16T19:38:35.7900092ZThe specified signed resource is not allowed for the this resource level", + "Date" : "Thu, 16 Jul 2020 19:38:34 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshotuserdelegation052331122b6036d3b6/javablobblobsassnapshotuserdelegation185401f589978523?snapshot=2020-07-16T19%3A38%3A34.8715201Z&sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A33Z&se=2020-07-17T19%3A38%3A33Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-07-15T19%3A38%3A33Z&ske=2020-07-17T19%3A38%3A33Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ab01dc6b-bf6b-4310-8938-ec6f1012c73c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:34 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 16 Jul 2020 19:38:35 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D829BFD3FDF1C8", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:34 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "e7728017-201e-0090-7ba8-5babec000000", + "Body" : "default", + "x-ms-client-request-id" : "ab01dc6b-bf6b-4310-8938-ec6f1012c73c", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshotuserdelegation052331122b6036d3b6/javablobblobsassnapshotuserdelegation185401f589978523?snapshot=2020-07-16T19%3A38%3A34.8715201Z&sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A33Z&se=2020-07-17T19%3A38%3A33Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-07-15T19%3A38%3A33Z&ske=2020-07-17T19%3A38%3A33Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "87cc6041-1a56-4d38-b27c-0f24059e3e92" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:34 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 16 Jul 2020 19:38:36 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Cache-Control" : "cache", + "ETag" : "0x8D829BFD3FDF1C8", + "Content-Disposition" : "disposition", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:34 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "dba90d74-001e-0087-6ea8-5b02e7000000", + "x-ms-client-request-id" : "87cc6041-1a56-4d38-b27c-0f24059e3e92", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsassnapshotuserdelegation&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "afc188a8-2b3b-4909-8624-a1f752774468" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "0106c8e2-601e-0007-17a8-5bfde1000000", + "Body" : "jtcblobsassnapshotuserdelegationjtcblobsassnapshotuserdelegation052331122b6036d3b6Thu, 16 Jul 2020 19:38:34 GMT\"0x8D829BFD3CABDBB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:36 GMT", + "x-ms-client-request-id" : "afc188a8-2b3b-4909-8624-a1f752774468", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsassnapshotuserdelegation052331122b6036d3b6?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1c79d56-6ecf-416a-a8c9-e5f33da043a4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "6d1b6918-d01e-003d-4ca8-5be799000000", + "Date" : "Thu, 16 Jul 2020 19:38:36 GMT", + "x-ms-client-request-id" : "f1c79d56-6ecf-416a-a8c9-e5f33da043a4" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsassnapshotuserdelegation052331122b6036d3b6", "javablobblobsassnapshotuserdelegation185401f589978523", "2020-07-16T19:38:33.093459400Z", "2020-07-16T19:38:33.093459400Z", "2020-07-16T19:38:33.096508600Z", "2020-07-16T19:38:33.096508600Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsastags.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsastags.json new file mode 100644 index 000000000000..20ac21fe7dd4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsastags.json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastags0sasclienttestsblobsastagse8e651980254cce?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a2285517-be5f-4074-95fc-be83ba7f4f2d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFD72F13BB", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8d28123f-001e-0097-6fa8-5bc78f000000", + "Date" : "Thu, 16 Jul 2020 19:38:39 GMT", + "x-ms-client-request-id" : "a2285517-be5f-4074-95fc-be83ba7f4f2d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastags0sasclienttestsblobsastagse8e651980254cce/javablobblobsastags1sasclienttestsblobsastagse8e90717362b3", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32ad7ae0-6688-403f-a803-a6801dd36079", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:40.1833043Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:40 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:39 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFD7605853", + "Content-Length" : "0", + "x-ms-request-id" : "a8632b39-901e-0061-60a8-5bb2c1000000", + "x-ms-client-request-id" : "32ad7ae0-6688-403f-a803-a6801dd36079" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastags0sasclienttestsblobsastagse8e651980254cce/javablobblobsastags1sasclienttestsblobsastagse8e90717362b3?comp=tags&sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A38Z&se=2020-07-17T19%3A38%3A38Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwdt&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3a7cb8c8-98b5-45cf-ad5f-c654a01632e8", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "a6c977b5-d01e-002d-33a8-5b22f1000000", + "Date" : "Thu, 16 Jul 2020 19:38:39 GMT", + "x-ms-client-request-id" : "3a7cb8c8-98b5-45cf-ad5f-c654a01632e8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastags0sasclienttestsblobsastagse8e651980254cce/javablobblobsastags1sasclienttestsblobsastagse8e90717362b3?comp=tags&sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A38Z&se=2020-07-17T19%3A38%3A38Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwdt&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6e6bcf17-caec-4a52-9ea4-5c3bbde413c2" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "115", + "StatusCode" : "200", + "x-ms-request-id" : "c678c1f1-e01e-0026-32a8-5bd99a000000", + "Body" : "\nfoobar", + "Date" : "Thu, 16 Jul 2020 19:38:39 GMT", + "x-ms-client-request-id" : "6e6bcf17-caec-4a52-9ea4-5c3bbde413c2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsastags&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9af854b5-40a6-4248-b0e5-9140493d9add" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fc35ace9-d01e-0070-20a8-5b2875000000", + "Body" : "jtcblobsastagsjtcblobsastags0sasclienttestsblobsastagse8e651980254cceThu, 16 Jul 2020 19:38:39 GMT\"0x8D829BFD72F13BB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:40 GMT", + "x-ms-client-request-id" : "9af854b5-40a6-4248-b0e5-9140493d9add", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastags0sasclienttestsblobsastagse8e651980254cce?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "733ef405-1532-4ef6-bb18-e0e1a96505fa" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "27fdfc2b-701e-0069-73a8-5ba8ce000000", + "Date" : "Thu, 16 Jul 2020 19:38:41 GMT", + "x-ms-client-request-id" : "733ef405-1532-4ef6-bb18-e0e1a96505fa" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsastags0sasclienttestsblobsastagse8e651980254cce", "javablobblobsastags1sasclienttestsblobsastagse8e90717362b3", "2020-07-16T19:38:38.401960800Z", "2020-07-16T19:38:38.401960800Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsastagsfail.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsastagsfail.json new file mode 100644 index 000000000000..fc8ea3f76cbc --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsastagsfail.json @@ -0,0 +1,114 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastagsfail0sasclienttestsblobsastagsfailf0910405ec9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9e28b209-0053-491e-a5a2-fc3d9c7c6d6d" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFD864EA73", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "2c825738-d01e-0012-3da8-5bea52000000", + "Date" : "Thu, 16 Jul 2020 19:38:40 GMT", + "x-ms-client-request-id" : "9e28b209-0053-491e-a5a2-fc3d9c7c6d6d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastagsfail0sasclienttestsblobsastagsfailf0910405ec9/javablobblobsastagsfail1sasclienttestsblobsastagsfailf0964497b", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40413706-7ab0-4b3b-8793-bec0b4f06c7e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:42.2167529Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:42 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:41 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFD8969FE9", + "Content-Length" : "0", + "x-ms-request-id" : "ac5bd067-f01e-0048-57a8-5b8cb5000000", + "x-ms-client-request-id" : "40413706-7ab0-4b3b-8793-bec0b4f06c7e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastagsfail0sasclienttestsblobsastagsfailf0910405ec9/javablobblobsastagsfail1sasclienttestsblobsastagsfailf0964497b?comp=tags&sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A40Z&se=2020-07-17T19%3A38%3A40Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40a681ee-fbca-46a4-abb4-ae0e9d384472", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "280", + "StatusCode" : "403", + "x-ms-request-id" : "d61b48ed-501e-0041-7ea8-5bc966000000", + "Body" : "\nAuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:d61b48ed-501e-0041-7ea8-5bc966000000\nTime:2020-07-16T19:38:42.5725778Z", + "Date" : "Thu, 16 Jul 2020 19:38:42 GMT", + "x-ms-client-request-id" : "40a681ee-fbca-46a4-abb4-ae0e9d384472", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsastagsfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3a0fcfb-744d-4167-aee8-511dfb006651" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "7c6c422c-901e-004e-72a8-5bbf0a000000", + "Body" : "jtcblobsastagsfailjtcblobsastagsfail0sasclienttestsblobsastagsfailf0910405ec9Thu, 16 Jul 2020 19:38:41 GMT\"0x8D829BFD864EA73\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:42 GMT", + "x-ms-client-request-id" : "e3a0fcfb-744d-4167-aee8-511dfb006651", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsastagsfail0sasclienttestsblobsastagsfailf0910405ec9?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fba5ba02-19c6-43a8-8318-b27e5e5bef03" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "2431272d-001e-005c-7ba8-5bc4da000000", + "Date" : "Thu, 16 Jul 2020 19:38:42 GMT", + "x-ms-client-request-id" : "fba5ba02-19c6-43a8-8318-b27e5e5bef03" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsastagsfail0sasclienttestsblobsastagsfailf0910405ec9", "javablobblobsastagsfail1sasclienttestsblobsastagsfailf0964497b", "2020-07-16T19:38:40.438028600Z", "2020-07-16T19:38:40.438028600Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasuserdelegation.json new file mode 100644 index 000000000000..7328100f68c7 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasuserdelegation.json @@ -0,0 +1,185 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasuserdelegation063307dccf92b48cf34f35?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "842aff06-8549-4bfb-8d4e-e030b1e3904a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFCEC728D7", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "52189659-b01e-0076-53a8-5b1bca000000", + "Date" : "Thu, 16 Jul 2020 19:38:25 GMT", + "x-ms-client-request-id" : "842aff06-8549-4bfb-8d4e-e030b1e3904a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasuserdelegation063307dccf92b48cf34f35/javablobblobsasuserdelegation198948dcc9fb6c1cd34f", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3da8f04f-c1ee-4965-b5c9-b3eac79c4938", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:26.1413056Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:26 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:26 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFCF01B4C0", + "Content-Length" : "0", + "x-ms-request-id" : "95c87240-801e-0020-0ca8-5bea25000000", + "x-ms-client-request-id" : "3da8f04f-c1ee-4965-b5c9-b3eac79c4938" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "41d787e3-a5e7-4c69-a8d9-3d5a6f5c6d0f", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c0a32883-001e-003e-74a8-5b06fd000000", + "Body" : "bd43a971-8177-4d5e-98a8-bd9f6e2dbe5192018742-2357-4270-ba14-19b1f8118a292020-07-15T19:38:24Z2020-07-17T19:38:24Zb2019-12-12UkVEQUNURUQ=", + "Date" : "Thu, 16 Jul 2020 19:38:28 GMT", + "x-ms-client-request-id" : "41d787e3-a5e7-4c69-a8d9-3d5a6f5c6d0f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasuserdelegation063307dccf92b48cf34f35/javablobblobsasuserdelegation198948dcc9fb6c1cd34f?sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A24Z&se=2020-07-17T19%3A38%3A24Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-07-15T19%3A38%3A24Z&ske=2020-07-17T19%3A38%3A24Z&sks=b&skv=2019-12-12&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4c698999-0910-4d97-bbcb-471a9a39503e" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-version" : "2019-12-12", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-16T19:38:26.1413056Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:26 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 16 Jul 2020 19:38:29 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D829BFCF01B4C0", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:26 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "dc7fde7b-d01e-0084-3fa8-5be383000000", + "Body" : "default", + "x-ms-client-request-id" : "4c698999-0910-4d97-bbcb-471a9a39503e", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasuserdelegation063307dccf92b48cf34f35/javablobblobsasuserdelegation198948dcc9fb6c1cd34f?sv=2019-12-12&spr=https%2Chttp&st=2020-07-15T19%3A38%3A24Z&se=2020-07-17T19%3A38%3A24Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-07-15T19%3A38%3A24Z&ske=2020-07-17T19%3A38%3A24Z&sks=b&skv=2019-12-12&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff24b76c-9486-47c2-b6fa-f74b13bffe68" + }, + "Response" : { + "x-ms-is-current-version" : "true", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-version-id" : "2020-07-16T19:38:26.1413056Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:26 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-blob-type" : "BlockBlob", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Thu, 16 Jul 2020 19:38:26 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "a6c96785-d01e-002d-50a8-5b22f1000000", + "Content-Type" : "type", + "x-ms-version" : "2019-12-12", + "Date" : "Thu, 16 Jul 2020 19:38:29 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D829BFCF01B4C0", + "Content-Disposition" : "disposition", + "Content-Language" : "language", + "x-ms-client-request-id" : "ff24b76c-9486-47c2-b6fa-f74b13bffe68" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobsasuserdelegation&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c81bc9a9-1e34-4f43-a8f2-a7e794c34545" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c592f5aa-801e-000f-35a8-5be7ee000000", + "Body" : "jtcblobsasuserdelegationjtcblobsasuserdelegation063307dccf92b48cf34f35Thu, 16 Jul 2020 19:38:25 GMT\"0x8D829BFCEC728D7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:29 GMT", + "x-ms-client-request-id" : "c81bc9a9-1e34-4f43-a8f2-a7e794c34545", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobsasuserdelegation063307dccf92b48cf34f35?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "df80117d-318a-4695-8b44-1c18240bf5a4" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "94539c1d-c01e-006c-77a8-5b7a15000000", + "Date" : "Thu, 16 Jul 2020 19:38:30 GMT", + "x-ms-client-request-id" : "df80117d-318a-4695-8b44-1c18240bf5a4" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasuserdelegation063307dccf92b48cf34f35", "javablobblobsasuserdelegation198948dcc9fb6c1cd34f", "2020-07-16T19:38:24.375677400Z", "2020-07-16T19:38:24.375677400Z", "2020-07-16T19:38:24.396635600Z", "2020-07-16T19:38:24.396635600Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobservicesasnetworktestblobsnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobservicesasnetworktestblobsnapshot.json deleted file mode 100644 index d9ddb839a972..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobservicesasnetworktestblobsnapshot.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot05327419250128?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "df46ff0b-10f9-4daf-945b-a7ab6ea85185" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809B8DA02E6", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2792363e-f01e-005f-10f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "x-ms-client-request-id" : "df46ff0b-10f9-4daf-945b-a7ab6ea85185" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot05327419250128/javablobblobservicesasnetworktestblobsnapshot10052327947b", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f0e8731c-71ec-41aa-b826-554e5799074e", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:52.2812025Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:52 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809B8E73079", - "Content-Length" : "0", - "x-ms-request-id" : "2792368f-f01e-005f-51f2-39421d000000", - "x-ms-client-request-id" : "f0e8731c-71ec-41aa-b826-554e5799074e" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot05327419250128/javablobblobservicesasnetworktestblobsnapshot10052327947b?comp=snapshot", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9bfa264d-6d57-4228-b950-a9a6e384c922" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:52 GMT", - "x-ms-version-id" : "2020-06-03T22:01:52.4083198Z", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "x-ms-snapshot" : "2020-06-03T22:01:52.4073198Z", - "ETag" : "0x8D80809B8E73079", - "Content-Length" : "0", - "x-ms-request-id" : "279236e6-f01e-005f-15f2-39421d000000", - "x-ms-client-request-id" : "9bfa264d-6d57-4228-b950-a9a6e384c922" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot05327419250128/javablobblobservicesasnetworktestblobsnapshot10052327947b?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A52Z&se=2020-06-04T22%3A01%3A52Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b0219d22-1d5c-43ea-a0e5-4df32e3c6b3e" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "447", - "StatusCode" : "403", - "x-ms-request-id" : "27923726-f01e-005f-4bf2-39421d000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:27923726-f01e-005f-4bf2-39421d000000\nTime:2020-06-03T22:01:52.5261552ZThe specified signed resource is not allowed for the this resource level", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot05327419250128/javablobblobservicesasnetworktestblobsnapshot10052327947b?snapshot=2020-06-03T22%3A01%3A52.4073198Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A52Z&se=2020-06-04T22%3A01%3A52Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f30c5473-b569-452c-984a-30eab0290342" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:52 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B8E73079", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:52 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "27923763-f01e-005f-7cf2-39421d000000", - "Body" : "default", - "x-ms-client-request-id" : "f30c5473-b569-452c-984a-30eab0290342", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot05327419250128/javablobblobservicesasnetworktestblobsnapshot10052327947b?snapshot=2020-06-03T22%3A01%3A52.4073198Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A52Z&se=2020-06-04T22%3A01%3A52Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8c9629b5-b778-46cf-980d-a94bb95fa1b2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:52 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:01:52 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B8E73079", - "Content-Disposition" : "disposition", - "Content-Encoding" : "encoding", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:52 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "2792379c-f01e-005f-23f2-39421d000000", - "x-ms-client-request-id" : "8c9629b5-b778-46cf-980d-a94bb95fa1b2", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcblobservicesasnetworktestblobsnapshot&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ca90af45-9b55-4b71-bc65-c1b935374d47" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "279237c7-f01e-005f-45f2-39421d000000", - "Body" : "jtcblobservicesasnetworktestblobsnapshotjtcblobservicesasnetworktestblobsnapshot05327419250128Wed, 03 Jun 2020 22:01:52 GMT\"0x8D80809B8DA02E6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:52 GMT", - "x-ms-client-request-id" : "ca90af45-9b55-4b71-bc65-c1b935374d47", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot05327419250128?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d8773134-9912-4b37-b056-a3758371387c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "279237f5-f01e-005f-6af2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:52 GMT", - "x-ms-client-request-id" : "d8773134-9912-4b37-b056-a3758371387c" - }, - "Exception" : null - } ], - "variables" : [ "jtcblobservicesasnetworktestblobsnapshot05327419250128", "javablobblobservicesasnetworktestblobsnapshot10052327947b", "2020-06-03T22:01:52.493457200Z", "2020-06-03T22:01:52.493457200Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersasidentifierandpermissions.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersasidentifierandpermissions.json new file mode 100644 index 000000000000..2811f01ae7bc --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersasidentifierandpermissions.json @@ -0,0 +1,155 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasidentifierandpermissions0890358215eefba?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dcc9fb7e-7c46-4c34-b5bb-460b89eba8f9" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFCD208C8D", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "73b9364f-e01e-0019-65a8-5b1139000000", + "Date" : "Thu, 16 Jul 2020 19:38:22 GMT", + "x-ms-client-request-id" : "dcc9fb7e-7c46-4c34-b5bb-460b89eba8f9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasidentifierandpermissions0890358215eefba/javablobcontainersasidentifierandpermissions13003504db90", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4ef4826b-b9a1-43b5-9255-4128788b1f2d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:23.3923468Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:23 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:22 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFCD5E3F8C", + "Content-Length" : "0", + "x-ms-request-id" : "a4568cb8-401e-0062-4da8-5b53a5000000", + "x-ms-client-request-id" : "4ef4826b-b9a1-43b5-9255-4128788b1f2d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasidentifierandpermissions0890358215eefba?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "32eb2494-0b4a-4590-8244-a333cad42da5", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFCDA341DD", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "fb6e9901-701e-0034-71a8-5ba24a000000", + "Date" : "Thu, 16 Jul 2020 19:38:23 GMT", + "x-ms-client-request-id" : "32eb2494-0b4a-4590-8244-a333cad42da5" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasidentifierandpermissions0890358215eefba?restype=container&comp=list&sv=2019-12-12&si=0000&sr=c&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "405e679f-6ba2-421e-8f1d-76a775d6bcb4" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "8876e704-801e-007d-06a8-5be0a1000000", + "Body" : "javablobcontainersasidentifierandpermissions13003504db902020-07-16T19:38:23.3923468ZtrueThu, 16 Jul 2020 19:38:23 GMTThu, 16 Jul 2020 19:38:23 GMT0x8D829BFCD5E3F8C7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 19:38:23 GMT", + "x-ms-client-request-id" : "405e679f-6ba2-421e-8f1d-76a775d6bcb4", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasidentifierandpermissions0890358215eefba?restype=container&comp=list&sv=2019-12-12&se=2020-07-17T19%3A38%3A22Z&sr=c&sp=racwdl&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ea9b020e-3f24-4d12-a547-d27a290acc47" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "bb33b2cd-501e-008a-0fa8-5bca33000000", + "Body" : "javablobcontainersasidentifierandpermissions13003504db902020-07-16T19:38:23.3923468ZtrueThu, 16 Jul 2020 19:38:23 GMTThu, 16 Jul 2020 19:38:23 GMT0x8D829BFCD5E3F8C7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 19:38:23 GMT", + "x-ms-client-request-id" : "ea9b020e-3f24-4d12-a547-d27a290acc47", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersasidentifierandpermissions&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6fe58b7e-1f40-4634-9d48-dbb50a6f0c78" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "776ff070-c01e-0098-02a8-5bb1e3000000", + "Body" : "jtccontainersasidentifierandpermissionsjtccontainersasidentifierandpermissions0890358215eefbaThu, 16 Jul 2020 19:38:23 GMT\"0x8D829BFCDA341DD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:24 GMT", + "x-ms-client-request-id" : "6fe58b7e-1f40-4634-9d48-dbb50a6f0c78", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasidentifierandpermissions0890358215eefba?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f2a2fac1-e318-44ec-82ef-4d3457febe86" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "8d80e1d2-601e-0091-23a8-5bf430000000", + "Date" : "Thu, 16 Jul 2020 19:38:25 GMT", + "x-ms-client-request-id" : "f2a2fac1-e318-44ec-82ef-4d3457febe86" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainersasidentifierandpermissions0890358215eefba", "javablobcontainersasidentifierandpermissions13003504db90", "2020-07-16T19:38:21.632321400Z", "2020-07-16T19:38:22.084307300Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersastags.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersastags.json new file mode 100644 index 000000000000..21b4fdbf72a4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersastags.json @@ -0,0 +1,131 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastags0sasclienttestscontainersastags87b172982d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e35769c0-afae-4d95-a2e7-84f303a6e674" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFD96C62F3", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6f502720-c01e-007c-46a8-5bbf7d000000", + "Date" : "Thu, 16 Jul 2020 19:38:43 GMT", + "x-ms-client-request-id" : "e35769c0-afae-4d95-a2e7-84f303a6e674" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastags0sasclienttestscontainersastags87b172982d/javablobcontainersastags10764719af29be268840de", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "71c676de-83d5-4c55-be3b-a01bb27dd9db", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:43.9519882Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:43 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:43 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFD99F668A", + "Content-Length" : "0", + "x-ms-request-id" : "b2d993cb-f01e-003a-30a8-5b8bfa000000", + "x-ms-client-request-id" : "71c676de-83d5-4c55-be3b-a01bb27dd9db" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastags0sasclienttestscontainersastags87b172982d/javablobcontainersastags10764719af29be268840de?comp=tags&sv=2019-12-12&se=2020-07-17T19%3A38%3A42Z&sr=c&sp=racwdxlt&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a417632d-d131-4aaf-86f7-cfd0fc9c5d82", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "0b8836e4-a01e-0008-49a8-5b8b8d000000", + "Date" : "Thu, 16 Jul 2020 19:38:43 GMT", + "x-ms-client-request-id" : "a417632d-d131-4aaf-86f7-cfd0fc9c5d82" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastags0sasclienttestscontainersastags87b172982d/javablobcontainersastags10764719af29be268840de?comp=tags&sv=2019-12-12&se=2020-07-17T19%3A38%3A42Z&sr=c&sp=racwdxlt&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c700e3f2-c04b-4957-87ae-ed3280f6b591" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "115", + "StatusCode" : "200", + "x-ms-request-id" : "366d1f78-701e-008d-56a8-5ba650000000", + "Body" : "\nfoobar", + "Date" : "Thu, 16 Jul 2020 19:38:44 GMT", + "x-ms-client-request-id" : "c700e3f2-c04b-4957-87ae-ed3280f6b591", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersastags&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ace2abae-9ab0-403b-83d6-ec10ac127c1d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "ee9acade-a01e-0037-13a8-5b432e000000", + "Body" : "jtccontainersastagsjtccontainersastags0sasclienttestscontainersastags87b172982dThu, 16 Jul 2020 19:38:43 GMT\"0x8D829BFD96C62F3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:44 GMT", + "x-ms-client-request-id" : "ace2abae-9ab0-403b-83d6-ec10ac127c1d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastags0sasclienttestscontainersastags87b172982d?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "beaf5aaa-ca90-4d1f-a49b-3e38d2599581" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "ff0195f5-201e-0080-80a8-5b6e84000000", + "Date" : "Thu, 16 Jul 2020 19:38:45 GMT", + "x-ms-client-request-id" : "beaf5aaa-ca90-4d1f-a49b-3e38d2599581" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainersastags0sasclienttestscontainersastags87b172982d", "javablobcontainersastags10764719af29be268840de", "2020-07-16T19:38:42.171036700Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersastagsfail.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersastagsfail.json new file mode 100644 index 000000000000..582a87162e01 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersastagsfail.json @@ -0,0 +1,114 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastagsfail006078116056193a414ae0b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "769f3b85-29ea-4ffd-8091-d1b7412eea3a" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFDA9EE87D", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "8ff91054-601e-0075-23a8-5bfaae000000", + "Date" : "Thu, 16 Jul 2020 19:38:45 GMT", + "x-ms-client-request-id" : "769f3b85-29ea-4ffd-8091-d1b7412eea3a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastagsfail006078116056193a414ae0b/javablobcontainersastagsfail13271105f5c9f1798041", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "60d26a08-0f13-4e68-a109-ea376bbf5628", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:45.9514130Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:45 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:45 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFDAD07D12", + "Content-Length" : "0", + "x-ms-request-id" : "afeea623-801e-001f-7da8-5b2286000000", + "x-ms-client-request-id" : "60d26a08-0f13-4e68-a109-ea376bbf5628" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastagsfail006078116056193a414ae0b/javablobcontainersastagsfail13271105f5c9f1798041?comp=tags&sv=2019-12-12&se=2020-07-17T19%3A38%3A44Z&sr=b&sp=racwd&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e73fa56c-1dce-44ef-8b6c-2aaacd35c534", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "280", + "StatusCode" : "403", + "x-ms-request-id" : "e7728c39-201e-0090-77a8-5babec000000", + "Body" : "\nAuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:e7728c39-201e-0090-77a8-5babec000000\nTime:2020-07-16T19:38:46.2663123Z", + "Date" : "Thu, 16 Jul 2020 19:38:45 GMT", + "x-ms-client-request-id" : "e73fa56c-1dce-44ef-8b6c-2aaacd35c534", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersastagsfail&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6642af5a-3752-49bd-8168-9d2782ca2630" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a9c50ffd-801e-0089-20a8-5b2b57000000", + "Body" : "jtccontainersastagsfailjtccontainersastagsfail006078116056193a414ae0bThu, 16 Jul 2020 19:38:45 GMT\"0x8D829BFDA9EE87D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:46 GMT", + "x-ms-client-request-id" : "6642af5a-3752-49bd-8168-9d2782ca2630", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersastagsfail006078116056193a414ae0b?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c2a8ed3f-18c2-4128-97ad-e9eac3b1e8ec" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "09ff98d0-301e-0047-12a8-5bfad9000000", + "Date" : "Thu, 16 Jul 2020 19:38:46 GMT", + "x-ms-client-request-id" : "c2a8ed3f-18c2-4128-97ad-e9eac3b1e8ec" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainersastagsfail006078116056193a414ae0b", "javablobcontainersastagsfail13271105f5c9f1798041", "2020-07-16T19:38:44.168013700Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersasuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersasuserdelegation.json new file mode 100644 index 000000000000..d5d4a4ed4b88 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestscontainersasuserdelegation.json @@ -0,0 +1,134 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasuserdelegation05035206f831c5025e40?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2e7143e7-97d6-4fef-bf89-ecb949022fd8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829BFD5D1D156", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "5c84b0ff-201e-004b-35a8-5b6dd1000000", + "Date" : "Thu, 16 Jul 2020 19:38:37 GMT", + "x-ms-client-request-id" : "2e7143e7-97d6-4fef-bf89-ecb949022fd8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasuserdelegation05035206f831c5025e40/javablobcontainersasuserdelegation17759669ad992489d", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fb63b8e5-a8fb-43d0-a4b9-b19b38c36e7c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "x-ms-version-id" : "2020-07-16T19:38:37.9006790Z", + "Last-Modified" : "Thu, 16 Jul 2020 19:38:37 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Thu, 16 Jul 2020 19:38:36 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D829BFD603E42C", + "Content-Length" : "0", + "x-ms-request-id" : "823c8cd0-f01e-0093-07a8-5b4a88000000", + "x-ms-client-request-id" : "fb63b8e5-a8fb-43d0-a4b9-b19b38c36e7c" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7b96723-05aa-4d08-b50b-6d2d459a775e", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "f238f832-201e-0039-79a8-5b6a9e000000", + "Body" : "f9e626bd-82a9-4d96-af57-29ec02c6cfb19ed16e4c-7299-4ec5-9d16-dcab7f22f4242020-07-15T19:38:36Z2020-07-17T19:38:36Zb2019-12-12UkVEQUNURUQ=", + "Date" : "Thu, 16 Jul 2020 19:38:38 GMT", + "x-ms-client-request-id" : "a7b96723-05aa-4d08-b50b-6d2d459a775e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasuserdelegation05035206f831c5025e40?restype=container&comp=list&sv=2019-12-12&se=2020-07-17T19%3A38%3A36Z&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-07-15T19%3A38%3A36Z&ske=2020-07-17T19%3A38%3A36Z&sks=b&skv=2019-12-12&sr=c&sp=racwdl&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3e042da9-bcf2-4af2-b32c-ad6ea36dae9a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "90141b35-101e-006f-6ba8-5b9b71000000", + "Body" : "javablobcontainersasuserdelegation17759669ad992489d2020-07-16T19:38:37.9006790ZtrueThu, 16 Jul 2020 19:38:37 GMTThu, 16 Jul 2020 19:38:37 GMT0x8D829BFD603E42C7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Thu, 16 Jul 2020 19:38:38 GMT", + "x-ms-client-request-id" : "3e042da9-bcf2-4af2-b32c-ad6ea36dae9a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtccontainersasuserdelegation&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4593e9b1-61e8-46b3-aef2-3d40e4e49846" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e24d74e4-a01e-0018-51a8-5b4ee5000000", + "Body" : "jtccontainersasuserdelegationjtccontainersasuserdelegation05035206f831c5025e40Thu, 16 Jul 2020 19:38:37 GMT\"0x8D829BFD5D1D156\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 19:38:38 GMT", + "x-ms-client-request-id" : "4593e9b1-61e8-46b3-aef2-3d40e4e49846", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtccontainersasuserdelegation05035206f831c5025e40?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fe7a78b4-043e-40a8-bc69-38ee5e8609c0" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d81e3226-301e-0025-04a8-5b38fe000000", + "Date" : "Thu, 16 Jul 2020 19:38:39 GMT", + "x-ms-client-request-id" : "fe7a78b4-043e-40a8-bc69-38ee5e8609c0" + }, + "Exception" : null + } ], + "variables" : [ "jtccontainersasuserdelegation05035206f831c5025e40", "javablobcontainersasuserdelegation17759669ad992489d", "2020-07-16T19:38:36.118960100Z", "2020-07-16T19:38:36.120959Z", "2020-07-16T19:38:36.120959Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateillegalargument.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateillegalargument.json deleted file mode 100644 index 3c4dd525ae09..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateillegalargument.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateillegalargument06017560147d51accc42?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ace4d6dd-b202-4a5f-bf60-d3dfb6e3b367" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BC26EEB1", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:57 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "279242d7-f01e-005f-54f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "ace4d6dd-b202-4a5f-bf60-d3dfb6e3b367" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateillegalargument06017560147d51accc42/javablobensurestateillegalargument12210020123f3ee02", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c6e93e91-d55a-40de-b5d3-0c78c3dbe729", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:57.8264648Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BC355448", - "Content-Length" : "0", - "x-ms-request-id" : "fd65c71e-c01e-007b-79f2-39b4bd000000", - "x-ms-client-request-id" : "c6e93e91-d55a-40de-b5d3-0c78c3dbe729" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcensurestateillegalargument&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "75752da8-b54d-4ad6-a4b4-cf78a2f00e0e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "27924351-f01e-005f-35f2-39421d000000", - "Body" : "jtcensurestateillegalargumentjtcensurestateillegalargument06017560147d51accc42Wed, 03 Jun 2020 22:01:57 GMT\"0x8D80809BC26EEB1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "75752da8-b54d-4ad6-a4b4-cf78a2f00e0e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateillegalargument06017560147d51accc42?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "73a029f9-b15d-4f20-8d91-f041074cf59d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c772-c01e-007b-3ef2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "73a029f9-b15d-4f20-8d91-f041074cf59d" - }, - "Exception" : null - } ], - "variables" : [ "jtcensurestateillegalargument06017560147d51accc42", "javablobensurestateillegalargument12210020123f3ee02" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[0].json deleted file mode 100644 index 8ff512131b65..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[0].json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission0023614a75808baba?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a1d45446-96a4-4500-b626-23a785303ea8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BC5D2705", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:58 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "279243bc-f01e-005f-0cf2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "a1d45446-96a4-4500-b626-23a785303ea8" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission0023614a75808baba/javablobensurestateresourceandpermission1022474ca8d02a", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0a4d0a64-8320-41b4-97d7-b48eb8f59513", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:58.1727937Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BC6A2CC1", - "Content-Length" : "0", - "x-ms-request-id" : "fd65c7d0-c01e-007b-09f2-39b4bd000000", - "x-ms-client-request-id" : "0a4d0a64-8320-41b4-97d7-b48eb8f59513" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcensurestateresourceandpermission&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ffdeebf3-049a-4446-878e-7c9aa5956b0e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "2792442f-f01e-005f-61f2-39421d000000", - "Body" : "jtcensurestateresourceandpermissionjtcensurestateresourceandpermission0023614a75808babaWed, 03 Jun 2020 22:01:58 GMT\"0x8D80809BC5D2705\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "ffdeebf3-049a-4446-878e-7c9aa5956b0e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission0023614a75808baba?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "189280a9-0388-4ec2-b43e-159186b8da8c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c7ff-c01e-007b-2ff2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "x-ms-client-request-id" : "189280a9-0388-4ec2-b43e-159186b8da8c" - }, - "Exception" : null - } ], - "variables" : [ "jtcensurestateresourceandpermission0023614a75808baba", "javablobensurestateresourceandpermission1022474ca8d02a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[1].json deleted file mode 100644 index d8812839ed6f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[1].json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission0148370f0c6b4c98e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f2b50fed-0f3e-46fd-ac42-8d6cfb2e4baa" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BC905165", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:58 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2792447a-f01e-005f-1bf2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "f2b50fed-0f3e-46fd-ac42-8d6cfb2e4baa" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission0148370f0c6b4c98e/javablobensurestateresourceandpermission1016121aa1241e", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c744a8d7-18d6-462c-a02f-db35ce0d122f", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:58.5191229Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BC9F053D", - "Content-Length" : "0", - "x-ms-request-id" : "fd65c833-c01e-007b-55f2-39b4bd000000", - "x-ms-client-request-id" : "c744a8d7-18d6-462c-a02f-db35ce0d122f" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcensurestateresourceandpermission&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fe69e998-8d3d-469e-9d10-ea87a9302b2d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "279244bd-f01e-005f-4cf2-39421d000000", - "Body" : "jtcensurestateresourceandpermissionjtcensurestateresourceandpermission0148370f0c6b4c98eWed, 03 Jun 2020 22:01:58 GMT\"0x8D80809BC905165\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "fe69e998-8d3d-469e-9d10-ea87a9302b2d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission0148370f0c6b4c98e?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3432cf37-6586-4668-9e18-8816b720ee3c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c86a-c01e-007b-01f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "x-ms-client-request-id" : "3432cf37-6586-4668-9e18-8816b720ee3c" - }, - "Exception" : null - } ], - "variables" : [ "jtcensurestateresourceandpermission0148370f0c6b4c98e", "javablobensurestateresourceandpermission1016121aa1241e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[2].json deleted file mode 100644 index 9356961b755f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[2].json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission022295fe63805694c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e31bf3e1-723a-4a79-b81e-d29fb33c06e4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BCC5ED77", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:58 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2792450f-f01e-005f-0bf2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "x-ms-client-request-id" : "e31bf3e1-723a-4a79-b81e-d29fb33c06e4" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission022295fe63805694c/javablobensurestateresourceandpermission163531a19be595", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3142a200-ced5-4093-a632-67ae03ef4602", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:58.9034892Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BCD9846E", - "Content-Length" : "0", - "x-ms-request-id" : "fd65c8b3-c01e-007b-3ef2-39b4bd000000", - "x-ms-client-request-id" : "3142a200-ced5-4093-a632-67ae03ef4602" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcensurestateresourceandpermission&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "807795fa-b03f-40fc-8a0d-9c05e5612a86" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "2792458e-f01e-005f-75f2-39421d000000", - "Body" : "jtcensurestateresourceandpermissionjtcensurestateresourceandpermission022295fe63805694cWed, 03 Jun 2020 22:01:58 GMT\"0x8D80809BCC5ED77\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "x-ms-client-request-id" : "807795fa-b03f-40fc-8a0d-9c05e5612a86", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission022295fe63805694c?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4521c1ae-4c6d-420a-a66c-fff260f41f92" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c8fd-c01e-007b-7af2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "x-ms-client-request-id" : "4521c1ae-4c6d-420a-a66c-fff260f41f92" - }, - "Exception" : null - } ], - "variables" : [ "jtcensurestateresourceandpermission022295fe63805694c", "javablobensurestateresourceandpermission163531a19be595" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[3].json deleted file mode 100644 index 0bc19193d64a..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[3].json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission081641bd21add3a6f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "21f0eaf1-31aa-42be-b29b-c0ffc4c73389" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BD05C522", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:59 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "27924612-f01e-005f-5ff2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "x-ms-client-request-id" : "21f0eaf1-31aa-42be-b29b-c0ffc4c73389" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission081641bd21add3a6f/javablobensurestateresourceandpermission18785780e86747", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ffbc565c-c803-4f4d-9541-b4c87e95a0ce", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:59.2788465Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:59 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BD12F1F1", - "Content-Length" : "0", - "x-ms-request-id" : "fd65c945-c01e-007b-32f2-39b4bd000000", - "x-ms-client-request-id" : "ffbc565c-c803-4f4d-9541-b4c87e95a0ce" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcensurestateresourceandpermission&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fc7fea85-31a0-4bd3-aaf1-cb1c1baa9cb0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "279246a0-f01e-005f-51f2-39421d000000", - "Body" : "jtcensurestateresourceandpermissionjtcensurestateresourceandpermission081641bd21add3a6fWed, 03 Jun 2020 22:01:59 GMT\"0x8D80809BD05C522\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:58 GMT", - "x-ms-client-request-id" : "fc7fea85-31a0-4bd3-aaf1-cb1c1baa9cb0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateresourceandpermission081641bd21add3a6f?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3d3b1f55-95f2-4f36-9ab9-6ea67f0d7e9a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c978-c01e-007b-59f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:59 GMT", - "x-ms-client-request-id" : "3d3b1f55-95f2-4f36-9ab9-6ea67f0d7e9a" - }, - "Exception" : null - } ], - "variables" : [ "jtcensurestateresourceandpermission081641bd21add3a6f", "javablobensurestateresourceandpermission18785780e86747" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateversion.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateversion.json deleted file mode 100644 index 5a6ea78b298f..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateversion.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateversion0sasclienttestsensurestateversion65630951?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "43a49805-ad16-4375-ba45-0933e660e462" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BBF152C3", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:57 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "27924229-f01e-005f-4df2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "43a49805-ad16-4375-ba45-0933e660e462" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateversion0sasclienttestsensurestateversion65630951/javablobensurestateversion105588b9628091a7f340b", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "139725ca-c6c7-4f24-915d-ea51f02e7de7", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:57.4681260Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BBFEA6AC", - "Content-Length" : "0", - "x-ms-request-id" : "fd65c698-c01e-007b-0ef2-39b4bd000000", - "x-ms-client-request-id" : "139725ca-c6c7-4f24-915d-ea51f02e7de7" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcensurestateversion&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "676e0137-4ad4-4c76-8229-b0818162a3e0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "2792428d-f01e-005f-19f2-39421d000000", - "Body" : "jtcensurestateversionjtcensurestateversion0sasclienttestsensurestateversion65630951Wed, 03 Jun 2020 22:01:57 GMT\"0x8D80809BBF152C3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:56 GMT", - "x-ms-client-request-id" : "676e0137-4ad4-4c76-8229-b0818162a3e0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcensurestateversion0sasclienttestsensurestateversion65630951?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4a607f39-b176-4933-85b5-9cdb62587850" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "fd65c6d4-c01e-007b-39f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:57 GMT", - "x-ms-client-request-id" : "4a607f39-b176-4933-85b5-9cdb62587850" - }, - "Exception" : null - } ], - "variables" : [ "jtcensurestateversion0sasclienttestsensurestateversion65630951", "javablobensurestateversion105588b9628091a7f340b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsas.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsas.json deleted file mode 100644 index 24976df13aa9..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsas.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas68725948?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "938f19db-6454-41f3-a810-7fdc4237cf2c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809B5A363CF", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:46 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "27922a6f-f01e-005f-4ef2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:46 GMT", - "x-ms-client-request-id" : "938f19db-6454-41f3-a810-7fdc4237cf2c" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas68725948/javablobnetworktestblobsas17634305ab12644a4f460", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ba53c77a-a20e-4cb1-82c4-59212be1e451", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:47.6007587Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:47 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:46 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809B61CDB89", - "Content-Length" : "0", - "x-ms-request-id" : "27922c70-f01e-005f-5bf2-39421d000000", - "x-ms-client-request-id" : "ba53c77a-a20e-4cb1-82c4-59212be1e451" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas68725948/javablobnetworktestblobsas17634305ab12644a4f460?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A47Z&se=2020-06-04T22%3A01%3A47Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f444c7cb-8c3f-4226-80ff-3b3133ae43b7" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:01:47.6007587Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:47 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-blob-type" : "BlockBlob", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:47 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "27922d47-f01e-005f-7df2-39421d000000", - "Body" : "default", - "Content-Type" : "type", - "x-ms-version" : "2019-12-12", - "Date" : "Wed, 03 Jun 2020 22:01:47 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B61CDB89", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-client-request-id" : "f444c7cb-8c3f-4226-80ff-3b3133ae43b7", - "Content-Language" : "language" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas68725948/javablobnetworktestblobsas17634305ab12644a4f460?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A47Z&se=2020-06-04T22%3A01%3A47Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "052c59a6-d9ca-424d-a927-b015b080bc69" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:01:47.6007587Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:47 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-blob-type" : "BlockBlob", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Content-Encoding" : "encoding", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:47 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "27922de1-f01e-005f-7cf2-39421d000000", - "Content-Type" : "type", - "x-ms-version" : "2019-12-12", - "Date" : "Wed, 03 Jun 2020 22:01:47 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B61CDB89", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "Content-Language" : "language", - "x-ms-client-request-id" : "052c59a6-d9ca-424d-a927-b015b080bc69" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcnetworktestblobsas&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "023e3f28-3636-4b42-8783-1f3b7bbfabc1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "27922e40-f01e-005f-48f2-39421d000000", - "Body" : "jtcnetworktestblobsasjtcnetworktestblobsas0sasclienttestsnetworktestblobsas68725948Wed, 03 Jun 2020 22:01:46 GMT\"0x8D80809B5A363CF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:47 GMT", - "x-ms-client-request-id" : "023e3f28-3636-4b42-8783-1f3b7bbfabc1", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas68725948?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c6733588-00ba-4d6f-8b17-1713afb8c55b" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "27922ec0-f01e-005f-2ff2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "x-ms-client-request-id" : "c6733588-00ba-4d6f-8b17-1713afb8c55b" - }, - "Exception" : null - } ], - "variables" : [ "jtcnetworktestblobsas0sasclienttestsnetworktestblobsas68725948", "javablobnetworktestblobsas17634305ab12644a4f460", "2020-06-03T22:01:47.738994700Z", "2020-06-03T22:01:47.806555700Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshot.json deleted file mode 100644 index 8e919ba63042..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshot.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshot0724309bf59281380d489?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0351a112-c57a-4f59-b4b9-b2a543e392dd" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809B6DAD03F", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:48 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "27922f1a-f01e-005f-72f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "x-ms-client-request-id" : "0351a112-c57a-4f59-b4b9-b2a543e392dd" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshot0724309bf59281380d489/javablobnetworktestblobsnapshot19355664f2682691ee4", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "2c76a574-e696-41b1-8625-bd08a09e8d48", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:48.9390299Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:48 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809B6E936DB", - "Content-Length" : "0", - "x-ms-request-id" : "27922f41-f01e-005f-0ef2-39421d000000", - "x-ms-client-request-id" : "2c76a574-e696-41b1-8625-bd08a09e8d48" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshot0724309bf59281380d489/javablobnetworktestblobsnapshot227154fd8c8a72858e4", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "db6eea6d-4a22-4f8d-a508-81c2048da20e", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "Q7G6/s6+u/k=", - "x-ms-version-id" : "2020-06-03T22:01:49.0271136Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "ETag" : "0x8D80809B6F6A7A0", - "Content-Length" : "0", - "x-ms-request-id" : "27922f62-f01e-005f-27f2-39421d000000", - "x-ms-client-request-id" : "db6eea6d-4a22-4f8d-a508-81c2048da20e" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshot0724309bf59281380d489/javablobnetworktestblobsnapshot227154fd8c8a72858e4?comp=snapshot", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "db5710bb-0f90-49dc-a9cb-9f987feeafeb" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:49 GMT", - "x-ms-version-id" : "2020-06-03T22:01:49.1412186Z", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "x-ms-snapshot" : "2020-06-03T22:01:49.1402186Z", - "ETag" : "0x8D80809B6F6A7A0", - "Content-Length" : "0", - "x-ms-request-id" : "27922fb1-f01e-005f-64f2-39421d000000", - "x-ms-client-request-id" : "db5710bb-0f90-49dc-a9cb-9f987feeafeb" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshot0724309bf59281380d489/javablobnetworktestblobsnapshot227154fd8c8a72858e4?snapshot=2020-06-03T22%3A01%3A49.1402186Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A49Z&se=2020-06-04T22%3A01%3A49Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b77d7424-db95-48f9-a1d4-018760b946f4" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:49 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B6F6A7A0", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:49 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "27922fed-f01e-005f-16f2-39421d000000", - "Body" : "test", - "x-ms-client-request-id" : "b77d7424-db95-48f9-a1d4-018760b946f4", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshot0724309bf59281380d489/javablobnetworktestblobsnapshot227154fd8c8a72858e4?snapshot=2020-06-03T22%3A01%3A49.1402186Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A49Z&se=2020-06-04T22%3A01%3A49Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "621dae51-e520-44e0-94cc-8a62bd49c016" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:49 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B6F6A7A0", - "Content-Disposition" : "disposition", - "Content-Encoding" : "encoding", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:49 GMT", - "Content-Length" : "4", - "x-ms-request-id" : "27923024-f01e-005f-42f2-39421d000000", - "x-ms-client-request-id" : "621dae51-e520-44e0-94cc-8a62bd49c016", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcnetworktestblobsnapshot&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "76ceb0a6-cdd9-4f34-a149-57e0f37e7d5d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "27923048-f01e-005f-5ff2-39421d000000", - "Body" : "jtcnetworktestblobsnapshotjtcnetworktestblobsnapshot0724309bf59281380d489Wed, 03 Jun 2020 22:01:48 GMT\"0x8D80809B6DAD03F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "x-ms-client-request-id" : "76ceb0a6-cdd9-4f34-a149-57e0f37e7d5d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshot0724309bf59281380d489?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "e6e07e95-b661-45ba-8fb2-c5bba49860c8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "27923063-f01e-005f-73f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "x-ms-client-request-id" : "e6e07e95-b661-45ba-8fb2-c5bba49860c8" - }, - "Exception" : null - } ], - "variables" : [ "jtcnetworktestblobsnapshot0724309bf59281380d489", "javablobnetworktestblobsnapshot19355664f2682691ee4", "javablobnetworktestblobsnapshot227154fd8c8a72858e4", "2020-06-03T22:01:49.247553600Z", "2020-06-03T22:01:49.247553600Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshotuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshotuserdelegation.json deleted file mode 100644 index 06d877e05a52..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshotuserdelegation.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation0569324ba54951?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "be830fe7-fe86-421d-950e-1e98e643996d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809B94E64F0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:52 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2792381b-f01e-005f-07f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:52 GMT", - "x-ms-client-request-id" : "be830fe7-fe86-421d-950e-1e98e643996d" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation0569324ba54951/javablobnetworktestblobsnapshotuserdelegation172781c8c1b4", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c8fac031-47a5-4f9c-8b54-917701229078", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:53.0439247Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:53 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:52 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809B95B924F", - "Content-Length" : "0", - "x-ms-request-id" : "27923846-f01e-005f-25f2-39421d000000", - "x-ms-client-request-id" : "c8fac031-47a5-4f9c-8b54-917701229078" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation0569324ba54951/javablobnetworktestblobsnapshotuserdelegation172781c8c1b4?comp=snapshot", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8bd7a5c4-f1a1-4909-b536-3439ffc6808f" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:53 GMT", - "x-ms-version-id" : "2020-06-03T22:01:53.1300037Z", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "false", - "Date" : "Wed, 03 Jun 2020 22:01:52 GMT", - "x-ms-snapshot" : "2020-06-03T22:01:53.1290037Z", - "ETag" : "0x8D80809B95B924F", - "Content-Length" : "0", - "x-ms-request-id" : "27923870-f01e-005f-44f2-39421d000000", - "x-ms-client-request-id" : "8bd7a5c4-f1a1-4909-b536-3439ffc6808f" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a4305d29-4252-4099-8ed0-0582ca7ef758", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "27923951-f01e-005f-71f2-39421d000000", - "Body" : "115a95e4-5528-4526-8d85-0f06f77223917d9ae959-9aaf-426b-a0d1-f55a679c66442020-06-02T22:01:53Z2020-06-04T22:01:53Zb2019-12-12UkVEQUNURUQ=", - "Date" : "Wed, 03 Jun 2020 22:01:52 GMT", - "x-ms-client-request-id" : "a4305d29-4252-4099-8ed0-0582ca7ef758", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation0569324ba54951/javablobnetworktestblobsnapshotuserdelegation172781c8c1b4?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A53Z&se=2020-06-04T22%3A01%3A53Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A01%3A53Z&ske=2020-06-04T22%3A01%3A53Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f8cd2fd7-81eb-43c2-b216-643e232ed8ce" - }, - "Response" : { - "Server" : "Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "AuthenticationFailed", - "retry-after" : "0", - "Content-Length" : "447", - "StatusCode" : "403", - "x-ms-request-id" : "27923992-f01e-005f-25f2-39421d000000", - "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:27923992-f01e-005f-25f2-39421d000000\nTime:2020-06-03T22:01:53.6582338ZThe specified signed resource is not allowed for the this resource level", - "Date" : "Wed, 03 Jun 2020 22:01:52 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation0569324ba54951/javablobnetworktestblobsnapshotuserdelegation172781c8c1b4?snapshot=2020-06-03T22%3A01%3A53.1290037Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A53Z&se=2020-06-04T22%3A01%3A53Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A01%3A53Z&ske=2020-06-04T22%3A01%3A53Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c8c15b09-735e-45ec-bfaf-43ff1e2ee52e" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:53 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:01:54 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B95B924F", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:53 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "fd65c1af-c01e-007b-3ef2-39b4bd000000", - "Body" : "default", - "x-ms-client-request-id" : "c8c15b09-735e-45ec-bfaf-43ff1e2ee52e", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation0569324ba54951/javablobnetworktestblobsnapshotuserdelegation172781c8c1b4?snapshot=2020-06-03T22%3A01%3A53.1290037Z&sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A53Z&se=2020-06-04T22%3A01%3A53Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A01%3A53Z&ske=2020-06-04T22%3A01%3A53Z&sks=b&skv=2019-12-12&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5a5d97f3-28f3-4537-a03c-7f195e0ad6e2" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:53 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Wed, 03 Jun 2020 22:01:53 GMT", - "x-ms-blob-type" : "BlockBlob", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B95B924F", - "Content-Disposition" : "disposition", - "Content-Encoding" : "encoding", - "Vary" : "Origin", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:53 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "27923ae3-f01e-005f-24f2-39421d000000", - "x-ms-client-request-id" : "5a5d97f3-28f3-4537-a03c-7f195e0ad6e2", - "Content-Language" : "language", - "Content-Type" : "type" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcnetworktestblobsnapshotuserdelegation&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d6593a58-44d0-4f5f-898b-ca1244fa4d5f" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "fd65c239-c01e-007b-25f2-39b4bd000000", - "Body" : "jtcnetworktestblobsnapshotuserdelegationjtcnetworktestblobsnapshotuserdelegation0569324ba54951Wed, 03 Jun 2020 22:01:52 GMT\"0x8D80809B94E64F0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:54 GMT", - "x-ms-client-request-id" : "d6593a58-44d0-4f5f-898b-ca1244fa4d5f", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation0569324ba54951?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b6dcfbb4-8b0e-4680-9e26-f3e2240776f7" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "27923b28-f01e-005f-61f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:53 GMT", - "x-ms-client-request-id" : "b6dcfbb4-8b0e-4680-9e26-f3e2240776f7" - }, - "Exception" : null - } ], - "variables" : [ "jtcnetworktestblobsnapshotuserdelegation0569324ba54951", "javablobnetworktestblobsnapshotuserdelegation172781c8c1b4", "2020-06-03T22:01:53.215433300Z", "2020-06-03T22:01:53.215433300Z", "2020-06-03T22:01:53.216433900Z", "2020-06-03T22:01:53.216433900Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobuserdelegation.json deleted file mode 100644 index 77c63beb913e..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobuserdelegation.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobuserdelegation0240920c13275c5672?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f61e0176-1e45-42c4-a9a0-784343a58dc1" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809B7D6D298", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:50 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "27923262-f01e-005f-05f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:49 GMT", - "x-ms-client-request-id" : "f61e0176-1e45-42c4-a9a0-784343a58dc1" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobuserdelegation0240920c13275c5672/javablobnetworktestblobuserdelegation1625734a91e1eae9", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "52057918-a129-4bfe-bcda-06ef97c25ae4", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:50.5865925Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:49 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809B7E475B4", - "Content-Length" : "0", - "x-ms-request-id" : "27923299-f01e-005f-32f2-39421d000000", - "x-ms-client-request-id" : "52057918-a129-4bfe-bcda-06ef97c25ae4" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a88725eb-a22c-427f-9504-02bc06f321f9", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "279234a6-f01e-005f-4cf2-39421d000000", - "Body" : "e0ef5eef-4e5f-433c-bbc1-6aea1c61c9dda7fa0a41-4ae3-41b4-8ec1-d006d41d2c392020-06-02T22:01:50Z2020-06-04T22:01:50Zb2019-12-12UkVEQUNURUQ=", - "Date" : "Wed, 03 Jun 2020 22:01:50 GMT", - "x-ms-client-request-id" : "a88725eb-a22c-427f-9504-02bc06f321f9", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobuserdelegation0240920c13275c5672/javablobnetworktestblobuserdelegation1625734a91e1eae9?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A50Z&se=2020-06-04T22%3A01%3A50Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A01%3A50Z&ske=2020-06-04T22%3A01%3A50Z&sks=b&skv=2019-12-12&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d69523ff-6f27-4561-b486-85ab120f3d78" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:01:50.5865925Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:50 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-blob-type" : "BlockBlob", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:50 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "279234dc-f01e-005f-77f2-39421d000000", - "Body" : "default", - "Content-Type" : "type", - "x-ms-version" : "2019-12-12", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B7E475B4", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "x-ms-client-request-id" : "d69523ff-6f27-4561-b486-85ab120f3d78", - "Content-Language" : "language" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobuserdelegation0240920c13275c5672/javablobnetworktestblobuserdelegation1625734a91e1eae9?sv=2019-12-12&spr=https%2Chttp&st=2020-06-02T22%3A01%3A50Z&se=2020-06-04T22%3A01%3A50Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A01%3A50Z&ske=2020-06-04T22%3A01%3A50Z&sks=b&skv=2019-12-12&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "773040c7-5144-4c9b-8988-12fa47a0df46" - }, - "Response" : { - "x-ms-is-current-version" : "true", - "x-ms-lease-status" : "unlocked", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-state" : "available", - "x-ms-version-id" : "2020-06-03T22:01:50.5865925Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:50 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-blob-type" : "BlockBlob", - "x-ms-access-tier-inferred" : "true", - "x-ms-access-tier" : "Hot", - "Content-Encoding" : "encoding", - "x-ms-creation-time" : "Wed, 03 Jun 2020 22:01:50 GMT", - "Content-Length" : "7", - "x-ms-request-id" : "27923589-f01e-005f-7af2-39421d000000", - "Content-Type" : "type", - "x-ms-version" : "2019-12-12", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "Accept-Ranges" : "bytes", - "x-ms-server-encrypted" : "true", - "Cache-Control" : "cache", - "ETag" : "0x8D80809B7E475B4", - "Content-Disposition" : "disposition", - "Vary" : "Origin", - "Content-Language" : "language", - "x-ms-client-request-id" : "773040c7-5144-4c9b-8988-12fa47a0df46" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcnetworktestblobuserdelegation&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6de1c019-a987-4a89-966a-e494a652660c" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "279235c2-f01e-005f-28f2-39421d000000", - "Body" : "jtcnetworktestblobuserdelegationjtcnetworktestblobuserdelegation0240920c13275c5672Wed, 03 Jun 2020 22:01:50 GMT\"0x8D80809B7D6D298\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "x-ms-client-request-id" : "6de1c019-a987-4a89-966a-e494a652660c", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestblobuserdelegation0240920c13275c5672?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bd14baee-964d-405c-83d8-ac576d645d4d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "27923606-f01e-005f-61f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:51 GMT", - "x-ms-client-request-id" : "bd14baee-964d-405c-83d8-ac576d645d4d" - }, - "Exception" : null - } ], - "variables" : [ "jtcnetworktestblobuserdelegation0240920c13275c5672", "javablobnetworktestblobuserdelegation1625734a91e1eae9", "2020-06-03T22:01:50.672511800Z", "2020-06-03T22:01:50.672511800Z", "2020-06-03T22:01:50.692509400Z", "2020-06-03T22:01:50.692509400Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestcontaineruserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestcontaineruserdelegation.json deleted file mode 100644 index 859fa5cdc561..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestcontaineruserdelegation.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestcontaineruserdelegation061405d09b3fc855?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f054af0d-bd82-4b11-aea2-9609b5380b0c" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809BA3BA6E2", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:54 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "fd65c291-c01e-007b-67f2-39b4bd000000", - "Date" : "Wed, 03 Jun 2020 22:01:54 GMT", - "x-ms-client-request-id" : "f054af0d-bd82-4b11-aea2-9609b5380b0c" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestcontaineruserdelegation061405d09b3fc855/javablobnetworktestcontaineruserdelegation108994e30d4ae", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "386daea5-cf19-4ec7-b4a2-688563206c9a", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:54.5974033Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:54 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:53 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809BA489D11", - "Content-Length" : "0", - "x-ms-request-id" : "27923b95-f01e-005f-31f2-39421d000000", - "x-ms-client-request-id" : "386daea5-cf19-4ec7-b4a2-688563206c9a" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=userdelegationkey", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a7eb47f8-770e-46b5-b6d5-511807b22e0a", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "fd65c34d-c01e-007b-7ef2-39b4bd000000", - "Body" : "df55c049-b654-4607-89bc-44c778431bba33653e1f-9a16-4657-8c52-3f489cf35a8b2020-06-02T22:01:54Z2020-06-04T22:01:54Zb2019-12-12UkVEQUNURUQ=", - "Date" : "Wed, 03 Jun 2020 22:01:54 GMT", - "x-ms-client-request-id" : "a7eb47f8-770e-46b5-b6d5-511807b22e0a", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestcontaineruserdelegation061405d09b3fc855?restype=container&comp=list&sv=2019-12-12&se=2020-06-04T22%3A01%3A54Z&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2020-06-02T22%3A01%3A54Z&ske=2020-06-04T22%3A01%3A54Z&sks=b&skv=2019-12-12&sr=c&sp=racwdl&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9596d3c3-3fd2-4e3d-81c6-28edbfa1008e" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "27923cc5-f01e-005f-13f2-39421d000000", - "Body" : "javablobnetworktestcontaineruserdelegation108994e30d4ae2020-06-03T22:01:54.5974033ZtrueWed, 03 Jun 2020 22:01:54 GMTWed, 03 Jun 2020 22:01:54 GMT0x8D80809BA489D117application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", - "Date" : "Wed, 03 Jun 2020 22:01:54 GMT", - "x-ms-client-request-id" : "9596d3c3-3fd2-4e3d-81c6-28edbfa1008e", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcnetworktestcontaineruserdelegation&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "5e3cfa02-65be-4655-a56e-be41ad1ee73d" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "fd65c3c4-c01e-007b-58f2-39b4bd000000", - "Body" : "jtcnetworktestcontaineruserdelegationjtcnetworktestcontaineruserdelegation061405d09b3fc855Wed, 03 Jun 2020 22:01:54 GMT\"0x8D80809BA3BA6E2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:55 GMT", - "x-ms-client-request-id" : "5e3cfa02-65be-4655-a56e-be41ad1ee73d", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcnetworktestcontaineruserdelegation061405d09b3fc855?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c13a80dc-dab5-4a25-bce4-6c8b58558e4a" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "27923d16-f01e-005f-50f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:54 GMT", - "x-ms-client-request-id" : "c13a80dc-dab5-4a25-bce4-6c8b58558e4a" - }, - "Exception" : null - } ], - "variables" : [ "jtcnetworktestcontaineruserdelegation061405d09b3fc855", "javablobnetworktestcontaineruserdelegation108994e30d4ae", "2020-06-03T22:01:54.688405600Z", "2020-06-03T22:01:54.690413100Z", "2020-06-03T22:01:54.690413100Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsservicesassignaturevaluesnetworktestcontainer.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsservicesassignaturevaluesnetworktestcontainer.json deleted file mode 100644 index f4f5758a3052..000000000000 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsservicesassignaturevaluesnetworktestcontainer.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer00905879c7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "b9e92519-67d8-4004-88f7-37a0862050cc" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809B74C7260", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:49 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "27923088-f01e-005f-12f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "x-ms-client-request-id" : "b9e92519-67d8-4004-88f7-37a0862050cc" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer00905879c7/javablobservicesassignaturevaluesnetworktestcontainer1421564d", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1cadc64a-fb00-46c4-8864-339d38c941d1", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-06-03T22:01:49.6767278Z", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Wed, 03 Jun 2020 22:01:48 GMT", - "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D80809B759C72E", - "Content-Length" : "0", - "x-ms-request-id" : "279230b3-f01e-005f-31f2-39421d000000", - "x-ms-client-request-id" : "1cadc64a-fb00-46c4-8864-339d38c941d1" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer00905879c7?restype=container&comp=acl", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "81058d43-55d3-4234-96a9-ddf86d336c47", - "Content-Type" : "application/xml; charset=utf-8" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D80809B7703C0B", - "Last-Modified" : "Wed, 03 Jun 2020 22:01:49 GMT", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "2792310d-f01e-005f-76f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:49 GMT", - "x-ms-client-request-id" : "81058d43-55d3-4234-96a9-ddf86d336c47" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer00905879c7?restype=container&comp=list&sv=2019-12-12&si=0000&sr=c&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c6ba42aa-f241-4364-9d5b-d1d0225cbc50" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "27923151-f01e-005f-2ef2-39421d000000", - "Body" : "javablobservicesassignaturevaluesnetworktestcontainer1421564d2020-06-03T22:01:49.6767278ZtrueWed, 03 Jun 2020 22:01:49 GMTWed, 03 Jun 2020 22:01:49 GMT0x8D80809B759C72E7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", - "Date" : "Wed, 03 Jun 2020 22:01:49 GMT", - "x-ms-client-request-id" : "c6ba42aa-f241-4364-9d5b-d1d0225cbc50", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer00905879c7?restype=container&comp=list&sv=2019-12-12&se=2020-06-04T22%3A01%3A49Z&sr=c&sp=racwdl&sig=REDACTED", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "04a20b29-4dd3-4560-bdd3-2d5360ef5bb0" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "279231e6-f01e-005f-28f2-39421d000000", - "Body" : "javablobservicesassignaturevaluesnetworktestcontainer1421564d2020-06-03T22:01:49.6767278ZtrueWed, 03 Jun 2020 22:01:49 GMTWed, 03 Jun 2020 22:01:49 GMT0x8D80809B759C72E7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", - "Date" : "Wed, 03 Jun 2020 22:01:49 GMT", - "x-ms-client-request-id" : "04a20b29-4dd3-4560-bdd3-2d5360ef5bb0", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestcontainer&comp=list", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "09a0d545-7e70-4284-97d8-a61592eb7ca2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "2792320b-f01e-005f-44f2-39421d000000", - "Body" : "jtcservicesassignaturevaluesnetworktestcontainerjtcservicesassignaturevaluesnetworktestcontainer00905879c7Wed, 03 Jun 2020 22:01:49 GMT\"0x8D80809B7703C0B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 03 Jun 2020 22:01:49 GMT", - "x-ms-client-request-id" : "09a0d545-7e70-4284-97d8-a61592eb7ca2", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "https://REDACTED.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer00905879c7?restype=container", - "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.7.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "aaca7620-a006-43e0-b4ef-2514c669231d" - }, - "Response" : { - "x-ms-version" : "2019-12-12", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "Content-Length" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "27923230-f01e-005f-61f2-39421d000000", - "Date" : "Wed, 03 Jun 2020 22:01:49 GMT", - "x-ms-client-request-id" : "aaca7620-a006-43e0-b4ef-2514c669231d" - }, - "Exception" : null - } ], - "variables" : [ "jtcservicesassignaturevaluesnetworktestcontainer00905879c7", "javablobservicesassignaturevaluesnetworktestcontainer1421564d", "2020-06-03T22:01:49.781538600Z", "2020-06-03T22:01:49.936533900Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ServiceAPITestfindblobsquery.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ServiceAPITestfindblobsquery.json index d826353436d1..ce06331878a4 100644 --- a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ServiceAPITestfindblobsquery.json +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ServiceAPITestfindblobsquery.json @@ -1,32 +1,32 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://blobindex1.blob.core.windows.net/jtcfindblobsquery0serviceapitestfindblobsquery3de971307431?restype=container", + "Uri" : "http://REDACTED.blob.core.windows.net/jtcfindblobsquery0serviceapitestfindblobsqueryc2693519c258?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "33e3a408-401c-43ed-b7a4-afafde698080" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eaeb69f5-cd41-44b6-9724-ef5e99c365e9" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E571281F6A02", - "Last-Modified" : "Mon, 20 Apr 2020 21:24:06 GMT", + "ETag" : "0x8D828FB6376231E", + "Last-Modified" : "Wed, 15 Jul 2020 20:12:24 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b23aaa4d-b01e-004e-5c5a-176328000000", - "Date" : "Mon, 20 Apr 2020 21:24:05 GMT", - "x-ms-client-request-id" : "33e3a408-401c-43ed-b7a4-afafde698080" + "x-ms-request-id" : "7d8e33f4-101e-001d-40e4-5a9c3e000000", + "Date" : "Wed, 15 Jul 2020 20:12:23 GMT", + "x-ms-client-request-id" : "eaeb69f5-cd41-44b6-9724-ef5e99c365e9" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://blobindex1.blob.core.windows.net?restype=service&comp=properties", + "Uri" : "http://REDACTED.blob.core.windows.net?restype=service&comp=properties", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "46c9b038-a2dd-464f-b5f3-4966ef786360", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "31398e92-8eeb-4171-ba76-d107dd37f2ee", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -35,117 +35,117 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "3eabe788-e01e-001e-795a-17a178000000", - "Date" : "Mon, 20 Apr 2020 21:24:07 GMT", - "x-ms-client-request-id" : "46c9b038-a2dd-464f-b5f3-4966ef786360" + "x-ms-request-id" : "7d8e34c4-101e-001d-80e4-5a9c3e000000", + "Date" : "Wed, 15 Jul 2020 20:12:23 GMT", + "x-ms-client-request-id" : "31398e92-8eeb-4171-ba76-d107dd37f2ee" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://blobindex1.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsquery3de97305557c?restype=container", + "Uri" : "http://REDACTED.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "484458f5-6578-4143-a0a8-e1632be64ae7" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f86c1e66-24ca-4b11-8883-cbe06ef20905" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D7E57129039B1B", - "Last-Modified" : "Mon, 20 Apr 2020 21:24:07 GMT", + "ETag" : "0x8D828FB63C3B4F9", + "Last-Modified" : "Wed, 15 Jul 2020 20:12:24 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "ae5d714b-c01e-007b-5e5a-170f3c000000", - "Date" : "Mon, 20 Apr 2020 21:24:07 GMT", - "x-ms-client-request-id" : "484458f5-6578-4143-a0a8-e1632be64ae7" + "x-ms-request-id" : "7d8e351b-101e-001d-4ce4-5a9c3e000000", + "Date" : "Wed, 15 Jul 2020 20:12:23 GMT", + "x-ms-client-request-id" : "f86c1e66-24ca-4b11-8883-cbe06ef20905" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://blobindex1.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsquery3de97305557c/javablobfindblobsquery2serviceapitestfindblobsquery3de70150bd", + "Uri" : "http://REDACTED.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31/javablobfindblobsquery2serviceapitestfindblobsqueryc26440622c", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f01a9de7-4b43-4a8d-8b5f-0e0e9615789c", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "df2dfbba-cf3f-4195-a31e-a9c64863428b", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-04-20T21:24:08.2513881Z", - "Last-Modified" : "Mon, 20 Apr 2020 21:24:08 GMT", + "x-ms-version-id" : "2020-07-15T20:12:25.0975660Z", + "Last-Modified" : "Wed, 15 Jul 2020 20:12:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Mon, 20 Apr 2020 21:24:08 GMT", + "Date" : "Wed, 15 Jul 2020 20:12:24 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E5712942A7D9", + "ETag" : "0x8D828FB63E7FDAC", "Content-Length" : "0", - "x-ms-request-id" : "eac6d2a7-601e-0062-5f5a-178f87000000", - "x-ms-client-request-id" : "f01a9de7-4b43-4a8d-8b5f-0e0e9615789c" + "x-ms-request-id" : "7d8e35a4-101e-001d-4ce4-5a9c3e000000", + "x-ms-client-request-id" : "df2dfbba-cf3f-4195-a31e-a9c64863428b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://blobindex1.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsquery3de97305557c/javablobfindblobsquery3serviceapitestfindblobsquery3de12195f2", + "Uri" : "http://REDACTED.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31/javablobfindblobsquery3serviceapitestfindblobsqueryc269133204", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "36ed5c8f-5a5a-4017-88b0-72db22cd61c2", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "19a75d24-73ef-4284-a097-09895f5fbd62", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-04-20T21:24:08.6526709Z", - "Last-Modified" : "Mon, 20 Apr 2020 21:24:08 GMT", + "x-ms-version-id" : "2020-07-15T20:12:25.2536777Z", + "Last-Modified" : "Wed, 15 Jul 2020 20:12:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Mon, 20 Apr 2020 21:24:08 GMT", + "Date" : "Wed, 15 Jul 2020 20:12:24 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E571297FE2F5", + "ETag" : "0x8D828FB63FFCFC9", "Content-Length" : "0", - "x-ms-request-id" : "7db06947-301e-000d-295a-178574000000", - "x-ms-client-request-id" : "36ed5c8f-5a5a-4017-88b0-72db22cd61c2" + "x-ms-request-id" : "7d8e3623-101e-001d-43e4-5a9c3e000000", + "x-ms-client-request-id" : "19a75d24-73ef-4284-a097-09895f5fbd62" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://blobindex1.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsquery3de97305557c/javablobfindblobsquery4serviceapitestfindblobsquery3de1558255", + "Uri" : "http://REDACTED.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31/javablobfindblobsquery4serviceapitestfindblobsqueryc2690049f9", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3bd6020d-fc16-4db6-a251-952c05eb2836", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c28ee60b-9bb4-4487-8eb9-84f2a87e5442", "Content-Type" : "application/octet-stream" }, "Response" : { "x-ms-version" : "2019-12-12", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-content-crc64" : "6RYQPwaVsyQ=", - "x-ms-version-id" : "2020-04-20T21:24:09.0589569Z", - "Last-Modified" : "Mon, 20 Apr 2020 21:24:09 GMT", + "x-ms-version-id" : "2020-07-15T20:12:25.4017831Z", + "Last-Modified" : "Wed, 15 Jul 2020 20:12:25 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Mon, 20 Apr 2020 21:24:08 GMT", + "Date" : "Wed, 15 Jul 2020 20:12:24 GMT", "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", - "ETag" : "0x8D7E57129BDE181", + "ETag" : "0x8D828FB64166927", "Content-Length" : "0", - "x-ms-request-id" : "df56a267-301e-007f-5f5a-17823b000000", - "x-ms-client-request-id" : "3bd6020d-fc16-4db6-a251-952c05eb2836" + "x-ms-request-id" : "7d8e3680-101e-001d-14e4-5a9c3e000000", + "x-ms-client-request-id" : "c28ee60b-9bb4-4487-8eb9-84f2a87e5442" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://blobindex1.blob.core.windows.net?where=%22bar%22%3d%27foo%27&comp=blobs", + "Uri" : "http://REDACTED.blob.core.windows.net?where=%40container%3D%27jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31%27%20AND%20%22bar%22%3D%27foo%27&comp=blobs", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "690d53ff-10e8-426a-a412-11b36ea99720" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15774116-4e36-4061-b73d-86c1c8eec69d" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -153,20 +153,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "68e9553c-201e-0001-335a-17127c000000", - "Body" : "\n"bar"='foo'javablobfindblobsquery3serviceapitestfindblobsquery3de12195f2jtcfindblobsquery1serviceapitestfindblobsquery3de97305557cfoo", - "Date" : "Mon, 20 Apr 2020 21:24:09 GMT", - "x-ms-client-request-id" : "690d53ff-10e8-426a-a412-11b36ea99720", + "x-ms-request-id" : "7d8e36de-101e-001d-6be4-5a9c3e000000", + "Body" : "\n@container='jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31' AND "bar"='foo'javablobfindblobsquery3serviceapitestfindblobsqueryc269133204jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31foo", + "Date" : "Wed, 15 Jul 2020 20:12:24 GMT", + "x-ms-client-request-id" : "15774116-4e36-4061-b73d-86c1c8eec69d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://blobindex1.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsquery3de97305557c?restype=container", + "Uri" : "http://REDACTED.blob.core.windows.net/jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "78f2f7c9-ec86-4d71-9ca6-85cff9820b12" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f75d346c-143e-47ef-a3de-4673c3d9d574" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -174,18 +174,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "d1f02c2c-e01e-0098-5a5a-176dc1000000", - "Date" : "Mon, 20 Apr 2020 21:24:09 GMT", - "x-ms-client-request-id" : "78f2f7c9-ec86-4d71-9ca6-85cff9820b12" + "x-ms-request-id" : "7d8e3742-101e-001d-47e4-5a9c3e000000", + "Date" : "Wed, 15 Jul 2020 20:12:24 GMT", + "x-ms-client-request-id" : "f75d346c-143e-47ef-a3de-4673c3d9d574" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://blobindex1.blob.core.windows.net?restype=service&comp=properties", + "Uri" : "http://REDACTED.blob.core.windows.net?restype=service&comp=properties", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4af10643-6fa4-4702-97ac-0fb23498be29", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6bdfbeeb-c625-4f43-a97a-fc5d997fef43", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -194,18 +194,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "f164856a-401e-0065-255a-17e3e4000000", - "Date" : "Mon, 20 Apr 2020 21:24:10 GMT", - "x-ms-client-request-id" : "4af10643-6fa4-4702-97ac-0fb23498be29" + "x-ms-request-id" : "3d932655-b01e-0092-49e4-5a1554000000", + "Date" : "Wed, 15 Jul 2020 20:12:26 GMT", + "x-ms-client-request-id" : "6bdfbeeb-c625-4f43-a97a-fc5d997fef43" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://blobindex1.blob.core.windows.net?prefix=jtcfindblobsquery&comp=list", + "Uri" : "http://REDACTED.blob.core.windows.net?prefix=jtcfindblobsquery&comp=list", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a0226978-1581-4236-9a10-bc0d3529b38f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3dfb9c82-421a-4a2f-bbc2-86b6db5bc825" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -213,20 +213,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "ad4f19a7-301e-001d-565a-17401c000000", - "Body" : "jtcfindblobsqueryjtcfindblobsquery0serviceapitestfindblobsquery3de971307431Mon, 20 Apr 2020 21:24:06 GMT\"0x8D7E571281F6A02\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Mon, 20 Apr 2020 21:24:10 GMT", - "x-ms-client-request-id" : "a0226978-1581-4236-9a10-bc0d3529b38f", + "x-ms-request-id" : "3d932714-b01e-0092-71e4-5a1554000000", + "Body" : "jtcfindblobsqueryjtcfindblobsquery0serviceapitestfindblobsqueryc2693519c258Wed, 15 Jul 2020 20:12:24 GMT\"0x8D828FB6376231E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 15 Jul 2020 20:12:26 GMT", + "x-ms-client-request-id" : "3dfb9c82-421a-4a2f-bbc2-86b6db5bc825", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://blobindex1.blob.core.windows.net/jtcfindblobsquery0serviceapitestfindblobsquery3de971307431?restype=container", + "Uri" : "http://REDACTED.blob.core.windows.net/jtcfindblobsquery0serviceapitestfindblobsqueryc2693519c258?restype=container", "Headers" : { "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-blob/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "91569ffd-2c55-4f57-8c98-4dde1fcf661d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ac61b4aa-0037-461e-b492-4f7d060af01f" }, "Response" : { "x-ms-version" : "2019-12-12", @@ -234,11 +234,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "72dc4e3c-c01e-006b-545a-17ca54000000", - "Date" : "Mon, 20 Apr 2020 21:24:11 GMT", - "x-ms-client-request-id" : "91569ffd-2c55-4f57-8c98-4dde1fcf661d" + "x-ms-request-id" : "3d93273e-b01e-0092-16e4-5a1554000000", + "Date" : "Wed, 15 Jul 2020 20:12:26 GMT", + "x-ms-client-request-id" : "ac61b4aa-0037-461e-b492-4f7d060af01f" }, "Exception" : null } ], - "variables" : [ "jtcfindblobsquery0serviceapitestfindblobsquery3de971307431", "jtcfindblobsquery1serviceapitestfindblobsquery3de97305557c", "javablobfindblobsquery2serviceapitestfindblobsquery3de70150bd", "javablobfindblobsquery3serviceapitestfindblobsquery3de12195f2", "javablobfindblobsquery4serviceapitestfindblobsquery3de1558255" ] + "variables" : [ "jtcfindblobsquery0serviceapitestfindblobsqueryc2693519c258", "jtcfindblobsquery1serviceapitestfindblobsqueryc26116153a31", "javablobfindblobsquery2serviceapitestfindblobsqueryc26440622c", "javablobfindblobsquery3serviceapitestfindblobsqueryc269133204", "javablobfindblobsquery4serviceapitestfindblobsqueryc2690049f9" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/ServiceAPITestsetpropsstaticwebsite.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ServiceAPITestsetpropsstaticwebsite.json new file mode 100644 index 000000000000..01b7ac19d9f0 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/ServiceAPITestsetpropsstaticwebsite.json @@ -0,0 +1,167 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetpropsstaticwebsite06467780c979b3ddde4c08?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a0237929-2fc2-48d2-9d36-3198897ec00c" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D829CE333287C4", + "Last-Modified" : "Thu, 16 Jul 2020 21:21:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "cf0ec229-401e-00a9-6ab7-5b50f0000000", + "Date" : "Thu, 16 Jul 2020 21:21:26 GMT", + "x-ms-client-request-id" : "a0237929-2fc2-48d2-9d36-3198897ec00c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4c40973-f03d-4fbf-ac76-4297d9b09b8f", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "3497f8a0-601e-0081-01b7-5b3158000000", + "Date" : "Thu, 16 Jul 2020 21:21:27 GMT", + "x-ms-client-request-id" : "e4c40973-f03d-4fbf-ac76-4297d9b09b8f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "14d580fc-168a-4a74-bca7-67fe450e9893" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e89856b4-001e-003e-58b7-5b06fd000000", + "Body" : "1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsefalse2018-03-28", + "Date" : "Thu, 16 Jul 2020 21:21:27 GMT", + "x-ms-client-request-id" : "14d580fc-168a-4a74-bca7-67fe450e9893", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e292e018-e57e-4c22-96c5-02348cd8e47f", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "26455ead-d01e-0084-5db7-5be383000000", + "Date" : "Thu, 16 Jul 2020 21:21:29 GMT", + "x-ms-client-request-id" : "e292e018-e57e-4c22-96c5-02348cd8e47f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2408daa9-7769-4e53-8d73-480700f09b0f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a6f24a4d-d01e-002d-16b7-5b22f1000000", + "Body" : "1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsetrueerror/404.htmlindex.html2018-03-28", + "Date" : "Thu, 16 Jul 2020 21:21:29 GMT", + "x-ms-client-request-id" : "2408daa9-7769-4e53-8d73-480700f09b0f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://REDACTED.blob.core.windows.net?restype=service&comp=properties", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "13ed5fe5-53a8-4cff-8eaa-afac0bbaf0aa", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "c6b6e441-e01e-0026-6bb7-5bd99a000000", + "Date" : "Thu, 16 Jul 2020 21:21:30 GMT", + "x-ms-client-request-id" : "13ed5fe5-53a8-4cff-8eaa-afac0bbaf0aa" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.blob.core.windows.net?prefix=jtcsetpropsstaticwebsite&comp=list", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ac05704-d967-4655-b38a-e1a7afd8b863" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "df03d5c0-801e-0030-29b7-5b2f4d000000", + "Body" : "jtcsetpropsstaticwebsitejtcsetpropsstaticwebsite06467780c979b3ddde4c08Thu, 16 Jul 2020 21:21:27 GMT\"0x8D829CE333287C4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Thu, 16 Jul 2020 21:21:30 GMT", + "x-ms-client-request-id" : "0ac05704-d967-4655-b38a-e1a7afd8b863", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.blob.core.windows.net/jtcsetpropsstaticwebsite06467780c979b3ddde4c08?restype=container", + "Headers" : { + "x-ms-version" : "2019-12-12", + "User-Agent" : "azsdk-java-azure-storage-blob/12.8.0-beta.2 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6adf86fc-027e-4ddb-95dc-80d2006a978f" + }, + "Response" : { + "x-ms-version" : "2019-12-12", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "61ba550b-201e-0029-11b7-5baff6000000", + "Date" : "Thu, 16 Jul 2020 21:21:30 GMT", + "x-ms-client-request-id" : "6adf86fc-027e-4ddb-95dc-80d2006a978f" + }, + "Exception" : null + } ], + "variables" : [ "jtcsetpropsstaticwebsite06467780c979b3ddde4c08" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index 40ad9a4ba3ee..90fd9331136a 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -275,6 +275,20 @@ directive: } ``` +### /{containerName}/{blob}?comp=seal +``` yaml +directive: +- from: swagger-document + where: $["x-ms-paths"]["/{containerName}/{blob}?comp=seal"] + transform: > + let param = $.put.parameters[0]; + if (!param["$ref"].endsWith("ContainerName")) { + const path = param["$ref"].replace(/[#].*$/, "#/parameters/"); + $.put.parameters.splice(0, 0, { "$ref": path + "ContainerName" }); + $.put.parameters.splice(1, 0, { "$ref": path + "Blob" }); + } +``` + ### /{containerName}/{blob}?comp=properties&SetHTTPHeaders ``` yaml directive: @@ -1246,6 +1260,7 @@ directive: delete $.SourceIfModifiedSince["x-ms-parameter-grouping"]; delete $.SourceIfNoneMatch["x-ms-parameter-grouping"]; delete $.SourceIfUnmodifiedSince["x-ms-parameter-grouping"]; + delete $.SourceIfTags["x-ms-parameter-grouping"]; - from: swagger-document where: $.parameters transform: > @@ -1253,6 +1268,7 @@ directive: delete $.IfModifiedSince["x-ms-parameter-grouping"]; delete $.IfNoneMatch["x-ms-parameter-grouping"]; delete $.IfUnmodifiedSince["x-ms-parameter-grouping"]; + delete $.IfTags["x-ms-parameter-grouping"]; - from: swagger-document where: $.parameters transform: > diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index c46970cb89f5..2c8821e34b48 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History ## 12.8.0-beta.2 (Unreleased) - +- Added support for setting tags and filterTags operations on SAS by adding to AccountSASPermissions. +- Fixed bug where FluxInputStream would throw when a ByteBuffer of length 0 was encountered. ## 12.8.0-beta.1 (2020-07-07) - Added support for the 2019-12-12 service version. diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml index 6da4eb1c3f03..d78921269173 100644 --- a/sdk/storage/azure-storage-common/pom.xml +++ b/sdk/storage/azure-storage-common/pom.xml @@ -68,7 +68,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/FluxInputStream.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/FluxInputStream.java index 3f84658f920b..5ccf2074f43d 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/FluxInputStream.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/FluxInputStream.java @@ -11,6 +11,7 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import java.nio.Buffer; import java.nio.ByteBuffer; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; @@ -166,6 +167,7 @@ private void blockForData() { */ private void subscribeToData() { this.data + .filter(Buffer::hasRemaining) /* Filter to make sure only non empty byte buffers are emitted. */ .onBackpressureBuffer() .subscribe( // ByteBuffer consumer diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/UploadUtils.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/UploadUtils.java index 6c97ce64d2f0..607d5a0f3223 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/UploadUtils.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/UploadUtils.java @@ -47,6 +47,15 @@ public static Mono> uploadFullOrChunked(final Flux d // First buffer is emitted after threshold is breached or there's no more data. // Therefore we can make a decision how to upload data on first element. .switchOnFirst((signal, flux) -> { + // If there is an error before the threshold is reached, propagate the error + if (signal.isOnError()) { + Throwable t = signal.getThrowable(); + if (t != null) { + return Flux.error(t); + } else { + return Flux.error(new IllegalStateException("Source flux failed but cause is unretrievable")); + } + } if (gate.isThresholdBreached()) { // In this case we can pass a flux that can have just one subscriber because // the chunked upload is going to cache the data downstream before sending chunks over the wire. diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java index 0af1e732674a..ed22c6232b1b 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java @@ -41,6 +41,10 @@ public final class AccountSasPermission { private boolean processMessagesPermission; + private boolean tagsPermission; + + private boolean filterTagsPermission; + /** * Initializes an {@link AccountSasPermission} object with all fields set to false. */ @@ -55,8 +59,8 @@ public AccountSasPermission() { * * @return An {@link AccountSasPermission} object generated from the given {@link String}. * - * @throws IllegalArgumentException If {@code permString} contains a character other than r, w, d, x, l, a, c, u, - * or p. + * @throws IllegalArgumentException If {@code permString} contains a character other than r, w, d, x, l, a, c, u, p, + * t or f. */ public static AccountSasPermission parse(String permString) { AccountSasPermission permissions = new AccountSasPermission(); @@ -91,6 +95,12 @@ public static AccountSasPermission parse(String permString) { case 'p': permissions.processMessagesPermission = true; break; + case 't': + permissions.tagsPermission = true; + break; + case 'f': + permissions.filterTagsPermission = true; + break; default: throw new IllegalArgumentException( String.format(Locale.ROOT, Constants.ENUM_COULD_NOT_BE_PARSED_INVALID_VALUE, @@ -276,6 +286,43 @@ public AccountSasPermission setProcessMessages(boolean hasProcessMessagesPermiss return this; } + /** + * @return the tags permission status. + */ + public boolean hasTagsPermission() { + return tagsPermission; + } + + /** + * Sets the tags permission status. + * + * @param tagsPermission Permission status to set + * @return the updated AccountSasPermission object. + */ + public AccountSasPermission setTagsPermission(boolean tagsPermission) { + this.tagsPermission = tagsPermission; + return this; + } + + + /** + * @return the filter tags permission status. + */ + public boolean hasFilterTagsPermission() { + return filterTagsPermission; + } + + /** + * Sets the filter tags permission status. + * + * @param filterTagsPermission Permission status to set + * @return the updated AccountSasPermission object. + */ + public AccountSasPermission setFilterTagsPermission(boolean filterTagsPermission) { + this.filterTagsPermission = filterTagsPermission; + return this; + } + /** * Converts the given permissions to a {@link String}. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -324,6 +371,14 @@ public String toString() { builder.append('p'); } + if (this.tagsPermission) { + builder.append('t'); + } + + if (this.filterTagsPermission) { + builder.append('f'); + } + return builder.toString(); } } diff --git a/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/FluxInputStreamTest.groovy b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/FluxInputStreamTest.groovy index c58c1e1ac3b5..a2532dc4474a 100644 --- a/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/FluxInputStreamTest.groovy +++ b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/FluxInputStreamTest.groovy @@ -65,6 +65,40 @@ class FluxInputStreamTest extends Specification { Constants.MB || _ } + @Unroll + def "FluxIS with empty byte buffers"() { + setup: + def num = Constants.KB + List buffers = new ArrayList<>() + for(int i = 0; i < num; i++) { + buffers.add(ByteBuffer.wrap(i.byteValue())) + buffers.add(ByteBuffer.wrap(new byte[0])) + } + def data = Flux.fromIterable(buffers) + + when: + def is = new FluxInputStream(data) + def bytes = new byte[num] + + def totalRead = 0 + def bytesRead = 0 + + while (bytesRead != -1 && totalRead < num) { + bytesRead = is.read(bytes, totalRead, num) + if (bytesRead != -1) { + totalRead += bytesRead + num -= bytesRead + } + } + + is.close() + + then: + for (int i = 0; i < num; i++) { + assert bytes[i] == i.byteValue() + } + } + def "FluxIS error"() { setup: def data = Flux.error(exception) diff --git a/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/SasModelsTest.groovy b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/SasModelsTest.groovy new file mode 100644 index 000000000000..52fd99addf87 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/implementation/SasModelsTest.groovy @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation + +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasService +import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.SasIpRange +import com.azure.storage.common.sas.SasProtocol +import spock.lang.Specification +import spock.lang.Unroll + +import java.time.OffsetDateTime +import java.time.ZoneOffset + +class SasModelsTest extends Specification { + + def setup() { + String fullTestName = specificationContext.getCurrentIteration().getName().replace(' ', '').toLowerCase() + String className = specificationContext.getCurrentSpec().getName() + // Print out the test name to create breadcrumbs in our test logging in case anything hangs. + System.out.printf("========================= %s.%s =========================%n", className, fullTestName) + } + + @Unroll + def "AccountSasSignatureValues min"() { + setup: + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = AccountSasPermission.parse("l") + def s = AccountSasService.parse("b") + def rt = AccountSasResourceType.parse("o") + + def st = OffsetDateTime.of(2015, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def ip = SasIpRange.parse("a-b") + def prot = SasProtocol.HTTPS_ONLY + + when: + def v = new AccountSasSignatureValues(e, p, s, rt) + .setStartTime(st) + .setSasIpRange(ip) + .setProtocol(prot) + + then: + v.getExpiryTime() == e + v.getPermissions() == p.toString() + v.getServices() == s.toString() + v.getResourceTypes() == rt.toString() + v.getStartTime() == st + v.getSasIpRange() == ip + v.getProtocol() == prot + } + + + @Unroll + def "AccountSasSignatureValues null"() { + setup: + def e = expiryTime ? null : OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = permissions ? null : AccountSasPermission.parse("l") + def s = services ? null : AccountSasService.parse("b") + def rt = resourceTypes ? null : AccountSasResourceType.parse("o") + + when: + new AccountSasSignatureValues(e, p, s, rt) + + then: + def ex = thrown(NullPointerException) + ex.getMessage().contains(variable) + + where: + expiryTime | permissions | services | resourceTypes || variable + true | false | false | false || "expiryTime" + false | true | false | false || "permissions" + false | false | true | false || "services" + false | false | false | true || "resourceTypes" + } + + @Unroll + def "AccountSASPermissions toString"() { + setup: + def perms = new AccountSasPermission() + perms.setReadPermission(read) + .setWritePermission(write) + .setDeletePermission(delete) + .setListPermission(list) + .setAddPermission(add) + .setCreatePermission(create) + .setUpdatePermission(update) + .setProcessMessages(process) + .setDeleteVersionPermission(deleteVersion) + .setTagsPermission(tags) + .setFilterTagsPermission(filterTags) + + expect: + perms.toString() == expectedString + + where: + read | write | delete | list | add | create | update | process | deleteVersion | tags | filterTags || expectedString + true | false | false | false | false | false | false | false | false | false | false || "r" + false | true | false | false | false | false | false | false | false | false | false || "w" + false | false | true | false | false | false | false | false | false | false | false || "d" + false | false | false | true | false | false | false | false | false | false | false || "l" + false | false | false | false | true | false | false | false | false | false | false || "a" + false | false | false | false | false | true | false | false | false | false | false || "c" + false | false | false | false | false | false | true | false | false | false | false || "u" + false | false | false | false | false | false | false | true | false | false | false || "p" + false | false | false | false | false | false | false | false | true | false | false || "x" + false | false | false | false | false | false | false | false | false | true | false || "t" + false | false | false | false | false | false | false | false | false | false | true || "f" + true | true | true | true | true | true | true | true | true | true | true || "rwdxlacuptf" + } + + @Unroll + def "AccountSASPermissions parse"() { + when: + def perms = AccountSasPermission.parse(permString) + + then: + perms.hasReadPermission() == read + perms.hasWritePermission() == write + perms.hasDeletePermission() == delete + perms.hasListPermission() == list + perms.hasAddPermission() == add + perms.hasCreatePermission() == create + perms.hasUpdatePermission() == update + perms.hasProcessMessages() == process + perms.hasDeleteVersionPermission() == deleteVersion + perms.hasTagsPermission() == tags + perms.hasFilterTagsPermission() == filterTags + + where: + permString || read | write | delete | list | add | create | update | process | deleteVersion | tags | filterTags + "r" || true | false | false | false | false | false | false | false | false | false | false + "w" || false | true | false | false | false | false | false | false | false | false | false + "d" || false | false | true | false | false | false | false | false | false | false | false + "l" || false | false | false | true | false | false | false | false | false | false | false + "a" || false | false | false | false | true | false | false | false | false | false | false + "c" || false | false | false | false | false | true | false | false | false | false | false + "u" || false | false | false | false | false | false | true | false | false | false | false + "p" || false | false | false | false | false | false | false | true | false | false | false + "x" || false | false | false | false | false | false | false | false | true | false | false + "t" || false | false | false | false | false | false | false | false | false | true | false + "f" || false | false | false | false | false | false | false | false | false | false | true + "rwdxlacuptf" || true | true | true | true | true | true | true | true | true | true | true + "lwfrutpcaxd" || true | true | true | true | true | true | true | true | true | true | true + } + + def "AccountSASPermissions parse IA"() { + when: + AccountSasPermission.parse("rwaq") + + then: + thrown(IllegalArgumentException) + } + + @Unroll + def "AccountSASResourceType toString"() { + setup: + def resourceTypes = new AccountSasResourceType() + .setService(service) + .setContainer(container) + .setObject(object) + + expect: + resourceTypes.toString() == expectedString + + where: + service | container | object || expectedString + true | false | false || "s" + false | true | false || "c" + false | false | true || "o" + true | true | true || "sco" + } + + @Unroll + def "AccountSASResourceType parse"() { + when: + def resourceTypes = AccountSasResourceType.parse(resourceTypeString) + + then: + resourceTypes.isService() == service + resourceTypes.isContainer() == container + resourceTypes.isObject() == object + + where: + resourceTypeString || service | container | object + "s" || true | false | false + "c" || false | true | false + "o" || false | false | true + "sco" || true | true | true + } + + @Unroll + def "AccountSASResourceType IA"() { + when: + AccountSasResourceType.parse("scq") + + then: + thrown(IllegalArgumentException) + } + + @Unroll + def "IPRange toString"() { + setup: + def ip = new SasIpRange() + .setIpMin(min) + .setIpMax(max) + + expect: + ip.toString() == expectedString + + where: + min | max || expectedString + "a" | "b" || "a-b" + "a" | null || "a" + null | "b" || "" + } + + @Unroll + def "IPRange parse"() { + when: + def ip = SasIpRange.parse(rangeStr) + + then: + ip.getIpMin() == min + ip.getIpMax() == max + + where: + rangeStr || min | max + "a-b" || "a" | "b" + "a" || "a" | null + "" || "" | null + } + + @Unroll + def "SASProtocol parse"() { + expect: + SasProtocol.parse(protocolStr) == protocol + + where: + protocolStr || protocol + "https" || SasProtocol.HTTPS_ONLY + "https,http" || SasProtocol.HTTPS_HTTP + } + + def "account sas impl util null"() { + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = AccountSasPermission.parse("l") + def s = AccountSasService.parse("b") + def rt = AccountSasResourceType.parse("o") + def v = new AccountSasSignatureValues(e, p, s, rt) + def implUtil = new AccountSasImplUtil(v) + + when: + implUtil.generateSas(null) + + then: + def ex = thrown(NullPointerException) + ex.getMessage().contains("storageSharedKeyCredential") + } +} diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index 136b79699aca..6fa93001c456 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -1,7 +1,7 @@ # Release History ## 12.2.0-beta.2 (Unreleased) - +- Fixed bug where Query Input Stream would throw when a ByteBuffer of length 0 was encountered. ## 12.2.0-beta.1 (2019-07-07) - Added support for the 2019-12-12 service version. diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 53f161bb42e0..7035fb914f2c 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -83,7 +83,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/specialized/LeaseAsyncErrorMappingTest.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/specialized/LeaseAsyncErrorMappingTest.groovy index 0774e312dc45..b3ca8a7579dd 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/specialized/LeaseAsyncErrorMappingTest.groovy +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/specialized/LeaseAsyncErrorMappingTest.groovy @@ -44,7 +44,7 @@ class LeaseAsyncErrorMappingTest extends APISpec { def "Change Lease"() { when: - def changeLeaseVerifier = StepVerifier.create(leaseAsyncClient.changeLeaseWithResponse(null, null)) + def changeLeaseVerifier = StepVerifier.create(leaseAsyncClient.changeLeaseWithResponse("id", null)) then: changeLeaseVerifier.verifyError(DataLakeStorageException) } diff --git a/sdk/storage/azure-storage-perf/CHANGELOG.md b/sdk/storage/azure-storage-perf/CHANGELOG.md new file mode 100644 index 000000000000..c9a78334999c --- /dev/null +++ b/sdk/storage/azure-storage-perf/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index 4b90b18a9cf1..40cc59aa1161 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -71,7 +71,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/storage/test-resources.json b/sdk/storage/test-resources.json index d60bc654fa19..245349b995fd 100644 --- a/sdk/storage/test-resources.json +++ b/sdk/storage/test-resources.json @@ -9,6 +9,13 @@ "type": "string", "defaultValue": "core.windows.net" }, + "tenantId": { + "type": "string", + "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "metadata": { + "description": "The tenant ID to which the application and resources belong." + } + }, "testApplicationOid": { "type": "string", "metadata": { @@ -18,14 +25,18 @@ }, "variables": { "storageApiVersion": "2019-06-01", + "keyVaultApiVersion": "2016-10-01", "authorizationApiVersion": "2018-09-01-preview", "blobDataContributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe')]", "contributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]", "primaryAccountName": "[concat('prim', parameters('baseName'))]", "secondaryAccountName": "[concat('sec', parameters('baseName'))]", "premiumAccountName": "[concat('prem', parameters('baseName'))]", + "versionedAccountName": "[concat('ver', parameters('baseName'))]", "dataLakeAccountName": "[concat('dtlk', parameters('baseName'))]", "premiumFileAccountName": "[concat('premf', parameters('baseName'))]", + "keyvaultName": "[concat(parameters('baseName'), 'kvlt')]", + "azureKeyVaultUrl": "[format('https://{0}.vault.azure.net', variables('keyvaultName'))]", "location": "[resourceGroup().location]" }, "resources": [ @@ -85,22 +96,6 @@ "accessTier": "Hot" } }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('primaryAccountName'), '/default')]", - "properties": { - "isVersioningEnabled": true, - "deleteRetentionPolicy": { - "enabled": true, - "days": 1 - } - - }, - "dependsOn": [ - "[variables('primaryAccountName')]" - ] - }, { "type": "Microsoft.Storage/storageAccounts/fileServices", "apiVersion": "[variables('storageApiVersion')]", @@ -179,6 +174,49 @@ "accessTier": "Hot" } }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('versionedAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('versionedAccountName'), '/default')]", + "properties": { + "isVersioningEnabled": true + }, + "dependsOn": [ + "[variables('versionedAccountName')]" + ] + }, { "type": "Microsoft.Storage/storageAccounts", "apiVersion": "[variables('storageApiVersion')]", @@ -239,6 +277,77 @@ "keySource": "Microsoft.Storage" } } + }, + { + "type": "Microsoft.KeyVault/vaults", + "apiVersion": "[variables('keyvaultApiVersion')]", + "name": "[variables('keyvaultName')]", + "location": "[variables('location')]", + "properties": { + "sku": { + "family": "A", + "name": "premium" + }, + "tenantId": "[parameters('tenantId')]", + "accessPolicies": [ + { + "tenantId": "[parameters('tenantId')]", + "objectId": "[parameters('testApplicationOid')]", + "permissions": { + "keys": [ + "get", + "list", + "update", + "create", + "import", + "delete", + "recover", + "backup", + "restore", + "decrypt", + "encrypt", + "unwrapKey", + "wrapKey", + "verify", + "sign", + "purge" + ], + "secrets": [ + "get", + "list", + "set", + "delete", + "recover", + "backup", + "restore", + "purge" + ], + "certificates": [ + "get", + "list", + "update", + "create", + "import", + "delete", + "recover", + "backup", + "restore", + "managecontacts", + "manageissuers", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "purge" + ] + } + } + ], + "enabledForDeployment": false, + "enabledForDiskEncryption": false, + "enabledForTemplateDeployment": false, + "enableSoftDelete": false + } } ], "outputs": { @@ -274,6 +383,14 @@ "type": "string", "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('premiumAccountName')), variables('storageApiVersion')).keys[0].value]" }, + "VERSIONED_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('versionedAccountName')]" + }, + "VERSIONED_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('versionedAccountName')), variables('storageApiVersion')).keys[0].value]" + }, "AZURE_STORAGE_FILE_ACCOUNT_NAME": { "type": "string", "value": "[variables('primaryAccountName')]" @@ -326,7 +443,10 @@ "AZURE_STORAGE_QUEUE_CONNECTION_STRING": { "type": "string", "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('primaryAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName')), variables('storageApiVersion')).keys[0].value, ';EndpointSuffix=', parameters('endpointSuffix'))]" + }, + "KEYVAULT_URL":{ + "type": "string", + "value": "[variables('azureKeyVaultUrl')]" } - } } diff --git a/sdk/tables/azure-data-tables/pom.xml b/sdk/tables/azure-data-tables/pom.xml index 4ca605848391..a4f57690e99f 100644 --- a/sdk/tables/azure-data-tables/pom.xml +++ b/sdk/tables/azure-data-tables/pom.xml @@ -65,26 +65,47 @@ Licensed under the MIT License. 1.3.1 test + + com.azure + azure-storage-common + 12.8.0-beta.1 + + + org.junit.jupiter + junit-jupiter-api + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.6.2 + test + + + org.junit.jupiter + junit-jupiter-params + 5.6.2 + test + + + io.projectreactor + reactor-test + 3.3.5.RELEASE + test + + + com.azure + azure-core-test + 1.3.1 + test + + + org.mockito + mockito-core + 3.0.0 + test + - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M3 - - - - - com.azure:* - - - - - - - - diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/AzureTable.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/AzureTable.java new file mode 100644 index 000000000000..98cbc8598203 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/AzureTable.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +/** + * class for a table object + */ +public class AzureTable { + private final String name; + + AzureTable(String name) { + this.name = name; + } + + /** + * returns the name of this table + * + * @return table name + */ + public String getName() { + return name; + } + + /** + * returns the associated table client or null if it doesn't exist + * @return the associated table client + */ + public TableClient getClient() { + return null; + } +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/QueryOptions.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/QueryOptions.java new file mode 100644 index 000000000000..bd10b72ae4b0 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/QueryOptions.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.data.tables; + +import com.azure.core.annotation.Fluent; + +/** + * helps construct a query + */ +@Fluent +public final class QueryOptions { + private Integer top; + private String select; + private String filter; + + /** + * Get the top property: Maximum number of records to return. + * + * @return the top value. + */ + public Integer getTop() { + return this.top; + } + + /** + * Set the top property: Maximum number of records to return. + * + * @param top the top value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setTop(Integer top) { + this.top = top; + return this; + } + + /** + * Get the select property: Select expression using OData notation. Limits the columns on each record to just those + * requested, e.g. "$select=PolicyAssignmentId, ResourceId". + * + * @return the select value. + */ + public String getSelect() { + return this.select; + } + + /** + * Set the select property: Select expression using OData notation. Limits the columns on each record to just those + * requested, e.g. "$select=PolicyAssignmentId, ResourceId". + * + * @param select the select value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setSelect(String select) { + this.select = select; + return this; + } + + /** + * Get the filter property: OData filter expression. + * + * @return the filter value. + */ + public String getFilter() { + return this.filter; + } + + /** + * Set the filter property: OData filter expression. + * + * @param filter the filter value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setFilter(String filter) { + this.filter = filter; + return this; + } +} + diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java new file mode 100644 index 000000000000..a1f5d555f399 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableAsyncClient.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.rest.PagedFlux; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** + * class for the table async client + */ +@ServiceClient( + builder = TableClientBuilder.class, + isAsync = true) +public class TableAsyncClient { + private final String tableName; + + TableAsyncClient(String tableName) { + this.tableName = tableName; + } + + /** + * Queries and returns entities in the given table using the select and filter strings + * + * @param queryOptions the odata query object + * @return a paged flux of all the entity which fit this criteria + */ + public PagedFlux queryEntities(QueryOptions queryOptions) { + return null; + } + + /** + * returns the entity with the given rowKey and ParitionKey + * + * @param rowKey the given row key + * @param partitionKey the given partition key + * @return an entity that fits the criteria + */ + public Mono get(String rowKey, String partitionKey) { + return null; + } + + /** + * insert a TableEntity with the given properties and return that TableEntity. Property map must include + * rowKey and partitionKey + * + * @param tableEntityProperties a map of properties for the TableEntity + * @return the created TableEntity + */ + public Mono createEntity(Map tableEntityProperties) { + return Mono.empty(); + } + + /** + * based on Mode it either inserts or merges if exists or inserts or merges if exists + * + * @param updateMode type of upsert + * @param tableEntity entity to upsert + * @return void + */ + public Mono upsertEntity(UpdateMode updateMode, TableEntity tableEntity) { + return Mono.empty(); + } + + /** + * based on Mode it either updates or fails if it does exists or replaces or fails if it does exists + * + * @param updateMode type of update + * @param tableEntity entity to update + * @return void + */ + public Mono updateEntity(UpdateMode updateMode, TableEntity tableEntity) { + return Mono.empty(); + } + + /** + * deletes the given entity + * + * @param tableEntity entity to delete + * @return void + */ + public Mono deleteEntity(TableEntity tableEntity) { + return Mono.empty(); + } + + /** + * deletes the given entity + * + * @param partitionKey the partition key + * @param rowKey the row key + * @return void + */ + public Mono deleteEntity(String partitionKey, String rowKey) { + return Mono.empty(); + } + + /** + * returns the table name associated with the client + * + * @return table name + */ + public String getTableName() { + return tableName; + } +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClient.java new file mode 100644 index 000000000000..6eabb5e67b87 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClient.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.annotation.ServiceClient; +import java.util.List; +import java.util.Map; + +/** + * sync client for table operations + */ +@ServiceClient( + builder = TableClientBuilder.class) +public class TableClient { + final String tableName; + + TableClient(String tableName) { + this.tableName = tableName; + } + + /** + * Queries and returns entities in the given table using the select and filter strings + * + * @param queryOptions the odata query object + * @return a list of the tables that fit the query + */ + public List queryEntities(QueryOptions queryOptions) { + return null; + } + + /** + * returns the entity with the given rowKey and ParitionKey + * + * @param rowKey the given row key + * @param partitionKey the given partition key + * @return an entity that fits the criteria + */ + public TableEntity get(String rowKey, String partitionKey) { + return null; + } + + + /** + * insert a TableEntity with the given properties and return that TableEntity. Property map must include + * rowKey and partitionKey + * + * @param tableEntityProperties a map of properties for the TableEntity + * @return the created TableEntity + */ + public TableEntity createEntity(Map tableEntityProperties) { + return null; + } + + /** + * based on Mode it either inserts or merges if exists or inserts or merges if exists + * + * @param updateMode type of upsert + * @param tableEntity entity to upsert + */ + public void upsertEntity(UpdateMode updateMode, TableEntity tableEntity) { + } + + /** + * based on Mode it either updates or fails if it does exists or replaces or fails if it does exists + * + * @param updateMode type of update + * @param tableEntity entity to update + */ + public void updateEntity(UpdateMode updateMode, TableEntity tableEntity) { + } + + /** + * deletes the given entity + * + * @param tableEntity entity to delete + */ + public void deleteEntity(TableEntity tableEntity) { + } + + /** + * deletes the given entity + * + * @param partitionKey the partition key + * @param rowKey the row key + */ + public void deleteEntity(String partitionKey, String rowKey) { + } + + /** + * returns the table name associated with the client + * + * @return table name + */ + public String getTableName() { + return this.tableName; + } + + +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClientBuilder.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClientBuilder.java new file mode 100644 index 000000000000..fa1e59dec040 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClientBuilder.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.credential.TokenCredential; + +/** + * builds table client + */ +@ServiceClientBuilder(serviceClients = {TableClient.class, TableAsyncClient.class}) +public class TableClientBuilder { + private String connectionString; + private String tableName; + + /** + * Sets the connection string to help build the client + * + * @param connectionString the connection string to the storage account + * @return the TableClientBuilder + */ + public TableClientBuilder connectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Sets the tokenCredential to help build the client + * + * @param tokenCredential the tokenCredential to the storage account + * @return the TableClientBuilder + */ + public TableClientBuilder connectionString(TokenCredential tokenCredential) { + return this; + } + + /** + * Sets the table name to help build the client + * + * @param tableName name of the table for which the client is created for + * @return the TableClientBuilder + */ + public TableClientBuilder tableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * builds a sync tableClient + * + * @return a sync tableClient + */ + public TableClient buildClient() { + return new TableClient(tableName); + } + + /** + * builds an async tableClient + * + * @return an aysnc tableClient + */ + public TableAsyncClient buildAsyncClient() { + return new TableAsyncClient(tableName); + } + + /** + * table client builder constructor + */ + public TableClientBuilder() { + } + + /** + * gets the connection string + * @return the connection string + */ + public String getConnectionString() { + return this.connectionString; + } + +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableEntity.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableEntity.java new file mode 100644 index 000000000000..26a8cdf99e09 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableEntity.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.annotation.Fluent; +import java.util.Map; + +/** + * table entity class + */ +@Fluent +public class TableEntity { + private final Map properties; + //tableName + //etag + + /** + * creates a new TableEntity + * + * @param properties map of properties of the entity + */ + public TableEntity(Map properties) { + this.properties = properties; + } + + /** + * returns a map of properties + * + * @return map of properties of thsi entity + */ + public Map getProperties() { + return properties; + } + + /** + * adds a new property to this entity's property map + * + * @param key the key of the property + * @param value the value of the property + * @return the updated entity + */ + public TableEntity addProperty(String key, Object value) { + return this; + } +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java new file mode 100644 index 000000000000..bc4dac36d2c9 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceAsyncClient.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.rest.PagedFlux; +import reactor.core.publisher.Mono; + +/** + * async client for account operations + */ +@ServiceClient( + builder = TableServiceClientBuilder.class, + isAsync = true) +public class TableServiceAsyncClient { + + TableServiceAsyncClient() { + } + + /** + * creates the table with the given name. If a table with the same name already exists, the operation fails. + * + * @param name the name of the table to create + * @return a table client connected to the given table + */ + public Mono createTable(String name) { + return null; + } + + /** + * deletes the given table. Will error if the table doesn't exists or cannot be found with the given name. + * + * @param name the name of the table to delete + * @return mono void + */ + public Mono deleteTable(String name) { + return Mono.empty(); + } + + /** + * deletes the given table. Will error if the table doesn't exists or cannot be found with the given name. + * + * @param azureTable the table to delete + * @return mono void + */ + public Mono deleteTable(AzureTable azureTable) { + return Mono.empty(); + } + + /** + * retrieves the async table client for the provided table or creates one if it doesn't exist + * + * @param name the name of the table + * @return associated TableAsyncClient + */ + public TableAsyncClient getTableAsyncClient(String name) { + return null; + } + + /** + * query all the tables under the storage account and return them + * + * @param queryOptions the odata query object + * @return a flux of the tables that met this criteria + */ + public PagedFlux queryTables(QueryOptions queryOptions) { + return null; + } + +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java new file mode 100644 index 000000000000..8bca972d9156 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClient.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.annotation.ServiceClient; + +import java.util.List; + +/** + * client for table service + */ +@ServiceClient( + builder = TableServiceClientBuilder.class) +public class TableServiceClient { + + TableServiceClient() { + } + + /** + * creates the table with the given name. If a table with the same name already exists, the operation fails. + * + * @param name the name of the table to create + * @return AzureTable of the created table + */ + public AzureTable createTable(String name) { + return null; + } + + /** + * deletes the given table. Will error if the table doesn't exists or cannot be found with the given name. + * + * @param name the name of the table to be deleted + */ + public void deleteTable(String name) { + } + + /** + * deletes the given table. Will error if the table doesn't exists or cannot be found with the given name. + * + * @param azureTable the table to be deleted + */ + public void deleteTable(AzureTable azureTable) { + } + + /** + * gets a given table by name + * + * @param name the name of the table + * @return associated azure table object + */ + public AzureTable getTable(String name) { + return null; + } + + /** + * gets the Table Client for the given table + * @param name the name of the table + * @return the Table Client for the table + */ + public TableClient getTableClient(String name) { + return null; + } + + /** + * query all the tables under the storage account and return them + * + * @param queryOptions the odata query object + * @return a list of tables that meet the query + */ + public List queryTables(QueryOptions queryOptions) { + return null; + } + +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClientBuilder.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClientBuilder.java new file mode 100644 index 000000000000..4eefce10a47f --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableServiceClientBuilder.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpClient; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.util.logging.ClientLogger; +import java.util.ArrayList; +import java.util.List; +import com.azure.core.util.Configuration; +import java.util.Objects; + +/** + * builds the table service clients + */ +@ServiceClientBuilder(serviceClients = {TableServiceClient.class, TableServiceAsyncClient.class}) +public class TableServiceClientBuilder { + private final ClientLogger logger = new ClientLogger(TableServiceClientBuilder.class); + private final List additionalPolicies = new ArrayList<>(); + private String connectionString; + private Configuration configuration; + private TablesSharedKeyCredential tablesSharedKeyCredential; + private String endpoint; + private HttpClient httpClient; + private HttpLogOptions logOptions; + private TablesServiceVersion version; + + /** + * Sets the connection string to help build the client + * + * @param connectionString the connection string to the storage account + * @return the TableServiceClientBuilder + */ + public TableServiceClientBuilder connectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * builds a sync TableServiceClient + * + * @return a sync TableServiceClient + */ + public TableServiceClient buildClient() { + return new TableServiceClient(); + } + + /** + * builds an async TableServiceAsyncClient + * + * @return TableServiceAsyncClient an aysnc TableServiceAsyncClient + */ + public TableServiceAsyncClient buildAsyncClient() { + return new TableServiceAsyncClient(); + } + + /** + * constructor + */ + public TableServiceClientBuilder() { + + } + + /** + * gets the connection string + * @return the connection string + */ + public String getConnectionString() { + return this.connectionString; + } + + /** + * Sets the configuration object used to retrieve environment configuration values during building of the client. + * + * @param configuration Configuration store used to retrieve environment configurations. + * @return the updated TableServiceClientBuilder object + */ + public TableServiceClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /** + * update credential + * @param credential the tables shared key credential + * @return the updated TableServiceClient builder + * @throws NullPointerException If {@code credential} is {@code null}. + */ + public TableServiceClientBuilder credential(TablesSharedKeyCredential credential) { + this.tablesSharedKeyCredential = Objects.requireNonNull(tablesSharedKeyCredential, "credential cannot" + + "be null"); + return this; + } + + /** + * Sets the table service endpoint + * + * @param endpoint URL of the service + * @return the updated TableServiceClientBuilder object + */ + public TableServiceClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Sets the {@link HttpClient} to use for sending a receiving requests to and from the service. + * + * @param httpClient HttpClient to use for requests. + * @return the updated TableServiceClientBuilder object + */ + public TableServiceClientBuilder httpClient(HttpClient httpClient) { + if (this.httpClient != null && httpClient == null) { + logger.error("'httpClient' is being set to 'null' when it was previously configured."); + } + this.httpClient = httpClient; + return this; + } + + /** + * Sets the {@link HttpLogOptions} for service requests. + * + * @param logOptions The logging configuration to use when sending and receiving HTTP requests/responses. + * @return the updated TableServiceClientBuilder object + * @throws NullPointerException If {@code logOptions} is {@code null}. + */ + public TableServiceClientBuilder httpLogOptions(HttpLogOptions logOptions) { + this.logOptions = Objects.requireNonNull(logOptions, "'logOptions' cannot be null."); + return this; + } + + /** + * Adds a pipeline policy to apply on each request sent. The policy will be added after the retry policy. If + * the method is called multiple times, all policies will be added and their order preserved. + * + * @param pipelinePolicy a pipeline policy + * @return the updated TableServiceClientBuilder object + * @throws NullPointerException If {@code pipelinePolicy} is {@code null}. + */ + public TableServiceClientBuilder addPolicy(HttpPipelinePolicy pipelinePolicy) { + this.additionalPolicies.add(Objects.requireNonNull(pipelinePolicy, "'pipelinePolicy' cannot be null")); + return this; + } + + /** + * Sets the TablesServiceVersion that is used when making API requests. + *

    + * If a service version is not provided, the service version that will be used will be the latest known service + * version based on the version of the client library being used. If no service version is specified, updating to a + * newer version of the client library will have the result of potentially moving to a newer service version. + *

    + * Targeting a specific service version may also mean that the service will return an error for newer APIs. + * + * @param version {@link TablesServiceVersion} of the service to be used when making requests. + * @return the updated TableServiceClientBuilder object + */ + public TableServiceClientBuilder serviceVersion(TablesServiceVersion version) { + this.version = version; + return this; + } + +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TablesServiceVersion.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TablesServiceVersion.java new file mode 100644 index 000000000000..6deb608f8cc4 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TablesServiceVersion.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.util.ServiceVersion; + +/** + * The versions of Azure Storage Tables supported by this client library. + */ +public enum TablesServiceVersion implements ServiceVersion { + V2019_02_02("no yet implemented"); + private final String version; + + TablesServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library + * + * @return the latest TablesServiceVersion + */ + public static TablesServiceVersion getLatest() { + return V2019_02_02; + } + +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/UpdateMode.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/UpdateMode.java new file mode 100644 index 000000000000..8e990483add0 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/UpdateMode.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +/** + * update type for update and upsert methods + */ +public enum UpdateMode { + MERGE, + REPLACE +} diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/package-info.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/package-info.java index 22fcc4bc3349..42528acca50a 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/package-info.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/package-info.java @@ -1,5 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -/** Package containing the inner classes for Azure Tables SDK. */ +/** + * Package containing the classes for Tables Clients. + */ package com.azure.data.tables; diff --git a/sdk/tables/azure-data-tables/src/samples/java/TableServiceAsyncClientCodeSnippets.java b/sdk/tables/azure-data-tables/src/samples/java/TableServiceAsyncClientCodeSnippets.java new file mode 100644 index 000000000000..6f2eadec8698 --- /dev/null +++ b/sdk/tables/azure-data-tables/src/samples/java/TableServiceAsyncClientCodeSnippets.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import java.util.HashMap; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** + * async code snippets for the table service + */ +public class TableServiceAsyncClientCodeSnippets { + + + /** + * create table code snippet + */ + public void createTable() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + + tableServiceAsyncClient.createTable("OfficeSupplies").subscribe( + Void -> { }, + error -> System.err.println("There was an error creating the table. Error: " + error), + () -> System.out.println("Table creation successful.")); + } + + /** + * delete table code snippet + */ + public void deleteTable() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + + tableServiceAsyncClient.deleteTable("OfficeSupplies").subscribe( + Void -> { }, + error -> System.err.println("There was an error deleting the table. Error: " + error), + () -> System.out.println("Table deletion successful.")); + } + + /** + * query tables code snippet + */ + public void queryTable() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + QueryOptions queryOptions = new QueryOptions().setFilter("TableName eq OfficeSupplies"); + + tableServiceAsyncClient.queryTables(queryOptions).subscribe(azureTable -> { + System.out.println(azureTable.getName()); + }, error -> { + System.err.println("There was an error querying the service. Error: " + error); + }); + } + + /** + * insert entity code snippet + */ + private void insertEntity() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + + TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies"); + Map properties = new HashMap<>(); + properties.put("RowKey", "crayolaMarkers"); + properties.put("PartitionKey", "markers"); + + tableAsyncClient.createEntity(properties).subscribe(tableEntity -> { + System.out.println("Insert Entity Successful. Entity: " + tableEntity); + }, error -> { + System.err.println("There was an error inserting the Entity. Error: " + error); + }); + } + + /** + * delete entity code snippet + */ + private void deleteEntity() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + + TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies"); + String rowKey = "crayolaMarkers"; + String partitionKey = "markers"; + + tableAsyncClient.get(rowKey, partitionKey).flatMap(tableEntity -> { + System.out.println("Table Entity: " + tableEntity); + return tableAsyncClient.deleteEntity(tableEntity); + }).subscribe( + Void -> { }, + error -> System.err.println("There was an error deleting the Entity. Error: " + error), + () -> System.out.println("Delete Entity Successful.")); + } + + /** + * upsert entity code snippet + */ + private void upsert() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + + TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies"); + String rowKey = "crayolaMarkers"; + String partitionKey = "markers"; + + tableAsyncClient.get(rowKey, partitionKey).flatMap(tableEntity -> { + System.out.println("Table Entity: " + tableEntity); + tableEntity.addProperty("Price", "5"); + Mono updateEntityMono = tableAsyncClient.upsertEntity(UpdateMode.MERGE, tableEntity); + return updateEntityMono; + }).subscribe( + Void -> { }, + error -> System.err.println("There was an error upserting the Entity. Error: " + error), + () -> System.out.println("Upsert Entity Successful.")); + } + + /** + * update entity code snippet + */ + private void update() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + + TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies"); + String rowKey = "crayolaMarkers"; + String partitionKey = "markers"; + + tableAsyncClient.get(rowKey, partitionKey).flatMap(tableEntity -> { + System.out.println("Table Entity: " + tableEntity); + tableEntity.addProperty("Price", "5"); + Mono updateEntityMono = tableAsyncClient.updateEntity(UpdateMode.REPLACE, tableEntity); + return updateEntityMono; + }).subscribe( + Void -> { }, + error -> System.err.println("There was an error updating the Entity. Error: " + error), + () -> System.out.println("Update Entity Successful.")); + } + + /** + * query entity code snippet + */ + private void queryEntities() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + + TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies"); + QueryOptions queryOptions = new QueryOptions() + .setFilter("Product eq markers") + .setSelect("Seller, Price"); + + tableAsyncClient.queryEntities(queryOptions).subscribe(tableEntity -> { + System.out.println("Table Entity: " + tableEntity); + }, error -> { + System.err.println("There was an error querying the table. Error: " + error); + }); + } + + /** + * checks to see if an entity exists code snippet + */ + private void existsEntity() { + TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildAsyncClient(); + + TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies"); + + tableAsyncClient.get("crayolaMarkers", "markers") + .subscribe(tableEntity -> { + System.out.println("Table Entity exists: " + tableEntity); + }, error -> { + System.err.println("There was an error getting the entity. Error: " + error); + }); + } +} diff --git a/sdk/tables/azure-data-tables/src/samples/java/TableServiceClientCodeSnippets.java b/sdk/tables/azure-data-tables/src/samples/java/TableServiceClientCodeSnippets.java new file mode 100644 index 000000000000..797df52758cf --- /dev/null +++ b/sdk/tables/azure-data-tables/src/samples/java/TableServiceClientCodeSnippets.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.data.tables; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.util.logging.ClientLogger; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * sync code snippets for the table service + */ +public class TableServiceClientCodeSnippets { + private final ClientLogger logger = new ClientLogger("TableServiceClientCodeSnippets"); + + /** + * create table code snippet + */ + public void createTable() { + TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildClient(); + + try { + AzureTable officeSuppliesTable = tableServiceClient.createTable("OfficeSupplies"); + } catch (Exception e) { + System.err.println("Create Table Unsuccessful. Error: " + e); + } + } + + /** + * delete table code snippet + */ + public void deleteTable() { + TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildClient(); + + try { + tableServiceClient.deleteTable("OfficeSupplies"); + } catch (Exception e) { + System.err.println("Delete Table Unsuccessful. Error: " + e); + } + } + + /** + * query table code snippet + */ + public void queryTables() { + TableServiceClient tableServiceClient = new TableServiceClientBuilder() + .connectionString("connectionString") + .buildClient(); + + QueryOptions queryOptions = new QueryOptions().setFilter("TableName eq OfficeSupplies"); + + try { + List responseTables = tableServiceClient.queryTables(queryOptions); + } catch (HttpResponseException e) { + System.err.println("Table Query Unsuccessful. Error: " + e); + } + } + + /** + * insert entity code snippet + */ + private void insertEntity() { + TableClient tableClient = new TableClientBuilder() + .connectionString("connectionString") + .tableName("OfficeSupplies") + .buildClient(); + + Map properties = new HashMap<>(); + properties.put("RowKey", "crayolaMarkers"); + properties.put("PartitionKey", "markers"); + try { + TableEntity tableEntity = tableClient.createEntity(properties); + } catch (HttpResponseException e) { + System.err.println("Insert Entity Unsuccessful. Error: " + e); + } + } + + /** + * update entity code snippet + */ + private void updateEntity() { + TableClient tableClient = new TableClientBuilder() + .connectionString("connectionString") + .tableName("OfficeSupplies") + .buildClient(); + + String rowKey = "crayolaMarkers"; + String partitionKey = "markers"; + TableEntity tableEntity = null; + try { + tableEntity = tableClient.get(rowKey, partitionKey); + } catch (HttpResponseException e) { + System.err.println("Get Entity Unsuccessful: " + e); + } + try { + tableClient.updateEntity(UpdateMode.REPLACE, tableEntity); + } catch (HttpResponseException e) { + System.err.println("Update Entity Unsuccessful. Error: " + e); + } + } + + /** + * upsert entity code snippet + */ + private void upsertEntity() { + TableClient tableClient = new TableClientBuilder() + .connectionString("connectionString") + .tableName("OfficeSupplies") + .buildClient(); + + String rowKey = "crayolaMarkers"; + String partitionKey = "markers"; + TableEntity tableEntity = null; + try { + tableEntity = tableClient.get(rowKey, partitionKey); + } catch (HttpResponseException e) { + System.err.println("Get Entity Unsuccessful: " + e); + } + try { + tableClient.upsertEntity(UpdateMode.REPLACE, tableEntity); + } catch (HttpResponseException e) { + System.err.println("Upsert Entity Unsuccessful. Error: " + e); + } + } + + /** + * delete entity code snippet + */ + private void deleteEntity() { + TableClient tableClient = new TableClientBuilder() + .connectionString("connectionString") + .tableName("OfficeSupplies") + .buildClient(); + + String rowKey = "crayolaMarkers"; + String partitionKey = "markers"; + TableEntity tableEntity = null; + try { + tableEntity = tableClient.get(rowKey, partitionKey); + } catch (HttpResponseException e) { + System.err.println("Get Entity Unsuccessful: " + e); + } + try { + tableClient.deleteEntity(tableEntity); + } catch (HttpResponseException e) { + System.err.println("Delete Entity Unsuccessful. Error: " + e); + } + } + + /** + * query entity code snippet + */ + private void queryEntity() { + TableClient tableClient = new TableClientBuilder() + .connectionString("connectionString") + .tableName("OfficeSupplies") + .buildClient(); + + QueryOptions queryOptions = new QueryOptions() + .setFilter("Product eq markers") + .setSelect("Seller, Price"); + try { + List tableEntities = tableClient.queryEntities(queryOptions); + } catch (HttpResponseException e) { + System.err.println("Query Table Entities Unsuccessful. Error: " + e); + } + } + + /** + * check to see if a table entity exists + */ + public void entityExists() { + TableClient tableClient = new TableClientBuilder() + .connectionString("connectionString") + .tableName("OfficeSupplies") + .buildClient(); + + String rowKey = "crayolaMarkers"; + String partitionKey = "markers"; + try { + TableEntity tableEntity = tableClient.get(rowKey, partitionKey); + } catch (HttpResponseException e) { + System.err.println("Get Entity Unsuccessful. Entity may not exist: " + e); + } + } +} diff --git a/sdk/template/azure-sdk-template/CHANGELOG.md b/sdk/template/azure-sdk-template/CHANGELOG.md index aeecf4eeebd0..d1402ee4d246 100644 --- a/sdk/template/azure-sdk-template/CHANGELOG.md +++ b/sdk/template/azure-sdk-template/CHANGELOG.md @@ -1,6 +1,28 @@ # Release History -## 1.0.4-beta.20 (Unreleased) +## 1.1.0-beta.1 (Unreleased) + + +## 1.0.5 (2020-07-17) +- Test Java Release Pipeline on a non-beta version (normal docs, normal sources) + +## 1.0.4-beta.25 (2020-07-15) +- Test Java Release Pipeline (normal docs, normal sources) + +## 1.0.4-beta.24 (2020-07-13) +- Test Java Release Pipeline (normal docs, normal sources) + +## 1.0.4-beta.23 (2020-07-13) +- Test Java Release Pipeline (normal docs, normal sources) + +## 1.0.4-beta.22 (2020-07-13) +- Test Java Release Pipeline (normal docs, normal sources) + +## 1.0.4-beta.21 (2020-07-13) +- Test Java Release Pipeline (normal docs, normal sources) + +## 1.0.4-beta.20 (2020-07-13) +- Test Java Release Pipeline (normal docs, normal sources) ## 1.0.4-beta.19 (2020-05-20) - Test Java Release Pipeline (normal docs, normal sources) diff --git a/sdk/template/azure-sdk-template/pom.xml b/sdk/template/azure-sdk-template/pom.xml index 4d9edccca439..5b25219f0abb 100644 --- a/sdk/template/azure-sdk-template/pom.xml +++ b/sdk/template/azure-sdk-template/pom.xml @@ -11,7 +11,7 @@ com.azure azure-sdk-template - 1.0.4-beta.20 + 1.1.0-beta.1 Microsoft Azure SDK for Template This package contains Microsoft Azure SDK for Template. diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 5097a35032ff..9e18243e5342 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -116,7 +116,7 @@ Authentication with AAD requires some initial setup: com.azure azure-identity - 1.0.8 + 1.0.9 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index 7b23d6b6e5ec..306f3e2421b8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/pom.xml +++ b/sdk/textanalytics/azure-ai-textanalytics/pom.xml @@ -88,7 +88,7 @@ com.azure azure-identity - 1.1.0-beta.6 + 1.0.9 test diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java index cc0ad672ecd8..19e30d65f6aa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/AnalyzeSentimentAsyncClient.java @@ -105,12 +105,12 @@ Mono> analyzeSentimentBatchWithContex * Helper method to convert the service response of {@link SentimentResponse} to {@link Response} that contains * {@link AnalyzeSentimentResultCollection}. * - * @param response The {@link SimpleResponse} of {@link SentimentResponse} returned by the service. + * @param response The {@link Response} of {@link SentimentResponse} returned by the service. * * @return A {@link Response} contains {@link AnalyzeSentimentResultCollection}. */ private Response toAnalyzeSentimentResultCollectionResponse( - SimpleResponse response) { + Response response) { final SentimentResponse sentimentResponse = response.getValue(); final List analyzeSentimentResults = new ArrayList<>(); for (DocumentSentiment documentSentiment : sentimentResponse.getDocuments()) { @@ -125,7 +125,8 @@ private Response toAnalyzeSentimentResultColle if (documentError.getId().isEmpty()) { throw logger.logExceptionAsError( new HttpResponseException(documentError.getError().getInnererror().getMessage(), - getEmptyErrorIdHttpResponse(response), documentError.getError().getInnererror().getCode())); + getEmptyErrorIdHttpResponse(new SimpleResponse<>(response, response.getValue())), + documentError.getError().getInnererror().getCode())); } analyzeSentimentResults.add(new AnalyzeSentimentResult(documentError.getId(), null, toTextAnalyticsError(documentError.getError()), null)); @@ -194,11 +195,13 @@ private AnalyzeSentimentResult convertToAnalyzeSentimentResult(DocumentSentiment */ private Mono> getAnalyzedSentimentResponse( Iterable documents, TextAnalyticsRequestOptions options, Context context) { + // TODO: add opinion mining in the following PR return service.sentimentWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), - context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE), options == null ? null : options.getModelVersion(), - options == null ? null : options.isIncludeStatistics()) + options == null ? null : options.isIncludeStatistics(), + null, + context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Analyzed sentiment for a batch of documents - {}", response)) .doOnError(error -> logger.warning("Failed to analyze sentiment - {}", error)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/DetectLanguageAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/DetectLanguageAsyncClient.java index 942844ba1ff2..67a844cb1859 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/DetectLanguageAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/DetectLanguageAsyncClient.java @@ -103,7 +103,7 @@ Mono> detectLanguageBatchWithContext( * @return A {@link Response} that contains {@link DetectLanguageResultCollection}. */ private Response toTextAnalyticsResultDocumentResponse( - SimpleResponse response) { + Response response) { final LanguageResult languageResult = response.getValue(); final List detectLanguageResults = new ArrayList<>(); for (DocumentLanguage documentLanguage : languageResult.getDocuments()) { @@ -138,7 +138,8 @@ private Response toTextAnalyticsResultDocumentRe if (documentError.getId().isEmpty()) { throw logger.logExceptionAsError( new HttpResponseException(documentError.getError().getInnererror().getMessage(), - getEmptyErrorIdHttpResponse(response), documentError.getError().getInnererror().getCode())); + getEmptyErrorIdHttpResponse(new SimpleResponse<>(response, response.getValue())), + documentError.getError().getInnererror().getCode())); } detectLanguageResults.add(new DetectLanguageResult(documentError.getId(), null, @@ -164,9 +165,9 @@ private Mono> getDetectedLanguageRespon Iterable documents, TextAnalyticsRequestOptions options, Context context) { return service.languagesWithResponseAsync( new LanguageBatchInput().setDocuments(toLanguageInput(documents)), - context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE), options == null ? null : options.getModelVersion(), - options == null ? null : options.isIncludeStatistics()) + options == null ? null : options.isIncludeStatistics(), + context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Detected languages for a batch of documents - {}", response.getValue())) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/ExtractKeyPhraseAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/ExtractKeyPhraseAsyncClient.java index 28bc6dd54f59..a5644deaa97c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/ExtractKeyPhraseAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/ExtractKeyPhraseAsyncClient.java @@ -135,12 +135,12 @@ Mono> extractKeyPhrasesBatchWithCont * Helper method to convert the service response of {@link KeyPhraseResult} to {@link Response} * which contains {@link ExtractKeyPhrasesResultCollection}. * - * @param response the {@link SimpleResponse} returned by the service. + * @param response the {@link Response} returned by the service. * * @return A {@link Response} which contains {@link ExtractKeyPhrasesResultCollection}. */ private Response toExtractKeyPhrasesResultCollectionResponse( - final SimpleResponse response) { + final Response response) { final KeyPhraseResult keyPhraseResult = response.getValue(); // List of documents results final List keyPhraseResultList = new ArrayList<>(); @@ -169,7 +169,8 @@ private Response toExtractKeyPhrasesResultCol if (documentError.getId().isEmpty()) { throw logger.logExceptionAsError( new HttpResponseException(documentError.getError().getInnererror().getMessage(), - getEmptyErrorIdHttpResponse(response), documentError.getError().getInnererror().getCode())); + getEmptyErrorIdHttpResponse(new SimpleResponse<>(response, response.getValue())), + documentError.getError().getInnererror().getCode())); } final TextAnalyticsError error = toTextAnalyticsError(documentError.getError()); @@ -198,9 +199,9 @@ private Mono> getExtractedKeyPhrases Iterable documents, TextAnalyticsRequestOptions options, Context context) { return service.keyPhrasesWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), - context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE), options == null ? null : options.getModelVersion(), - options == null ? null : options.isIncludeStatistics()) + options == null ? null : options.isIncludeStatistics(), + context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of document - {}", documents.toString())) .doOnSuccess(response -> logger.info("A batch of key phrases output - {}", response.getValue())) .doOnError(error -> logger.warning("Failed to extract key phrases - {}", error)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java index 30a026f24a6d..0ec5fadddcc8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeEntityAsyncClient.java @@ -133,12 +133,12 @@ Mono> recognizeEntitiesBatchWithCont * Helper method to convert the service response of {@link EntitiesResult} to {@link Response} which contains * {@link RecognizeEntitiesResultCollection}. * - * @param response the {@link SimpleResponse} of {@link EntitiesResult} returned by the service. + * @param response the {@link Response} of {@link EntitiesResult} returned by the service. * * @return A {@link Response} that contains {@link RecognizeEntitiesResultCollection}. */ private Response toRecognizeEntitiesResultCollectionResponse( - final SimpleResponse response) { + final Response response) { EntitiesResult entitiesResult = response.getValue(); // List of documents results List recognizeEntitiesResults = new ArrayList<>(); @@ -171,7 +171,8 @@ private Response toRecognizeEntitiesResultCol if (documentError.getId().isEmpty()) { throw logger.logExceptionAsError( new HttpResponseException(documentError.getError().getInnererror().getMessage(), - getEmptyErrorIdHttpResponse(response), documentError.getError().getInnererror().getCode())); + getEmptyErrorIdHttpResponse(new SimpleResponse<>(response, response.getValue())), + documentError.getError().getInnererror().getCode())); } recognizeEntitiesResults.add( @@ -198,9 +199,9 @@ private Mono> getRecognizedEntitiesR Iterable documents, TextAnalyticsRequestOptions options, Context context) { return service.entitiesRecognitionGeneralWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), - context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE), options == null ? null : options.getModelVersion(), - options == null ? null : options.isIncludeStatistics()) + options == null ? null : options.isIncludeStatistics(), + context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Recognized entities for a batch of documents- {}", response.getValue())) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java index 035762c54c6b..db1da00fc210 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/RecognizeLinkedEntityAsyncClient.java @@ -135,12 +135,12 @@ Mono> recognizeLinkedEntitiesB * Helper method to convert the service response of {@link EntityLinkingResult} to * {@link Response} which contains {@link RecognizeLinkedEntitiesResultCollection}. * - * @param response the {@link SimpleResponse} of {@link EntityLinkingResult} returned by the service. + * @param response the {@link Response} of {@link EntityLinkingResult} returned by the service. * * @return A {@link Response} that contains {@link RecognizeLinkedEntitiesResultCollection}. */ private Response toRecognizeLinkedEntitiesResultCollectionResponse( - final SimpleResponse response) { + final Response response) { final EntityLinkingResult entityLinkingResult = response.getValue(); // List of documents results final List linkedEntitiesResults = new ArrayList<>(); @@ -170,7 +170,8 @@ private Response toRecognizeLinkedEntit if (documentError.getId().isEmpty()) { throw logger.logExceptionAsError( new HttpResponseException(documentError.getError().getInnererror().getMessage(), - getEmptyErrorIdHttpResponse(response), documentError.getError().getInnererror().getCode())); + getEmptyErrorIdHttpResponse(new SimpleResponse<>(response, response.getValue())), + documentError.getError().getInnererror().getCode())); } linkedEntitiesResults.add( @@ -213,9 +214,9 @@ private IterableStream mapLinkedEntity( Context context) { return service.entitiesLinkingWithResponseAsync( new MultiLanguageBatchInput().setDocuments(toMultiLanguageInput(documents)), - context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE), options == null ? null : options.getModelVersion(), - options == null ? null : options.isIncludeStatistics()) + options == null ? null : options.isIncludeStatistics(), + context.addData(AZ_TRACING_NAMESPACE_KEY, COGNITIVE_TRACING_NAMESPACE_VALUE)) .doOnSubscribe(ignoredValue -> logger.info("A batch of documents - {}", documents.toString())) .doOnSuccess(response -> logger.info("Recognized linked entities for a batch of documents - {}", response.getValue())) diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java index b78dfeac6610..c1caf08b0785 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java @@ -200,7 +200,7 @@ public TextAnalyticsAsyncClient buildAsyncClient() { final TextAnalyticsClientImpl textAnalyticsAPI = new TextAnalyticsClientImplBuilder() .endpoint(endpoint) .pipeline(pipeline) - .build(); + .buildClient(); return new TextAnalyticsAsyncClient(textAnalyticsAPI, serviceVersion, defaultCountryHint, defaultLanguage); } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java index 0dff36a6128a..b8367546eb42 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java @@ -9,7 +9,8 @@ * The versions of Azure Text Analytics supported by this client library. */ public enum TextAnalyticsServiceVersion implements ServiceVersion { - V3_0("v3.0"); + V3_0("v3.0"), + V3_1_PREVIEW_1("v3.1-preview.1"); private final String version; @@ -31,7 +32,7 @@ public String getVersion() { * @return the latest {@link TextAnalyticsServiceVersion} */ public static TextAnalyticsServiceVersion getLatest() { - return V3_0; + return V3_1_PREVIEW_1; } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java index 858589603bdc..f285b7398e18 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java @@ -27,272 +27,265 @@ import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; -import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; -/** - * Initializes a new instance of the TextAnalyticsClient type. - */ +/** Initializes a new instance of the TextAnalyticsClient type. */ public final class TextAnalyticsClientImpl { - /** - * The proxy service used to perform REST calls. - */ + /** The proxy service used to perform REST calls. */ private final TextAnalyticsClientService service; /** - * Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus.api.cognitive.microsoft.com). */ - private String endpoint; + private final String endpoint; /** - * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). - * + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus.api.cognitive.microsoft.com). + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** - * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). - * - * @param endpoint the endpoint value. - * @return the service client itself. - */ - public TextAnalyticsClientImpl setEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * The HTTP pipeline to send requests through. - */ + /** The HTTP pipeline to send requests through. */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** - * Initializes an instance of TextAnalyticsClient client. - */ - public TextAnalyticsClientImpl() { - this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build()); + /** Initializes an instance of TextAnalyticsClient client. */ + TextAnalyticsClientImpl(String endpoint) { + this( + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(), + endpoint); } /** * Initializes an instance of TextAnalyticsClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. */ - public TextAnalyticsClientImpl(HttpPipeline httpPipeline) { + TextAnalyticsClientImpl(HttpPipeline httpPipeline, String endpoint) { this.httpPipeline = httpPipeline; + this.endpoint = endpoint; this.service = RestProxy.create(TextAnalyticsClientService.class, this.httpPipeline); } /** - * The interface defining all the services for TextAnalyticsClient to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for TextAnalyticsClient to be used by the proxy service to perform REST + * calls. */ - @Host("{Endpoint}/text/analytics/v3.0") + @Host("{Endpoint}/text/analytics/v3.1-preview.1") @ServiceInterface(name = "TextAnalyticsClient") private interface TextAnalyticsClientService { @Post("/entities/recognition/general") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) - Mono> entitiesRecognitionGeneral(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") MultiLanguageBatchInput input, Context context); + Mono> entitiesRecognitionGeneral( + @HostParam("Endpoint") String endpoint, + @QueryParam("model-version") String modelVersion, + @QueryParam("showStats") Boolean showStats, + @BodyParam("application/json") MultiLanguageBatchInput input, + Context context); + + @Post("/entities/recognition/pii") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) + Mono> entitiesRecognitionPii( + @HostParam("Endpoint") String endpoint, + @QueryParam("model-version") String modelVersion, + @QueryParam("showStats") Boolean showStats, + @QueryParam("domain") String domain, + @BodyParam("application/json") MultiLanguageBatchInput input, + Context context); @Post("/entities/linking") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) - Mono> entitiesLinking(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") MultiLanguageBatchInput input, Context context); + Mono> entitiesLinking( + @HostParam("Endpoint") String endpoint, + @QueryParam("model-version") String modelVersion, + @QueryParam("showStats") Boolean showStats, + @BodyParam("application/json") MultiLanguageBatchInput input, + Context context); @Post("/keyPhrases") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) - Mono> keyPhrases(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") MultiLanguageBatchInput input, Context context); + Mono> keyPhrases( + @HostParam("Endpoint") String endpoint, + @QueryParam("model-version") String modelVersion, + @QueryParam("showStats") Boolean showStats, + @BodyParam("application/json") MultiLanguageBatchInput input, + Context context); @Post("/languages") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) - Mono> languages(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") LanguageBatchInput input, Context context); + Mono> languages( + @HostParam("Endpoint") String endpoint, + @QueryParam("model-version") String modelVersion, + @QueryParam("showStats") Boolean showStats, + @BodyParam("application/json") LanguageBatchInput input, + Context context); @Post("/sentiment") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class) - Mono> sentiment(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") MultiLanguageBatchInput input, Context context); + Mono> sentiment( + @HostParam("Endpoint") String endpoint, + @QueryParam("model-version") String modelVersion, + @QueryParam("showStats") Boolean showStats, + @QueryParam("opinionMining") Boolean opinionMining, + @BodyParam("application/json") MultiLanguageBatchInput input, + Context context); } /** - * The API returns a list of general named entities in a given document. For the list of supported entity types, check <a href="https://aka.ms/taner">Supported Entity Types in Text Analytics API</a>. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * + * The API returns a list of general named entities in a given document. For the list of supported entity types, + * check <a href="https://aka.ms/taner">Supported Entity Types in Text Analytics API</a>. See the <a + * href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled + * languages. + * * @param input Contains a set of input documents to be analyzed by the service. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. + * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is + * not specified, the API should default to the latest, non-preview version. * @param showStats (Optional) if set to true, response will contain input and document level statistics. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> entitiesRecognitionGeneralWithResponseAsync(MultiLanguageBatchInput input, String modelVersion, Boolean showStats) { - return FluxUtil.withContext(context -> service.entitiesRecognitionGeneral(this.getEndpoint(), modelVersion, showStats, input, context)); - } - - /** - * The API returns a list of general named entities in a given document. For the list of supported entity types, check <a href="https://aka.ms/taner">Supported Entity Types in Text Analytics API</a>. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * - * @param input Contains a set of input documents to be analyzed by the service. * @param context The context to associate with this operation. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws TextAnalyticsErrorException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> entitiesRecognitionGeneralWithResponseAsync(MultiLanguageBatchInput input, Context context, String modelVersion, Boolean showStats) { + public Mono> entitiesRecognitionGeneralWithResponseAsync( + MultiLanguageBatchInput input, String modelVersion, Boolean showStats, Context context) { return service.entitiesRecognitionGeneral(this.getEndpoint(), modelVersion, showStats, input, context); } /** - * The API returns a list of recognized entities with links to a well-known knowledge base. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * + * The API returns a list of entities with personal information (\"SSN\", \"Bank Account\" etc) in the document. For + * the list of supported entity types, check <a href="https://aka.ms/tanerpii">Supported Entity Types in Text + * Analytics API</a>. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics + * API</a> for the list of enabled languages. + * * @param input Contains a set of input documents to be analyzed by the service. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. + * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is + * not specified, the API should default to the latest, non-preview version. * @param showStats (Optional) if set to true, response will contain input and document level statistics. + * @param domain (Optional) if set to 'PHI', response will contain only PHI entities. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws TextAnalyticsErrorException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> entitiesLinkingWithResponseAsync(MultiLanguageBatchInput input, String modelVersion, Boolean showStats) { - return FluxUtil.withContext(context -> service.entitiesLinking(this.getEndpoint(), modelVersion, showStats, input, context)); + public Mono> entitiesRecognitionPiiWithResponseAsync( + MultiLanguageBatchInput input, String modelVersion, Boolean showStats, String domain, Context context) { + return service.entitiesRecognitionPii(this.getEndpoint(), modelVersion, showStats, domain, input, context); } /** - * The API returns a list of recognized entities with links to a well-known knowledge base. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * + * The API returns a list of recognized entities with links to a well-known knowledge base. See the <a + * href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled + * languages. + * * @param input Contains a set of input documents to be analyzed by the service. - * @param context The context to associate with this operation. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. + * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is + * not specified, the API should default to the latest, non-preview version. * @param showStats (Optional) if set to true, response will contain input and document level statistics. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws TextAnalyticsErrorException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> entitiesLinkingWithResponseAsync(MultiLanguageBatchInput input, Context context, String modelVersion, Boolean showStats) { + public Mono> entitiesLinkingWithResponseAsync( + MultiLanguageBatchInput input, String modelVersion, Boolean showStats, Context context) { return service.entitiesLinking(this.getEndpoint(), modelVersion, showStats, input, context); } /** - * The API returns a list of strings denoting the key phrases in the input text. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * + * The API returns a list of strings denoting the key phrases in the input text. See the <a + * href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled + * languages. + * * @param input Contains a set of input documents to be analyzed by the service. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. + * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is + * not specified, the API should default to the latest, non-preview version. * @param showStats (Optional) if set to true, response will contain input and document level statistics. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> keyPhrasesWithResponseAsync(MultiLanguageBatchInput input, String modelVersion, Boolean showStats) { - return FluxUtil.withContext(context -> service.keyPhrases(this.getEndpoint(), modelVersion, showStats, input, context)); - } - - /** - * The API returns a list of strings denoting the key phrases in the input text. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * - * @param input Contains a set of input documents to be analyzed by the service. * @param context The context to associate with this operation. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws TextAnalyticsErrorException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> keyPhrasesWithResponseAsync(MultiLanguageBatchInput input, Context context, String modelVersion, Boolean showStats) { + public Mono> keyPhrasesWithResponseAsync( + MultiLanguageBatchInput input, String modelVersion, Boolean showStats, Context context) { return service.keyPhrases(this.getEndpoint(), modelVersion, showStats, input, context); } /** - * The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * + * The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% + * certainty that the identified language is true. See the <a href="https://aka.ms/talangs">Supported + * languages in Text Analytics API</a> for the list of enabled languages. + * * @param input Collection of documents to analyze. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. + * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is + * not specified, the API should default to the latest, non-preview version. * @param showStats (Optional) if set to true, response will contain input and document level statistics. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> languagesWithResponseAsync(LanguageBatchInput input, String modelVersion, Boolean showStats) { - return FluxUtil.withContext(context -> service.languages(this.getEndpoint(), modelVersion, showStats, input, context)); - } - - /** - * The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * - * @param input Collection of documents to analyze. * @param context The context to associate with this operation. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws TextAnalyticsErrorException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> languagesWithResponseAsync(LanguageBatchInput input, Context context, String modelVersion, Boolean showStats) { + public Mono> languagesWithResponseAsync( + LanguageBatchInput input, String modelVersion, Boolean showStats, Context context) { return service.languages(this.getEndpoint(), modelVersion, showStats, input, context); } /** - * The API returns a sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral) for the document and each sentence within it. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * + * The API returns a detailed sentiment analysis for the input text. The analysis is done in multiple levels of + * granularity, start from the a document level, down to sentence and key terms (aspects) and opinions. + * * @param input Contains a set of input documents to be analyzed by the service. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. + * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is + * not specified, the API should default to the latest, non-preview version. * @param showStats (Optional) if set to true, response will contain input and document level statistics. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TextAnalyticsErrorException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sentimentWithResponseAsync(MultiLanguageBatchInput input, String modelVersion, Boolean showStats) { - return FluxUtil.withContext(context -> service.sentiment(this.getEndpoint(), modelVersion, showStats, input, context)); - } - - /** - * The API returns a sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral) for the document and each sentence within it. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages. - * - * @param input Contains a set of input documents to be analyzed by the service. + * @param opinionMining (Optional) if set to true, response will contain input and document level statistics + * including aspect-based sentiment analysis results. * @param context The context to associate with this operation. - * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. - * @param showStats (Optional) if set to true, response will contain input and document level statistics. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws TextAnalyticsErrorException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sentimentWithResponseAsync(MultiLanguageBatchInput input, Context context, String modelVersion, Boolean showStats) { - return service.sentiment(this.getEndpoint(), modelVersion, showStats, input, context); + public Mono> sentimentWithResponseAsync( + MultiLanguageBatchInput input, + String modelVersion, + Boolean showStats, + Boolean opinionMining, + Context context) { + return service.sentiment(this.getEndpoint(), modelVersion, showStats, opinionMining, input, context); } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImplBuilder.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImplBuilder.java index dc59d2fc68aa..340cd55b60a3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImplBuilder.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImplBuilder.java @@ -11,18 +11,18 @@ import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -/** - * A builder for creating a new instance of the TextAnalyticsClient type. - */ -@ServiceClientBuilder(serviceClients = TextAnalyticsClientImpl.class) +/** A builder for creating a new instance of the TextAnalyticsClient type. */ +@ServiceClientBuilder(serviceClients = {TextAnalyticsClientImpl.class}) public final class TextAnalyticsClientImplBuilder { /* - * Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * Supported Cognitive Services endpoints (protocol and hostname, for + * example: https://westus.api.cognitive.microsoft.com). */ private String endpoint; /** - * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus.api.cognitive.microsoft.com). * * @param endpoint the endpoint value. * @return the TextAnalyticsClientImplBuilder. @@ -53,14 +53,14 @@ public TextAnalyticsClientImplBuilder pipeline(HttpPipeline pipeline) { * * @return an instance of TextAnalyticsClientImpl. */ - public TextAnalyticsClientImpl build() { + public TextAnalyticsClientImpl buildClient() { if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(); - } - TextAnalyticsClientImpl client = new TextAnalyticsClientImpl(pipeline); - if (this.endpoint != null) { - client.setEndpoint(this.endpoint); + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); } + TextAnalyticsClientImpl client = new TextAnalyticsClientImpl(pipeline, endpoint); return client; } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectConfidenceScoreLabel.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectConfidenceScoreLabel.java new file mode 100644 index 000000000000..668ede14eb52 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectConfidenceScoreLabel.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AspectConfidenceScoreLabel model. */ +@Fluent +public final class AspectConfidenceScoreLabel { + /* + * The positive property. + */ + @JsonProperty(value = "positive", required = true) + private double positive; + + /* + * The negative property. + */ + @JsonProperty(value = "negative", required = true) + private double negative; + + /** + * Get the positive property: The positive property. + * + * @return the positive value. + */ + public double getPositive() { + return this.positive; + } + + /** + * Set the positive property: The positive property. + * + * @param positive the positive value to set. + * @return the AspectConfidenceScoreLabel object itself. + */ + public AspectConfidenceScoreLabel setPositive(double positive) { + this.positive = positive; + return this; + } + + /** + * Get the negative property: The negative property. + * + * @return the negative value. + */ + public double getNegative() { + return this.negative; + } + + /** + * Set the negative property: The negative property. + * + * @param negative the negative value to set. + * @return the AspectConfidenceScoreLabel object itself. + */ + public AspectConfidenceScoreLabel setNegative(double negative) { + this.negative = negative; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelation.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelation.java new file mode 100644 index 000000000000..05ce36447529 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelation.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AspectRelation model. */ +@Fluent +public final class AspectRelation { + /* + * The type related to the aspect. + */ + @JsonProperty(value = "relationType", required = true) + private AspectRelationType relationType; + + /* + * The JSON pointer indicating the linked object. + */ + @JsonProperty(value = "ref", required = true) + private String ref; + + /** + * Get the relationType property: The type related to the aspect. + * + * @return the relationType value. + */ + public AspectRelationType getRelationType() { + return this.relationType; + } + + /** + * Set the relationType property: The type related to the aspect. + * + * @param relationType the relationType value to set. + * @return the AspectRelation object itself. + */ + public AspectRelation setRelationType(AspectRelationType relationType) { + this.relationType = relationType; + return this; + } + + /** + * Get the ref property: The JSON pointer indicating the linked object. + * + * @return the ref value. + */ + public String getRef() { + return this.ref; + } + + /** + * Set the ref property: The JSON pointer indicating the linked object. + * + * @param ref the ref value to set. + * @return the AspectRelation object itself. + */ + public AspectRelation setRef(String ref) { + this.ref = ref; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java new file mode 100644 index 000000000000..77fd22fbbc10 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AspectRelationType. */ +public final class AspectRelationType extends ExpandableStringEnum { + /** Static value opinion for AspectRelationType. */ + public static final AspectRelationType OPINION = fromString("opinion"); + + /** Static value aspect for AspectRelationType. */ + public static final AspectRelationType ASPECT = fromString("aspect"); + + /** + * Creates or finds a AspectRelationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AspectRelationType. + */ + @JsonCreator + public static AspectRelationType fromString(String name) { + return fromString(name, AspectRelationType.class); + } + + /** @return known AspectRelationType values. */ + public static Collection values() { + return values(AspectRelationType.class); + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DetectedLanguage.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DetectedLanguage.java index bd031227091f..db9538d2c004 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DetectedLanguage.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DetectedLanguage.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The DetectedLanguage model. - */ +/** The DetectedLanguage model. */ @Fluent public final class DetectedLanguage { /* @@ -33,9 +31,8 @@ public final class DetectedLanguage { private double confidenceScore; /** - * Get the name property: Long name of a detected language (e.g. English, - * French). - * + * Get the name property: Long name of a detected language (e.g. English, French). + * * @return the name value. */ public String getName() { @@ -43,9 +40,8 @@ public String getName() { } /** - * Set the name property: Long name of a detected language (e.g. English, - * French). - * + * Set the name property: Long name of a detected language (e.g. English, French). + * * @param name the name value to set. * @return the DetectedLanguage object itself. */ @@ -55,9 +51,9 @@ public DetectedLanguage setName(String name) { } /** - * Get the iso6391Name property: A two letter representation of the - * detected language according to the ISO 639-1 standard (e.g. en, fr). - * + * Get the iso6391Name property: A two letter representation of the detected language according to the ISO 639-1 + * standard (e.g. en, fr). + * * @return the iso6391Name value. */ public String getIso6391Name() { @@ -65,9 +61,9 @@ public String getIso6391Name() { } /** - * Set the iso6391Name property: A two letter representation of the - * detected language according to the ISO 639-1 standard (e.g. en, fr). - * + * Set the iso6391Name property: A two letter representation of the detected language according to the ISO 639-1 + * standard (e.g. en, fr). + * * @param iso6391Name the iso6391Name value to set. * @return the DetectedLanguage object itself. */ @@ -77,10 +73,9 @@ public DetectedLanguage setIso6391Name(String iso6391Name) { } /** - * Get the confidenceScore property: A confidence score between 0 and 1. - * Scores close to 1 indicate 100% certainty that the identified language - * is true. - * + * Get the confidenceScore property: A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty + * that the identified language is true. + * * @return the confidenceScore value. */ public double getConfidenceScore() { @@ -88,10 +83,9 @@ public double getConfidenceScore() { } /** - * Set the confidenceScore property: A confidence score between 0 and 1. - * Scores close to 1 indicate 100% certainty that the identified language - * is true. - * + * Set the confidenceScore property: A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty + * that the identified language is true. + * * @param confidenceScore the confidenceScore value to set. * @return the DetectedLanguage object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentEntities.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentEntities.java index dd1637927928..19f70d0823d8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentEntities.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentEntities.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The DocumentEntities model. - */ +/** The DocumentEntities model. */ @Fluent public final class DocumentEntities { /* @@ -40,7 +38,7 @@ public final class DocumentEntities { /** * Get the id property: Unique, non-empty document identifier. - * + * * @return the id value. */ public String getId() { @@ -49,7 +47,7 @@ public String getId() { /** * Set the id property: Unique, non-empty document identifier. - * + * * @param id the id value to set. * @return the DocumentEntities object itself. */ @@ -60,7 +58,7 @@ public DocumentEntities setId(String id) { /** * Get the entities property: Recognized entities in the document. - * + * * @return the entities value. */ public List getEntities() { @@ -69,7 +67,7 @@ public List getEntities() { /** * Set the entities property: Recognized entities in the document. - * + * * @param entities the entities value to set. * @return the DocumentEntities object itself. */ @@ -79,9 +77,8 @@ public DocumentEntities setEntities(List entities) { } /** - * Get the warnings property: Warnings encountered while processing - * document. - * + * Get the warnings property: Warnings encountered while processing document. + * * @return the warnings value. */ public List getWarnings() { @@ -89,9 +86,8 @@ public List getWarnings() { } /** - * Set the warnings property: Warnings encountered while processing - * document. - * + * Set the warnings property: Warnings encountered while processing document. + * * @param warnings the warnings value to set. * @return the DocumentEntities object itself. */ @@ -101,9 +97,9 @@ public DocumentEntities setWarnings(List warnings) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * * @return the statistics value. */ public DocumentStatistics getStatistics() { @@ -111,9 +107,9 @@ public DocumentStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * * @param statistics the statistics value to set. * @return the DocumentEntities object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentError.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentError.java index 7d1ac563e085..cdcc457d59e3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentError.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentError.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The DocumentError model. - */ +/** The DocumentError model. */ @Fluent public final class DocumentError { /* @@ -26,7 +24,7 @@ public final class DocumentError { /** * Get the id property: Document Id. - * + * * @return the id value. */ public String getId() { @@ -35,7 +33,7 @@ public String getId() { /** * Set the id property: Document Id. - * + * * @param id the id value to set. * @return the DocumentError object itself. */ @@ -46,7 +44,7 @@ public DocumentError setId(String id) { /** * Get the error property: Document Error. - * + * * @return the error value. */ public TextAnalyticsError getError() { @@ -55,7 +53,7 @@ public TextAnalyticsError getError() { /** * Set the error property: Document Error. - * + * * @param error the error value to set. * @return the DocumentError object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentKeyPhrases.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentKeyPhrases.java index 98c442b0fe7d..7246406feabd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentKeyPhrases.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentKeyPhrases.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The DocumentKeyPhrases model. - */ +/** The DocumentKeyPhrases model. */ @Fluent public final class DocumentKeyPhrases { /* @@ -41,7 +39,7 @@ public final class DocumentKeyPhrases { /** * Get the id property: Unique, non-empty document identifier. - * + * * @return the id value. */ public String getId() { @@ -50,7 +48,7 @@ public String getId() { /** * Set the id property: Unique, non-empty document identifier. - * + * * @param id the id value to set. * @return the DocumentKeyPhrases object itself. */ @@ -60,10 +58,9 @@ public DocumentKeyPhrases setId(String id) { } /** - * Get the keyPhrases property: A list of representative words or phrases. - * The number of key phrases returned is proportional to the number of - * words in the input document. - * + * Get the keyPhrases property: A list of representative words or phrases. The number of key phrases returned is + * proportional to the number of words in the input document. + * * @return the keyPhrases value. */ public List getKeyPhrases() { @@ -71,10 +68,9 @@ public List getKeyPhrases() { } /** - * Set the keyPhrases property: A list of representative words or phrases. - * The number of key phrases returned is proportional to the number of - * words in the input document. - * + * Set the keyPhrases property: A list of representative words or phrases. The number of key phrases returned is + * proportional to the number of words in the input document. + * * @param keyPhrases the keyPhrases value to set. * @return the DocumentKeyPhrases object itself. */ @@ -84,9 +80,8 @@ public DocumentKeyPhrases setKeyPhrases(List keyPhrases) { } /** - * Get the warnings property: Warnings encountered while processing - * document. - * + * Get the warnings property: Warnings encountered while processing document. + * * @return the warnings value. */ public List getWarnings() { @@ -94,9 +89,8 @@ public List getWarnings() { } /** - * Set the warnings property: Warnings encountered while processing - * document. - * + * Set the warnings property: Warnings encountered while processing document. + * * @param warnings the warnings value to set. * @return the DocumentKeyPhrases object itself. */ @@ -106,9 +100,9 @@ public DocumentKeyPhrases setWarnings(List warnings) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * * @return the statistics value. */ public DocumentStatistics getStatistics() { @@ -116,9 +110,9 @@ public DocumentStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * * @param statistics the statistics value to set. * @return the DocumentKeyPhrases object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLanguage.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLanguage.java index 80fa6fb3efab..b195406d8535 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLanguage.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLanguage.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The DocumentLanguage model. - */ +/** The DocumentLanguage model. */ @Fluent public final class DocumentLanguage { /* @@ -79,8 +77,7 @@ public DocumentLanguage setDetectedLanguage(DetectedLanguage detectedLanguage) { } /** - * Get the warnings property: Warnings encountered while processing - * document. + * Get the warnings property: Warnings encountered while processing document. * * @return the warnings value. */ @@ -89,8 +86,7 @@ public List getWarnings() { } /** - * Set the warnings property: Warnings encountered while processing - * document. + * Set the warnings property: Warnings encountered while processing document. * * @param warnings the warnings value to set. * @return the DocumentLanguage object itself. @@ -101,8 +97,8 @@ public DocumentLanguage setWarnings(List warnings) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. * * @return the statistics value. */ @@ -111,8 +107,8 @@ public DocumentStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. * * @param statistics the statistics value to set. * @return the DocumentLanguage object itself. diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLinkedEntities.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLinkedEntities.java index c6c548e484b8..952b1f972ddc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLinkedEntities.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLinkedEntities.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The DocumentLinkedEntities model. - */ +/** The DocumentLinkedEntities model. */ @Fluent public final class DocumentLinkedEntities { /* @@ -40,7 +38,7 @@ public final class DocumentLinkedEntities { /** * Get the id property: Unique, non-empty document identifier. - * + * * @return the id value. */ public String getId() { @@ -49,7 +47,7 @@ public String getId() { /** * Set the id property: Unique, non-empty document identifier. - * + * * @param id the id value to set. * @return the DocumentLinkedEntities object itself. */ @@ -59,9 +57,8 @@ public DocumentLinkedEntities setId(String id) { } /** - * Get the entities property: Recognized well-known entities in the - * document. - * + * Get the entities property: Recognized well-known entities in the document. + * * @return the entities value. */ public List getEntities() { @@ -69,9 +66,8 @@ public List getEntities() { } /** - * Set the entities property: Recognized well-known entities in the - * document. - * + * Set the entities property: Recognized well-known entities in the document. + * * @param entities the entities value to set. * @return the DocumentLinkedEntities object itself. */ @@ -81,9 +77,8 @@ public DocumentLinkedEntities setEntities(List entities) { } /** - * Get the warnings property: Warnings encountered while processing - * document. - * + * Get the warnings property: Warnings encountered while processing document. + * * @return the warnings value. */ public List getWarnings() { @@ -91,9 +86,8 @@ public List getWarnings() { } /** - * Set the warnings property: Warnings encountered while processing - * document. - * + * Set the warnings property: Warnings encountered while processing document. + * * @param warnings the warnings value to set. * @return the DocumentLinkedEntities object itself. */ @@ -103,9 +97,9 @@ public DocumentLinkedEntities setWarnings(List warnings) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * * @return the statistics value. */ public DocumentStatistics getStatistics() { @@ -113,9 +107,9 @@ public DocumentStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * * @param statistics the statistics value to set. * @return the DocumentLinkedEntities object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentiment.java index 80d62cfe0082..d029dc57e4b9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentiment.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentiment.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The DocumentSentiment model. - */ +/** The DocumentSentiment model. */ @Fluent public final class DocumentSentiment { /* @@ -54,7 +52,7 @@ public final class DocumentSentiment { /** * Get the id property: Unique, non-empty document identifier. - * + * * @return the id value. */ public String getId() { @@ -63,7 +61,7 @@ public String getId() { /** * Set the id property: Unique, non-empty document identifier. - * + * * @param id the id value to set. * @return the DocumentSentiment object itself. */ @@ -73,9 +71,8 @@ public DocumentSentiment setId(String id) { } /** - * Get the sentiment property: Predicted sentiment for document (Negative, - * Neutral, Positive, or Mixed). - * + * Get the sentiment property: Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). + * * @return the sentiment value. */ public DocumentSentimentValue getSentiment() { @@ -83,9 +80,8 @@ public DocumentSentimentValue getSentiment() { } /** - * Set the sentiment property: Predicted sentiment for document (Negative, - * Neutral, Positive, or Mixed). - * + * Set the sentiment property: Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). + * * @param sentiment the sentiment value to set. * @return the DocumentSentiment object itself. */ @@ -95,9 +91,9 @@ public DocumentSentiment setSentiment(DocumentSentimentValue sentiment) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * * @return the statistics value. */ public DocumentStatistics getStatistics() { @@ -105,9 +101,9 @@ public DocumentStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the document payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the document payload. + * * @param statistics the statistics value to set. * @return the DocumentSentiment object itself. */ @@ -117,9 +113,9 @@ public DocumentSentiment setStatistics(DocumentStatistics statistics) { } /** - * Get the confidenceScores property: Document level sentiment confidence - * scores between 0 and 1 for each sentiment class. - * + * Get the confidenceScores property: Document level sentiment confidence scores between 0 and 1 for each sentiment + * class. + * * @return the confidenceScores value. */ public SentimentConfidenceScorePerLabel getConfidenceScores() { @@ -127,9 +123,9 @@ public SentimentConfidenceScorePerLabel getConfidenceScores() { } /** - * Set the confidenceScores property: Document level sentiment confidence - * scores between 0 and 1 for each sentiment class. - * + * Set the confidenceScores property: Document level sentiment confidence scores between 0 and 1 for each sentiment + * class. + * * @param confidenceScores the confidenceScores value to set. * @return the DocumentSentiment object itself. */ @@ -140,7 +136,7 @@ public DocumentSentiment setConfidenceScores(SentimentConfidenceScorePerLabel co /** * Get the sentences property: Sentence level sentiment analysis. - * + * * @return the sentences value. */ public List getSentences() { @@ -149,7 +145,7 @@ public List getSentences() { /** * Set the sentences property: Sentence level sentiment analysis. - * + * * @param sentences the sentences value to set. * @return the DocumentSentiment object itself. */ @@ -159,9 +155,8 @@ public DocumentSentiment setSentences(List sentences) { } /** - * Get the warnings property: Warnings encountered while processing - * document. - * + * Get the warnings property: Warnings encountered while processing document. + * * @return the warnings value. */ public List getWarnings() { @@ -169,9 +164,8 @@ public List getWarnings() { } /** - * Set the warnings property: Warnings encountered while processing - * document. - * + * Set the warnings property: Warnings encountered while processing document. + * * @param warnings the warnings value to set. * @return the DocumentSentiment object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentimentValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentimentValue.java index 3348780b91a9..0964d67bafe2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentimentValue.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentimentValue.java @@ -7,33 +7,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** - * Defines values for DocumentSentimentValue. - */ +/** Defines values for DocumentSentimentValue. */ public enum DocumentSentimentValue { - /** - * Enum value positive. - */ + /** Enum value positive. */ POSITIVE("positive"), - /** - * Enum value neutral. - */ + /** Enum value neutral. */ NEUTRAL("neutral"), - /** - * Enum value negative. - */ + /** Enum value negative. */ NEGATIVE("negative"), - /** - * Enum value mixed. - */ + /** Enum value mixed. */ MIXED("mixed"); - /** - * The actual serialized value for a DocumentSentimentValue instance. - */ + /** The actual serialized value for a DocumentSentimentValue instance. */ private final String value; DocumentSentimentValue(String value) { @@ -42,7 +30,7 @@ public enum DocumentSentimentValue { /** * Parses a serialized value to a DocumentSentimentValue instance. - * + * * @param value the serialized value to parse. * @return the parsed DocumentSentimentValue object, or null if unable to parse. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentStatistics.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentStatistics.java index ef73e3f47e57..93d26d27cfd0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentStatistics.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentStatistics.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The DocumentStatistics model. - */ +/** The DocumentStatistics model. */ @Fluent public final class DocumentStatistics { /* @@ -25,9 +23,8 @@ public final class DocumentStatistics { private int transactionsCount; /** - * Get the charactersCount property: Number of text elements recognized in - * the document. - * + * Get the charactersCount property: Number of text elements recognized in the document. + * * @return the charactersCount value. */ public int getCharactersCount() { @@ -35,9 +32,8 @@ public int getCharactersCount() { } /** - * Set the charactersCount property: Number of text elements recognized in - * the document. - * + * Set the charactersCount property: Number of text elements recognized in the document. + * * @param charactersCount the charactersCount value to set. * @return the DocumentStatistics object itself. */ @@ -47,9 +43,8 @@ public DocumentStatistics setCharactersCount(int charactersCount) { } /** - * Get the transactionsCount property: Number of transactions for the - * document. - * + * Get the transactionsCount property: Number of transactions for the document. + * * @return the transactionsCount value. */ public int getTransactionsCount() { @@ -57,9 +52,8 @@ public int getTransactionsCount() { } /** - * Set the transactionsCount property: Number of transactions for the - * document. - * + * Set the transactionsCount property: Number of transactions for the document. + * * @param transactionsCount the transactionsCount value to set. * @return the DocumentStatistics object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntitiesResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntitiesResult.java index e103245b3c99..51baf6e747df 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntitiesResult.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntitiesResult.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The EntitiesResult model. - */ +/** The EntitiesResult model. */ @Fluent public final class EntitiesResult { /* @@ -40,7 +38,7 @@ public final class EntitiesResult { /** * Get the documents property: Response by document. - * + * * @return the documents value. */ public List getDocuments() { @@ -49,7 +47,7 @@ public List getDocuments() { /** * Set the documents property: Response by document. - * + * * @param documents the documents value to set. * @return the EntitiesResult object itself. */ @@ -60,7 +58,7 @@ public EntitiesResult setDocuments(List documents) { /** * Get the errors property: Errors by document id. - * + * * @return the errors value. */ public List getErrors() { @@ -69,7 +67,7 @@ public List getErrors() { /** * Set the errors property: Errors by document id. - * + * * @param errors the errors value to set. * @return the EntitiesResult object itself. */ @@ -79,9 +77,9 @@ public EntitiesResult setErrors(List errors) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @return the statistics value. */ public RequestStatistics getStatistics() { @@ -89,9 +87,9 @@ public RequestStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @param statistics the statistics value to set. * @return the EntitiesResult object itself. */ @@ -101,9 +99,8 @@ public EntitiesResult setStatistics(RequestStatistics statistics) { } /** - * Get the modelVersion property: This field indicates which model is used - * for scoring. - * + * Get the modelVersion property: This field indicates which model is used for scoring. + * * @return the modelVersion value. */ public String getModelVersion() { @@ -111,9 +108,8 @@ public String getModelVersion() { } /** - * Set the modelVersion property: This field indicates which model is used - * for scoring. - * + * Set the modelVersion property: This field indicates which model is used for scoring. + * * @param modelVersion the modelVersion value to set. * @return the EntitiesResult object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Entity.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Entity.java index afb9da844ae3..bf46484caa80 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Entity.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Entity.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The Entity model. - */ +/** The Entity model. */ @Fluent public final class Entity { /* @@ -31,13 +29,13 @@ public final class Entity { private String subcategory; /* - * Start position (in Unicode characters) for the entity text. + * Start position for the entity text. */ @JsonProperty(value = "offset", required = true) private int offset; /* - * Length (in Unicode characters) for the entity text. + * Length for the entity text. */ @JsonProperty(value = "length", required = true) private int length; @@ -50,7 +48,7 @@ public final class Entity { /** * Get the text property: Entity text as appears in the request. - * + * * @return the text value. */ public String getText() { @@ -59,7 +57,7 @@ public String getText() { /** * Set the text property: Entity text as appears in the request. - * + * * @param text the text value to set. * @return the Entity object itself. */ @@ -69,9 +67,8 @@ public Entity setText(String text) { } /** - * Get the category property: Entity type, such as Person/Location/Org/SSN - * etc. - * + * Get the category property: Entity type, such as Person/Location/Org/SSN etc. + * * @return the category value. */ public String getCategory() { @@ -79,9 +76,8 @@ public String getCategory() { } /** - * Set the category property: Entity type, such as Person/Location/Org/SSN - * etc. - * + * Set the category property: Entity type, such as Person/Location/Org/SSN etc. + * * @param category the category value to set. * @return the Entity object itself. */ @@ -91,9 +87,8 @@ public Entity setCategory(String category) { } /** - * Get the subcategory property: Entity sub type, such as - * Age/Year/TimeRange etc. - * + * Get the subcategory property: Entity sub type, such as Age/Year/TimeRange etc. + * * @return the subcategory value. */ public String getSubcategory() { @@ -101,9 +96,8 @@ public String getSubcategory() { } /** - * Set the subcategory property: Entity sub type, such as - * Age/Year/TimeRange etc. - * + * Set the subcategory property: Entity sub type, such as Age/Year/TimeRange etc. + * * @param subcategory the subcategory value to set. * @return the Entity object itself. */ @@ -113,9 +107,8 @@ public Entity setSubcategory(String subcategory) { } /** - * Get the offset property: Start position (in Unicode characters) for the - * entity text. - * + * Get the offset property: Start position for the entity text. + * * @return the offset value. */ public int getOffset() { @@ -123,9 +116,8 @@ public int getOffset() { } /** - * Set the offset property: Start position (in Unicode characters) for the - * entity text. - * + * Set the offset property: Start position for the entity text. + * * @param offset the offset value to set. * @return the Entity object itself. */ @@ -135,9 +127,8 @@ public Entity setOffset(int offset) { } /** - * Get the length property: Length (in Unicode characters) for the entity - * text. - * + * Get the length property: Length for the entity text. + * * @return the length value. */ public int getLength() { @@ -145,9 +136,8 @@ public int getLength() { } /** - * Set the length property: Length (in Unicode characters) for the entity - * text. - * + * Set the length property: Length for the entity text. + * * @param length the length value to set. * @return the Entity object itself. */ @@ -157,9 +147,8 @@ public Entity setLength(int length) { } /** - * Get the confidenceScore property: Confidence score between 0 and 1 of - * the extracted entity. - * + * Get the confidenceScore property: Confidence score between 0 and 1 of the extracted entity. + * * @return the confidenceScore value. */ public double getConfidenceScore() { @@ -167,9 +156,8 @@ public double getConfidenceScore() { } /** - * Set the confidenceScore property: Confidence score between 0 and 1 of - * the extracted entity. - * + * Set the confidenceScore property: Confidence score between 0 and 1 of the extracted entity. + * * @param confidenceScore the confidenceScore value to set. * @return the Entity object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntityLinkingResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntityLinkingResult.java index ffadfa03a118..35b71cc3b8b0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntityLinkingResult.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntityLinkingResult.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The EntityLinkingResult model. - */ +/** The EntityLinkingResult model. */ @Fluent public final class EntityLinkingResult { /* @@ -40,7 +38,7 @@ public final class EntityLinkingResult { /** * Get the documents property: Response by document. - * + * * @return the documents value. */ public List getDocuments() { @@ -49,7 +47,7 @@ public List getDocuments() { /** * Set the documents property: Response by document. - * + * * @param documents the documents value to set. * @return the EntityLinkingResult object itself. */ @@ -60,7 +58,7 @@ public EntityLinkingResult setDocuments(List documents) /** * Get the errors property: Errors by document id. - * + * * @return the errors value. */ public List getErrors() { @@ -69,7 +67,7 @@ public List getErrors() { /** * Set the errors property: Errors by document id. - * + * * @param errors the errors value to set. * @return the EntityLinkingResult object itself. */ @@ -79,9 +77,9 @@ public EntityLinkingResult setErrors(List errors) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @return the statistics value. */ public RequestStatistics getStatistics() { @@ -89,9 +87,9 @@ public RequestStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @param statistics the statistics value to set. * @return the EntityLinkingResult object itself. */ @@ -101,9 +99,8 @@ public EntityLinkingResult setStatistics(RequestStatistics statistics) { } /** - * Get the modelVersion property: This field indicates which model is used - * for scoring. - * + * Get the modelVersion property: This field indicates which model is used for scoring. + * * @return the modelVersion value. */ public String getModelVersion() { @@ -111,9 +108,8 @@ public String getModelVersion() { } /** - * Set the modelVersion property: This field indicates which model is used - * for scoring. - * + * Set the modelVersion property: This field indicates which model is used for scoring. + * * @param modelVersion the modelVersion value to set. * @return the EntityLinkingResult object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java index 3431f8803c63..fd24a2ff645e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java @@ -7,33 +7,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** - * Defines values for ErrorCodeValue. - */ +/** Defines values for ErrorCodeValue. */ public enum ErrorCodeValue { - /** - * Enum value invalidRequest. - */ + /** Enum value invalidRequest. */ INVALID_REQUEST("invalidRequest"), - /** - * Enum value invalidArgument. - */ + /** Enum value invalidArgument. */ INVALID_ARGUMENT("invalidArgument"), - /** - * Enum value internalServerError. - */ + /** Enum value internalServerError. */ INTERNAL_SERVER_ERROR("internalServerError"), - /** - * Enum value serviceUnavailable. - */ + /** Enum value serviceUnavailable. */ SERVICE_UNAVAILABLE("serviceUnavailable"); - /** - * The actual serialized value for a ErrorCodeValue instance. - */ + /** The actual serialized value for a ErrorCodeValue instance. */ private final String value; ErrorCodeValue(String value) { @@ -42,7 +30,7 @@ public enum ErrorCodeValue { /** * Parses a serialized value to a ErrorCodeValue instance. - * + * * @param value the serialized value to parse. * @return the parsed ErrorCodeValue object, or null if unable to parse. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerError.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerError.java index e2a97c1c062e..554a5c86ddcc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerError.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerError.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** - * The InnerError model. - */ +/** The InnerError model. */ @Fluent public final class InnerError { /* @@ -45,7 +43,7 @@ public final class InnerError { /** * Get the code property: Error code. - * + * * @return the code value. */ public InnerErrorCodeValue getCode() { @@ -54,7 +52,7 @@ public InnerErrorCodeValue getCode() { /** * Set the code property: Error code. - * + * * @param code the code value to set. * @return the InnerError object itself. */ @@ -65,7 +63,7 @@ public InnerError setCode(InnerErrorCodeValue code) { /** * Get the message property: Error message. - * + * * @return the message value. */ public String getMessage() { @@ -74,7 +72,7 @@ public String getMessage() { /** * Set the message property: Error message. - * + * * @param message the message value to set. * @return the InnerError object itself. */ @@ -85,7 +83,7 @@ public InnerError setMessage(String message) { /** * Get the details property: Error details. - * + * * @return the details value. */ public Map getDetails() { @@ -94,7 +92,7 @@ public Map getDetails() { /** * Set the details property: Error details. - * + * * @param details the details value to set. * @return the InnerError object itself. */ @@ -105,7 +103,7 @@ public InnerError setDetails(Map details) { /** * Get the target property: Error target. - * + * * @return the target value. */ public String getTarget() { @@ -114,7 +112,7 @@ public String getTarget() { /** * Set the target property: Error target. - * + * * @param target the target value to set. * @return the InnerError object itself. */ @@ -124,9 +122,8 @@ public InnerError setTarget(String target) { } /** - * Get the innererror property: Inner error contains more specific - * information. - * + * Get the innererror property: Inner error contains more specific information. + * * @return the innererror value. */ public InnerError getInnererror() { @@ -134,9 +131,8 @@ public InnerError getInnererror() { } /** - * Set the innererror property: Inner error contains more specific - * information. - * + * Set the innererror property: Inner error contains more specific information. + * * @param innererror the innererror value to set. * @return the InnerError object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java index 4294b1b886a1..4f1ac83a949c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java @@ -7,58 +7,36 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** - * Defines values for InnerErrorCodeValue. - */ +/** Defines values for InnerErrorCodeValue. */ public enum InnerErrorCodeValue { - /** - * Enum value invalidParameterValue. - */ + /** Enum value invalidParameterValue. */ INVALID_PARAMETER_VALUE("invalidParameterValue"), - /** - * Enum value invalidRequestBodyFormat. - */ + /** Enum value invalidRequestBodyFormat. */ INVALID_REQUEST_BODY_FORMAT("invalidRequestBodyFormat"), - /** - * Enum value emptyRequest. - */ + /** Enum value emptyRequest. */ EMPTY_REQUEST("emptyRequest"), - /** - * Enum value missingInputRecords. - */ + /** Enum value missingInputRecords. */ MISSING_INPUT_RECORDS("missingInputRecords"), - /** - * Enum value invalidDocument. - */ + /** Enum value invalidDocument. */ INVALID_DOCUMENT("invalidDocument"), - /** - * Enum value modelVersionIncorrect. - */ + /** Enum value modelVersionIncorrect. */ MODEL_VERSION_INCORRECT("modelVersionIncorrect"), - /** - * Enum value invalidDocumentBatch. - */ + /** Enum value invalidDocumentBatch. */ INVALID_DOCUMENT_BATCH("invalidDocumentBatch"), - /** - * Enum value unsupportedLanguageCode. - */ + /** Enum value unsupportedLanguageCode. */ UNSUPPORTED_LANGUAGE_CODE("unsupportedLanguageCode"), - /** - * Enum value invalidCountryHint. - */ + /** Enum value invalidCountryHint. */ INVALID_COUNTRY_HINT("invalidCountryHint"); - /** - * The actual serialized value for a InnerErrorCodeValue instance. - */ + /** The actual serialized value for a InnerErrorCodeValue instance. */ private final String value; InnerErrorCodeValue(String value) { @@ -67,7 +45,7 @@ public enum InnerErrorCodeValue { /** * Parses a serialized value to a InnerErrorCodeValue instance. - * + * * @param value the serialized value to parse. * @return the parsed InnerErrorCodeValue object, or null if unable to parse. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/KeyPhraseResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/KeyPhraseResult.java index bd7223494fd2..c84987579260 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/KeyPhraseResult.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/KeyPhraseResult.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The KeyPhraseResult model. - */ +/** The KeyPhraseResult model. */ @Fluent public final class KeyPhraseResult { /* @@ -40,7 +38,7 @@ public final class KeyPhraseResult { /** * Get the documents property: Response by document. - * + * * @return the documents value. */ public List getDocuments() { @@ -49,7 +47,7 @@ public List getDocuments() { /** * Set the documents property: Response by document. - * + * * @param documents the documents value to set. * @return the KeyPhraseResult object itself. */ @@ -60,7 +58,7 @@ public KeyPhraseResult setDocuments(List documents) { /** * Get the errors property: Errors by document id. - * + * * @return the errors value. */ public List getErrors() { @@ -69,7 +67,7 @@ public List getErrors() { /** * Set the errors property: Errors by document id. - * + * * @param errors the errors value to set. * @return the KeyPhraseResult object itself. */ @@ -79,9 +77,9 @@ public KeyPhraseResult setErrors(List errors) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @return the statistics value. */ public RequestStatistics getStatistics() { @@ -89,9 +87,9 @@ public RequestStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @param statistics the statistics value to set. * @return the KeyPhraseResult object itself. */ @@ -101,9 +99,8 @@ public KeyPhraseResult setStatistics(RequestStatistics statistics) { } /** - * Get the modelVersion property: This field indicates which model is used - * for scoring. - * + * Get the modelVersion property: This field indicates which model is used for scoring. + * * @return the modelVersion value. */ public String getModelVersion() { @@ -111,9 +108,8 @@ public String getModelVersion() { } /** - * Set the modelVersion property: This field indicates which model is used - * for scoring. - * + * Set the modelVersion property: This field indicates which model is used for scoring. + * * @param modelVersion the modelVersion value to set. * @return the KeyPhraseResult object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageBatchInput.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageBatchInput.java index 4ff3423367c4..2e1bde460b17 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageBatchInput.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageBatchInput.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The LanguageBatchInput model. - */ +/** The LanguageBatchInput model. */ @Fluent public final class LanguageBatchInput { /* @@ -21,7 +19,7 @@ public final class LanguageBatchInput { /** * Get the documents property: The documents property. - * + * * @return the documents value. */ public List getDocuments() { @@ -30,7 +28,7 @@ public List getDocuments() { /** * Set the documents property: The documents property. - * + * * @param documents the documents value to set. * @return the LanguageBatchInput object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageInput.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageInput.java index 2a9d7d3f91b5..d81ea140b1a0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageInput.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageInput.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The LanguageInput model. - */ +/** The LanguageInput model. */ @Fluent public final class LanguageInput { /* @@ -32,7 +30,7 @@ public final class LanguageInput { /** * Get the id property: Unique, non-empty document identifier. - * + * * @return the id value. */ public String getId() { @@ -41,7 +39,7 @@ public String getId() { /** * Set the id property: Unique, non-empty document identifier. - * + * * @param id the id value to set. * @return the LanguageInput object itself. */ @@ -52,7 +50,7 @@ public LanguageInput setId(String id) { /** * Get the text property: The text property. - * + * * @return the text value. */ public String getText() { @@ -61,7 +59,7 @@ public String getText() { /** * Set the text property: The text property. - * + * * @param text the text value to set. * @return the LanguageInput object itself. */ @@ -72,7 +70,7 @@ public LanguageInput setText(String text) { /** * Get the countryHint property: The countryHint property. - * + * * @return the countryHint value. */ public String getCountryHint() { @@ -81,7 +79,7 @@ public String getCountryHint() { /** * Set the countryHint property: The countryHint property. - * + * * @param countryHint the countryHint value to set. * @return the LanguageInput object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageResult.java index 46515f53c93b..be55cd24b5d2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageResult.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageResult.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The LanguageResult model. - */ +/** The LanguageResult model. */ @Fluent public final class LanguageResult { /* @@ -40,7 +38,7 @@ public final class LanguageResult { /** * Get the documents property: Response by document. - * + * * @return the documents value. */ public List getDocuments() { @@ -49,7 +47,7 @@ public List getDocuments() { /** * Set the documents property: Response by document. - * + * * @param documents the documents value to set. * @return the LanguageResult object itself. */ @@ -60,7 +58,7 @@ public LanguageResult setDocuments(List documents) { /** * Get the errors property: Errors by document id. - * + * * @return the errors value. */ public List getErrors() { @@ -69,7 +67,7 @@ public List getErrors() { /** * Set the errors property: Errors by document id. - * + * * @param errors the errors value to set. * @return the LanguageResult object itself. */ @@ -79,9 +77,9 @@ public LanguageResult setErrors(List errors) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @return the statistics value. */ public RequestStatistics getStatistics() { @@ -89,9 +87,9 @@ public RequestStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @param statistics the statistics value to set. * @return the LanguageResult object itself. */ @@ -101,9 +99,8 @@ public LanguageResult setStatistics(RequestStatistics statistics) { } /** - * Get the modelVersion property: This field indicates which model is used - * for scoring. - * + * Get the modelVersion property: This field indicates which model is used for scoring. + * * @return the modelVersion value. */ public String getModelVersion() { @@ -111,9 +108,8 @@ public String getModelVersion() { } /** - * Set the modelVersion property: This field indicates which model is used - * for scoring. - * + * Set the modelVersion property: This field indicates which model is used for scoring. + * * @param modelVersion the modelVersion value to set. * @return the LanguageResult object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java index 18df75ef5daf..3be72691aa8e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The LinkedEntity model. - */ +/** The LinkedEntity model. */ @Fluent public final class LinkedEntity { /* @@ -51,7 +49,7 @@ public final class LinkedEntity { /** * Get the name property: Entity Linking formal name. - * + * * @return the name value. */ public String getName() { @@ -60,7 +58,7 @@ public String getName() { /** * Set the name property: Entity Linking formal name. - * + * * @param name the name value to set. * @return the LinkedEntity object itself. */ @@ -70,9 +68,8 @@ public LinkedEntity setName(String name) { } /** - * Get the matches property: List of instances this entity appears in the - * text. - * + * Get the matches property: List of instances this entity appears in the text. + * * @return the matches value. */ public List getMatches() { @@ -80,9 +77,8 @@ public List getMatches() { } /** - * Set the matches property: List of instances this entity appears in the - * text. - * + * Set the matches property: List of instances this entity appears in the text. + * * @param matches the matches value to set. * @return the LinkedEntity object itself. */ @@ -93,7 +89,7 @@ public LinkedEntity setMatches(List matches) { /** * Get the language property: Language used in the data source. - * + * * @return the language value. */ public String getLanguage() { @@ -102,7 +98,7 @@ public String getLanguage() { /** * Set the language property: Language used in the data source. - * + * * @param language the language value to set. * @return the LinkedEntity object itself. */ @@ -112,9 +108,8 @@ public LinkedEntity setLanguage(String language) { } /** - * Get the id property: Unique identifier of the recognized entity from the - * data source. - * + * Get the id property: Unique identifier of the recognized entity from the data source. + * * @return the id value. */ public String getId() { @@ -122,9 +117,8 @@ public String getId() { } /** - * Set the id property: Unique identifier of the recognized entity from the - * data source. - * + * Set the id property: Unique identifier of the recognized entity from the data source. + * * @param id the id value to set. * @return the LinkedEntity object itself. */ @@ -135,7 +129,7 @@ public LinkedEntity setId(String id) { /** * Get the url property: URL for the entity's page from the data source. - * + * * @return the url value. */ public String getUrl() { @@ -144,7 +138,7 @@ public String getUrl() { /** * Set the url property: URL for the entity's page from the data source. - * + * * @param url the url value to set. * @return the LinkedEntity object itself. */ @@ -154,9 +148,8 @@ public LinkedEntity setUrl(String url) { } /** - * Get the dataSource property: Data source used to extract entity linking, - * such as Wiki/Bing etc. - * + * Get the dataSource property: Data source used to extract entity linking, such as Wiki/Bing etc. + * * @return the dataSource value. */ public String getDataSource() { @@ -164,9 +157,8 @@ public String getDataSource() { } /** - * Set the dataSource property: Data source used to extract entity linking, - * such as Wiki/Bing etc. - * + * Set the dataSource property: Data source used to extract entity linking, such as Wiki/Bing etc. + * * @param dataSource the dataSource value to set. * @return the LinkedEntity object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Match.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Match.java index 19b4a45c097b..197feeb7ca03 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Match.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Match.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The Match model. - */ +/** The Match model. */ @Fluent public final class Match { /* @@ -26,22 +24,21 @@ public final class Match { private String text; /* - * Start position (in Unicode characters) for the entity match text. + * Start position for the entity match text. */ @JsonProperty(value = "offset", required = true) private int offset; /* - * Length (in Unicode characters) for the entity match text. + * Length for the entity match text. */ @JsonProperty(value = "length", required = true) private int length; /** - * Get the confidenceScore property: If a well-known item is recognized, a - * decimal number denoting the confidence level between 0 and 1 will be - * returned. - * + * Get the confidenceScore property: If a well-known item is recognized, a decimal number denoting the confidence + * level between 0 and 1 will be returned. + * * @return the confidenceScore value. */ public double getConfidenceScore() { @@ -49,10 +46,9 @@ public double getConfidenceScore() { } /** - * Set the confidenceScore property: If a well-known item is recognized, a - * decimal number denoting the confidence level between 0 and 1 will be - * returned. - * + * Set the confidenceScore property: If a well-known item is recognized, a decimal number denoting the confidence + * level between 0 and 1 will be returned. + * * @param confidenceScore the confidenceScore value to set. * @return the Match object itself. */ @@ -63,7 +59,7 @@ public Match setConfidenceScore(double confidenceScore) { /** * Get the text property: Entity text as appears in the request. - * + * * @return the text value. */ public String getText() { @@ -72,7 +68,7 @@ public String getText() { /** * Set the text property: Entity text as appears in the request. - * + * * @param text the text value to set. * @return the Match object itself. */ @@ -82,9 +78,8 @@ public Match setText(String text) { } /** - * Get the offset property: Start position (in Unicode characters) for the - * entity match text. - * + * Get the offset property: Start position for the entity match text. + * * @return the offset value. */ public int getOffset() { @@ -92,9 +87,8 @@ public int getOffset() { } /** - * Set the offset property: Start position (in Unicode characters) for the - * entity match text. - * + * Set the offset property: Start position for the entity match text. + * * @param offset the offset value to set. * @return the Match object itself. */ @@ -104,9 +98,8 @@ public Match setOffset(int offset) { } /** - * Get the length property: Length (in Unicode characters) for the entity - * match text. - * + * Get the length property: Length for the entity match text. + * * @return the length value. */ public int getLength() { @@ -114,9 +107,8 @@ public int getLength() { } /** - * Set the length property: Length (in Unicode characters) for the entity - * match text. - * + * Set the length property: Length for the entity match text. + * * @param length the length value to set. * @return the Match object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageBatchInput.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageBatchInput.java index 285b47ab9b3c..186e5923c357 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageBatchInput.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageBatchInput.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The MultiLanguageBatchInput model. - */ +/** The MultiLanguageBatchInput model. */ @Fluent public final class MultiLanguageBatchInput { /* @@ -20,9 +18,8 @@ public final class MultiLanguageBatchInput { private List documents; /** - * Get the documents property: The set of documents to process as part of - * this batch. - * + * Get the documents property: The set of documents to process as part of this batch. + * * @return the documents value. */ public List getDocuments() { @@ -30,9 +27,8 @@ public List getDocuments() { } /** - * Set the documents property: The set of documents to process as part of - * this batch. - * + * Set the documents property: The set of documents to process as part of this batch. + * * @param documents the documents value to set. * @return the MultiLanguageBatchInput object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageInput.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageInput.java index f2ba9a418036..b69c017d068c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageInput.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageInput.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The MultiLanguageInput model. - */ +/** The MultiLanguageInput model. */ @Fluent public final class MultiLanguageInput { /* @@ -34,7 +32,7 @@ public final class MultiLanguageInput { /** * Get the id property: A unique, non-empty document identifier. - * + * * @return the id value. */ public String getId() { @@ -43,7 +41,7 @@ public String getId() { /** * Set the id property: A unique, non-empty document identifier. - * + * * @param id the id value to set. * @return the MultiLanguageInput object itself. */ @@ -54,7 +52,7 @@ public MultiLanguageInput setId(String id) { /** * Get the text property: The input text to process. - * + * * @return the text value. */ public String getText() { @@ -63,7 +61,7 @@ public String getText() { /** * Set the text property: The input text to process. - * + * * @param text the text value to set. * @return the MultiLanguageInput object itself. */ @@ -73,10 +71,9 @@ public MultiLanguageInput setText(String text) { } /** - * Get the language property: (Optional) This is the 2 letter ISO 639-1 - * representation of a language. For example, use "en" for English; "es" - * for Spanish etc. If not set, use "en" for English as default. - * + * Get the language property: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, + * use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. + * * @return the language value. */ public String getLanguage() { @@ -84,10 +81,9 @@ public String getLanguage() { } /** - * Set the language property: (Optional) This is the 2 letter ISO 639-1 - * representation of a language. For example, use "en" for English; "es" - * for Spanish etc. If not set, use "en" for English as default. - * + * Set the language property: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, + * use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. + * * @param language the language value to set. * @return the MultiLanguageInput object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/RequestStatistics.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/RequestStatistics.java index ceb0be002998..653a40960b82 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/RequestStatistics.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/RequestStatistics.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The RequestStatistics model. - */ +/** The RequestStatistics model. */ @Fluent public final class RequestStatistics { /* @@ -39,9 +37,8 @@ public final class RequestStatistics { private long transactionsCount; /** - * Get the documentsCount property: Number of documents submitted in the - * request. - * + * Get the documentsCount property: Number of documents submitted in the request. + * * @return the documentsCount value. */ public int getDocumentsCount() { @@ -49,9 +46,8 @@ public int getDocumentsCount() { } /** - * Set the documentsCount property: Number of documents submitted in the - * request. - * + * Set the documentsCount property: Number of documents submitted in the request. + * * @param documentsCount the documentsCount value to set. * @return the RequestStatistics object itself. */ @@ -61,9 +57,9 @@ public RequestStatistics setDocumentsCount(int documentsCount) { } /** - * Get the validDocumentsCount property: Number of valid documents. This - * excludes empty, over-size limit or non-supported languages documents. - * + * Get the validDocumentsCount property: Number of valid documents. This excludes empty, over-size limit or + * non-supported languages documents. + * * @return the validDocumentsCount value. */ public int getValidDocumentsCount() { @@ -71,9 +67,9 @@ public int getValidDocumentsCount() { } /** - * Set the validDocumentsCount property: Number of valid documents. This - * excludes empty, over-size limit or non-supported languages documents. - * + * Set the validDocumentsCount property: Number of valid documents. This excludes empty, over-size limit or + * non-supported languages documents. + * * @param validDocumentsCount the validDocumentsCount value to set. * @return the RequestStatistics object itself. */ @@ -83,10 +79,9 @@ public RequestStatistics setValidDocumentsCount(int validDocumentsCount) { } /** - * Get the erroneousDocumentsCount property: Number of invalid documents. - * This includes empty, over-size limit or non-supported languages - * documents. - * + * Get the erroneousDocumentsCount property: Number of invalid documents. This includes empty, over-size limit or + * non-supported languages documents. + * * @return the erroneousDocumentsCount value. */ public int getErroneousDocumentsCount() { @@ -94,10 +89,9 @@ public int getErroneousDocumentsCount() { } /** - * Set the erroneousDocumentsCount property: Number of invalid documents. - * This includes empty, over-size limit or non-supported languages - * documents. - * + * Set the erroneousDocumentsCount property: Number of invalid documents. This includes empty, over-size limit or + * non-supported languages documents. + * * @param erroneousDocumentsCount the erroneousDocumentsCount value to set. * @return the RequestStatistics object itself. */ @@ -107,9 +101,8 @@ public RequestStatistics setErroneousDocumentsCount(int erroneousDocumentsCount) } /** - * Get the transactionsCount property: Number of transactions for the - * request. - * + * Get the transactionsCount property: Number of transactions for the request. + * * @return the transactionsCount value. */ public long getTransactionsCount() { @@ -117,9 +110,8 @@ public long getTransactionsCount() { } /** - * Set the transactionsCount property: Number of transactions for the - * request. - * + * Set the transactionsCount property: Number of transactions for the request. + * * @param transactionsCount the transactionsCount value to set. * @return the RequestStatistics object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java new file mode 100644 index 000000000000..37a7b5ff1449 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The SentenceAspect model. */ +@Fluent +public final class SentenceAspect { + /* + * Aspect level sentiment for the aspect in the sentence. + */ + @JsonProperty(value = "sentiment", required = true) + private SentenceAspectSentiment sentiment; + + /* + * Aspect level sentiment confidence scores for the aspect in the sentence. + */ + @JsonProperty(value = "confidenceScores", required = true) + private AspectConfidenceScoreLabel confidenceScores; + + /* + * The aspect offset from the start of the sentence. + */ + @JsonProperty(value = "offset", required = true) + private int offset; + + /* + * The length of the aspect. + */ + @JsonProperty(value = "length", required = true) + private int length; + + /* + * The aspect text detected. + */ + @JsonProperty(value = "text", required = true) + private String text; + + /* + * The array of either opinion or aspect object which is related to the + * aspect. + */ + @JsonProperty(value = "relations", required = true) + private List relations; + + /** + * Get the sentiment property: Aspect level sentiment for the aspect in the sentence. + * + * @return the sentiment value. + */ + public SentenceAspectSentiment getSentiment() { + return this.sentiment; + } + + /** + * Set the sentiment property: Aspect level sentiment for the aspect in the sentence. + * + * @param sentiment the sentiment value to set. + * @return the SentenceAspect object itself. + */ + public SentenceAspect setSentiment(SentenceAspectSentiment sentiment) { + this.sentiment = sentiment; + return this; + } + + /** + * Get the confidenceScores property: Aspect level sentiment confidence scores for the aspect in the sentence. + * + * @return the confidenceScores value. + */ + public AspectConfidenceScoreLabel getConfidenceScores() { + return this.confidenceScores; + } + + /** + * Set the confidenceScores property: Aspect level sentiment confidence scores for the aspect in the sentence. + * + * @param confidenceScores the confidenceScores value to set. + * @return the SentenceAspect object itself. + */ + public SentenceAspect setConfidenceScores(AspectConfidenceScoreLabel confidenceScores) { + this.confidenceScores = confidenceScores; + return this; + } + + /** + * Get the offset property: The aspect offset from the start of the sentence. + * + * @return the offset value. + */ + public int getOffset() { + return this.offset; + } + + /** + * Set the offset property: The aspect offset from the start of the sentence. + * + * @param offset the offset value to set. + * @return the SentenceAspect object itself. + */ + public SentenceAspect setOffset(int offset) { + this.offset = offset; + return this; + } + + /** + * Get the length property: The length of the aspect. + * + * @return the length value. + */ + public int getLength() { + return this.length; + } + + /** + * Set the length property: The length of the aspect. + * + * @param length the length value to set. + * @return the SentenceAspect object itself. + */ + public SentenceAspect setLength(int length) { + this.length = length; + return this; + } + + /** + * Get the text property: The aspect text detected. + * + * @return the text value. + */ + public String getText() { + return this.text; + } + + /** + * Set the text property: The aspect text detected. + * + * @param text the text value to set. + * @return the SentenceAspect object itself. + */ + public SentenceAspect setText(String text) { + this.text = text; + return this; + } + + /** + * Get the relations property: The array of either opinion or aspect object which is related to the aspect. + * + * @return the relations value. + */ + public List getRelations() { + return this.relations; + } + + /** + * Set the relations property: The array of either opinion or aspect object which is related to the aspect. + * + * @param relations the relations value to set. + * @return the SentenceAspect object itself. + */ + public SentenceAspect setRelations(List relations) { + this.relations = relations; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspectSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspectSentiment.java new file mode 100644 index 000000000000..efb6a08ee97e --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspectSentiment.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SentenceAspectSentiment. */ +public final class SentenceAspectSentiment extends ExpandableStringEnum { + /** Static value positive for SentenceAspectSentiment. */ + public static final SentenceAspectSentiment POSITIVE = fromString("positive"); + + /** Static value mixed for SentenceAspectSentiment. */ + public static final SentenceAspectSentiment MIXED = fromString("mixed"); + + /** Static value negative for SentenceAspectSentiment. */ + public static final SentenceAspectSentiment NEGATIVE = fromString("negative"); + + /** + * Creates or finds a SentenceAspectSentiment from its string representation. + * + * @param name a name to look for. + * @return the corresponding SentenceAspectSentiment. + */ + @JsonCreator + public static SentenceAspectSentiment fromString(String name) { + return fromString(name, SentenceAspectSentiment.class); + } + + /** @return known SentenceAspectSentiment values. */ + public static Collection values() { + return values(SentenceAspectSentiment.class); + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java new file mode 100644 index 000000000000..bce2356d9fc7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SentenceOpinion model. */ +@Fluent +public final class SentenceOpinion { + /* + * Opinion level sentiment for the aspect in the sentence. + */ + @JsonProperty(value = "sentiment", required = true) + private SentenceOpinionSentiment sentiment; + + /* + * Opinion level sentiment confidence scores for the aspect in the + * sentence. + */ + @JsonProperty(value = "confidenceScores", required = true) + private AspectConfidenceScoreLabel confidenceScores; + + /* + * The opinion offset from the start of the sentence. + */ + @JsonProperty(value = "offset", required = true) + private int offset; + + /* + * The length of the opinion. + */ + @JsonProperty(value = "length", required = true) + private int length; + + /* + * The aspect text detected. + */ + @JsonProperty(value = "text", required = true) + private String text; + + /* + * The indicator representing if the opinion is negated. + */ + @JsonProperty(value = "isNegated", required = true) + private boolean isNegated; + + /** + * Get the sentiment property: Opinion level sentiment for the aspect in the sentence. + * + * @return the sentiment value. + */ + public SentenceOpinionSentiment getSentiment() { + return this.sentiment; + } + + /** + * Set the sentiment property: Opinion level sentiment for the aspect in the sentence. + * + * @param sentiment the sentiment value to set. + * @return the SentenceOpinion object itself. + */ + public SentenceOpinion setSentiment(SentenceOpinionSentiment sentiment) { + this.sentiment = sentiment; + return this; + } + + /** + * Get the confidenceScores property: Opinion level sentiment confidence scores for the aspect in the sentence. + * + * @return the confidenceScores value. + */ + public AspectConfidenceScoreLabel getConfidenceScores() { + return this.confidenceScores; + } + + /** + * Set the confidenceScores property: Opinion level sentiment confidence scores for the aspect in the sentence. + * + * @param confidenceScores the confidenceScores value to set. + * @return the SentenceOpinion object itself. + */ + public SentenceOpinion setConfidenceScores(AspectConfidenceScoreLabel confidenceScores) { + this.confidenceScores = confidenceScores; + return this; + } + + /** + * Get the offset property: The opinion offset from the start of the sentence. + * + * @return the offset value. + */ + public int getOffset() { + return this.offset; + } + + /** + * Set the offset property: The opinion offset from the start of the sentence. + * + * @param offset the offset value to set. + * @return the SentenceOpinion object itself. + */ + public SentenceOpinion setOffset(int offset) { + this.offset = offset; + return this; + } + + /** + * Get the length property: The length of the opinion. + * + * @return the length value. + */ + public int getLength() { + return this.length; + } + + /** + * Set the length property: The length of the opinion. + * + * @param length the length value to set. + * @return the SentenceOpinion object itself. + */ + public SentenceOpinion setLength(int length) { + this.length = length; + return this; + } + + /** + * Get the text property: The aspect text detected. + * + * @return the text value. + */ + public String getText() { + return this.text; + } + + /** + * Set the text property: The aspect text detected. + * + * @param text the text value to set. + * @return the SentenceOpinion object itself. + */ + public SentenceOpinion setText(String text) { + this.text = text; + return this; + } + + /** + * Get the isNegated property: The indicator representing if the opinion is negated. + * + * @return the isNegated value. + */ + public boolean isNegated() { + return this.isNegated; + } + + /** + * Set the isNegated property: The indicator representing if the opinion is negated. + * + * @param isNegated the isNegated value to set. + * @return the SentenceOpinion object itself. + */ + public SentenceOpinion setIsNegated(boolean isNegated) { + this.isNegated = isNegated; + return this; + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinionSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinionSentiment.java new file mode 100644 index 000000000000..976677a4f2e5 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinionSentiment.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.textanalytics.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SentenceOpinionSentiment. */ +public final class SentenceOpinionSentiment extends ExpandableStringEnum { + /** Static value positive for SentenceOpinionSentiment. */ + public static final SentenceOpinionSentiment POSITIVE = fromString("positive"); + + /** Static value mixed for SentenceOpinionSentiment. */ + public static final SentenceOpinionSentiment MIXED = fromString("mixed"); + + /** Static value negative for SentenceOpinionSentiment. */ + public static final SentenceOpinionSentiment NEGATIVE = fromString("negative"); + + /** + * Creates or finds a SentenceOpinionSentiment from its string representation. + * + * @param name a name to look for. + * @return the corresponding SentenceOpinionSentiment. + */ + @JsonCreator + public static SentenceOpinionSentiment fromString(String name) { + return fromString(name, SentenceOpinionSentiment.class); + } + + /** @return known SentenceOpinionSentiment values. */ + public static Collection values() { + return values(SentenceOpinionSentiment.class); + } +} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentiment.java index 600f1e838c8c..5bdd3283c680 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentiment.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentiment.java @@ -6,16 +6,15 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** - * The SentenceSentiment model. - */ +/** The SentenceSentiment model. */ @Fluent public final class SentenceSentiment { /* * The sentence text. */ - @JsonProperty(value = "text") + @JsonProperty(value = "text", required = true) private String text; /* @@ -38,14 +37,26 @@ public final class SentenceSentiment { private int offset; /* - * The length of the sentence by Unicode standard. + * The length of the sentence. */ @JsonProperty(value = "length", required = true) private int length; + /* + * The array of aspect object for the sentence. + */ + @JsonProperty(value = "aspects") + private List aspects; + + /* + * The array of opinion object for the sentence. + */ + @JsonProperty(value = "opinions") + private List opinions; + /** * Get the text property: The sentence text. - * + * * @return the text value. */ public String getText() { @@ -54,7 +65,7 @@ public String getText() { /** * Set the text property: The sentence text. - * + * * @param text the text value to set. * @return the SentenceSentiment object itself. */ @@ -65,7 +76,7 @@ public SentenceSentiment setText(String text) { /** * Get the sentiment property: The predicted Sentiment for the sentence. - * + * * @return the sentiment value. */ public SentenceSentimentValue getSentiment() { @@ -74,7 +85,7 @@ public SentenceSentimentValue getSentiment() { /** * Set the sentiment property: The predicted Sentiment for the sentence. - * + * * @param sentiment the sentiment value to set. * @return the SentenceSentiment object itself. */ @@ -84,9 +95,9 @@ public SentenceSentiment setSentiment(SentenceSentimentValue sentiment) { } /** - * Get the confidenceScores property: The sentiment confidence score - * between 0 and 1 for the sentence for all classes. - * + * Get the confidenceScores property: The sentiment confidence score between 0 and 1 for the sentence for all + * classes. + * * @return the confidenceScores value. */ public SentimentConfidenceScorePerLabel getConfidenceScores() { @@ -94,9 +105,9 @@ public SentimentConfidenceScorePerLabel getConfidenceScores() { } /** - * Set the confidenceScores property: The sentiment confidence score - * between 0 and 1 for the sentence for all classes. - * + * Set the confidenceScores property: The sentiment confidence score between 0 and 1 for the sentence for all + * classes. + * * @param confidenceScores the confidenceScores value to set. * @return the SentenceSentiment object itself. */ @@ -106,9 +117,8 @@ public SentenceSentiment setConfidenceScores(SentimentConfidenceScorePerLabel co } /** - * Get the offset property: The sentence offset from the start of the - * document. - * + * Get the offset property: The sentence offset from the start of the document. + * * @return the offset value. */ public int getOffset() { @@ -116,9 +126,8 @@ public int getOffset() { } /** - * Set the offset property: The sentence offset from the start of the - * document. - * + * Set the offset property: The sentence offset from the start of the document. + * * @param offset the offset value to set. * @return the SentenceSentiment object itself. */ @@ -128,8 +137,8 @@ public SentenceSentiment setOffset(int offset) { } /** - * Get the length property: The length of the sentence by Unicode standard. - * + * Get the length property: The length of the sentence. + * * @return the length value. */ public int getLength() { @@ -137,8 +146,8 @@ public int getLength() { } /** - * Set the length property: The length of the sentence by Unicode standard. - * + * Set the length property: The length of the sentence. + * * @param length the length value to set. * @return the SentenceSentiment object itself. */ @@ -146,4 +155,44 @@ public SentenceSentiment setLength(int length) { this.length = length; return this; } + + /** + * Get the aspects property: The array of aspect object for the sentence. + * + * @return the aspects value. + */ + public List getAspects() { + return this.aspects; + } + + /** + * Set the aspects property: The array of aspect object for the sentence. + * + * @param aspects the aspects value to set. + * @return the SentenceSentiment object itself. + */ + public SentenceSentiment setAspects(List aspects) { + this.aspects = aspects; + return this; + } + + /** + * Get the opinions property: The array of opinion object for the sentence. + * + * @return the opinions value. + */ + public List getOpinions() { + return this.opinions; + } + + /** + * Set the opinions property: The array of opinion object for the sentence. + * + * @param opinions the opinions value to set. + * @return the SentenceSentiment object itself. + */ + public SentenceSentiment setOpinions(List opinions) { + this.opinions = opinions; + return this; + } } diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentimentValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentimentValue.java index c80b516477d5..5be87d8a7036 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentimentValue.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentimentValue.java @@ -7,28 +7,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** - * Defines values for SentenceSentimentValue. - */ +/** Defines values for SentenceSentimentValue. */ public enum SentenceSentimentValue { - /** - * Enum value positive. - */ + /** Enum value positive. */ POSITIVE("positive"), - /** - * Enum value neutral. - */ + /** Enum value neutral. */ NEUTRAL("neutral"), - /** - * Enum value negative. - */ + /** Enum value negative. */ NEGATIVE("negative"); - /** - * The actual serialized value for a SentenceSentimentValue instance. - */ + /** The actual serialized value for a SentenceSentimentValue instance. */ private final String value; SentenceSentimentValue(String value) { @@ -37,7 +27,7 @@ public enum SentenceSentimentValue { /** * Parses a serialized value to a SentenceSentimentValue instance. - * + * * @param value the serialized value to parse. * @return the parsed SentenceSentimentValue object, or null if unable to parse. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentimentConfidenceScorePerLabel.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentimentConfidenceScorePerLabel.java index 9c7561cf86b6..94da963ed515 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentimentConfidenceScorePerLabel.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentimentConfidenceScorePerLabel.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The SentimentConfidenceScorePerLabel model. - */ +/** The SentimentConfidenceScorePerLabel model. */ @Fluent public final class SentimentConfidenceScorePerLabel { /* @@ -32,7 +30,7 @@ public final class SentimentConfidenceScorePerLabel { /** * Get the positive property: The positive property. - * + * * @return the positive value. */ public double getPositive() { @@ -41,7 +39,7 @@ public double getPositive() { /** * Set the positive property: The positive property. - * + * * @param positive the positive value to set. * @return the SentimentConfidenceScorePerLabel object itself. */ @@ -52,7 +50,7 @@ public SentimentConfidenceScorePerLabel setPositive(double positive) { /** * Get the neutral property: The neutral property. - * + * * @return the neutral value. */ public double getNeutral() { @@ -61,7 +59,7 @@ public double getNeutral() { /** * Set the neutral property: The neutral property. - * + * * @param neutral the neutral value to set. * @return the SentimentConfidenceScorePerLabel object itself. */ @@ -72,7 +70,7 @@ public SentimentConfidenceScorePerLabel setNeutral(double neutral) { /** * Get the negative property: The negative property. - * + * * @return the negative value. */ public double getNegative() { @@ -81,7 +79,7 @@ public double getNegative() { /** * Set the negative property: The negative property. - * + * * @param negative the negative value to set. * @return the SentimentConfidenceScorePerLabel object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentimentResponse.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentimentResponse.java index b9175434c720..f2b239479689 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentimentResponse.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentimentResponse.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The SentimentResponse model. - */ +/** The SentimentResponse model. */ @Fluent public final class SentimentResponse { /* @@ -40,7 +38,7 @@ public final class SentimentResponse { /** * Get the documents property: Sentiment analysis per document. - * + * * @return the documents value. */ public List getDocuments() { @@ -49,7 +47,7 @@ public List getDocuments() { /** * Set the documents property: Sentiment analysis per document. - * + * * @param documents the documents value to set. * @return the SentimentResponse object itself. */ @@ -60,7 +58,7 @@ public SentimentResponse setDocuments(List documents) { /** * Get the errors property: Errors by document id. - * + * * @return the errors value. */ public List getErrors() { @@ -69,7 +67,7 @@ public List getErrors() { /** * Set the errors property: Errors by document id. - * + * * @param errors the errors value to set. * @return the SentimentResponse object itself. */ @@ -79,9 +77,9 @@ public SentimentResponse setErrors(List errors) { } /** - * Get the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Get the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @return the statistics value. */ public RequestStatistics getStatistics() { @@ -89,9 +87,9 @@ public RequestStatistics getStatistics() { } /** - * Set the statistics property: if showStats=true was specified in the - * request this field will contain information about the request payload. - * + * Set the statistics property: if showStats=true was specified in the request this field will contain information + * about the request payload. + * * @param statistics the statistics value to set. * @return the SentimentResponse object itself. */ @@ -101,9 +99,8 @@ public SentimentResponse setStatistics(RequestStatistics statistics) { } /** - * Get the modelVersion property: This field indicates which model is used - * for scoring. - * + * Get the modelVersion property: This field indicates which model is used for scoring. + * * @return the modelVersion value. */ public String getModelVersion() { @@ -111,9 +108,8 @@ public String getModelVersion() { } /** - * Set the modelVersion property: This field indicates which model is used - * for scoring. - * + * Set the modelVersion property: This field indicates which model is used for scoring. + * * @param modelVersion the modelVersion value to set. * @return the SentimentResponse object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsError.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsError.java index 5e5d1a837d60..e3da62cd7a96 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsError.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsError.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** - * The TextAnalyticsError model. - */ +/** The TextAnalyticsError model. */ @Fluent public final class TextAnalyticsError { /* @@ -45,7 +43,7 @@ public final class TextAnalyticsError { /** * Get the code property: Error code. - * + * * @return the code value. */ public ErrorCodeValue getCode() { @@ -54,7 +52,7 @@ public ErrorCodeValue getCode() { /** * Set the code property: Error code. - * + * * @param code the code value to set. * @return the TextAnalyticsError object itself. */ @@ -65,7 +63,7 @@ public TextAnalyticsError setCode(ErrorCodeValue code) { /** * Get the message property: Error message. - * + * * @return the message value. */ public String getMessage() { @@ -74,7 +72,7 @@ public String getMessage() { /** * Set the message property: Error message. - * + * * @param message the message value to set. * @return the TextAnalyticsError object itself. */ @@ -85,7 +83,7 @@ public TextAnalyticsError setMessage(String message) { /** * Get the target property: Error target. - * + * * @return the target value. */ public String getTarget() { @@ -94,7 +92,7 @@ public String getTarget() { /** * Set the target property: Error target. - * + * * @param target the target value to set. * @return the TextAnalyticsError object itself. */ @@ -104,9 +102,8 @@ public TextAnalyticsError setTarget(String target) { } /** - * Get the innererror property: Inner error contains more specific - * information. - * + * Get the innererror property: Inner error contains more specific information. + * * @return the innererror value. */ public InnerError getInnererror() { @@ -114,9 +111,8 @@ public InnerError getInnererror() { } /** - * Set the innererror property: Inner error contains more specific - * information. - * + * Set the innererror property: Inner error contains more specific information. + * * @param innererror the innererror value to set. * @return the TextAnalyticsError object itself. */ @@ -126,9 +122,8 @@ public TextAnalyticsError setInnererror(InnerError innererror) { } /** - * Get the details property: Details about specific errors that led to this - * reported error. - * + * Get the details property: Details about specific errors that led to this reported error. + * * @return the details value. */ public List getDetails() { @@ -136,9 +131,8 @@ public List getDetails() { } /** - * Set the details property: Details about specific errors that led to this - * reported error. - * + * Set the details property: Details about specific errors that led to this reported error. + * * @param details the details value to set. * @return the TextAnalyticsError object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsErrorException.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsErrorException.java index 64537e34050e..f98cb2de2d13 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsErrorException.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsErrorException.java @@ -7,13 +7,11 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpResponse; -/** - * Exception thrown for an invalid response with TextAnalyticsError information. - */ +/** Exception thrown for an invalid response with TextAnalyticsError information. */ public final class TextAnalyticsErrorException extends HttpResponseException { /** * Initializes a new instance of the TextAnalyticsErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -23,7 +21,7 @@ public TextAnalyticsErrorException(String message, HttpResponse response) { /** * Initializes a new instance of the TextAnalyticsErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsWarning.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsWarning.java index 50318f1fbc3a..bbd1e6c2b6fc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsWarning.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TextAnalyticsWarning.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** - * The TextAnalyticsWarning model. - */ +/** The TextAnalyticsWarning model. */ @Fluent public final class TextAnalyticsWarning { /* @@ -32,7 +30,7 @@ public final class TextAnalyticsWarning { /** * Get the code property: Error code. - * + * * @return the code value. */ public WarningCodeValue getCode() { @@ -41,7 +39,7 @@ public WarningCodeValue getCode() { /** * Set the code property: Error code. - * + * * @param code the code value to set. * @return the TextAnalyticsWarning object itself. */ @@ -52,7 +50,7 @@ public TextAnalyticsWarning setCode(WarningCodeValue code) { /** * Get the message property: Warning message. - * + * * @return the message value. */ public String getMessage() { @@ -61,7 +59,7 @@ public String getMessage() { /** * Set the message property: Warning message. - * + * * @param message the message value to set. * @return the TextAnalyticsWarning object itself. */ @@ -71,9 +69,8 @@ public TextAnalyticsWarning setMessage(String message) { } /** - * Get the targetRef property: A JSON pointer reference indicating the - * target object. - * + * Get the targetRef property: A JSON pointer reference indicating the target object. + * * @return the targetRef value. */ public String getTargetRef() { @@ -81,9 +78,8 @@ public String getTargetRef() { } /** - * Set the targetRef property: A JSON pointer reference indicating the - * target object. - * + * Set the targetRef property: A JSON pointer reference indicating the target object. + * * @param targetRef the targetRef value to set. * @return the TextAnalyticsWarning object itself. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/WarningCodeValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/WarningCodeValue.java index d620e009cacf..5aadf16b51b9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/WarningCodeValue.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/WarningCodeValue.java @@ -7,23 +7,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** - * Defines values for WarningCodeValue. - */ +/** Defines values for WarningCodeValue. */ public enum WarningCodeValue { - /** - * Enum value LongWordsInDocument. - */ + /** Enum value LongWordsInDocument. */ LONG_WORDS_IN_DOCUMENT("LongWordsInDocument"), - /** - * Enum value DocumentTruncated. - */ + /** Enum value DocumentTruncated. */ DOCUMENT_TRUNCATED("DocumentTruncated"); - /** - * The actual serialized value for a WarningCodeValue instance. - */ + /** The actual serialized value for a WarningCodeValue instance. */ private final String value; WarningCodeValue(String value) { @@ -32,7 +24,7 @@ public enum WarningCodeValue { /** * Parses a serialized value to a WarningCodeValue instance. - * + * * @param value the serialized value to parse. * @return the parsed WarningCodeValue object, or null if unable to parse. */ diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/package-info.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/package-info.java index 3e23bae65d86..99e5843b9cc7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/package-info.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/package-info.java @@ -3,14 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for TextAnalyticsClient. - * The Text Analytics API is a suite of text analytics web services built with - * best-in-class Microsoft machine learning algorithms. The API can be used to - * analyze unstructured text for tasks such as sentiment analysis, key phrase - * extraction and language detection. No training data is needed to use this - * API; just bring your text data. This API uses advanced natural language - * processing techniques to deliver best in class predictions. Further - * documentation can be found in + * Package containing the data models for TextAnalyticsClient. The Text Analytics API is a suite of text analytics web + * services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured + * text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed + * to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver + * best in class predictions. Further documentation can be found in * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. */ package com.azure.ai.textanalytics.implementation.models; diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/package-info.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/package-info.java index 14f77f46074d..583ec2fb820b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/package-info.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/package-info.java @@ -3,15 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations and inner classes for - * TextAnalyticsClient. - * The Text Analytics API is a suite of text analytics web services built with - * best-in-class Microsoft machine learning algorithms. The API can be used to - * analyze unstructured text for tasks such as sentiment analysis, key phrase - * extraction and language detection. No training data is needed to use this - * API; just bring your text data. This API uses advanced natural language - * processing techniques to deliver best in class predictions. Further - * documentation can be found in + * Package containing the implementations and inner classes for TextAnalyticsClient. The Text Analytics API is a suite + * of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to + * analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No + * training data is needed to use this API; just bring your text data. This API uses advanced natural language + * processing techniques to deliver best in class predictions. Further documentation can be found in * https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. */ package com.azure.ai.textanalytics.implementation; diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java index 83de30a3024c..d1ce483bfbbc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsAsyncClientTest.java @@ -9,6 +9,8 @@ import com.azure.ai.textanalytics.models.LinkedEntityMatch; import com.azure.ai.textanalytics.models.SentenceSentiment; import com.azure.ai.textanalytics.models.SentimentConfidenceScores; +import com.azure.ai.textanalytics.models.TextAnalyticsError; +import com.azure.ai.textanalytics.models.TextAnalyticsErrorCode; import com.azure.ai.textanalytics.models.TextAnalyticsException; import com.azure.ai.textanalytics.models.TextSentiment; import com.azure.core.exception.HttpResponseException; @@ -150,7 +152,8 @@ public void detectLanguageInvalidCountryHint(HttpClient httpClient, TextAnalytic client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); StepVerifier.create(client.detectLanguage("Este es un documento escrito en Español.", "en")) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_COUNTRY_HINT_EXPECTED_EXCEPTION_MESSAGE)); + && throwable.getMessage().equals(INVALID_COUNTRY_HINT_EXPECTED_EXCEPTION_MESSAGE)) + .verify(); } /** @@ -162,7 +165,8 @@ public void detectLanguageEmptyText(HttpClient httpClient, TextAnalyticsServiceV client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); StepVerifier.create(client.detectLanguage("")) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + .verify(); } /** @@ -233,7 +237,8 @@ public void recognizeEntitiesForEmptyText(HttpClient httpClient, TextAnalyticsSe client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); StepVerifier.create(client.recognizeEntities("")) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + .verify(); } @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -260,8 +265,15 @@ public void recognizeEntitiesBatchInputSingleError(HttpClient httpClient, TextAn client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); recognizeBatchCategorizedEntitySingleErrorRunner((inputs) -> StepVerifier.create(client.recognizeEntitiesBatchWithResponse(inputs, null)) - .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(BATCH_ERROR_EXCEPTION_MESSAGE))); + .assertNext(resultCollection -> { + resultCollection.getValue().forEach(result -> { + assertTrue(result.isError()); + final TextAnalyticsError error = result.getError(); + TextAnalyticsErrorCode errorCode = error.getErrorCode(); + assertTrue(TextAnalyticsErrorCode.fromString("invalidDocument").equals(errorCode)); + assertTrue("Document text is empty.".equals(error.getMessage())); + }); + }).verifyComplete()); } @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -348,7 +360,8 @@ public void recognizeLinkedEntitiesForEmptyText(HttpClient httpClient, TextAnaly client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); StepVerifier.create(client.recognizeLinkedEntities("")) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + .verify(); } @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -450,7 +463,8 @@ public void extractKeyPhrasesForEmptyText(HttpClient httpClient, TextAnalyticsSe client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); StepVerifier.create(client.extractKeyPhrases("")) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + .verify(); } @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -584,7 +598,8 @@ public void analyzeSentimentForEmptyText(HttpClient httpClient, TextAnalyticsSer client = getTextAnalyticsAsyncClient(httpClient, serviceVersion); StepVerifier.create(client.analyzeSentiment("")) .expectErrorMatches(throwable -> throwable instanceof TextAnalyticsException - && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)); + && throwable.getMessage().equals(INVALID_DOCUMENT_EXPECTED_EXCEPTION_MESSAGE)) + .verify(); } /** diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json index 981578e39fb6..c9d5ef0d2990 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6157e5fc-f3a3-4917-8509-cf4d293c4444", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "35eb8773-e999-4513-8d99-2be40442eefa", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "7", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "cc8ae190-2e4c-4271-b95e-0ccbd1d57cdb", + "apim-request-id" : "03e3f07a-e90c-4caf-8e74-fb8216119043", "retry-after" : "0", "StatusCode" : "400", - "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innerError\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Thu, 30 Apr 2020 04:52:39 GMT", + "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", + "Date" : "Wed, 15 Jul 2020 04:14:29 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInput.json index db9e4dfdaed6..f6e6cb2e0191 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a5fdc3a0-3fa7-4b80-98e8-7a739d4c352a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b455e87-cc48-44f2-bd68-d1707c29fa34", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "109", + "x-envoy-upstream-service-time" : "91", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "48f66acf-87f2-4d9b-96e1-e782aff54539", + "apim-request-id" : "ca2e5376-b597-446c-8ec3-cda901902bd0", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:32 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json index b207bb28e59d..d74333101866 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5bfc2f94-994e-4501-bc55-7bef62ab587a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cee9a1c2-b321-4ac5-8081-d779b9fe17f9", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "120", + "x-envoy-upstream-service-time" : "85", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "baf52579-73a8-4377-8a02-d5ab016d55ca", + "apim-request-id" : "427cc017-f2bc-42f0-bda4-aa1c305be30c", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:39 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json index aca336e6ecb3..b0dbe661191f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "390d98ec-ee3c-46d8-9157-8fb209d916d4", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6a149fed-28e9-4051-92b5-ce68098984a3", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "137", + "x-envoy-upstream-service-time" : "112", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "dc845cbb-ed0b-4139-8690-ffa5ce91d351", + "apim-request-id" : "58d21046-7255-4c36-b95a-d73489a85088", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:33 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json index ea87abfb662a..e9a4adbda065 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c7f450bb-9aa1-46a1-bd87-e76c7441bc67", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f67f970f-c761-4c83-a20e-083e7a6ae6f1", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "283", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "efbe390c-f5c2-41a3-886b-d6dcc12c2ab5", + "apim-request-id" : "2a27fe98-5923-47bf-83c7-22091d7fd4b6", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 06:20:06 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json index 190918010d9d..7c961368f586 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c715c68e-bf05-43a7-92e6-152e7c0833d2", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "314fc550-6a3e-4b08-b0eb-6a78f5c43a7d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "110", + "x-envoy-upstream-service-time" : "95", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "7d859041-8a10-45dc-b769-662885e9ee7e", + "apim-request-id" : "80d8febf-8794-4f72-a306-103a88fb9088", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":0,\"length\":1,\"text\":\"!\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":1,\"length\":4,\"text\":\"@#%%\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":0,\"length\":1,\"text\":\"!\"},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.06,\"neutral\":0.91,\"negative\":0.03},\"offset\":1,\"length\":4,\"text\":\"@#%%\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:36 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListLanguageHint.json index 5416b59e4f20..d44c0e87b37a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8c4f6331-de27-4bd5-94e9-62694e7bf1ce", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "bfacc9cd-d097-40bd-84cb-e4a7d639641e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "111", + "x-envoy-upstream-service-time" : "145", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "94a7a5af-8561-4e49-a42d-2c4691b42f94", + "apim-request-id" : "af1778a3-0d86-4f67-a583-becbc1bf24e8", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:32 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithOptions.json index 0e5fe7cae062..1c0b90702e69 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForListStringWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7a71ad5f-9e38-46d3-a97f-7d22b6be4147", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b05cb28f-b425-48ab-8e47-caacf51b806d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "116", + "x-envoy-upstream-service-time" : "106", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "f81daae1-a4e8-4afa-be62-a6b466a0c7b5", + "apim-request-id" : "767af6d1-b389-4453-9aa7-064af57d0f1c", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]},{\"id\":\"1\",\"sentiment\":\"mixed\",\"statistics\":{\"charactersCount\":67,\"transactionsCount\":1},\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":0,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"},{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":36,\"length\":31,\"text\":\"The hotel was dark and unclean.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:38 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json index 98a159515f80..d32e2e898c1b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/analyzeSentimentForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//sentiment", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//sentiment", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3a1c8bc7-9278-4a60-8baa-c5c304b349f3", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d57c5af-70da-47e5-b258-8c5bb75ec473", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "116", + "x-envoy-upstream-service-time" : "87", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "75039135-fa22-4c6c-825d-6452b99e24ca", + "apim-request-id" : "78660fca-0348-4a7d-8e3d-ac2e82141f7f", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"sentiment\":\"mixed\",\"confidenceScores\":{\"positive\":0.5,\"neutral\":0.0,\"negative\":0.5},\"sentences\":[{\"sentiment\":\"negative\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":0.0,\"negative\":1.0},\"offset\":0,\"length\":31,\"text\":\"The hotel was dark and unclean.\"},{\"sentiment\":\"positive\",\"confidenceScores\":{\"positive\":1.0,\"neutral\":0.0,\"negative\":0.0},\"offset\":32,\"length\":35,\"text\":\"The restaurant had amazing gnocchi.\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:36 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHint.json index 474e09f6baf7..e80fdf1392f5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d29baca1-0bf4-47f1-927d-f04f6f2f1f43", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "41e26755-23ea-43a5-8ae4-5e35caaa794a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "219091a3-23fd-4e8f-af46-51788a011907", + "apim-request-id" : "91defeba-9570-40d3-a924-b742acea864e", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHintForBatchOperation.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHintForBatchOperation.json index e5982a588866..82b3c73ceeb5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHintForBatchOperation.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultCountryHintForBatchOperation.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0e50d1aa-13ce-4b88-aa46-cb6786bc979e", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "78a3a306-5107-4d00-9393-e7957b14748c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "0dbd716c-942a-46fd-abca-a903c3e12a1d", + "apim-request-id" : "20dbab91-db76-40b6-97fd-d1bddb472bb9", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguage.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguage.json index cb08dfb81944..384244568680 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguage.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguage.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d2a6d6de-e582-4584-87f8-129704d4a54a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e943340b-e07c-4c92-bed9-ed89b1f6e1ec", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "3", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "39eb45d0-ea4e-4ed5-88b3-be834a3329b1", + "apim-request-id" : "e85d934d-38bb-42a2-a2dd-41512088953e", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:43 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguageForBatchOperation.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguageForBatchOperation.json index 96ed69d31d14..0724d8a22cbd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguageForBatchOperation.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultLanguageForBatchOperation.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5cf9ac37-da20-4c6b-9f71-ab4b9fa90e83", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0ce16f07-9311-473d-891e-617ed8e876b0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "3", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "f57d2158-f80f-4193-a069-ec2f610974b0", + "apim-request-id" : "e5842e25-e10f-4c56-8838-38b39f6f12c8", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultPipeline.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultPipeline.json index 0002fdce69f2..79d249639761 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultPipeline.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithDefaultPipeline.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1d791e03-8ed9-4525-b738-129fc648fb45", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "228448f7-ad12-4eb8-94f2-2eed7aa712ad", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "3cab5f4e-4710-43a9-acbd-bbed7e479147", + "apim-request-id" : "1c8d58b1-52e5-46f6-a27d-c10bf1f8c32c", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithInvalidApiKeyCredential.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithInvalidApiKeyCredential.json index 04880f093033..328a7000fe9f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithInvalidApiKeyCredential.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithInvalidApiKeyCredential.json @@ -1,23 +1,18 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7668c3a1-18fe-4517-aec6-807f6464d047", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0a7bf23a-f1b4-426c-84c0-827f723f9659", "Content-Type" : "application/json" }, "Response" : { - "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", - "x-content-type-options" : "nosniff", - "apim-request-id" : "2ef43920-d9b5-4c04-bb25-834463644188", - "WWW-Authenticate" : "AzureApiManagementKey realm=\"https://westus2.ppe.cognitiveservices.azure.com/text/analytics\",name=\"Ocp-Apim-Subscription-Key\",type=\"header\"", "retry-after" : "0", - "Content-Length" : "225", + "Content-Length" : "224", "StatusCode" : "401", - "Body" : "{\"error\":{\"code\":\"401\",\"message\": \"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.\"}}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", - "Content-Type" : "application/json" + "Body" : "{\"error\":{\"code\":\"401\",\"message\":\"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.\"}}", + "Date" : "Wed, 15 Jul 2020 04:14:43 GMT" }, "Exception" : null } ], diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHint.json index 13d83b442b6d..06f67c9c4331 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ec96c7c2-36eb-4a6b-9fa2-0761348f2233", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9737a876-5b70-44b2-89c2-a41524c1dfed", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "8b6a679f-87fb-4b48-8de6-d733c232700f", + "apim-request-id" : "4b410dcf-d2d8-4afb-a39b-87e95d35f393", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:43 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHintForBatchOperation.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHintForBatchOperation.json index 9a167ad1897a..bde298e006f1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHintForBatchOperation.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewCountryHintForBatchOperation.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ea9b85d5-fd0b-4b53-91e8-ebc4d05c664a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2731d960-9fb3-4c70-8422-9360f9970b04", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "2d4567a0-347c-4706-8772-1b84e5c92e32", + "apim-request-id" : "23d96b4c-9a02-4c77-b56b-29ae2bd35cfd", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:43 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguage.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguage.json index 46528694c067..e8fe2940c128 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguage.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguage.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5e23dec1-dd4a-415e-b600-e109fc2f925c", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e4ae3aa5-6b11-401b-8ccb-a6acdc59e918", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "5a8ac46c-9125-46d2-804b-8e08fdc03089", + "apim-request-id" : "388f89c2-98f1-4675-85e4-57429d2531be", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Je m'appelle Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:43 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguageForBatchOperation.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguageForBatchOperation.json index a717ba37d52a..e2e981970ae0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguageForBatchOperation.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNewLanguageForBatchOperation.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c0635dfd-294d-4cee-bb49-56849619da59", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f0a679f7-ce2d-40ca-85fe-ae5a5037b3d0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "723acc13-583f-435c-bb27-9fe3bd416fe9", + "apim-request-id" : "b0db648a-257b-403e-b9d8-a0efd13fa5f1", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"Je m'appelle Mondly\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNullServiceVersion.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNullServiceVersion.json index b130c60189f8..00ed2adcd0ce 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNullServiceVersion.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithNullServiceVersion.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c26cf288-c912-49f8-89db-f4e93a69ef4e", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b3c50f6a-8ddd-47ba-a6f7-f0d30505c056", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "9", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "3e7b8e1a-71c0-4cd5-b5b3-8ca28fe65a0a", + "apim-request-id" : "d7e8807e-f5a2-4f7b-a1a5-eb0fc2856323", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToInvalidKey.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToInvalidKey.json index 29c306958b92..9798baeee176 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToInvalidKey.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToInvalidKey.json @@ -1,23 +1,18 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7263d388-8337-4f34-bd89-091877803b4e", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f9c56da2-fec2-43ac-8423-1601ac330b42", "Content-Type" : "application/json" }, "Response" : { - "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", - "x-content-type-options" : "nosniff", - "apim-request-id" : "8b1cf6a6-aa5b-44b4-8c44-8ab8038c5913", - "WWW-Authenticate" : "AzureApiManagementKey realm=\"https://westus2.ppe.cognitiveservices.azure.com/text/analytics\",name=\"Ocp-Apim-Subscription-Key\",type=\"header\"", "retry-after" : "0", - "Content-Length" : "225", + "Content-Length" : "224", "StatusCode" : "401", - "Body" : "{\"error\":{\"code\":\"401\",\"message\": \"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.\"}}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", - "Content-Type" : "application/json" + "Body" : "{\"error\":{\"code\":\"401\",\"message\":\"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.\"}}", + "Date" : "Wed, 15 Jul 2020 04:14:43 GMT" }, "Exception" : null } ], diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToValidKey.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToValidKey.json index 038740b6f6fc..6283e7c93c8a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToValidKey.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithRotateToValidKey.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bd554a3b-56e6-428a-b9c1-ca85499d1396", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "457b620f-e1ca-45d2-b68b-35f721b14854", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "814618b0-a84b-4329-8bf1-5c6b00e7dc2b", + "apim-request-id" : "b7e247c6-dcea-49b3-a59a-14f5bd879b34", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithValidApiKeyCredential.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithValidApiKeyCredential.json index e0f2a7a8be6d..0b672fbd3ba5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithValidApiKeyCredential.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/clientBuilderWithValidApiKeyCredential.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "15007527-5e92-4b9e-9a43-4ff1a2153247", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cac692a6-264d-4df5-b82a-1e839148c2bc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "6a90988f-83ad-4a6f-9598-62c3a5958ff7", + "apim-request-id" : "70904319-9f94-49a6-906a-379fe96496fd", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:17 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageDuplicateIdInput.json index 0129d844b940..ff81a821cb94 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b27774bc-d2d4-4f86-94fa-8af830bf480f", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "90d576e3-1b2d-48cb-b8e7-367a653458fb", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "131", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "0c3ce8d9-fd5f-4ee9-9148-ef246412161d", + "apim-request-id" : "232295a8-9591-4b36-8410-36b8bd360449", "retry-after" : "0", "StatusCode" : "400", - "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innerError\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Thu, 30 Apr 2020 03:19:53 GMT", + "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", + "Date" : "Wed, 15 Jul 2020 04:14:34 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyCountryHint.json index 171ff3acffe4..30703f4c87c3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyCountryHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fc50ed8b-a253-44a0-9a3d-b3ddf8b735ad", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "38581834-8351-460e-a706-57d247d0c8c1", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "29ffb9f3-a27e-4153-a3b7-e9b81394c68e", + "apim-request-id" : "5c201a8d-eda4-46e4-81a4-048714871300", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:34 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyText.json index dfa19617cca6..7fddfc69c379 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageEmptyText.json @@ -1,23 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fda541db-a54d-40ce-9af8-9c7c31b6720b", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "201beac7-cedd-4db1-8390-5f87cf6ecf95", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=0", - "apim-request-id" : "67ed867c-981d-459c-b069-8a83a61f7fbb", + "apim-request-id" : "515a36d0-2ec5-4399-8ab7-c91d0e3deb9f", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Date" : "Wed, 15 Jul 2020 06:14:50 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageFaultyText.json index cd50802112dc..da3fb418bf7f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b4798dac-a6de-414c-b454-9015fc274e4c", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7b64255d-f8ad-40a7-817e-325772bb8819", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "8464a8c1-5b12-43ed-83ba-57ae307d8daa", + "apim-request-id" : "814ef715-d269-4492-b6bc-4878c75bb9f5", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:40 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageInvalidCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageInvalidCountryHint.json index 7053f0309988..4b2445a572ce 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageInvalidCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageInvalidCountryHint.json @@ -1,23 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b9cbba15-0057-4127-adf9-02a6573dbf20", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9d69b921-32bd-4405-aca9-7735067f0c76", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "11", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=0", - "apim-request-id" : "d3048c6a-f280-4303-a500-6fbe274e42de", + "apim-request-id" : "64b09a3d-d2df-42c6-9bee-099b1cb4d230", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid Country Hint.\",\"innererror\":{\"code\":\"InvalidCountryHint\",\"message\":\"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code.\"}}}],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 05:21:19 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageNoneCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageNoneCountryHint.json index 6c14fdd16738..d0886143a9d9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageNoneCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguageNoneCountryHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b85ce7a1-93c9-4757-ae1e-8aa42c1efb2f", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c9dfa311-86d8-4af3-9084-1b895aff0328", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "650c3b64-125a-4045-aded-945ff682c6aa", + "apim-request-id" : "d24f76ec-1e3c-425c-ada1-d7ad8ed5570a", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:26 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInput.json index a0acc03c88e3..e875f162913e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "944c5c64-c881-4308-a447-816f72df9ab0", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f12701d1-dc38-40ca-8fc4-d3ed25740f18", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "52ef94e1-4b42-49db-b8f2-5bd6bfed78de", + "apim-request-id" : "f5a23511-ea35-4fad-b38e-796e6e9021be", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:41 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatistics.json index 188f68f3e61f..4a1532ddfe63 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e1e1b615-a26b-4c9e-961e-ae73b2168cf1", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d9d1eb82-9746-4cfa-a994-5f48dd37323a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "48410bc9-b67c-4615-8bcf-2cadfe4f2d46", + "apim-request-id" : "c5036c9e-72e2-4ec8-8519-aca69ef8f7fe", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":3,\"validDocumentsCount\":3,\"erroneousDocumentsCount\":0,\"transactionsCount\":3},\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":26,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":40,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"statistics\":{\"charactersCount\":6,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:33 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatisticsNew.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatisticsNew.json deleted file mode 100644 index 78dc5f5301c3..000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchInputShowStatisticsNew.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/languages?showStats=true", - "Headers" : { - "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "7bbf00ca-d6c7-4e17-9bf4-6bdc587fbdb1", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "6", - "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", - "x-content-type-options" : "nosniff", - "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "0a3819af-a97d-4279-9c1c-30e216082788", - "x-aml-ta-request-id" : "78f53879-b38b-40ec-b441-e47ebc2c5905", - "retry-after" : "0", - "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":3,\"validDocumentsCount\":3,\"erroneousDocumentsCount\":0,\"transactionsCount\":3},\"documents\":[{\"id\":\"0\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}],\"statistics\":{\"charactersCount\":26,\"transactionsCount\":1}},{\"id\":\"1\",\"detectedLanguages\":[{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"score\":1.0}],\"statistics\":{\"charactersCount\":39,\"transactionsCount\":1}},{\"id\":\"2\",\"detectedLanguages\":[{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"score\":0.0}],\"statistics\":{\"charactersCount\":6,\"transactionsCount\":1}}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Fri, 06 Dec 2019 23:45:12 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHint.json index 515ad3413f89..95f211e86aea 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e8c4d152-8f81-43ba-beab-333ffc907333", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1dadde91-c611-4113-b4dd-cb220ff76d93", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "a7d6e3ca-f60f-4a20-99ca-a5ac0ef79451", + "apim-request-id" : "63831bed-228f-4060-8075-0290c388cec3", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:39 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHintWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHintWithOptions.json index 92ed0217cccf..00c102840345 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHintWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchListCountryHintWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e54088d4-3873-44d9-b21f-7d26d068896d", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "15d08c28-acf4-44e4-bd7f-41cdcd8ed18c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "bdf7f3e6-3805-4dfd-bdc3-404e12b68a30", + "apim-request-id" : "327012fc-8461-44ba-8cdb-687378056036", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":3,\"validDocumentsCount\":3,\"erroneousDocumentsCount\":0,\"transactionsCount\":3},\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":26,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"statistics\":{\"charactersCount\":40,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"statistics\":{\"charactersCount\":6,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:36 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringInput.json index 4f163bf2ab41..f4152948f34a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9fc32873-4b4c-47cb-8378-e1647f654d9a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "66f3f4d9-3460-4c95-9eff-bc80fcfdd11b", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "3", + "x-envoy-upstream-service-time" : "7", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "702da38b-f3d2-4d1f-8c01-c42cf5cdd23d", + "apim-request-id" : "c0c42ba6-d0ca-417d-a1b4-5801af943e22", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"1\",\"detectedLanguage\":{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"confidenceScore\":1.0},\"warnings\":[]},{\"id\":\"2\",\"detectedLanguage\":{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"confidenceScore\":0.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:30 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringList.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringList.json deleted file mode 100644 index 5af42401c1a1..000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectLanguagesBatchStringList.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/languages", - "Headers" : { - "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "f2c6afdf-c7d9-4b64-bb47-df7a395fb176", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "6", - "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", - "x-content-type-options" : "nosniff", - "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=3", - "apim-request-id" : "9f374d46-7574-40a3-8f1f-909d785f9bbb", - "x-aml-ta-request-id" : "5927da90-8c7b-4102-916c-b49197615813", - "retry-after" : "0", - "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguages\":[{\"name\":\"English\",\"iso6391Name\":\"en\",\"score\":1.0}]},{\"id\":\"1\",\"detectedLanguages\":[{\"name\":\"Spanish\",\"iso6391Name\":\"es\",\"score\":1.0}]},{\"id\":\"2\",\"detectedLanguages\":[{\"name\":\"(Unknown)\",\"iso6391Name\":\"(Unknown)\",\"score\":0.0}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Fri, 06 Dec 2019 23:45:12 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectSingleTextLanguage.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectSingleTextLanguage.json index 707c7cd28103..fc430dada420 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectSingleTextLanguage.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/detectSingleTextLanguage.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//languages", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//languages", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "98b653f8-4f93-4fdc-b4ee-adabc657071c", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1dbbaa8-c081-4059-9d5d-6e5286a06c41", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "ce9d081a-00cb-4505-81a9-d845d92a4210", + "apim-request-id" : "52fa2d38-a805-4a66-be05-8dac3f85bff2", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"detectedLanguage\":{\"name\":\"English\",\"iso6391Name\":\"en\",\"confidenceScore\":1.0},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:37 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchWarning.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchWarning.json index 574b1e965176..3029c8b7c7b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchWarning.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesBatchWarning.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "09f7916f-881b-4eda-b39d-9751d3a3807a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fbdaf84a-d713-460f-9667-4fea0bb66ce3", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "22", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "2fe14015-84a7-463c-b291-1c0843a2b509", + "apim-request-id" : "bc125268-a1fa-4433-8aa7-b9153ecb3e71", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost\"],\"warnings\":[{\"code\":\"LongWordsInDocument\",\"message\":\"The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions.\"}]},{\"id\":\"1\",\"keyPhrases\":[\"Microsoft\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Thu, 07 May 2020 02:48:33 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:41 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesDuplicateIdInput.json index 5f13c5933a9d..7b549b5c80f6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "bd79c9e5-7980-4380-bc33-b523d2c53e2e", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ff81219f-02cb-4191-8667-5b88194dc89a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "112", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "6c965e67-2741-4b70-97f2-6d4705d5f714", + "apim-request-id" : "983040d8-028c-4ae1-a176-8a0d48a87fe1", "retry-after" : "0", "StatusCode" : "400", - "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innerError\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Thu, 30 Apr 2020 04:52:37 GMT", + "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", + "Date" : "Wed, 15 Jul 2020 04:14:29 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInput.json index b81a36772db3..7977dcd9620f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "50ed4022-98a0-4504-a0ca-1e4ab870ab91", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9542d252-cb21-44cb-8e84-ff122a27bed6", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "3390b669-3026-418c-a00e-298bc6d64d38", + "apim-request-id" : "788a61b9-34bf-4d2b-a4f1-ce40115dd8fe", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:26 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInputShowStatistics.json index e122a4129652..50db86952ee1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "80c81b1a-6682-46cd-a2f3-5c1ec8673a8d", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "91fe1f35-1351-4a13-84b2-3bf39d684d37", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "d2d9b818-a6a7-47f5-9606-3ca8118b1d08", + "apim-request-id" : "cf12ce51-f5c4-4ad5-a4e2-4ae74d34e311", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"statistics\":{\"charactersCount\":49,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"statistics\":{\"charactersCount\":21,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchStringInput.json index 1787566b8905..bed1d2528eaa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "d915e11c-f5c4-4147-a491-8b12787a203f", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "10e53ad6-80a5-4639-9060-87dca1400b00", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "6", + "x-envoy-upstream-service-time" : "8", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "e73ae469-8ca5-4a26-bbb4-e548ff416167", + "apim-request-id" : "b7e6b269-0a95-4632-9ed5-26b9486d4f63", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:40 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForEmptyText.json index e7055afa0c2c..0897ed454312 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForEmptyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "fcf765fa-9e9f-4c1f-b15b-b7a917cda77c", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9a086500-1dc1-49b5-a9b3-4bbf69393cc0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "1", + "x-envoy-upstream-service-time" : "236", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=0", - "apim-request-id" : "2917c294-c86c-44b3-8eaf-1a087a5332d5", + "apim-request-id" : "8880d2cb-9e96-4c23-b9ef-2fc7c3319058", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 06:19:40 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForFaultyText.json index 112abcec8fef..a7b17f2f16e1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForFaultyText.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "054f1961-34b0-4f46-ba07-129ef22f203a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "99b15e2f-fbea-49f2-bd8b-735dba11c076", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "e8821ad2-0c24-40f6-abe4-21a9a0049264", + "apim-request-id" : "ad26b9f3-a44b-4f49-bf0d-440e6bdd1171", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListLanguageHint.json index d67f8a762f93..50e741adc9c5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "af10e3af-edbd-4433-b60b-f8743c2cb972", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0250bb3d-c903-4c6d-9b5a-af1408b8a2ea", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "6", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "0f1c2ba1-0f81-4d8d-ac1b-f8f67f0db9e8", + "apim-request-id" : "f9a8ee49-b556-44d3-912f-dbfb58d20dba", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:40 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListStringWithOptions.json index 9c0bd50d9273..2f038f1c56e9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForListStringWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c6ed0a9f-a4ee-4e3d-8a74-e0c603014b4e", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "21234958-3db8-45ff-bb8a-a9f851e47de0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "9", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "e1a68dde-4ac7-4e1d-8da5-7527fa757817", + "apim-request-id" : "c233a162-654a-4ea1-886f-acdd93eb8a7e", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"input text\",\"world\"],\"statistics\":{\"charactersCount\":49,\"transactionsCount\":1},\"warnings\":[]},{\"id\":\"1\",\"keyPhrases\":[\"monde\"],\"statistics\":{\"charactersCount\":21,\"transactionsCount\":1},\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:34 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForTextInput.json index bd2b2eb3e675..c05a76dcf967 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b57d36cb-3bc5-40f2-aba9-cb9aba3e3d95", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8908ad2a-3f5c-4b6b-a792-94cdde185ecc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "42f434be-b16a-4b5f-9920-75e5d92d0eed", + "apim-request-id" : "1470a283-af3f-4e96-b849-a08195509963", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"monde\"],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:29 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesWarning.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesWarning.json index 373d8ae1a030..41e37e911b38 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesWarning.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/extractKeyPhrasesWarning.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.ppe.cognitiveservices.azure.com/text/analytics/v3.0//keyPhrases", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//keyPhrases", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "6070fa8f-51ce-4ee1-8262-bb1413d91844", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "48f8afcf-669d-4109-8fe1-1d9ae9c7cc19", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "4", + "x-envoy-upstream-service-time" : "5", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "8d61f6e0-6f52-4d7a-a157-c8380bf2b60d", + "apim-request-id" : "54252be8-2160-4162-9a3a-fb2da1c63482", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"keyPhrases\":[\"Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost\"],\"warnings\":[{\"code\":\"LongWordsInDocument\",\"message\":\"The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions.\"}]}],\"errors\":[],\"modelVersion\":\"2019-10-01\"}", - "Date" : "Thu, 07 May 2020 02:48:54 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:35 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json index 8dea8ba2991d..8d2b18d1fa0a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesBatchInputSingleError.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "c155ee1b-e8ec-4897-a653-351837349cca", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "804f9674-7cdc-48f8-9f2d-b310a4b23844", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "fde49364-8059-4cb5-b65f-19e1180db44f", + "apim-request-id" : "0353845f-15de-4bd8-9e4b-0c6aba1140a4", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"2\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 07:14:10 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json index 5d75bf441cc7..b5db55a394d6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "0697cc18-e2ad-40d2-9403-238072c99231", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7de08f9c-a424-43b9-a1ba-bff22e7b6d78", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "625712f8-5ad4-4c0f-b446-12ce318345db", + "apim-request-id" : "7b927df4-bc42-48f1-8909-e2daf670d0f6", "retry-after" : "0", "StatusCode" : "400", - "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innerError\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Thu, 30 Apr 2020 04:52:39 GMT", + "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", + "Date" : "Wed, 15 Jul 2020 04:14:42 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json index 2df061228dbc..da5942f5cc83 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "44c61065-7f1f-4b50-a029-f49551867ddd", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2a46f3f9-1b6b-4873-802d-f7abf49645b0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "91", + "x-envoy-upstream-service-time" : "106", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "a91c7873-b4ef-44bd-9253-e662937f1f59", + "apim-request-id" : "6d0230d1-cf8f-48cd-830b-5139129e60e0", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.62},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.6},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.37}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:30 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json index b6bd99a9fee7..7eaf842470a4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "33da35c7-b013-4cf9-86aa-c67157d11287", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b16eb4cc-ece9-4990-917c-3b18d7e525c3", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "95", + "x-envoy-upstream-service-time" : "84", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "e8e8adf7-30c7-4bc6-a080-254f68a32b67", + "apim-request-id" : "0de8933d-0dc6-4823-9a83-28287320521c", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.62},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.6},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.37}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:41 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json index 4f49e89a8bac..9744c089a40f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e1176b08-6a1f-4306-8c72-06140a9d526f", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2bf186b-fc0b-48c9-a968-7a5a0a619a1d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "97", + "x-envoy-upstream-service-time" : "95", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "0214cc9d-0063-4c09-aa8f-0940393b9a58", + "apim-request-id" : "a89501b9-279c-46b6-8f27-cc6f291a414e", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.62},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.6},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.37}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:32 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json index d62ca7b600f9..ed1fafbe0144 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "235ca2bb-7dd2-452b-9acd-a6196322953f", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "22827ee1-0788-4246-8c34-1319cbbb71c9", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "3", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "9891bfdc-977a-4561-9fa3-e2517e7d3c0e", + "apim-request-id" : "88179958-0667-41d0-8784-312f94f98e28", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 06:13:34 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json index 86ff28aca612..e60c4e7f7d04 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "b23078f9-d856-402d-9138-9ce2e07e0c4a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8d91dc2-3351-49f2-855b-fa80c170ad5e", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "56", + "x-envoy-upstream-service-time" : "62", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "e8cccb7c-1b1a-48c5-be73-8eb7435af38c", + "apim-request-id" : "e096da31-8ccc-462b-a528-b5ff0f6a758d", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:35 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json index 51630aa29257..248cb6a1fa35 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "039a577f-2ee6-4e6e-a5ca-334386f11459", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "543c03c2-fb0d-4cfc-938b-0dad2acd850d", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "102", + "x-envoy-upstream-service-time" : "107", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "5a80653a-fbc5-4e3a-9f55-7ee98a651260", + "apim-request-id" : "e3cfef2b-8054-40f5-ae33-f2b2ff6c5de4", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.62},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.6},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.37}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:31 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json index 626efdfb3870..16c4f9c873d0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForListWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "008fab9b-6761-4859-a195-0a59e32dd2e4", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5484539f-0b52-42b5-bd39-9f9285302365", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "87", + "x-envoy-upstream-service-time" : "108", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "ea3fa9ac-ebcb-4d7d-8cd8-d6b6db1f6dde", + "apim-request-id" : "90fa5c9a-fcb7-4668-bde5-6847d34fa94c", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.62},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.6},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.37}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"text\":\"Microsoft\",\"category\":\"Organization\",\"offset\":10,\"length\":9,\"confidenceScore\":0.77}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:30 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json index 3e868809568d..9753ffcafa95 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "9cb6c777-9a17-45dc-8bc5-144f5bc4d59a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b32a575-b0a6-4689-ad1a-a5fe0389c296", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "76", + "x-envoy-upstream-service-time" : "91", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "3297d4e1-232d-46a0-ae46-205a2929c97e", + "apim-request-id" : "81434fee-45a6-4ef6-abaf-a6683d886503", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.62},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.6},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:38 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesTooManyDocuments.json index ff6bc7592345..799fabc968e8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeEntitiesTooManyDocuments.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/recognition/general", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/recognition/general", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2a6195db-9126-4c71-969d-0d75fa549c6d", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd8350fa-8f19-4097-a165-2bf9258a13c6", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "128", + "x-envoy-upstream-service-time" : "112", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=6", - "apim-request-id" : "bb5b1fee-7fd8-4f5d-be80-8827934adb6e", + "apim-request-id" : "9c63f22a-d4c6-48fd-a3b6-d092a85b76e2", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"4\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"5\",\"entities\":[{\"text\":\"trip\",\"category\":\"Event\",\"offset\":18,\"length\":4,\"confidenceScore\":0.61},{\"text\":\"Seattle\",\"category\":\"Location\",\"subcategory\":\"GPE\",\"offset\":26,\"length\":7,\"confidenceScore\":0.82},{\"text\":\"last week\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\",\"offset\":34,\"length\":9,\"confidenceScore\":0.8}],\"warnings\":[]}],\"errors\":[{\"id\":\"\",\"error\":{\"code\":\"InvalidRequest\",\"message\":\"The request has exceeded the allowed document limits.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"The number of documents in the request have exceeded the data limitations. See https://aka.ms/text-analytics-data-limits for additional information\"}}}],\"modelVersion\":\"2020-04-01\"}", - "Date" : "Fri, 08 May 2020 05:52:36 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:25 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json index ad7e3561cd81..fa62720ff673 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesDuplicateIdInput.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "604f60ed-8d4d-43e8-bef7-954acfe4886c", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8544a8f7-6f2a-4d9d-a2ed-d6f074246ab0", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "5", + "x-envoy-upstream-service-time" : "4", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "17c4f097-2f3f-4fa4-98a0-a036e24933d6", + "apim-request-id" : "ff2714cb-28d1-4ecb-a7f1-ee9814a6cf44", "retry-after" : "0", "StatusCode" : "400", - "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innerError\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", - "Date" : "Thu, 30 Apr 2020 04:52:37 GMT", + "Body" : "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Request contains duplicated Ids. Make sure each document has a unique Id.\"}}}", + "Date" : "Wed, 15 Jul 2020 04:14:31 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json index b29849149041..ed180b1540e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "cb5a7ee7-b977-4b83-866f-39f03af7a7d2", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6d17372a-4a5c-4666-b3b4-5a9c69fab65a", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "19", + "x-envoy-upstream-service-time" : "20", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "21baa840-355e-4ac0-ba17-4434a669aa70", + "apim-request-id" : "f85c7d18-cd5d-47c4-a067-711bf221bd2b", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:19 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:33 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json index fd7689f63463..d9eec0412a03 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchInputShowStatistics.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "8b28c5ff-1989-459c-925d-8e1de9030f7d", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7fd12438-4735-4240-9b9c-20d910cd46a1", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "18", + "x-envoy-upstream-service-time" : "21", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "4d1fa8fe-1ec6-4fcf-86b7-9f551acf9945", + "apim-request-id" : "50c1c83c-0484-4e3c-b12f-f345c3b956f0", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:39 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json index da426aaea9fe..4020a82c412d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForBatchStringInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ba5ba3c8-7119-4cff-8888-bc522556cfc3", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "988a54c2-6c04-4be9-b254-3b3b7b4f127c", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "18", + "x-envoy-upstream-service-time" : "19", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "db699c2b-7ca7-4348-8570-7ede1f277d4a", + "apim-request-id" : "63395d16-1940-4b55-ad48-1ee0facade6a", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:25 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json index c8945efee485..c4e6d38d71ab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForEmptyText.json @@ -1,22 +1,22 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "5afd8182-c8f2-454c-8278-95132a14f5af", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2bea51cf-8a7d-4684-9910-aa44683305c3", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "2", + "x-envoy-upstream-service-time" : "464", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", - "apim-request-id" : "de80e78b-df15-4a64-8f1a-4ebbe7450dd8", + "apim-request-id" : "3fba3d9e-867f-4f48-a3e3-c3f0d9cac40d", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"message\":\"Invalid document in request.\",\"innererror\":{\"code\":\"InvalidDocument\",\"message\":\"Document text is empty.\"}}}],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Date" : "Wed, 15 Jul 2020 06:18:17 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json index f1e76d293f58..788fa793a86e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForFaultyText.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "2f50a5ed-679e-485d-a1c6-59921c90d5a5", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3f729f50-bdfa-4518-b43b-fbfc81668f12", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "16", + "x-envoy-upstream-service-time" : "17", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "56625abf-52f0-4967-b086-0a7a90cbb690", + "apim-request-id" : "e2956b10-6602-43d3-a71f-4214ccad443b", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:20 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:37 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json index 1967eac24394..d79d2b2f5fc7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListLanguageHint.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "3c1af4aa-544e-450e-9b6d-5301807e72ee", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e0579e3d-1a00-4116-88e6-c23f3f9fb4d4", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "22", + "x-envoy-upstream-service-time" : "21", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "40e4642c-01a0-4ab7-9a77-fafd4ca83dc2", + "apim-request-id" : "2a27fdc5-a5b7-4ad6-b103-203954b9d260", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:24 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json index bf0f9fea801c..d0a58431a785 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForListStringWithOptions.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking?showStats=true", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking?showStats=true", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "e731ff31-c9b5-4844-a5eb-c6e519d2e50a", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "667afabd-0adb-41a0-a04b-0aa32330c4c5", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "20", + "x-envoy-upstream-service-time" : "18", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=2", - "apim-request-id" : "eb22c862-77fa-4ca4-89e0-3118525a5952", + "apim-request-id" : "dd9e4842-510f-46d1-a328-b51198e22f3e", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Body" : "{\"statistics\":{\"documentsCount\":2,\"validDocumentsCount\":2,\"erroneousDocumentsCount\":0,\"transactionsCount\":2},\"documents\":[{\"id\":\"0\",\"statistics\":{\"charactersCount\":44,\"transactionsCount\":1},\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"statistics\":{\"charactersCount\":20,\"transactionsCount\":1},\"entities\":[{\"name\":\"Microsoft\",\"matches\":[{\"text\":\"Microsoft\",\"offset\":10,\"length\":9,\"confidenceScore\":0.25}],\"language\":\"en\",\"id\":\"Microsoft\",\"url\":\"https://en.wikipedia.org/wiki/Microsoft\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:26 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json index 02a66126f7a6..ff258ed571b2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesForTextInput.json @@ -1,23 +1,23 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1e6f521e-b399-45f8-80cd-05eb0f720c22", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "0da10601-b9bc-411a-9f12-945fa3f667dc", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-envoy-upstream-service-time" : "16", + "x-envoy-upstream-service-time" : "19", "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=1", - "apim-request-id" : "f795a6fd-89cc-41ef-9031-1145491039f9", + "apim-request-id" : "9e3520c5-51b5-4edd-85eb-4fb02ec511d9", "retry-after" : "0", "StatusCode" : "200", - "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.0}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Wed, 29 Apr 2020 17:12:18 GMT", + "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-02-01\"}", + "Date" : "Wed, 15 Jul 2020 04:14:27 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesTooManyDocuments.json b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesTooManyDocuments.json index be076b357cc5..33e16bc09775 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesTooManyDocuments.json +++ b/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/recognizeLinkedEntitiesTooManyDocuments.json @@ -1,10 +1,10 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.ppe.cognitiveservices.azure.com/text/analytics/v3.0//entities/linking", + "Uri" : "https://REDACTED.cognitiveservices.azure.com/text/analytics/v3.1-preview.1//entities/linking", "Headers" : { - "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.0.0-beta.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "ab2a170a-32eb-49d4-9d94-ff4a39902642", + "User-Agent" : "azsdk-java-azure-ai-textanalytics/1.1.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4e464a1e-85b1-47c2-95e2-787a972954eb", "Content-Type" : "application/json" }, "Response" : { @@ -13,11 +13,11 @@ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains; preload", "x-content-type-options" : "nosniff", "csp-billing-usage" : "CognitiveServices.TextAnalytics.BatchScoring=6", - "apim-request-id" : "819dd030-8b6e-4924-a9de-948c319b02f4", + "apim-request-id" : "7baa13c0-788f-4faf-9f7b-1aec862501fb", "retry-after" : "0", "StatusCode" : "200", "Body" : "{\"documents\":[{\"id\":\"0\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"1\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"2\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"4\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\":[{\"name\":\"Seattle\",\"matches\":[{\"text\":\"Seattle\",\"offset\":26,\"length\":7,\"confidenceScore\":0.19}],\"language\":\"en\",\"id\":\"Seattle\",\"url\":\"https://en.wikipedia.org/wiki/Seattle\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[{\"id\":\"\",\"error\":{\"code\":\"InvalidRequest\",\"message\":\"The request has exceeded the allowed document limits.\",\"innererror\":{\"code\":\"InvalidDocumentBatch\",\"message\":\"The number of documents in the request have exceeded the data limitations. See https://aka.ms/text-analytics-data-limits for additional information\"}}}],\"modelVersion\":\"2020-02-01\"}", - "Date" : "Fri, 08 May 2020 05:52:38 GMT", + "Date" : "Wed, 15 Jul 2020 04:14:33 GMT", "Content-Type" : "application/json; charset=utf-8" }, "Exception" : null diff --git a/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md b/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md index 5ff4685eefcf..c1474438ca8b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md @@ -20,7 +20,7 @@ autorest --java --use=C:/work/autorest.java ### Code generation settings ``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/TextAnalytics.json java: true output-folder: ..\ generate-client-as-impl: true